@maggioli-design-system/magma 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +21 -0
- package/README.md +7 -3
- package/agents/assets.md +1 -1
- package/agents/color.md +2 -2
- package/agents/mcp.md +1 -1
- 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.light.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.dark.webp +0 -0
- 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.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.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.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.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.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.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.light.webp +0 -0
- package/agents/patterns/previews/record-detail/edit-data.dark.webp +0 -0
- 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.light.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.dark.webp +0 -0
- 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.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.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.light.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.dark.webp +0 -0
- 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.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/theming.md +14 -9
- package/dist/cjs/mds-emoji.cjs.entry.js +39 -10
- package/dist/cjs/mds-pref-theme-item.cjs.entry.js +18 -4
- package/dist/cjs/mds-pref-theme.cjs.entry.js +12 -3
- 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 +1 -1
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +1 -1
- 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-banner/AGENTS.md +1 -1
- package/dist/collection/components/mds-banner/documentation.json +1 -1
- 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 +1 -1
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +1 -1
- package/dist/collection/components/mds-button/AGENTS.md +1 -1
- package/dist/collection/components/mds-button/documentation.json +1 -1
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +1 -1
- 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-calendar/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar/documentation.json +1 -1
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +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-content/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-content/documentation.json +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-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-header/documentation.json +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-chip/AGENTS.md +1 -1
- package/dist/collection/components/mds-chip/documentation.json +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-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- 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-entity/AGENTS.md +1 -1
- package/dist/collection/components/mds-entity/documentation.json +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-preview/AGENTS.md +1 -1
- package/dist/collection/components/mds-file-preview/documentation.json +1 -1
- 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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter-item/documentation.json +1 -1
- package/dist/collection/components/mds-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-header/documentation.json +1 -1
- package/dist/collection/components/mds-header-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-header-bar/documentation.json +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-horizontal-scroll/AGENTS.md +1 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +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-icon/AGENTS.md +1 -1
- package/dist/collection/components/mds-icon/documentation.json +1 -1
- package/dist/collection/components/mds-img/AGENTS.md +1 -1
- package/dist/collection/components/mds-img/documentation.json +1 -1
- package/dist/collection/components/mds-input/AGENTS.md +1 -1
- package/dist/collection/components/mds-input/documentation.json +1 -1
- package/dist/collection/components/mds-input-date/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +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-otp/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-otp/documentation.json +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-select/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-select/documentation.json +1 -1
- 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-tip/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip/documentation.json +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-upload/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-upload/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard/documentation.json +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-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +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-label/AGENTS.md +1 -1
- package/dist/collection/components/mds-label/documentation.json +1 -1
- 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-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +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-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +1 -1
- package/dist/collection/components/mds-modal/AGENTS.md +1 -1
- package/dist/collection/components/mds-modal/documentation.json +1 -1
- package/dist/collection/components/mds-note/AGENTS.md +1 -1
- package/dist/collection/components/mds-note/documentation.json +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-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +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-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +1 -1
- package/dist/collection/components/mds-pref/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref/documentation.json +1 -1
- package/dist/collection/components/mds-pref-animation/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-mode/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +2 -2
- package/dist/collection/components/mds-pref-theme/documentation.json +4 -4
- package/dist/collection/components/mds-pref-theme/examples.md +17 -20
- package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +12 -3
- package/dist/collection/components/mds-pref-theme/mistakes.md +14 -14
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +5 -5
- package/dist/collection/components/mds-pref-theme-item/documentation.json +8 -8
- 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-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-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-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-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +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-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +1 -1
- 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-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +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-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +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-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +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-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +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-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +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-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +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-text/AGENTS.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +1 -1
- package/dist/collection/components/mds-toast/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast/documentation.json +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-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +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-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/components/mds-emoji.js +3 -3
- package/dist/components/mds-pref-theme-item.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/documentation.json +11 -11
- package/dist/esm/mds-emoji.entry.js +39 -10
- package/dist/esm/mds-pref-theme-item.entry.js +18 -4
- package/dist/esm/mds-pref-theme.entry.js +12 -3
- package/dist/esm-es5/mds-emoji.entry.js +109 -107
- package/dist/esm-es5/mds-pref-theme-item.entry.js +12 -5
- package/dist/esm-es5/mds-pref-theme.entry.js +9 -4
- package/dist/hydrate/index.js +69 -17
- package/dist/hydrate/index.mjs +69 -17
- package/dist/lint/core/patterns.d.ts +30 -0
- package/dist/lint/core/patterns.js +90 -0
- package/dist/lint/mcp/patterns.js +21 -11
- package/dist/lint/mcp/render-page.d.ts +5 -1
- package/dist/lint/mcp/render-page.js +17 -0
- package/dist/lint/mcp/render.d.ts +22 -1
- package/dist/lint/mcp/render.js +101 -20
- package/dist/lint/mcp/tools.json +2 -2
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-0dcde20a.system.entry.js → p-2a445b98.system.entry.js} +15 -13
- package/dist/magma-components/p-97c6e10a.entry.js +1 -0
- package/dist/magma-components/{p-4e072e24.system.entry.js → p-9e07535e.system.entry.js} +10 -5
- package/dist/magma-components/{p-77001a72.entry.js → p-9ef64212.entry.js} +3 -3
- package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
- package/dist/magma-components/p-c915fba5.system.entry.js +21 -0
- package/dist/magma-components/p-cd6dd836.entry.js +1 -0
- package/dist/stats.json +48 -47
- package/dist/types/components/mds-pref-theme-item/mds-pref-theme-item.d.ts +9 -2
- package/dist/types/components.d.ts +4 -4
- package/package.json +6 -5
- package/dist/magma-components/p-34d58345.entry.js +0 -1
- package/dist/magma-components/p-52e2b0d4.system.entry.js +0 -14
- package/dist/magma-components/p-f3708d1a.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-04T15:13:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
"usage": {
|
|
26
|
-
"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, which `<mds-pref>` listens to in order to lock the `<mds-pref-mode>` item a scheme-constrained theme forbids. 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
|
|
27
|
-
"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 `
|
|
28
|
-
"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, nor lock the `<mds-pref-mode>` item that its `scheme` forbids.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme name=\"
|
|
26
|
+
"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, which `<mds-pref>` listens to in order to lock the `<mds-pref-mode>` item a scheme-constrained theme forbids. 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.\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",
|
|
27
|
+
"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\nUse `scheme=\"light\"` or `scheme=\"dark\"` on a `<mds-pref-theme-item>` when the theme must be offered in one colour mode only. The parent component propagates the chosen scheme to `<html>` and forces that mode even if the user's OS or mode preference asks for the opposite; inside `<mds-pref>` the forbidden item of `<mds-pref-mode>` is 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",
|
|
28
|
+
"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, nor lock the `<mds-pref-mode>` item that its `scheme` forbids.\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"
|
|
29
29
|
},
|
|
30
30
|
"props": [
|
|
31
31
|
{
|
|
@@ -11,14 +11,13 @@ Correct and idiomatic ways to use the `<mds-pref-theme>` component, ordered from
|
|
|
11
11
|
|
|
12
12
|
#### Basic Theme Chooser
|
|
13
13
|
|
|
14
|
-
The 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 `
|
|
14
|
+
The 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.
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
17
|
<mds-pref>
|
|
18
|
-
<mds-pref-theme name="
|
|
19
|
-
<mds-pref-theme-item label="
|
|
20
|
-
<mds-pref-theme-item label="
|
|
21
|
-
<mds-pref-theme-item label="Caldo" name="warm" scheme="all"></mds-pref-theme-item>
|
|
18
|
+
<mds-pref-theme name="business" scheme="all">
|
|
19
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
20
|
+
<mds-pref-theme-item label="Editoriale" name="editorial" scheme="all"></mds-pref-theme-item>
|
|
22
21
|
</mds-pref-theme>
|
|
23
22
|
</mds-pref>
|
|
24
23
|
```
|
|
@@ -29,12 +28,10 @@ Use `scheme="light"` or `scheme="dark"` on a `<mds-pref-theme-item>` when the th
|
|
|
29
28
|
|
|
30
29
|
```html
|
|
31
30
|
<mds-pref>
|
|
32
|
-
<mds-pref-theme name="
|
|
33
|
-
<mds-pref-theme-item label="
|
|
31
|
+
<mds-pref-theme name="business" scheme="all">
|
|
32
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
34
33
|
<!-- light only - dark mode will not activate with this item -->
|
|
35
|
-
<mds-pref-theme-item label="
|
|
36
|
-
<!-- dark only -->
|
|
37
|
-
<mds-pref-theme-item label="Caldo scuro" name="warm" scheme="dark"></mds-pref-theme-item>
|
|
34
|
+
<mds-pref-theme-item label="Editoriale chiaro" name="editorial" scheme="light"></mds-pref-theme-item>
|
|
38
35
|
</mds-pref-theme>
|
|
39
36
|
</mds-pref>
|
|
40
37
|
```
|
|
@@ -45,9 +42,9 @@ React to the user's selection via `mdsPrefThemeChange`. The event detail carries
|
|
|
45
42
|
|
|
46
43
|
```html
|
|
47
44
|
<mds-pref>
|
|
48
|
-
<mds-pref-theme id="theme-chooser" name="
|
|
49
|
-
<mds-pref-theme-item label="
|
|
50
|
-
<mds-pref-theme-item label="
|
|
45
|
+
<mds-pref-theme id="theme-chooser" name="business" scheme="all">
|
|
46
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
47
|
+
<mds-pref-theme-item label="Editoriale" name="editorial" scheme="all"></mds-pref-theme-item>
|
|
51
48
|
</mds-pref-theme>
|
|
52
49
|
</mds-pref>
|
|
53
50
|
|
|
@@ -64,10 +61,10 @@ Use the `name` prop to declare which theme should be active before the user make
|
|
|
64
61
|
|
|
65
62
|
```html
|
|
66
63
|
<mds-pref>
|
|
67
|
-
<!-- First-visit default is "
|
|
68
|
-
<mds-pref-theme name="
|
|
69
|
-
<mds-pref-theme-item label="
|
|
70
|
-
<mds-pref-theme-item label="
|
|
64
|
+
<!-- First-visit default is "editorial" -->
|
|
65
|
+
<mds-pref-theme name="editorial" scheme="all">
|
|
66
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
67
|
+
<mds-pref-theme-item label="Editoriale" name="editorial" scheme="all"></mds-pref-theme-item>
|
|
71
68
|
</mds-pref-theme>
|
|
72
69
|
</mds-pref>
|
|
73
70
|
```
|
|
@@ -78,9 +75,9 @@ Pass `size="sm"` when the preferences panel must fit a compact layout: on `<mds-
|
|
|
78
75
|
|
|
79
76
|
```html
|
|
80
77
|
<mds-pref size="sm">
|
|
81
|
-
<mds-pref-theme name="
|
|
82
|
-
<mds-pref-theme-item label="
|
|
83
|
-
<mds-pref-theme-item label="
|
|
78
|
+
<mds-pref-theme name="business" scheme="all">
|
|
79
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
80
|
+
<mds-pref-theme-item label="Editoriale" name="editorial" scheme="all"></mds-pref-theme-item>
|
|
84
81
|
</mds-pref-theme>
|
|
85
82
|
</mds-pref>
|
|
86
83
|
```
|
|
@@ -9,6 +9,15 @@ import localeEs from "./meta/locale.es.json";
|
|
|
9
9
|
import localeIt from "./meta/locale.it.json";
|
|
10
10
|
import miBaselineKeyboardArrowDown from "@icon/mi/baseline/keyboard-arrow-down.svg";
|
|
11
11
|
import miBaselineKeyboardArrowUp from "@icon/mi/baseline/keyboard-arrow-up.svg";
|
|
12
|
+
/**
|
|
13
|
+
* `default` is the old name of `business`, the base theme (the `themes` map of
|
|
14
|
+
* semantic.config.ts, #692): the same theme, so an item of either name stands for it. The
|
|
15
|
+
* component keeps `default` as the default of `name` until the next major makes it `business`.
|
|
16
|
+
*/
|
|
17
|
+
const sameTheme = (a, b) => {
|
|
18
|
+
const base = (name) => (name === 'default' ? 'business' : name);
|
|
19
|
+
return base(a) === base(b);
|
|
20
|
+
};
|
|
12
21
|
/**
|
|
13
22
|
* @slot - Add `mds-pref-theme-item` element/s.
|
|
14
23
|
* @category preferences
|
|
@@ -71,7 +80,7 @@ export class MdsPrefTheme {
|
|
|
71
80
|
* shows it, or, when no item matches, the label an item derives from the name.
|
|
72
81
|
*/
|
|
73
82
|
this.triggerLabel = () => {
|
|
74
|
-
const item = Array.from(this.element.querySelectorAll('mds-pref-theme-item')).find((element) => { var _a, _b; return ((_b = (_a = element.name) !== null && _a !== void 0 ? _a : element.getAttribute('name')) !== null && _b !== void 0 ? _b : 'default'
|
|
83
|
+
const item = Array.from(this.element.querySelectorAll('mds-pref-theme-item')).find((element) => { var _a, _b; return sameTheme((_b = (_a = element.name) !== null && _a !== void 0 ? _a : element.getAttribute('name')) !== null && _b !== void 0 ? _b : 'default', this.name); });
|
|
75
84
|
return (item === null || item === void 0 ? void 0 : item.label) || (item === null || item === void 0 ? void 0 : item.getAttribute('label')) || labelFromName(this.name);
|
|
76
85
|
};
|
|
77
86
|
this.toggleDropdown = () => {
|
|
@@ -89,7 +98,7 @@ export class MdsPrefTheme {
|
|
|
89
98
|
this.checkThemeSelect = () => {
|
|
90
99
|
this.themeItems = this.element.querySelectorAll('mds-pref-theme-item');
|
|
91
100
|
this.themeItems.forEach((element) => {
|
|
92
|
-
element.selected = element.name
|
|
101
|
+
element.selected = sameTheme(element.name, this.name);
|
|
93
102
|
});
|
|
94
103
|
};
|
|
95
104
|
this.setTheme = (name, scheme) => {
|
|
@@ -248,7 +257,7 @@ export class MdsPrefTheme {
|
|
|
248
257
|
this.setTheme(name, scheme);
|
|
249
258
|
}
|
|
250
259
|
render() {
|
|
251
|
-
return (h(Host, { key: '
|
|
260
|
+
return (h(Host, { key: 'd43c9d9bfaac3c3f997748228db2fccafb1307d2' }, h("div", { key: 'ddd730c6efb781df542701cbdc21d0874caf4c0a', class: "menu" }, h("mds-text", { key: 'ab88bdac3ca42505844dc35ab5a587fce8596c62', class: "info", typography: "caption" }, h("b", { key: 'acdc9a0ba564059ef013cb547f4e2eeda63ed2f2' }, this.t.get('label'))), h("mds-tab", { key: 'd7c052bcd02f7858ba0e9b2640e49c91530febc5', fill: true, size: this.size }, h("mds-tab-item", { key: '5ff16c9622437ff463aa3711387a53e6dc7f5796', selected: true, onClick: this.toggleDropdown, expanded: this.showDropdown, id: "mds-pref-theme-nav", class: "item item--theme", "icon-position": "right", icon: this.showDropdown ? miBaselineKeyboardArrowUp : miBaselineKeyboardArrowDown, label: this.triggerLabel() }))), h("mds-dropdown", { key: '23ee30b64e2faec6f3f40e2c6d3a6e2a31161dbe', class: "mds-pref-theme-dropdown", target: "#mds-pref-theme-nav", interaction: "none", visible: this.showDropdown, onMdsDropdownHide: this.hideThemeDropdownSelect }, h("slot", { key: 'd26613bc60c31fde855cfcbb2935b91b34c7db3f', onSlotchange: this.checkThemeSelect }))));
|
|
252
261
|
}
|
|
253
262
|
static get is() { return "mds-pref-theme"; }
|
|
254
263
|
static get encapsulation() { return "shadow"; }
|
|
@@ -15,14 +15,14 @@ Common incorrect uses of `<mds-pref-theme>`. Each entry pairs the wrong form wit
|
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
17
|
<!-- INCORRECT -->
|
|
18
|
-
<mds-pref-theme name="
|
|
19
|
-
<mds-pref-theme-item label="
|
|
18
|
+
<mds-pref-theme name="business" scheme="all">
|
|
19
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
20
20
|
</mds-pref-theme>
|
|
21
21
|
|
|
22
22
|
<!-- CORRECT -->
|
|
23
23
|
<mds-pref>
|
|
24
|
-
<mds-pref-theme name="
|
|
25
|
-
<mds-pref-theme-item label="
|
|
24
|
+
<mds-pref-theme name="business" scheme="all">
|
|
25
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
26
26
|
</mds-pref-theme>
|
|
27
27
|
</mds-pref>
|
|
28
28
|
```
|
|
@@ -34,17 +34,17 @@ The default slot is reserved exclusively for `<mds-pref-theme-item>` elements. A
|
|
|
34
34
|
```html
|
|
35
35
|
<!-- INCORRECT -->
|
|
36
36
|
<mds-pref>
|
|
37
|
-
<mds-pref-theme name="
|
|
38
|
-
<button>
|
|
39
|
-
<span>
|
|
37
|
+
<mds-pref-theme name="business" scheme="all">
|
|
38
|
+
<button>Gestionale</button>
|
|
39
|
+
<span>Editoriale</span>
|
|
40
40
|
</mds-pref-theme>
|
|
41
41
|
</mds-pref>
|
|
42
42
|
|
|
43
43
|
<!-- CORRECT -->
|
|
44
44
|
<mds-pref>
|
|
45
|
-
<mds-pref-theme name="
|
|
46
|
-
<mds-pref-theme-item label="
|
|
47
|
-
<mds-pref-theme-item label="
|
|
45
|
+
<mds-pref-theme name="business" scheme="all">
|
|
46
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
47
|
+
<mds-pref-theme-item label="Editoriale" name="editorial" scheme="all"></mds-pref-theme-item>
|
|
48
48
|
</mds-pref-theme>
|
|
49
49
|
</mds-pref>
|
|
50
50
|
```
|
|
@@ -60,7 +60,7 @@ The `name` prop must match the pattern `^[a-z]+(-[a-z]+)*$` (lowercase letters a
|
|
|
60
60
|
<mds-pref-theme name="MyTheme" scheme="all">...</mds-pref-theme>
|
|
61
61
|
|
|
62
62
|
<!-- CORRECT -->
|
|
63
|
-
<mds-pref-theme name="
|
|
63
|
+
<mds-pref-theme name="editorial" scheme="all">...</mds-pref-theme>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
#### Do Not Listen for the Native `change` Event
|
|
@@ -91,14 +91,14 @@ The `name` prop must match the pattern `^[a-z]+(-[a-z]+)*$` (lowercase letters a
|
|
|
91
91
|
<!-- INCORRECT -->
|
|
92
92
|
<mds-pref size="sm">
|
|
93
93
|
<mds-pref-theme size="md" name="default" scheme="all">
|
|
94
|
-
<mds-pref-theme-item label="
|
|
94
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
95
95
|
</mds-pref-theme>
|
|
96
96
|
</mds-pref>
|
|
97
97
|
|
|
98
98
|
<!-- CORRECT -->
|
|
99
99
|
<mds-pref size="sm">
|
|
100
|
-
<mds-pref-theme name="
|
|
101
|
-
<mds-pref-theme-item label="
|
|
100
|
+
<mds-pref-theme name="business" scheme="all">
|
|
101
|
+
<mds-pref-theme-item label="Gestionale" name="business" scheme="all"></mds-pref-theme-item>
|
|
102
102
|
</mds-pref-theme>
|
|
103
103
|
</mds-pref>
|
|
104
104
|
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-pref-theme-item
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.11.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
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.
|
|
12
12
|
|
|
@@ -16,11 +16,11 @@ The `<mds-pref-theme-item>` web component is a single selectable theme entry ins
|
|
|
16
16
|
- **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.
|
|
17
17
|
- **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.
|
|
18
18
|
- **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`).
|
|
19
|
-
- **
|
|
19
|
+
- **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.
|
|
20
20
|
|
|
21
21
|
#### Properties & Visual Configurations
|
|
22
22
|
|
|
23
|
-
- **`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 `
|
|
23
|
+
- **`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.
|
|
24
24
|
- **`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.
|
|
25
25
|
- **`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.
|
|
26
26
|
|
|
@@ -36,7 +36,7 @@ The `<mds-pref-theme-item>` web component is a single selectable theme entry ins
|
|
|
36
36
|
| Prop | Attribute | Type | Default | Description |
|
|
37
37
|
| --- | --- | --- | --- | --- |
|
|
38
38
|
| `label` | `label` | `string \| undefined` | - | Specifies the theme name |
|
|
39
|
-
| `name` | `name` | `string` | `'default'` | Specifies the theme name |
|
|
39
|
+
| `name` | `name` | `string` | `'default'` | Specifies the theme name; the swatch shows the preview that theme publishes, `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent` |
|
|
40
40
|
| `scheme` | `scheme` | `"all" \| "dark" \| "light" \| undefined` | `'all'` | Specifies the theme scheme which can be 'light', 'dark' or 'all' |
|
|
41
41
|
| `selected` | `selected` | `boolean \| undefined` | `false` | Specifies if the element is selected |
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ The `<mds-pref-theme-item>` web component is a single selectable theme entry ins
|
|
|
50
50
|
|
|
51
51
|
| Property | Description |
|
|
52
52
|
| --- | --- |
|
|
53
|
-
| `--mds-pref-theme-item-color-background` | Background color of a theme item. |
|
|
53
|
+
| `--mds-pref-theme-item-color-background` | Background color of a theme item: the wash of the theme it names. |
|
|
54
54
|
|
|
55
55
|
Only these are public. Its other 4 are internal: they may change in any release, do not set them.
|
|
56
56
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-04T15:13:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"usage": {
|
|
22
|
-
"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- **
|
|
23
|
-
"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=\"
|
|
24
|
-
"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=\"
|
|
22
|
+
"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.\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",
|
|
23
|
+
"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",
|
|
24
|
+
"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"
|
|
25
25
|
},
|
|
26
26
|
"props": [
|
|
27
27
|
{
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"mutable": false,
|
|
62
62
|
"attr": "name",
|
|
63
63
|
"reflectToAttr": true,
|
|
64
|
-
"docs": "Specifies the theme name",
|
|
64
|
+
"docs": "Specifies the theme name; the swatch shows the preview that theme publishes,\n`--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`",
|
|
65
65
|
"docsTags": [
|
|
66
66
|
{
|
|
67
67
|
"name": "example",
|
|
68
|
-
"text": "'
|
|
68
|
+
"text": "'editorial'"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"name": "default",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
{
|
|
194
194
|
"name": "--mds-pref-theme-item-color-background",
|
|
195
195
|
"annotation": "prop",
|
|
196
|
-
"docs": "Background color of a theme item.",
|
|
196
|
+
"docs": "Background color of a theme item: the wash of the theme it names.",
|
|
197
197
|
"visibility": "public"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
{
|
|
218
218
|
"name": "--mds-pref-theme-item-color-variant-primary",
|
|
219
219
|
"annotation": "prop",
|
|
220
|
-
"docs": "Color for the primary variant item.",
|
|
220
|
+
"docs": "Color for the primary variant item: the accent of the theme it names.",
|
|
221
221
|
"visibility": "internal"
|
|
222
222
|
}
|
|
223
223
|
],
|
|
@@ -14,10 +14,9 @@ Correct and idiomatic ways to use the `<mds-pref-theme-item>` component, ordered
|
|
|
14
14
|
`<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.
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<mds-pref-theme name="
|
|
18
|
-
<mds-pref-theme-item name="
|
|
19
|
-
<mds-pref-theme-item name="
|
|
20
|
-
<mds-pref-theme-item name="warm" label="Caldo" scheme="all"></mds-pref-theme-item>
|
|
17
|
+
<mds-pref-theme name="business" scheme="all">
|
|
18
|
+
<mds-pref-theme-item name="business" label="Gestionale" scheme="all"></mds-pref-theme-item>
|
|
19
|
+
<mds-pref-theme-item name="editorial" label="Editoriale" scheme="all"></mds-pref-theme-item>
|
|
21
20
|
</mds-pref-theme>
|
|
22
21
|
```
|
|
23
22
|
|
|
@@ -26,11 +25,10 @@ Correct and idiomatic ways to use the `<mds-pref-theme-item>` component, ordered
|
|
|
26
25
|
Omit `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.
|
|
27
26
|
|
|
28
27
|
```html
|
|
29
|
-
<mds-pref-theme name="
|
|
30
|
-
<!-- renders "
|
|
31
|
-
<mds-pref-theme-item name="
|
|
32
|
-
<mds-pref-theme-item name="
|
|
33
|
-
<mds-pref-theme-item name="warm" scheme="all"></mds-pref-theme-item>
|
|
28
|
+
<mds-pref-theme name="business" scheme="all">
|
|
29
|
+
<!-- renders "Business" and "Editorial" without explicit label props -->
|
|
30
|
+
<mds-pref-theme-item name="business" scheme="all"></mds-pref-theme-item>
|
|
31
|
+
<mds-pref-theme-item name="editorial" scheme="all"></mds-pref-theme-item>
|
|
34
32
|
</mds-pref-theme>
|
|
35
33
|
```
|
|
36
34
|
|
|
@@ -39,15 +37,12 @@ Omit `label` and let the component generate it from `name`: the first letter is
|
|
|
39
37
|
Set `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.
|
|
40
38
|
|
|
41
39
|
```html
|
|
42
|
-
<mds-pref-theme name="
|
|
40
|
+
<mds-pref-theme name="business" scheme="all">
|
|
43
41
|
<!-- this theme works in both modes -->
|
|
44
|
-
<mds-pref-theme-item name="
|
|
42
|
+
<mds-pref-theme-item name="business" label="Gestionale" scheme="all"></mds-pref-theme-item>
|
|
45
43
|
|
|
46
44
|
<!-- offered light-only; selecting it locks the UI in light mode -->
|
|
47
|
-
<mds-pref-theme-item name="
|
|
48
|
-
|
|
49
|
-
<!-- offered dark-only; selecting it locks the UI in dark mode -->
|
|
50
|
-
<mds-pref-theme-item name="warm" label="Caldo scuro" scheme="dark"></mds-pref-theme-item>
|
|
45
|
+
<mds-pref-theme-item name="editorial" label="Editoriale chiaro" scheme="light"></mds-pref-theme-item>
|
|
51
46
|
</mds-pref-theme>
|
|
52
47
|
```
|
|
53
48
|
|
|
@@ -56,9 +51,9 @@ Set `scheme` to `"light"` or `"dark"` when a theme must be offered in a single c
|
|
|
56
51
|
Attach 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.
|
|
57
52
|
|
|
58
53
|
```html
|
|
59
|
-
<mds-pref-theme name="
|
|
60
|
-
<mds-pref-theme-item name="
|
|
61
|
-
<mds-pref-theme-item name="
|
|
54
|
+
<mds-pref-theme name="business" scheme="all">
|
|
55
|
+
<mds-pref-theme-item name="business" label="Gestionale" scheme="all"></mds-pref-theme-item>
|
|
56
|
+
<mds-pref-theme-item name="editorial" label="Editoriale" scheme="all"></mds-pref-theme-item>
|
|
62
57
|
</mds-pref-theme>
|
|
63
58
|
|
|
64
59
|
<script>
|
|
@@ -75,20 +70,19 @@ Attach a listener for `mdsPrefThemeItemSelect` when you need to react to a selec
|
|
|
75
70
|
Declare 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.
|
|
76
71
|
|
|
77
72
|
```html
|
|
78
|
-
<mds-pref-theme name="
|
|
79
|
-
<mds-pref-theme-item name="
|
|
80
|
-
<mds-pref-theme-item name="
|
|
81
|
-
<mds-pref-theme-item name="warm" label="Caldo" scheme="all"></mds-pref-theme-item>
|
|
73
|
+
<mds-pref-theme name="editorial" scheme="all">
|
|
74
|
+
<mds-pref-theme-item name="business" label="Gestionale" scheme="all"></mds-pref-theme-item>
|
|
75
|
+
<mds-pref-theme-item name="editorial" label="Editoriale" scheme="all"></mds-pref-theme-item>
|
|
82
76
|
</mds-pref-theme>
|
|
83
77
|
```
|
|
84
78
|
|
|
85
79
|
#### CSS Customization via Documented Properties
|
|
86
80
|
|
|
87
|
-
Override 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.
|
|
81
|
+
Override 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.
|
|
88
82
|
|
|
89
83
|
```css
|
|
90
84
|
/* override the swatch background of one theme item */
|
|
91
|
-
mds-pref-theme-item[name="
|
|
85
|
+
mds-pref-theme-item[name="editorial"] {
|
|
92
86
|
--mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));
|
|
93
87
|
}
|
|
94
88
|
```
|
|
@@ -11,19 +11,25 @@ mds-button {
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* @prop --mds-pref-theme-item-color-background: Public. Background color of a theme item.
|
|
14
|
+
* @prop --mds-pref-theme-item-color-background: Public. Background color of a theme item: the wash of the theme it names.
|
|
15
15
|
* @prop --mds-pref-theme-item-color-status-error: Color representing an error status for a theme item.
|
|
16
16
|
* @prop --mds-pref-theme-item-color-status-success: Color representing a success status for a theme item.
|
|
17
17
|
* @prop --mds-pref-theme-item-color-status-warning: Color representing a warning status for a theme item.
|
|
18
|
-
* @prop --mds-pref-theme-item-color-variant-primary: Color for the primary variant item.
|
|
18
|
+
* @prop --mds-pref-theme-item-color-variant-primary: Color for the primary variant item: the accent of the theme it names.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
/* the preview of the theme the item names (#692): the component sets --private-theme-wash and
|
|
22
|
+
--private-theme-accent to that theme's --magma-preview-<name>-*; a theme that publishes none
|
|
23
|
+
leaves them invalid, and the active theme shows instead */
|
|
24
|
+
|
|
21
25
|
:host {
|
|
22
|
-
--mds-pref-theme-item-color-background: rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225)));
|
|
26
|
+
--mds-pref-theme-item-color-background: rgb(var(--private-theme-wash, var(--magma-wash-base, var(--tone-neutral-09, 225 225 225))));
|
|
23
27
|
--mds-pref-theme-item-color-status-error: rgb(var(--magma-danger-emphasis, var(--status-error-04, 196 64 65)));
|
|
24
28
|
--mds-pref-theme-item-color-status-success: rgb(var(--magma-success-emphasis, var(--status-success-04, 0 128 57)));
|
|
25
29
|
--mds-pref-theme-item-color-status-warning: rgb(var(--magma-warning-emphasis, var(--status-warning-04, 142 106 0)));
|
|
26
|
-
--mds-pref-theme-item-color-variant-primary: rgb(
|
|
30
|
+
--mds-pref-theme-item-color-variant-primary: rgb(
|
|
31
|
+
var(--private-theme-accent, var(--magma-accent-emphasis, var(--variant-primary-04, 36 103 231)))
|
|
32
|
+
);
|
|
27
33
|
|
|
28
34
|
align-items: center;
|
|
29
35
|
cursor: pointer;
|
|
@@ -51,11 +57,11 @@ mds-button {
|
|
|
51
57
|
width: --spacing(600);
|
|
52
58
|
}
|
|
53
59
|
|
|
54
|
-
/* the
|
|
55
|
-
|
|
60
|
+
/* the wash of the theme the item names, under the colour of each dot; 16px on a 6px dot was a
|
|
61
|
+
circle, the pill */
|
|
56
62
|
|
|
57
63
|
.theme-color {
|
|
58
|
-
background-color: rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225)));
|
|
64
|
+
background-color: var(--mds-pref-theme-item-color-background, rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225))));
|
|
59
65
|
border-radius: var(--magma-radius-full, var(--radius-full, 1000px));
|
|
60
66
|
height: --spacing(150);
|
|
61
67
|
position: relative;
|