@maggioli-design-system/magma 2.7.0 → 2.9.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 +45 -0
- package/agents/lint.md +20 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-banner_3.cjs.entry.js +7 -6
- package/dist/cjs/mds-book.cjs.entry.js +53 -5
- package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-emoji.cjs.entry.js +39 -9
- package/dist/cjs/mds-filter.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +1 -1
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +17 -4
- package/dist/cjs/mds-toast.cjs.entry.js +2 -2
- package/dist/collection/components/mds-accordion/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +4 -2
- package/dist/collection/components/mds-author/AGENTS.md +2 -1
- package/dist/collection/components/mds-author/documentation.json +4 -2
- package/dist/collection/components/mds-avatar/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar/documentation.json +4 -2
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +4 -2
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +4 -2
- package/dist/collection/components/mds-badge/AGENTS.md +2 -1
- package/dist/collection/components/mds-badge/documentation.json +4 -2
- package/dist/collection/components/mds-banner/AGENTS.md +7 -4
- package/dist/collection/components/mds-banner/antipattern.md +5 -5
- package/dist/collection/components/mds-banner/documentation.json +40 -6
- package/dist/collection/components/mds-banner/mds-banner.css +7 -10
- package/dist/collection/components/mds-banner/mds-banner.js +30 -7
- package/dist/collection/components/mds-banner/pattern.md +4 -4
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +4 -2
- package/dist/collection/components/mds-bibliography/AGENTS.md +2 -1
- package/dist/collection/components/mds-bibliography/documentation.json +4 -2
- package/dist/collection/components/mds-book/AGENTS.md +9 -4
- package/dist/collection/components/mds-book/documentation.json +46 -6
- package/dist/collection/components/mds-book/mds-book.css +91 -7
- package/dist/collection/components/mds-book/mds-book.js +79 -7
- package/dist/collection/components/mds-book/pattern.md +14 -0
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +2 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +4 -2
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +4 -2
- package/dist/collection/components/mds-button/AGENTS.md +2 -1
- package/dist/collection/components/mds-button/documentation.json +4 -2
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +2 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +4 -2
- package/dist/collection/components/mds-button-group/AGENTS.md +2 -1
- package/dist/collection/components/mds-button-group/documentation.json +4 -2
- package/dist/collection/components/mds-calendar/AGENTS.md +2 -1
- package/dist/collection/components/mds-calendar/documentation.json +4 -2
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +4 -2
- package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.css +4 -1
- package/dist/collection/components/mds-card/AGENTS.md +2 -1
- package/dist/collection/components/mds-card/documentation.json +4 -2
- package/dist/collection/components/mds-card-content/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-content/documentation.json +4 -2
- package/dist/collection/components/mds-card-footer/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-footer/documentation.json +4 -2
- package/dist/collection/components/mds-card-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-header/documentation.json +4 -2
- package/dist/collection/components/mds-card-media/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-media/documentation.json +4 -2
- package/dist/collection/components/mds-chip/AGENTS.md +2 -1
- package/dist/collection/components/mds-chip/documentation.json +4 -2
- package/dist/collection/components/mds-details/AGENTS.md +2 -1
- package/dist/collection/components/mds-details/documentation.json +4 -2
- package/dist/collection/components/mds-dropdown/AGENTS.md +2 -1
- package/dist/collection/components/mds-dropdown/documentation.json +4 -2
- package/dist/collection/components/mds-emoji/AGENTS.md +2 -1
- package/dist/collection/components/mds-emoji/asset/simi.svg +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +4 -2
- package/dist/collection/components/mds-emoji/mds-emoji.js +38 -8
- package/dist/collection/components/mds-entity/AGENTS.md +2 -1
- package/dist/collection/components/mds-entity/documentation.json +4 -2
- package/dist/collection/components/mds-file/AGENTS.md +2 -1
- package/dist/collection/components/mds-file/documentation.json +4 -2
- package/dist/collection/components/mds-file-preview/AGENTS.md +2 -1
- package/dist/collection/components/mds-file-preview/documentation.json +4 -2
- package/dist/collection/components/mds-filter/AGENTS.md +3 -2
- package/dist/collection/components/mds-filter/documentation.json +10 -2
- package/dist/collection/components/mds-filter/mds-filter.css +5 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-filter-item/documentation.json +4 -2
- package/dist/collection/components/mds-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-header/documentation.json +5 -3
- package/dist/collection/components/mds-header/pattern.md +3 -3
- package/dist/collection/components/mds-header-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-header-bar/documentation.json +4 -2
- package/dist/collection/components/mds-help/AGENTS.md +2 -1
- package/dist/collection/components/mds-help/documentation.json +4 -2
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +2 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +4 -2
- package/dist/collection/components/mds-hr/AGENTS.md +2 -1
- package/dist/collection/components/mds-hr/documentation.json +4 -2
- package/dist/collection/components/mds-icon/AGENTS.md +2 -1
- package/dist/collection/components/mds-icon/documentation.json +4 -2
- package/dist/collection/components/mds-img/AGENTS.md +2 -1
- package/dist/collection/components/mds-img/documentation.json +4 -2
- package/dist/collection/components/mds-input/AGENTS.md +2 -1
- package/dist/collection/components/mds-input/documentation.json +4 -2
- package/dist/collection/components/mds-input-date/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date/documentation.json +4 -2
- package/dist/collection/components/mds-input-date-range/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +4 -2
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +4 -2
- package/dist/collection/components/mds-input-field/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-field/documentation.json +4 -2
- package/dist/collection/components/mds-input-otp/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-otp/documentation.json +5 -3
- package/dist/collection/components/mds-input-otp/pattern.md +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-range/documentation.json +4 -2
- package/dist/collection/components/mds-input-range/mds-input-range.css +7 -5
- package/dist/collection/components/mds-input-select/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-select/documentation.json +4 -2
- package/dist/collection/components/mds-input-switch/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-switch/documentation.json +4 -2
- package/dist/collection/components/mds-input-tip/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-tip/documentation.json +4 -2
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +4 -2
- package/dist/collection/components/mds-input-upload/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-upload/documentation.json +4 -2
- package/dist/collection/components/mds-keyboard/AGENTS.md +2 -1
- package/dist/collection/components/mds-keyboard/documentation.json +4 -2
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +2 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +4 -2
- package/dist/collection/components/mds-kpi/AGENTS.md +2 -1
- package/dist/collection/components/mds-kpi/documentation.json +4 -2
- package/dist/collection/components/mds-kpi-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +4 -2
- package/dist/collection/components/mds-label/AGENTS.md +2 -1
- package/dist/collection/components/mds-label/documentation.json +4 -2
- package/dist/collection/components/mds-link/AGENTS.md +2 -1
- package/dist/collection/components/mds-link/documentation.json +4 -2
- package/dist/collection/components/mds-list/AGENTS.md +2 -1
- package/dist/collection/components/mds-list/documentation.json +4 -2
- package/dist/collection/components/mds-list-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-list-item/documentation.json +4 -2
- package/dist/collection/components/mds-mention/AGENTS.md +2 -1
- package/dist/collection/components/mds-mention/documentation.json +4 -2
- package/dist/collection/components/mds-modal/AGENTS.md +5 -1
- package/dist/collection/components/mds-modal/documentation.json +5 -3
- package/dist/collection/components/mds-modal/mds-modal.css +136 -3
- package/dist/collection/components/mds-note/AGENTS.md +2 -1
- package/dist/collection/components/mds-note/documentation.json +4 -2
- package/dist/collection/components/mds-notification/AGENTS.md +2 -1
- package/dist/collection/components/mds-notification/documentation.json +4 -2
- package/dist/collection/components/mds-paginator/AGENTS.md +2 -1
- package/dist/collection/components/mds-paginator/documentation.json +4 -2
- package/dist/collection/components/mds-paginator-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +4 -2
- package/dist/collection/components/mds-policy-ai/AGENTS.md +2 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +4 -2
- package/dist/collection/components/mds-pref/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref/documentation.json +4 -2
- package/dist/collection/components/mds-pref-animation/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +4 -2
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +4 -2
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +4 -2
- package/dist/collection/components/mds-pref-language/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-language/documentation.json +4 -2
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +4 -2
- package/dist/collection/components/mds-pref-mode/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +4 -2
- package/dist/collection/components/mds-pref-theme/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +4 -2
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-theme-item/documentation.json +4 -2
- package/dist/collection/components/mds-price-table/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-list/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +4 -2
- package/dist/collection/components/mds-progress/AGENTS.md +2 -1
- package/dist/collection/components/mds-progress/documentation.json +4 -2
- package/dist/collection/components/mds-push-notification/AGENTS.md +3 -2
- package/dist/collection/components/mds-push-notification/documentation.json +6 -4
- package/dist/collection/components/mds-push-notification/pattern.md +2 -2
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +6 -3
- package/dist/collection/components/mds-push-notification-item/documentation.json +38 -5
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +1 -0
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +40 -5
- package/dist/collection/components/mds-push-notification-item/pattern.md +3 -3
- package/dist/collection/components/mds-quote/AGENTS.md +2 -1
- package/dist/collection/components/mds-quote/documentation.json +4 -2
- package/dist/collection/components/mds-radial-menu/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +4 -2
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +4 -2
- package/dist/collection/components/mds-radial-progress/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +4 -2
- package/dist/collection/components/mds-separator/AGENTS.md +2 -1
- package/dist/collection/components/mds-separator/documentation.json +4 -2
- package/dist/collection/components/mds-spinner/AGENTS.md +2 -1
- package/dist/collection/components/mds-spinner/documentation.json +5 -3
- package/dist/collection/components/mds-spinner/pattern.md +9 -6
- package/dist/collection/components/mds-status-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-status-bar/documentation.json +4 -2
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +4 -2
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +4 -2
- package/dist/collection/components/mds-tab/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab/documentation.json +4 -2
- package/dist/collection/components/mds-tab-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +4 -2
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +4 -2
- package/dist/collection/components/mds-tab-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-item/documentation.json +4 -2
- package/dist/collection/components/mds-table/AGENTS.md +2 -1
- package/dist/collection/components/mds-table/documentation.json +4 -2
- package/dist/collection/components/mds-table-body/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-body/documentation.json +4 -2
- package/dist/collection/components/mds-table-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-cell/documentation.json +4 -2
- package/dist/collection/components/mds-table-footer/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-footer/documentation.json +4 -2
- package/dist/collection/components/mds-table-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-header/documentation.json +4 -2
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +4 -2
- package/dist/collection/components/mds-table-row/AGENTS.md +7 -2
- package/dist/collection/components/mds-table-row/documentation.json +11 -3
- package/dist/collection/components/mds-table-row/mds-table-row.css +1 -0
- package/dist/collection/components/mds-table-row/pattern.md +14 -1
- package/dist/collection/components/mds-text/AGENTS.md +2 -1
- package/dist/collection/components/mds-text/documentation.json +4 -2
- package/dist/collection/components/mds-toast/AGENTS.md +8 -5
- package/dist/collection/components/mds-toast/antipattern.md +2 -2
- package/dist/collection/components/mds-toast/documentation.json +40 -6
- package/dist/collection/components/mds-toast/mds-toast.js +26 -4
- package/dist/collection/components/mds-toast/pattern.md +2 -2
- package/dist/collection/components/mds-toast-region/AGENTS.md +2 -1
- package/dist/collection/components/mds-toast-region/documentation.json +5 -3
- package/dist/collection/components/mds-toast-region/pattern.md +10 -2
- package/dist/collection/components/mds-tooltip/AGENTS.md +2 -1
- package/dist/collection/components/mds-tooltip/documentation.json +4 -2
- package/dist/collection/components/mds-tree/AGENTS.md +3 -2
- package/dist/collection/components/mds-tree/documentation.json +5 -3
- package/dist/collection/components/mds-tree/pattern.md +13 -13
- package/dist/collection/components/mds-tree-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tree-item/documentation.json +4 -2
- package/dist/collection/components/mds-url-view/AGENTS.md +2 -1
- package/dist/collection/components/mds-url-view/documentation.json +4 -2
- package/dist/collection/components/mds-usage/AGENTS.md +2 -1
- package/dist/collection/components/mds-usage/documentation.json +4 -2
- package/dist/collection/components/mds-video-wall/AGENTS.md +2 -1
- package/dist/collection/components/mds-video-wall/documentation.json +4 -2
- package/dist/collection/components/mds-zero/AGENTS.md +2 -1
- package/dist/collection/components/mds-zero/documentation.json +4 -2
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-book.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-emoji.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/p-BeZGLnJJ.js +1 -0
- package/dist/components/p-Chk4rI7N.js +1 -0
- package/dist/components/{p-CNpL55c-.js → p-Cwg4vtOr.js} +1 -1
- package/dist/components/p-Dzkiu-es.js +1 -0
- package/dist/documentation.json +406 -143
- package/dist/esm/loader.js +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-banner_3.entry.js +7 -6
- package/dist/esm/mds-book.entry.js +53 -5
- package/dist/esm/mds-calendar_2.entry.js +1 -1
- package/dist/esm/mds-emoji.entry.js +39 -9
- package/dist/esm/mds-filter.entry.js +1 -1
- package/dist/esm/mds-input-range.entry.js +1 -1
- package/dist/esm/mds-modal.entry.js +1 -1
- package/dist/esm/mds-push-notification-item.entry.js +17 -4
- package/dist/esm/mds-toast.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +2 -2
- package/dist/esm-es5/mds-book.entry.js +33 -26
- package/dist/esm-es5/mds-calendar_2.entry.js +8 -8
- package/dist/esm-es5/mds-emoji.entry.js +40 -31
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +7 -7
- package/dist/esm-es5/mds-modal.entry.js +15 -15
- package/dist/esm-es5/mds-push-notification-item.entry.js +7 -3
- package/dist/esm-es5/mds-toast.entry.js +2 -2
- package/dist/hydrate/index.js +130 -32
- package/dist/hydrate/index.mjs +130 -32
- package/dist/lint/core/checks.d.ts +5 -0
- package/dist/lint/core/checks.js +17 -0
- package/dist/lint/core/data.d.ts +4 -1
- package/dist/lint/core/data.js +3 -1
- package/dist/lint/eslint/index.js +6 -4
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-354a5b47.entry.js → p-02b106c2.entry.js} +1 -1
- package/dist/magma-components/{p-17ccfc01.system.entry.js → p-3bc65166.system.entry.js} +55 -48
- package/dist/magma-components/p-425ca155.entry.js +1 -0
- package/dist/magma-components/p-523f0c30.system.entry.js +80 -0
- package/dist/magma-components/{p-07d35da6.entry.js → p-5306606b.entry.js} +1 -1
- package/dist/magma-components/{p-1b67b149.system.entry.js → p-798f460b.system.entry.js} +1 -1
- package/dist/magma-components/{p-e5f893f9.system.entry.js → p-7db14777.system.entry.js} +1 -1
- package/dist/magma-components/{p-e8452cce.entry.js → p-8641b7b2.entry.js} +1 -1
- package/dist/magma-components/{p-3a7c4314.system.entry.js → p-95ccf46d.system.entry.js} +4 -4
- package/dist/magma-components/p-968a2237.entry.js +1 -0
- package/dist/magma-components/p-9dd9eadd.entry.js +1 -0
- package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
- package/dist/magma-components/{p-160cd923.entry.js → p-a25327a1.entry.js} +1 -1
- package/dist/magma-components/p-a67381bf.entry.js +1 -0
- package/dist/magma-components/{p-c2c693ed.system.entry.js → p-b27cb1ac.system.entry.js} +14 -5
- package/dist/magma-components/{p-6df26141.system.entry.js → p-c0286dc3.system.entry.js} +1 -1
- package/dist/magma-components/p-c89060ec.system.entry.js +41 -0
- package/dist/magma-components/p-eb12be86.system.entry.js +24 -0
- package/dist/magma-components/p-ebeb3fff.entry.js +1 -0
- package/dist/stats.json +383 -139
- package/dist/types/components/mds-banner/mds-banner.d.ts +9 -2
- package/dist/types/components/mds-book/mds-book.d.ts +19 -2
- package/dist/types/components/mds-emoji/mds-emoji.d.ts +1 -0
- package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +10 -1
- package/dist/types/components/mds-toast/mds-toast.d.ts +7 -1
- package/dist/types/components.d.ts +56 -12
- package/package.json +8 -8
- package/dist/components/p-B8hgyXdE.js +0 -1
- package/dist/components/p-CYK2Xr_v.js +0 -1
- package/dist/components/p-DbVGGhs_.js +0 -1
- package/dist/magma-components/p-14b13850.entry.js +0 -1
- package/dist/magma-components/p-386bb24e.system.entry.js +0 -41
- package/dist/magma-components/p-6d96d223.entry.js +0 -1
- package/dist/magma-components/p-79fd07e7.system.entry.js +0 -80
- package/dist/magma-components/p-7e7391fd.entry.js +0 -1
- package/dist/magma-components/p-df387755.entry.js +0 -1
- package/dist/magma-components/p-ee780f82.system.entry.js +0 -20
- package/dist/magma-components/p-f2211b1f.entry.js +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-push-notification-item/mds-push-notification-item.tsx",
|
|
@@ -42,8 +43,8 @@
|
|
|
42
43
|
}
|
|
43
44
|
],
|
|
44
45
|
"usage": {
|
|
45
|
-
"1. Description": "The `<mds-push-notification-item>` web component is a single notification card rendered inside its parent container [`<mds-push-notification>`](../mds-push-notification/AGENTS.md). It composes an avatar/image, a subject, a relative or formatted timestamp, a message body and an optional dismiss control into one toast-like row.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be placed as a direct default-slot child of `<mds-push-notification>`; it is not used standalone or mixed with other child types, since the parent animates intro/outro and manages stacking.\n- **Dismiss reports up, removal happens in the parent**: Clicking the built-in close button emits the bubbling `mdsPushNotificationItemClose` event, with the `id` of the item as `detail.id`; the parent runs the outro animation and removes the item. The item never removes itself.\n- **Parent-driven visibility lifecycle**: When the last item closes, the parent auto-hides the whole notification area.\n- **Timestamp rendering**: With `dateFormat=\"timeago\"` `datetime` shows a localized relative time (\"2 minutes ago\"); otherwise the value is treated as a date-format string for a static date.\n- **Localization**: The relative-time strings and the dismiss button title are localized (el/en/es/it).\n- **Conditional avatar vs. picture**: An `<mds-avatar>` is rendered when `icon` is set or `preview=\"avatar\"`; when `src` is set and `preview` is not `avatar`, an `<mds-img>` picture is rendered (next to the avatar when `icon` is also set).\n- **Slot detection**: The `badge` and `action` named slot wrappers stay hidden (`display: none`) until matching slotted children exist, so empty slots take no space.\n\n#### Properties & Visual Configurations\n\n- **`
|
|
46
|
-
"2. Pattern": "Correct and idiomatic ways to use the `<mds-push-notification-item>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Message Notification\n\nThe minimal form: a message body with an icon and a relative timestamp. Always nest the item inside [`mds-push-notification`](../mds-push-notification/AGENTS.md), which manages stacking and animation.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/email\"\n subject=\"Nuovo messaggio\"\n message=\"Hai ricevuto 3 nuovi messaggi da account diversi\"\n datetime=\"2024-06-01T10:30:00\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Variant for Semantic Status\n\nUse `variant` to communicate meaning - success, warning, error, info - and `tone` to set visual weight. The values are forwarded to the internal `<mds-avatar>`.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/check-circle\"\n subject=\"Salvataggio completato\"\n message=\"Il documento e' stato salvato con successo\"\n datetime=\"2024-06-01T10:31:00\"\n variant=\"success\"\n tone=\"strong\"\n ></mds-push-notification-item>\n\n <mds-push-notification-item\n icon=\"mi/baseline/warning\"\n subject=\"Attenzione\"\n message=\"La sessione scadra' tra 5 minuti\"\n datetime=\"2024-06-01T10:32:00\"\n variant=\"warning\"\n tone=\"weak\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n####
|
|
46
|
+
"1. Description": "The `<mds-push-notification-item>` web component is a single notification card rendered inside its parent container [`<mds-push-notification>`](../mds-push-notification/AGENTS.md). It composes an avatar/image, a subject, a relative or formatted timestamp, a message body and an optional dismiss control into one toast-like row.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be placed as a direct default-slot child of `<mds-push-notification>`; it is not used standalone or mixed with other child types, since the parent animates intro/outro and manages stacking.\n- **Dismiss reports up, removal happens in the parent**: Clicking the built-in close button emits the bubbling `mdsPushNotificationItemClose` event, with the `id` of the item as `detail.id`; the parent runs the outro animation and removes the item. The item never removes itself.\n- **Parent-driven visibility lifecycle**: When the last item closes, the parent auto-hides the whole notification area.\n- **Timestamp rendering**: With `dateFormat=\"timeago\"` `datetime` shows a localized relative time (\"2 minutes ago\"); otherwise the value is treated as a date-format string for a static date.\n- **Localization**: The relative-time strings and the dismiss button title are localized (el/en/es/it).\n- **Conditional avatar vs. picture**: An `<mds-avatar>` is rendered when `icon` is set or `preview=\"avatar\"`; when `src` is set and `preview` is not `avatar`, an `<mds-img>` picture is rendered (next to the avatar when `icon` is also set).\n- **Slot detection**: The `badge` and `action` named slot wrappers stay hidden (`display: none`) until matching slotted children exist, so empty slots take no space.\n\n#### Properties & Visual Configurations\n\n- **`dismissible`**: Controls whether the dismiss button is shown. Add it to let the user close the notification manually; leave it off for items the user should not close.\n- **`deletable`** is the old name of `dismissible`, deprecated: the button dismisses the notification, it deletes nothing. It still works, and goes in the next major.\n- **`preview`**: Pick `avatar` to show the `src` image (or `initials`/`icon` fallback) as a compact round avatar, or `image` (default) to show `src` as a larger inline picture preview.\n- **`initials`**: Provided as the avatar fallback when no image is available; it overrides `tone`/`variant` styling so the user stays visually recognizable.\n- **`dateFormat`**: Use `timeago` for a live relative timestamp, or any date-format token string for a fixed display date.\n\nFor `tone` and `variant`, this component consumes the shared color ladders defined in [`agents/variants.md`](../../../../agents/variants.md); the values are forwarded to the underlying `<mds-avatar>` and follow the avatar tone/variant set rather than adding component-specific values.\n",
|
|
47
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-push-notification-item>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Message Notification\n\nThe minimal form: a message body with an icon and a relative timestamp. Always nest the item inside [`mds-push-notification`](../mds-push-notification/AGENTS.md), which manages stacking and animation.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/email\"\n subject=\"Nuovo messaggio\"\n message=\"Hai ricevuto 3 nuovi messaggi da account diversi\"\n datetime=\"2024-06-01T10:30:00\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Variant for Semantic Status\n\nUse `variant` to communicate meaning - success, warning, error, info - and `tone` to set visual weight. The values are forwarded to the internal `<mds-avatar>`.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/check-circle\"\n subject=\"Salvataggio completato\"\n message=\"Il documento e' stato salvato con successo\"\n datetime=\"2024-06-01T10:31:00\"\n variant=\"success\"\n tone=\"strong\"\n ></mds-push-notification-item>\n\n <mds-push-notification-item\n icon=\"mi/baseline/warning\"\n subject=\"Attenzione\"\n message=\"La sessione scadra' tra 5 minuti\"\n datetime=\"2024-06-01T10:32:00\"\n variant=\"warning\"\n tone=\"weak\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Dismissible Notification\n\nAdd the `dismissible` attribute to show the dismiss button, letting the user close the notification manually. Without it the notification cannot be dismissed by the user - keep it off for system notifications the user must not close.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n dismissible\n icon=\"mi/baseline/email\"\n subject=\"Nuovo messaggio\"\n message=\"Hai ricevuto un nuovo messaggio\"\n datetime=\"2024-06-01T09:00:00\"\n variant=\"info\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Action Buttons via the `action` Slot\n\nSlot one or more `<mds-button>` elements into `slot=\"action\"` for in-notification CTAs. Use `size=\"sm\"` to keep the actions compact.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/person\"\n subject=\"Mario Giannini\"\n message=\"Ciao, sono Mario, questo e' il mio contatto, buona giornata!\"\n datetime=\"2024-06-01T10:25:00\"\n variant=\"primary\"\n tone=\"strong\"\n >\n <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Accetta\"></mds-button>\n <mds-button slot=\"action\" variant=\"error\" tone=\"weak\" size=\"sm\" label=\"Ignora\"></mds-button>\n </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Badge Label via the `badge` Slot\n\nSlot an `<mds-badge>` into `slot=\"badge\"` to show a category or type label above the subject line.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/attach-file\"\n subject=\"Nuovo allegato\"\n message=\"Hai ricevuto un nuovo file allegato da Luca Bianchi\"\n datetime=\"2024-06-01T10:20:00\"\n variant=\"primary\"\n >\n <mds-badge slot=\"badge\" variant=\"amaranth\" tone=\"weak\" label=\"pdf\"></mds-badge>\n <mds-button slot=\"action\" tone=\"outline\" size=\"sm\" label=\"Scarica\"></mds-button>\n </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Avatar Mode with Image\n\nSet `src` and `preview=\"avatar\"` to display a user photo as a round avatar instead of the default full-width image preview.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n src=\"./avatar-sarah.jpeg\"\n preview=\"avatar\"\n subject=\"Sarah Ho\"\n message=\"Ciao, sono Sarah, questo e' il mio contatto, buona giornata!\"\n datetime=\"2024-06-01T10:15:00\"\n variant=\"primary\"\n tone=\"strong\"\n >\n <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Scrivi\"></mds-button>\n </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Avatar Mode with Initials Fallback\n\nWhen no image is available, set `initials` and `preview=\"avatar\"`. The initials override `tone` and `variant` coloring so the user stays visually distinguishable.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n initials=\"MG\"\n preview=\"avatar\"\n subject=\"Mario Giannini\"\n message=\"Ha modificato il documento condiviso\"\n datetime=\"2024-06-01T10:10:00\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Inline Image Preview\n\nOmit `preview=\"avatar\"` (or keep the default `image`) and supply `src` to show the image as a larger inline thumbnail - useful for file or media notifications.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n src=\"./book-cover-01.webp\"\n subject=\"Anteprima immagine\"\n message=\"La copertina e' stata aggiornata\"\n datetime=\"2024-06-01T10:05:00\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Fixed Date Format\n\nUse any `dayjs`-compatible format string as `date-format` to show a static date instead of the default relative \"time ago\" display.\n\n```html\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/event\"\n subject=\"Promemoria riunione\"\n message=\"La riunione di progetto e' fissata per domani\"\n datetime=\"2024-06-01T09:00:00\"\n date-format=\"DD/MM/YYYY\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Listening to the Dismiss Event\n\nListen to `mdsPushNotificationItemClose` to handle cleanup when the user dismisses the item. The parent `<mds-push-notification>` does this automatically, but you can also add your own logic (e.g. marking the notification read in the server). The event carries the `id` of the item in `detail.id`.\n\n```javascript\ndocument\n .querySelector('mds-push-notification-item')\n .addEventListener('mdsPushNotificationItemClose', (event) => {\n markNotificationRead(event.detail.id);\n });\n```\n\n#### Styling Customization\n\nCustomize the item only through its public `--mds-push-notification-item-*` CSS custom properties.\n\n```css\n.app-notifications mds-push-notification-item {\n --mds-push-notification-item-shadow: var(--shadow-md-sharp);\n --mds-push-notification-item-message-line-clamp: 3;\n --mds-push-notification-item-subject-line-clamp: 2;\n}\n```\n",
|
|
47
48
|
"3. Antipattern": "Common incorrect uses of `<mds-push-notification-item>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/anti-patterns.md`](../../../../agents/anti-patterns.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Item Outside Its Parent\n\n`<mds-push-notification-item>` is a compound child that must live inside [`<mds-push-notification>`](../mds-push-notification/AGENTS.md). The parent drives entry / exit animation, stacking, and auto-hide when the last item closes.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item\n icon=\"mi/baseline/email\"\n subject=\"Nuovo messaggio\"\n message=\"Hai ricevuto un nuovo messaggio\"\n></mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification>\n <mds-push-notification-item\n icon=\"mi/baseline/email\"\n subject=\"Nuovo messaggio\"\n message=\"Hai ricevuto un nuovo messaggio\"\n ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Do Not Put Content in the Default Slot\n\n`<mds-push-notification-item>` has no default slot. All text content goes through the `message` and `subject` props; interactive content goes into the named `action` or `badge` slots.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item>\n Hai un nuovo messaggio\n</mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification-item\n message=\"Hai un nuovo messaggio\"\n subject=\"Posta in arrivo\"\n></mds-push-notification-item>\n```\n\n#### Do Not Slot Arbitrary Content Into `action` Without `mds-button`\n\nThe `action` slot is designed for `<mds-button>` elements at `size=\"sm\"`. Slotting raw `<button>` or large components breaks layout alignment and loses Magma theming and keyboard semantics.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item subject=\"Richiesta\" message=\"Approva la richiesta di accesso\">\n <button slot=\"action\" class=\"btn\">Approva</button>\n</mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification-item subject=\"Richiesta\" message=\"Approva la richiesta di accesso\">\n <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Approva\"></mds-button>\n</mds-push-notification-item>\n```\n\n#### Do Not Mix `icon` and `src` With `preview=\"image\"`\n\nWhen `icon` is set, the component always renders an `<mds-avatar>` for the icon. If `src` is also set and `preview` is not `\"avatar\"`, an `<mds-img>` picture is rendered as well - producing two media areas side by side, which is almost never the intended layout. Pick one visual mode per notification.\n\n```html\n<!-- INCORRECT - both an icon avatar and an image preview render simultaneously -->\n<mds-push-notification-item\n icon=\"mi/baseline/photo\"\n src=\"./cover.jpg\"\n preview=\"image\"\n subject=\"Nuova foto\"\n message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n\n<!-- CORRECT - icon only, no image -->\n<mds-push-notification-item\n icon=\"mi/baseline/photo\"\n subject=\"Nuova foto\"\n message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n\n<!-- CORRECT - image preview only, no icon -->\n<mds-push-notification-item\n src=\"./cover.jpg\"\n subject=\"Nuova foto\"\n message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n```\n\n#### Do Not Listen for the Native `close` DOM Event\n\nThe component emits `mdsPushNotificationItemClose`, not a native `close`. Listening for `close` never fires, and the `click` of the dismiss button does not leave the component (its handler calls `stopPropagation()`).\n\n```javascript\n// INCORRECT\nelement.addEventListener('close', handler);\n\n// CORRECT\nelement.addEventListener('mdsPushNotificationItemClose', handler);\n```\n\n#### Customize via Documented Vars, Not Internal Selectors\n\nThe supported customization surface is `--mds-push-notification-item-*` CSS custom properties and documented shadow parts (`actions`, `avatar`, `content`, `picture`). Targeting shadow-DOM internals via `::part()` on undocumented parts or via `>>>` will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-push-notification-item::part(header) {\n font-weight: bold;\n}\nmds-push-notification-item >>> .message {\n color: red;\n}\n\n/* CORRECT */\nmds-push-notification-item {\n --mds-push-notification-item-message-line-clamp: 3;\n --mds-push-notification-item-shadow: var(--shadow-md-sharp);\n}\nmds-push-notification-item::part(content) {\n gap: calc(var(--spacing) * 200);\n}\n```\n"
|
|
48
49
|
},
|
|
49
50
|
"props": [
|
|
@@ -129,14 +130,45 @@
|
|
|
129
130
|
"mutable": true,
|
|
130
131
|
"attr": "deletable",
|
|
131
132
|
"reflectToAttr": true,
|
|
132
|
-
"docs": "
|
|
133
|
+
"docs": "Shows the dismiss button, as `dismissible` does.",
|
|
133
134
|
"docsTags": [
|
|
135
|
+
{
|
|
136
|
+
"name": "deprecated",
|
|
137
|
+
"text": "Use `dismissible`: the button dismisses the notification, it deletes nothing.\nGoes in the next major."
|
|
138
|
+
},
|
|
134
139
|
{
|
|
135
140
|
"name": "default",
|
|
136
141
|
"text": "false"
|
|
137
142
|
}
|
|
138
143
|
],
|
|
139
144
|
"default": "false",
|
|
145
|
+
"deprecation": "Use `dismissible`: the button dismisses the notification, it deletes nothing.\nGoes in the next major.",
|
|
146
|
+
"values": [
|
|
147
|
+
{
|
|
148
|
+
"type": "boolean"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "undefined"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"optional": true,
|
|
155
|
+
"required": false,
|
|
156
|
+
"getter": false,
|
|
157
|
+
"setter": false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "dismissible",
|
|
161
|
+
"type": "boolean | undefined",
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "boolean",
|
|
164
|
+
"resolved": "boolean | undefined",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"mutable": true,
|
|
168
|
+
"attr": "dismissible",
|
|
169
|
+
"reflectToAttr": true,
|
|
170
|
+
"docs": "Shows a dismiss button: activating it emits `mdsPushNotificationItemClose`, and a parent\n`mds-push-notification` takes the item out of the stack",
|
|
171
|
+
"docsTags": [],
|
|
140
172
|
"values": [
|
|
141
173
|
{
|
|
142
174
|
"type": "boolean"
|
|
@@ -596,7 +628,8 @@
|
|
|
596
628
|
"mds-icon",
|
|
597
629
|
"mds-text"
|
|
598
630
|
]
|
|
599
|
-
}
|
|
631
|
+
},
|
|
632
|
+
"storybook": "ui-push-notification-push-notification-item--docs"
|
|
600
633
|
}
|
|
601
634
|
]
|
|
602
635
|
}
|
|
@@ -35,7 +35,9 @@ export class MdsPushNotificationItem {
|
|
|
35
35
|
*/
|
|
36
36
|
this.dateFormat = 'timeago';
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Shows the dismiss button, as `dismissible` does.
|
|
39
|
+
* @deprecated Use `dismissible`: the button dismisses the notification, it deletes nothing.
|
|
40
|
+
* Goes in the next major.
|
|
39
41
|
*/
|
|
40
42
|
this.deletable = false;
|
|
41
43
|
/**
|
|
@@ -55,12 +57,14 @@ export class MdsPushNotificationItem {
|
|
|
55
57
|
// the detail the event declares: it was emitted empty
|
|
56
58
|
this.closedEvent.emit({ id: this.host.id });
|
|
57
59
|
};
|
|
60
|
+
this.isDismissible = () => this.dismissible === true || this.deletable === true;
|
|
58
61
|
this.onSlotChange = () => {
|
|
59
62
|
this.hasActions = hasChildWithSlot(this.host, 'action');
|
|
60
63
|
this.hasBadge = hasChildWithSlot(this.host, 'badge');
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
componentDidLoad() {
|
|
67
|
+
this.handleDismissibleChange(this.dismissible);
|
|
64
68
|
this.handleDeletableChange(this.deletable);
|
|
65
69
|
}
|
|
66
70
|
componentWillLoad() {
|
|
@@ -87,6 +91,12 @@ export class MdsPushNotificationItem {
|
|
|
87
91
|
};
|
|
88
92
|
dayjs.locale('custom-locale', { relativeTime: relativeTimeCustom });
|
|
89
93
|
}
|
|
94
|
+
// a false boolean is an absent attribute: `dismissible="false"` leaves the host once loaded
|
|
95
|
+
handleDismissibleChange(newValue) {
|
|
96
|
+
if (newValue === false) {
|
|
97
|
+
this.dismissible = undefined;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
90
100
|
handleDeletableChange(newValue) {
|
|
91
101
|
if (newValue === false) {
|
|
92
102
|
this.deletable = undefined;
|
|
@@ -94,9 +104,9 @@ export class MdsPushNotificationItem {
|
|
|
94
104
|
}
|
|
95
105
|
render() {
|
|
96
106
|
var _a;
|
|
97
|
-
return (h(Host, { key: '
|
|
107
|
+
return (h(Host, { key: 'aaf48c85945480a2a5cefe2fc114d546b40d0897', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, ((_a = this.icon) !== null && _a !== void 0 ? _a : this.preview === 'avatar') && (h("mds-avatar", { key: 'f180749e154e9f89f66a0f96f3863fb3118d137e', class: "avatar", icon: this.icon, initials: this.initials, part: "avatar", src: this.src, tone: this.tone, variant: this.variant })), this.src && this.preview !== 'avatar' && (h("mds-img", { key: 'a0e4feeaac5b4f1cbce24364fbe9b2a22702881a', class: "picture", part: "picture", src: this.src })), h("div", { key: '4a3b26dfc42c9de31757b5e9106d205002962282', class: "content", part: "content" }, h("div", { key: 'ddada3cea2bf2d42ace0abe8a5a2de034513b3a8', class: "header" }, h("div", { key: '7035d2e270443166b3e78ccc41c540acaeadf587', class: "infos" }, h("div", { key: '6a403603db28998a16d0234f357fc5d4365e395a', class: clsx('badge', !this.hasBadge && 'badge--hidden') }, h("slot", { key: 'dfd6f7aaee176fa23af69056feb65d2b254d5fac', name: "badge", onSlotchange: this.onSlotChange })), this.subject && (h("mds-text", { key: 'b82737efc27ae0abb6e0ffa67f4dfd94b223fedd', class: "subject", typography: "h6", variant: "title", truncate: "all" }, this.subject))), this.datetime && (h("mds-text", { key: '6118eb055881ac883e845fb9c7923ac5a115bc8b', class: "time", typography: "option" }, this.dateFormat === 'timeago'
|
|
98
108
|
? dayjs(this.datetime).fromNow()
|
|
99
|
-
: dayjs(this.datetime).format(this.dateFormat)))), h("mds-text", { key: '
|
|
109
|
+
: dayjs(this.datetime).format(this.dateFormat)))), h("mds-text", { key: 'd25beeb3d0e8342d2154fd5d3161b61d5445ba32', class: "message", truncate: "all", typography: "caption", variant: "info" }, this.message), h("div", { key: 'bb064523c4539d63cf094db5c7099d8d3ad8ca87', class: clsx('actions', !this.hasActions && 'actions--hidden'), part: "actions" }, h("slot", { key: '8aed1479928b60b81a8973a8b2dd07f2f57f4450', name: "action", onSlotchange: this.onSlotChange }))), this.isDismissible() && (h("mds-button", { key: '1f669d8c40d48add6f3013fd0ff3a59d198ae727', class: "close-button", variant: "dark", tone: "text", title: this.t.get('dismiss'), icon: miBaselineCancel, onClick: this.onClickClose }))));
|
|
100
110
|
}
|
|
101
111
|
static get is() { return "mds-push-notification-item"; }
|
|
102
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -164,7 +174,7 @@ export class MdsPushNotificationItem {
|
|
|
164
174
|
"attribute": "date-format",
|
|
165
175
|
"defaultValue": "'timeago'"
|
|
166
176
|
},
|
|
167
|
-
"
|
|
177
|
+
"dismissible": {
|
|
168
178
|
"type": "boolean",
|
|
169
179
|
"mutable": true,
|
|
170
180
|
"complexType": {
|
|
@@ -176,7 +186,29 @@ export class MdsPushNotificationItem {
|
|
|
176
186
|
"optional": true,
|
|
177
187
|
"docs": {
|
|
178
188
|
"tags": [],
|
|
179
|
-
"text": "
|
|
189
|
+
"text": "Shows a dismiss button: activating it emits `mdsPushNotificationItemClose`, and a parent\n`mds-push-notification` takes the item out of the stack"
|
|
190
|
+
},
|
|
191
|
+
"getter": false,
|
|
192
|
+
"setter": false,
|
|
193
|
+
"reflect": true,
|
|
194
|
+
"attribute": "dismissible"
|
|
195
|
+
},
|
|
196
|
+
"deletable": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"mutable": true,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "boolean",
|
|
201
|
+
"resolved": "boolean | undefined",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [{
|
|
208
|
+
"name": "deprecated",
|
|
209
|
+
"text": "Use `dismissible`: the button dismisses the notification, it deletes nothing.\nGoes in the next major."
|
|
210
|
+
}],
|
|
211
|
+
"text": "Shows the dismiss button, as `dismissible` does."
|
|
180
212
|
},
|
|
181
213
|
"getter": false,
|
|
182
214
|
"setter": false,
|
|
@@ -396,6 +428,9 @@ export class MdsPushNotificationItem {
|
|
|
396
428
|
static get elementRef() { return "host"; }
|
|
397
429
|
static get watchers() {
|
|
398
430
|
return [{
|
|
431
|
+
"propName": "dismissible",
|
|
432
|
+
"methodName": "handleDismissibleChange"
|
|
433
|
+
}, {
|
|
399
434
|
"propName": "deletable",
|
|
400
435
|
"methodName": "handleDeletableChange"
|
|
401
436
|
}];
|
|
@@ -50,14 +50,14 @@ Use `variant` to communicate meaning - success, warning, error, info - and `tone
|
|
|
50
50
|
</mds-push-notification>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
####
|
|
53
|
+
#### Dismissible Notification
|
|
54
54
|
|
|
55
|
-
Add the `
|
|
55
|
+
Add the `dismissible` attribute to show the dismiss button, letting the user close the notification manually. Without it the notification cannot be dismissed by the user - keep it off for system notifications the user must not close.
|
|
56
56
|
|
|
57
57
|
```html
|
|
58
58
|
<mds-push-notification>
|
|
59
59
|
<mds-push-notification-item
|
|
60
|
-
|
|
60
|
+
dismissible
|
|
61
61
|
icon="mi/baseline/email"
|
|
62
62
|
subject="Nuovo messaggio"
|
|
63
63
|
message="Hai ricevuto un nuovo messaggio"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-quote
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-quote>` web component is the Magma Design System primitive for rendering a stylized blockquote: it wraps quoted text in decorative typographic quotation marks (`❝ ... ❞`) and exposes an optional attribution slot, replacing a hand-styled `<blockquote>` + citation markup.
|
|
12
12
|
|
|
@@ -30,6 +30,7 @@ The `<mds-quote>` web component is the Magma Design System primitive for renderi
|
|
|
30
30
|
|
|
31
31
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
32
32
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
33
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-quote--docs) - the live examples, in the published Storybook of `main`
|
|
33
34
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
34
35
|
|
|
35
36
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-quote/mds-quote.tsx",
|
|
@@ -174,7 +175,8 @@
|
|
|
174
175
|
"mds-quote": [
|
|
175
176
|
"mds-text"
|
|
176
177
|
]
|
|
177
|
-
}
|
|
178
|
+
},
|
|
179
|
+
"storybook": "ui-quote--docs"
|
|
178
180
|
}
|
|
179
181
|
]
|
|
180
182
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-radial-menu
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-radial-menu>` web component is a floating action menu of the Magma Design System that arranges its child items along a circular arc around a central trigger button, expanding them outward when opened. It is the parent of a compound pair: it owns the trigger and the geometry, while each option is supplied as an `<mds-radial-menu-item>` in the `item` slot.
|
|
12
12
|
|
|
@@ -35,6 +35,7 @@ The internal trigger consumes the shared `variant` / `tone` / `size` ladders def
|
|
|
35
35
|
|
|
36
36
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
37
37
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
38
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-radial-menu--docs) - the live examples, in the published Storybook of `main`
|
|
38
39
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
39
40
|
|
|
40
41
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-radial-menu/mds-radial-menu.tsx",
|
|
@@ -577,7 +578,8 @@
|
|
|
577
578
|
"mds-icon",
|
|
578
579
|
"mds-text"
|
|
579
580
|
]
|
|
580
|
-
}
|
|
581
|
+
},
|
|
582
|
+
"storybook": "ui-radial-menu--docs"
|
|
581
583
|
}
|
|
582
584
|
]
|
|
583
585
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-radial-menu-item
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-radial-menu-item>` web component is a single actionable spoke of the [`<mds-radial-menu>`](../mds-radial-menu/AGENTS.md) compound. It wraps an `<mds-button>` (rendered as a circular icon button) plus an optional `<mds-tooltip>`, and is positioned along the menu arc by its parent.
|
|
12
12
|
|
|
@@ -27,6 +27,7 @@ The shared `variant` / `tone` / `size` ladders are defined in [`agents/variants.
|
|
|
27
27
|
|
|
28
28
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
29
29
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
30
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-radial-menu-radial-menu-item--docs) - the live examples, in the published Storybook of `main`
|
|
30
31
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
31
32
|
|
|
32
33
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-radial-menu-item/mds-radial-menu-item.tsx",
|
|
@@ -295,7 +296,8 @@
|
|
|
295
296
|
"mds-tooltip": [
|
|
296
297
|
"mds-text"
|
|
297
298
|
]
|
|
298
|
-
}
|
|
299
|
+
},
|
|
300
|
+
"storybook": "ui-radial-menu-radial-menu-item--docs"
|
|
299
301
|
}
|
|
300
302
|
]
|
|
301
303
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-radial-progress
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-radial-progress>` web component renders a circular progress indicator that visualizes a completion ratio as a ring with a numeric percentage at its center. It is the radial counterpart of the linear bar exposed by `<mds-progress>`, which composes it internally, and it has no native HTML primitive equivalent.
|
|
12
12
|
|
|
@@ -34,6 +34,7 @@ The shared `variant` ladder is defined in [`agents/variants.md`](../../../../age
|
|
|
34
34
|
|
|
35
35
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
36
36
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
37
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-radial-progress--docs) - the live examples, in the published Storybook of `main`
|
|
37
38
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
38
39
|
|
|
39
40
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-radial-progress/mds-radial-progress.tsx",
|
|
@@ -261,7 +262,8 @@
|
|
|
261
262
|
"mds-progress": [
|
|
262
263
|
"mds-radial-progress"
|
|
263
264
|
]
|
|
264
|
-
}
|
|
265
|
+
},
|
|
266
|
+
"storybook": "ui-radial-progress--docs"
|
|
265
267
|
}
|
|
266
268
|
]
|
|
267
269
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-separator
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-separator>` web component is the visual divider of the Magma Design System: a thin, full-radius horizontal rule used to partition content into distinct groups. It is a purely presentational primitive - the styled equivalent of an `<hr>` - with no props, slots, events, or interactive state.
|
|
12
12
|
|
|
@@ -26,6 +26,7 @@ For the semantic color roles the default value draws from, see [`agents/color.md
|
|
|
26
26
|
|
|
27
27
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
28
28
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
29
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-separator--docs) - the live examples, in the published Storybook of `main`
|
|
29
30
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
30
31
|
|
|
31
32
|
## CSS custom properties
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-separator/mds-separator.tsx",
|
|
@@ -45,7 +46,8 @@
|
|
|
45
46
|
"mds-price-table-list": [
|
|
46
47
|
"mds-separator"
|
|
47
48
|
]
|
|
48
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"storybook": "ui-separator--docs"
|
|
49
51
|
}
|
|
50
52
|
]
|
|
51
53
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-spinner
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-spinner>` web component is the Magma Design System's loading/await indicator: a self-contained, animated SVG spinner used standalone or embedded inside host components (`mds-button`, `mds-input`, `mds-entity`) to signal an in-progress, indeterminate operation. It has no HTML primitive equivalent and exposes no text content.
|
|
12
12
|
|
|
@@ -30,6 +30,7 @@ The component exposes a single behavioral prop:
|
|
|
30
30
|
|
|
31
31
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
32
32
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
33
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-spinner--docs) - the live examples, in the published Storybook of `main`
|
|
33
34
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
34
35
|
|
|
35
36
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-spinner/mds-spinner.tsx",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
],
|
|
20
21
|
"usage": {
|
|
21
22
|
"1. Description": "The `<mds-spinner>` web component is the Magma Design System's loading/await indicator: a self-contained, animated SVG spinner used standalone or embedded inside host components (`mds-button`, `mds-input`, `mds-entity`) to signal an in-progress, indeterminate operation. It has no HTML primitive equivalent and exposes no text content.\n\n#### Semantic Behavior\n\n- **Visibility is gated by `running`**: When `running` is absent/false the spinner is hidden and its animation is paused; setting `running` reveals it and starts the animation. The animation never runs while hidden, for performance.\n- **No interactivity or accessibility role**: It is decorative - not focusable, emits no events, has no ARIA role, and is not form-associated. Any loading semantics (e.g. `aria-busy`) must be set by the surrounding context.\n- **Reduced-motion and contrast aware**: The animation slows down (8s per turn, it never stops) when the Magma animation preference reduces motion (`pref-animation-reduce`, `mds-pref-animation`, or the OS `prefers-reduced-motion` under `system`), and the color is strengthened under the contrast preference, without consumer intervention.\n\n#### Properties & Visual Configurations\n\nThe component exposes a single behavioral prop:\n\n- **`running`** is the master switch that both shows the spinner and runs its animation; treat it as a boolean presence attribute and drive it from the consuming component's loading/await state rather than toggling visibility manually.\n\n#### Other behavioral props\n\n- **`--mds-spinner-duration`** (CSS custom property, default `0.725s`) tunes the rotation speed of the spin animation; override it on the host to slow down or speed up the indicator without touching markup.\n",
|
|
22
|
-
"2. Pattern": "Correct and idiomatic ways to use the `<mds-spinner>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Spinner
|
|
23
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-spinner>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Spinner\n\nA spinner shows and animates while `running` is set.\n\n```html\n<mds-spinner running></mds-spinner>\n```\n\nWithout `running` the component is invisible and its animation paused. Render it into the DOM early and set `running` when a request starts; removing the attribute (or setting the prop to `undefined`) hides it again when done.\n\n```html\n<!-- Rendered early, hidden until a request starts -->\n<mds-spinner></mds-spinner>\n```\n\n#### Inline Loading Indicator\n\nPlace the spinner next to a label to signal that a section is loading. The spinner is painted in the accent color (`--magma-accent-fg`) by default; set `color` on the host to match the surrounding text instead.\n\n```html\n<div class=\"loading-row\">\n <mds-spinner running></mds-spinner>\n <span>Caricamento dati in corso...</span>\n</div>\n```\n\n#### Full-Page or Overlay Loading State\n\nCentre the spinner over a region with a wrapper. Drive `running` programmatically - set it when the async operation starts, remove it when done.\n\n```html\n<div class=\"overlay\">\n <mds-spinner running></mds-spinner>\n</div>\n```\n\n```css\n.overlay {\n align-items: center;\n display: flex;\n inset: 0;\n justify-content: center;\n position: absolute;\n}\n```\n\n#### Inside `mds-button` (via `await`)\n\n`mds-button` manages its own internal `<mds-spinner>` automatically through its `await` prop. Do not add a separate `<mds-spinner>` next to a button - use `await` on the button itself.\n\n```html\n<!-- While an async operation is in flight -->\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Controlling Animation Speed\n\nUse the `--mds-spinner-duration` CSS custom property to tune the rotation speed. Set it on the host element - shorter values spin faster, longer values spin slower. Reduced motion still slows the spinner down to 8s per turn, whatever this property says.\n\n```css\n.fast-indicator mds-spinner {\n --mds-spinner-duration: 0.4s;\n}\n\n.slow-indicator mds-spinner {\n --mds-spinner-duration: 1.5s;\n}\n```\n\n#### Accessible Loading Region\n\n`<mds-spinner>` is purely decorative and carries no ARIA role. Announce the loading state to screen readers by adding `aria-busy` and `aria-live` on the surrounding container, not on the spinner itself.\n\n```html\n<section aria-busy=\"true\" aria-live=\"polite\" aria-label=\"Ricerca in corso\">\n <mds-spinner running></mds-spinner>\n</section>\n```\n\n#### Colour Customization via CSS Color\n\nThe spinner stroke inherits `color` from the host, so you can recolour it without touching shadow internals. Use a semantic colour role so dark mode and high-contrast modes keep working.\n\n```css\n.status-warning-spinner mds-spinner {\n color: rgb(var(--magma-warning-text-default));\n}\n```\n\n```html\n<div class=\"status-warning-spinner\">\n <mds-spinner running></mds-spinner>\n</div>\n```\n",
|
|
23
24
|
"3. Antipattern": "Common incorrect uses of `<mds-spinner>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/anti-patterns.md`](../../../../agents/anti-patterns.md) - they apply here too but are not repeated.\n\n#### Do Not Set `running=\"false\"` to Hide the Spinner\n\nThe component's styles key on the presence of `running` (`:host([running])`). Stencil reads `\"false\"` as `false` and, since `running` is reflected, removes the attribute at the first render, so this happens to work; but the markup says the opposite of what it does, and on a prop that is not reflected the attribute stays in the DOM, where `[attr]` selectors still match it. Remove the attribute entirely - or set the prop to `undefined` - to stop and hide the spinner.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner running=\"false\"></mds-spinner>\n\n<!-- CORRECT -->\n<mds-spinner></mds-spinner>\n```\n\n#### Do Not Show Spinner Without `running` and Expect It to Animate\n\nThe spinner renders as invisible (`opacity: 0`, `transform: scale(0)`) and with the animation paused when `running` is absent. Toggling CSS visibility or opacity from outside will not start the animation - you must set the `running` attribute.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner style=\"opacity: 1; transform: none;\"></mds-spinner>\n\n<!-- CORRECT -->\n<mds-spinner running></mds-spinner>\n```\n\n#### Do Not Add ARIA Roles or Labels to the Spinner Itself\n\nThe spinner is decorative - it has no semantic content and must not become a labelled landmark or a status region. Screen readers should be informed of loading state through a parent container with `aria-busy` / `aria-live`, not through attributes placed on `<mds-spinner>`.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner running role=\"status\" aria-label=\"Caricamento\"></mds-spinner>\n\n<!-- CORRECT -->\n<div role=\"status\" aria-live=\"polite\" aria-label=\"Caricamento\">\n <mds-spinner running></mds-spinner>\n</div>\n```\n\n#### Do Not Add a Separate Spinner Alongside `mds-button`\n\n`mds-button` controls its own internal `<mds-spinner>` through the `await` prop. An extra spinner next to the button leaves the button clickable while the operation runs; `await` shows the button's own spinner and blocks interaction.\n\n```html\n<!-- INCORRECT -->\n<mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n<mds-spinner running></mds-spinner>\n\n<!-- CORRECT -->\n<mds-button label=\"Salva\" await variant=\"primary\"></mds-button>\n```\n\n#### Do Not Pierce Shadow DOM to Change the SVG Colour\n\nThe only documented customization surface is the `color` CSS property on the host (inherited by the internal stroke) and the `--mds-spinner-duration` CSS custom property. Targeting internals via `>>>` or undocumented selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-spinner >>> .await-icon svg {\n stroke: red;\n}\n\n/* CORRECT */\nmds-spinner {\n color: rgb(var(--magma-danger-text-default));\n}\n```\n\n#### Do Not Override `--mds-spinner-duration` to Pause or Stop the Animation\n\nSetting an extremely long or `infinite` duration is not a supported way to pause the spinner. Use the `running` attribute to start and stop the animation - the component manages animation-play-state itself.\n\n```css\n/* INCORRECT */\nmds-spinner {\n --mds-spinner-duration: 9999s;\n}\n```\n\n```html\n<!-- CORRECT - remove the attribute to stop -->\n<mds-spinner></mds-spinner>\n```\n"
|
|
24
25
|
},
|
|
25
26
|
"props": [
|
|
@@ -86,7 +87,8 @@
|
|
|
86
87
|
"mds-input": [
|
|
87
88
|
"mds-spinner"
|
|
88
89
|
]
|
|
89
|
-
}
|
|
90
|
+
},
|
|
91
|
+
"storybook": "ui-spinner--docs"
|
|
90
92
|
}
|
|
91
93
|
]
|
|
92
94
|
}
|
|
@@ -9,18 +9,21 @@
|
|
|
9
9
|
|
|
10
10
|
Correct and idiomatic ways to use the `<mds-spinner>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).
|
|
11
11
|
|
|
12
|
-
#### Basic Spinner
|
|
12
|
+
#### Basic Spinner
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
A spinner shows and animates while `running` is set.
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<!-- Spinner hidden - no running attribute -->
|
|
18
|
-
<mds-spinner></mds-spinner>
|
|
19
|
-
|
|
20
|
-
<!-- Spinner visible and animating -->
|
|
21
17
|
<mds-spinner running></mds-spinner>
|
|
22
18
|
```
|
|
23
19
|
|
|
20
|
+
Without `running` the component is invisible and its animation paused. Render it into the DOM early and set `running` when a request starts; removing the attribute (or setting the prop to `undefined`) hides it again when done.
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Rendered early, hidden until a request starts -->
|
|
24
|
+
<mds-spinner></mds-spinner>
|
|
25
|
+
```
|
|
26
|
+
|
|
24
27
|
#### Inline Loading Indicator
|
|
25
28
|
|
|
26
29
|
Place the spinner next to a label to signal that a section is loading. The spinner is painted in the accent color (`--magma-accent-fg`) by default; set `color` on the host to match the surrounding text instead.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-status-bar
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-status-bar>` web component is a persistent action bar of the Magma Design System that docks a small set of actions (typically `mds-button` elements) to an edge of the viewport, accompanied by an optional descriptive label. It is built on top of `<mds-modal>`, reusing its positioning and overflow handling without rendering a dismissable dialog.
|
|
12
12
|
|
|
@@ -31,6 +31,7 @@ The `<mds-status-bar>` web component is a persistent action bar of the Magma Des
|
|
|
31
31
|
|
|
32
32
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
33
33
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
34
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-status-bar--docs) - the live examples, in the published Storybook of `main`
|
|
34
35
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
35
36
|
|
|
36
37
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-status-bar/mds-status-bar.tsx",
|
|
@@ -263,7 +264,8 @@
|
|
|
263
264
|
"mds-icon",
|
|
264
265
|
"mds-text"
|
|
265
266
|
]
|
|
266
|
-
}
|
|
267
|
+
},
|
|
268
|
+
"storybook": "ui-status-bar--docs"
|
|
267
269
|
}
|
|
268
270
|
]
|
|
269
271
|
}
|