@maggioli-design-system/magma 2.10.0 → 2.12.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 +2 -2
- package/CHANGELOG.md +59 -0
- package/README.md +14 -7
- package/agents/assets.md +1 -1
- package/agents/color.md +3 -2
- package/agents/mcp.md +5 -5
- package/agents/patterns/actions.md +4 -3
- package/agents/patterns/app-shell.md +70 -22
- package/agents/patterns/density.md +4 -3
- package/agents/patterns/previews/actions/banner.dark.webp +0 -0
- package/agents/patterns/previews/actions/banner.light.webp +0 -0
- package/agents/patterns/previews/actions/confirm.dark.webp +0 -0
- package/agents/patterns/previews/actions/confirm.light.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.dark.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.light.webp +0 -0
- package/agents/patterns/previews/actions/destructive-in-menu.dark.webp +0 -0
- package/agents/patterns/previews/actions/destructive-in-menu.light.webp +0 -0
- package/agents/patterns/previews/actions/dismiss-message.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss-message.light.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.light.webp +0 -0
- package/agents/patterns/previews/actions/more-in-menu.dark.webp +0 -0
- package/agents/patterns/previews/actions/more-in-menu.light.webp +0 -0
- package/agents/patterns/previews/actions/part-primary.dark.webp +0 -0
- package/agents/patterns/previews/actions/part-primary.light.webp +0 -0
- package/agents/patterns/previews/actions/primary.dark.webp +0 -0
- package/agents/patterns/previews/actions/primary.light.webp +0 -0
- package/agents/patterns/previews/actions/remove.dark.webp +0 -0
- package/agents/patterns/previews/actions/remove.light.webp +0 -0
- package/agents/patterns/previews/actions/secondary.dark.webp +0 -0
- package/agents/patterns/previews/actions/secondary.light.webp +0 -0
- package/agents/patterns/previews/actions/stacked.dark.webp +0 -0
- package/agents/patterns/previews/actions/stacked.light.webp +0 -0
- package/agents/patterns/previews/actions/toast.dark.webp +0 -0
- package/agents/patterns/previews/actions/toast.light.webp +0 -0
- package/agents/patterns/previews/app-shell/back-office.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/back-office.html +2 -2
- package/agents/patterns/previews/app-shell/back-office.light.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.html +1 -1
- package/agents/patterns/previews/app-shell/many-sections.light.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.html +2 -2
- package/agents/patterns/previews/app-shell/public-service.light.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.html +68 -0
- package/agents/patterns/previews/app-shell/section-menus.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/act-then-undo.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/act-then-undo.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.light.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.light.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.light.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.light.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.light.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.html +2 -2
- package/agents/patterns/previews/empty-state/not-found.light.webp +0 -0
- package/agents/patterns/previews/empty-state/one-line.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/one-line.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/action-another-way.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/action-another-way.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/check-or-repeat.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/check-or-repeat.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/content-another-way.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/content-another-way.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-action.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-action.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-content.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-content.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.light.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.dark.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.light.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.dark.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.light.webp +0 -0
- package/agents/patterns/previews/labels-and-values/data-of-a-contact.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/data-of-a-contact.light.webp +0 -0
- package/agents/patterns/previews/labels-and-values/payment-before-paying.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/payment-before-paying.light.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.html +2 -2
- package/agents/patterns/previews/list-with-filters/act-on-many.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/find-and-open.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/find-and-open.html +2 -2
- package/agents/patterns/previews/list-with-filters/find-and-open.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.html +2 -2
- package/agents/patterns/previews/list-with-filters/show-new-items.light.webp +0 -0
- package/agents/patterns/previews/loading/await-and-say.dark.webp +0 -0
- package/agents/patterns/previews/loading/await-and-say.light.webp +0 -0
- package/agents/patterns/previews/loading/await-the-control.dark.webp +0 -0
- package/agents/patterns/previews/loading/await-the-control.light.webp +0 -0
- package/agents/patterns/previews/loading/first-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/first-load.light.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.dark.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load.light.webp +0 -0
- package/agents/patterns/previews/loading/progress-in-place.dark.webp +0 -0
- package/agents/patterns/previews/loading/progress-in-place.light.webp +0 -0
- package/agents/patterns/previews/loading/run-in-background.dark.webp +0 -0
- package/agents/patterns/previews/loading/run-in-background.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-elsewhere.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-elsewhere.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-in-page.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-in-page.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-in-part.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-done-in-part.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-elsewhere.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-elsewhere.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-in-place.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-later.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-later.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-elsewhere.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-elsewhere.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-taken.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-taken.light.webp +0 -0
- package/agents/patterns/previews/message-placement/app-deadline.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/app-deadline.light.webp +0 -0
- package/agents/patterns/previews/message-placement/app-failed.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/app-failed.html +2 -2
- package/agents/patterns/previews/message-placement/app-failed.light.webp +0 -0
- package/agents/patterns/previews/message-placement/app-info.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/app-info.light.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.light.webp +0 -0
- package/agents/patterns/previews/message-placement/field-error.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/field-error.light.webp +0 -0
- package/agents/patterns/previews/message-placement/field-hint.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/field-hint.light.webp +0 -0
- package/agents/patterns/previews/message-placement/field-valid.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/field-valid.light.webp +0 -0
- package/agents/patterns/previews/message-placement/region-failed.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-failed.light.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.light.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.dark.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.light.webp +0 -0
- package/agents/patterns/previews/page-header/members-of-a-group.dark.webp +0 -0
- package/agents/patterns/previews/page-header/members-of-a-group.light.webp +0 -0
- package/agents/patterns/previews/page-header/own-profile.dark.webp +0 -0
- package/agents/patterns/previews/page-header/own-profile.light.webp +0 -0
- package/agents/patterns/previews/page-header/request-from-the-list.dark.webp +0 -0
- package/agents/patterns/previews/page-header/request-from-the-list.light.webp +0 -0
- package/agents/patterns/previews/page-header/requests-of-an-office.dark.webp +0 -0
- package/agents/patterns/previews/page-header/requests-of-an-office.light.webp +0 -0
- package/agents/patterns/previews/record-detail/ask-for-words.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/ask-for-words.html +2 -2
- package/agents/patterns/previews/record-detail/ask-for-words.light.webp +0 -0
- package/agents/patterns/previews/record-detail/edit-data.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/edit-data.html +2 -2
- package/agents/patterns/previews/record-detail/edit-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.html +2 -2
- package/agents/patterns/previews/record-detail/read-the-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.html +2 -2
- package/agents/patterns/previews/record-detail/record-changed.light.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.html +2 -2
- package/agents/patterns/previews/record-detail/run-at-once.light.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.html +2 -2
- package/agents/patterns/previews/record-detail/work-on-it.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-groups.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-groups.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.light.webp +0 -0
- package/agents/patterns/previews/rhythm/content-actions.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/content-actions.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inline.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/inline.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.light.webp +0 -0
- package/agents/patterns/previews/rhythm/label-control.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/label-control.light.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.light.webp +0 -0
- package/agents/patterns/previews/surfaces/band.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/band.html +2 -2
- package/agents/patterns/previews/surfaces/band.light.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.html +2 -2
- package/agents/patterns/previews/surfaces/canvas.light.webp +0 -0
- package/agents/patterns/previews/surfaces/card.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/card.light.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.light.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.light.webp +0 -0
- package/agents/patterns/previews/surfaces/section.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/section.light.webp +0 -0
- package/agents/patterns/previews/titles/dialog.dark.webp +0 -0
- package/agents/patterns/previews/titles/dialog.light.webp +0 -0
- package/agents/patterns/previews/titles/group.dark.webp +0 -0
- package/agents/patterns/previews/titles/group.light.webp +0 -0
- package/agents/patterns/previews/titles/page.dark.webp +0 -0
- package/agents/patterns/previews/titles/page.light.webp +0 -0
- package/agents/patterns/previews/titles/part.dark.webp +0 -0
- package/agents/patterns/previews/titles/part.light.webp +0 -0
- package/agents/patterns/previews/titles/section.dark.webp +0 -0
- package/agents/patterns/previews/titles/section.light.webp +0 -0
- package/agents/patterns/previews/widths/dialog.dark.webp +0 -0
- package/agents/patterns/previews/widths/dialog.light.webp +0 -0
- package/agents/patterns/previews/widths/field.dark.webp +0 -0
- package/agents/patterns/previews/widths/field.light.webp +0 -0
- package/agents/patterns/previews/widths/form.dark.webp +0 -0
- package/agents/patterns/previews/widths/form.light.webp +0 -0
- package/agents/patterns/previews/widths/page.dark.webp +0 -0
- package/agents/patterns/previews/widths/page.html +2 -2
- package/agents/patterns/previews/widths/page.light.webp +0 -0
- package/agents/patterns/previews/widths/reading.dark.webp +0 -0
- package/agents/patterns/previews/widths/reading.light.webp +0 -0
- package/agents/patterns/rhythm.md +2 -1
- package/agents/patterns/surfaces.md +4 -3
- package/agents/patterns/titles.md +4 -3
- package/agents/patterns/widths.md +4 -3
- package/agents/patterns.md +8 -7
- package/agents/theming.md +21 -9
- package/dist/cjs/{aria-CzO5Rp1y.js → aria-r1anAHBr.js} +12 -0
- package/dist/cjs/{floating-controller-DaFymQCT.js → floating-controller-B4YhrWm8.js} +1 -1
- package/dist/cjs/{index-Bg68W-da.js → index-Csgx951d.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-CaR39iYg.js → locale-DgMC52AD.js} +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/mds-badge.cjs.entry.js +2 -2
- package/dist/cjs/mds-banner_3.cjs.entry.js +5 -5
- package/dist/cjs/mds-book.cjs.entry.js +2 -2
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +6 -4
- package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
- package/dist/cjs/mds-button_3.cjs.entry.js +78 -16
- package/dist/cjs/mds-calendar_2.cjs.entry.js +8 -8
- package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
- package/dist/cjs/mds-card.cjs.entry.js +2 -2
- package/dist/cjs/mds-details.cjs.entry.js +2 -2
- package/dist/cjs/mds-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/mds-emoji.cjs.entry.js +41 -12
- package/dist/cjs/mds-entity.cjs.entry.js +2 -2
- package/dist/cjs/mds-file-preview.cjs.entry.js +5 -5
- package/dist/cjs/mds-file.cjs.entry.js +5 -5
- package/dist/cjs/mds-filter-item.cjs.entry.js +5 -5
- package/dist/cjs/mds-filter.cjs.entry.js +4 -4
- package/dist/cjs/mds-header-bar.cjs.entry.js +3 -3
- package/dist/cjs/mds-header.cjs.entry.js +3 -3
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +3 -3
- package/dist/cjs/mds-hr.cjs.entry.js +2 -2
- package/dist/cjs/mds-img.cjs.entry.js +2 -2
- package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +4 -4
- package/dist/cjs/mds-input-date.cjs.entry.js +6 -6
- package/dist/cjs/mds-input-field.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-range.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-select.cjs.entry.js +6 -6
- package/dist/cjs/mds-input-switch_2.cjs.entry.js +6 -6
- package/dist/cjs/mds-input-tip_2.cjs.entry.js +5 -5
- package/dist/cjs/mds-input-upload.cjs.entry.js +7 -7
- package/dist/cjs/mds-input.cjs.entry.js +8 -8
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +3 -3
- package/dist/cjs/mds-keyboard.cjs.entry.js +4 -4
- package/dist/cjs/mds-kpi-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-kpi.cjs.entry.js +1 -1
- package/dist/cjs/mds-label.cjs.entry.js +3 -3
- package/dist/cjs/mds-link.cjs.entry.js +5 -5
- package/dist/cjs/mds-list-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-list.cjs.entry.js +1 -1
- package/dist/cjs/mds-mention.cjs.entry.js +3 -3
- package/dist/cjs/mds-modal.cjs.entry.js +34 -15
- package/dist/cjs/mds-note.cjs.entry.js +4 -4
- package/dist/cjs/mds-notification.cjs.entry.js +3 -3
- package/dist/cjs/mds-paginator-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-paginator.cjs.entry.js +4 -4
- package/dist/cjs/mds-policy-ai.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-animation.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-consumption.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-contrast.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-language.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-mode.cjs.entry.js +22 -13
- package/dist/cjs/mds-pref-theme-item.cjs.entry.js +18 -4
- package/dist/cjs/mds-pref-theme.cjs.entry.js +42 -10
- package/dist/cjs/mds-pref.cjs.entry.js +3 -25
- package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table-features-row.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table-features.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-price-table-list-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-price-table-list.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table.cjs.entry.js +1 -1
- package/dist/cjs/mds-progress_2.cjs.entry.js +4 -4
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-push-notification.cjs.entry.js +4 -4
- package/dist/cjs/mds-quote.cjs.entry.js +2 -2
- package/dist/cjs/mds-radial-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-radial-menu.cjs.entry.js +5 -5
- package/dist/cjs/mds-separator.cjs.entry.js +2 -2
- package/dist/cjs/mds-status-bar.cjs.entry.js +3 -3
- package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-stepper-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-tab-bar.cjs.entry.js +3 -3
- package/dist/cjs/mds-tab_2.cjs.entry.js +6 -6
- package/dist/cjs/mds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-footer.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-header.cjs.entry.js +3 -3
- package/dist/cjs/mds-table-row.cjs.entry.js +4 -4
- package/dist/cjs/mds-table.cjs.entry.js +4 -4
- package/dist/cjs/mds-text.cjs.entry.js +2 -2
- package/dist/cjs/mds-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/mds-toast.cjs.entry.js +3 -3
- package/dist/cjs/mds-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/mds-tree-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-tree.cjs.entry.js +1 -1
- package/dist/cjs/mds-url-view.cjs.entry.js +4 -4
- package/dist/cjs/mds-usage.cjs.entry.js +4 -4
- package/dist/cjs/mds-video-wall.cjs.entry.js +2 -2
- package/dist/cjs/mds-zero.cjs.entry.js +3 -3
- package/dist/cjs/{preference-CQQ3eb9W.js → preference-DhNxLZ4R.js} +20 -0
- package/dist/collection/common/aria.js +12 -1
- package/dist/collection/common/preference.js +19 -1
- package/dist/collection/components/mds-accordion/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +1 -1
- package/dist/collection/components/mds-author/AGENTS.md +1 -1
- package/dist/collection/components/mds-author/documentation.json +1 -1
- package/dist/collection/components/mds-avatar/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar/documentation.json +2 -2
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +2 -2
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +2 -2
- package/dist/collection/components/mds-badge/AGENTS.md +1 -1
- package/dist/collection/components/mds-badge/documentation.json +1 -1
- package/dist/collection/components/mds-badge/mds-badge.css +15 -10
- package/dist/collection/components/mds-banner/AGENTS.md +1 -1
- package/dist/collection/components/mds-banner/documentation.json +2 -2
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +1 -1
- package/dist/collection/components/mds-bibliography/AGENTS.md +1 -1
- package/dist/collection/components/mds-bibliography/documentation.json +1 -1
- package/dist/collection/components/mds-book/AGENTS.md +1 -1
- package/dist/collection/components/mds-book/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +2 -2
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +2 -2
- package/dist/collection/components/mds-button/AGENTS.md +9 -4
- package/dist/collection/components/mds-button/documentation.json +100 -7
- package/dist/collection/components/mds-button/examples.md +73 -0
- package/dist/collection/components/mds-button/mds-button.css +122 -14
- package/dist/collection/components/mds-button/mds-button.js +139 -13
- package/dist/collection/components/mds-button/mistakes.md +35 -0
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +7 -2
- package/dist/collection/components/mds-button-dropdown/documentation.json +97 -4
- package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +69 -3
- package/dist/collection/components/mds-button-group/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-group/documentation.json +1 -1
- package/dist/collection/components/mds-button-group/mds-button-group.js +1 -1
- package/dist/collection/components/mds-calendar/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar/documentation.json +2 -2
- package/dist/collection/components/mds-calendar/mds-calendar.js +5 -5
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +2 -2
- package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.js +1 -1
- package/dist/collection/components/mds-card/AGENTS.md +1 -1
- package/dist/collection/components/mds-card/documentation.json +1 -1
- package/dist/collection/components/mds-card/mds-card.js +1 -1
- package/dist/collection/components/mds-card-content/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-content/documentation.json +1 -1
- package/dist/collection/components/mds-card-content/mds-card-content.js +1 -1
- package/dist/collection/components/mds-card-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-footer/documentation.json +1 -1
- package/dist/collection/components/mds-card-footer/mds-card-footer.js +1 -1
- package/dist/collection/components/mds-card-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-header/documentation.json +1 -1
- package/dist/collection/components/mds-card-header/mds-card-header.js +1 -1
- package/dist/collection/components/mds-card-media/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-media/documentation.json +1 -1
- package/dist/collection/components/mds-card-media/mds-card-media.js +1 -1
- package/dist/collection/components/mds-chip/AGENTS.md +1 -1
- package/dist/collection/components/mds-chip/documentation.json +2 -2
- package/dist/collection/components/mds-chip/mds-chip.css +3 -2
- package/dist/collection/components/mds-chip/mds-chip.js +1 -1
- package/dist/collection/components/mds-details/AGENTS.md +1 -1
- package/dist/collection/components/mds-details/documentation.json +1 -1
- package/dist/collection/components/mds-details/mds-details.js +1 -1
- package/dist/collection/components/mds-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-dropdown/mds-dropdown.css +12 -14
- package/dist/collection/components/mds-dropdown/mds-dropdown.js +2 -2
- package/dist/collection/components/mds-emoji/AGENTS.md +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/mds-emoji.js +1 -1
- package/dist/collection/components/mds-entity/AGENTS.md +1 -1
- package/dist/collection/components/mds-entity/documentation.json +2 -2
- package/dist/collection/components/mds-entity/mds-entity.js +1 -1
- package/dist/collection/components/mds-file/AGENTS.md +1 -1
- package/dist/collection/components/mds-file/documentation.json +1 -1
- package/dist/collection/components/mds-file/mds-file.css +3 -2
- package/dist/collection/components/mds-file/mds-file.js +1 -1
- package/dist/collection/components/mds-file-preview/AGENTS.md +1 -1
- package/dist/collection/components/mds-file-preview/documentation.json +2 -2
- package/dist/collection/components/mds-file-preview/mds-file-preview.css +3 -2
- package/dist/collection/components/mds-file-preview/mds-file-preview.js +2 -2
- package/dist/collection/components/mds-filter/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter/documentation.json +1 -1
- package/dist/collection/components/mds-filter/mds-filter.css +3 -2
- package/dist/collection/components/mds-filter/mds-filter.js +1 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter-item/documentation.json +1 -1
- package/dist/collection/components/mds-filter-item/mds-filter-item.css +3 -2
- package/dist/collection/components/mds-filter-item/mds-filter-item.js +1 -1
- package/dist/collection/components/mds-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-header/documentation.json +2 -2
- package/dist/collection/components/mds-header/mds-header.css +3 -2
- package/dist/collection/components/mds-header/mds-header.js +1 -1
- package/dist/collection/components/mds-header-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-header-bar/documentation.json +2 -2
- package/dist/collection/components/mds-header-bar/mds-header-bar.js +1 -1
- package/dist/collection/components/mds-help/AGENTS.md +1 -1
- package/dist/collection/components/mds-help/documentation.json +1 -1
- package/dist/collection/components/mds-help/mds-help.js +1 -1
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +1 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +2 -2
- package/dist/collection/components/mds-horizontal-scroll/mds-horizontal-scroll.js +1 -1
- package/dist/collection/components/mds-hr/AGENTS.md +1 -1
- package/dist/collection/components/mds-hr/documentation.json +1 -1
- package/dist/collection/components/mds-hr/mds-hr.js +1 -1
- package/dist/collection/components/mds-icon/AGENTS.md +1 -1
- package/dist/collection/components/mds-icon/documentation.json +1 -1
- package/dist/collection/components/mds-icon/mds-icon.js +1 -1
- package/dist/collection/components/mds-img/AGENTS.md +1 -1
- package/dist/collection/components/mds-img/documentation.json +2 -2
- package/dist/collection/components/mds-input/AGENTS.md +1 -1
- package/dist/collection/components/mds-input/documentation.json +2 -2
- package/dist/collection/components/mds-input/mds-input.css +16 -8
- package/dist/collection/components/mds-input/mds-input.js +3 -3
- package/dist/collection/components/mds-input-date/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date/documentation.json +2 -2
- package/dist/collection/components/mds-input-date/mds-input-date.css +3 -2
- package/dist/collection/components/mds-input-date/mds-input-date.js +2 -2
- package/dist/collection/components/mds-input-date-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +2 -2
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +3 -2
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +2 -2
- package/dist/collection/components/mds-input-date-range-preselection/mds-input-date-range-preselection.js +1 -1
- package/dist/collection/components/mds-input-field/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-field/documentation.json +1 -1
- package/dist/collection/components/mds-input-field/mds-input-field.js +1 -1
- package/dist/collection/components/mds-input-otp/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-otp/documentation.json +2 -2
- package/dist/collection/components/mds-input-otp/mds-input-otp.js +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-range/mds-input-range.css +3 -2
- package/dist/collection/components/mds-input-range/mds-input-range.js +1 -1
- package/dist/collection/components/mds-input-select/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-select/documentation.json +1 -1
- package/dist/collection/components/mds-input-select/mds-input-select.css +15 -11
- package/dist/collection/components/mds-input-select/mds-input-select.js +2 -2
- package/dist/collection/components/mds-input-switch/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-switch/documentation.json +1 -1
- package/dist/collection/components/mds-input-switch/mds-input-switch.css +3 -2
- package/dist/collection/components/mds-input-switch/mds-input-switch.js +1 -1
- package/dist/collection/components/mds-input-tip/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip/mds-input-tip.js +1 -1
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip-item/mds-input-tip-item.js +2 -2
- package/dist/collection/components/mds-input-upload/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-upload/documentation.json +2 -2
- package/dist/collection/components/mds-input-upload/mds-input-upload.js +5 -5
- package/dist/collection/components/mds-keyboard/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard/documentation.json +2 -2
- package/dist/collection/components/mds-keyboard/mds-keyboard.css +3 -2
- package/dist/collection/components/mds-keyboard/mds-keyboard.js +1 -1
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +1 -1
- package/dist/collection/components/mds-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +1 -1
- package/dist/collection/components/mds-kpi/mds-kpi.js +1 -1
- package/dist/collection/components/mds-kpi-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +1 -1
- package/dist/collection/components/mds-kpi-item/mds-kpi-item.css +9 -6
- package/dist/collection/components/mds-kpi-item/mds-kpi-item.js +1 -1
- package/dist/collection/components/mds-label/AGENTS.md +1 -1
- package/dist/collection/components/mds-label/documentation.json +2 -2
- package/dist/collection/components/mds-label/mds-label.css +3 -2
- package/dist/collection/components/mds-link/AGENTS.md +1 -1
- package/dist/collection/components/mds-link/documentation.json +1 -1
- package/dist/collection/components/mds-link/mds-link.js +3 -3
- package/dist/collection/components/mds-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +1 -1
- package/dist/collection/components/mds-list/mds-list.js +1 -1
- package/dist/collection/components/mds-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-list-item/mds-list-item.js +1 -1
- package/dist/collection/components/mds-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +2 -2
- package/dist/collection/components/mds-mention/mds-mention.js +1 -1
- package/dist/collection/components/mds-modal/AGENTS.md +3 -3
- package/dist/collection/components/mds-modal/documentation.json +4 -4
- package/dist/collection/components/mds-modal/mds-modal.css +3 -2
- package/dist/collection/components/mds-modal/mds-modal.js +32 -13
- package/dist/collection/components/mds-note/AGENTS.md +1 -1
- package/dist/collection/components/mds-note/documentation.json +2 -2
- package/dist/collection/components/mds-note/mds-note.css +3 -2
- package/dist/collection/components/mds-note/mds-note.js +1 -1
- package/dist/collection/components/mds-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-notification/documentation.json +1 -1
- package/dist/collection/components/mds-notification/mds-notification.js +1 -1
- package/dist/collection/components/mds-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +1 -1
- package/dist/collection/components/mds-paginator/mds-paginator.css +3 -2
- package/dist/collection/components/mds-paginator/mds-paginator.js +1 -1
- package/dist/collection/components/mds-paginator-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +1 -1
- package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +1 -1
- package/dist/collection/components/mds-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +2 -2
- package/dist/collection/components/mds-policy-ai/mds-policy-ai.js +1 -1
- package/dist/collection/components/mds-pref/AGENTS.md +3 -3
- package/dist/collection/components/mds-pref/documentation.json +4 -9
- package/dist/collection/components/mds-pref/examples.md +1 -1
- package/dist/collection/components/mds-pref/mds-pref.js +1 -29
- package/dist/collection/components/mds-pref/mistakes.md +1 -1
- package/dist/collection/components/mds-pref-animation/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +2 -2
- package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +2 -2
- package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +2 -2
- package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +2 -2
- package/dist/collection/components/mds-pref-language/mds-pref-language.js +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +2 -2
- package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +1 -1
- package/dist/collection/components/mds-pref-mode/AGENTS.md +3 -2
- package/dist/collection/components/mds-pref-mode/documentation.json +5 -5
- package/dist/collection/components/mds-pref-mode/mds-pref-mode.css +2 -1
- package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +20 -11
- package/dist/collection/components/mds-pref-mode/mistakes.md +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +7 -6
- package/dist/collection/components/mds-pref-theme/documentation.json +7 -7
- package/dist/collection/components/mds-pref-theme/examples.md +18 -21
- package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +43 -11
- package/dist/collection/components/mds-pref-theme/mistakes.md +15 -15
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +6 -6
- package/dist/collection/components/mds-pref-theme-item/documentation.json +9 -9
- package/dist/collection/components/mds-pref-theme-item/examples.md +18 -24
- package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.css +13 -7
- package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +19 -5
- package/dist/collection/components/mds-pref-theme-item/mistakes.md +14 -16
- package/dist/collection/components/mds-price-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table/documentation.json +1 -1
- package/dist/collection/components/mds-price-table/mds-price-table.js +1 -1
- package/dist/collection/components/mds-price-table-features/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features/mds-price-table-features.js +1 -1
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.css +3 -2
- package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.js +1 -1
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.css +3 -2
- package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.js +1 -1
- package/dist/collection/components/mds-price-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-header/mds-price-table-header.js +1 -1
- package/dist/collection/components/mds-price-table-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list/mds-price-table-list.css +3 -2
- package/dist/collection/components/mds-price-table-list/mds-price-table-list.js +1 -1
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.js +1 -1
- package/dist/collection/components/mds-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-progress/documentation.json +1 -1
- package/dist/collection/components/mds-progress/mds-progress.css +3 -2
- package/dist/collection/components/mds-progress/mds-progress.js +1 -1
- package/dist/collection/components/mds-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +2 -2
- package/dist/collection/components/mds-push-notification/mds-push-notification.css +3 -2
- package/dist/collection/components/mds-push-notification/mds-push-notification.js +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +2 -2
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +2 -2
- package/dist/collection/components/mds-quote/AGENTS.md +1 -1
- package/dist/collection/components/mds-quote/documentation.json +1 -1
- package/dist/collection/components/mds-quote/mds-quote.js +1 -1
- package/dist/collection/components/mds-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +2 -2
- package/dist/collection/components/mds-radial-menu/mds-radial-menu.js +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +2 -2
- package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.js +1 -1
- package/dist/collection/components/mds-radial-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +1 -1
- package/dist/collection/components/mds-radial-progress/mds-radial-progress.js +1 -1
- package/dist/collection/components/mds-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +1 -1
- package/dist/collection/components/mds-separator/mds-separator.js +1 -1
- package/dist/collection/components/mds-spinner/AGENTS.md +1 -1
- package/dist/collection/components/mds-spinner/documentation.json +1 -1
- package/dist/collection/components/mds-spinner/mds-spinner.js +1 -1
- package/dist/collection/components/mds-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +2 -2
- package/dist/collection/components/mds-status-bar/mds-status-bar.css +3 -2
- package/dist/collection/components/mds-status-bar/mds-status-bar.js +1 -1
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +1 -1
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +1 -1
- package/dist/collection/components/mds-tab/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab/documentation.json +1 -1
- package/dist/collection/components/mds-tab/mds-tab.css +3 -2
- package/dist/collection/components/mds-tab/mds-tab.js +2 -2
- package/dist/collection/components/mds-tab-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar/mds-tab-bar.css +3 -2
- package/dist/collection/components/mds-tab-bar/mds-tab-bar.js +1 -1
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.css +3 -2
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +1 -1
- package/dist/collection/components/mds-tab-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +2 -2
- package/dist/collection/components/mds-tab-item/mds-tab-item.js +1 -1
- package/dist/collection/components/mds-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-table/documentation.json +1 -1
- package/dist/collection/components/mds-table/mds-table.css +6 -4
- package/dist/collection/components/mds-table/mds-table.js +1 -1
- package/dist/collection/components/mds-table-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +1 -1
- package/dist/collection/components/mds-table-body/mds-table-body.js +1 -1
- package/dist/collection/components/mds-table-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-cell/mds-table-cell.js +1 -1
- package/dist/collection/components/mds-table-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-footer/mds-table-footer.js +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +2 -2
- package/dist/collection/components/mds-table-header/mds-table-header.js +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +2 -2
- package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +1 -1
- package/dist/collection/components/mds-table-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-row/documentation.json +1 -1
- package/dist/collection/components/mds-table-row/mds-table-row.js +2 -2
- package/dist/collection/components/mds-text/AGENTS.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +1 -1
- package/dist/collection/components/mds-text/mds-text.js +1 -1
- package/dist/collection/components/mds-toast/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast/documentation.json +2 -2
- package/dist/collection/components/mds-toast/mds-toast.js +1 -1
- package/dist/collection/components/mds-toast-region/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast-region/documentation.json +1 -1
- package/dist/collection/components/mds-toast-region/mds-toast-region.js +1 -1
- package/dist/collection/components/mds-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +1 -1
- package/dist/collection/components/mds-tooltip/mds-tooltip.css +4 -2
- package/dist/collection/components/mds-tooltip/mds-tooltip.js +1 -1
- package/dist/collection/components/mds-tree/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree/documentation.json +1 -1
- package/dist/collection/components/mds-tree/mds-tree.js +1 -1
- package/dist/collection/components/mds-tree-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +2 -2
- package/dist/collection/components/mds-tree-item/mds-tree-item.js +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +2 -2
- package/dist/collection/components/mds-url-view/mds-url-view.css +3 -2
- package/dist/collection/components/mds-url-view/mds-url-view.js +1 -1
- package/dist/collection/components/mds-usage/AGENTS.md +1 -1
- package/dist/collection/components/mds-usage/documentation.json +1 -1
- package/dist/collection/components/mds-usage/mds-usage.css +3 -2
- package/dist/collection/components/mds-usage/mds-usage.js +1 -1
- package/dist/collection/components/mds-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-video-wall/mds-video-wall.js +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/collection/components/mds-zero/mds-zero.css +3 -2
- package/dist/collection/components/mds-zero/mds-zero.js +1 -1
- package/dist/collection/type/button.js +3 -0
- package/dist/components/index.js +1 -1
- package/dist/components/mds-accordion-item.js +1 -1
- package/dist/components/mds-accordion-timer-item.js +1 -1
- package/dist/components/mds-accordion.js +1 -1
- package/dist/components/mds-avatar-stack-item.js +1 -1
- package/dist/components/mds-avatar-stack.js +1 -1
- package/dist/components/mds-avatar.js +1 -1
- package/dist/components/mds-badge.js +1 -1
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-benchmark-bar.js +1 -1
- package/dist/components/mds-bibliography.js +1 -1
- package/dist/components/mds-book.js +1 -1
- package/dist/components/mds-breadcrumb-item.js +1 -1
- package/dist/components/mds-breadcrumb.js +1 -1
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-button-group.js +1 -1
- package/dist/components/mds-button.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-card-content.js +1 -1
- package/dist/components/mds-card-footer.js +1 -1
- package/dist/components/mds-card-header.js +1 -1
- package/dist/components/mds-card-media.js +1 -1
- package/dist/components/mds-card.js +1 -1
- package/dist/components/mds-chip.js +1 -1
- package/dist/components/mds-details.js +1 -1
- package/dist/components/mds-dropdown.js +1 -1
- package/dist/components/mds-emoji.js +5 -5
- package/dist/components/mds-entity.js +1 -1
- package/dist/components/mds-file-preview.js +1 -1
- package/dist/components/mds-file.js +1 -1
- package/dist/components/mds-filter-item.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header-bar.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-help.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-hr.js +1 -1
- package/dist/components/mds-icon.js +1 -1
- package/dist/components/mds-img.js +1 -1
- package/dist/components/mds-input-date-range-preselection.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-field.js +1 -1
- package/dist/components/mds-input-otp.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-input-select.js +1 -1
- package/dist/components/mds-input-switch.js +1 -1
- package/dist/components/mds-input-tip-item.js +1 -1
- package/dist/components/mds-input-tip.js +1 -1
- package/dist/components/mds-input-upload.js +1 -1
- package/dist/components/mds-input.js +1 -1
- package/dist/components/mds-keyboard-key.js +1 -1
- package/dist/components/mds-keyboard.js +1 -1
- package/dist/components/mds-kpi-item.js +1 -1
- package/dist/components/mds-kpi.js +1 -1
- package/dist/components/mds-label.js +1 -1
- package/dist/components/mds-link.js +1 -1
- package/dist/components/mds-list-item.js +1 -1
- package/dist/components/mds-list.js +1 -1
- package/dist/components/mds-mention.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-note.js +1 -1
- package/dist/components/mds-notification.js +1 -1
- package/dist/components/mds-paginator-item.js +1 -1
- package/dist/components/mds-paginator.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-pref-animation.js +1 -1
- package/dist/components/mds-pref-consumption.js +1 -1
- package/dist/components/mds-pref-contrast.js +1 -1
- package/dist/components/mds-pref-language-item.js +1 -1
- package/dist/components/mds-pref-language.js +1 -1
- package/dist/components/mds-pref-mode.js +1 -1
- package/dist/components/mds-pref-theme-item.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/components/mds-pref.js +1 -1
- package/dist/components/mds-price-table-features-cell.js +1 -1
- package/dist/components/mds-price-table-features-row.js +1 -1
- package/dist/components/mds-price-table-features.js +1 -1
- package/dist/components/mds-price-table-header.js +1 -1
- package/dist/components/mds-price-table-list-item.js +1 -1
- package/dist/components/mds-price-table-list.js +1 -1
- package/dist/components/mds-price-table.js +1 -1
- package/dist/components/mds-progress.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-push-notification.js +1 -1
- package/dist/components/mds-quote.js +1 -1
- package/dist/components/mds-radial-menu-item.js +1 -1
- package/dist/components/mds-radial-menu.js +1 -1
- package/dist/components/mds-radial-progress.js +1 -1
- package/dist/components/mds-separator.js +1 -1
- package/dist/components/mds-spinner.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-stepper-bar-item.js +1 -1
- package/dist/components/mds-stepper-bar.js +1 -1
- package/dist/components/mds-tab-bar-item.js +1 -1
- package/dist/components/mds-tab-bar.js +1 -1
- package/dist/components/mds-tab-item.js +1 -1
- package/dist/components/mds-tab.js +1 -1
- package/dist/components/mds-table-body.js +1 -1
- package/dist/components/mds-table-cell.js +1 -1
- package/dist/components/mds-table-footer.js +1 -1
- package/dist/components/mds-table-header-cell.js +1 -1
- package/dist/components/mds-table-header.js +1 -1
- package/dist/components/mds-table-row.js +1 -1
- package/dist/components/mds-table.js +1 -1
- package/dist/components/mds-text.js +1 -1
- package/dist/components/mds-toast-region.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/mds-tooltip.js +1 -1
- package/dist/components/mds-tree-item.js +1 -1
- package/dist/components/mds-tree.js +1 -1
- package/dist/components/mds-url-view.js +1 -1
- package/dist/components/mds-usage.js +1 -1
- package/dist/components/mds-video-wall.js +1 -1
- package/dist/components/mds-zero.js +1 -1
- package/dist/components/p-3rr6yzu-.js +1 -0
- package/dist/components/{p-DvDB_L_5.js → p-BBZyH3mn.js} +1 -1
- package/dist/components/{p-C7rDjrH4.js → p-BBrPpCNK.js} +1 -1
- package/dist/components/p-BE05D6Pe.js +1 -0
- package/dist/components/{p-ikNX7XDH.js → p-BI1ShBQG.js} +1 -1
- package/dist/components/p-BQSO-HFx.js +1 -0
- package/dist/components/{p-CVRN4LDc.js → p-Bbrei_yQ.js} +1 -1
- package/dist/components/{p-DhpcFZrc.js → p-BpND63Kl.js} +1 -1
- package/dist/components/{p-DqdlT4UG.js → p-BuhoBOYR.js} +1 -1
- package/dist/components/p-Bw-eI2ca.js +1 -0
- package/dist/components/{p-DTtmr_Y9.js → p-BwwiliWt.js} +1 -1
- package/dist/components/{p-COkn4Vtq.js → p-C6LU1s8K.js} +1 -1
- package/dist/components/{p-Br6-kva-.js → p-CWOW2Vna.js} +1 -1
- package/dist/components/{p-B6AFku7a.js → p-CZX6N7ce.js} +1 -1
- package/dist/components/{p-BFDRt7-n.js → p-CZwKeFQT.js} +1 -1
- package/dist/components/{p-CKnbQQUb.js → p-ClvoVgmw.js} +1 -1
- package/dist/{magma-components/p-CLhuNxYQ.js → components/p-CpuUmvdl.js} +1 -1
- package/dist/components/{p-C_Pc94vn.js → p-CrOv4KdL.js} +1 -1
- package/dist/components/{p-CZjwSwe5.js → p-CvbuCEYD.js} +2 -2
- package/dist/components/{p-D8CloC8I.js → p-DN1yF-xO.js} +1 -1
- package/dist/components/{p-4LbHmDXv.js → p-DUgCzZw9.js} +1 -1
- package/dist/components/{p-DJd8f8dz.js → p-DWOg4-dH.js} +1 -1
- package/dist/components/{p-FsctOap9.js → p-DZ4_zLTp.js} +1 -1
- package/dist/components/{p-gLo3t_qO.js → p-Do7IoDLD.js} +2 -2
- package/dist/components/{p-BiW6luA5.js → p-DrtIqOQn.js} +1 -1
- package/dist/components/p-DwKxtKwS.js +1 -0
- package/dist/components/{p-DOdUioZq.js → p-F0qhFsF0.js} +1 -1
- package/dist/components/p-J48g0t65.js +1 -0
- package/dist/components/{p-BaynxVRZ.js → p-NNPsVjnj.js} +1 -1
- package/dist/components/{p-CP5Qw9_T.js → p-UfaGafRS.js} +1 -1
- package/dist/components/{p-DdzJfsw7.js → p-Vgo7t88R.js} +1 -1
- package/dist/components/{p-D_RIY063.js → p-j5Hnbfv9.js} +1 -1
- package/dist/components/{p-DW6ie49j.js → p-k_Ly95Tj.js} +1 -1
- package/dist/components/{p-DlglisEn.js → p-lXKBo6V3.js} +1 -1
- package/dist/components/{p-DGhzWuCS.js → p-oFHbHRLX.js} +1 -1
- package/dist/documentation.json +269 -83
- package/dist/esm/{aria-Cvhn9asj.js → aria-DwKxtKwS.js} +12 -1
- package/dist/esm/{floating-controller-BVlbYYkf.js → floating-controller-xixU_s1w.js} +1 -1
- package/dist/esm/{index-BJVvHlvf.js → index-DEL0bLpb.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-B6cOkl4I.js → locale-DhP1Ge2o.js} +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-accordion-item.entry.js +1 -1
- package/dist/esm/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm/mds-accordion.entry.js +1 -1
- package/dist/esm/mds-avatar.entry.js +1 -1
- package/dist/esm/mds-badge.entry.js +2 -2
- package/dist/esm/mds-banner_3.entry.js +5 -5
- package/dist/esm/mds-book.entry.js +2 -2
- package/dist/esm/mds-breadcrumb.entry.js +2 -2
- package/dist/esm/mds-button-dropdown.entry.js +6 -4
- package/dist/esm/mds-button-group.entry.js +1 -1
- package/dist/esm/mds-button_3.entry.js +78 -16
- package/dist/esm/mds-calendar_2.entry.js +8 -8
- package/dist/esm/mds-card-content.entry.js +1 -1
- package/dist/esm/mds-card-footer.entry.js +1 -1
- package/dist/esm/mds-card-header.entry.js +1 -1
- package/dist/esm/mds-card-media.entry.js +1 -1
- package/dist/esm/mds-card.entry.js +2 -2
- package/dist/esm/mds-details.entry.js +2 -2
- package/dist/esm/mds-dropdown.entry.js +6 -6
- package/dist/esm/mds-emoji.entry.js +41 -12
- package/dist/esm/mds-entity.entry.js +2 -2
- package/dist/esm/mds-file-preview.entry.js +5 -5
- package/dist/esm/mds-file.entry.js +5 -5
- package/dist/esm/mds-filter-item.entry.js +5 -5
- package/dist/esm/mds-filter.entry.js +4 -4
- package/dist/esm/mds-header-bar.entry.js +3 -3
- package/dist/esm/mds-header.entry.js +3 -3
- package/dist/esm/mds-horizontal-scroll.entry.js +3 -3
- package/dist/esm/mds-hr.entry.js +2 -2
- package/dist/esm/mds-img.entry.js +2 -2
- package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +4 -4
- package/dist/esm/mds-input-date.entry.js +6 -6
- package/dist/esm/mds-input-field.entry.js +1 -1
- package/dist/esm/mds-input-otp.entry.js +3 -3
- package/dist/esm/mds-input-range.entry.js +3 -3
- package/dist/esm/mds-input-select.entry.js +6 -6
- package/dist/esm/mds-input-switch_2.entry.js +6 -6
- package/dist/esm/mds-input-tip_2.entry.js +5 -5
- package/dist/esm/mds-input-upload.entry.js +7 -7
- package/dist/esm/mds-input.entry.js +8 -8
- package/dist/esm/mds-keyboard-key.entry.js +3 -3
- package/dist/esm/mds-keyboard.entry.js +4 -4
- package/dist/esm/mds-kpi-item.entry.js +3 -3
- package/dist/esm/mds-kpi.entry.js +1 -1
- package/dist/esm/mds-label.entry.js +3 -3
- package/dist/esm/mds-link.entry.js +5 -5
- package/dist/esm/mds-list-item.entry.js +1 -1
- package/dist/esm/mds-list.entry.js +1 -1
- package/dist/esm/mds-mention.entry.js +3 -3
- package/dist/esm/mds-modal.entry.js +34 -15
- package/dist/esm/mds-note.entry.js +4 -4
- package/dist/esm/mds-notification.entry.js +3 -3
- package/dist/esm/mds-paginator-item.entry.js +2 -2
- package/dist/esm/mds-paginator.entry.js +4 -4
- package/dist/esm/mds-policy-ai.entry.js +3 -3
- package/dist/esm/mds-pref-animation.entry.js +3 -3
- package/dist/esm/mds-pref-consumption.entry.js +3 -3
- package/dist/esm/mds-pref-contrast.entry.js +3 -3
- package/dist/esm/mds-pref-language-item.entry.js +3 -3
- package/dist/esm/mds-pref-language.entry.js +3 -3
- package/dist/esm/mds-pref-mode.entry.js +22 -13
- package/dist/esm/mds-pref-theme-item.entry.js +18 -4
- package/dist/esm/mds-pref-theme.entry.js +42 -10
- package/dist/esm/mds-pref.entry.js +3 -25
- package/dist/esm/mds-price-table-features-cell.entry.js +3 -3
- package/dist/esm/mds-price-table-features-row.entry.js +3 -3
- package/dist/esm/mds-price-table-features.entry.js +2 -2
- package/dist/esm/mds-price-table-header.entry.js +1 -1
- package/dist/esm/mds-price-table-list-item.entry.js +1 -1
- package/dist/esm/mds-price-table-list.entry.js +3 -3
- package/dist/esm/mds-price-table.entry.js +1 -1
- package/dist/esm/mds-progress_2.entry.js +4 -4
- package/dist/esm/mds-push-notification-item.entry.js +4 -4
- package/dist/esm/mds-push-notification.entry.js +4 -4
- package/dist/esm/mds-quote.entry.js +2 -2
- package/dist/esm/mds-radial-menu-item.entry.js +1 -1
- package/dist/esm/mds-radial-menu.entry.js +5 -5
- package/dist/esm/mds-separator.entry.js +2 -2
- package/dist/esm/mds-status-bar.entry.js +3 -3
- package/dist/esm/mds-stepper-bar-item.entry.js +3 -3
- package/dist/esm/mds-stepper-bar.entry.js +1 -1
- package/dist/esm/mds-tab-bar-item.entry.js +4 -4
- package/dist/esm/mds-tab-bar.entry.js +3 -3
- package/dist/esm/mds-tab_2.entry.js +6 -6
- package/dist/esm/mds-table-body.entry.js +2 -2
- package/dist/esm/mds-table-footer.entry.js +2 -2
- package/dist/esm/mds-table-header-cell.entry.js +2 -2
- package/dist/esm/mds-table-header.entry.js +3 -3
- package/dist/esm/mds-table-row.entry.js +4 -4
- package/dist/esm/mds-table.entry.js +4 -4
- package/dist/esm/mds-text.entry.js +2 -2
- package/dist/esm/mds-toast-region.entry.js +1 -1
- package/dist/esm/mds-toast.entry.js +3 -3
- package/dist/esm/mds-tooltip.entry.js +5 -5
- package/dist/esm/mds-tree-item.entry.js +3 -3
- package/dist/esm/mds-tree.entry.js +1 -1
- package/dist/esm/mds-url-view.entry.js +4 -4
- package/dist/esm/mds-usage.entry.js +4 -4
- package/dist/esm/mds-video-wall.entry.js +2 -2
- package/dist/esm/mds-zero.entry.js +3 -3
- package/dist/esm/{preference-C5XjgGCb.js → preference-C8foBO86.js} +19 -1
- package/dist/esm-es5/aria-DwKxtKwS.js +12 -0
- package/dist/esm-es5/{floating-controller-BVlbYYkf.js → floating-controller-xixU_s1w.js} +1 -1
- package/dist/esm-es5/{index-BJVvHlvf.js → index-DEL0bLpb.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{locale-B6cOkl4I.js → locale-DhP1Ge2o.js} +18 -18
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion.entry.js +1 -1
- package/dist/esm-es5/mds-avatar.entry.js +2 -2
- package/dist/esm-es5/mds-badge.entry.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +4 -4
- package/dist/esm-es5/mds-book.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
- package/dist/esm-es5/mds-button-dropdown.entry.js +6 -4
- package/dist/esm-es5/mds-button-group.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +39 -17
- package/dist/esm-es5/mds-calendar_2.entry.js +4 -4
- package/dist/esm-es5/mds-card-content.entry.js +1 -1
- package/dist/esm-es5/mds-card-footer.entry.js +1 -1
- package/dist/esm-es5/mds-card-header.entry.js +1 -1
- package/dist/esm-es5/mds-card-media.entry.js +1 -1
- package/dist/esm-es5/mds-card.entry.js +2 -2
- package/dist/esm-es5/mds-details.entry.js +2 -2
- package/dist/esm-es5/mds-dropdown.entry.js +13 -13
- package/dist/esm-es5/mds-emoji.entry.js +111 -109
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +7 -7
- package/dist/esm-es5/mds-file.entry.js +3 -3
- package/dist/esm-es5/mds-filter-item.entry.js +2 -2
- package/dist/esm-es5/mds-filter.entry.js +2 -2
- package/dist/esm-es5/mds-header-bar.entry.js +2 -2
- package/dist/esm-es5/mds-header.entry.js +2 -2
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +2 -2
- package/dist/esm-es5/mds-hr.entry.js +1 -1
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range-preselection.entry.js +3 -3
- package/dist/esm-es5/mds-input-date-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-date.entry.js +3 -3
- package/dist/esm-es5/mds-input-field.entry.js +1 -1
- package/dist/esm-es5/mds-input-otp.entry.js +2 -2
- package/dist/esm-es5/mds-input-range.entry.js +2 -2
- package/dist/esm-es5/mds-input-select.entry.js +10 -10
- package/dist/esm-es5/mds-input-switch_2.entry.js +2 -2
- package/dist/esm-es5/mds-input-tip_2.entry.js +3 -3
- package/dist/esm-es5/mds-input-upload.entry.js +2 -2
- package/dist/esm-es5/mds-input.entry.js +3 -3
- package/dist/esm-es5/mds-keyboard-key.entry.js +2 -2
- package/dist/esm-es5/mds-keyboard.entry.js +2 -2
- package/dist/esm-es5/mds-kpi-item.entry.js +3 -3
- package/dist/esm-es5/mds-kpi.entry.js +1 -1
- package/dist/esm-es5/mds-label.entry.js +1 -1
- package/dist/esm-es5/mds-link.entry.js +2 -2
- package/dist/esm-es5/mds-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-list.entry.js +1 -1
- package/dist/esm-es5/mds-mention.entry.js +2 -2
- package/dist/esm-es5/mds-modal.entry.js +23 -11
- package/dist/esm-es5/mds-note.entry.js +2 -2
- package/dist/esm-es5/mds-notification.entry.js +2 -2
- package/dist/esm-es5/mds-paginator-item.entry.js +2 -2
- package/dist/esm-es5/mds-paginator.entry.js +3 -3
- package/dist/esm-es5/mds-policy-ai.entry.js +2 -2
- package/dist/esm-es5/mds-pref-animation.entry.js +2 -2
- package/dist/esm-es5/mds-pref-consumption.entry.js +2 -2
- package/dist/esm-es5/mds-pref-contrast.entry.js +3 -3
- package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
- package/dist/esm-es5/mds-pref-language.entry.js +2 -2
- package/dist/esm-es5/mds-pref-mode.entry.js +13 -3
- package/dist/esm-es5/mds-pref-theme-item.entry.js +12 -5
- package/dist/esm-es5/mds-pref-theme.entry.js +26 -8
- package/dist/esm-es5/mds-pref.entry.js +4 -12
- package/dist/esm-es5/mds-price-table-features-cell.entry.js +2 -2
- package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list.entry.js +2 -2
- package/dist/esm-es5/mds-price-table.entry.js +1 -1
- package/dist/esm-es5/mds-progress_2.entry.js +3 -3
- package/dist/esm-es5/mds-push-notification-item.entry.js +2 -2
- package/dist/esm-es5/mds-push-notification.entry.js +6 -6
- package/dist/esm-es5/mds-quote.entry.js +2 -2
- package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu.entry.js +4 -4
- package/dist/esm-es5/mds-separator.entry.js +1 -1
- package/dist/esm-es5/mds-status-bar.entry.js +3 -3
- package/dist/esm-es5/mds-stepper-bar-item.entry.js +2 -2
- package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
- package/dist/esm-es5/mds-tab-bar-item.entry.js +2 -2
- package/dist/esm-es5/mds-tab-bar.entry.js +2 -2
- package/dist/esm-es5/mds-tab_2.entry.js +3 -3
- package/dist/esm-es5/mds-table-body.entry.js +1 -1
- package/dist/esm-es5/mds-table-footer.entry.js +2 -2
- package/dist/esm-es5/mds-table-header-cell.entry.js +2 -2
- package/dist/esm-es5/mds-table-header.entry.js +2 -2
- package/dist/esm-es5/mds-table-row.entry.js +2 -2
- package/dist/esm-es5/mds-table.entry.js +2 -2
- package/dist/esm-es5/mds-text.entry.js +2 -2
- package/dist/esm-es5/mds-toast-region.entry.js +1 -1
- package/dist/esm-es5/mds-toast.entry.js +2 -2
- package/dist/esm-es5/mds-tooltip.entry.js +2 -2
- package/dist/esm-es5/mds-tree-item.entry.js +2 -2
- package/dist/esm-es5/mds-tree.entry.js +1 -1
- package/dist/esm-es5/mds-url-view.entry.js +2 -2
- package/dist/esm-es5/mds-usage.entry.js +3 -3
- package/dist/esm-es5/mds-video-wall.entry.js +2 -2
- package/dist/esm-es5/mds-zero.entry.js +1 -1
- package/dist/esm-es5/{preference-C5XjgGCb.js → preference-C8foBO86.js} +14 -4
- package/dist/hydrate/index.js +410 -231
- package/dist/hydrate/index.mjs +410 -231
- package/dist/lint/core/patterns.d.ts +56 -16
- package/dist/lint/core/patterns.js +145 -38
- package/dist/lint/mcp/tools.json +8 -8
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-0384db44.system.entry.js → p-00d2ef14.system.entry.js} +5 -5
- package/dist/magma-components/{p-ff65fc97.entry.js → p-02aed12a.entry.js} +1 -1
- package/dist/magma-components/{p-7c055074.entry.js → p-08f7a84b.entry.js} +1 -1
- package/dist/magma-components/{p-8239e526.system.entry.js → p-09a7c1de.system.entry.js} +1 -1
- package/dist/magma-components/{p-18244fd7.system.entry.js → p-0da5c696.system.entry.js} +3 -3
- package/dist/magma-components/{p-5575f198.entry.js → p-0df067b4.entry.js} +1 -1
- package/dist/magma-components/{p-b6412ddd.system.entry.js → p-0e1d239b.system.entry.js} +1 -1
- package/dist/magma-components/{p-ac161cb5.entry.js → p-0f4c2de6.entry.js} +1 -1
- package/dist/magma-components/{p-0c8f22dc.system.entry.js → p-11456781.system.entry.js} +2 -2
- package/dist/magma-components/{p-a2e3a545.entry.js → p-14de26d5.entry.js} +1 -1
- package/dist/magma-components/p-163eccbd.entry.js +1 -0
- package/dist/magma-components/{p-844bce77.entry.js → p-167ba07a.entry.js} +1 -1
- package/dist/magma-components/{p-f4fc9f29.system.entry.js → p-16bbff4e.system.entry.js} +1 -1
- package/dist/magma-components/{p-e059aaa9.entry.js → p-17249b74.entry.js} +1 -1
- package/dist/magma-components/{p-95ddc950.system.entry.js → p-188a55ac.system.entry.js} +3 -3
- package/dist/magma-components/{p-c9bd81c5.system.entry.js → p-1a53d9d0.system.entry.js} +7 -7
- package/dist/magma-components/{p-27254fbd.entry.js → p-1cc379d6.entry.js} +1 -1
- package/dist/magma-components/{p-ae9735e4.system.entry.js → p-1dc0d59c.system.entry.js} +2 -2
- package/dist/magma-components/{p-384d93dc.system.entry.js → p-1e24aafa.system.entry.js} +1 -1
- package/dist/magma-components/p-223efc32.entry.js +1 -0
- package/dist/magma-components/{p-1467ded5.system.entry.js → p-2454e4cd.system.entry.js} +2 -2
- package/dist/magma-components/{p-18b27217.entry.js → p-24a69c45.entry.js} +1 -1
- package/dist/magma-components/{p-fae9612b.system.entry.js → p-24fb2c5c.system.entry.js} +2 -2
- package/dist/magma-components/{p-ef1bdd44.entry.js → p-259d9380.entry.js} +1 -1
- package/dist/magma-components/{p-4fc0e294.entry.js → p-26b08e33.entry.js} +1 -1
- package/dist/magma-components/{p-c35ea44d.system.entry.js → p-27a32865.system.entry.js} +2 -2
- package/dist/magma-components/{p-299dab17.entry.js → p-2940499f.entry.js} +1 -1
- package/dist/magma-components/{p-6129954d.system.entry.js → p-2a5167e3.system.entry.js} +1 -1
- package/dist/magma-components/{p-ad13ade5.system.entry.js → p-2e825656.system.entry.js} +3 -3
- package/dist/magma-components/{p-308a4ae5.system.entry.js → p-2f4a7253.system.entry.js} +1 -1
- package/dist/magma-components/{p-29dd6d94.entry.js → p-2ffa4d4a.entry.js} +1 -1
- package/dist/magma-components/{p-d360e4c5.entry.js → p-32b3ad6f.entry.js} +1 -1
- package/dist/magma-components/{p-5686da49.system.entry.js → p-33129e0c.system.entry.js} +3 -3
- package/dist/magma-components/{p-9c2b67fc.system.entry.js → p-372fa5d4.system.entry.js} +3 -3
- package/dist/magma-components/p-380adee8.system.entry.js +5 -0
- package/dist/magma-components/{p-b0749f83.system.entry.js → p-390d0672.system.entry.js} +3 -3
- package/dist/magma-components/p-397c0686.entry.js +1 -0
- package/dist/magma-components/{p-e0049e96.system.entry.js → p-3a836de8.system.entry.js} +1 -1
- package/dist/magma-components/{p-fff26731.system.entry.js → p-3ba14295.system.entry.js} +2 -2
- package/dist/magma-components/{p-741f8f45.system.entry.js → p-3bf4f012.system.entry.js} +2 -2
- package/dist/magma-components/{p-5d56a7cd.system.entry.js → p-3c911608.system.entry.js} +3 -3
- package/dist/magma-components/{p-aac622ef.system.entry.js → p-3cf8ed46.system.entry.js} +1 -1
- package/dist/magma-components/{p-61e11cd0.system.entry.js → p-3ddae677.system.entry.js} +3 -3
- package/dist/magma-components/{p-2d2cdf0d.entry.js → p-3de37b32.entry.js} +1 -1
- package/dist/magma-components/{p-90d50492.system.entry.js → p-3f17a06f.system.entry.js} +2 -2
- package/dist/magma-components/{p-4f0153cd.entry.js → p-40c59c18.entry.js} +1 -1
- package/dist/magma-components/p-411fca2f.system.entry.js +14 -0
- package/dist/magma-components/{p-7f418ae1.entry.js → p-43c307f5.entry.js} +1 -1
- package/dist/magma-components/{p-14122f2d.entry.js → p-440d7942.entry.js} +1 -1
- package/dist/magma-components/{p-6a994dc1.entry.js → p-4541c233.entry.js} +1 -1
- package/dist/magma-components/p-45c26a24.system.entry.js +21 -0
- package/dist/magma-components/{p-948ecde4.entry.js → p-4612bc78.entry.js} +2 -2
- package/dist/magma-components/{p-be2ca282.entry.js → p-4718a71d.entry.js} +1 -1
- package/dist/magma-components/{p-8a8cad6c.system.entry.js → p-48a1871f.system.entry.js} +1 -1
- package/dist/magma-components/{p-7ee31f2e.entry.js → p-4a1f7eb5.entry.js} +1 -1
- package/dist/magma-components/{p-adab176e.system.entry.js → p-4a2ed30e.system.entry.js} +2 -2
- package/dist/magma-components/{p-efe27253.system.entry.js → p-4a9ed4f7.system.entry.js} +1 -1
- package/dist/magma-components/{p-2d199db0.system.entry.js → p-4c3b3913.system.entry.js} +2 -2
- package/dist/magma-components/p-4c955367.entry.js +1 -0
- package/dist/magma-components/p-4ebb0a9e.entry.js +1 -0
- package/dist/magma-components/{p-02b106c2.entry.js → p-4f80bf37.entry.js} +1 -1
- package/dist/magma-components/{p-a65ce11a.system.entry.js → p-527569a3.system.entry.js} +2 -2
- package/dist/magma-components/{p-0d42ac4a.entry.js → p-52cc5a93.entry.js} +1 -1
- package/dist/magma-components/{p-3139988c.system.entry.js → p-54abba52.system.entry.js} +1 -1
- package/dist/magma-components/{p-4fd0fdb8.system.entry.js → p-555ba0e0.system.entry.js} +2 -2
- package/dist/magma-components/{p-5c8f408e.entry.js → p-56cf1cab.entry.js} +1 -1
- package/dist/magma-components/{p-bba4f1f0.system.entry.js → p-5794053b.system.entry.js} +10 -10
- package/dist/magma-components/{p-57ee6e32.entry.js → p-5a754d7b.entry.js} +1 -1
- package/dist/magma-components/{p-f09f3fe1.system.entry.js → p-5c6fdabd.system.entry.js} +3 -3
- package/dist/magma-components/{p-c683cd13.entry.js → p-5ca6063a.entry.js} +1 -1
- package/dist/magma-components/{p-ac099ed6.entry.js → p-5cb581df.entry.js} +1 -1
- package/dist/magma-components/{p-445198a1.entry.js → p-5d825728.entry.js} +1 -1
- package/dist/magma-components/{p-60b21db7.entry.js → p-5dfca9f0.entry.js} +1 -1
- package/dist/magma-components/{p-f181c679.system.entry.js → p-5f20592f.system.entry.js} +1 -1
- package/dist/magma-components/p-5f38e95b.entry.js +1 -0
- package/dist/magma-components/p-5f4bec31.entry.js +1 -0
- package/dist/magma-components/p-627f5956.entry.js +1 -0
- package/dist/magma-components/{p-a9caed77.entry.js → p-6336d979.entry.js} +1 -1
- package/dist/magma-components/{p-7837856f.entry.js → p-6352c2ea.entry.js} +1 -1
- package/dist/magma-components/{p-10d52280.entry.js → p-64884d84.entry.js} +1 -1
- package/dist/magma-components/{p-98e167e8.system.entry.js → p-64f86e46.system.entry.js} +2 -2
- package/dist/magma-components/{p-9a0f8eb1.entry.js → p-65ea6fc9.entry.js} +1 -1
- package/dist/magma-components/{p-cf42d6ea.system.entry.js → p-66f7f9b1.system.entry.js} +3 -3
- package/dist/magma-components/{p-13cfc01a.entry.js → p-68b0d45a.entry.js} +1 -1
- package/dist/magma-components/{p-b61546fd.entry.js → p-6a4d44e2.entry.js} +1 -1
- package/dist/magma-components/p-6a90caf5.system.entry.js +1 -0
- package/dist/magma-components/{p-dfab370b.entry.js → p-6c4f2de0.entry.js} +1 -1
- package/dist/magma-components/{p-12be0f43.system.entry.js → p-6f90c2c9.system.entry.js} +2 -2
- package/dist/magma-components/p-70faf379.entry.js +1 -0
- package/dist/magma-components/{p-e7f717ab.entry.js → p-71d03e56.entry.js} +1 -1
- package/dist/magma-components/{p-b30b487c.system.entry.js → p-720e9291.system.entry.js} +3 -3
- package/dist/magma-components/{p-bc054ffa.system.entry.js → p-724b7fff.system.entry.js} +2 -2
- package/dist/magma-components/{p-6896786e.entry.js → p-73dc7c66.entry.js} +1 -1
- package/dist/magma-components/{p-34421ef2.system.entry.js → p-7476cf76.system.entry.js} +3 -3
- package/dist/magma-components/{p-0fc41e34.system.entry.js → p-7701a318.system.entry.js} +1 -1
- package/dist/magma-components/{p-85bf9c93.entry.js → p-77707706.entry.js} +1 -1
- package/dist/magma-components/{p-c9553777.entry.js → p-78d00f88.entry.js} +1 -1
- package/dist/magma-components/{p-4f48c171.system.entry.js → p-79085c46.system.entry.js} +1 -1
- package/dist/magma-components/{p-ccffdf0b.system.entry.js → p-793072e1.system.entry.js} +23 -11
- package/dist/magma-components/{p-b2763352.entry.js → p-79392a0a.entry.js} +1 -1
- package/dist/magma-components/{p-7ff5552f.entry.js → p-7a33ab3c.entry.js} +1 -1
- package/dist/magma-components/{p-625de2e6.system.entry.js → p-7a4e8bc0.system.entry.js} +4 -4
- package/dist/magma-components/p-7a73fd19.system.entry.js +127 -0
- package/dist/magma-components/p-7b552dbe.entry.js +1 -0
- package/dist/magma-components/{p-84aac233.entry.js → p-7c13ccb0.entry.js} +1 -1
- package/dist/magma-components/{p-d81fcbde.system.entry.js → p-7e0a8194.system.entry.js} +5 -5
- package/dist/magma-components/{p-45b19935.system.entry.js → p-7fbdf896.system.entry.js} +3 -3
- package/dist/magma-components/{p-35c170ba.system.entry.js → p-804f4794.system.entry.js} +2 -2
- package/dist/magma-components/{p-6c73689a.system.entry.js → p-840c19ee.system.entry.js} +4 -4
- package/dist/magma-components/p-848d1b42.system.entry.js +30 -0
- package/dist/magma-components/{p-81212e34.entry.js → p-86494ea9.entry.js} +1 -1
- package/dist/magma-components/p-8915347f.entry.js +1 -0
- package/dist/magma-components/{p-f493fdc3.entry.js → p-8c20ac0c.entry.js} +1 -1
- package/dist/magma-components/{p-f22b8091.entry.js → p-90c60c48.entry.js} +1 -1
- package/dist/magma-components/{p-60d6e60f.entry.js → p-90e20ad3.entry.js} +1 -1
- package/dist/magma-components/{p-797c64f4.system.entry.js → p-9228db0b.system.entry.js} +13 -3
- package/dist/magma-components/p-94548d43.entry.js +1 -0
- package/dist/magma-components/{p-9c784173.entry.js → p-95020326.entry.js} +1 -1
- package/dist/magma-components/{p-8feba226.entry.js → p-970f45df.entry.js} +1 -1
- package/dist/magma-components/{p-9303fb16.system.entry.js → p-97a501cd.system.entry.js} +2 -2
- package/dist/magma-components/{p-4e072e24.system.entry.js → p-98cc6473.system.entry.js} +30 -12
- package/dist/magma-components/p-99d2ace2.system.entry.js +5 -0
- package/dist/magma-components/{p-627c2780.entry.js → p-9aba3769.entry.js} +1 -1
- package/dist/magma-components/{p-6d009b42.system.entry.js → p-9b0b65f0.system.entry.js} +2 -2
- package/dist/magma-components/{p-f40e3918.system.entry.js → p-9b0d7f7d.system.entry.js} +2 -2
- package/dist/magma-components/{p-5d1cba9c.system.entry.js → p-9b8d15a8.system.entry.js} +1 -1
- package/dist/magma-components/{p-5931fdfc.system.entry.js → p-9e94f4a3.system.entry.js} +4 -4
- package/dist/magma-components/{p-3b578659.system.entry.js → p-9f0100f2.system.entry.js} +2 -2
- package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
- package/dist/magma-components/{p-CuHZXISO.system.js → p-BHdlb7Fr.system.js} +19 -19
- package/dist/magma-components/p-BXVzhErg.system.js +12 -0
- package/dist/magma-components/{p-OafT80hV.js → p-CATyfc78.js} +2 -2
- package/dist/magma-components/{p-CZuIEo2v.system.js → p-Cbabyppz.system.js} +1 -1
- package/dist/magma-components/{p-Dx_cCOTw.js → p-CxzVgcYv.js} +1 -1
- package/dist/magma-components/{p-CxTugGM9.system.js → p-D3J9KZKy.system.js} +1 -1
- package/dist/magma-components/{p-mGgjNqBm.system.js → p-DOisMne4.system.js} +17 -7
- package/dist/magma-components/p-DwKxtKwS.js +1 -0
- package/dist/{components/p-jasGzfhE.js → magma-components/p-Dx7iOdVP.js} +1 -1
- package/dist/magma-components/{p-iX3kcwYg.js → p-DxR4rGsw.js} +1 -1
- package/dist/magma-components/{p-ecc2893d.system.entry.js → p-a112a0e2.system.entry.js} +1 -1
- package/dist/magma-components/{p-86f11a5a.entry.js → p-a2767235.entry.js} +1 -1
- package/dist/magma-components/{p-c0286dc3.system.entry.js → p-a2c3b294.system.entry.js} +6 -6
- package/dist/magma-components/{p-4669334a.system.entry.js → p-a2d4d849.system.entry.js} +2 -2
- package/dist/magma-components/{p-cfbf3a76.system.entry.js → p-a48c73b1.system.entry.js} +2 -2
- package/dist/magma-components/{p-4e8c5b68.entry.js → p-a4f53c83.entry.js} +1 -1
- package/dist/magma-components/{p-e92327a2.entry.js → p-a58e8a5c.entry.js} +1 -1
- package/dist/magma-components/{p-1a20f239.system.entry.js → p-a5ca10ae.system.entry.js} +1 -1
- package/dist/magma-components/{p-46a928c3.entry.js → p-a9a872e1.entry.js} +1 -1
- package/dist/magma-components/{p-0a0dfdf4.system.entry.js → p-a9ab9eb0.system.entry.js} +2 -2
- package/dist/magma-components/{p-72971cf7.system.entry.js → p-ab1c3fb0.system.entry.js} +1 -1
- package/dist/magma-components/{p-074d7b75.entry.js → p-ab445c2b.entry.js} +1 -1
- package/dist/magma-components/{p-45a3e7eb.entry.js → p-abe32d5b.entry.js} +1 -1
- package/dist/magma-components/{p-2e68180d.system.entry.js → p-af56e3e4.system.entry.js} +2 -2
- package/dist/magma-components/{p-ed4fd7a4.entry.js → p-b1238d48.entry.js} +1 -1
- package/dist/magma-components/{p-4748378e.system.entry.js → p-b129b127.system.entry.js} +14 -14
- package/dist/magma-components/{p-e79eb427.system.entry.js → p-b1cd3acf.system.entry.js} +2 -2
- package/dist/magma-components/{p-5aa8f150.entry.js → p-b705b805.entry.js} +1 -1
- package/dist/magma-components/{p-2111aa67.system.entry.js → p-b7d18d7a.system.entry.js} +1 -1
- package/dist/magma-components/{p-3be9b384.system.entry.js → p-b871ad36.system.entry.js} +10 -10
- package/dist/magma-components/{p-f7426a75.entry.js → p-ba871d9c.entry.js} +1 -1
- package/dist/magma-components/{p-5a8fa2d0.entry.js → p-ba95bf93.entry.js} +1 -1
- package/dist/magma-components/{p-3af8a86a.system.entry.js → p-bc054fa3.system.entry.js} +3 -3
- package/dist/magma-components/{p-05455645.system.entry.js → p-bcc6c358.system.entry.js} +2 -2
- package/dist/magma-components/{p-7c3a7521.entry.js → p-bd489df9.entry.js} +1 -1
- package/dist/magma-components/{p-60acbc5f.system.entry.js → p-c0295a0e.system.entry.js} +2 -2
- package/dist/magma-components/p-c06d8b5a.entry.js +1 -0
- package/dist/magma-components/p-c131d726.entry.js +1 -0
- package/dist/magma-components/{p-198ea5d8.entry.js → p-c49676e6.entry.js} +1 -1
- package/dist/magma-components/{p-0dcde20a.system.entry.js → p-c4c1ef48.system.entry.js} +91 -89
- package/dist/magma-components/{p-87831da2.system.entry.js → p-c54f2089.system.entry.js} +1 -1
- package/dist/magma-components/{p-8b8cd213.system.entry.js → p-c691f27e.system.entry.js} +3 -3
- package/dist/magma-components/p-c8414ee6.entry.js +1 -0
- package/dist/magma-components/{p-77001a72.entry.js → p-c8c918d2.entry.js} +5 -5
- package/dist/magma-components/{p-85376ff5.entry.js → p-c91cb63a.entry.js} +1 -1
- package/dist/magma-components/{p-9f55fa7a.system.entry.js → p-c94e7973.system.entry.js} +2 -2
- package/dist/magma-components/{p-387fa36d.system.entry.js → p-c9baa3fb.system.entry.js} +1 -1
- package/dist/magma-components/{p-b781c932.system.entry.js → p-ca4e8601.system.entry.js} +1 -1
- package/dist/magma-components/{p-445bc62a.system.entry.js → p-ca5427d4.system.entry.js} +1 -1
- package/dist/magma-components/{p-4646cdc0.system.entry.js → p-caca78ff.system.entry.js} +2 -2
- package/dist/magma-components/{p-d85f3e5e.system.entry.js → p-caf478ff.system.entry.js} +2 -2
- package/dist/magma-components/{p-b8f4938a.entry.js → p-cb06839f.entry.js} +1 -1
- package/dist/magma-components/{p-d29c959d.entry.js → p-ce42734f.entry.js} +1 -1
- package/dist/magma-components/{p-8aa4cd10.entry.js → p-d1e4a032.entry.js} +1 -1
- package/dist/magma-components/p-d25a47fa.entry.js +1 -0
- package/dist/magma-components/{p-0d3da482.system.entry.js → p-d29b32b4.system.entry.js} +1 -1
- package/dist/magma-components/{p-1f746ad1.system.entry.js → p-d2ba5851.system.entry.js} +9 -9
- package/dist/magma-components/{p-d50d4023.entry.js → p-d365c6b6.entry.js} +1 -1
- package/dist/magma-components/{p-7a920b70.entry.js → p-d3b06151.entry.js} +1 -1
- package/dist/magma-components/{p-4cd21f19.entry.js → p-d45f65e0.entry.js} +1 -1
- package/dist/magma-components/{p-fdedc0ba.entry.js → p-d51ec950.entry.js} +1 -1
- package/dist/magma-components/{p-4606d11f.entry.js → p-d760c1fa.entry.js} +1 -1
- package/dist/magma-components/p-d785d7ee.entry.js +1 -0
- package/dist/magma-components/{p-08da465d.entry.js → p-d9092133.entry.js} +1 -1
- package/dist/magma-components/{p-03fb86a6.system.entry.js → p-dd348171.system.entry.js} +2 -2
- package/dist/magma-components/{p-dcb5f965.entry.js → p-de423b11.entry.js} +1 -1
- package/dist/magma-components/{p-97217527.system.entry.js → p-df78b7ac.system.entry.js} +1 -1
- package/dist/magma-components/{p-fba648e0.entry.js → p-e39b5e12.entry.js} +1 -1
- package/dist/magma-components/{p-99bfa07e.system.entry.js → p-eac943e5.system.entry.js} +1 -1
- package/dist/magma-components/{p-9ef0d4e5.system.entry.js → p-eb220deb.system.entry.js} +2 -2
- package/dist/magma-components/{p-fd81c4ef.system.entry.js → p-eca42fe8.system.entry.js} +2 -2
- package/dist/magma-components/{p-56a25ec6.entry.js → p-ecda3e45.entry.js} +1 -1
- package/dist/magma-components/{p-b523fabe.system.entry.js → p-f0909679.system.entry.js} +2 -2
- package/dist/magma-components/{p-8bf8e032.entry.js → p-f2649031.entry.js} +1 -1
- package/dist/magma-components/{p-30f95d10.entry.js → p-f51ed098.entry.js} +1 -1
- package/dist/magma-components/{p-11210b60.system.entry.js → p-f5bd5b64.system.entry.js} +3 -3
- package/dist/magma-components/p-f6358241.system.entry.js +19 -0
- package/dist/magma-components/{p-b0850daa.entry.js → p-f9f3ad86.entry.js} +1 -1
- package/dist/magma-components/{p-a3d09996.entry.js → p-fb4b648a.entry.js} +1 -1
- package/dist/magma-components/{p-81d2582a.entry.js → p-fd4588c5.entry.js} +1 -1
- package/dist/magma-components/{p-3b494de7.entry.js → p-fdd17ee6.entry.js} +1 -1
- package/dist/magma-components/p-fe51c0cb.system.entry.js +10 -0
- package/dist/magma-components/{p-a3156523.system.entry.js → p-ff6cf4f8.system.entry.js} +3 -3
- package/dist/magma-components/{p-4da1c089.entry.js → p-ff76c614.entry.js} +1 -1
- package/dist/{lint/mcp → mcp}/checks.js +4 -4
- package/dist/{lint/mcp → mcp}/components.js +4 -6
- package/dist/{lint/mcp → mcp}/guides.js +11 -9
- package/dist/{lint/mcp → mcp}/icons.js +21 -0
- package/dist/mcp/package.json +3 -0
- package/dist/{lint/mcp → mcp}/patterns.js +27 -18
- package/dist/{lint/mcp → mcp}/protocol.js +1 -1
- package/dist/{lint/mcp → mcp}/render-page.js +17 -0
- package/dist/{lint/mcp → mcp}/render.js +157 -48
- package/dist/{lint/mcp → mcp}/server.js +4 -4
- package/dist/{lint/mcp → mcp}/tokens.js +1 -2
- package/dist/mcp/tools.json +1374 -0
- package/dist/stats.json +2322 -2038
- package/dist/types/common/aria.d.ts +8 -1
- package/dist/types/common/preference.d.ts +13 -1
- package/dist/types/components/mds-button/mds-button.d.ts +50 -4
- package/dist/types/components/mds-button-dropdown/mds-button-dropdown.d.ts +22 -2
- package/dist/types/components/mds-modal/mds-modal.d.ts +8 -1
- package/dist/types/components/mds-pref/mds-pref.d.ts +0 -9
- package/dist/types/components/mds-pref-mode/mds-pref-mode.d.ts +16 -5
- package/dist/types/components/mds-pref-theme/mds-pref-theme.d.ts +14 -1
- package/dist/types/components/mds-pref-theme-item/mds-pref-theme-item.d.ts +9 -2
- package/dist/types/components.d.ts +71 -17
- package/dist/types/type/button.d.ts +2 -0
- package/package.json +15 -13
- package/dist/components/p-BwT0RJip.js +0 -1
- package/dist/components/p-COUgBzJ4.js +0 -1
- package/dist/components/p-Cvhn9asj.js +0 -1
- package/dist/components/p-G7Udw5H5.js +0 -1
- package/dist/components/p-Ic8cYsgt.js +0 -1
- package/dist/components/p-l0KS6hTQ.js +0 -1
- package/dist/esm-es5/aria-Cvhn9asj.js +0 -6
- package/dist/lint/mcp/checks.d.ts +0 -29
- package/dist/lint/mcp/cli.d.ts +0 -2
- package/dist/lint/mcp/color.d.ts +0 -12
- package/dist/lint/mcp/components.d.ts +0 -5
- package/dist/lint/mcp/context.d.ts +0 -45
- package/dist/lint/mcp/guides.d.ts +0 -3
- package/dist/lint/mcp/icons.d.ts +0 -9
- package/dist/lint/mcp/patterns.d.ts +0 -75
- package/dist/lint/mcp/protocol.d.ts +0 -77
- package/dist/lint/mcp/render-page.d.ts +0 -36
- package/dist/lint/mcp/render.d.ts +0 -109
- package/dist/lint/mcp/server.d.ts +0 -39
- package/dist/lint/mcp/tokens.d.ts +0 -37
- package/dist/magma-components/p-06691ab3.system.entry.js +0 -27
- package/dist/magma-components/p-1d8485de.system.entry.js +0 -28
- package/dist/magma-components/p-21345ecc.entry.js +0 -1
- package/dist/magma-components/p-25dcbf22.entry.js +0 -1
- package/dist/magma-components/p-34d58345.entry.js +0 -1
- package/dist/magma-components/p-37881115.system.entry.js +0 -14
- package/dist/magma-components/p-4e5b8618.system.entry.js +0 -1
- package/dist/magma-components/p-52e2b0d4.system.entry.js +0 -14
- package/dist/magma-components/p-69319301.system.entry.js +0 -10
- package/dist/magma-components/p-7b06b2f2.entry.js +0 -1
- package/dist/magma-components/p-7d61f442.entry.js +0 -1
- package/dist/magma-components/p-9e2b1a29.entry.js +0 -1
- package/dist/magma-components/p-9ed54db1.entry.js +0 -1
- package/dist/magma-components/p-Cvhn9asj.js +0 -1
- package/dist/magma-components/p-a8206d9c.entry.js +0 -1
- package/dist/magma-components/p-b464668b.system.entry.js +0 -105
- package/dist/magma-components/p-b85f56d7.entry.js +0 -1
- package/dist/magma-components/p-c7dc17f8.entry.js +0 -1
- package/dist/magma-components/p-d43e2a9a.entry.js +0 -1
- package/dist/magma-components/p-ddfb4da3.entry.js +0 -1
- package/dist/magma-components/p-e428490d.system.entry.js +0 -5
- package/dist/magma-components/p-f045b018.entry.js +0 -1
- package/dist/magma-components/p-f3708d1a.entry.js +0 -1
- package/dist/magma-components/p-f5d9f625.entry.js +0 -1
- package/dist/magma-components/p-fa387b74.system.entry.js +0 -5
- package/dist/magma-components/p-fbf563c8.entry.js +0 -1
- package/dist/magma-components/p-ff82edad.entry.js +0 -1
- package/dist/magma-components/p-sm_-_oFY.system.js +0 -6
- /package/dist/{lint/mcp → mcp}/cli.js +0 -0
- /package/dist/{lint/mcp → mcp}/color.js +0 -0
- /package/dist/{lint/mcp → mcp}/context.js +0 -0
- /package/dist/{lint/mcp → mcp}/icon.svg +0 -0
package/dist/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-06T15:30:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
@@ -1441,8 +1441,8 @@
|
|
|
1441
1441
|
"mds-button"
|
|
1442
1442
|
],
|
|
1443
1443
|
"mds-button": [
|
|
1444
|
-
"mds-spinner",
|
|
1445
1444
|
"mds-icon",
|
|
1445
|
+
"mds-spinner",
|
|
1446
1446
|
"mds-text"
|
|
1447
1447
|
],
|
|
1448
1448
|
"mds-avatar-stack-item": [
|
|
@@ -1654,8 +1654,8 @@
|
|
|
1654
1654
|
"mds-button"
|
|
1655
1655
|
],
|
|
1656
1656
|
"mds-button": [
|
|
1657
|
-
"mds-spinner",
|
|
1658
1657
|
"mds-icon",
|
|
1658
|
+
"mds-spinner",
|
|
1659
1659
|
"mds-text"
|
|
1660
1660
|
]
|
|
1661
1661
|
},
|
|
@@ -1970,8 +1970,8 @@
|
|
|
1970
1970
|
"mds-button"
|
|
1971
1971
|
],
|
|
1972
1972
|
"mds-button": [
|
|
1973
|
-
"mds-spinner",
|
|
1974
1973
|
"mds-icon",
|
|
1974
|
+
"mds-spinner",
|
|
1975
1975
|
"mds-text"
|
|
1976
1976
|
],
|
|
1977
1977
|
"mds-avatar-stack": [
|
|
@@ -2704,8 +2704,8 @@
|
|
|
2704
2704
|
"mds-button"
|
|
2705
2705
|
],
|
|
2706
2706
|
"mds-button": [
|
|
2707
|
-
"mds-spinner",
|
|
2708
2707
|
"mds-icon",
|
|
2708
|
+
"mds-spinner",
|
|
2709
2709
|
"mds-text"
|
|
2710
2710
|
],
|
|
2711
2711
|
"mds-policy-ai": [
|
|
@@ -4120,8 +4120,8 @@
|
|
|
4120
4120
|
"mds-button"
|
|
4121
4121
|
],
|
|
4122
4122
|
"mds-button": [
|
|
4123
|
-
"mds-spinner",
|
|
4124
4123
|
"mds-icon",
|
|
4124
|
+
"mds-spinner",
|
|
4125
4125
|
"mds-text"
|
|
4126
4126
|
]
|
|
4127
4127
|
},
|
|
@@ -4288,8 +4288,8 @@
|
|
|
4288
4288
|
"mds-button"
|
|
4289
4289
|
],
|
|
4290
4290
|
"mds-button": [
|
|
4291
|
-
"mds-spinner",
|
|
4292
4291
|
"mds-icon",
|
|
4292
|
+
"mds-spinner",
|
|
4293
4293
|
"mds-text"
|
|
4294
4294
|
]
|
|
4295
4295
|
},
|
|
@@ -4324,9 +4324,9 @@
|
|
|
4324
4324
|
}
|
|
4325
4325
|
],
|
|
4326
4326
|
"usage": {
|
|
4327
|
-
"1. Description": "The `<mds-button>` web component is the primary interactive action control of the Magma Design System. It renders as a button, or as a link when `href` is set, handling form association, accessibility, loading state, and iconography natively.\n\n#### Semantic Behavior\n\n- **Button vs. link**: Providing `href` renders a real anchor inside the component and gives the host `role=\"link\"`. The browser follows the link, so a modifier or middle click opens it in a new tab and the context menu offers the link actions; `target=\"blank\"` opens a new tab on a plain click too. A `click` listener on the host cancels the navigation with `preventDefault()`, which is how a client-side router takes over. A click from the keyboard, a script or an assistive technology lands on the host and is followed the same way, unless cancelled.\n- **Form association**: Inside a `<form>` the component submits (`type=\"submit\"`, default) or resets (`type=\"reset\"`) it like a native button, with no extra wiring; use `type=\"button\"` to opt out. With `name` set, a submit sends `name=value`, so buttons that submit the same form tell the receiver which one was chosen. A custom element cannot be a submitter, so `event.submitter` is a hidden native button that stands in for the component: it carries the same `name` and `value`, but it is not the `mds-button` element.\n- **Active state**: Mirrors a visual pressed state through the `active` attribute, safe to drive from CSS attribute selectors.\n- **Disabled state**: Blocks pointer and keyboard activation and removes the host from the tab sequence. A disabled `<fieldset>` around the button disables it the same way, as it does a native button, without setting `disabled`.\n- **Await state**: Renders an inline spinner, blocks pointer and keyboard activation, and sets `aria-busy=\"true\"` for assistive tech. The button keeps the focus it had, and a click from a script or an assistive technology neither submits nor resets its form again. Remove the attribute when done - do not set `await=\"false\"`.\n- **Keyboard**: Enter activates the button as a click does, and so does Space, on release, as on a native button; a button with `href` is a link, which Enter follows and Space does not.\n- **Accessibility**: Sets `role=\"button\"` on the host, `role=\"link\"` when `href` is set, whatever the format of the icon; the `label` prop (or slotted text) is rendered as the button text, which names it. Without a label, an `aria-label` or a `title`, the component sets `title` from the last segment of the icon slug (`mi/baseline/delete` -> \"delete\"), which names the icon, not the action; an icon given as inline SVG or base64 has no slug, and leaves the button with no name at all: icon-only buttons need an explicit `aria-label` (or `title`), or an `mds-tooltip` with `relation=\"label\"`. A host with `aria-labelledby` gets no name from the slug, and loses the one it had when the attribute comes later, as it does from the tooltip.\n- **Sizing**: The `size` prop drives padding, font size, and minimum hit area. Do not override dimensions with inline `width` / `height`.\n- **Linking constraint**: `target` is effective only when `href` is set.\n\n#### Component-specific variants and tones\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). `<mds-button>` adds:\n\n- **`variant=\"google\"` / `variant=\"apple\"`**: brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n- **`tone=\"box\"`**: the `strong` fill with an embossed, raised shadow (`--shadow-box-solid-strong`) and a brighter hover: more marked than `strong`, not less.\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library; **`iconPosition`** places the glyph relative to the label (use `right` for forward-motion CTAs).\n- **`truncate`**: `word` (default) keeps the label on one line and cuts it with an ellipsis, `all` clamps it with `line-clamp` (one line in the button), `none` lets it wrap onto more lines.\n- **`animation`**: `yugop` progressively reveals characters; otherwise text renders immediately.\n- **The first letter** of the label is uppercased. For a name or an identifier that must stay as written (`rdsysadmin`), set `--mds-button-label-transform: none` on the button or on any ancestor: the property inherits, so it also reaches the buttons that other components, `mds-button-dropdown` among them, render in their shadow root.\n",
|
|
4328
|
-
"2. Examples": "Correct and idiomatic ways to use the `<mds-button>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Text Button via `label` Prop\n\nThe canonical form. Use the `label` prop for the button's text; it is rendered inside the button and is its accessible name, so screen readers work without extra wiring.\n\n```html\n<mds-button label=\"Conferma azione\" variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Variant and Tone for Emphasis\n\nPair the same `variant` with a different `tone` to express importance. Do not invent custom colors to dim or saturate.\n\n```html\n<!-- High emphasis: primary call to action -->\n<mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n\n<!-- Medium emphasis: supporting action -->\n<mds-button label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n\n<!-- Low emphasis: in-text or destructive secondary action -->\n<mds-button label=\"Annulla\" variant=\"error\" tone=\"text\"></mds-button>\n```\n\n#### Sizing\n\nUse the `size` prop. Do not override dimensions with inline `width` / `height`.\n\n```html\n<mds-button label=\"Small\" size=\"sm\" variant=\"primary\"></mds-button>\n<mds-button label=\"Medium\" size=\"md\" variant=\"primary\"></mds-button>\n<mds-button label=\"Large\" size=\"lg\" variant=\"primary\"></mds-button>\n<mds-button label=\"Extra large\" size=\"xl\" variant=\"primary\"></mds-button>\n```\n\n#### Button with Icon\n\nReference icons by their filename slug (no `.svg` extension). `icon-position` defaults to `left`; set it to `right` for forward-motion CTAs.\n\n```html\n<!-- Left icon (default) -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<!-- Right icon -->\n<mds-button\n label=\"Avanti\"\n icon=\"mi/baseline/arrow-forward\"\n icon-position=\"right\"\n variant=\"primary\"\n></mds-button>\n```\n\n#### Icon-Only Button\n\nOmit `label` and provide `aria-label` (or `title`) explicitly. Without one, the component names the button after the last segment of the icon slug (\"delete\"), which names the icon, not the action.\n\n```html\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\nWhen an `mds-tooltip` shows the name of the button, let the tooltip be the name with `relation=\"label\"` instead: the button then needs no `aria-label`, and gets no `title` from the icon slug.\n\n```html\n<mds-button id=\"elimina-btn\" icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#elimina-btn\" relation=\"label\">Elimina elemento</mds-tooltip>\n```\n\n#### Hyperlink via `href`\n\nSetting `href` renders a real link: the browser follows it, in a new tab on a modifier or middle click, and the context menu offers the link actions. Use `target=\"blank\"` to open in a new tab on a plain click too; default is `self`.\n\n```html\n<mds-button\n label=\"Visita il sito\"\n href=\"https://example.com\"\n target=\"blank\"\n variant=\"primary\"\n tone=\"outline\"\n></mds-button>\n```\n\n#### Client-Side Routing via `href`\n\nIn a single-page app keep `href` for the link it gives (new tab, context menu, crawlers) and register the router once with `NavigationService`, from `@maggioli-design-system/magma/services`: every component link is then routed on the client on a plain click, with no listener per button. A modifier or middle click, `target=\"blank\"` and a link to another origin stay with the browser; return `false` from the handler for a link the browser is to load.\n\n```html\n<mds-button label=\"Pratiche\" href=\"/pratiche\" variant=\"primary\" tone=\"text\"></mds-button>\n\n<script type=\"module\">\n import { NavigationService } from '@maggioli-design-system/magma/services';\n\n NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the button and route by hand: the component honours `preventDefault()`. Leave a modifier click alone, so that the browser opens the link in a new tab.\n\n```html\n<script>\n document.querySelector('mds-button[href]').addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(event.currentTarget.href);\n });\n</script>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. The component renders an inline spinner, blocks pointer activation, and sets `aria-busy=\"true\"`. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\"></mds-button>\n```\n\n#### Form Participation\n\n`<mds-button>` is form-associated. Inside a `<form>` it natively triggers submit (`type=\"submit\"`, default) or reset (`type=\"reset\"`). Use `type=\"button\"` for any action that must not submit the form.\n\n```html\n<form action=\"/save\" method=\"post\">\n <mds-input-field label=\"Titolo\">\n <mds-input name=\"title\"></mds-input>\n </mds-input-field>\n\n <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n <mds-button type=\"reset\" label=\"Reimposta\" variant=\"dark\" tone=\"outline\"></mds-button>\n <mds-button type=\"button\" label=\"Anteprima\" variant=\"primary\" tone=\"text\"></mds-button>\n</form>\n```\n\n#### Several Actions That Submit One Form\n\nGive the buttons the same `name` and a different `value`, as with native submit buttons: the receiver reads which action was chosen from `name`.\n\n```html\n<form action=\"/mail\" method=\"post\">\n <mds-input-field label=\"Oggetto\">\n <mds-input name=\"subject\"></mds-input>\n </mds-input-field>\n\n <!-- the receiver gets action=send or action=draft -->\n <mds-button name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\"></mds-button>\n <mds-button name=\"action\" value=\"draft\" label=\"Salva come bozza\" tone=\"outline\"></mds-button>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for a native button: it carries the `name` / `value` of the button that was clicked.\n\n```js\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n data.get('action'); // 'send' or 'draft'\n});\n```\n\nTo show one action and keep the others in a menu, use [`mds-button-dropdown`](../mds-button-dropdown/AGENTS.md) with `type=\"submit\"`: its primary action and its menu items send `name` / `value` the same way.\n\n#### Notification Badge via Named Slot\n\nThe `notification` slot accepts an `<mds-notification>`. This is the documented exception to the default-slot-is-text rule.\n\n```html\n<mds-button label=\"Notifiche\" icon=\"mi/baseline/notifications\" variant=\"primary\" tone=\"weak\">\n <mds-notification slot=\"notification\" value=\"12\"></mds-notification>\n</mds-button>\n```\n\n#### SSO Identity Variants\n\n`variant=\"google\"` and `variant=\"apple\"` apply the brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n\n```html\n<mds-button label=\"Accedi con Google\" variant=\"google\"></mds-button>\n<mds-button label=\"Accedi con Apple\" variant=\"apple\"></mds-button>\n```\n\n#### Styling Customization\n\nStyle the button only through its documented `--mds-button-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working.\n\n```css\n.featured-action mds-button {\n --mds-button-background: rgb(var(--magma-accent-emphasis));\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n --mds-button-gap: calc(var(--spacing) * 300);\n}\n\n/* labels that are names or identifiers, shown as written: it inherits, so it reaches the\n buttons inside other components too */\n.tenant-switcher {\n --mds-button-label-transform: none;\n}\n```\n",
|
|
4329
|
-
"3. Mistakes": "Common incorrect uses of `<mds-button>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are stripped or break layout. Use the `label` prop for text and the dedicated props/slots for everything else.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <span class=\"bold\">Scarica</span>\n <small>(PDF)</small>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Scarica (PDF)\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n```\n\n#### Do Not Nest `<mds-button>` Inside an Anchor\n\nWrapping the button in `<a>` creates nested interactive controls, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on the component instead - it renders the link itself.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/login\">\n <mds-button label=\"Accedi\"></mds-button>\n</a>\n\n<!-- CORRECT -->\n<mds-button label=\"Accedi\" href=\"/login\"></mds-button>\n```\n\n#### Do Not Use `mds-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word or a phrase that links belongs to `<mds-link>`, which takes the font of the text around it.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Follow the `href` Yourself in a Click Listener\n\nWith `href` set the component already renders a link the browser follows. Assigning `window.location` in a click listener loads the page a second time and takes a modifier click, which the browser would open in a new tab, into the current one. Either let the browser follow the link, or cancel the click and route on the client.\n\n```js\n// INCORRECT\nbutton.addEventListener('click', () => {\n window.location.href = button.href;\n});\n\n// CORRECT: a client-side router cancels the click and routes\nbutton.addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(button.href);\n});\n```\n\n#### Icon-Only Buttons Without an Accessible Name\n\nWhen `label` is empty, the component derives a `title` from the last segment of the icon slug (\"delete\"), which names the icon, not the action. Always supply an explicit `aria-label` (or `title`) for icon-only buttons, or an `mds-tooltip` with `relation=\"label\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Build the Form Data Without the Submitter\n\n`new FormData(form)` leaves out the `name` / `value` of the button that submitted the form, as it does for a native submit button. Pass `event.submitter` to read which action was chosen; do not track the clicked button in a variable or a hidden input.\n\n```js\n// INCORRECT: action is missing\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form);\n});\n\n// CORRECT\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n});\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe component's `icon` prop renders the SVG through the shared icon-set service and positions it correctly via `icon-position`. Slotting `<mds-icon>` puts it in the text-only default slot, where it is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <mds-icon name=\"mi/baseline/add\"></mds-icon>\n Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` were renamed in Magma 2.0 to `outline` and `text`. The old values are no longer accepted by the typed `ToneBoxVariantType` and silently fall back to the default tone.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-button label=\"Modifica\" tone=\"ghost\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"quiet\" variant=\"error\"></mds-button>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-button label=\"Modifica\" tone=\"outline\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"text\" variant=\"error\"></mds-button>\n```\n\n#### Customize via Documented Vars and Parts, Not Internal Selectors\n\nThe supported customization surface is `--mds-button-*` CSS custom properties plus the two documented shadow parts (`icon`, `label`). Targeting other internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-button >>> .text {\n font-weight: bold;\n}\nmds-button::part(spinner) {\n color: red;\n}\n\n/* CORRECT */\nmds-button {\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n}\nmds-button::part(icon) {\n fill: rgb(var(--magma-warning-fg));\n}\n```\n"
|
|
4327
|
+
"1. Description": "The `<mds-button>` web component is the primary interactive action control of the Magma Design System. It renders as a button, or as a link when `href` is set, handling form association, accessibility, loading state, and iconography natively.\n\n#### Semantic Behavior\n\n- **Button vs. link**: Providing `href` renders a real anchor inside the component and gives the host `role=\"link\"`. The browser follows the link, so a modifier or middle click opens it in a new tab and the context menu offers the link actions; `target=\"blank\"` opens a new tab on a plain click too. A `click` listener on the host cancels the navigation with `preventDefault()`, which is how a client-side router takes over. A click from the keyboard, a script or an assistive technology lands on the host and is followed the same way, unless cancelled.\n- **Form association**: Inside a `<form>` the component submits (`type=\"submit\"`, default) or resets (`type=\"reset\"`) it like a native button, with no extra wiring; use `type=\"button\"` to opt out. With `name` set, a submit sends `name=value`, so buttons that submit the same form tell the receiver which one was chosen. A custom element cannot be a submitter, so `event.submitter` is a hidden native button that stands in for the component: it carries the same `name` and `value`, but it is not the `mds-button` element.\n- **Active state**: Mirrors a visual pressed state through the `active` attribute, safe to drive from CSS attribute selectors. It is cleared when the pointer is released: it does not mark the view you are in, `current` does.\n- **Current state**: `current` marks the button that leads to the view you are in, the current section of a bar or the current view of a switcher. `current` (or `current=\"page\"`) is that view: the button takes no pointer, Enter does nothing, and a click from a script neither navigates nor submits, so going there again never reloads it; it stays in the Tab order, announced with `aria-current=\"page\"` on a link and `aria-current=\"true\"` otherwise. `current=\"section\"` is a view inside it, a record of its list: the same look, but the button stays a link that brings you back, announced with `aria-current=\"true\"`. An `aria-current` written on the host (`step`, `date`) stays as written. The look: an area that weighs less than the hover of the tone, never its ring, so the hover of the other buttons still weighs more. `weak` takes the selected wash of its family (`--magma-accent-surface-selected`, `-wash-soft` for a status variant), `strong` keeps its fill, `outline` and `text` take the wash of their hover, and a variant whose hover keeps the area (`dark` and `light` weak, `light` strong) keeps it too. The label is one weight heavier (`xl` is black already), which marks the state where the area stays under 3:1; the look holds on hover. Never mark the current button with `disabled`, `aria-disabled` or a style of your own.\n- **Disabled state**: Blocks pointer and keyboard activation and removes the host from the tab sequence. A disabled `<fieldset>` around the button disables it the same way, as it does a native button, without setting `disabled`.\n- **Await state**: Renders an inline spinner, blocks pointer and keyboard activation, and sets `aria-busy=\"true\"` for assistive tech. The button keeps the focus it had, and a click from a script or an assistive technology neither submits nor resets its form again. Remove the attribute when done - do not set `await=\"false\"`.\n- **Keyboard**: Enter activates the button as a click does, and so does Space, on release, as on a native button; a button with `href` is a link, which Enter follows and Space does not.\n- **Accessibility**: Sets `role=\"button\"` on the host, `role=\"link\"` when `href` is set, whatever the format of the icon; the `label` prop (or slotted text) is rendered as the button text, which names it. Without a label, an `aria-label` or a `title`, the component sets `title` from the last segment of the icon slug (`mi/baseline/delete` -> \"delete\"), which names the icon, not the action; an icon given as inline SVG or base64 has no slug, and leaves the button with no name at all: icon-only buttons need an explicit `aria-label` (or `title`), or an `mds-tooltip` with `relation=\"label\"`. A host with `aria-labelledby` gets no name from the slug, and loses the one it had when the attribute comes later, as it does from the tooltip.\n- **Sizing**: The `size` prop drives padding, font size, and minimum hit area. Do not override dimensions with inline `width` / `height`.\n- **Linking constraint**: `target` is effective only when `href` is set.\n\n#### Component-specific variants and tones\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). `<mds-button>` adds:\n\n- **`variant=\"google\"` / `variant=\"apple\"`**: brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n- **`tone=\"box\"`**: the `strong` fill with an embossed, raised shadow (`--shadow-box-solid-strong`) and a brighter hover: more marked than `strong`, not less.\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library; **`iconPosition`** places the glyph relative to the label (use `right` for forward-motion CTAs).\n- **`iconCurrent`** and **`iconHover`** take the place of `icon` in their state: `iconCurrent` on the current button, `iconHover` under the pointer, which falls back on `iconCurrent`. One attribute gives the common pair, an outline icon at rest and the filled one on the current button, which the pointer previews on the others. Set `iconHover` to the `icon` to keep the icon still under the pointer, when `iconCurrent` says something the click does not do (a check). A pointer that cannot hover, a finger, never shows `iconHover`; the current button shows `iconCurrent` under the pointer too. Both need `icon`, which gives the icon its room, and the name taken from the slug stays the one of `icon`. Write every slug out whole, as for `icon`: the icons a product serves are the ones read in its sources.\n- **`truncate`**: `word` (default) keeps the label on one line and cuts it with an ellipsis, `all` clamps it with `line-clamp` (one line in the button), `none` lets it wrap onto more lines.\n- **`animation`**: `yugop` progressively reveals characters; otherwise text renders immediately.\n- **The first letter** of the label is uppercased. For a name or an identifier that must stay as written (`rdsysadmin`), set `--mds-button-label-transform: none` on the button or on any ancestor: the property inherits, so it also reaches the buttons that other components, `mds-button-dropdown` among them, render in their shadow root.\n",
|
|
4328
|
+
"2. Examples": "Correct and idiomatic ways to use the `<mds-button>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Text Button via `label` Prop\n\nThe canonical form. Use the `label` prop for the button's text; it is rendered inside the button and is its accessible name, so screen readers work without extra wiring.\n\n```html\n<mds-button label=\"Conferma azione\" variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Variant and Tone for Emphasis\n\nPair the same `variant` with a different `tone` to express importance. Do not invent custom colors to dim or saturate.\n\n```html\n<!-- High emphasis: primary call to action -->\n<mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n\n<!-- Medium emphasis: supporting action -->\n<mds-button label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n\n<!-- Low emphasis: in-text or destructive secondary action -->\n<mds-button label=\"Annulla\" variant=\"error\" tone=\"text\"></mds-button>\n```\n\n#### Sizing\n\nUse the `size` prop. Do not override dimensions with inline `width` / `height`.\n\n```html\n<mds-button label=\"Small\" size=\"sm\" variant=\"primary\"></mds-button>\n<mds-button label=\"Medium\" size=\"md\" variant=\"primary\"></mds-button>\n<mds-button label=\"Large\" size=\"lg\" variant=\"primary\"></mds-button>\n<mds-button label=\"Extra large\" size=\"xl\" variant=\"primary\"></mds-button>\n```\n\n#### Button with Icon\n\nReference icons by their filename slug (no `.svg` extension). `icon-position` defaults to `left`; set it to `right` for forward-motion CTAs.\n\n```html\n<!-- Left icon (default) -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<!-- Right icon -->\n<mds-button\n label=\"Avanti\"\n icon=\"mi/baseline/arrow-forward\"\n icon-position=\"right\"\n variant=\"primary\"\n></mds-button>\n```\n\n#### Icon-Only Button\n\nOmit `label` and provide `aria-label` (or `title`) explicitly. Without one, the component names the button after the last segment of the icon slug (\"delete\"), which names the icon, not the action.\n\n```html\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\nWhen an `mds-tooltip` shows the name of the button, let the tooltip be the name with `relation=\"label\"` instead: the button then needs no `aria-label`, and gets no `title` from the icon slug.\n\n```html\n<mds-button id=\"elimina-btn\" icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#elimina-btn\" relation=\"label\">Elimina elemento</mds-tooltip>\n```\n\n#### Hyperlink via `href`\n\nSetting `href` renders a real link: the browser follows it, in a new tab on a modifier or middle click, and the context menu offers the link actions. Use `target=\"blank\"` to open in a new tab on a plain click too; default is `self`.\n\n```html\n<mds-button\n label=\"Visita il sito\"\n href=\"https://example.com\"\n target=\"blank\"\n variant=\"primary\"\n tone=\"outline\"\n></mds-button>\n```\n\n#### Client-Side Routing via `href`\n\nIn a single-page app keep `href` for the link it gives (new tab, context menu, crawlers) and register the router once with `NavigationService`, from `@maggioli-design-system/magma/services`: every component link is then routed on the client on a plain click, with no listener per button. A modifier or middle click, `target=\"blank\"` and a link to another origin stay with the browser; return `false` from the handler for a link the browser is to load.\n\n```html\n<mds-button label=\"Pratiche\" href=\"/pratiche\" variant=\"primary\" tone=\"text\"></mds-button>\n\n<script type=\"module\">\n import { NavigationService } from '@maggioli-design-system/magma/services';\n\n NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the button and route by hand: the component honours `preventDefault()`. Leave a modifier click alone, so that the browser opens the link in a new tab.\n\n```html\n<script>\n document.querySelector('mds-button[href]').addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(event.currentTarget.href);\n });\n</script>\n```\n\n#### The Current Section via `current`\n\nMark the button that leads to the view you are in with `current`: the section of the bar of the page on screen, the view of a switcher. It does nothing when clicked, so it never reloads the page, and it is announced as the current page. On a page inside a section, a record of its list, write `current=\"section\"`: the same look, and the button stays a link back to the list.\n\n```html\n<!-- the list of the records: Pratiche is the page on screen -->\n<mds-header-bar>\n <mds-text typography=\"h6\" tag=\"p\">Servizi demografici</mds-text>\n <mds-button slot=\"nav\" href=\"/pratiche\" variant=\"dark\" tone=\"text\" current>Pratiche</mds-button>\n <mds-button slot=\"nav\" href=\"/contatti\" variant=\"dark\" tone=\"text\">Contatti</mds-button>\n</mds-header-bar>\n\n<!-- one record of the list: Pratiche brings you back to it -->\n<mds-button slot=\"nav\" href=\"/pratiche\" variant=\"dark\" tone=\"text\" current=\"section\">Pratiche</mds-button>\n\n<!-- the view of a switcher, with no page of its own: aria-current=\"true\" -->\n<mds-button label=\"Lista\" tone=\"weak\" type=\"button\" current></mds-button>\n<mds-button label=\"Mappa\" tone=\"weak\" type=\"button\"></mds-button>\n```\n\n#### The Icon of Each State via `icon-current` and `icon-hover`\n\n`icon-current` takes the place of `icon` on the current button, and under the pointer too, which previews it on the other buttons: one attribute gives an outline icon at rest and the filled one on the view you are in. `icon-hover` sets the icon under the pointer on its own; set it to the `icon` to keep the icon still, when the icon of the current button says something the click does not do. Write the slugs out whole.\n\n```html\n<!-- outline at rest, filled on the current section and under the pointer -->\n<mds-button\n slot=\"nav\"\n href=\"/pratiche\"\n variant=\"dark\"\n tone=\"text\"\n icon=\"mi/outline/folder\"\n icon-current=\"mi/baseline/folder\"\n current\n>Pratiche</mds-button>\n<mds-button\n slot=\"nav\"\n href=\"/contatti\"\n variant=\"dark\"\n tone=\"text\"\n icon=\"mi/outline/contacts\"\n icon-current=\"mi/baseline/contacts\"\n>Contatti</mds-button>\n\n<!-- a check on the current view, and none under the pointer: it would say the view is chosen -->\n<mds-button\n label=\"Elenco\"\n tone=\"weak\"\n type=\"button\"\n icon=\"mi/baseline/view-list\"\n icon-current=\"mi/baseline/check\"\n icon-hover=\"mi/baseline/view-list\"\n current\n></mds-button>\n<mds-button\n label=\"Griglia\"\n tone=\"weak\"\n type=\"button\"\n icon=\"mi/baseline/grid-view\"\n icon-current=\"mi/baseline/check\"\n icon-hover=\"mi/baseline/grid-view\"\n></mds-button>\n\n<!-- another icon under the pointer only -->\n<mds-button\n icon=\"mi/baseline/close\"\n icon-hover=\"mi/outline/close\"\n aria-label=\"Chiudi\"\n variant=\"dark\"\n tone=\"text\"\n></mds-button>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. The component renders an inline spinner, blocks pointer activation, and sets `aria-busy=\"true\"`. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\"></mds-button>\n```\n\n#### Form Participation\n\n`<mds-button>` is form-associated. Inside a `<form>` it natively triggers submit (`type=\"submit\"`, default) or reset (`type=\"reset\"`). Use `type=\"button\"` for any action that must not submit the form.\n\n```html\n<form action=\"/save\" method=\"post\">\n <mds-input-field label=\"Titolo\">\n <mds-input name=\"title\"></mds-input>\n </mds-input-field>\n\n <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n <mds-button type=\"reset\" label=\"Reimposta\" variant=\"dark\" tone=\"outline\"></mds-button>\n <mds-button type=\"button\" label=\"Anteprima\" variant=\"primary\" tone=\"text\"></mds-button>\n</form>\n```\n\n#### Several Actions That Submit One Form\n\nGive the buttons the same `name` and a different `value`, as with native submit buttons: the receiver reads which action was chosen from `name`.\n\n```html\n<form action=\"/mail\" method=\"post\">\n <mds-input-field label=\"Oggetto\">\n <mds-input name=\"subject\"></mds-input>\n </mds-input-field>\n\n <!-- the receiver gets action=send or action=draft -->\n <mds-button name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\"></mds-button>\n <mds-button name=\"action\" value=\"draft\" label=\"Salva come bozza\" tone=\"outline\"></mds-button>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for a native button: it carries the `name` / `value` of the button that was clicked.\n\n```js\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n data.get('action'); // 'send' or 'draft'\n});\n```\n\nTo show one action and keep the others in a menu, use [`mds-button-dropdown`](../mds-button-dropdown/AGENTS.md) with `type=\"submit\"`: its primary action and its menu items send `name` / `value` the same way.\n\n#### Notification Badge via Named Slot\n\nThe `notification` slot accepts an `<mds-notification>`. This is the documented exception to the default-slot-is-text rule.\n\n```html\n<mds-button label=\"Notifiche\" icon=\"mi/baseline/notifications\" variant=\"primary\" tone=\"weak\">\n <mds-notification slot=\"notification\" value=\"12\"></mds-notification>\n</mds-button>\n```\n\n#### SSO Identity Variants\n\n`variant=\"google\"` and `variant=\"apple\"` apply the brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n\n```html\n<mds-button label=\"Accedi con Google\" variant=\"google\"></mds-button>\n<mds-button label=\"Accedi con Apple\" variant=\"apple\"></mds-button>\n```\n\n#### Styling Customization\n\nStyle the button only through its documented `--mds-button-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working.\n\n```css\n.featured-action mds-button {\n --mds-button-background: rgb(var(--magma-accent-emphasis));\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n --mds-button-gap: calc(var(--spacing) * 300);\n}\n\n/* labels that are names or identifiers, shown as written: it inherits, so it reaches the\n buttons inside other components too */\n.tenant-switcher {\n --mds-button-label-transform: none;\n}\n```\n",
|
|
4329
|
+
"3. Mistakes": "Common incorrect uses of `<mds-button>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are stripped or break layout. Use the `label` prop for text and the dedicated props/slots for everything else.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <span class=\"bold\">Scarica</span>\n <small>(PDF)</small>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Scarica (PDF)\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n```\n\n#### Do Not Nest `<mds-button>` Inside an Anchor\n\nWrapping the button in `<a>` creates nested interactive controls, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on the component instead - it renders the link itself.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/login\">\n <mds-button label=\"Accedi\"></mds-button>\n</a>\n\n<!-- CORRECT -->\n<mds-button label=\"Accedi\" href=\"/login\"></mds-button>\n```\n\n#### Do Not Use `mds-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word or a phrase that links belongs to `<mds-link>`, which takes the font of the text around it.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Follow the `href` Yourself in a Click Listener\n\nWith `href` set the component already renders a link the browser follows. Assigning `window.location` in a click listener loads the page a second time and takes a modifier click, which the browser would open in a new tab, into the current one. Either let the browser follow the link, or cancel the click and route on the client.\n\n```js\n// INCORRECT\nbutton.addEventListener('click', () => {\n window.location.href = button.href;\n});\n\n// CORRECT: a client-side router cancels the click and routes\nbutton.addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(button.href);\n});\n```\n\n#### Icon-Only Buttons Without an Accessible Name\n\nWhen `label` is empty, the component derives a `title` from the last segment of the icon slug (\"delete\"), which names the icon, not the action. Always supply an explicit `aria-label` (or `title`) for icon-only buttons, or an `mds-tooltip` with `relation=\"label\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Build the Form Data Without the Submitter\n\n`new FormData(form)` leaves out the `name` / `value` of the button that submitted the form, as it does for a native submit button. Pass `event.submitter` to read which action was chosen; do not track the clicked button in a variable or a hidden input.\n\n```js\n// INCORRECT: action is missing\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form);\n});\n\n// CORRECT\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n});\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe component's `icon` prop renders the SVG through the shared icon-set service and positions it correctly via `icon-position`. Slotting `<mds-icon>` puts it in the text-only default slot, where it is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <mds-icon name=\"mi/baseline/add\"></mds-icon>\n Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Mark the Current Button by Hand, Nor Disable It\n\nThe button of the view you are in takes `current`. A tone switched by hand with `aria-current` gives every product its own look (and `tone=\"weak\"` alone stays under the 3:1 of a state), `active` is the pressed look and is cleared when the pointer is released, and `disabled` takes the button out of the Tab order and announces it as unavailable, so the keyboard never learns where it is.\n\n```html\n<!-- INCORRECT -->\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"weak\" aria-current=\"page\">Pratiche</mds-button>\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" active>Pratiche</mds-button>\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" disabled>Pratiche</mds-button>\n\n<!-- CORRECT -->\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" current>Pratiche</mds-button>\n```\n\n#### Do Not Swap the Icon by Hand\n\nA listener that changes `icon` under the pointer fetches the new icon the first time it comes, so the button shows no icon until it arrives, and leaves it on what a finger tapped. A slug built at runtime is never served: the icons a product serves are the ones written in its sources. Use `icon-current` and `icon-hover`, with the slugs written out whole.\n\n```js\n// INCORRECT\nbutton.addEventListener('mouseenter', () => (button.icon = 'mi/baseline/folder'));\nbutton.addEventListener('mouseleave', () => (button.icon = 'mi/outline/folder'));\nbutton.icon = `mi/${here ? 'baseline' : 'outline'}/folder`;\n```\n\n```html\n<!-- CORRECT -->\n<mds-button\n href=\"/pratiche\"\n icon=\"mi/outline/folder\"\n icon-current=\"mi/baseline/folder\"\n current\n>Pratiche</mds-button>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` were renamed in Magma 2.0 to `outline` and `text`. The old values are no longer accepted by the typed `ToneBoxVariantType` and silently fall back to the default tone.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-button label=\"Modifica\" tone=\"ghost\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"quiet\" variant=\"error\"></mds-button>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-button label=\"Modifica\" tone=\"outline\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"text\" variant=\"error\"></mds-button>\n```\n\n#### Customize via Documented Vars and Parts, Not Internal Selectors\n\nThe supported customization surface is `--mds-button-*` CSS custom properties plus the two documented shadow parts (`icon`, `label`). Targeting other internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-button >>> .text {\n font-weight: bold;\n}\nmds-button::part(spinner) {\n color: red;\n}\n\n/* CORRECT */\nmds-button {\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n}\nmds-button::part(icon) {\n fill: rgb(var(--magma-warning-fg));\n}\n```\n"
|
|
4330
4330
|
},
|
|
4331
4331
|
"props": [
|
|
4332
4332
|
{
|
|
@@ -4445,6 +4445,47 @@
|
|
|
4445
4445
|
"getter": false,
|
|
4446
4446
|
"setter": false
|
|
4447
4447
|
},
|
|
4448
|
+
{
|
|
4449
|
+
"name": "current",
|
|
4450
|
+
"type": "\"page\" | \"section\" | boolean | undefined",
|
|
4451
|
+
"complexType": {
|
|
4452
|
+
"original": "ButtonCurrentType",
|
|
4453
|
+
"resolved": "\"page\" | \"section\" | boolean | undefined",
|
|
4454
|
+
"references": {
|
|
4455
|
+
"ButtonCurrentType": {
|
|
4456
|
+
"location": "import",
|
|
4457
|
+
"path": "@type/button",
|
|
4458
|
+
"id": "src/type/button.ts::ButtonCurrentType",
|
|
4459
|
+
"referenceLocation": "ButtonCurrentType"
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4462
|
+
},
|
|
4463
|
+
"mutable": false,
|
|
4464
|
+
"attr": "current",
|
|
4465
|
+
"reflectToAttr": true,
|
|
4466
|
+
"docs": "Marks the button that leads to the view you are in, as the current section of a bar or the\ncurrent view of a switcher, with a look of its own: an area that weighs less than the hover of\nits tone, never its ring, and a heavier label. `current`, or\n`current=\"page\"`, is that view: the button neither navigates nor submits, a click and Enter do\nnothing, but it stays in the Tab order, announced with `aria-current` (`\"page\"` on a link,\n`\"true\"` otherwise). `current=\"section\"` is a view inside it, as a record of its list: the\nsame look, and the button stays a link that brings you back, announced with\n`aria-current=\"true\"`. An `aria-current` written on the host stays as written.",
|
|
4467
|
+
"docsTags": [],
|
|
4468
|
+
"values": [
|
|
4469
|
+
{
|
|
4470
|
+
"value": "page",
|
|
4471
|
+
"type": "string"
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"value": "section",
|
|
4475
|
+
"type": "string"
|
|
4476
|
+
},
|
|
4477
|
+
{
|
|
4478
|
+
"type": "boolean"
|
|
4479
|
+
},
|
|
4480
|
+
{
|
|
4481
|
+
"type": "undefined"
|
|
4482
|
+
}
|
|
4483
|
+
],
|
|
4484
|
+
"optional": true,
|
|
4485
|
+
"required": false,
|
|
4486
|
+
"getter": false,
|
|
4487
|
+
"setter": false
|
|
4488
|
+
},
|
|
4448
4489
|
{
|
|
4449
4490
|
"name": "disabled",
|
|
4450
4491
|
"type": "boolean | undefined",
|
|
@@ -4508,7 +4549,59 @@
|
|
|
4508
4549
|
"mutable": true,
|
|
4509
4550
|
"attr": "icon",
|
|
4510
4551
|
"reflectToAttr": true,
|
|
4511
|
-
"docs": "The icon displayed in the button",
|
|
4552
|
+
"docs": "The icon displayed in the button; `iconCurrent` and `iconHover` take its place in their\nstates",
|
|
4553
|
+
"docsTags": [],
|
|
4554
|
+
"values": [
|
|
4555
|
+
{
|
|
4556
|
+
"type": "string"
|
|
4557
|
+
},
|
|
4558
|
+
{
|
|
4559
|
+
"type": "undefined"
|
|
4560
|
+
}
|
|
4561
|
+
],
|
|
4562
|
+
"optional": true,
|
|
4563
|
+
"required": false,
|
|
4564
|
+
"getter": false,
|
|
4565
|
+
"setter": false
|
|
4566
|
+
},
|
|
4567
|
+
{
|
|
4568
|
+
"name": "iconCurrent",
|
|
4569
|
+
"type": "string | undefined",
|
|
4570
|
+
"complexType": {
|
|
4571
|
+
"original": "string",
|
|
4572
|
+
"resolved": "string | undefined",
|
|
4573
|
+
"references": {}
|
|
4574
|
+
},
|
|
4575
|
+
"mutable": false,
|
|
4576
|
+
"attr": "icon-current",
|
|
4577
|
+
"reflectToAttr": false,
|
|
4578
|
+
"docs": "The icon of the current button, in place of `icon`: the filled icon, say, of an `icon` drawn\nas an outline. It is the icon under the pointer too, unless `iconHover` says otherwise, so\nthe pointer previews it on the buttons that are not current. It takes the place of `icon`:\nwithout `icon` it shows nothing",
|
|
4579
|
+
"docsTags": [],
|
|
4580
|
+
"values": [
|
|
4581
|
+
{
|
|
4582
|
+
"type": "string"
|
|
4583
|
+
},
|
|
4584
|
+
{
|
|
4585
|
+
"type": "undefined"
|
|
4586
|
+
}
|
|
4587
|
+
],
|
|
4588
|
+
"optional": true,
|
|
4589
|
+
"required": false,
|
|
4590
|
+
"getter": false,
|
|
4591
|
+
"setter": false
|
|
4592
|
+
},
|
|
4593
|
+
{
|
|
4594
|
+
"name": "iconHover",
|
|
4595
|
+
"type": "string | undefined",
|
|
4596
|
+
"complexType": {
|
|
4597
|
+
"original": "string",
|
|
4598
|
+
"resolved": "string | undefined",
|
|
4599
|
+
"references": {}
|
|
4600
|
+
},
|
|
4601
|
+
"mutable": false,
|
|
4602
|
+
"attr": "icon-hover",
|
|
4603
|
+
"reflectToAttr": false,
|
|
4604
|
+
"docs": "The icon under the pointer, in place of `icon`, and `iconCurrent` when it is not set. Set it\nto the `icon` to keep the icon still under the pointer, when `iconCurrent` says something\nthe click does not do (a check, say). A pointer that cannot hover, as a finger, never shows\nit. It takes the place of `icon`: without `icon` it shows nothing",
|
|
4512
4605
|
"docsTags": [],
|
|
4513
4606
|
"values": [
|
|
4514
4607
|
{
|
|
@@ -5130,14 +5223,14 @@
|
|
|
5130
5223
|
"mds-url-view"
|
|
5131
5224
|
],
|
|
5132
5225
|
"dependencies": [
|
|
5133
|
-
"mds-spinner",
|
|
5134
5226
|
"mds-icon",
|
|
5227
|
+
"mds-spinner",
|
|
5135
5228
|
"mds-text"
|
|
5136
5229
|
],
|
|
5137
5230
|
"dependencyGraph": {
|
|
5138
5231
|
"mds-button": [
|
|
5139
|
-
"mds-spinner",
|
|
5140
5232
|
"mds-icon",
|
|
5233
|
+
"mds-spinner",
|
|
5141
5234
|
"mds-text"
|
|
5142
5235
|
],
|
|
5143
5236
|
"mds-banner": [
|
|
@@ -5263,7 +5356,7 @@
|
|
|
5263
5356
|
}
|
|
5264
5357
|
],
|
|
5265
5358
|
"usage": {
|
|
5266
|
-
"1. Description": "The `<mds-button-dropdown>` web component is a split-button control of the Magma Design System: it pairs a primary `<mds-button>` action with a secondary chevron button that opens an attached `<mds-dropdown>`, giving users a default action plus a menu of related choices in a single, visually unified control.\n\n#### Semantic Behavior\n\n- **Default slot is the menu**: Whatever you place in the default slot becomes the dropdown panel content; it is not treated as the button label (the visible label comes from the `label` prop).\n- **Chevron trigger**: The second button is icon-only (chevron), named in the page language (the `lang` of `<html>`) (\"More actions\"), and toggles the dropdown; it carries `aria-haspopup` and `aria-expanded` for the menu it opens.\n- **Shared configuration**: `active`, `await`, `disabled`, `size`, `tone` and `variant` are forwarded identically to both internal buttons, so the two halves always stay visually and behaviorally in sync. `href`, `target` and `autoFocus` belong to the primary action alone: the chevron only opens the menu.\n- **Form association**: The host is form-associated. With `type=\"submit\"` the primary action submits the enclosing `<form>` (or the one its `form` attribute names) and sends `name=value`, like a native submit button; with `type=\"reset\"` it resets it. The chevron never submits. Unlike `<mds-button>`, `type` defaults to `'button'`: a dropdown in a form submits it only when asked. The menu items are slotted `<mds-button>`, so they follow their own `type` (default `'submit'`), `name` and `value`, and the receiver tells all the actions apart by `name`.\n- **Disabled / await states**: Because these flags pass through to both buttons, disabling or putting the control in an awaiting state affects the action and the trigger together. A disabled `<fieldset>` around the component disables both halves the same way, without setting `disabled`.\n- **Primary action event**: `mdsButtonDropdownClick` fires when the primary action is clicked or activated from the keyboard, and not while the component is `disabled` or awaiting. The chevron and the menu items do not fire it. A native `click` listener on the component also runs for the menu items, whose clicks bubble to it, so listen for `mdsButtonDropdownClick` to run the primary action in JavaScript.\n- **Dropdown part**: The internal dropdown is exposed as the `dropdown` shadow part for external styling of the menu surface.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` / `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); they apply here as in `<mds-button>`, narrowed to `tone` `strong` / `weak` and without the `google` / `apple` variants, and are forwarded to both internal buttons. `variant` defaults to `'primary'`, `tone` defaults to `'strong'`, and `size` defaults to `'md'`.\n\n- **`label`** sets the text of the primary action button only; the chevron trigger is icon-only.\n- **`type`** (default `'button'`), **`name`** and **`value`** apply to the primary action only, as described under Form association. The menu items follow their own `type`: inside a `<form>`, give `type=\"button\"` to the ones that must not submit it.\n- **`href`** makes the primary action a link that navigates instead of submitting, with `target` choosing `'self'` vs `'blank'`; the chevron still opens the menu.\n\n#### Other behavioral props\n\n- **`autoFocus`** focuses the primary action once the component is loaded.\n- **`icon`** is an SVG filename slug from the Magma icon library, applied to the primary action button (the chevron icon on the trigger is fixed and not configurable).\n- **`truncate`** sets how the label of the primary action truncates, as on `mds-button` (default `'word'`).\n",
|
|
5359
|
+
"1. Description": "The `<mds-button-dropdown>` web component is a split-button control of the Magma Design System: it pairs a primary `<mds-button>` action with a secondary chevron button that opens an attached `<mds-dropdown>`, giving users a default action plus a menu of related choices in a single, visually unified control.\n\n#### Semantic Behavior\n\n- **Default slot is the menu**: Whatever you place in the default slot becomes the dropdown panel content; it is not treated as the button label (the visible label comes from the `label` prop).\n- **Chevron trigger**: The second button is icon-only (chevron), named in the page language (the `lang` of `<html>`) (\"More actions\"), and toggles the dropdown; it carries `aria-haspopup` and `aria-expanded` for the menu it opens.\n- **Shared configuration**: `active`, `await`, `disabled`, `size`, `tone` and `variant` are forwarded identically to both internal buttons, so the two halves always stay visually and behaviorally in sync. `href`, `target` and `autoFocus` belong to the primary action alone: the chevron only opens the menu.\n- **Current state**: `current` marks the primary action as the one that leads to the view you are in, as on `<mds-button>`. Both halves take the look of the current button; only the primary action is announced with `aria-current` and, with `current` (or `current=\"page\"`), neither navigates, nor submits, nor fires `mdsButtonDropdownClick`. With `current=\"section\"`, a view inside it, the primary action stays a link back. The chevron keeps opening the menu either way. A menu item that leads to the view you are in takes `current` itself.\n- **Form association**: The host is form-associated. With `type=\"submit\"` the primary action submits the enclosing `<form>` (or the one its `form` attribute names) and sends `name=value`, like a native submit button; with `type=\"reset\"` it resets it. The chevron never submits. Unlike `<mds-button>`, `type` defaults to `'button'`: a dropdown in a form submits it only when asked. The menu items are slotted `<mds-button>`, so they follow their own `type` (default `'submit'`), `name` and `value`, and the receiver tells all the actions apart by `name`.\n- **Disabled / await states**: Because these flags pass through to both buttons, disabling or putting the control in an awaiting state affects the action and the trigger together. A disabled `<fieldset>` around the component disables both halves the same way, without setting `disabled`.\n- **Primary action event**: `mdsButtonDropdownClick` fires when the primary action is clicked or activated from the keyboard, and not while the component is `disabled` or awaiting. The chevron and the menu items do not fire it. A native `click` listener on the component also runs for the menu items, whose clicks bubble to it, so listen for `mdsButtonDropdownClick` to run the primary action in JavaScript.\n- **Dropdown part**: The internal dropdown is exposed as the `dropdown` shadow part for external styling of the menu surface.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` / `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); they apply here as in `<mds-button>`, narrowed to `tone` `strong` / `weak` and without the `google` / `apple` variants, and are forwarded to both internal buttons. `variant` defaults to `'primary'`, `tone` defaults to `'strong'`, and `size` defaults to `'md'`.\n\n- **`label`** sets the text of the primary action button only; the chevron trigger is icon-only.\n- **`type`** (default `'button'`), **`name`** and **`value`** apply to the primary action only, as described under Form association. The menu items follow their own `type`: inside a `<form>`, give `type=\"button\"` to the ones that must not submit it.\n- **`href`** makes the primary action a link that navigates instead of submitting, with `target` choosing `'self'` vs `'blank'`; the chevron still opens the menu.\n\n#### Other behavioral props\n\n- **`autoFocus`** focuses the primary action once the component is loaded.\n- **`icon`** is an SVG filename slug from the Magma icon library, applied to the primary action button (the chevron icon on the trigger is fixed and not configurable).\n- **`iconCurrent`** and **`iconHover`** take the place of `icon` on the primary action, when it is current and under the pointer, as on `<mds-button>`: `iconHover` falls back on `iconCurrent`, and both need `icon`. The chevron keeps its arrow.\n- **`truncate`** sets how the label of the primary action truncates, as on `mds-button` (default `'word'`).\n",
|
|
5267
5360
|
"2. Examples": "Correct and idiomatic ways to use the `<mds-button-dropdown>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Split Button with Menu Items\n\nThe canonical form: a `label` prop for the primary action and one or more [`mds-button`](../mds-button/AGENTS.md) elements in the default slot as menu choices. Give the slot items `variant=\"dark\" tone=\"text\"` to keep them visually neutral inside the dropdown panel.\n\n```html\n<mds-button-dropdown label=\"Salva come bozza\" variant=\"success\" tone=\"weak\">\n <mds-button icon=\"mi/baseline/send\" variant=\"dark\" tone=\"text\" label=\"Invia subito\"></mds-button>\n <mds-button icon=\"mi/baseline/delete\" variant=\"dark\" tone=\"text\" label=\"Elimina\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Variant and Tone for Emphasis\n\nUse `variant` to express meaning and `tone` to express weight - the same pair applies to both internal buttons automatically.\n\n```html\n<!-- High emphasis: primary action -->\n<mds-button-dropdown label=\"Pubblica\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Pubblica come bozza\"></mds-button>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Pianifica pubblicazione\"></mds-button>\n</mds-button-dropdown>\n\n<!-- Status emphasis: destructive action group -->\n<mds-button-dropdown label=\"Elimina voce\" variant=\"error\" tone=\"weak\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Elimina e archivia\"></mds-button>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Annulla eliminazione\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Sizing\n\nUse the `size` prop. Both internal buttons track it automatically.\n\n```html\n<mds-button-dropdown label=\"Azione\" size=\"sm\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"md\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"lg\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"xl\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Primary Action with an Icon\n\nSupply the `icon` prop to add an icon to the primary action button. The chevron trigger icon is fixed and not configurable.\n\n```html\n<mds-button-dropdown\n label=\"Carica documento\"\n icon=\"mi/baseline/upload\"\n variant=\"primary\"\n tone=\"weak\"\n>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Carica da URL\"></mds-button>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Carica da Drive\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. Both the action button and the chevron trigger become unavailable simultaneously. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button-dropdown label=\"Salvataggio in corso...\" await variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Salva e chiudi\"></mds-button>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Salva come copia\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Disabled State\n\nThe `disabled` attribute blocks both halves of the control together.\n\n```html\n<mds-button-dropdown label=\"Invia richiesta\" disabled variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Invia in bozza\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Primary Action Handled in JavaScript\n\nListen for `mdsButtonDropdownClick` to run the primary action: it comes from the primary action only, from a click or the keyboard, and not while the component is `disabled` or awaiting. Handle each menu item with its own `click`.\n\n```html\n<mds-button-dropdown id=\"save\" label=\"Salva\" variant=\"primary\">\n <mds-button id=\"save-copy\" variant=\"dark\" tone=\"text\" label=\"Salva come copia\"></mds-button>\n</mds-button-dropdown>\n\n<script>\n document.getElementById('save').addEventListener('mdsButtonDropdownClick', () => save());\n document.getElementById('save-copy').addEventListener('click', () => saveCopy());\n</script>\n```\n\n#### Several Actions That Submit One Form\n\nSet `type=\"submit\"` on the component and give the primary action and the menu items the same `name` with a different `value`: each action submits the form, and the receiver reads which one was chosen from `name`, as with native submit buttons. Give `type=\"button\"` to the menu items that must not submit.\n\n```html\n<form action=\"/mail\" method=\"post\">\n <mds-input-field label=\"Oggetto\">\n <mds-input name=\"subject\"></mds-input>\n </mds-input-field>\n\n <!-- the receiver gets action=send, action=draft or action=schedule -->\n <mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\">\n <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n <mds-button name=\"action\" value=\"schedule\" variant=\"dark\" tone=\"text\" label=\"Invio programmato\"></mds-button>\n <mds-button type=\"button\" variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n </mds-button-dropdown>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for [`mds-button`](../mds-button/AGENTS.md): `new FormData(form, event.submitter)`.\n\n#### Hyperlink Split Button via `href`\n\n`href` and `target` on the component make the primary action a link; the chevron keeps opening the menu. Put the other links on the menu items (`target=\"blank\"` opens them in a new tab).\n\n```html\n<mds-button-dropdown\n label=\"Apri documento\"\n href=\"https://example.com/doc\"\n variant=\"primary\"\n tone=\"weak\"\n>\n <mds-button href=\"https://example.com/doc/edit\" target=\"blank\" variant=\"dark\" tone=\"text\" label=\"Modifica\"></mds-button>\n <mds-button href=\"https://example.com/doc/history\" target=\"blank\" variant=\"dark\" tone=\"text\" label=\"Cronologia\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Styling Customization\n\nStyle the component through its documented `--mds-button-dropdown-*` CSS custom properties or the `dropdown` shadow part. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and named themes keep working.\n\nThe `--mds-button-*` properties that inherit reach the two inner buttons too: `--mds-button-label-transform: none` on the component keeps a label such as a tenant name as written, without the uppercase first letter.\n\n```css\n.custom-toolbar mds-button-dropdown {\n --mds-button-dropdown-radius: var(--magma-radius-md);\n}\n\n.tenant-switcher mds-button-dropdown {\n --mds-button-label-transform: none;\n}\n\n/* Style the dropdown panel surface through the documented shadow part */\n.custom-toolbar mds-button-dropdown::part(dropdown) {\n box-shadow: var(--shadow-lg);\n}\n```\n",
|
|
5268
5361
|
"3. Mistakes": "Common incorrect uses of `<mds-button-dropdown>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Put the Label in the Default Slot\n\nThe default slot feeds the `<mds-dropdown>` panel, not the button label. Text placed in the slot ends up as menu content, not as the button's visible text. Use the `label` prop.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown variant=\"primary\" tone=\"strong\">\n Salva\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Salva\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Slot Non-Button Content as Menu Items\n\nThe dropdown panel is designed for [`mds-button`](../mds-button/AGENTS.md) elements. Slotting raw `<button>`, `<a>`, or arbitrary HTML bypasses the Magma theming, focus styles and button API (`icon`, `await`, `disabled`) of the menu entries.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Esporta\" variant=\"primary\" tone=\"weak\">\n <button onclick=\"exportPDF()\">PDF</button>\n <a href=\"/export/csv\">CSV</a>\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Esporta\" variant=\"primary\" tone=\"weak\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta PDF\" icon=\"mi/baseline/picture-as-pdf\"></mds-button>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta CSV\" icon=\"mi/baseline/table-chart\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Count on the Default `type` to Submit a Form\n\nUnlike `<mds-button>`, the component defaults to `type=\"button\"`: inside a form, the primary action submits nothing until you set `type=\"submit\"`.\n\n```html\n<!-- INCORRECT: the primary action does not submit -->\n<form action=\"/mail\" method=\"post\">\n <mds-button-dropdown name=\"action\" value=\"send\" label=\"Invia\">\n <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n </mds-button-dropdown>\n</form>\n\n<!-- CORRECT -->\n<form action=\"/mail\" method=\"post\">\n <mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n </mds-button-dropdown>\n</form>\n```\n\n#### Do Not Submit the Form from a `click` Listener\n\nA `click` listener on the component also runs for the menu items, whose clicks bubble to it: picking a menu item that submits (\"Salva come bozza\") submits the form twice, once with its `name` / `value` and once without, and the receiver cannot tell which action was chosen. Use `type=\"submit\"` with `name` / `value`.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown id=\"send\" label=\"Invia\"></mds-button-dropdown>\n<script>\n document.getElementById('send').addEventListener('click', () => form.requestSubmit());\n</script>\n\n<!-- CORRECT -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\"></mds-button-dropdown>\n```\n\n#### Do Not Listen to `click` for the Primary Action\n\nA `click` on the component also comes from the menu items, whose clicks bubble to it: the primary action would run whenever the user picks an entry of the menu. Listen for `mdsButtonDropdownClick`, which only the primary action emits.\n\n```js\n// INCORRECT: also runs for \"Salva come copia\"\ndropdown.addEventListener('click', () => save());\n\n// CORRECT\ndropdown.addEventListener('mdsButtonDropdownClick', () => save());\n```\n\n#### Do Not Leave a Menu Item That Must Not Submit on the Default `type`\n\nThe menu items are slotted `<mds-button>`, whose `type` defaults to `'submit'`: inside a form, an item that runs your own code (a preview, a copy) submits the form too. Give it `type=\"button\"`.\n\n```html\n<!-- INCORRECT: \"Anteprima\" submits the form -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n <mds-button type=\"button\" variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Use Unsupported `tone` Values\n\n`<mds-button-dropdown>` accepts `ToneMinimalVariantType`, which is `strong` and `weak` only. Passing `outline`, `text`, or `box` is not valid for this component: the value reaches the internal buttons unchecked, without the split-button styling that only `strong` and `weak` have.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"outline\"></mds-button-dropdown>\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"text\"></mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione\"></mds-button>\n</mds-button-dropdown>\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"weak\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Try to Customize the Chevron Icon\n\nThe chevron trigger icon is internal and fixed. There is no prop to change it. Do not attempt to override it with CSS property hacks or shadow-DOM selectors.\n\n```css\n/* INCORRECT */\nmds-button-dropdown .dropdown-action mds-icon {\n content: url('custom-arrow.svg');\n}\n\n/* CORRECT - style only through documented custom properties and the dropdown part */\nmds-button-dropdown {\n --mds-button-dropdown-radius: var(--magma-radius-md);\n}\nmds-button-dropdown::part(dropdown) {\n box-shadow: var(--shadow-lg);\n}\n```\n\n#### Do Not Set Boolean Attributes to `\"false\"`\n\n`await`, `disabled`, and `active` are boolean attributes and `mds-button-dropdown` is form-associated: as on a native control, any value turns them on, `\"false\"` included, so this markup renders a disabled button that is waiting. Remove the attribute to turn it off.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Invia\" await=\"false\" disabled=\"false\" variant=\"primary\"></mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Invia\" variant=\"primary\" tone=\"strong\">\n <mds-button variant=\"dark\" tone=\"text\" label=\"Invia come bozza\"></mds-button>\n</mds-button-dropdown>\n```\n"
|
|
5269
5362
|
},
|
|
@@ -5340,6 +5433,47 @@
|
|
|
5340
5433
|
"getter": false,
|
|
5341
5434
|
"setter": false
|
|
5342
5435
|
},
|
|
5436
|
+
{
|
|
5437
|
+
"name": "current",
|
|
5438
|
+
"type": "\"page\" | \"section\" | boolean | undefined",
|
|
5439
|
+
"complexType": {
|
|
5440
|
+
"original": "ButtonCurrentType",
|
|
5441
|
+
"resolved": "\"page\" | \"section\" | boolean | undefined",
|
|
5442
|
+
"references": {
|
|
5443
|
+
"ButtonCurrentType": {
|
|
5444
|
+
"location": "import",
|
|
5445
|
+
"path": "@type/button",
|
|
5446
|
+
"id": "src/type/button.ts::ButtonCurrentType",
|
|
5447
|
+
"referenceLocation": "ButtonCurrentType"
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
},
|
|
5451
|
+
"mutable": false,
|
|
5452
|
+
"attr": "current",
|
|
5453
|
+
"reflectToAttr": true,
|
|
5454
|
+
"docs": "Marks the primary action as the one that leads to the view you are in, as `current` does on\n`mds-button`: `current` (or `current=\"page\"`) is that view, and the primary action neither\nnavigates nor submits nor emits `mdsButtonDropdownClick`; `current=\"section\"` is a view inside\nit, and the primary action stays a link back. Both halves take the look; only the primary\naction is announced with `aria-current`, the chevron keeps opening the menu",
|
|
5455
|
+
"docsTags": [],
|
|
5456
|
+
"values": [
|
|
5457
|
+
{
|
|
5458
|
+
"value": "page",
|
|
5459
|
+
"type": "string"
|
|
5460
|
+
},
|
|
5461
|
+
{
|
|
5462
|
+
"value": "section",
|
|
5463
|
+
"type": "string"
|
|
5464
|
+
},
|
|
5465
|
+
{
|
|
5466
|
+
"type": "boolean"
|
|
5467
|
+
},
|
|
5468
|
+
{
|
|
5469
|
+
"type": "undefined"
|
|
5470
|
+
}
|
|
5471
|
+
],
|
|
5472
|
+
"optional": true,
|
|
5473
|
+
"required": false,
|
|
5474
|
+
"getter": false,
|
|
5475
|
+
"setter": false
|
|
5476
|
+
},
|
|
5343
5477
|
{
|
|
5344
5478
|
"name": "disabled",
|
|
5345
5479
|
"type": "boolean | undefined",
|
|
@@ -5403,7 +5537,59 @@
|
|
|
5403
5537
|
"mutable": true,
|
|
5404
5538
|
"attr": "icon",
|
|
5405
5539
|
"reflectToAttr": true,
|
|
5406
|
-
"docs": "The icon displayed in the button",
|
|
5540
|
+
"docs": "The icon displayed in the button; `iconCurrent` and `iconHover` take its place in their\nstates",
|
|
5541
|
+
"docsTags": [],
|
|
5542
|
+
"values": [
|
|
5543
|
+
{
|
|
5544
|
+
"type": "string"
|
|
5545
|
+
},
|
|
5546
|
+
{
|
|
5547
|
+
"type": "undefined"
|
|
5548
|
+
}
|
|
5549
|
+
],
|
|
5550
|
+
"optional": true,
|
|
5551
|
+
"required": false,
|
|
5552
|
+
"getter": false,
|
|
5553
|
+
"setter": false
|
|
5554
|
+
},
|
|
5555
|
+
{
|
|
5556
|
+
"name": "iconCurrent",
|
|
5557
|
+
"type": "string | undefined",
|
|
5558
|
+
"complexType": {
|
|
5559
|
+
"original": "string",
|
|
5560
|
+
"resolved": "string | undefined",
|
|
5561
|
+
"references": {}
|
|
5562
|
+
},
|
|
5563
|
+
"mutable": false,
|
|
5564
|
+
"attr": "icon-current",
|
|
5565
|
+
"reflectToAttr": false,
|
|
5566
|
+
"docs": "The icon of the primary action when it is current, in place of `icon`, as `iconCurrent` does\non `mds-button`: under the pointer too, unless `iconHover` says otherwise. Without `icon` it\nshows nothing",
|
|
5567
|
+
"docsTags": [],
|
|
5568
|
+
"values": [
|
|
5569
|
+
{
|
|
5570
|
+
"type": "string"
|
|
5571
|
+
},
|
|
5572
|
+
{
|
|
5573
|
+
"type": "undefined"
|
|
5574
|
+
}
|
|
5575
|
+
],
|
|
5576
|
+
"optional": true,
|
|
5577
|
+
"required": false,
|
|
5578
|
+
"getter": false,
|
|
5579
|
+
"setter": false
|
|
5580
|
+
},
|
|
5581
|
+
{
|
|
5582
|
+
"name": "iconHover",
|
|
5583
|
+
"type": "string | undefined",
|
|
5584
|
+
"complexType": {
|
|
5585
|
+
"original": "string",
|
|
5586
|
+
"resolved": "string | undefined",
|
|
5587
|
+
"references": {}
|
|
5588
|
+
},
|
|
5589
|
+
"mutable": false,
|
|
5590
|
+
"attr": "icon-hover",
|
|
5591
|
+
"reflectToAttr": false,
|
|
5592
|
+
"docs": "The icon of the primary action under the pointer, in place of `icon`, and `iconCurrent` when\nit is not set, as `iconHover` does on `mds-button`. Without `icon` it shows nothing",
|
|
5407
5593
|
"docsTags": [],
|
|
5408
5594
|
"values": [
|
|
5409
5595
|
{
|
|
@@ -5850,8 +6036,8 @@
|
|
|
5850
6036
|
"mds-dropdown"
|
|
5851
6037
|
],
|
|
5852
6038
|
"mds-button": [
|
|
5853
|
-
"mds-spinner",
|
|
5854
6039
|
"mds-icon",
|
|
6040
|
+
"mds-spinner",
|
|
5855
6041
|
"mds-text"
|
|
5856
6042
|
]
|
|
5857
6043
|
},
|
|
@@ -6511,8 +6697,8 @@
|
|
|
6511
6697
|
"mds-calendar-cell"
|
|
6512
6698
|
],
|
|
6513
6699
|
"mds-button": [
|
|
6514
|
-
"mds-spinner",
|
|
6515
6700
|
"mds-icon",
|
|
6701
|
+
"mds-spinner",
|
|
6516
6702
|
"mds-text"
|
|
6517
6703
|
],
|
|
6518
6704
|
"mds-calendar-cell": [
|
|
@@ -7093,8 +7279,8 @@
|
|
|
7093
7279
|
"mds-button"
|
|
7094
7280
|
],
|
|
7095
7281
|
"mds-button": [
|
|
7096
|
-
"mds-spinner",
|
|
7097
7282
|
"mds-icon",
|
|
7283
|
+
"mds-spinner",
|
|
7098
7284
|
"mds-text"
|
|
7099
7285
|
],
|
|
7100
7286
|
"mds-calendar": [
|
|
@@ -7940,8 +8126,8 @@
|
|
|
7940
8126
|
"mds-button"
|
|
7941
8127
|
],
|
|
7942
8128
|
"mds-button": [
|
|
7943
|
-
"mds-spinner",
|
|
7944
8129
|
"mds-icon",
|
|
8130
|
+
"mds-spinner",
|
|
7945
8131
|
"mds-text"
|
|
7946
8132
|
],
|
|
7947
8133
|
"mds-policy-ai": [
|
|
@@ -9689,8 +9875,8 @@
|
|
|
9689
9875
|
"mds-button"
|
|
9690
9876
|
],
|
|
9691
9877
|
"mds-button": [
|
|
9692
|
-
"mds-spinner",
|
|
9693
9878
|
"mds-icon",
|
|
9879
|
+
"mds-spinner",
|
|
9694
9880
|
"mds-text"
|
|
9695
9881
|
]
|
|
9696
9882
|
},
|
|
@@ -10953,8 +11139,8 @@
|
|
|
10953
11139
|
"mds-badge"
|
|
10954
11140
|
],
|
|
10955
11141
|
"mds-button": [
|
|
10956
|
-
"mds-spinner",
|
|
10957
11142
|
"mds-icon",
|
|
11143
|
+
"mds-spinner",
|
|
10958
11144
|
"mds-text"
|
|
10959
11145
|
],
|
|
10960
11146
|
"mds-img": [
|
|
@@ -11959,8 +12145,8 @@
|
|
|
11959
12145
|
"mds-button"
|
|
11960
12146
|
],
|
|
11961
12147
|
"mds-button": [
|
|
11962
|
-
"mds-spinner",
|
|
11963
12148
|
"mds-icon",
|
|
12149
|
+
"mds-spinner",
|
|
11964
12150
|
"mds-text"
|
|
11965
12151
|
]
|
|
11966
12152
|
},
|
|
@@ -12211,8 +12397,8 @@
|
|
|
12211
12397
|
"mds-button"
|
|
12212
12398
|
],
|
|
12213
12399
|
"mds-button": [
|
|
12214
|
-
"mds-spinner",
|
|
12215
12400
|
"mds-icon",
|
|
12401
|
+
"mds-spinner",
|
|
12216
12402
|
"mds-text"
|
|
12217
12403
|
]
|
|
12218
12404
|
},
|
|
@@ -12738,8 +12924,8 @@
|
|
|
12738
12924
|
"mds-button"
|
|
12739
12925
|
],
|
|
12740
12926
|
"mds-button": [
|
|
12741
|
-
"mds-spinner",
|
|
12742
12927
|
"mds-icon",
|
|
12928
|
+
"mds-spinner",
|
|
12743
12929
|
"mds-text"
|
|
12744
12930
|
]
|
|
12745
12931
|
},
|
|
@@ -13438,8 +13624,8 @@
|
|
|
13438
13624
|
"mds-button"
|
|
13439
13625
|
],
|
|
13440
13626
|
"mds-button": [
|
|
13441
|
-
"mds-spinner",
|
|
13442
13627
|
"mds-icon",
|
|
13628
|
+
"mds-spinner",
|
|
13443
13629
|
"mds-text"
|
|
13444
13630
|
],
|
|
13445
13631
|
"mds-avatar": [
|
|
@@ -15136,8 +15322,8 @@
|
|
|
15136
15322
|
"mds-spinner"
|
|
15137
15323
|
],
|
|
15138
15324
|
"mds-button": [
|
|
15139
|
-
"mds-spinner",
|
|
15140
15325
|
"mds-icon",
|
|
15326
|
+
"mds-spinner",
|
|
15141
15327
|
"mds-text"
|
|
15142
15328
|
],
|
|
15143
15329
|
"mds-input-tip-item": [
|
|
@@ -15843,8 +16029,8 @@
|
|
|
15843
16029
|
"mds-calendar"
|
|
15844
16030
|
],
|
|
15845
16031
|
"mds-button": [
|
|
15846
|
-
"mds-spinner",
|
|
15847
16032
|
"mds-icon",
|
|
16033
|
+
"mds-spinner",
|
|
15848
16034
|
"mds-text"
|
|
15849
16035
|
],
|
|
15850
16036
|
"mds-input-tip-item": [
|
|
@@ -16420,8 +16606,8 @@
|
|
|
16420
16606
|
"mds-calendar-cell"
|
|
16421
16607
|
],
|
|
16422
16608
|
"mds-button": [
|
|
16423
|
-
"mds-spinner",
|
|
16424
16609
|
"mds-icon",
|
|
16610
|
+
"mds-spinner",
|
|
16425
16611
|
"mds-text"
|
|
16426
16612
|
],
|
|
16427
16613
|
"mds-calendar-cell": [
|
|
@@ -16622,8 +16808,8 @@
|
|
|
16622
16808
|
"mds-button"
|
|
16623
16809
|
],
|
|
16624
16810
|
"mds-button": [
|
|
16625
|
-
"mds-spinner",
|
|
16626
16811
|
"mds-icon",
|
|
16812
|
+
"mds-spinner",
|
|
16627
16813
|
"mds-text"
|
|
16628
16814
|
]
|
|
16629
16815
|
},
|
|
@@ -17031,8 +17217,8 @@
|
|
|
17031
17217
|
"mds-spinner"
|
|
17032
17218
|
],
|
|
17033
17219
|
"mds-button": [
|
|
17034
|
-
"mds-spinner",
|
|
17035
17220
|
"mds-icon",
|
|
17221
|
+
"mds-spinner",
|
|
17036
17222
|
"mds-text"
|
|
17037
17223
|
],
|
|
17038
17224
|
"mds-input-tip-item": [
|
|
@@ -19370,8 +19556,8 @@
|
|
|
19370
19556
|
"mds-file-preview"
|
|
19371
19557
|
],
|
|
19372
19558
|
"mds-button": [
|
|
19373
|
-
"mds-spinner",
|
|
19374
19559
|
"mds-icon",
|
|
19560
|
+
"mds-spinner",
|
|
19375
19561
|
"mds-text"
|
|
19376
19562
|
],
|
|
19377
19563
|
"mds-progress": [
|
|
@@ -19635,8 +19821,8 @@
|
|
|
19635
19821
|
"mds-tooltip"
|
|
19636
19822
|
],
|
|
19637
19823
|
"mds-button": [
|
|
19638
|
-
"mds-spinner",
|
|
19639
19824
|
"mds-icon",
|
|
19825
|
+
"mds-spinner",
|
|
19640
19826
|
"mds-text"
|
|
19641
19827
|
],
|
|
19642
19828
|
"mds-tooltip": [
|
|
@@ -20735,8 +20921,8 @@
|
|
|
20735
20921
|
"mds-button"
|
|
20736
20922
|
],
|
|
20737
20923
|
"mds-button": [
|
|
20738
|
-
"mds-spinner",
|
|
20739
20924
|
"mds-icon",
|
|
20925
|
+
"mds-spinner",
|
|
20740
20926
|
"mds-text"
|
|
20741
20927
|
]
|
|
20742
20928
|
},
|
|
@@ -21591,8 +21777,8 @@
|
|
|
21591
21777
|
"mds-button"
|
|
21592
21778
|
],
|
|
21593
21779
|
"mds-button": [
|
|
21594
|
-
"mds-spinner",
|
|
21595
21780
|
"mds-icon",
|
|
21781
|
+
"mds-spinner",
|
|
21596
21782
|
"mds-text"
|
|
21597
21783
|
]
|
|
21598
21784
|
},
|
|
@@ -21639,7 +21825,7 @@
|
|
|
21639
21825
|
}
|
|
21640
21826
|
],
|
|
21641
21827
|
"usage": {
|
|
21642
|
-
"1. Description": "The `<mds-modal>` web component is the Magma Design System overlay container for dialogs, presenting content in a windowed surface layered above the page with an optional backdrop. It is the system equivalent of the native `<dialog>` element, adding managed open/close animations, body scroll locking, positioning, and a built-in close affordance.\n\n#### Semantic Behavior\n\n- **Open state**: Visibility is driven by the `opened` prop. Setting it `true` runs the intro animation and emits `mdsModalOpen`; clearing it runs the outro animation and emits `mdsModalClose`.\n- **Programmatic close**: Exposes an async `close()` method that dismisses the modal regardless of `interaction`, mirroring the close-button action.\n- **Show/hide events**: `mdsModalShow` fires when the intro finishes (fully visible) and `mdsModalHide` when the outro finishes (fully hidden), the latter being the safe point to detach the modal to reclaim memory.\n- **Backdrop dismissal**: With `interaction=\"relaxed\"` (default) a click on the backdrop or `Esc` closes the modal
|
|
21828
|
+
"1. Description": "The `<mds-modal>` web component is the Magma Design System overlay container for dialogs, presenting content in a windowed surface layered above the page with an optional backdrop. It is the system equivalent of the native `<dialog>` element, adding managed open/close animations, body scroll locking, positioning, and a built-in close affordance.\n\n#### Semantic Behavior\n\n- **Open state**: Visibility is driven by the `opened` prop. Setting it `true` runs the intro animation and emits `mdsModalOpen`; clearing it runs the outro animation and emits `mdsModalClose`.\n- **Programmatic close**: Exposes an async `close()` method that dismisses the modal regardless of `interaction`, mirroring the close-button action.\n- **Show/hide events**: `mdsModalShow` fires when the intro finishes (fully visible) and `mdsModalHide` when the outro finishes (fully hidden), the latter being the safe point to detach the modal to reclaim memory.\n- **Backdrop dismissal**: With `interaction=\"relaxed\"` (default) a click on the backdrop or `Esc` closes the modal. The click counts when it is pressed and released on the backdrop once the window has stopped: a text selection dragged out of a field, a drag from the backdrop into the window or a click while the window is still coming in leave the modal open. With `interaction=\"strict\"` both are ignored, and the touch swipe too (below): only the close button or `close()` can dismiss it.\n- **Body scroll lock**: When `overflow=\"auto\"` the component locks body scroll while open and restores it on close.\n- **Touch dismissal**: On touch devices a horizontal swipe past a threshold closes a `relaxed` modal, respecting the swipe direction implied by edge `position` values.\n- **Slot-driven layout**: With no `window` slot, the default slot renders centered content framed by optional `top` (header) and `bottom` (footer) slots, and a close button is rendered automatically, icon-only and named in the page language (the `lang` of `<html>`) (\"Close\"). Slotting a `window` element suppresses the built-in chrome and close button so the consumer supplies the entire surface.\n- **Width of a slotted window**: The `window` element stops at the width of a dialog, `--magma-width-dialog` (the column of a form plus its inset, 580px at 16px: `widths/dialog` of the design language), and shrinks with a narrower screen, its margin around it. A class on the element wins over it, for a bespoke surface.\n- **Close button placement**: The built-in close button sits on the backdrop, in a strip the window always leaves free, so a `strict` modal can be closed whatever its content. `left` and `right` leave it at their side at every width.\n- **Narrow screens**: At a viewport of 480px or less a window that would fill the screen (`center` and the four corners) leaves a strip of backdrop at the top, where the close button shows, as `left` and `right` leave one at their side; `top` and `bottom` stay as tall as their content but never taller than the screen less that strip, which stays on their free side with the close button at its edge (top right for `bottom`, bottom right for `top`).\n- **Wide screens**: Above 480px every window leaves a strip of backdrop at its side, with the close button at its top: `center`, `top` and `bottom` one on each side, the button at the top right; the corners one on the side away from their own, the button there.\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders; its configuration is structural and motion-oriented.\n\n#### Other behavioral props\n\n- **`position`** sets where the window animates from and rests, from `'center'` to edge and corner anchors (`'top'`, `'bottom-left'`, etc.); edge positions also define the valid swipe-to-dismiss direction.\n- **`animation`** selects the motion style of the window: `'slide'` (default), `'3d'`, or `'custom'` (driven entirely by CSS custom properties).\n- **`interaction`** governs how forgiving dismissal is - `'relaxed'` allows backdrop clicks, `'strict'` requires the close button.\n- **`overflow`** chooses whether the component manages body scroll locking (`'auto'`) or leaves it to the consumer (`'manual'`).\n- **`hideBackdrop`** removes the dimmed overlay behind the window (shown by default).\n",
|
|
21643
21829
|
"2. Examples": "Correct and idiomatic ways to use the `<mds-modal>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Modal with Inline Content\n\nThe simplest form: toggle `opened` from JavaScript to show the dialog. The built-in close button and backdrop dismiss the modal automatically with `interaction=\"relaxed\"` (default). React to the `mdsModalClose` event to sync your state.\n\n```html\n<mds-button id=\"btn-apri\">Apri dialogo</mds-button>\n\n<mds-modal id=\"dialogo\">\n <div class=\"p-400\">\n <mds-text>Sei sicuro di voler continuare?</mds-text>\n </div>\n</mds-modal>\n\n<script>\n const btn = document.getElementById('btn-apri');\n const modal = document.getElementById('dialogo');\n btn.addEventListener('click', () => { modal.opened = true; });\n modal.addEventListener('mdsModalClose', () => { modal.opened = undefined; });\n</script>\n```\n\n#### Fixed Header and Footer via `top` / `bottom` Slots\n\nUse the `top` slot for a sticky header and the `bottom` slot for a sticky footer (e.g. action buttons). The default slot renders scrollable body content between them.\n\n```html\n<mds-modal id=\"modifica-utente\" position=\"right\">\n <header slot=\"top\" class=\"p-400 bg-surface-overlay shadow-ring-weak\">\n <mds-text typography=\"h5\">Modifica utente</mds-text>\n </header>\n\n <div class=\"p-400 grid gap-400\">\n <mds-input-field label=\"Nome\">\n <mds-input name=\"nome\"></mds-input>\n </mds-input-field>\n <mds-input-field label=\"Cognome\">\n <mds-input name=\"cognome\"></mds-input>\n </mds-input-field>\n </div>\n\n <footer slot=\"bottom\" class=\"p-400 flex gap-300 justify-end bg-surface-overlay shadow-ring-weak\">\n <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-annulla\">Annulla</mds-button>\n <mds-button variant=\"primary\" tone=\"strong\" id=\"btn-salva\">Salva</mds-button>\n </footer>\n</mds-modal>\n```\n\n#### Edge and Corner Positions\n\n`position` anchors the window to an edge or corner and drives the slide-in direction. Use `right` or `left` for side panels, `bottom` for mobile drawers.\n\n```html\n<!-- Side panel from the right (default in most app shells) -->\n<mds-modal id=\"pannello-laterale\" position=\"right\">\n <div class=\"p-400\">\n <mds-text>Dettagli del documento</mds-text>\n </div>\n</mds-modal>\n\n<!-- Drawer from the bottom (mobile) -->\n<mds-modal id=\"drawer-mobile\" position=\"bottom\">\n <div class=\"p-400\">\n <mds-text>Azioni disponibili</mds-text>\n </div>\n</mds-modal>\n```\n\n#### Strict Interaction Mode\n\nSet `interaction=\"strict\"` when the user must explicitly confirm or cancel before the dialog closes - for example, a form with unsaved changes. Backdrop clicks, `Esc` and touch swipes are ignored; only the close button or the `close()` method can dismiss the modal.\n\n```html\n<mds-modal id=\"conferma-elimina\" interaction=\"strict\">\n <div class=\"p-400 grid gap-400\">\n <mds-text typography=\"h5\">Eliminare il documento?</mds-text>\n <mds-text>Questa operazione non e' reversibile.</mds-text>\n <div class=\"flex gap-300 justify-end\">\n <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-no\">Annulla</mds-button>\n <mds-button variant=\"error\" tone=\"strong\" id=\"btn-si\">Elimina</mds-button>\n </div>\n </div>\n</mds-modal>\n\n<script>\n document.getElementById('btn-no').addEventListener('click', () => {\n document.getElementById('conferma-elimina').close();\n });\n</script>\n```\n\n#### Programmatic Close via `close()` Method\n\nCall the async `close()` method from JavaScript when you need to dismiss the modal from outside its UI - for example, after a successful async operation.\n\n```html\n<mds-modal id=\"salvataggio\">\n <div class=\"p-400\">\n <mds-text>Salvataggio in corso...</mds-text>\n </div>\n</mds-modal>\n\n<script>\n async function salva() {\n const modal = document.getElementById('salvataggio');\n modal.opened = true;\n await salvaRisorsa();\n await modal.close();\n }\n</script>\n```\n\n#### Listening to Animation Events\n\n`mdsModalShow` fires when the intro animation completes (the modal is fully visible). Use it to focus the first interactive element. `mdsModalHide` fires when the outro animation completes; use it to detach the element or reset content.\n\n```html\n<mds-modal id=\"modal-focus\" position=\"right\">\n <div class=\"p-400\">\n <mds-input-field label=\"Cerca\">\n <mds-input id=\"input-ricerca\" name=\"ricerca\"></mds-input>\n </mds-input-field>\n </div>\n</mds-modal>\n\n<script>\n const modal = document.getElementById('modal-focus');\n const input = document.getElementById('input-ricerca');\n\n modal.addEventListener('mdsModalShow', () => {\n input.setFocus();\n });\n modal.addEventListener('mdsModalHide', () => {\n // safe point to detach or reset content\n modal.opened = undefined;\n });\n</script>\n```\n\n#### Custom Animation Styles\n\n`animation` selects the motion style. `'slide'` (default) translates from the entry edge; `'3d'` adds a perspective tilt; `'custom'` delegates entirely to the CSS custom properties `--mds-modal-custom-closed-transform` and `--mds-modal-custom-window-distance`.\n\n```html\n<!-- 3D perspective tilt animation -->\n<mds-modal id=\"modal-3d\" animation=\"3d\" position=\"center\">\n <div class=\"p-400\">\n <mds-text>Animazione 3D</mds-text>\n </div>\n</mds-modal>\n\n<!-- Custom animation driven by CSS vars -->\n<mds-modal id=\"modal-custom\" animation=\"custom\" position=\"center\">\n <div class=\"p-400\">\n <mds-text>Animazione personalizzata</mds-text>\n </div>\n</mds-modal>\n```\n\n#### The Window of a Dialog via the `window` Slot\n\nSlot an element with `slot=\"window\"` to replace the built-in chrome (the window surface and the close button). A dialog slots an [`mds-banner`](../mds-banner/AGENTS.md) `variant=\"light\"` `tone=\"box\"` `dismissible`: its own close button closes the modal. The slotted element gets no `role` of its own: the `<dialog>` the component renders is already the dialog, named by the `aria-label` of the host. The actions follow the rules of a dialog: the secondary one `dark` `outline`, the main one last.\n\nThe window stops at the width of a dialog, the column of a form plus its inset (`--magma-width-dialog`, 580px at 16px, `widths/dialog` of the design language), and shrinks with a narrower screen. Write no width on it: a form keeps in the window the shape it has in the page.\n\n```html\n<mds-modal id=\"modal-banner\" aria-label=\"Azione richiesta\">\n <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Azione richiesta\">\n <mds-text typography=\"detail\">Conferma la tua identita' per procedere.</mds-text>\n <mds-button slot=\"action\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n </mds-banner>\n</mds-modal>\n```\n\nA bespoke surface, such as a banner as wide as the screen, writes its own width with a class: from the light DOM it wins over the width of a dialog.\n\n```html\n<mds-modal id=\"modal-novita\" aria-label=\"Novita'\">\n <mds-banner slot=\"window\" class=\"max-w-none\" variant=\"light\" tone=\"box\" dismissible headline=\"Novita'\">\n <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n </mds-banner>\n</mds-modal>\n```\n\n#### Disabling the Backdrop\n\nAdd `hide-backdrop` to render the modal without the dimmed overlay - useful for non-blocking side panels that coexist with interactive page content.\n\n```html\n<mds-modal id=\"pannello-info\" position=\"right\" hide-backdrop>\n <div class=\"p-400\">\n <mds-text>Informazioni contestuali</mds-text>\n </div>\n</mds-modal>\n```\n\n```javascript\n// Remove the backdrop from JavaScript (it applies from the next opening)\ndocument.getElementById('pannello-info').hideBackdrop = true;\n```\n\n#### CSS Customization\n\nSize and place the window only through the public `--mds-modal-*` CSS custom properties. Set them on the host element; the window takes its background, radius and shadow from the component. They size the built-in window: a slotted window takes the width of a dialog, or the one its class gives it.\n\n```css\n/* Narrow center modal */\n#modal-card {\n --mds-modal-window-distance: calc(var(--spacing) * 600);\n --mds-modal-window-overflow: hidden;\n --mds-modal-window-max-width: 480px;\n}\n\n/* Full-width drawer */\n#drawer-bottom {\n --mds-modal-window-max-width: 100%;\n --mds-modal-window-min-width: 100%;\n}\n```\n",
|
|
21644
21830
|
"3. Mistakes": "Common incorrect uses of `<mds-modal>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Set `opened=\"false\"` to Close the Modal\n\nA false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime does parse the string `\"false\"` as `false`, so the modal stays closed, but the attribute is still on the element until the first render, so `[opened]` attribute selectors and any code that reads the attribute see it set. Remove the attribute; from JavaScript set the prop to `undefined` (`false` works too: the component turns it into `undefined`).\n\n```html\n<!-- INCORRECT -->\n<mds-modal id=\"dialogo\" opened=\"false\"></mds-modal>\n\n<!-- CORRECT -->\n<mds-modal id=\"dialogo\"></mds-modal>\n```\n\n#### Do Not Put Content in the `window` Slot Without Replacing the Entire Chrome\n\nThe `window` slot completely bypasses the built-in surface, header/footer regions, and close button. Do not use it to add a header element while expecting the default content area and close button to still render - they will not.\n\n```html\n<!-- INCORRECT: only the slotted header renders; default slot and close button are suppressed -->\n<mds-modal id=\"modal\">\n <header slot=\"window\" class=\"p-400\">Titolo</header>\n <div>Contenuto del dialogo</div>\n</mds-modal>\n\n<!-- CORRECT: use slot=\"top\" for a sticky header, default slot for body -->\n<mds-modal id=\"modal\">\n <header slot=\"top\" class=\"p-400 bg-surface-overlay\">Titolo</header>\n <div class=\"p-400\">Contenuto del dialogo</div>\n</mds-modal>\n```\n\n#### Do Not Size the Window of a Dialog by Hand\n\nA slotted window already stops at the width of a dialog, the column of a form plus its inset (`widths/dialog`), and shrinks with the screen. A width written by hand copies a value the theme no longer moves, and a narrower one breaks the form inside: at `max-w-md` (448px) the body of the window is under the `28rem` of `field-group`, so its short fields stack as on a phone.\n\n```html\n<!-- INCORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n <mds-banner slot=\"window\" class=\"max-w-md w-full mx-400\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n <fieldset class=\"field-group\">...</fieldset>\n </mds-banner>\n</mds-modal>\n\n<!-- CORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n <fieldset class=\"field-group\">...</fieldset>\n </mds-banner>\n</mds-modal>\n```\n\n#### Do Not Reach Into Shadow Parts to Style the Window\n\nThe only supported customization surface is the public `--mds-modal-*` CSS custom properties and the documented shadow parts (`dialog`, `window`, `action-close`). Targeting internal shadow selectors couples your code to implementation details that will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-modal >>> .window-content {\n padding: 0;\n}\nmds-modal::part(window) > div {\n border: 2px solid red;\n}\n\n/* CORRECT */\nmds-modal {\n --mds-modal-window-distance: calc(var(--spacing) * 400);\n}\n```\n\n#### Do Not Listen for Native `click` on the Backdrop to Close\n\n`mds-modal` emits `mdsModalClose` when it closes (and `mdsModalHide` when the animation finishes). Listening for a raw `click` on the host or backdrop is fragile - the event target varies by browser and shadow DOM boundary, and your handler ignores `interaction=\"strict\"`.\n\n```javascript\n// INCORRECT\ndocument.getElementById('modal').addEventListener('click', (e) => {\n if (e.target === e.currentTarget) modal.opened = undefined;\n});\n\n// CORRECT\ndocument.getElementById('modal').addEventListener('mdsModalClose', () => {\n modal.opened = undefined;\n});\n```\n\n#### Do Not Use `<dialog>` Directly When `<mds-modal>` Is Available\n\nUsing a raw `<dialog>` element bypasses the system's managed animation, body-scroll locking, touch-swipe dismissal, and design-token theming. Always use `<mds-modal>` for overlays in a Magma application.\n\n```html\n<!-- INCORRECT -->\n<dialog id=\"raw-dialog\">\n <p>Contenuto del dialogo</p>\n <button>Chiudi</button>\n</dialog>\n\n<!-- CORRECT -->\n<mds-modal id=\"modal\">\n <div class=\"p-400\">\n <mds-text>Contenuto del dialogo</mds-text>\n </div>\n</mds-modal>\n```\n"
|
|
21645
21831
|
},
|
|
@@ -21768,7 +21954,7 @@
|
|
|
21768
21954
|
"mutable": false,
|
|
21769
21955
|
"attr": "interaction",
|
|
21770
21956
|
"reflectToAttr": true,
|
|
21771
|
-
"docs": "Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.\nIf `strict` is selected only the close button can dismiss the component via UI.\nIf `relaxed` is selected the component can be dismissed also by
|
|
21957
|
+
"docs": "Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.\nIf `strict` is selected only the close button can dismiss the component via UI.\nIf `relaxed` is selected the component can be dismissed also by clicking the backdrop area: a click\npressed and released on the backdrop, once the window has finished its entry.",
|
|
21772
21958
|
"docsTags": [
|
|
21773
21959
|
{
|
|
21774
21960
|
"name": "default",
|
|
@@ -22157,8 +22343,8 @@
|
|
|
22157
22343
|
"mds-button"
|
|
22158
22344
|
],
|
|
22159
22345
|
"mds-button": [
|
|
22160
|
-
"mds-spinner",
|
|
22161
22346
|
"mds-icon",
|
|
22347
|
+
"mds-spinner",
|
|
22162
22348
|
"mds-text"
|
|
22163
22349
|
],
|
|
22164
22350
|
"mds-header": [
|
|
@@ -22390,8 +22576,8 @@
|
|
|
22390
22576
|
"mds-button"
|
|
22391
22577
|
],
|
|
22392
22578
|
"mds-button": [
|
|
22393
|
-
"mds-spinner",
|
|
22394
22579
|
"mds-icon",
|
|
22580
|
+
"mds-spinner",
|
|
22395
22581
|
"mds-text"
|
|
22396
22582
|
]
|
|
22397
22583
|
},
|
|
@@ -23340,8 +23526,8 @@
|
|
|
23340
23526
|
"mds-button"
|
|
23341
23527
|
],
|
|
23342
23528
|
"mds-button": [
|
|
23343
|
-
"mds-spinner",
|
|
23344
23529
|
"mds-icon",
|
|
23530
|
+
"mds-spinner",
|
|
23345
23531
|
"mds-text"
|
|
23346
23532
|
],
|
|
23347
23533
|
"mds-banner": [
|
|
@@ -23389,9 +23575,9 @@
|
|
|
23389
23575
|
}
|
|
23390
23576
|
],
|
|
23391
23577
|
"usage": {
|
|
23392
|
-
"1. Description": "The `<mds-pref>` web component is the accessibility-preferences panel of the Magma Design System: a compound parent that groups user-facing settings (animation, consumption, contrast, theme, language) so people can tune readability, motion, and language for their session. It acts as the coordinator for the `mds-pref-*` children slotted inside it.\n\n#### Semantic Behavior\n\n- **Compound parent**: Expects `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-mode`, `mds-pref-theme` and/or `mds-pref-language` children in its default slot; it owns no preference UI of its own beyond coordination (
|
|
23393
|
-
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Full Preferences Panel\n\nThe canonical form: slot every `mds-pref-*` control directly inside `<mds-pref>`.
|
|
23394
|
-
"3. Mistakes": "Common incorrect uses of `<mds-pref>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Place Non-Pref Children in the Default Slot\n\nThe default slot accepts only `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-language`, `mds-pref-mode` and `mds-pref-theme` children. Other elements are outside the documented content: they render as extra rows of the panel and take part in no coordination.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n <div class=\"custom-section\">Tema</div>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Use `mds-pref-*` Children Outside `<mds-pref>`\n\nEach control applies and stores its own preference, but the coordination between the controls of a panel lives in the parent:
|
|
23578
|
+
"1. Description": "The `<mds-pref>` web component is the accessibility-preferences panel of the Magma Design System: a compound parent that groups user-facing settings (animation, consumption, contrast, theme, language) so people can tune readability, motion, and language for their session. It acts as the coordinator for the `mds-pref-*` children slotted inside it.\n\n#### Semantic Behavior\n\n- **Compound parent**: Expects `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-mode`, `mds-pref-theme` and/or `mds-pref-language` children in its default slot; it owns no preference UI of its own beyond coordination (it forwards `size`, flags the document and asks for a reload). The lock of a single-mode theme on `mds-pref-mode` needs no parent: the mode control reads it from `<html>`.\n- **Size propagation**: `size` cascades down to every nested `mds-pref-*` child, on load, on every change and to the children added later; without a `size` on the panel each child keeps its own.\n- **Reload notice**: The panel shows an inline caption prompting the user to refresh the page when a preference that cannot apply live (`consumption` or `language`) changes after load. A `controller` panel, which is hidden, shows none.\n- **Document flag**: While at least one `<mds-pref>` is on the page, `<html>` carries `data-magma-pref`, which turns off the styles' fallback to the OS preferences; it is removed only when the last instance leaves the page, so a settings page that unmounts its own panel leaves the app controller in charge. Moving a panel in the DOM (between a sidebar and a menu, or with a client router that keeps it across pages) keeps the flag and the reload notice.\n- **Live language sync**: When a `language` change is emitted, the panel re-resolves its own locale so the reload notice is shown in the newly selected language.\n\n#### Properties & Visual Configurations\n\n`size` is one of the shared tab sizes and is forwarded to children rather than styling the host directly - set it on the parent and it reaches every child.\n\n#### Other behavioral props\n\n- **`controller`** switches the component from a visible on-DOM panel into a headless controller that applies and reacts to preferences without rendering UI; in this mode it drives document-level preference state without a visible panel.\n",
|
|
23579
|
+
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Full Preferences Panel\n\nThe canonical form: slot every `mds-pref-*` control directly inside `<mds-pref>`. No extra wiring is needed: the mode control follows the active theme by itself (a theme of one mode locks it to that mode).\n\n```html\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-theme>\n <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n </mds-pref-theme>\n <mds-pref-contrast></mds-pref-contrast>\n <mds-pref-animation></mds-pref-animation>\n <mds-pref-consumption></mds-pref-consumption>\n <mds-pref-language>\n <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n </mds-pref-language>\n</mds-pref>\n```\n\n#### Partial Panel - Subset of Controls\n\nSlot only the controls your application needs. `<mds-pref>` renders whatever children are present; omitted controls are simply absent.\n\n```html\n<!-- Accessibility-only panel: contrast and animation controls -->\n<mds-pref>\n <mds-pref-contrast></mds-pref-contrast>\n <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Controlling Size\n\nThe parent's `size` drives all child controls at once, on load and when it changes.\n\n```html\n<!-- Compact panel for a sidebar or popover -->\n<mds-pref size=\"sm\">\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-contrast></mds-pref-contrast>\n <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Headless Controller Mode\n\nSet the `controller` boolean attribute when you need the preference engine to apply saved preferences from `localStorage` on page load without rendering any visible UI. The host is hidden via CSS (`display: none`) and still activates all child preference controls.\n\n```html\n<!-- Place in <body>; the panel is invisible but activates stored preferences -->\n<mds-pref controller>\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-contrast></mds-pref-contrast>\n <mds-pref-animation></mds-pref-animation>\n <mds-pref-consumption></mds-pref-consumption>\n <mds-pref-language>\n <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n </mds-pref-language>\n</mds-pref>\n```\n\n#### Language Selector with Multiple Languages\n\n`<mds-pref-language>` requires its child `<mds-pref-language-item>` elements to be present; the items are not self-generating. Pass language codes supported by your application.\n\n```html\n<mds-pref>\n <mds-pref-language>\n <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n <mds-pref-language-item code=\"el\"></mds-pref-language-item>\n <mds-pref-language-item code=\"es\"></mds-pref-language-item>\n </mds-pref-language>\n</mds-pref>\n```\n\n#### Reload Notice Handling\n\n`<mds-pref>` shows an inline caption telling the user to refresh the page after a `consumption` or `language` change: nothing to wire. It shows for a change made after the panel loaded, so the stored choices the controls apply on load raise no notice; a `controller` panel is hidden and shows none.\n",
|
|
23580
|
+
"3. Mistakes": "Common incorrect uses of `<mds-pref>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Place Non-Pref Children in the Default Slot\n\nThe default slot accepts only `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-language`, `mds-pref-mode` and `mds-pref-theme` children. Other elements are outside the documented content: they render as extra rows of the panel and take part in no coordination.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n <div class=\"custom-section\">Tema</div>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Use `mds-pref-*` Children Outside `<mds-pref>`\n\nEach control applies and stores its own preference, but the coordination between the controls of a panel lives in the parent: only the parent forwards `size` changes and sets the `data-magma-pref` flag that turns off the fallback to the OS preferences. Group the controls of a panel in `<mds-pref>`.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode></mds-pref-mode>\n<mds-pref-theme>\n <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-theme>\n <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Set `controller=\"false\"` to Turn Off Controller Mode\n\n`controller` is a boolean attribute, and a false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime parses the string `\"false\"` as `false`, so the panel shows, but the attribute is still on the element until the first render, so `[controller]` attribute selectors (the one that hides the panel included) and any code that reads the attribute see it set. Remove the attribute entirely to switch back to visible mode.\n\n```html\n<!-- INCORRECT -->\n<mds-pref controller=\"false\">\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Listen for the Native `change` Event to Detect Preference Changes\n\nThe controls fire no native `change` event. Use the documented `mdsPrefChange` event emitted by each `mds-pref-*` child: it fires once per change, not on page load, and carries only the `preference` name in `detail`, so read the new value from the child.\n\n```html\n<!-- INCORRECT -->\n<script>\n document.querySelector('mds-pref').addEventListener('change', (e) => {\n console.log(e);\n });\n</script>\n\n<!-- CORRECT -->\n<script>\n document.querySelector('mds-pref-mode').addEventListener('mdsPrefChange', (e) => {\n console.log(e.detail.preference);\n });\n</script>\n```\n"
|
|
23395
23581
|
},
|
|
23396
23582
|
"props": [
|
|
23397
23583
|
{
|
|
@@ -23466,11 +23652,6 @@
|
|
|
23466
23652
|
"event": "mdsPrefChange",
|
|
23467
23653
|
"capture": false,
|
|
23468
23654
|
"passive": false
|
|
23469
|
-
},
|
|
23470
|
-
{
|
|
23471
|
-
"event": "mdsPrefThemeChange",
|
|
23472
|
-
"capture": false,
|
|
23473
|
-
"passive": false
|
|
23474
23655
|
}
|
|
23475
23656
|
],
|
|
23476
23657
|
"styles": [],
|
|
@@ -23637,8 +23818,8 @@
|
|
|
23637
23818
|
"mds-button"
|
|
23638
23819
|
],
|
|
23639
23820
|
"mds-button": [
|
|
23640
|
-
"mds-spinner",
|
|
23641
23821
|
"mds-icon",
|
|
23822
|
+
"mds-spinner",
|
|
23642
23823
|
"mds-text"
|
|
23643
23824
|
]
|
|
23644
23825
|
},
|
|
@@ -23788,8 +23969,8 @@
|
|
|
23788
23969
|
"mds-button"
|
|
23789
23970
|
],
|
|
23790
23971
|
"mds-button": [
|
|
23791
|
-
"mds-spinner",
|
|
23792
23972
|
"mds-icon",
|
|
23973
|
+
"mds-spinner",
|
|
23793
23974
|
"mds-text"
|
|
23794
23975
|
]
|
|
23795
23976
|
},
|
|
@@ -23939,8 +24120,8 @@
|
|
|
23939
24120
|
"mds-button"
|
|
23940
24121
|
],
|
|
23941
24122
|
"mds-button": [
|
|
23942
|
-
"mds-spinner",
|
|
23943
24123
|
"mds-icon",
|
|
24124
|
+
"mds-spinner",
|
|
23944
24125
|
"mds-text"
|
|
23945
24126
|
]
|
|
23946
24127
|
},
|
|
@@ -24119,8 +24300,8 @@
|
|
|
24119
24300
|
"mds-button"
|
|
24120
24301
|
],
|
|
24121
24302
|
"mds-button": [
|
|
24122
|
-
"mds-spinner",
|
|
24123
24303
|
"mds-icon",
|
|
24304
|
+
"mds-spinner",
|
|
24124
24305
|
"mds-text"
|
|
24125
24306
|
]
|
|
24126
24307
|
},
|
|
@@ -24243,8 +24424,8 @@
|
|
|
24243
24424
|
"mds-button"
|
|
24244
24425
|
],
|
|
24245
24426
|
"mds-button": [
|
|
24246
|
-
"mds-spinner",
|
|
24247
24427
|
"mds-icon",
|
|
24428
|
+
"mds-spinner",
|
|
24248
24429
|
"mds-text"
|
|
24249
24430
|
]
|
|
24250
24431
|
},
|
|
@@ -24263,9 +24444,9 @@
|
|
|
24263
24444
|
}
|
|
24264
24445
|
],
|
|
24265
24446
|
"usage": {
|
|
24266
|
-
"1. Description": "The `<mds-pref-mode>` web component is the mode preference control of the Magma Design System, usually a direct child of the [`<mds-pref>`](../mds-pref/AGENTS.md) panel. It renders a labelled three-way tab (light / system / dark) that lets the user pick a color-scheme mode and applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the mode by itself. What it gives up on its own is in its mistakes.\n- **Selection follows `mode`**: The active tab reflects whichever mode is currently applied, driven by the `mode` prop.\n- **Global mode application**: Selecting a mode applies it document-wide and persists the choice.\n- **Persistence on load**: The applied mode resolves from `mode` -> the stored value -> the `system` default, so a previously chosen mode is restored without an explicit prop.\n- **`mdsPrefChange` event**: Emits `mdsPrefChange` with `{ preference: 'mode' }` once per change, after the new mode is applied; a pick of the mode already active and the first application on load do not emit it. It bubbles up to `<mds-pref>`; a mode change needs no reload, so it raises no reload notice.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied mode: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-mode-*` class written on `<html>` by other code is mirrored the same way.\n- **System mode**: The `system` choice follows the OS `prefers-color-scheme` media query to resolve the effective light/dark scheme.\n\n#### Properties & Visual Configurations\n\n- **`mode`**: Sets and reflects the active mode (`light`, `dark`, `system`). Leave it unset to inherit the persisted/default mode; set it explicitly to force a starting mode.\n- **`transition`**: Controls the visual switch between schemes. Use `smooth` (default) for a fading neutral overlay that flips the mode mid-fade, `flash` for an instant switch with a brief overlay pulse, or `none` to apply the new mode with no overlay animation. The overlay timing and z-index are tunable through `--mds-pref-mode-overlay-*` CSS custom properties.\n- **`size`**: Sizes the nested tab items (`sm` / `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n",
|
|
24447
|
+
"1. Description": "The `<mds-pref-mode>` web component is the mode preference control of the Magma Design System, usually a direct child of the [`<mds-pref>`](../mds-pref/AGENTS.md) panel. It renders a labelled three-way tab (light / system / dark) that lets the user pick a color-scheme mode and applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the mode by itself. What it gives up on its own is in its mistakes.\n- **Selection follows `mode`**: The active tab reflects whichever mode is currently applied, driven by the `mode` prop.\n- **Global mode application**: Selecting a mode applies it document-wide and persists the choice.\n- **Persistence on load**: The applied mode resolves from `mode` -> the stored value -> the `system` default, so a previously chosen mode is restored without an explicit prop.\n- **`mdsPrefChange` event**: Emits `mdsPrefChange` with `{ preference: 'mode' }` once per change, after the new mode is applied; a pick of the mode already active and the first application on load do not emit it. It bubbles up to `<mds-pref>`; a mode change needs no reload, so it raises no reload notice.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied mode: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-mode-*` class written on `<html>` by other code is mirrored the same way.\n- **System mode**: The `system` choice follows the OS `prefers-color-scheme` media query to resolve the effective light/dark scheme.\n- **Theme lock**: Under a theme that can be used in one mode only (`pref-theme-scheme-light` or `-dark` on `<html>`, written by `mds-pref-theme` from the mode the theme declares), the control shows that mode selected and disables the other two items: the page is in that mode whatever was picked. The stored choice is left alone and comes back with a theme of both modes.\n\n#### Properties & Visual Configurations\n\n- **`mode`**: Sets and reflects the active mode (`light`, `dark`, `system`). Leave it unset to inherit the persisted/default mode; set it explicitly to force a starting mode.\n- **`transition`**: Controls the visual switch between schemes. Use `smooth` (default) for a fading neutral overlay that flips the mode mid-fade, `flash` for an instant switch with a brief overlay pulse, or `none` to apply the new mode with no overlay animation. The overlay timing and z-index are tunable through `--mds-pref-mode-overlay-*` CSS custom properties.\n- **`size`**: Sizes the nested tab items (`sm` / `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n",
|
|
24267
24448
|
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref-mode>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared preference system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Default Usage Inside `mds-pref`\n\nThe canonical form. Slot `<mds-pref-mode>` as a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md) with no extra props. The component restores the user's previously persisted mode automatically on load.\n\n```html\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Setting an Initial Mode\n\nPass `mode` to force the selector to start on a specific mode rather than reading from `localStorage`. Useful when the host application controls preference state centrally. The forced mode is also written to `localStorage` on every load, replacing the user's last choice.\n\n```html\n<mds-pref>\n <mds-pref-mode mode=\"dark\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Using `system` Mode for OS-Aware Default\n\n`mode=\"system\"` resolves to light or dark based on the OS `prefers-color-scheme` media query. Use this as the explicit starting point when you want the app to follow the OS without the user having to choose.\n\n```html\n<mds-pref>\n <mds-pref-mode mode=\"system\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Choosing a Transition Style\n\n`transition` controls the visual effect when switching between schemes. Use `smooth` (default) for a mid-fade overlay that hides the color flip, `flash` for an instant switch with a brief full-screen pulse, or `none` for a hard switch with no animation.\n\n```html\n<!-- Smooth fade (default) -->\n<mds-pref-mode transition=\"smooth\"></mds-pref-mode>\n\n<!-- Instant flash pulse -->\n<mds-pref-mode transition=\"flash\"></mds-pref-mode>\n\n<!-- No animation -->\n<mds-pref-mode transition=\"none\"></mds-pref-mode>\n```\n\n#### Listening for Mode Changes\n\nThe component emits `mdsPrefChange` with `{ preference: 'mode' }` once per change, after the new mode is applied, and not on page load; another instance that mirrors the pick does not emit it. Listen for this event to react in application code - for example to sync a preference state store - and read the current value from the `mode` prop.\n\n```html\n<mds-pref>\n <mds-pref-mode id=\"mode-selector\"></mds-pref-mode>\n</mds-pref>\n\n<script>\n document.getElementById('mode-selector').addEventListener('mdsPrefChange', (e) => {\n console.log('Modalita tema cambiata:', e.detail.preference);\n });\n</script>\n```\n\n#### Controlling Size via the Parent\n\n`size` is forwarded to the internal tab items. [`<mds-pref>`](../mds-pref/AGENTS.md) forwards its own `size` to every `mds-pref-*` child, on load and when it changes: set it on the parent to keep the panel at one tab size.\n\n```html\n<mds-pref size=\"sm\">\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n```\n\n#### Customizing the Transition Overlay\n\nTune the overlay stacking order via the public `--mds-pref-mode-overlay-z-index` CSS custom property, when the page has layers above the default one; the overlay timing is set by the component. Set it on the host or a parent selector.\n\n```css\nmds-pref-mode {\n --mds-pref-mode-overlay-z-index: 9000;\n}\n```\n",
|
|
24268
|
-
"3. Mistakes": "Common incorrect uses of `<mds-pref-mode>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use `<mds-pref-mode>` Outside `<mds-pref>`\n\n`<mds-pref-mode>` is a compound child: `<mds-pref>` forwards `size` changes to it
|
|
24449
|
+
"3. Mistakes": "Common incorrect uses of `<mds-pref-mode>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use `<mds-pref-mode>` Outside `<mds-pref>`\n\n`<mds-pref-mode>` is a compound child: `<mds-pref>` forwards `size` changes to it. As a standalone widget it still applies and persists the mode, and it still follows a theme of one mode, which it reads from `<html>`; only the forwarding of `size` is lost.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode></mds-pref-mode>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Set `transition=\"false\"` to Disable the Overlay\n\n`transition` is a string enum, not a boolean. `\"false\"` is not a valid value: it only happens to fall through to the no-overlay branch, with no guarantee across releases. Use `transition=\"none\"` to opt out of the overlay animation.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode transition=\"false\"></mds-pref-mode>\n\n<!-- CORRECT -->\n<mds-pref-mode transition=\"none\"></mds-pref-mode>\n```\n\n#### Do Not Listen for Native `change` Events Instead of `mdsPrefChange`\n\nThe component does not emit or bubble native `change` events out of the shadow DOM. Always listen for the documented `mdsPrefChange` custom event.\n\n```html\n<!-- INCORRECT -->\n<script>\n document.querySelector('mds-pref-mode').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n document.querySelector('mds-pref-mode').addEventListener('mdsPrefChange', handler);\n</script>\n```\n\n#### Do Not Override Mode Classes on `<html>` Directly\n\nThe component manages `pref-mode-light`, `pref-mode-dark`, and `pref-mode-system` classes on `<html>` itself. Adding or removing these by hand races with the component and will be overwritten on the next mode change. Drive the mode exclusively through the `mode` prop.\n\n```html\n<!-- INCORRECT -->\n<script>\n document.documentElement.classList.add('pref-mode-dark');\n</script>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-mode mode=\"dark\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Size Only One Child of the Panel\n\nSetting `size` on `<mds-pref-mode>` alone when siblings exist produces inconsistent tab sizes across the panel. Set it on `<mds-pref>`, which forwards it to every preference child, on load and when it changes.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n <mds-pref-mode size=\"sm\"></mds-pref-mode>\n <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref size=\"sm\">\n <mds-pref-mode></mds-pref-mode>\n <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n```\n\n#### Do Not Target the Injected Overlay to Customize It\n\nThe overlay element is injected into `document.body` at runtime with inline styles, which win over a class selector anyway. Do not target it by class name or adjust its properties through JavaScript. Use the public `--mds-pref-mode-overlay-z-index` CSS custom property instead.\n\n```css\n/* INCORRECT */\n.mds-pref-mode-overlay {\n background-color: black;\n z-index: 99999;\n}\n\n/* CORRECT */\nmds-pref-mode {\n --mds-pref-mode-overlay-z-index: 9000;\n}\n```\n"
|
|
24269
24450
|
},
|
|
24270
24451
|
"props": [
|
|
24271
24452
|
{
|
|
@@ -24286,7 +24467,7 @@
|
|
|
24286
24467
|
"mutable": false,
|
|
24287
24468
|
"attr": "locked-scheme",
|
|
24288
24469
|
"reflectToAttr": true,
|
|
24289
|
-
"docs": "Locks the mode
|
|
24470
|
+
"docs": "Locks the mode choice to one mode, `light` or `dark`: the control shows that mode\nselected and disables the other two items, without touching the stored preference,\nwhich comes back when the lock goes. `all` locks nothing. Unset, the control follows\nthe active theme: a theme that can be used in one mode only (`pref-theme-scheme-light`\nor `-dark` on `<html>`, written by `mds-pref-theme` from the mode the theme declares,\n#1274) locks it the same way. Not meant to be set directly.",
|
|
24290
24471
|
"docsTags": [],
|
|
24291
24472
|
"values": [
|
|
24292
24473
|
{
|
|
@@ -24500,8 +24681,8 @@
|
|
|
24500
24681
|
"mds-button"
|
|
24501
24682
|
],
|
|
24502
24683
|
"mds-button": [
|
|
24503
|
-
"mds-spinner",
|
|
24504
24684
|
"mds-icon",
|
|
24685
|
+
"mds-spinner",
|
|
24505
24686
|
"mds-text"
|
|
24506
24687
|
]
|
|
24507
24688
|
},
|
|
@@ -24524,9 +24705,9 @@
|
|
|
24524
24705
|
}
|
|
24525
24706
|
],
|
|
24526
24707
|
"usage": {
|
|
24527
|
-
"1. Description": "The `<mds-pref-theme>` web component is the theme-switcher segment of the Magma accessibility preferences panel, usually a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md). It renders a labelled tab trigger that opens a dropdown of selectable named themes and, when a theme is chosen, applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the theme by itself. What it gives up on its own is in its mistakes.\n- **Acts as a sub-parent itself**: Its own default slot must contain one or more `mds-pref-theme-item` elements; it drives their selected state so only the active theme is marked selected.\n- **Global theme application**: Selecting an item applies the theme document-wide: it writes `data-theme-name` and the `pref-theme-scheme-*` class on `<html>`.\n- **Persistence and hydration**: The current name, scheme and corner shape are persisted and restored across reloads: a stored value outranks the matching prop.\n- **Validation**: An invalid theme name (not lowercase kebab-case matching `^[a-z]+(-[a-z]+)*$`) is ignored with a console warning when the theme is applied: nothing is written on `<html>` or stored. So are the reserved names `light`, `dark` and `system` (they are mode values) and `scheme` or `scheme-*` (they would collide with the `pref-theme-scheme-*` classes), a `scheme` other than `light`, `dark` or `all`, and a `corner-shape` outside its keywords. A stored value the component cannot apply is dropped, and the prop is used instead.\n- **Events bubbled up**: Emits `mdsPrefThemeChange` with the `{ name, scheme }` detail on each pick,
|
|
24528
|
-
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme>` component, ordered from most common to most specialized. The examples assume a working knowledge of the preferences system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Theme Chooser\n\nThe canonical form. Place `<mds-pref-theme>` inside [`<mds-pref>`](../mds-pref/AGENTS.md) and populate its default slot with one [`<mds-pref-theme-item>`](../mds-pref-theme-item/AGENTS.md) per available theme. The item whose `name` matches the active theme (the stored choice, or the parent's `name` on a first visit) starts as selected. The named themes are `
|
|
24529
|
-
"3. Mistakes": "Common incorrect uses of `<mds-pref-theme>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind colour utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Component Outside `<mds-pref>`\n\n`<mds-pref-theme>` is a compound sub-part designed to slot inside [`<mds-pref>`](../mds-pref/AGENTS.md). As a standalone widget it still applies and persists the theme, but it leaves the panel: `<mds-pref>` can no longer forward `size` changes to it
|
|
24708
|
+
"1. Description": "The `<mds-pref-theme>` web component is the theme-switcher segment of the Magma accessibility preferences panel, usually a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md). It renders a labelled tab trigger that opens a dropdown of selectable named themes and, when a theme is chosen, applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the theme by itself. What it gives up on its own is in its mistakes.\n- **Acts as a sub-parent itself**: Its own default slot must contain one or more `mds-pref-theme-item` elements; it drives their selected state so only the active theme is marked selected.\n- **Global theme application**: Selecting an item applies the theme document-wide: it writes `data-theme-name` and the `pref-theme-scheme-*` class on `<html>`.\n- **The theme's own mode**: A theme file can list the colour modes it can be used in (`color.modes`); a theme of one mode declares it in its block of `themes.css`, and the component applies the theme in that mode (`pref-theme-scheme-dark` or `-light`) whatever the item's `scheme` says. The stylesheet of the theme must be on the page when the theme is applied. The storage keeps the item's `scheme`.\n- **Persistence and hydration**: The current name, scheme and corner shape are persisted and restored across reloads: a stored value outranks the matching prop.\n- **Validation**: An invalid theme name (not lowercase kebab-case matching `^[a-z]+(-[a-z]+)*$`) is ignored with a console warning when the theme is applied: nothing is written on `<html>` or stored. So are the reserved names `light`, `dark` and `system` (they are mode values) and `scheme` or `scheme-*` (they would collide with the `pref-theme-scheme-*` classes), a `scheme` other than `light`, `dark` or `all`, and a `corner-shape` outside its keywords. A stored value the component cannot apply is dropped, and the prop is used instead.\n- **Events bubbled up**: Emits `mdsPrefThemeChange` with the `{ name, scheme }` detail on each pick, `scheme` being the one the theme is applied with (the theme's own mode, when it declares one). `<mds-pref-mode>` follows the scheme from `<html>`, with no listener. It also emits `mdsPrefChange` once per change, after applying it: `preference: 'theme'` for a new name or scheme, `'corner-shape'` for a new corner shape. The first application on load and a re-render that changes nothing do not emit it.\n- **Props set after load**: A `name`, `scheme` or `cornerShape` set from a script after load is stored and applied, as a pick is: the stored value outranks the prop only on load. A value the component would not apply is not stored.\n- **Localized label**: The \"Theme\" heading follows the active interface language.\n- **Trigger text**: The closed control shows the `label` of the item for the active theme, the same text the open list shows (localize the items, the trigger follows); when no item matches the active theme it shows the label derived from the name (`dark-blue` -> \"Dark blue\").\n\n#### Properties & Visual Configurations\n\n- **`name`**: The active theme name; it is overridden at runtime by any persisted value. Use it to declare the initial theme when no preference has been stored yet. The named themes are `business`, the base theme, and `editorial` ([`agents/theming.md`](../../../../agents/theming.md)). The default `'default'` is the old name of `business`, kept until the next major, when the default becomes `'business'`: the two names stand for the same theme, so with `name` left out the item `business` is the one marked, and an item named `default` is marked under `business`. `cool` and `warm` are deprecated.\n- **`scheme`**: Constrains the colour modes of the theme to `'light'`, `'dark'`, or `'all'` (default). Pick `'all'` for themes that ship both light and dark palettes; pick `'light'` or `'dark'` to force a single mode for a theme offered in one mode only. A theme that declares its own mode (`color.modes` in its file) needs no `scheme`: its declaration wins.\n- **`size`**: Sets the size (`'sm'` / `'md'`) of the nested tab UI. Inside `<mds-pref>`, set it on the parent: it reaches every `mds-pref-*` segment on load and when it changes, and overwrites the segment's own.\n- **`cornerShape`** (attribute `corner-shape`): The corner geometry of the whole page - `round`, `squircle`, `bevel`, `notch`, `scoop`, `square`, or `default`. It writes `data-corner-shape` on `<html>` and is persisted like the theme; `default` removes the attribute, and leaving the prop unset touches nothing ([`agents/theming.md`](../../../../agents/theming.md)).\n",
|
|
24709
|
+
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme>` component, ordered from most common to most specialized. The examples assume a working knowledge of the preferences system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Theme Chooser\n\nThe canonical form. Place `<mds-pref-theme>` inside [`<mds-pref>`](../mds-pref/AGENTS.md) and populate its default slot with one [`<mds-pref-theme-item>`](../mds-pref-theme-item/AGENTS.md) per available theme. The item whose `name` matches the active theme (the stored choice, or the parent's `name` on a first visit) starts as selected. The named themes are `business`, the base theme of the management software, and `editorial`, the theme of the publishing side.\n\n```html\n<mds-pref>\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Scheme-Constrained Themes\n\nA theme made for one colour mode says so in its file (`\"modes\": [\"dark\"]` in `color`), and the component applies it in that mode with no attribute on the item. For a theme whose file says nothing, use `scheme=\"light\"` or `scheme=\"dark\"` on a `<mds-pref-theme-item>`. Either way the component writes the scheme on `<html>` and forces that mode even if the user's OS or mode preference asks for the opposite, and `<mds-pref-mode>` shows that mode with its other items locked.\n\n```html\n<mds-pref>\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <!-- light only - dark mode will not activate with this item -->\n <mds-pref-theme-item label=\"Editoriale chiaro\" name=\"editorial\" scheme=\"light\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Listening for the Change Event\n\nReact to the user's selection via `mdsPrefThemeChange`. The event detail carries `{ name, scheme }` - use them to update any app-level state that tracks the active theme.\n\n```html\n<mds-pref>\n <mds-pref-theme id=\"theme-chooser\" name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n\n<script>\n document.querySelector('#theme-chooser').addEventListener('mdsPrefThemeChange', (e) => {\n console.log('Tema attivo:', e.detail.name, '- Schema:', e.detail.scheme);\n });\n</script>\n```\n\n#### Declaring the Initial Theme\n\nUse the `name` prop to declare which theme should be active before the user makes a selection. If `localStorage` already holds a persisted value it takes precedence; otherwise the component applies `name` on first render.\n\n```html\n<mds-pref>\n <!-- First-visit default is \"editorial\" -->\n <mds-pref-theme name=\"editorial\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Controlling Item Size\n\nPass `size=\"sm\"` when the preferences panel must fit a compact layout: on `<mds-pref>`, which forwards it to every preference control.\n\n```html\n<mds-pref size=\"sm\">\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Styling Theme Items\n\nStyle theme items only through their public `--mds-pref-theme-item-*` CSS custom properties. Set them on the item host or on a parent selector; name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so the colours follow the mode, the theme and the contrast preference.\n\n```css\nmds-pref-theme-item {\n --mds-pref-theme-item-color-background: rgb(var(--magma-surface-inverse));\n}\n```\n",
|
|
24710
|
+
"3. Mistakes": "Common incorrect uses of `<mds-pref-theme>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind colour utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Component Outside `<mds-pref>`\n\n`<mds-pref-theme>` is a compound sub-part designed to slot inside [`<mds-pref>`](../mds-pref/AGENTS.md). As a standalone widget it still applies and persists the theme, but it leaves the panel: `<mds-pref>` can no longer forward `size` changes to it. The lock of a single-mode theme on `<mds-pref-mode>` holds either way.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Put Plain Text or Arbitrary HTML in the Default Slot\n\nThe default slot is reserved exclusively for `<mds-pref-theme-item>` elements. Any other content bypasses the component's internal selection management and will not trigger theme application.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <button>Gestionale</button>\n <span>Editoriale</span>\n </mds-pref-theme>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Use an Invalid Theme Name\n\nThe `name` prop must match the pattern `^[a-z]+(-[a-z]+)*$` (lowercase letters and hyphens only). Any other value - including uppercase, underscores, or spaces - is ignored with a console warning when the component tries to apply the theme on `<html>`: the theme is neither applied nor stored.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme name=\"My Theme\" scheme=\"all\">...</mds-pref-theme>\n<mds-pref-theme name=\"my_theme\" scheme=\"all\">...</mds-pref-theme>\n<mds-pref-theme name=\"MyTheme\" scheme=\"all\">...</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref-theme name=\"editorial\" scheme=\"all\">...</mds-pref-theme>\n```\n\n#### Do Not Listen for the Native `change` Event\n\n`<mds-pref-theme>` emits `mdsPrefThemeChange` - a documented custom event with a typed `{ name, scheme }` detail. Listening for the native `change` event will not fire because theme selection is handled entirely inside shadow DOM.\n\n```html\n<!-- INCORRECT -->\n<script>\n document.querySelector('mds-pref-theme').addEventListener('change', (e) => {\n console.log(e.target.value); // undefined - wrong event, wrong detail shape\n });\n</script>\n\n<!-- CORRECT -->\n<script>\n document.querySelector('mds-pref-theme').addEventListener('mdsPrefThemeChange', (e) => {\n console.log(e.detail.name, e.detail.scheme);\n });\n</script>\n```\n\n#### Do Not Give the Parent and the Child Different Sizes\n\n`<mds-pref>` forwards its own `size` to all `mds-pref-*` children, on load and when it changes, and overwrites theirs: a `size` on `<mds-pref-theme>` that differs from the parent's is never shown. Set the size on the parent only.\n\n```html\n<!-- INCORRECT -->\n<mds-pref size=\"sm\">\n <mds-pref-theme size=\"md\" name=\"default\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref size=\"sm\">\n <mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n </mds-pref-theme>\n</mds-pref>\n```\n"
|
|
24530
24711
|
},
|
|
24531
24712
|
"props": [
|
|
24532
24713
|
{
|
|
@@ -24638,7 +24819,7 @@
|
|
|
24638
24819
|
"mutable": true,
|
|
24639
24820
|
"attr": "scheme",
|
|
24640
24821
|
"reflectToAttr": true,
|
|
24641
|
-
"docs": "Specifies the theme scheme which can be 'light', 'dark' or 'all'\nDefault is 'all' which means this theme supporto both light and dark.\nIf you set 'light' means this theme support only light mode and will be forced and shown light colors mode only.",
|
|
24822
|
+
"docs": "Specifies the theme scheme which can be 'light', 'dark' or 'all'\nDefault is 'all' which means this theme supporto both light and dark.\nIf you set 'light' means this theme support only light mode and will be forced and shown light colors mode only.\nA theme whose stylesheet declares one mode (`--magma-color-modes`, from `color.modes` of its\nfile) is applied in that mode whatever this says: the theme's own lock wins.",
|
|
24642
24823
|
"docsTags": [
|
|
24643
24824
|
{
|
|
24644
24825
|
"name": "default",
|
|
@@ -24745,7 +24926,7 @@
|
|
|
24745
24926
|
},
|
|
24746
24927
|
"cancelable": true,
|
|
24747
24928
|
"composed": true,
|
|
24748
|
-
"docs": "Emits when the component changes the language selected from the click event of the dropdown list item",
|
|
24929
|
+
"docs": "Emits when the component changes the language selected from the click event of the dropdown list item.\nIts `scheme` is the one the theme is applied with: the mode the theme declares, when it\ndeclares one, or else the scheme of the item.",
|
|
24749
24930
|
"docsTags": []
|
|
24750
24931
|
}
|
|
24751
24932
|
],
|
|
@@ -24783,8 +24964,8 @@
|
|
|
24783
24964
|
"mds-button"
|
|
24784
24965
|
],
|
|
24785
24966
|
"mds-button": [
|
|
24786
|
-
"mds-spinner",
|
|
24787
24967
|
"mds-icon",
|
|
24968
|
+
"mds-spinner",
|
|
24788
24969
|
"mds-text"
|
|
24789
24970
|
]
|
|
24790
24971
|
},
|
|
@@ -24803,9 +24984,9 @@
|
|
|
24803
24984
|
}
|
|
24804
24985
|
],
|
|
24805
24986
|
"usage": {
|
|
24806
|
-
"1. Description": "The `<mds-pref-theme-item>` web component is a single selectable theme entry inside the [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md) preference picker. It renders as a borderless button that pairs a color-swatch preview of the theme with its label.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-pref-theme>`; it is not used standalone or mixed with other child component types.\n- **Selection is parent-driven**: On click each item emits `mdsPrefThemeItemSelect` (carrying `{ name, scheme }`), and the parent responds by clearing the siblings and selecting the clicked one. Setting `selected` directly on a single item does not coordinate the others.\n- **Click bubbles up**: The emitted event is what the parent listens to in order to apply the theme to the document and persist the choice.\n- **Auto-derived label**: If `label` is omitted, it is generated from `name` by capitalizing the first letter and replacing hyphens with spaces (e.g. `maggioli-editore` becomes `Maggioli editore`).\n- **
|
|
24807
|
-
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Usage Inside the Parent\n\n`<mds-pref-theme-item>` must always be a direct child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Each item represents one selectable colour theme; the parent manages selection state so all siblings stay in sync.\n\n```html\n<mds-pref-theme name=\"
|
|
24808
|
-
"3. Mistakes": "Common incorrect uses of `<mds-pref-theme-item>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Item Outside Its Parent\n\n`<mds-pref-theme-item>` is a compound child that must be a direct slot child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Used standalone it emits selection events that are never handled, and it never receives coordinated deselection of siblings.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme-item name=\"
|
|
24987
|
+
"1. Description": "The `<mds-pref-theme-item>` web component is a single selectable theme entry inside the [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md) preference picker. It renders as a borderless button that pairs a color-swatch preview of the theme with its label.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-pref-theme>`; it is not used standalone or mixed with other child component types.\n- **Selection is parent-driven**: On click each item emits `mdsPrefThemeItemSelect` (carrying `{ name, scheme }`), and the parent responds by clearing the siblings and selecting the clicked one. Setting `selected` directly on a single item does not coordinate the others.\n- **Click bubbles up**: The emitted event is what the parent listens to in order to apply the theme to the document and persist the choice.\n- **Auto-derived label**: If `label` is omitted, it is generated from `name` by capitalizing the first letter and replacing hyphens with spaces (e.g. `maggioli-editore` becomes `Maggioli editore`).\n- **Preview of the theme it names**: The preview background and the primary dot show the wash and the accent of the theme named by `name`, which the styles of that theme publish as `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent` (`themes.css` does for every theme Magma ships), so each item of the picker shows its own theme whatever the active one. The success, warning and error dots are the page's status emphases, which no theme retints. A theme that publishes no preview shows the active theme. The `--mds-pref-theme-item-*` CSS custom properties paint all of it and still override it.\n\n#### Properties & Visual Configurations\n\n- **`name`**: The theme identifier reported to the parent and matched against the parent's active `name` to compute initial selection. Use a simple or kebab-case string; the named themes are `business`, the base theme, and `editorial` ([`agents/theming.md`](../../../../agents/theming.md)). `default`, `cool` and `warm` still work and are deprecated: they leave at the next major. The parent validates the lowercase/kebab format and ignores an invalid name with a console warning.\n- **`scheme`**: Declares which color schemes the theme supports - `all` (default, both light and dark), or `light` / `dark` to force a single mode. This value travels with the selection event and is applied by the parent when the item is chosen, unless the theme declares its own mode in its stylesheet (`color.modes` of its file), which wins.\n- **`selected`**: Reflects whether this item is the active theme. The parent sets it on every item when it loads and on each pick, so a value set by hand is overwritten.\n",
|
|
24988
|
+
"2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Usage Inside the Parent\n\n`<mds-pref-theme-item>` must always be a direct child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Each item represents one selectable colour theme; the parent manages selection state so all siblings stay in sync.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Auto-Derived Label\n\nOmit `label` and let the component generate it from `name`: the first letter is capitalised and hyphens are replaced with spaces. Use this shorthand when the theme name is already human-readable.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <!-- renders \"Business\" and \"Editorial\" without explicit label props -->\n <mds-pref-theme-item name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Scheme-Specific Themes\n\nSet `scheme` to `\"light\"` or `\"dark\"` when a theme must be offered in a single colour mode only. The parent applies the forced mode when the item is selected.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <!-- this theme works in both modes -->\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n\n <!-- offered light-only; selecting it locks the UI in light mode -->\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale chiaro\" scheme=\"light\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Listening to the Selection Event\n\nAttach a listener for `mdsPrefThemeItemSelect` when you need to react to a selection at the item level - for example to log analytics. The detail carries `{ name, scheme }`. Normally the parent handles theme application automatically; only listen at this level for side-effects.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<script>\n document.querySelectorAll('mds-pref-theme-item').forEach((item) => {\n item.addEventListener('mdsPrefThemeItemSelect', (e) => {\n console.log('Tema selezionato:', e.detail.name, 'schema:', e.detail.scheme);\n });\n });\n</script>\n```\n\n#### Setting the Initially Selected Item\n\nDeclare it on the parent, not with `selected`: when it loads, `<mds-pref-theme>` marks the item whose `name` matches the active theme (the stored choice, or its own `name` on a first visit) and overwrites any `selected` written in the markup.\n\n```html\n<mds-pref-theme name=\"editorial\" scheme=\"all\">\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### CSS Customization via Documented Properties\n\nOverride the swatch only through the public `--mds-pref-theme-item-color-background` CSS custom property, the background behind the preview dots; the dots themselves are painted by the component. Set it on the host element or a parent selector and name a semantic role for the colour value, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so mode, theme and contrast keep working. It replaces the preview of the theme the item names.\n\n```css\n/* override the swatch background of one theme item */\nmds-pref-theme-item[name=\"editorial\"] {\n --mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));\n}\n```\n",
|
|
24989
|
+
"3. Mistakes": "Common incorrect uses of `<mds-pref-theme-item>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Item Outside Its Parent\n\n`<mds-pref-theme-item>` is a compound child that must be a direct slot child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Used standalone it emits selection events that are never handled, and it never receives coordinated deselection of siblings.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n\n<!-- CORRECT -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Do Not Set `selected` Manually to Coordinate Multi-Item State\n\nSetting `selected` on one item does not deselect the others - the parent is the only actor that can coordinate the whole group. When it loads it marks only the item matching the active theme, overwriting the `selected` in the markup; a value set later from script leaves several items marked. Drive initial selection through the parent's `name` prop or by letting the user click.\n\n```html\n<!-- INCORRECT - the parent overwrites both on load and marks \"default\" -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\" selected></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT - set the active theme on the parent; it marks the matching child -->\n<mds-pref-theme name=\"editorial\" scheme=\"all\">\n <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Do Not Listen for Native `click` Instead of the Component Event\n\nA raw `click` carries no `detail`: you have to read `name` back from the element, and you lose the `scheme`. Listen for the documented `mdsPrefThemeItemSelect` event instead, whose detail carries `{ name, scheme }`.\n\n```html\n<!-- INCORRECT -->\n<script>\n document.querySelector('mds-pref-theme-item').addEventListener('click', (e) => {\n applyTheme(e.target.getAttribute('name'));\n });\n</script>\n\n<!-- CORRECT -->\n<script>\n document.querySelector('mds-pref-theme-item').addEventListener('mdsPrefThemeItemSelect', (e) => {\n applyTheme(e.detail.name);\n });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Inner Button\n\nThe supported customization surface is the public `--mds-pref-theme-item-color-background` CSS custom property. Targeting internal selectors or `::part()` names not present in this component's public API couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-pref-theme-item >>> mds-button {\n font-weight: bold;\n}\nmds-pref-theme-item .theme-preview {\n border: 2px solid red;\n}\n\n/* CORRECT */\nmds-pref-theme-item[name=\"editorial\"] {\n --mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));\n}\n```\n\n#### Do Not Use an Invalid `scheme` Value\n\n`scheme` only accepts `\"all\"`, `\"light\"`, or `\"dark\"`. Other strings are ignored by the parent with a console warning: picking the item applies and stores nothing, so the theme does not change at all.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme-item name=\"editorial\" scheme=\"light-only\"></mds-pref-theme-item>\n<mds-pref-theme-item name=\"business\" scheme=\"night\"></mds-pref-theme-item>\n\n<!-- CORRECT -->\n<mds-pref-theme-item name=\"editorial\" scheme=\"light\"></mds-pref-theme-item>\n<mds-pref-theme-item name=\"business\" scheme=\"dark\"></mds-pref-theme-item>\n```\n"
|
|
24809
24990
|
},
|
|
24810
24991
|
"props": [
|
|
24811
24992
|
{
|
|
@@ -24845,11 +25026,11 @@
|
|
|
24845
25026
|
"mutable": false,
|
|
24846
25027
|
"attr": "name",
|
|
24847
25028
|
"reflectToAttr": true,
|
|
24848
|
-
"docs": "Specifies the theme name",
|
|
25029
|
+
"docs": "Specifies the theme name; the swatch shows the preview that theme publishes,\n`--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`",
|
|
24849
25030
|
"docsTags": [
|
|
24850
25031
|
{
|
|
24851
25032
|
"name": "example",
|
|
24852
|
-
"text": "'
|
|
25033
|
+
"text": "'editorial'"
|
|
24853
25034
|
},
|
|
24854
25035
|
{
|
|
24855
25036
|
"name": "default",
|
|
@@ -24977,7 +25158,7 @@
|
|
|
24977
25158
|
{
|
|
24978
25159
|
"name": "--mds-pref-theme-item-color-background",
|
|
24979
25160
|
"annotation": "prop",
|
|
24980
|
-
"docs": "Background color of a theme item.",
|
|
25161
|
+
"docs": "Background color of a theme item: the wash of the theme it names.",
|
|
24981
25162
|
"visibility": "public"
|
|
24982
25163
|
},
|
|
24983
25164
|
{
|
|
@@ -25001,7 +25182,7 @@
|
|
|
25001
25182
|
{
|
|
25002
25183
|
"name": "--mds-pref-theme-item-color-variant-primary",
|
|
25003
25184
|
"annotation": "prop",
|
|
25004
|
-
"docs": "Color for the primary variant item.",
|
|
25185
|
+
"docs": "Color for the primary variant item: the accent of the theme it names.",
|
|
25005
25186
|
"visibility": "internal"
|
|
25006
25187
|
}
|
|
25007
25188
|
],
|
|
@@ -25017,8 +25198,8 @@
|
|
|
25017
25198
|
"mds-button"
|
|
25018
25199
|
],
|
|
25019
25200
|
"mds-button": [
|
|
25020
|
-
"mds-spinner",
|
|
25021
25201
|
"mds-icon",
|
|
25202
|
+
"mds-spinner",
|
|
25022
25203
|
"mds-text"
|
|
25023
25204
|
]
|
|
25024
25205
|
},
|
|
@@ -26344,8 +26525,8 @@
|
|
|
26344
26525
|
"mds-button"
|
|
26345
26526
|
],
|
|
26346
26527
|
"mds-button": [
|
|
26347
|
-
"mds-spinner",
|
|
26348
26528
|
"mds-icon",
|
|
26529
|
+
"mds-spinner",
|
|
26349
26530
|
"mds-text"
|
|
26350
26531
|
]
|
|
26351
26532
|
},
|
|
@@ -26969,8 +27150,8 @@
|
|
|
26969
27150
|
"mds-button"
|
|
26970
27151
|
],
|
|
26971
27152
|
"mds-button": [
|
|
26972
|
-
"mds-spinner",
|
|
26973
27153
|
"mds-icon",
|
|
27154
|
+
"mds-spinner",
|
|
26974
27155
|
"mds-text"
|
|
26975
27156
|
]
|
|
26976
27157
|
},
|
|
@@ -27716,8 +27897,8 @@
|
|
|
27716
27897
|
"mds-button"
|
|
27717
27898
|
],
|
|
27718
27899
|
"mds-button": [
|
|
27719
|
-
"mds-spinner",
|
|
27720
27900
|
"mds-icon",
|
|
27901
|
+
"mds-spinner",
|
|
27721
27902
|
"mds-text"
|
|
27722
27903
|
]
|
|
27723
27904
|
},
|
|
@@ -28006,8 +28187,8 @@
|
|
|
28006
28187
|
"mds-tooltip"
|
|
28007
28188
|
],
|
|
28008
28189
|
"mds-button": [
|
|
28009
|
-
"mds-spinner",
|
|
28010
28190
|
"mds-icon",
|
|
28191
|
+
"mds-spinner",
|
|
28011
28192
|
"mds-text"
|
|
28012
28193
|
],
|
|
28013
28194
|
"mds-tooltip": [
|
|
@@ -28656,8 +28837,8 @@
|
|
|
28656
28837
|
"mds-button"
|
|
28657
28838
|
],
|
|
28658
28839
|
"mds-button": [
|
|
28659
|
-
"mds-spinner",
|
|
28660
28840
|
"mds-icon",
|
|
28841
|
+
"mds-spinner",
|
|
28661
28842
|
"mds-text"
|
|
28662
28843
|
]
|
|
28663
28844
|
},
|
|
@@ -30683,8 +30864,8 @@
|
|
|
30683
30864
|
"mds-button"
|
|
30684
30865
|
],
|
|
30685
30866
|
"mds-button": [
|
|
30686
|
-
"mds-spinner",
|
|
30687
30867
|
"mds-icon",
|
|
30868
|
+
"mds-spinner",
|
|
30688
30869
|
"mds-text"
|
|
30689
30870
|
],
|
|
30690
30871
|
"mds-input-upload": [
|
|
@@ -31586,8 +31767,8 @@
|
|
|
31586
31767
|
"mds-text"
|
|
31587
31768
|
],
|
|
31588
31769
|
"mds-button": [
|
|
31589
|
-
"mds-spinner",
|
|
31590
31770
|
"mds-icon",
|
|
31771
|
+
"mds-spinner",
|
|
31591
31772
|
"mds-text"
|
|
31592
31773
|
]
|
|
31593
31774
|
},
|
|
@@ -31799,8 +31980,8 @@
|
|
|
31799
31980
|
"mds-text"
|
|
31800
31981
|
],
|
|
31801
31982
|
"mds-button": [
|
|
31802
|
-
"mds-spinner",
|
|
31803
31983
|
"mds-icon",
|
|
31984
|
+
"mds-spinner",
|
|
31804
31985
|
"mds-text"
|
|
31805
31986
|
],
|
|
31806
31987
|
"mds-table-header": [
|
|
@@ -33241,8 +33422,8 @@
|
|
|
33241
33422
|
"mds-button"
|
|
33242
33423
|
],
|
|
33243
33424
|
"mds-button": [
|
|
33244
|
-
"mds-spinner",
|
|
33245
33425
|
"mds-icon",
|
|
33426
|
+
"mds-spinner",
|
|
33246
33427
|
"mds-text"
|
|
33247
33428
|
]
|
|
33248
33429
|
},
|
|
@@ -35087,8 +35268,8 @@
|
|
|
35087
35268
|
"mds-button"
|
|
35088
35269
|
],
|
|
35089
35270
|
"mds-button": [
|
|
35090
|
-
"mds-spinner",
|
|
35091
35271
|
"mds-icon",
|
|
35272
|
+
"mds-spinner",
|
|
35092
35273
|
"mds-text"
|
|
35093
35274
|
]
|
|
35094
35275
|
},
|
|
@@ -35298,8 +35479,8 @@
|
|
|
35298
35479
|
"mds-button"
|
|
35299
35480
|
],
|
|
35300
35481
|
"mds-button": [
|
|
35301
|
-
"mds-spinner",
|
|
35302
35482
|
"mds-icon",
|
|
35483
|
+
"mds-spinner",
|
|
35303
35484
|
"mds-text"
|
|
35304
35485
|
]
|
|
35305
35486
|
},
|
|
@@ -36066,7 +36247,7 @@
|
|
|
36066
36247
|
"path": "src/type/button.ts"
|
|
36067
36248
|
},
|
|
36068
36249
|
"src/type/button.ts::ButtonVariantType": {
|
|
36069
|
-
"declaration": "export type ButtonVariantType =\n
|
|
36250
|
+
"declaration": "export type ButtonVariantType =\n 'apple' | 'google' | ThemeLuminanceVariantType | ThemeBrandVariantType | ThemeStatusVariantType;",
|
|
36070
36251
|
"docstring": "",
|
|
36071
36252
|
"path": "src/type/button.ts"
|
|
36072
36253
|
},
|
|
@@ -36085,8 +36266,13 @@
|
|
|
36085
36266
|
"docstring": "",
|
|
36086
36267
|
"path": "src/type/button.ts"
|
|
36087
36268
|
},
|
|
36269
|
+
"src/type/button.ts::ButtonCurrentType": {
|
|
36270
|
+
"declaration": "export type ButtonCurrentType = boolean | (typeof buttonCurrentDictionary)[number];",
|
|
36271
|
+
"docstring": "",
|
|
36272
|
+
"path": "src/type/button.ts"
|
|
36273
|
+
},
|
|
36088
36274
|
"src/type/button.ts::ButtonDropdownVariantType": {
|
|
36089
|
-
"declaration": "export type ButtonDropdownVariantType =\n
|
|
36275
|
+
"declaration": "export type ButtonDropdownVariantType =\n ThemeLuminanceVariantType | ThemeBrandVariantType | ThemeStatusVariantType;",
|
|
36090
36276
|
"docstring": "",
|
|
36091
36277
|
"path": "src/type/button.ts"
|
|
36092
36278
|
},
|