@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,14 +1,21 @@
|
|
|
1
|
-
import{r as registerInstance,d as createEvent,h,e as Host}from"./index-CvLLN-QH.js";import{m as miBaselineCheckCircle}from"./check-circle-BFhO-KUe.js";import{m as miOutlineCircle}from"./circle-lZldSMeV.js";import{l as labelFromName}from"./string-6pgPWpGI.js";var mdsPrefThemeItemCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{
|
|
1
|
+
import{r as registerInstance,d as createEvent,h,e as Host}from"./index-CvLLN-QH.js";import{m as miBaselineCheckCircle}from"./check-circle-BFhO-KUe.js";import{m as miOutlineCircle}from"./circle-lZldSMeV.js";import{l as labelFromName}from"./string-6pgPWpGI.js";var mdsPrefThemeItemCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--private-theme-wash,var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--private-theme-accent,var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15));box-sizing:border-box;display:inline-flex;flex:none;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*100);height:calc(var(--spacing,.0025rem)*600);margin:1px;padding:calc(var(--spacing,.0025rem)*100);width:calc(var(--spacing,.0025rem)*600)}.theme-color,.theme-preview{background-color:var(--mds-pref-theme-item-color-background,rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-full,var(--radius-full,1000px))}.theme-color{height:calc(var(--spacing,.0025rem)*150);position:relative;width:calc(var(--spacing,.0025rem)*150)}.theme-color:after{border-radius:inherit;box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15)) inset;content:"";display:flex;inset:0;position:absolute}.theme-color--variant-primary{background-color:var(--mds-pref-theme-item-color-variant-primary,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))))}.theme-color--status-success{background-color:var(--mds-pref-theme-item-color-status-success,rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57))))}.theme-color--status-warning{background-color:var(--mds-pref-theme-item-color-status-warning,rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))))}.theme-color--status-error{background-color:var(--mds-pref-theme-item-color-status-error,rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65))))}'};
|
|
2
|
+
/** The names mds-pref-theme accepts: a theme's preview custom properties carry the name. */var THEME_NAME=/^[a-z]+(-[a-z]+)*$/;var MdsPrefThemeItem=/** @class */function(){function e(e){var a=this;registerInstance(this,e);this.selectThemeEvent=createEvent(this,"mdsPrefThemeItemSelect",7);
|
|
2
3
|
/**
|
|
3
|
-
* Specifies the theme name
|
|
4
|
-
*
|
|
4
|
+
* Specifies the theme name; the swatch shows the preview that theme publishes,
|
|
5
|
+
* `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`
|
|
6
|
+
* @example 'editorial'
|
|
5
7
|
*/this.name="default";
|
|
6
8
|
/**
|
|
7
9
|
* Specifies the theme scheme which can be 'light', 'dark' or 'all'
|
|
8
10
|
*/this.scheme="all";
|
|
9
11
|
/**
|
|
10
12
|
* Specifies if the element is selected
|
|
11
|
-
*/this.selected=false;this.handleClick=function(){a.selectThemeEvent.emit({name:a.name,scheme:a.scheme})}
|
|
13
|
+
*/this.selected=false;this.handleClick=function(){a.selectThemeEvent.emit({name:a.name,scheme:a.scheme})};
|
|
14
|
+
/**
|
|
15
|
+
* The preview of the theme the item names, which the styles of that theme publish on the page
|
|
16
|
+
* (`--magma-preview-<name>-{wash,accent}`, #692), so the item shows its own theme and not the
|
|
17
|
+
* active one. The stylesheet falls back to the active theme when a theme publishes none.
|
|
18
|
+
*/this.previewStyle=function(){return THEME_NAME.test(a.name)?{"--private-theme-wash":"var(--magma-preview-".concat(a.name,"-wash)"),"--private-theme-accent":"var(--magma-preview-".concat(a.name,"-accent)")}:undefined}}e.prototype.componentWillRender=function(){var e;if(((e=this.label)!==null&&e!==void 0?e:"")===""){this.label=labelFromName(this.name)}};e.prototype.render=function(){
|
|
12
19
|
// the item is an entry of the `menu` the mds-dropdown of the controller opens:
|
|
13
20
|
// without the role axe rejects it as a child of that menu (aria-required-children)
|
|
14
|
-
return h(Host,{key:"
|
|
21
|
+
return h(Host,{key:"9c661ea96838a5a35e21542a8ab828de72b72232",onClick:this.handleClick,role:"menuitem",style:this.previewStyle()},h("mds-button",{key:"d32ad7640495df018039cee369f6d2030f4c603a",icon:this.selected?miBaselineCheckCircle:miOutlineCircle,variant:"dark",tone:"text",label:this.label}),h("span",{key:"92454f1d894be41e1910c88ad4e87251273bc0a7","aria-hidden":"true",class:"theme-preview"},h("span",{key:"050ec8db2ed0e2da24d734bb35d7af76182c5863",class:"theme-color theme-color--variant-primary"}),h("span",{key:"885fb77194d5db974e6381dc63213e6fb92bf373",class:"theme-color theme-color--status-success"}),h("span",{key:"578000638746de1cee794b4eea58390052a6e36d",class:"theme-color theme-color--status-warning"}),h("span",{key:"10b15e7fd8e18327bd9c868e5b7950ec544b0e41",class:"theme-color theme-color--status-error"})))};return e}();MdsPrefThemeItem.style=mdsPrefThemeItemCss();export{MdsPrefThemeItem as mds_pref_theme_item};
|
|
@@ -7,7 +7,12 @@ var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.leng
|
|
|
7
7
|
* today's default removes the attribute instead of freezing that default into
|
|
8
8
|
* the consumer's markup, which would keep a later change of default from
|
|
9
9
|
* reaching anybody who never chose.
|
|
10
|
-
*/var preferenceCornerShapeChoiceType=__spreadArray(__spreadArray([],preferenceCornerShapeType,true),["default"],false);var label$3="Θέμα";var localeEl={label:label$3};var label$2="Theme";var localeEn={label:label$2};var label$1="Tema";var localeEs={label:label$1};var label="Tema";var localeIt={label:label};var mdsPrefThemeCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-dropdown,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{display:grid;gap:calc(var(--spacing,.0025rem)*400)}.menu{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.mds-pref-theme-dropdown{gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*400)}.item{--mds-tab-item-default-color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));flex-basis:0;flex-grow:1}.item--theme{cursor:pointer}.item--auto,.item--theme{--mds-tab-item-selected-color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}"};
|
|
10
|
+
*/var preferenceCornerShapeChoiceType=__spreadArray(__spreadArray([],preferenceCornerShapeType,true),["default"],false);var label$3="Θέμα";var localeEl={label:label$3};var label$2="Theme";var localeEn={label:label$2};var label$1="Tema";var localeEs={label:label$1};var label="Tema";var localeIt={label:label};var mdsPrefThemeCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-dropdown,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{display:grid;gap:calc(var(--spacing,.0025rem)*400)}.menu{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.mds-pref-theme-dropdown{gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*400)}.item{--mds-tab-item-default-color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));flex-basis:0;flex-grow:1}.item--theme{cursor:pointer}.item--auto,.item--theme{--mds-tab-item-selected-color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}"};
|
|
11
|
+
/**
|
|
12
|
+
* `default` is the old name of `business`, the base theme (the `themes` map of
|
|
13
|
+
* semantic.config.ts, #692): the same theme, so an item of either name stands for it. The
|
|
14
|
+
* component keeps `default` as the default of `name` until the next major makes it `business`.
|
|
15
|
+
*/var sameTheme=function(e,t){var r=function(e){return e==="default"?"business":e};return r(e)===r(t)};var MdsPrefTheme=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.themeChangeEvent=createEvent(this,"mdsPrefThemeChange",7);this.prefChangeEvent=createEvent(this,"mdsPrefChange",7);this.showDropdown=false;this.localStorageAliasThemeName="mdsPrefTheme";this.localStorageAliasThemeScheme="mdsPrefThemeScheme";this.localStorageAliasCornerShape="mdsPrefCornerShape";this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.clasNameThemeNamePrefix="pref-theme-";this.previousName=null;this.customPropertyAliasThemeScheme="--magma-pref-theme-scheme";this.customPropertyAliasThemeName="--magma-pref-theme";this.schemeSet={light:"pref-theme-scheme-light",dark:"pref-theme-scheme-dark",all:"pref-theme-scheme-all"};
|
|
11
16
|
/**
|
|
12
17
|
* Specifies the theme name attribute
|
|
13
18
|
* A string representing the theme name, in lowercase kebab-case.
|
|
@@ -28,9 +33,9 @@ this.isThemeName=function(e){return e!=null&&/^[a-z]+(-[a-z]+)*$/.test(e)&&!MODE
|
|
|
28
33
|
/**
|
|
29
34
|
* The text of the trigger: the label of the item for the active theme, as the open list
|
|
30
35
|
* shows it, or, when no item matches, the label an item derives from the name.
|
|
31
|
-
*/this.triggerLabel=function(){var e=Array.from(t.element.querySelectorAll("mds-pref-theme-item")).find((function(e){var r,a;return((a=(r=e.name)!==null&&r!==void 0?r:e.getAttribute("name"))!==null&&a!==void 0?a:"default"
|
|
36
|
+
*/this.triggerLabel=function(){var e=Array.from(t.element.querySelectorAll("mds-pref-theme-item")).find((function(e){var r,a;return sameTheme((a=(r=e.name)!==null&&r!==void 0?r:e.getAttribute("name"))!==null&&a!==void 0?a:"default",t.name)}));return(e===null||e===void 0?void 0:e.label)||(e===null||e===void 0?void 0:e.getAttribute("label"))||labelFromName(t.name)};this.toggleDropdown=function(){t.showDropdown=!t.showDropdown};this.hideThemeDropdownSelect=function(){t.showDropdown=false};this.changeThemeItem=function(){t.themeItems.forEach((function(e){e.selected=false}))};
|
|
32
37
|
// the items, read again when they change, mark the theme in place
|
|
33
|
-
this.checkThemeSelect=function(){t.themeItems=t.element.querySelectorAll("mds-pref-theme-item");t.themeItems.forEach((function(e){e.selected=e.name
|
|
38
|
+
this.checkThemeSelect=function(){t.themeItems=t.element.querySelectorAll("mds-pref-theme-item");t.themeItems.forEach((function(e){e.selected=sameTheme(e.name,t.name)}))};this.setTheme=function(e,r){
|
|
34
39
|
// a theme the component cannot write is ignored, neither applied nor stored: it used to throw,
|
|
35
40
|
// and an unknown scheme was written as a class named `undefined` and stored (#825)
|
|
36
41
|
if(!t.isThemeName(e)){console.warn('mds-pref-theme: ignoring the invalid theme name "'.concat(e,'", a kebab-case name that is no mode or scheme name'));return}if(!t.isScheme(r)){console.warn('mds-pref-theme: ignoring the invalid scheme "'.concat(r,'", use one of: ').concat(Object.keys(t.schemeSet).join(", ")));return}t.name=e;t.scheme=r;
|
|
@@ -70,4 +75,4 @@ if(MODE_VALUES.includes(e)||e==="scheme"||e.startsWith("scheme-"))return;localSt
|
|
|
70
75
|
this.itemsObserver=new MutationObserver((function(){return forceUpdate(e.element)}));this.itemsObserver.observe(this.element,{attributeFilter:["label","name"],childList:true,subtree:true})};e.prototype.componentDidLoad=function(){this.checkThemeSelect()};e.prototype.disconnectedCallback=function(){var e;(e=this.itemsObserver)===null||e===void 0?void 0:e.disconnect();this.itemsObserver=undefined};e.prototype.componentWillRender=function(){var e,t,r;this.userThemeName=this.storedChoice(this.localStorageAliasThemeName,this.isThemeName);this.userThemeScheme=this.storedChoice(this.localStorageAliasThemeScheme,this.isScheme);this.setTheme((e=this.userThemeName)!==null&&e!==void 0?e:this.name,(t=this.userThemeScheme)!==null&&t!==void 0?t:this.scheme);this.userCornerShape=this.storedChoice(this.localStorageAliasCornerShape,this.isCornerShape);this.setCornerShape((r=this.userCornerShape)!==null&&r!==void 0?r:this.cornerShape)};
|
|
71
76
|
// A pick reaches the component from any item, one added after load too: the listener sits on
|
|
72
77
|
// the host, where the event of the item bubbles, instead of on each item found on load (#826)
|
|
73
|
-
e.prototype.handleItemSelect=function(e){this.changeThemeItem();this.currentSelectedItem=e.target;this.currentSelectedItem.selected=true;var t=e.detail.name.toLowerCase();var r=e.detail.scheme.toLowerCase();this.themeChangeEvent.emit({name:t,scheme:r});this.showDropdown=false;this.setTheme(t,r)};e.prototype.render=function(){return h(Host,{key:"
|
|
78
|
+
e.prototype.handleItemSelect=function(e){this.changeThemeItem();this.currentSelectedItem=e.target;this.currentSelectedItem.selected=true;var t=e.detail.name.toLowerCase();var r=e.detail.scheme.toLowerCase();this.themeChangeEvent.emit({name:t,scheme:r});this.showDropdown=false;this.setTheme(t,r)};e.prototype.render=function(){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})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{name:[{handleNameChange:0}],scheme:[{handleSchemeChange:0}],cornerShape:[{handleCornerShapeChange:0}]}},enumerable:false,configurable:true});return e}();MdsPrefTheme.style=mdsPrefThemeCss();export{MdsPrefTheme as mds_pref_theme};
|
package/dist/hydrate/index.js
CHANGED
|
@@ -23099,7 +23099,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
23099
23099
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
23100
23100
|
|
|
23101
23101
|
/*!
|
|
23102
|
-
* GSAP 3.15.
|
|
23102
|
+
* GSAP 3.15.1
|
|
23103
23103
|
* https://gsap.com
|
|
23104
23104
|
*
|
|
23105
23105
|
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
@@ -23519,7 +23519,8 @@ _postAddChecks = function _postAddChecks(timeline, child) {
|
|
|
23519
23519
|
},
|
|
23520
23520
|
_addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {
|
|
23521
23521
|
child.parent && _removeFromParent(child);
|
|
23522
|
-
child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay);
|
|
23522
|
+
child._start = _roundPrecise((_isNumber(position) ? position : !position && _isFromOrFromStart(child) && (!timeline._last || timeline._last._start >= timeline._time) ? timeline._last ? timeline._last._start : timeline._time : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay); // a from()/startAt tween's internal _startAt gets added and then immediately removed, so skip _parsePosition() which calls duration() (a full walk of a dirty timeline, making large from() timelines O(n²)). Dropping it at the _last child's _start keeps the sorted insert O(1), and the playhead check avoids a render in _postAddChecks().
|
|
23523
|
+
|
|
23523
23524
|
child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));
|
|
23524
23525
|
|
|
23525
23526
|
_addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0);
|
|
@@ -24386,7 +24387,7 @@ _tickerActive,
|
|
|
24386
24387
|
frame = ++_self.frame;
|
|
24387
24388
|
_delta = time - _self.time * 1000;
|
|
24388
24389
|
_self.time = time = time / 1000;
|
|
24389
|
-
_nextTime += overlap + (overlap >= _gap ?
|
|
24390
|
+
_nextTime += overlap + (overlap >= _gap ? 0 : _gap - overlap);
|
|
24390
24391
|
dispatch = 1;
|
|
24391
24392
|
}
|
|
24392
24393
|
|
|
@@ -24830,15 +24831,17 @@ var Animation = /*#__PURE__*/function () {
|
|
|
24830
24831
|
return this;
|
|
24831
24832
|
}
|
|
24832
24833
|
|
|
24833
|
-
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime
|
|
24834
|
-
|
|
24834
|
+
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime,
|
|
24835
|
+
// make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.
|
|
24836
|
+
wasReversed = this._rts < 0; // future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called.
|
|
24835
24837
|
//(+value < 0 && this._rts >= 0) && _callback(this, "onReverse", true);
|
|
24836
24838
|
// prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.
|
|
24837
24839
|
|
|
24838
24840
|
this._rts = +value || 0;
|
|
24839
24841
|
this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.
|
|
24840
24842
|
|
|
24841
|
-
|
|
24843
|
+
var tDur = this.totalDuration();
|
|
24844
|
+
if (wasReversed !== this._rts < 0 || tTime > 0 && tTime < tDur) this.totalTime(_clamp(-Math.abs(this._delay), tDur, tTime), suppressEvents !== false);
|
|
24842
24845
|
|
|
24843
24846
|
_setEnd(this); // if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here.
|
|
24844
24847
|
|
|
@@ -24864,8 +24867,27 @@ var Animation = /*#__PURE__*/function () {
|
|
|
24864
24867
|
_wake();
|
|
24865
24868
|
|
|
24866
24869
|
this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.
|
|
24870
|
+
// At progress===1, nudge _tTime so the resume render runs (autoRemoveChildren / progress(1).pause().play()). Don't suppress if a never-rendered zero-duration child (e.g. delayedCall(0) scheduled while idle) sits on the playhead — suppress would complete it silently and it would never fire.
|
|
24871
|
+
|
|
24872
|
+
var tTime = this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime,
|
|
24873
|
+
suppress = this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum,
|
|
24874
|
+
child;
|
|
24875
|
+
|
|
24876
|
+
if (suppress) {
|
|
24877
|
+
this._tTime -= _tinyNum;
|
|
24878
|
+
child = this._first;
|
|
24879
|
+
|
|
24880
|
+
while (child) {
|
|
24881
|
+
if (!child._dur && child._zTime < 0 && child._ts && child._start <= tTime + _tinyNum) {
|
|
24882
|
+
suppress = false;
|
|
24883
|
+
break;
|
|
24884
|
+
}
|
|
24867
24885
|
|
|
24868
|
-
|
|
24886
|
+
child = child._next;
|
|
24887
|
+
}
|
|
24888
|
+
}
|
|
24889
|
+
|
|
24890
|
+
this.totalTime(tTime, suppress);
|
|
24869
24891
|
}
|
|
24870
24892
|
}
|
|
24871
24893
|
|
|
@@ -26228,13 +26250,14 @@ _parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) {
|
|
|
26228
26250
|
_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function (name) {
|
|
26229
26251
|
return _staggerPropsToSkip[name] = 1;
|
|
26230
26252
|
});
|
|
26253
|
+
|
|
26254
|
+
_staggerTweenProps = _staggerTweenProps.split(",");
|
|
26231
26255
|
/*
|
|
26232
26256
|
* --------------------------------------------------------------------------------------
|
|
26233
26257
|
* TWEEN
|
|
26234
26258
|
* --------------------------------------------------------------------------------------
|
|
26235
26259
|
*/
|
|
26236
26260
|
|
|
26237
|
-
|
|
26238
26261
|
var Tween = /*#__PURE__*/function (_Animation2) {
|
|
26239
26262
|
_inheritsLoose(Tween, _Animation2);
|
|
26240
26263
|
|
|
@@ -27117,6 +27140,11 @@ var Context = /*#__PURE__*/function () {
|
|
|
27117
27140
|
// previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead.
|
|
27118
27141
|
_media[i].id === this.id && _media.splice(i, 1);
|
|
27119
27142
|
}
|
|
27143
|
+
|
|
27144
|
+
this._mqs && this._mqs.forEach(function (mq) {
|
|
27145
|
+
return mq.removeListener ? mq.removeListener(_onMediaChange) : mq.removeEventListener("change", _onMediaChange);
|
|
27146
|
+
});
|
|
27147
|
+
this._mqs = null;
|
|
27120
27148
|
}
|
|
27121
27149
|
} // killWithCleanup() {
|
|
27122
27150
|
// this.kill();
|
|
@@ -27165,6 +27193,7 @@ var MatchMedia = /*#__PURE__*/function () {
|
|
|
27165
27193
|
_media.indexOf(context) < 0 && _media.push(context);
|
|
27166
27194
|
(cond[p] = mq.matches) && (active = 1);
|
|
27167
27195
|
mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener("change", _onMediaChange);
|
|
27196
|
+
(context._mqs || (context._mqs = [])).push(mq);
|
|
27168
27197
|
}
|
|
27169
27198
|
}
|
|
27170
27199
|
}
|
|
@@ -27543,12 +27572,12 @@ var gsap = _gsap.registerPlugin({
|
|
|
27543
27572
|
}
|
|
27544
27573
|
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.
|
|
27545
27574
|
|
|
27546
|
-
Tween.version = Timeline.version = gsap.version = "3.15.
|
|
27575
|
+
Tween.version = Timeline.version = gsap.version = "3.15.1";
|
|
27547
27576
|
_coreReady = 1;
|
|
27548
27577
|
_windowExists$1() && _wake();
|
|
27549
27578
|
|
|
27550
27579
|
/*!
|
|
27551
|
-
* CSSPlugin 3.15.
|
|
27580
|
+
* CSSPlugin 3.15.1
|
|
27552
27581
|
* https://gsap.com
|
|
27553
27582
|
*
|
|
27554
27583
|
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
@@ -43648,6 +43677,15 @@ var localeIt$b = {
|
|
|
43648
43677
|
|
|
43649
43678
|
const mdsPrefThemeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-dropdown,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{display:grid;gap:calc(var(--spacing,.0025rem)*400)}.menu{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.mds-pref-theme-dropdown{gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*400)}.item{--mds-tab-item-default-color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));flex-basis:0;flex-grow:1}.item--theme{cursor:pointer}.item--auto,.item--theme{--mds-tab-item-selected-color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}`;
|
|
43650
43679
|
|
|
43680
|
+
/**
|
|
43681
|
+
* `default` is the old name of `business`, the base theme (the `themes` map of
|
|
43682
|
+
* semantic.config.ts, #692): the same theme, so an item of either name stands for it. The
|
|
43683
|
+
* component keeps `default` as the default of `name` until the next major makes it `business`.
|
|
43684
|
+
*/
|
|
43685
|
+
const sameTheme = (a, b) => {
|
|
43686
|
+
const base = (name) => (name === 'default' ? 'business' : name);
|
|
43687
|
+
return base(a) === base(b);
|
|
43688
|
+
};
|
|
43651
43689
|
/**
|
|
43652
43690
|
* @slot - Add `mds-pref-theme-item` element/s.
|
|
43653
43691
|
* @category preferences
|
|
@@ -43713,7 +43751,7 @@ class MdsPrefTheme {
|
|
|
43713
43751
|
* shows it, or, when no item matches, the label an item derives from the name.
|
|
43714
43752
|
*/
|
|
43715
43753
|
this.triggerLabel = () => {
|
|
43716
|
-
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'
|
|
43754
|
+
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); });
|
|
43717
43755
|
return (item === null || item === void 0 ? void 0 : item.label) || (item === null || item === void 0 ? void 0 : item.getAttribute('label')) || labelFromName(this.name);
|
|
43718
43756
|
};
|
|
43719
43757
|
this.toggleDropdown = () => {
|
|
@@ -43731,7 +43769,7 @@ class MdsPrefTheme {
|
|
|
43731
43769
|
this.checkThemeSelect = () => {
|
|
43732
43770
|
this.themeItems = this.element.querySelectorAll('mds-pref-theme-item');
|
|
43733
43771
|
this.themeItems.forEach((element) => {
|
|
43734
|
-
element.selected = element.name
|
|
43772
|
+
element.selected = sameTheme(element.name, this.name);
|
|
43735
43773
|
});
|
|
43736
43774
|
};
|
|
43737
43775
|
this.setTheme = (name, scheme) => {
|
|
@@ -43890,7 +43928,7 @@ class MdsPrefTheme {
|
|
|
43890
43928
|
this.setTheme(name, scheme);
|
|
43891
43929
|
}
|
|
43892
43930
|
render() {
|
|
43893
|
-
return (hAsync(Host, { key: '
|
|
43931
|
+
return (hAsync(Host, { key: 'd43c9d9bfaac3c3f997748228db2fccafb1307d2' }, hAsync("div", { key: 'ddd730c6efb781df542701cbdc21d0874caf4c0a', class: "menu" }, hAsync("mds-text", { key: 'ab88bdac3ca42505844dc35ab5a587fce8596c62', class: "info", typography: "caption" }, hAsync("b", { key: 'acdc9a0ba564059ef013cb547f4e2eeda63ed2f2' }, this.t.get('label'))), hAsync("mds-tab", { key: 'd7c052bcd02f7858ba0e9b2640e49c91530febc5', fill: true, size: this.size }, hAsync("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() }))), hAsync("mds-dropdown", { key: '23ee30b64e2faec6f3f40e2c6d3a6e2a31161dbe', class: "mds-pref-theme-dropdown", target: "#mds-pref-theme-nav", interaction: "none", visible: this.showDropdown, onMdsDropdownHide: this.hideThemeDropdownSelect }, hAsync("slot", { key: 'd26613bc60c31fde855cfcbb2935b91b34c7db3f', onSlotchange: this.checkThemeSelect }))));
|
|
43894
43932
|
}
|
|
43895
43933
|
get element() { return getElement(this); }
|
|
43896
43934
|
static get watchers() { return {
|
|
@@ -43921,8 +43959,10 @@ class MdsPrefTheme {
|
|
|
43921
43959
|
}; }
|
|
43922
43960
|
}
|
|
43923
43961
|
|
|
43924
|
-
const mdsPrefThemeItemCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{
|
|
43962
|
+
const mdsPrefThemeItemCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--private-theme-wash,var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--private-theme-accent,var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15));box-sizing:border-box;display:inline-flex;flex:none;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*100);height:calc(var(--spacing,.0025rem)*600);margin:1px;padding:calc(var(--spacing,.0025rem)*100);width:calc(var(--spacing,.0025rem)*600)}.theme-color,.theme-preview{background-color:var(--mds-pref-theme-item-color-background,rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-full,var(--radius-full,1000px))}.theme-color{height:calc(var(--spacing,.0025rem)*150);position:relative;width:calc(var(--spacing,.0025rem)*150)}.theme-color:after{border-radius:inherit;box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15)) inset;content:"";display:flex;inset:0;position:absolute}.theme-color--variant-primary{background-color:var(--mds-pref-theme-item-color-variant-primary,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))))}.theme-color--status-success{background-color:var(--mds-pref-theme-item-color-status-success,rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57))))}.theme-color--status-warning{background-color:var(--mds-pref-theme-item-color-status-warning,rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))))}.theme-color--status-error{background-color:var(--mds-pref-theme-item-color-status-error,rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65))))}`;
|
|
43925
43963
|
|
|
43964
|
+
/** The names mds-pref-theme accepts: a theme's preview custom properties carry the name. */
|
|
43965
|
+
const THEME_NAME = /^[a-z]+(-[a-z]+)*$/;
|
|
43926
43966
|
/**
|
|
43927
43967
|
* @parent mds-pref-theme
|
|
43928
43968
|
*/
|
|
@@ -43931,8 +43971,9 @@ class MdsPrefThemeItem {
|
|
|
43931
43971
|
registerInstance(this, hostRef);
|
|
43932
43972
|
this.selectThemeEvent = createEvent(this, "mdsPrefThemeItemSelect", 7);
|
|
43933
43973
|
/**
|
|
43934
|
-
* Specifies the theme name
|
|
43935
|
-
*
|
|
43974
|
+
* Specifies the theme name; the swatch shows the preview that theme publishes,
|
|
43975
|
+
* `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`
|
|
43976
|
+
* @example 'editorial'
|
|
43936
43977
|
*/
|
|
43937
43978
|
this.name = 'default';
|
|
43938
43979
|
/**
|
|
@@ -43946,6 +43987,17 @@ class MdsPrefThemeItem {
|
|
|
43946
43987
|
this.handleClick = () => {
|
|
43947
43988
|
this.selectThemeEvent.emit({ name: this.name, scheme: this.scheme });
|
|
43948
43989
|
};
|
|
43990
|
+
/**
|
|
43991
|
+
* The preview of the theme the item names, which the styles of that theme publish on the page
|
|
43992
|
+
* (`--magma-preview-<name>-{wash,accent}`, #692), so the item shows its own theme and not the
|
|
43993
|
+
* active one. The stylesheet falls back to the active theme when a theme publishes none.
|
|
43994
|
+
*/
|
|
43995
|
+
this.previewStyle = () => THEME_NAME.test(this.name)
|
|
43996
|
+
? {
|
|
43997
|
+
'--private-theme-wash': `var(--magma-preview-${this.name}-wash)`,
|
|
43998
|
+
'--private-theme-accent': `var(--magma-preview-${this.name}-accent)`,
|
|
43999
|
+
}
|
|
44000
|
+
: undefined;
|
|
43949
44001
|
}
|
|
43950
44002
|
componentWillRender() {
|
|
43951
44003
|
var _a;
|
|
@@ -43957,7 +44009,7 @@ class MdsPrefThemeItem {
|
|
|
43957
44009
|
return (
|
|
43958
44010
|
// the item is an entry of the `menu` the mds-dropdown of the controller opens:
|
|
43959
44011
|
// without the role axe rejects it as a child of that menu (aria-required-children)
|
|
43960
|
-
hAsync(Host, { key: '
|
|
44012
|
+
hAsync(Host, { key: '9c661ea96838a5a35e21542a8ab828de72b72232', onClick: this.handleClick, role: "menuitem", style: this.previewStyle() }, hAsync("mds-button", { key: 'd32ad7640495df018039cee369f6d2030f4c603a', icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text", label: this.label }), hAsync("span", { key: '92454f1d894be41e1910c88ad4e87251273bc0a7', "aria-hidden": "true", class: "theme-preview" }, hAsync("span", { key: '050ec8db2ed0e2da24d734bb35d7af76182c5863', class: "theme-color theme-color--variant-primary" }), hAsync("span", { key: '885fb77194d5db974e6381dc63213e6fb92bf373', class: "theme-color theme-color--status-success" }), hAsync("span", { key: '578000638746de1cee794b4eea58390052a6e36d', class: "theme-color theme-color--status-warning" }), hAsync("span", { key: '10b15e7fd8e18327bd9c868e5b7950ec544b0e41', class: "theme-color theme-color--status-error" }))));
|
|
43961
44013
|
}
|
|
43962
44014
|
static get style() { return mdsPrefThemeItemCss(); }
|
|
43963
44015
|
static get cmpMeta() { return {
|
package/dist/hydrate/index.mjs
CHANGED
|
@@ -23097,7 +23097,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
23097
23097
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
23098
23098
|
|
|
23099
23099
|
/*!
|
|
23100
|
-
* GSAP 3.15.
|
|
23100
|
+
* GSAP 3.15.1
|
|
23101
23101
|
* https://gsap.com
|
|
23102
23102
|
*
|
|
23103
23103
|
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
@@ -23517,7 +23517,8 @@ _postAddChecks = function _postAddChecks(timeline, child) {
|
|
|
23517
23517
|
},
|
|
23518
23518
|
_addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {
|
|
23519
23519
|
child.parent && _removeFromParent(child);
|
|
23520
|
-
child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay);
|
|
23520
|
+
child._start = _roundPrecise((_isNumber(position) ? position : !position && _isFromOrFromStart(child) && (!timeline._last || timeline._last._start >= timeline._time) ? timeline._last ? timeline._last._start : timeline._time : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay); // a from()/startAt tween's internal _startAt gets added and then immediately removed, so skip _parsePosition() which calls duration() (a full walk of a dirty timeline, making large from() timelines O(n²)). Dropping it at the _last child's _start keeps the sorted insert O(1), and the playhead check avoids a render in _postAddChecks().
|
|
23521
|
+
|
|
23521
23522
|
child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));
|
|
23522
23523
|
|
|
23523
23524
|
_addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0);
|
|
@@ -24384,7 +24385,7 @@ _tickerActive,
|
|
|
24384
24385
|
frame = ++_self.frame;
|
|
24385
24386
|
_delta = time - _self.time * 1000;
|
|
24386
24387
|
_self.time = time = time / 1000;
|
|
24387
|
-
_nextTime += overlap + (overlap >= _gap ?
|
|
24388
|
+
_nextTime += overlap + (overlap >= _gap ? 0 : _gap - overlap);
|
|
24388
24389
|
dispatch = 1;
|
|
24389
24390
|
}
|
|
24390
24391
|
|
|
@@ -24828,15 +24829,17 @@ var Animation = /*#__PURE__*/function () {
|
|
|
24828
24829
|
return this;
|
|
24829
24830
|
}
|
|
24830
24831
|
|
|
24831
|
-
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime
|
|
24832
|
-
|
|
24832
|
+
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime,
|
|
24833
|
+
// make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.
|
|
24834
|
+
wasReversed = this._rts < 0; // future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called.
|
|
24833
24835
|
//(+value < 0 && this._rts >= 0) && _callback(this, "onReverse", true);
|
|
24834
24836
|
// prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.
|
|
24835
24837
|
|
|
24836
24838
|
this._rts = +value || 0;
|
|
24837
24839
|
this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.
|
|
24838
24840
|
|
|
24839
|
-
|
|
24841
|
+
var tDur = this.totalDuration();
|
|
24842
|
+
if (wasReversed !== this._rts < 0 || tTime > 0 && tTime < tDur) this.totalTime(_clamp(-Math.abs(this._delay), tDur, tTime), suppressEvents !== false);
|
|
24840
24843
|
|
|
24841
24844
|
_setEnd(this); // if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here.
|
|
24842
24845
|
|
|
@@ -24862,8 +24865,27 @@ var Animation = /*#__PURE__*/function () {
|
|
|
24862
24865
|
_wake();
|
|
24863
24866
|
|
|
24864
24867
|
this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.
|
|
24868
|
+
// At progress===1, nudge _tTime so the resume render runs (autoRemoveChildren / progress(1).pause().play()). Don't suppress if a never-rendered zero-duration child (e.g. delayedCall(0) scheduled while idle) sits on the playhead — suppress would complete it silently and it would never fire.
|
|
24869
|
+
|
|
24870
|
+
var tTime = this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime,
|
|
24871
|
+
suppress = this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum,
|
|
24872
|
+
child;
|
|
24873
|
+
|
|
24874
|
+
if (suppress) {
|
|
24875
|
+
this._tTime -= _tinyNum;
|
|
24876
|
+
child = this._first;
|
|
24877
|
+
|
|
24878
|
+
while (child) {
|
|
24879
|
+
if (!child._dur && child._zTime < 0 && child._ts && child._start <= tTime + _tinyNum) {
|
|
24880
|
+
suppress = false;
|
|
24881
|
+
break;
|
|
24882
|
+
}
|
|
24865
24883
|
|
|
24866
|
-
|
|
24884
|
+
child = child._next;
|
|
24885
|
+
}
|
|
24886
|
+
}
|
|
24887
|
+
|
|
24888
|
+
this.totalTime(tTime, suppress);
|
|
24867
24889
|
}
|
|
24868
24890
|
}
|
|
24869
24891
|
|
|
@@ -26226,13 +26248,14 @@ _parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) {
|
|
|
26226
26248
|
_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function (name) {
|
|
26227
26249
|
return _staggerPropsToSkip[name] = 1;
|
|
26228
26250
|
});
|
|
26251
|
+
|
|
26252
|
+
_staggerTweenProps = _staggerTweenProps.split(",");
|
|
26229
26253
|
/*
|
|
26230
26254
|
* --------------------------------------------------------------------------------------
|
|
26231
26255
|
* TWEEN
|
|
26232
26256
|
* --------------------------------------------------------------------------------------
|
|
26233
26257
|
*/
|
|
26234
26258
|
|
|
26235
|
-
|
|
26236
26259
|
var Tween = /*#__PURE__*/function (_Animation2) {
|
|
26237
26260
|
_inheritsLoose(Tween, _Animation2);
|
|
26238
26261
|
|
|
@@ -27115,6 +27138,11 @@ var Context = /*#__PURE__*/function () {
|
|
|
27115
27138
|
// previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead.
|
|
27116
27139
|
_media[i].id === this.id && _media.splice(i, 1);
|
|
27117
27140
|
}
|
|
27141
|
+
|
|
27142
|
+
this._mqs && this._mqs.forEach(function (mq) {
|
|
27143
|
+
return mq.removeListener ? mq.removeListener(_onMediaChange) : mq.removeEventListener("change", _onMediaChange);
|
|
27144
|
+
});
|
|
27145
|
+
this._mqs = null;
|
|
27118
27146
|
}
|
|
27119
27147
|
} // killWithCleanup() {
|
|
27120
27148
|
// this.kill();
|
|
@@ -27163,6 +27191,7 @@ var MatchMedia = /*#__PURE__*/function () {
|
|
|
27163
27191
|
_media.indexOf(context) < 0 && _media.push(context);
|
|
27164
27192
|
(cond[p] = mq.matches) && (active = 1);
|
|
27165
27193
|
mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener("change", _onMediaChange);
|
|
27194
|
+
(context._mqs || (context._mqs = [])).push(mq);
|
|
27166
27195
|
}
|
|
27167
27196
|
}
|
|
27168
27197
|
}
|
|
@@ -27541,12 +27570,12 @@ var gsap = _gsap.registerPlugin({
|
|
|
27541
27570
|
}
|
|
27542
27571
|
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.
|
|
27543
27572
|
|
|
27544
|
-
Tween.version = Timeline.version = gsap.version = "3.15.
|
|
27573
|
+
Tween.version = Timeline.version = gsap.version = "3.15.1";
|
|
27545
27574
|
_coreReady = 1;
|
|
27546
27575
|
_windowExists$1() && _wake();
|
|
27547
27576
|
|
|
27548
27577
|
/*!
|
|
27549
|
-
* CSSPlugin 3.15.
|
|
27578
|
+
* CSSPlugin 3.15.1
|
|
27550
27579
|
* https://gsap.com
|
|
27551
27580
|
*
|
|
27552
27581
|
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
@@ -43646,6 +43675,15 @@ var localeIt$b = {
|
|
|
43646
43675
|
|
|
43647
43676
|
const mdsPrefThemeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-dropdown,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{display:grid;gap:calc(var(--spacing,.0025rem)*400)}.menu{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.mds-pref-theme-dropdown{gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*400)}.item{--mds-tab-item-default-color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));flex-basis:0;flex-grow:1}.item--theme{cursor:pointer}.item--auto,.item--theme{--mds-tab-item-selected-color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}`;
|
|
43648
43677
|
|
|
43678
|
+
/**
|
|
43679
|
+
* `default` is the old name of `business`, the base theme (the `themes` map of
|
|
43680
|
+
* semantic.config.ts, #692): the same theme, so an item of either name stands for it. The
|
|
43681
|
+
* component keeps `default` as the default of `name` until the next major makes it `business`.
|
|
43682
|
+
*/
|
|
43683
|
+
const sameTheme = (a, b) => {
|
|
43684
|
+
const base = (name) => (name === 'default' ? 'business' : name);
|
|
43685
|
+
return base(a) === base(b);
|
|
43686
|
+
};
|
|
43649
43687
|
/**
|
|
43650
43688
|
* @slot - Add `mds-pref-theme-item` element/s.
|
|
43651
43689
|
* @category preferences
|
|
@@ -43711,7 +43749,7 @@ class MdsPrefTheme {
|
|
|
43711
43749
|
* shows it, or, when no item matches, the label an item derives from the name.
|
|
43712
43750
|
*/
|
|
43713
43751
|
this.triggerLabel = () => {
|
|
43714
|
-
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'
|
|
43752
|
+
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); });
|
|
43715
43753
|
return (item === null || item === void 0 ? void 0 : item.label) || (item === null || item === void 0 ? void 0 : item.getAttribute('label')) || labelFromName(this.name);
|
|
43716
43754
|
};
|
|
43717
43755
|
this.toggleDropdown = () => {
|
|
@@ -43729,7 +43767,7 @@ class MdsPrefTheme {
|
|
|
43729
43767
|
this.checkThemeSelect = () => {
|
|
43730
43768
|
this.themeItems = this.element.querySelectorAll('mds-pref-theme-item');
|
|
43731
43769
|
this.themeItems.forEach((element) => {
|
|
43732
|
-
element.selected = element.name
|
|
43770
|
+
element.selected = sameTheme(element.name, this.name);
|
|
43733
43771
|
});
|
|
43734
43772
|
};
|
|
43735
43773
|
this.setTheme = (name, scheme) => {
|
|
@@ -43888,7 +43926,7 @@ class MdsPrefTheme {
|
|
|
43888
43926
|
this.setTheme(name, scheme);
|
|
43889
43927
|
}
|
|
43890
43928
|
render() {
|
|
43891
|
-
return (hAsync(Host, { key: '
|
|
43929
|
+
return (hAsync(Host, { key: 'd43c9d9bfaac3c3f997748228db2fccafb1307d2' }, hAsync("div", { key: 'ddd730c6efb781df542701cbdc21d0874caf4c0a', class: "menu" }, hAsync("mds-text", { key: 'ab88bdac3ca42505844dc35ab5a587fce8596c62', class: "info", typography: "caption" }, hAsync("b", { key: 'acdc9a0ba564059ef013cb547f4e2eeda63ed2f2' }, this.t.get('label'))), hAsync("mds-tab", { key: 'd7c052bcd02f7858ba0e9b2640e49c91530febc5', fill: true, size: this.size }, hAsync("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() }))), hAsync("mds-dropdown", { key: '23ee30b64e2faec6f3f40e2c6d3a6e2a31161dbe', class: "mds-pref-theme-dropdown", target: "#mds-pref-theme-nav", interaction: "none", visible: this.showDropdown, onMdsDropdownHide: this.hideThemeDropdownSelect }, hAsync("slot", { key: 'd26613bc60c31fde855cfcbb2935b91b34c7db3f', onSlotchange: this.checkThemeSelect }))));
|
|
43892
43930
|
}
|
|
43893
43931
|
get element() { return getElement(this); }
|
|
43894
43932
|
static get watchers() { return {
|
|
@@ -43919,8 +43957,10 @@ class MdsPrefTheme {
|
|
|
43919
43957
|
}; }
|
|
43920
43958
|
}
|
|
43921
43959
|
|
|
43922
|
-
const mdsPrefThemeItemCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{
|
|
43960
|
+
const mdsPrefThemeItemCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-pref-theme-item-color-background:rgb(var(--private-theme-wash,var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));--mds-pref-theme-item-color-status-error:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-pref-theme-item-color-status-success:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-pref-theme-item-color-status-warning:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-pref-theme-item-color-variant-primary:rgb(var(--private-theme-accent,var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));align-items:center;cursor:pointer;display:flex;gap:calc(var(--spacing,.0025rem)*400);justify-content:space-between}.theme-preview{box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15));box-sizing:border-box;display:inline-flex;flex:none;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*100);height:calc(var(--spacing,.0025rem)*600);margin:1px;padding:calc(var(--spacing,.0025rem)*100);width:calc(var(--spacing,.0025rem)*600)}.theme-color,.theme-preview{background-color:var(--mds-pref-theme-item-color-background,rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-full,var(--radius-full,1000px))}.theme-color{height:calc(var(--spacing,.0025rem)*150);position:relative;width:calc(var(--spacing,.0025rem)*150)}.theme-color:after{border-radius:inherit;box-shadow:var(--shadow-ring-weak,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.15)) inset;content:"";display:flex;inset:0;position:absolute}.theme-color--variant-primary{background-color:var(--mds-pref-theme-item-color-variant-primary,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))))}.theme-color--status-success{background-color:var(--mds-pref-theme-item-color-status-success,rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57))))}.theme-color--status-warning{background-color:var(--mds-pref-theme-item-color-status-warning,rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))))}.theme-color--status-error{background-color:var(--mds-pref-theme-item-color-status-error,rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65))))}`;
|
|
43923
43961
|
|
|
43962
|
+
/** The names mds-pref-theme accepts: a theme's preview custom properties carry the name. */
|
|
43963
|
+
const THEME_NAME = /^[a-z]+(-[a-z]+)*$/;
|
|
43924
43964
|
/**
|
|
43925
43965
|
* @parent mds-pref-theme
|
|
43926
43966
|
*/
|
|
@@ -43929,8 +43969,9 @@ class MdsPrefThemeItem {
|
|
|
43929
43969
|
registerInstance(this, hostRef);
|
|
43930
43970
|
this.selectThemeEvent = createEvent(this, "mdsPrefThemeItemSelect", 7);
|
|
43931
43971
|
/**
|
|
43932
|
-
* Specifies the theme name
|
|
43933
|
-
*
|
|
43972
|
+
* Specifies the theme name; the swatch shows the preview that theme publishes,
|
|
43973
|
+
* `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`
|
|
43974
|
+
* @example 'editorial'
|
|
43934
43975
|
*/
|
|
43935
43976
|
this.name = 'default';
|
|
43936
43977
|
/**
|
|
@@ -43944,6 +43985,17 @@ class MdsPrefThemeItem {
|
|
|
43944
43985
|
this.handleClick = () => {
|
|
43945
43986
|
this.selectThemeEvent.emit({ name: this.name, scheme: this.scheme });
|
|
43946
43987
|
};
|
|
43988
|
+
/**
|
|
43989
|
+
* The preview of the theme the item names, which the styles of that theme publish on the page
|
|
43990
|
+
* (`--magma-preview-<name>-{wash,accent}`, #692), so the item shows its own theme and not the
|
|
43991
|
+
* active one. The stylesheet falls back to the active theme when a theme publishes none.
|
|
43992
|
+
*/
|
|
43993
|
+
this.previewStyle = () => THEME_NAME.test(this.name)
|
|
43994
|
+
? {
|
|
43995
|
+
'--private-theme-wash': `var(--magma-preview-${this.name}-wash)`,
|
|
43996
|
+
'--private-theme-accent': `var(--magma-preview-${this.name}-accent)`,
|
|
43997
|
+
}
|
|
43998
|
+
: undefined;
|
|
43947
43999
|
}
|
|
43948
44000
|
componentWillRender() {
|
|
43949
44001
|
var _a;
|
|
@@ -43955,7 +44007,7 @@ class MdsPrefThemeItem {
|
|
|
43955
44007
|
return (
|
|
43956
44008
|
// the item is an entry of the `menu` the mds-dropdown of the controller opens:
|
|
43957
44009
|
// without the role axe rejects it as a child of that menu (aria-required-children)
|
|
43958
|
-
hAsync(Host, { key: '
|
|
44010
|
+
hAsync(Host, { key: '9c661ea96838a5a35e21542a8ab828de72b72232', onClick: this.handleClick, role: "menuitem", style: this.previewStyle() }, hAsync("mds-button", { key: 'd32ad7640495df018039cee369f6d2030f4c603a', icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text", label: this.label }), hAsync("span", { key: '92454f1d894be41e1910c88ad4e87251273bc0a7', "aria-hidden": "true", class: "theme-preview" }, hAsync("span", { key: '050ec8db2ed0e2da24d734bb35d7af76182c5863', class: "theme-color theme-color--variant-primary" }), hAsync("span", { key: '885fb77194d5db974e6381dc63213e6fb92bf373', class: "theme-color theme-color--status-success" }), hAsync("span", { key: '578000638746de1cee794b4eea58390052a6e36d', class: "theme-color theme-color--status-warning" }), hAsync("span", { key: '10b15e7fd8e18327bd9c868e5b7950ec544b0e41', class: "theme-color theme-color--status-error" }))));
|
|
43959
44011
|
}
|
|
43960
44012
|
static get style() { return mdsPrefThemeItemCss(); }
|
|
43961
44013
|
static get cmpMeta() { return {
|
|
@@ -447,6 +447,36 @@ export declare const readPreviews: (patternsDir: string) => Preview[];
|
|
|
447
447
|
export declare const previewOf: (previews: Preview[], pattern: string, id: string, example?: number) => Preview | undefined;
|
|
448
448
|
/** Every example of a case or a rule, the first one first. */
|
|
449
449
|
export declare const examplesOf: (previews: Preview[], pattern: string, id: string) => Preview[];
|
|
450
|
+
/** The frame of every image: the viewport, in CSS pixels, the device pixels per CSS pixel and the WebP quality. */
|
|
451
|
+
export declare const PREVIEW_IMAGE: {
|
|
452
|
+
readonly width: 960;
|
|
453
|
+
readonly height: 600;
|
|
454
|
+
readonly scale: 1.5;
|
|
455
|
+
readonly quality: 0.8;
|
|
456
|
+
};
|
|
457
|
+
/** The modes an image is made in, each the mode the browser emulates. */
|
|
458
|
+
export declare const PREVIEW_IMAGE_MODES: readonly ["light", "dark"];
|
|
459
|
+
export type PreviewImageMode = (typeof PREVIEW_IMAGE_MODES)[number];
|
|
460
|
+
/**
|
|
461
|
+
* The image of a preview in a mode, beside it: <id>.html -> <id>.<mode>.webp; with the folder
|
|
462
|
+
* of the patterns of a package, the one in that package.
|
|
463
|
+
*/
|
|
464
|
+
export declare const previewImageFile: (file: string, mode: PreviewImageMode, patternsDir?: string) => string;
|
|
465
|
+
/**
|
|
466
|
+
* The size of a WebP image in pixels, from the header of its first chunk (RFC 9649: the lossy
|
|
467
|
+
* VP8 frame, the lossless VP8L bitstream or the extended VP8X canvas), or undefined when the
|
|
468
|
+
* bytes are not WebP.
|
|
469
|
+
*/
|
|
470
|
+
export declare const webpSize: (bytes: Buffer) => {
|
|
471
|
+
width: number;
|
|
472
|
+
height: number;
|
|
473
|
+
} | undefined;
|
|
474
|
+
/**
|
|
475
|
+
* What is wrong in the images of the previews in the folder of the patterns of a package, by
|
|
476
|
+
* file: a preview without its image in a mode (the preview, by its file), an image that is not
|
|
477
|
+
* WebP or not of the frame, an image of no preview.
|
|
478
|
+
*/
|
|
479
|
+
export declare const previewImageErrors: (previews: Preview[], patternsDir: string) => Map<string, string[]>;
|
|
450
480
|
/** The rules of a domain of Foundation that may have a preview: its own, never one it cites (#1221). */
|
|
451
481
|
export declare const ownRules: (pattern: Pattern) => string[];
|
|
452
482
|
/**
|