@maggioli-design-system/magma 2.4.1 → 2.5.1
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 +39 -0
- package/LICENSE +21 -0
- package/agents/assets.md +10 -0
- package/agents/components.md +2 -1
- package/agents/conventions.md +12 -0
- package/dist/cjs/{floating-controller-BiwDIKXd.js → floating-controller-DaFymQCT.js} +1 -1
- package/dist/cjs/{index-B_qgSpWL.js → index-BQNHYWJg.js} +5 -1
- package/dist/cjs/{index-B5DKRaVO.js → index-Bg68W-da.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -63
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{locale-D9XY8LN9.js → locale-CaR39iYg.js} +13 -7
- package/dist/cjs/magma-components.cjs.js +2 -2
- package/dist/cjs/mds-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-accordion-timer.cjs.entry.js +2 -2
- package/dist/cjs/mds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/mds-author.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar-stack.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/mds-badge.cjs.entry.js +2 -2
- package/dist/cjs/mds-banner_3.cjs.entry.js +6 -6
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-bibliography.cjs.entry.js +1 -1
- package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
- package/dist/cjs/mds-button_3.cjs.entry.js +8 -7
- package/dist/cjs/mds-calendar_2.cjs.entry.js +4 -4
- package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
- package/dist/cjs/mds-card.cjs.entry.js +3 -3
- package/dist/cjs/mds-details.cjs.entry.js +3 -3
- package/dist/cjs/mds-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/mds-emoji.cjs.entry.js +3 -3
- package/dist/cjs/mds-entity.cjs.entry.js +4 -4
- package/dist/cjs/mds-file-preview.cjs.entry.js +4 -4
- package/dist/cjs/mds-file.cjs.entry.js +3 -3
- package/dist/cjs/mds-filter-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-filter.cjs.entry.js +4 -4
- package/dist/cjs/mds-header-bar.cjs.entry.js +4 -4
- package/dist/cjs/mds-header.cjs.entry.js +3 -3
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +4 -4
- package/dist/cjs/mds-hr.cjs.entry.js +2 -2
- package/dist/cjs/mds-img.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +4 -4
- package/dist/cjs/mds-input-date.cjs.entry.js +5 -5
- package/dist/cjs/mds-input-field.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-range.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-select.cjs.entry.js +12 -8
- package/dist/cjs/mds-input-switch_2.cjs.entry.js +7 -7
- package/dist/cjs/mds-input-tip_2.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-upload.cjs.entry.js +4 -4
- package/dist/cjs/mds-input.cjs.entry.js +157 -40
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +4 -4
- package/dist/cjs/mds-keyboard.cjs.entry.js +10 -6
- package/dist/cjs/mds-kpi-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-kpi.cjs.entry.js +2 -2
- package/dist/cjs/mds-label.cjs.entry.js +3 -3
- package/dist/cjs/mds-link.cjs.entry.js +147 -0
- package/dist/cjs/mds-list-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-list.cjs.entry.js +2 -2
- package/dist/cjs/mds-mention.cjs.entry.js +4 -4
- package/dist/cjs/mds-modal.cjs.entry.js +7 -7
- package/dist/cjs/mds-note.cjs.entry.js +5 -5
- package/dist/cjs/mds-notification.cjs.entry.js +4 -4
- package/dist/cjs/mds-paginator-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-paginator.cjs.entry.js +5 -5
- package/dist/cjs/mds-policy-ai.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-animation.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-consumption.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-contrast.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-language.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref-mode.cjs.entry.js +5 -5
- package/dist/cjs/mds-pref-theme-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-pref-theme.cjs.entry.js +4 -4
- package/dist/cjs/mds-pref.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table-features-row.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table-features.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table-header.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-list-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-list.cjs.entry.js +3 -3
- package/dist/cjs/mds-price-table.cjs.entry.js +2 -2
- package/dist/cjs/mds-progress_2.cjs.entry.js +5 -5
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +6 -6
- package/dist/cjs/mds-push-notification.cjs.entry.js +5 -5
- package/dist/cjs/mds-quote.cjs.entry.js +3 -3
- package/dist/cjs/mds-radial-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-radial-menu.cjs.entry.js +6 -6
- package/dist/cjs/mds-separator.cjs.entry.js +3 -3
- package/dist/cjs/mds-status-bar.cjs.entry.js +4 -4
- package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +10 -8
- package/dist/cjs/mds-stepper-bar.cjs.entry.js +2 -2
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-tab-bar.cjs.entry.js +3 -3
- package/dist/cjs/mds-tab_2.cjs.entry.js +6 -6
- package/dist/cjs/mds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/mds-table-footer.cjs.entry.js +3 -3
- package/dist/cjs/mds-table-header-cell.cjs.entry.js +3 -3
- package/dist/cjs/mds-table-header.cjs.entry.js +4 -4
- package/dist/cjs/mds-table-row.cjs.entry.js +6 -6
- package/dist/cjs/mds-table.cjs.entry.js +5 -5
- package/dist/cjs/mds-text.cjs.entry.js +3 -3
- package/dist/cjs/mds-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/mds-toast.cjs.entry.js +5 -5
- package/dist/cjs/mds-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/mds-tree-item.cjs.entry.js +5 -5
- package/dist/cjs/mds-tree.cjs.entry.js +3 -3
- package/dist/cjs/mds-url-view.cjs.entry.js +4 -4
- package/dist/cjs/mds-usage.cjs.entry.js +4 -4
- package/dist/cjs/mds-video-wall.cjs.entry.js +3 -3
- package/dist/cjs/mds-zero.cjs.entry.js +4 -4
- package/dist/cjs/navigation-5yeOyO6F.js +64 -0
- package/dist/cjs/{preference-C8BcoA3M.js → preference-CQQ3eb9W.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/locale.js +12 -6
- 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/mds-accordion.css +2 -2
- 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-item/mds-accordion-item.css +9 -9
- 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/mds-accordion-timer.css +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-accordion-timer-item/mds-accordion-timer-item.css +2 -2
- 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-banner/mds-banner.css +3 -3
- 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-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-breadcrumb-item/mds-breadcrumb-item.css +1 -1
- package/dist/collection/components/mds-button/AGENTS.md +1 -1
- package/dist/collection/components/mds-button/antipattern.md +16 -0
- package/dist/collection/components/mds-button/documentation.json +2 -2
- package/dist/collection/components/mds-button/mds-button.css +4 -2
- 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/mds-calendar.css +8 -8
- 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 +2 -1
- package/dist/collection/components/mds-card/documentation.json +2 -2
- package/dist/collection/components/mds-card/mds-card.css +9 -5
- 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-chip/mds-chip.css +1 -1
- package/dist/collection/components/mds-details/AGENTS.md +1 -1
- package/dist/collection/components/mds-details/documentation.json +1 -1
- package/dist/collection/components/mds-details/mds-details.css +2 -2
- package/dist/collection/components/mds-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-dropdown/mds-dropdown.css +23 -23
- package/dist/collection/components/mds-emoji/AGENTS.md +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/mds-emoji.css +11 -6
- package/dist/collection/components/mds-entity/AGENTS.md +3 -2
- package/dist/collection/components/mds-entity/documentation.json +11 -3
- package/dist/collection/components/mds-entity/mds-entity.css +1 -1
- package/dist/collection/components/mds-entity/mds-entity.js +2 -1
- package/dist/collection/components/mds-entity/pattern.md +10 -0
- 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-file-preview/mds-file-preview.css +2 -2
- package/dist/collection/components/mds-filter/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter/documentation.json +1 -1
- package/dist/collection/components/mds-filter/mds-filter.css +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/mds-header.css +4 -4
- 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-header-bar/mds-header-bar.css +1 -1
- package/dist/collection/components/mds-help/AGENTS.md +1 -1
- package/dist/collection/components/mds-help/documentation.json +1 -1
- package/dist/collection/components/mds-help/mds-help.css +7 -5
- 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-horizontal-scroll/mds-horizontal-scroll.css +2 -2
- 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 +2 -2
- package/dist/collection/components/mds-icon/documentation.json +5 -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 +4 -2
- package/dist/collection/components/mds-input/documentation.json +2 -2
- package/dist/collection/components/mds-input/mds-input.css +8 -8
- package/dist/collection/components/mds-input/mds-input.js +12 -7
- package/dist/collection/components/mds-input/meta/input-type/InputValidationManager.js +3 -3
- package/dist/collection/components/mds-input/meta/validators.js +28 -13
- package/dist/collection/components/mds-input/meta/validity.js +8 -10
- 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/mds-input-date.css +6 -6
- 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/mds-input-date-range.css +11 -11
- 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-range/mds-input-range.css +26 -19
- package/dist/collection/components/mds-input-select/AGENTS.md +2 -2
- package/dist/collection/components/mds-input-select/documentation.json +2 -2
- package/dist/collection/components/mds-input-select/mds-input-select.css +5 -5
- package/dist/collection/components/mds-input-select/mds-input-select.js +7 -3
- package/dist/collection/components/mds-input-switch/AGENTS.md +3 -3
- package/dist/collection/components/mds-input-switch/documentation.json +3 -3
- package/dist/collection/components/mds-input-switch/mds-input-switch.css +7 -7
- package/dist/collection/components/mds-input-switch/mds-input-switch.js +4 -4
- 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-input-upload/mds-input-upload.css +2 -2
- package/dist/collection/components/mds-keyboard/AGENTS.md +2 -2
- package/dist/collection/components/mds-keyboard/documentation.json +2 -2
- package/dist/collection/components/mds-keyboard/mds-keyboard.css +5 -5
- package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -2
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.css +2 -2
- package/dist/collection/components/mds-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +1 -1
- package/dist/collection/components/mds-kpi/mds-kpi.css +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 +81 -0
- package/dist/collection/components/mds-link/antipattern.md +96 -0
- package/dist/collection/components/mds-link/documentation.json +407 -0
- package/dist/collection/components/mds-link/mds-link.css +301 -0
- package/dist/collection/components/mds-link/mds-link.js +335 -0
- package/dist/collection/components/mds-link/meta/dictionary.js +3 -0
- package/dist/collection/components/mds-link/meta/types.js +1 -0
- package/dist/collection/components/mds-link/pattern.md +100 -0
- package/dist/collection/components/mds-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +1 -1
- package/dist/collection/components/mds-list/mds-list.js +1 -1
- package/dist/collection/components/mds-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-list-item/mds-list-item.css +4 -4
- package/dist/collection/components/mds-list-item/mds-list-item.js +1 -1
- package/dist/collection/components/mds-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +1 -1
- package/dist/collection/components/mds-mention/mds-mention.js +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-modal/mds-modal.css +5 -5
- package/dist/collection/components/mds-modal/mds-modal.js +3 -3
- 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-note/mds-note.css +3 -3
- package/dist/collection/components/mds-note/mds-note.js +1 -1
- package/dist/collection/components/mds-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-notification/documentation.json +1 -1
- package/dist/collection/components/mds-notification/mds-notification.css +22 -22
- package/dist/collection/components/mds-notification/mds-notification.js +1 -1
- package/dist/collection/components/mds-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +1 -1
- package/dist/collection/components/mds-paginator/mds-paginator.css +1 -1
- package/dist/collection/components/mds-paginator/mds-paginator.js +1 -1
- package/dist/collection/components/mds-paginator-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +1 -1
- package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +1 -1
- package/dist/collection/components/mds-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +1 -1
- package/dist/collection/components/mds-policy-ai/mds-policy-ai.js +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/mds-pref.js +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-animation/mds-pref-animation.js +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +1 -1
- package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +1 -1
- package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language/mds-pref-language.js +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +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-mode/mds-pref-mode.css +2 -2
- package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +1 -1
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +1 -1
- package/dist/collection/components/mds-price-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table/documentation.json +1 -1
- package/dist/collection/components/mds-price-table/mds-price-table.js +1 -1
- package/dist/collection/components/mds-price-table-features/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features/mds-price-table-features.js +1 -1
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.js +1 -1
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.js +1 -1
- package/dist/collection/components/mds-price-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-header/mds-price-table-header.js +1 -1
- package/dist/collection/components/mds-price-table-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list/mds-price-table-list.js +1 -1
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.js +1 -1
- package/dist/collection/components/mds-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-progress/documentation.json +1 -1
- package/dist/collection/components/mds-progress/mds-progress.css +2 -0
- package/dist/collection/components/mds-progress/mds-progress.js +1 -1
- package/dist/collection/components/mds-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification/mds-push-notification.css +4 -4
- package/dist/collection/components/mds-push-notification/mds-push-notification.js +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +2 -2
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +2 -2
- package/dist/collection/components/mds-quote/AGENTS.md +1 -1
- package/dist/collection/components/mds-quote/documentation.json +1 -1
- package/dist/collection/components/mds-quote/mds-quote.js +1 -1
- package/dist/collection/components/mds-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu/mds-radial-menu.css +8 -6
- package/dist/collection/components/mds-radial-menu/mds-radial-menu.js +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.css +2 -2
- package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.js +1 -1
- package/dist/collection/components/mds-radial-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +1 -1
- package/dist/collection/components/mds-radial-progress/mds-radial-progress.css +1 -1
- package/dist/collection/components/mds-radial-progress/mds-radial-progress.js +1 -1
- package/dist/collection/components/mds-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +1 -1
- package/dist/collection/components/mds-separator/mds-separator.js +1 -1
- package/dist/collection/components/mds-spinner/AGENTS.md +1 -1
- package/dist/collection/components/mds-spinner/documentation.json +1 -1
- package/dist/collection/components/mds-spinner/mds-spinner.css +6 -0
- package/dist/collection/components/mds-spinner/mds-spinner.js +1 -1
- package/dist/collection/components/mds-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +1 -1
- package/dist/collection/components/mds-status-bar/mds-status-bar.css +4 -3
- package/dist/collection/components/mds-status-bar/mds-status-bar.js +1 -1
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +1 -1
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.css +4 -2
- package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +6 -4
- package/dist/collection/components/mds-tab/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab/documentation.json +1 -1
- package/dist/collection/components/mds-tab/mds-tab.css +9 -7
- package/dist/collection/components/mds-tab/mds-tab.js +2 -2
- package/dist/collection/components/mds-tab-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar/mds-tab-bar.js +1 -1
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.css +2 -2
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +1 -1
- package/dist/collection/components/mds-tab-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-item/mds-tab-item.js +1 -1
- package/dist/collection/components/mds-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-table/documentation.json +1 -1
- package/dist/collection/components/mds-table/mds-table.css +1 -1
- package/dist/collection/components/mds-table/mds-table.js +1 -1
- package/dist/collection/components/mds-table-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +1 -1
- package/dist/collection/components/mds-table-body/mds-table-body.js +1 -1
- package/dist/collection/components/mds-table-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-cell/mds-table-cell.js +1 -1
- package/dist/collection/components/mds-table-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-footer/mds-table-footer.js +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-table-header/mds-table-header.js +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +1 -1
- package/dist/collection/components/mds-table-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-row/documentation.json +1 -1
- package/dist/collection/components/mds-table-row/mds-table-row.css +1 -1
- package/dist/collection/components/mds-table-row/mds-table-row.js +2 -2
- package/dist/collection/components/mds-text/AGENTS.md +2 -2
- package/dist/collection/components/mds-text/antipattern.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +4 -4
- package/dist/collection/components/mds-text/mds-text.js +1 -1
- package/dist/collection/components/mds-text/pattern.md +10 -0
- 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/mds-toast.css +2 -2
- package/dist/collection/components/mds-toast/mds-toast.js +1 -1
- package/dist/collection/components/mds-toast-region/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast-region/documentation.json +1 -1
- package/dist/collection/components/mds-toast-region/mds-toast-region.js +1 -1
- package/dist/collection/components/mds-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +1 -1
- package/dist/collection/components/mds-tooltip/mds-tooltip.css +25 -25
- package/dist/collection/components/mds-tooltip/mds-tooltip.js +1 -1
- package/dist/collection/components/mds-tree/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree/documentation.json +1 -1
- package/dist/collection/components/mds-tree/mds-tree.css +1 -1
- package/dist/collection/components/mds-tree/mds-tree.js +1 -1
- package/dist/collection/components/mds-tree-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +1 -1
- package/dist/collection/components/mds-tree-item/mds-tree-item.css +0 -1
- package/dist/collection/components/mds-tree-item/mds-tree-item.js +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +1 -1
- package/dist/collection/components/mds-url-view/mds-url-view.js +1 -1
- package/dist/collection/components/mds-usage/AGENTS.md +1 -1
- package/dist/collection/components/mds-usage/documentation.json +1 -1
- package/dist/collection/components/mds-usage/mds-usage.js +1 -1
- package/dist/collection/components/mds-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-video-wall/mds-video-wall.js +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/collection/components/mds-zero/mds-zero.css +2 -2
- package/dist/collection/components/mds-zero/mds-zero.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/mds-accordion-item.js +1 -1
- package/dist/components/mds-accordion-timer-item.js +1 -1
- package/dist/components/mds-accordion-timer.js +1 -1
- package/dist/components/mds-accordion.js +1 -1
- package/dist/components/mds-author.js +1 -1
- package/dist/components/mds-avatar-stack-item.js +1 -1
- package/dist/components/mds-avatar-stack.js +1 -1
- package/dist/components/mds-avatar.js +1 -1
- package/dist/components/mds-badge.js +1 -1
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-benchmark-bar.js +1 -1
- package/dist/components/mds-bibliography.js +1 -1
- package/dist/components/mds-breadcrumb-item.js +1 -1
- package/dist/components/mds-breadcrumb.js +1 -1
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-button-group.js +1 -1
- package/dist/components/mds-button.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-card-content.js +1 -1
- package/dist/components/mds-card-footer.js +1 -1
- package/dist/components/mds-card-header.js +1 -1
- package/dist/components/mds-card-media.js +1 -1
- package/dist/components/mds-card.js +1 -1
- package/dist/components/mds-chip.js +1 -1
- package/dist/components/mds-details.js +1 -1
- package/dist/components/mds-dropdown.js +1 -1
- package/dist/components/mds-emoji.js +3 -3
- package/dist/components/mds-entity.js +1 -1
- package/dist/components/mds-file-preview.js +1 -1
- package/dist/components/mds-file.js +1 -1
- package/dist/components/mds-filter-item.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header-bar.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-help.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-hr.js +1 -1
- package/dist/components/mds-icon.js +1 -1
- package/dist/components/mds-img.js +1 -1
- package/dist/components/mds-input-date-range-preselection.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-field.js +1 -1
- package/dist/components/mds-input-otp.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-input-select.js +1 -1
- package/dist/components/mds-input-switch.js +1 -1
- package/dist/components/mds-input-tip-item.js +1 -1
- package/dist/components/mds-input-tip.js +1 -1
- package/dist/components/mds-input-upload.js +1 -1
- package/dist/components/mds-input.js +1 -1
- package/dist/components/mds-keyboard-key.js +1 -1
- package/dist/components/mds-keyboard.js +1 -1
- package/dist/components/mds-kpi-item.js +1 -1
- package/dist/components/mds-kpi.js +1 -1
- package/dist/components/mds-label.js +1 -1
- package/dist/components/mds-link.d.ts +11 -0
- package/dist/components/mds-link.js +1 -0
- package/dist/components/mds-list-item.js +1 -1
- package/dist/components/mds-list.js +1 -1
- package/dist/components/mds-mention.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-note.js +1 -1
- package/dist/components/mds-notification.js +1 -1
- package/dist/components/mds-paginator-item.js +1 -1
- package/dist/components/mds-paginator.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-pref-animation.js +1 -1
- package/dist/components/mds-pref-consumption.js +1 -1
- package/dist/components/mds-pref-contrast.js +1 -1
- package/dist/components/mds-pref-language-item.js +1 -1
- package/dist/components/mds-pref-language.js +1 -1
- package/dist/components/mds-pref-mode.js +1 -1
- package/dist/components/mds-pref-theme-item.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/components/mds-pref.js +1 -1
- package/dist/components/mds-price-table-features-cell.js +1 -1
- package/dist/components/mds-price-table-features-row.js +1 -1
- package/dist/components/mds-price-table-features.js +1 -1
- package/dist/components/mds-price-table-header.js +1 -1
- package/dist/components/mds-price-table-list-item.js +1 -1
- package/dist/components/mds-price-table-list.js +1 -1
- package/dist/components/mds-price-table.js +1 -1
- package/dist/components/mds-progress.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-push-notification.js +1 -1
- package/dist/components/mds-quote.js +1 -1
- package/dist/components/mds-radial-menu-item.js +1 -1
- package/dist/components/mds-radial-menu.js +1 -1
- package/dist/components/mds-radial-progress.js +1 -1
- package/dist/components/mds-separator.js +1 -1
- package/dist/components/mds-spinner.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-stepper-bar-item.js +1 -1
- package/dist/components/mds-stepper-bar.js +1 -1
- package/dist/components/mds-tab-bar-item.js +1 -1
- package/dist/components/mds-tab-bar.js +1 -1
- package/dist/components/mds-tab-item.js +1 -1
- package/dist/components/mds-tab.js +1 -1
- package/dist/components/mds-table-body.js +1 -1
- package/dist/components/mds-table-cell.js +1 -1
- package/dist/components/mds-table-footer.js +1 -1
- package/dist/components/mds-table-header-cell.js +1 -1
- package/dist/components/mds-table-header.js +1 -1
- package/dist/components/mds-table-row.js +1 -1
- package/dist/components/mds-table.js +1 -1
- package/dist/components/mds-text.js +1 -1
- package/dist/components/mds-toast-region.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/mds-tooltip.js +1 -1
- package/dist/components/mds-tree-item.js +1 -1
- package/dist/components/mds-tree.js +1 -1
- package/dist/components/mds-url-view.js +1 -1
- package/dist/components/mds-usage.js +1 -1
- package/dist/components/mds-video-wall.js +1 -1
- package/dist/components/mds-zero.js +1 -1
- package/dist/components/{p-D_0rjNZp.js → p-5lLueiFt.js} +1 -1
- package/dist/components/p-B0AnE3sA.js +1 -0
- package/dist/components/{p-DSxDXNWp.js → p-BO-jHv-F.js} +1 -1
- package/dist/components/{p-Didp833Z.js → p-BU3bsIX2.js} +1 -1
- package/dist/components/{p-NlPseOAv.js → p-BbK4qeM7.js} +1 -1
- package/dist/components/p-BbgQG1UL.js +8 -0
- package/dist/components/p-BwJQB6rG.js +1 -0
- package/dist/components/p-Bz1eiKqd.js +1 -0
- package/dist/components/{p-BLiWCyrD.js → p-C4XdTZQ-.js} +1 -1
- package/dist/components/{p-BFisF7aN.js → p-CHHEp_7y.js} +1 -1
- package/dist/components/{p-B1bYa-o0.js → p-CJYY4da7.js} +1 -1
- package/dist/components/{p-DezdwzYQ.js → p-CNF3u0Li.js} +1 -1
- package/dist/components/p-CPvuXO7s.js +1 -0
- package/dist/components/{p-DaptTdaU.js → p-CSxW5f2f.js} +1 -1
- package/dist/components/{p-BlnEiKN4.js → p-CVRN4LDc.js} +1 -1
- package/dist/{magma-components/p-BmT_DEV2.js → components/p-CZjwSwe5.js} +2 -2
- package/dist/components/{p-sM-eFjwq.js → p-CaROqeeK.js} +1 -1
- package/dist/components/p-ClPv-Ljc.js +1 -0
- package/dist/components/{p-cIZniMh0.js → p-Cmn1DJAB.js} +1 -1
- package/dist/components/p-Cu5nEwMu.js +1 -0
- package/dist/components/{p-fhAmrBfl.js → p-D-DdDIb9.js} +1 -1
- package/dist/components/p-D0A8gS-P.js +1 -0
- package/dist/components/p-D8wd-EZX.js +1 -0
- package/dist/components/p-DFD4E9zJ.js +1 -0
- package/dist/components/p-DNeEn8Rr.js +1 -0
- package/dist/components/{p-Bg5E4Wnq.js → p-DTtmr_Y9.js} +1 -1
- package/dist/components/{p-DACnmwad.js → p-DkUdrGHq.js} +1 -1
- package/dist/components/{p-D4JiVIoh.js → p-DkYDXDkD.js} +1 -1
- package/dist/components/{p-BL220gRU.js → p-Dm-OUwDe.js} +1 -1
- package/dist/components/p-DnySYX0L.js +1 -0
- package/dist/components/{p-NOw8-OrM.js → p-DucY18_e.js} +1 -1
- package/dist/components/{p-B2p5a1Y8.js → p-TZJN-ygm.js} +1 -1
- package/dist/components/{p-B6B6q5kP.js → p-ZuubAcA3.js} +1 -1
- package/dist/{magma-components/p-DmFo8_MF.js → components/p-jasGzfhE.js} +1 -1
- package/dist/components/{p-JPhOaOXe.js → p-s1CktmPS.js} +1 -1
- package/dist/components/p-yNPPTJ7i.js +1 -0
- package/dist/documentation.json +433 -13
- package/dist/esm/{floating-controller-CVVcyKew.js → floating-controller-BVlbYYkf.js} +1 -1
- package/dist/esm/{index-DI_6NAg0.js → index-BJVvHlvf.js} +1 -1
- package/dist/esm/{index-CPRkNQdE.js → index-CvLLN-QH.js} +5 -1
- package/dist/esm/index.js +3 -63
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{locale-DfpXg7qZ.js → locale-B6cOkl4I.js} +13 -7
- package/dist/esm/magma-components.js +3 -3
- package/dist/esm/mds-accordion-item.entry.js +3 -3
- package/dist/esm/mds-accordion-timer-item.entry.js +3 -3
- package/dist/esm/mds-accordion-timer.entry.js +2 -2
- package/dist/esm/mds-accordion.entry.js +3 -3
- package/dist/esm/mds-author.entry.js +1 -1
- package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm/mds-avatar-stack.entry.js +1 -1
- package/dist/esm/mds-avatar.entry.js +2 -2
- package/dist/esm/mds-badge.entry.js +2 -2
- package/dist/esm/mds-banner_3.entry.js +6 -6
- package/dist/esm/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm/mds-bibliography.entry.js +1 -1
- package/dist/esm/mds-breadcrumb-item.entry.js +2 -2
- package/dist/esm/mds-breadcrumb.entry.js +3 -3
- package/dist/esm/mds-button-dropdown.entry.js +3 -3
- package/dist/esm/mds-button-group.entry.js +1 -1
- package/dist/esm/mds-button_3.entry.js +6 -5
- package/dist/esm/mds-calendar_2.entry.js +4 -4
- package/dist/esm/mds-card-content.entry.js +1 -1
- package/dist/esm/mds-card-footer.entry.js +1 -1
- package/dist/esm/mds-card-header.entry.js +1 -1
- package/dist/esm/mds-card-media.entry.js +1 -1
- package/dist/esm/mds-card.entry.js +3 -3
- package/dist/esm/mds-details.entry.js +3 -3
- package/dist/esm/mds-dropdown.entry.js +4 -4
- package/dist/esm/mds-emoji.entry.js +3 -3
- package/dist/esm/mds-entity.entry.js +4 -4
- package/dist/esm/mds-file-preview.entry.js +4 -4
- package/dist/esm/mds-file.entry.js +3 -3
- package/dist/esm/mds-filter-item.entry.js +3 -3
- package/dist/esm/mds-filter.entry.js +4 -4
- package/dist/esm/mds-header-bar.entry.js +4 -4
- package/dist/esm/mds-header.entry.js +3 -3
- package/dist/esm/mds-horizontal-scroll.entry.js +4 -4
- package/dist/esm/mds-hr.entry.js +2 -2
- package/dist/esm/mds-img.entry.js +3 -3
- package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +4 -4
- package/dist/esm/mds-input-date.entry.js +5 -5
- package/dist/esm/mds-input-field.entry.js +1 -1
- package/dist/esm/mds-input-otp.entry.js +3 -3
- package/dist/esm/mds-input-range.entry.js +3 -3
- package/dist/esm/mds-input-select.entry.js +12 -8
- package/dist/esm/mds-input-switch_2.entry.js +7 -7
- package/dist/esm/mds-input-tip_2.entry.js +3 -3
- package/dist/esm/mds-input-upload.entry.js +4 -4
- package/dist/esm/mds-input.entry.js +157 -40
- package/dist/esm/mds-keyboard-key.entry.js +4 -4
- package/dist/esm/mds-keyboard.entry.js +10 -6
- package/dist/esm/mds-kpi-item.entry.js +2 -2
- package/dist/esm/mds-kpi.entry.js +2 -2
- package/dist/esm/mds-label.entry.js +3 -3
- package/dist/esm/mds-link.entry.js +145 -0
- package/dist/esm/mds-list-item.entry.js +3 -3
- package/dist/esm/mds-list.entry.js +2 -2
- package/dist/esm/mds-mention.entry.js +4 -4
- package/dist/esm/mds-modal.entry.js +7 -7
- package/dist/esm/mds-note.entry.js +5 -5
- package/dist/esm/mds-notification.entry.js +4 -4
- package/dist/esm/mds-paginator-item.entry.js +3 -3
- package/dist/esm/mds-paginator.entry.js +5 -5
- package/dist/esm/mds-policy-ai.entry.js +4 -4
- package/dist/esm/mds-pref-animation.entry.js +4 -4
- package/dist/esm/mds-pref-consumption.entry.js +4 -4
- package/dist/esm/mds-pref-contrast.entry.js +4 -4
- package/dist/esm/mds-pref-language-item.entry.js +4 -4
- package/dist/esm/mds-pref-language.entry.js +4 -4
- package/dist/esm/mds-pref-mode.entry.js +5 -5
- package/dist/esm/mds-pref-theme-item.entry.js +2 -2
- package/dist/esm/mds-pref-theme.entry.js +4 -4
- package/dist/esm/mds-pref.entry.js +4 -4
- package/dist/esm/mds-price-table-features-cell.entry.js +3 -3
- package/dist/esm/mds-price-table-features-row.entry.js +3 -3
- package/dist/esm/mds-price-table-features.entry.js +3 -3
- package/dist/esm/mds-price-table-header.entry.js +2 -2
- package/dist/esm/mds-price-table-list-item.entry.js +2 -2
- package/dist/esm/mds-price-table-list.entry.js +3 -3
- package/dist/esm/mds-price-table.entry.js +2 -2
- package/dist/esm/mds-progress_2.entry.js +5 -5
- package/dist/esm/mds-push-notification-item.entry.js +6 -6
- package/dist/esm/mds-push-notification.entry.js +5 -5
- package/dist/esm/mds-quote.entry.js +3 -3
- package/dist/esm/mds-radial-menu-item.entry.js +3 -3
- package/dist/esm/mds-radial-menu.entry.js +6 -6
- package/dist/esm/mds-separator.entry.js +3 -3
- package/dist/esm/mds-status-bar.entry.js +4 -4
- package/dist/esm/mds-stepper-bar-item.entry.js +10 -8
- package/dist/esm/mds-stepper-bar.entry.js +2 -2
- package/dist/esm/mds-tab-bar-item.entry.js +4 -4
- package/dist/esm/mds-tab-bar.entry.js +3 -3
- package/dist/esm/mds-tab_2.entry.js +6 -6
- package/dist/esm/mds-table-body.entry.js +3 -3
- package/dist/esm/mds-table-footer.entry.js +3 -3
- package/dist/esm/mds-table-header-cell.entry.js +3 -3
- package/dist/esm/mds-table-header.entry.js +4 -4
- package/dist/esm/mds-table-row.entry.js +6 -6
- package/dist/esm/mds-table.entry.js +5 -5
- package/dist/esm/mds-text.entry.js +3 -3
- package/dist/esm/mds-toast-region.entry.js +2 -2
- package/dist/esm/mds-toast.entry.js +5 -5
- package/dist/esm/mds-tooltip.entry.js +5 -5
- package/dist/esm/mds-tree-item.entry.js +5 -5
- package/dist/esm/mds-tree.entry.js +3 -3
- package/dist/esm/mds-url-view.entry.js +4 -4
- package/dist/esm/mds-usage.entry.js +4 -4
- package/dist/esm/mds-video-wall.entry.js +3 -3
- package/dist/esm/mds-zero.entry.js +4 -4
- package/dist/esm/navigation-Bz1eiKqd.js +62 -0
- package/dist/esm/{preference-Ch1zJnqq.js → preference-C5XjgGCb.js} +1 -1
- package/dist/esm-es5/{floating-controller-CVVcyKew.js → floating-controller-BVlbYYkf.js} +1 -1
- package/dist/esm-es5/{index-DI_6NAg0.js → index-BJVvHlvf.js} +1 -1
- package/dist/esm-es5/{index-CPRkNQdE.js → index-CvLLN-QH.js} +4 -2
- package/dist/esm-es5/index.js +20 -37
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{locale-DfpXg7qZ.js → locale-B6cOkl4I.js} +23 -19
- package/dist/esm-es5/magma-components.js +2 -2
- package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
- package/dist/esm-es5/mds-accordion.entry.js +2 -2
- package/dist/esm-es5/mds-author.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
- package/dist/esm-es5/mds-avatar.entry.js +2 -2
- package/dist/esm-es5/mds-badge.entry.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +3 -3
- package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm-es5/mds-bibliography.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
- package/dist/esm-es5/mds-button-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-button-group.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +2 -2
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-card-content.entry.js +1 -1
- package/dist/esm-es5/mds-card-footer.entry.js +1 -1
- package/dist/esm-es5/mds-card-header.entry.js +1 -1
- package/dist/esm-es5/mds-card-media.entry.js +1 -1
- package/dist/esm-es5/mds-card.entry.js +1 -1
- package/dist/esm-es5/mds-details.entry.js +1 -1
- package/dist/esm-es5/mds-dropdown.entry.js +15 -15
- package/dist/esm-es5/mds-emoji.entry.js +2 -2
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +7 -7
- package/dist/esm-es5/mds-file.entry.js +1 -1
- package/dist/esm-es5/mds-filter-item.entry.js +1 -1
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-header-bar.entry.js +1 -1
- package/dist/esm-es5/mds-header.entry.js +1 -1
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +2 -2
- package/dist/esm-es5/mds-hr.entry.js +1 -1
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +15 -15
- package/dist/esm-es5/mds-input-date.entry.js +1 -1
- package/dist/esm-es5/mds-input-field.entry.js +1 -1
- package/dist/esm-es5/mds-input-otp.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +7 -7
- package/dist/esm-es5/mds-input-select.entry.js +5 -4
- package/dist/esm-es5/mds-input-switch_2.entry.js +3 -3
- package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-upload.entry.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +53 -50
- package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
- package/dist/esm-es5/mds-keyboard.entry.js +6 -3
- package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
- package/dist/esm-es5/mds-kpi.entry.js +1 -1
- package/dist/esm-es5/mds-label.entry.js +1 -1
- package/dist/esm-es5/mds-link.entry.js +39 -0
- package/dist/esm-es5/mds-list-item.entry.js +2 -2
- package/dist/esm-es5/mds-list.entry.js +1 -1
- package/dist/esm-es5/mds-mention.entry.js +2 -2
- package/dist/esm-es5/mds-modal.entry.js +3 -3
- package/dist/esm-es5/mds-note.entry.js +2 -2
- package/dist/esm-es5/mds-notification.entry.js +8 -8
- package/dist/esm-es5/mds-paginator-item.entry.js +2 -2
- package/dist/esm-es5/mds-paginator.entry.js +2 -2
- package/dist/esm-es5/mds-policy-ai.entry.js +2 -2
- package/dist/esm-es5/mds-pref-animation.entry.js +2 -2
- package/dist/esm-es5/mds-pref-consumption.entry.js +2 -2
- package/dist/esm-es5/mds-pref-contrast.entry.js +2 -2
- package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
- package/dist/esm-es5/mds-pref-language.entry.js +2 -2
- package/dist/esm-es5/mds-pref-mode.entry.js +2 -2
- package/dist/esm-es5/mds-pref-theme-item.entry.js +3 -3
- package/dist/esm-es5/mds-pref-theme.entry.js +2 -2
- package/dist/esm-es5/mds-pref.entry.js +2 -2
- package/dist/esm-es5/mds-price-table-features-cell.entry.js +2 -2
- package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list-item.entry.js +2 -2
- package/dist/esm-es5/mds-price-table-list.entry.js +2 -2
- package/dist/esm-es5/mds-price-table.entry.js +1 -1
- package/dist/esm-es5/mds-progress_2.entry.js +3 -3
- package/dist/esm-es5/mds-push-notification-item.entry.js +2 -2
- package/dist/esm-es5/mds-push-notification.entry.js +2 -2
- package/dist/esm-es5/mds-quote.entry.js +2 -2
- package/dist/esm-es5/mds-radial-menu-item.entry.js +2 -2
- package/dist/esm-es5/mds-radial-menu.entry.js +4 -4
- package/dist/esm-es5/mds-separator.entry.js +1 -1
- package/dist/esm-es5/mds-status-bar.entry.js +2 -2
- package/dist/esm-es5/mds-stepper-bar-item.entry.js +6 -3
- package/dist/esm-es5/mds-stepper-bar.entry.js +2 -2
- package/dist/esm-es5/mds-tab-bar-item.entry.js +2 -2
- package/dist/esm-es5/mds-tab-bar.entry.js +2 -2
- package/dist/esm-es5/mds-tab_2.entry.js +3 -3
- package/dist/esm-es5/mds-table-body.entry.js +1 -1
- package/dist/esm-es5/mds-table-footer.entry.js +2 -2
- package/dist/esm-es5/mds-table-header-cell.entry.js +2 -2
- package/dist/esm-es5/mds-table-header.entry.js +2 -2
- package/dist/esm-es5/mds-table-row.entry.js +2 -2
- package/dist/esm-es5/mds-table.entry.js +2 -2
- package/dist/esm-es5/mds-text.entry.js +2 -2
- package/dist/esm-es5/mds-toast-region.entry.js +3 -3
- package/dist/esm-es5/mds-toast.entry.js +2 -2
- package/dist/esm-es5/mds-tooltip.entry.js +3 -3
- package/dist/esm-es5/mds-tree-item.entry.js +2 -2
- package/dist/esm-es5/mds-tree.entry.js +2 -2
- package/dist/esm-es5/mds-url-view.entry.js +2 -2
- package/dist/esm-es5/mds-usage.entry.js +2 -2
- package/dist/esm-es5/mds-video-wall.entry.js +2 -2
- package/dist/esm-es5/mds-zero.entry.js +1 -1
- package/dist/esm-es5/navigation-Bz1eiKqd.js +17 -0
- package/dist/esm-es5/{preference-Ch1zJnqq.js → preference-C5XjgGCb.js} +4 -4
- package/dist/hydrate/index.js +645 -350
- package/dist/hydrate/index.mjs +645 -350
- package/dist/magma-components/index.esm.js +1 -1
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/magma-components.js +1 -1
- package/dist/magma-components/{p-4fdda209.system.entry.js → p-0033cb92.system.entry.js} +2 -2
- package/dist/magma-components/p-0193734e.entry.js +1 -0
- package/dist/magma-components/{p-6c91b00d.system.entry.js → p-02298ed0.system.entry.js} +2 -2
- package/dist/magma-components/p-02fe26b4.system.entry.js +35 -0
- package/dist/magma-components/p-046697e4.system.entry.js +12 -0
- package/dist/magma-components/{p-a1ca2441.system.entry.js → p-0679c988.system.entry.js} +1 -1
- package/dist/magma-components/{p-1f9ebc0d.entry.js → p-06ccc40d.entry.js} +1 -1
- package/dist/magma-components/{p-926ef760.entry.js → p-06fde29d.entry.js} +1 -1
- package/dist/magma-components/{p-8059aa67.system.entry.js → p-071f5c7b.system.entry.js} +3 -3
- package/dist/magma-components/{p-d0c0c195.entry.js → p-075acd04.entry.js} +1 -1
- package/dist/magma-components/{p-547f657e.system.entry.js → p-07a3c63c.system.entry.js} +1 -1
- package/dist/magma-components/{p-176e6d9d.system.entry.js → p-08370fc2.system.entry.js} +1 -1
- package/dist/magma-components/{p-e032e77f.system.entry.js → p-083dceb8.system.entry.js} +1 -1
- package/dist/magma-components/p-093b8fbc.system.entry.js +20 -0
- package/dist/magma-components/{p-a136e6fe.system.entry.js → p-09a7b578.system.entry.js} +1 -1
- package/dist/magma-components/{p-e6ed6e12.entry.js → p-09f621ea.entry.js} +1 -1
- package/dist/magma-components/p-0a8e8525.entry.js +1 -0
- package/dist/magma-components/p-0e2cd21e.entry.js +1 -0
- package/dist/magma-components/{p-0f47fd37.system.entry.js → p-0e887379.system.entry.js} +2 -2
- package/dist/magma-components/p-104ba54e.system.entry.js +13 -0
- package/dist/magma-components/p-11320427.entry.js +1 -0
- package/dist/magma-components/p-14635a8f.entry.js +1 -0
- package/dist/magma-components/p-168d5fad.entry.js +1 -0
- package/dist/magma-components/{p-cc0cb701.entry.js → p-17ec24dc.entry.js} +1 -1
- package/dist/magma-components/{p-4225484c.entry.js → p-198ea5d8.entry.js} +1 -1
- package/dist/magma-components/p-1c2c4670.entry.js +1 -0
- package/dist/magma-components/{p-c4286fb7.system.entry.js → p-1d2220f0.system.entry.js} +1 -1
- package/dist/magma-components/{p-eebf450c.system.entry.js → p-1e18fcc5.system.entry.js} +2 -2
- package/dist/magma-components/p-1ea582a9.system.entry.js +55 -0
- package/dist/magma-components/p-1f623b75.entry.js +1 -0
- package/dist/magma-components/{p-af704402.system.entry.js → p-21547758.system.entry.js} +1 -1
- package/dist/magma-components/{p-0dd4b006.entry.js → p-221c2f0d.entry.js} +1 -1
- package/dist/magma-components/{p-3ba5ddae.entry.js → p-227f57e6.entry.js} +1 -1
- package/dist/magma-components/{p-0727d8f9.entry.js → p-23722401.entry.js} +1 -1
- package/dist/magma-components/p-23fabd66.system.entry.js +1 -0
- package/dist/magma-components/{p-a40443ca.system.entry.js → p-2431fbfa.system.entry.js} +1 -1
- package/dist/magma-components/{p-a2ec6eac.entry.js → p-25a6e977.entry.js} +1 -1
- package/dist/magma-components/p-2752b45a.system.entry.js +54 -0
- package/dist/magma-components/{p-2362b91a.entry.js → p-278c362d.entry.js} +1 -1
- package/dist/magma-components/{p-916a26e4.entry.js → p-295d8fab.entry.js} +1 -1
- package/dist/magma-components/{p-3bb26611.entry.js → p-29971e1d.entry.js} +1 -1
- package/dist/magma-components/p-2a4d22c9.system.entry.js +13 -0
- package/dist/magma-components/p-2c3f518c.system.entry.js +25 -0
- package/dist/magma-components/p-2c845743.system.entry.js +1 -0
- package/dist/magma-components/{p-3ac09ace.entry.js → p-2d9c9ef9.entry.js} +1 -1
- package/dist/magma-components/{p-5219eba6.system.entry.js → p-2e48f88d.system.entry.js} +2 -2
- package/dist/magma-components/{p-c89c2e30.entry.js → p-30be5c39.entry.js} +1 -1
- package/dist/magma-components/{p-62e65f3b.entry.js → p-335244bb.entry.js} +1 -1
- package/dist/magma-components/p-35528bdd.system.entry.js +225 -0
- package/dist/magma-components/{p-aa8653b1.system.entry.js → p-37487e8b.system.entry.js} +2 -2
- package/dist/magma-components/p-377d0661.entry.js +1 -0
- package/dist/magma-components/{p-8e08ae08.system.entry.js → p-38b16983.system.entry.js} +3 -3
- package/dist/magma-components/{p-e5ab1f4f.entry.js → p-3abaa053.entry.js} +1 -1
- package/dist/magma-components/{p-0c9bdfff.system.entry.js → p-3beea731.system.entry.js} +1 -1
- package/dist/magma-components/p-3c669cfb.entry.js +1 -0
- package/dist/magma-components/{p-e1ce306a.system.entry.js → p-3d162e99.system.entry.js} +2 -2
- package/dist/magma-components/p-3d95e688.system.entry.js +111 -0
- package/dist/magma-components/{p-6bc4114c.system.entry.js → p-3df07021.system.entry.js} +1 -1
- package/dist/magma-components/{p-b58363e2.system.entry.js → p-3e18b181.system.entry.js} +2 -2
- package/dist/magma-components/{p-028f3717.entry.js → p-3f68ddca.entry.js} +1 -1
- package/dist/magma-components/p-3fb46ab9.system.entry.js +1 -0
- package/dist/magma-components/{p-f43379ef.entry.js → p-41a0f896.entry.js} +1 -1
- package/dist/magma-components/p-44333d50.system.entry.js +82 -0
- package/dist/magma-components/{p-815801dd.system.entry.js → p-44998584.system.entry.js} +2 -2
- package/dist/magma-components/p-464e6431.entry.js +1 -0
- package/dist/magma-components/p-4776ac1f.entry.js +1 -0
- package/dist/magma-components/{p-b919ce62.entry.js → p-4792ff7f.entry.js} +1 -1
- package/dist/magma-components/{p-72cc4977.system.entry.js → p-4bc3335f.system.entry.js} +1 -1
- package/dist/magma-components/{p-5b21eb78.entry.js → p-4cabfdbc.entry.js} +1 -1
- package/dist/magma-components/{p-f30cdd34.system.entry.js → p-4d485e1f.system.entry.js} +1 -1
- package/dist/magma-components/{p-342770d2.system.entry.js → p-50705d36.system.entry.js} +2 -2
- package/dist/magma-components/{p-c72651b2.entry.js → p-521ba3a8.entry.js} +1 -1
- package/dist/magma-components/{p-da532544.system.entry.js → p-52d905fe.system.entry.js} +1 -1
- package/dist/magma-components/{p-23ce0824.entry.js → p-5435f2a9.entry.js} +1 -1
- package/dist/magma-components/{p-37b801d0.system.entry.js → p-5472f18d.system.entry.js} +2 -2
- package/dist/magma-components/{p-23bf1afa.system.entry.js → p-55b10b70.system.entry.js} +3 -3
- package/dist/magma-components/p-5cfa0dce.entry.js +1 -0
- package/dist/magma-components/{p-f7af41fb.system.entry.js → p-5ef0fb69.system.entry.js} +2 -2
- package/dist/magma-components/{p-a4f46de1.system.entry.js → p-5f8db04c.system.entry.js} +2 -2
- package/dist/magma-components/{p-765ff9a3.system.entry.js → p-624a3909.system.entry.js} +1 -1
- package/dist/magma-components/{p-29d4605e.system.entry.js → p-62e94d78.system.entry.js} +4 -4
- package/dist/magma-components/{p-0bcf3bb6.entry.js → p-62fc9695.entry.js} +1 -1
- package/dist/magma-components/{p-4ea00c22.entry.js → p-63b10a6e.entry.js} +1 -1
- package/dist/magma-components/{p-b40ef7ab.system.entry.js → p-642925b7.system.entry.js} +2 -2
- package/dist/magma-components/{p-32bfb09c.entry.js → p-6436178a.entry.js} +1 -1
- package/dist/magma-components/p-6560b426.system.entry.js +4 -0
- package/dist/magma-components/{p-f88c202e.entry.js → p-67eb3881.entry.js} +1 -1
- package/dist/magma-components/p-69abd1d1.entry.js +1 -0
- package/dist/magma-components/{p-bc30508b.entry.js → p-69badbba.entry.js} +1 -1
- package/dist/magma-components/{p-5ea3be82.system.entry.js → p-6a2d67d1.system.entry.js} +2 -2
- package/dist/magma-components/p-6af00399.system.entry.js +41 -0
- package/dist/magma-components/{p-721b625a.system.entry.js → p-6dff107d.system.entry.js} +9 -9
- package/dist/magma-components/p-6e32bf99.entry.js +1 -0
- package/dist/magma-components/p-72ad419d.system.entry.js +10 -0
- package/dist/magma-components/{p-f3763382.entry.js → p-762a6b7b.entry.js} +1 -1
- package/dist/magma-components/p-770b3c4b.entry.js +1 -0
- package/dist/magma-components/p-772c18f4.entry.js +1 -0
- package/dist/magma-components/p-77545238.entry.js +1 -0
- package/dist/magma-components/{p-11feeebf.system.entry.js → p-7961c335.system.entry.js} +1 -1
- package/dist/magma-components/{p-6ebbcd7b.system.entry.js → p-79f543fc.system.entry.js} +2 -2
- package/dist/magma-components/p-7ad68b2f.entry.js +1 -0
- package/dist/magma-components/{p-e49818c4.entry.js → p-7b300282.entry.js} +1 -1
- package/dist/magma-components/{p-1a5411a8.entry.js → p-7be0d28b.entry.js} +1 -1
- package/dist/magma-components/{p-3871807a.entry.js → p-7bf46d43.entry.js} +1 -1
- package/dist/magma-components/p-7c217aa5.entry.js +1 -0
- package/dist/magma-components/{p-8d8c9c90.entry.js → p-7ca73c56.entry.js} +1 -1
- package/dist/magma-components/{p-911dc847.entry.js → p-7d0c8177.entry.js} +1 -1
- package/dist/magma-components/{p-c6b16493.system.entry.js → p-7fde3025.system.entry.js} +3 -3
- package/dist/magma-components/{p-11e50140.system.entry.js → p-803957de.system.entry.js} +2 -2
- package/dist/magma-components/{p-38a9e862.entry.js → p-808b9277.entry.js} +1 -1
- package/dist/magma-components/{p-47f7366c.entry.js → p-8258733b.entry.js} +1 -1
- package/dist/magma-components/{p-288f3cfe.entry.js → p-837d31b8.entry.js} +1 -1
- package/dist/magma-components/{p-88be542e.system.entry.js → p-84ed22ea.system.entry.js} +2 -2
- package/dist/magma-components/p-85a31141.entry.js +1 -0
- package/dist/magma-components/p-85fb1d08.entry.js +1 -0
- package/dist/magma-components/{p-f9b5a5ec.entry.js → p-86cf87fb.entry.js} +1 -1
- package/dist/magma-components/{p-007968a8.system.entry.js → p-8740403e.system.entry.js} +3 -3
- package/dist/magma-components/{p-9bdca8b4.entry.js → p-87baf82a.entry.js} +1 -1
- package/dist/magma-components/{p-20469b7a.system.entry.js → p-880f3eac.system.entry.js} +1 -1
- package/dist/magma-components/{p-4a051ef5.system.entry.js → p-88460d31.system.entry.js} +2 -2
- package/dist/magma-components/{p-fcaa81b3.entry.js → p-89d4b6e9.entry.js} +1 -1
- package/dist/magma-components/{p-5d9b1fe5.entry.js → p-8a76097f.entry.js} +1 -1
- package/dist/magma-components/{p-e8b9d639.entry.js → p-8a9544aa.entry.js} +1 -1
- package/dist/magma-components/{p-1fe66383.system.entry.js → p-8ab9ff37.system.entry.js} +1 -1
- package/dist/magma-components/{p-90fe332f.entry.js → p-8b501f92.entry.js} +1 -1
- package/dist/magma-components/{p-a2d10402.system.entry.js → p-8ca2e879.system.entry.js} +1 -1
- package/dist/magma-components/{p-7d548a19.entry.js → p-8d14f146.entry.js} +1 -1
- package/dist/magma-components/{p-3fb98529.system.entry.js → p-8f47eb63.system.entry.js} +1 -1
- package/dist/magma-components/p-8f63f1a1.system.entry.js +35 -0
- package/dist/magma-components/{p-3093af30.system.entry.js → p-8f7daab1.system.entry.js} +1 -1
- package/dist/magma-components/p-9250ec26.system.entry.js +7 -0
- package/dist/magma-components/p-93d7485d.entry.js +8 -0
- package/dist/magma-components/{p-36ad5759.system.entry.js → p-94439d8b.system.entry.js} +1 -1
- package/dist/magma-components/{p-648ec03b.system.entry.js → p-947fcf74.system.entry.js} +5 -5
- package/dist/magma-components/{p-b514bd3a.system.entry.js → p-95478664.system.entry.js} +1 -1
- package/dist/magma-components/{p-ecb87d38.entry.js → p-9745dc51.entry.js} +1 -1
- package/dist/magma-components/{p-95328cc7.system.entry.js → p-97eb734a.system.entry.js} +2 -2
- package/dist/magma-components/p-984dd850.entry.js +1 -0
- package/dist/magma-components/{p-d8d87750.system.entry.js → p-99bfa07e.system.entry.js} +1 -1
- package/dist/magma-components/{p-b169ee9b.entry.js → p-9a3ddc91.entry.js} +1 -1
- package/dist/magma-components/p-9cf81575.system.entry.js +80 -0
- package/dist/magma-components/p-9f6c502b.entry.js +1 -0
- package/dist/magma-components/{p-9e7d02e5.entry.js → p-9f8ce68f.entry.js} +1 -1
- package/dist/magma-components/p-9fc385aa.entry.js +1 -0
- package/dist/magma-components/p-B8zYiZQY.system.js +5 -0
- package/dist/magma-components/{p-CmzGV0XD.system.js → p-BZP13mns.system.js} +1 -1
- package/dist/magma-components/p-BoDvZoCN.system.js +18 -0
- package/dist/magma-components/p-Bz1eiKqd.js +1 -0
- package/dist/{components/p-Ebefwvkw.js → magma-components/p-CLhuNxYQ.js} +1 -1
- package/dist/magma-components/{p-DVjUXVFl.system.js → p-CZuIEo2v.system.js} +1 -1
- package/dist/magma-components/{p-C1ailvfu.system.js → p-CuHZXISO.system.js} +23 -19
- package/dist/magma-components/{p-CPRkNQdE.js → p-CvLLN-QH.js} +1 -1
- package/dist/magma-components/{p-LUd56iG_.system.js → p-CxTugGM9.system.js} +1 -1
- package/dist/magma-components/{p-zQY2FlcD.js → p-Dx_cCOTw.js} +1 -1
- package/dist/{components/p-B9dgiq4u.js → magma-components/p-OafT80hV.js} +2 -2
- package/dist/magma-components/p-VOjLCGlK.system.js +90 -0
- package/dist/magma-components/{p-be32b7a9.system.entry.js → p-a0612465.system.entry.js} +1 -1
- package/dist/magma-components/p-a70fb4fb.system.entry.js +105 -0
- package/dist/magma-components/p-a7c01334.entry.js +1 -0
- package/dist/magma-components/p-a8a0a9ba.entry.js +1 -0
- package/dist/magma-components/p-a987086b.system.entry.js +10 -0
- package/dist/magma-components/p-ab4b617d.entry.js +1 -0
- package/dist/magma-components/{p-e471decd.system.entry.js → p-ad05ef26.system.entry.js} +1 -1
- package/dist/magma-components/{p-b62bbd07.entry.js → p-b01118cc.entry.js} +1 -1
- package/dist/magma-components/{p-495a70e2.entry.js → p-b23bee0c.entry.js} +1 -1
- package/dist/magma-components/{p-88ac5d50.entry.js → p-b373cc32.entry.js} +1 -1
- package/dist/magma-components/{p-f5a08dca.system.entry.js → p-b4633c9c.system.entry.js} +2 -2
- package/dist/magma-components/p-b467f737.entry.js +1 -0
- package/dist/magma-components/{p-0b7a884e.system.entry.js → p-b5cc09c7.system.entry.js} +4 -4
- package/dist/magma-components/p-b69c3126.entry.js +1 -0
- package/dist/magma-components/{p-166c0190.entry.js → p-b8a59768.entry.js} +1 -1
- package/dist/magma-components/{p-ef4d07ba.entry.js → p-b9ca6c2e.entry.js} +1 -1
- package/dist/magma-components/p-bb282bc1.system.entry.js +20 -0
- package/dist/magma-components/{p-ff4276d3.system.entry.js → p-bd97e368.system.entry.js} +1 -1
- package/dist/magma-components/{p-7497b39d.system.entry.js → p-be6e156a.system.entry.js} +2 -2
- package/dist/magma-components/{p-4582aa3e.system.entry.js → p-c03fc4fe.system.entry.js} +1 -1
- package/dist/magma-components/{p-6b2fff4b.system.entry.js → p-c3a3caae.system.entry.js} +1 -1
- package/dist/magma-components/{p-890bae38.system.entry.js → p-c3c487aa.system.entry.js} +1 -1
- package/dist/magma-components/{p-a7bad4e8.entry.js → p-c40ad03a.entry.js} +1 -1
- package/dist/magma-components/{p-a47a9f11.system.entry.js → p-c50e20cf.system.entry.js} +1 -1
- package/dist/magma-components/p-c6819aad.entry.js +1 -0
- package/dist/magma-components/p-cc954b22.system.entry.js +27 -0
- package/dist/magma-components/{p-cc88c963.system.entry.js → p-cc9659e1.system.entry.js} +1 -1
- package/dist/magma-components/{p-da6cf595.system.entry.js → p-ccc40c6a.system.entry.js} +2 -2
- package/dist/magma-components/{p-a1443292.entry.js → p-ced3ebb8.entry.js} +1 -1
- package/dist/magma-components/p-cf6f54e5.system.entry.js +9 -0
- package/dist/magma-components/{p-4d079b1a.system.entry.js → p-d254de66.system.entry.js} +3 -3
- package/dist/magma-components/{p-287d1253.system.entry.js → p-d3491226.system.entry.js} +125 -125
- package/dist/magma-components/{p-c1d8a25e.entry.js → p-d3d74616.entry.js} +1 -1
- package/dist/magma-components/{p-da9afc4b.system.entry.js → p-d48c40ab.system.entry.js} +2 -2
- package/dist/magma-components/{p-cc109576.entry.js → p-d608b79c.entry.js} +1 -1
- package/dist/magma-components/p-d6b38d8a.entry.js +1 -0
- package/dist/magma-components/p-d8ae0f02.system.entry.js +15 -0
- package/dist/magma-components/{p-25576b51.system.entry.js → p-d92ccce5.system.entry.js} +2 -2
- package/dist/magma-components/{p-69b37755.system.entry.js → p-da93a00b.system.entry.js} +2 -2
- package/dist/magma-components/{p-4800a310.entry.js → p-dbca23af.entry.js} +1 -1
- package/dist/magma-components/{p-21fe0fef.system.entry.js → p-dc1a5826.system.entry.js} +1 -1
- package/dist/magma-components/{p-8b081ba9.entry.js → p-de1ae02c.entry.js} +1 -1
- package/dist/magma-components/p-dedbf8d6.entry.js +1 -0
- package/dist/magma-components/p-e1383302.entry.js +1 -0
- package/dist/magma-components/p-e2fa6300.system.entry.js +39 -0
- package/dist/magma-components/{p-95486c6a.system.entry.js → p-e39518b4.system.entry.js} +2 -2
- package/dist/magma-components/{p-b509fb36.entry.js → p-e3a65644.entry.js} +1 -1
- package/dist/magma-components/{p-3a88fc9b.system.entry.js → p-e5d41024.system.entry.js} +1 -1
- package/dist/magma-components/{p-14b40c21.entry.js → p-e5eb2390.entry.js} +1 -1
- package/dist/magma-components/{p-dfbecf72.system.entry.js → p-eb92312f.system.entry.js} +3 -3
- package/dist/magma-components/p-ec635255.entry.js +1 -0
- package/dist/magma-components/{p-8ba250d6.system.entry.js → p-edf003f1.system.entry.js} +1 -1
- package/dist/magma-components/{p-7448435b.system.entry.js → p-f0285a1e.system.entry.js} +4 -4
- package/dist/magma-components/p-f09b08f9.entry.js +1 -0
- package/dist/magma-components/p-f306b5c1.entry.js +1 -0
- package/dist/magma-components/{p-1287fb51.entry.js → p-f35608b2.entry.js} +1 -1
- package/dist/magma-components/{p-dbf69d54.system.entry.js → p-f39416e9.system.entry.js} +2 -2
- package/dist/magma-components/{p-b940888d.entry.js → p-f4d80d9a.entry.js} +1 -1
- package/dist/magma-components/{p-c6b9a14e.system.entry.js → p-f5326224.system.entry.js} +7 -7
- package/dist/magma-components/{p-fd53a51c.entry.js → p-f588cf9e.entry.js} +1 -1
- package/dist/magma-components/{p-e73cc6fc.entry.js → p-f5a33058.entry.js} +3 -3
- package/dist/magma-components/p-f616f467.entry.js +1 -0
- package/dist/magma-components/{p-a53f6a94.system.entry.js → p-f66675f5.system.entry.js} +2 -2
- package/dist/magma-components/{p-96f973e3.entry.js → p-f7147d05.entry.js} +1 -1
- package/dist/magma-components/p-f75935ed.system.entry.js +25 -0
- package/dist/magma-components/{p-f48843b7.system.entry.js → p-f82c2b7e.system.entry.js} +1 -1
- package/dist/magma-components/{p-1f5cd2b5.entry.js → p-f901c844.entry.js} +1 -1
- package/dist/magma-components/{p-70a911e8.entry.js → p-fac6f123.entry.js} +1 -1
- package/dist/magma-components/p-fc22f5e0.system.entry.js +34 -0
- package/dist/magma-components/p-ffbf7448.entry.js +1 -0
- package/dist/magma-components/{p-C25F_FlB.js → p-iX3kcwYg.js} +1 -1
- package/dist/magma-components/{p-D8596ytD.system.js → p-mGgjNqBm.system.js} +6 -6
- package/dist/stats.json +3497 -2645
- package/dist/types/common/locale.d.ts +5 -0
- package/dist/types/components/mds-entity/mds-entity.d.ts +1 -0
- package/dist/types/components/mds-input/meta/validators.d.ts +7 -2
- package/dist/types/components/mds-input/meta/validity.d.ts +3 -2
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +2 -1
- package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +3 -3
- package/dist/types/components/mds-link/mds-link.d.ts +71 -0
- package/dist/types/components/mds-link/meta/dictionary.d.ts +3 -0
- package/dist/types/components/mds-link/meta/types.d.ts +3 -0
- package/dist/types/components.d.ts +103 -4
- package/package.json +4 -3
- package/dist/components/p-BHy4k3pJ.js +0 -1
- package/dist/components/p-BLXRGNya.js +0 -1
- package/dist/components/p-BN5kmfLJ.js +0 -8
- package/dist/components/p-BUr3NqxM.js +0 -1
- package/dist/components/p-C2fyy4Mv.js +0 -1
- package/dist/components/p-CIWWmisz.js +0 -1
- package/dist/components/p-CJyTL7Mj.js +0 -1
- package/dist/components/p-CWwWCzma.js +0 -1
- package/dist/components/p-ChrRK8N9.js +0 -1
- package/dist/components/p-D3_jgpKd.js +0 -1
- package/dist/components/p-DYpfVn7a.js +0 -1
- package/dist/components/p-Ea5ilDf6.js +0 -1
- package/dist/magma-components/p-0b5fe949.entry.js +0 -1
- package/dist/magma-components/p-12a2f8e2.system.entry.js +0 -13
- package/dist/magma-components/p-14ef1aec.entry.js +0 -1
- package/dist/magma-components/p-1989c0b4.entry.js +0 -8
- package/dist/magma-components/p-1d68fc4a.system.entry.js +0 -80
- package/dist/magma-components/p-20608f69.system.entry.js +0 -35
- package/dist/magma-components/p-2061e567.entry.js +0 -1
- package/dist/magma-components/p-21c2d7bd.entry.js +0 -1
- package/dist/magma-components/p-2294945a.system.entry.js +0 -34
- package/dist/magma-components/p-2abfc393.entry.js +0 -1
- package/dist/magma-components/p-2c4d2717.entry.js +0 -1
- package/dist/magma-components/p-2d7d9e4f.entry.js +0 -1
- package/dist/magma-components/p-2e8f703e.entry.js +0 -1
- package/dist/magma-components/p-357ec8c0.entry.js +0 -1
- package/dist/magma-components/p-3b36319a.entry.js +0 -1
- package/dist/magma-components/p-3e1b21bd.entry.js +0 -1
- package/dist/magma-components/p-4116e328.system.entry.js +0 -1
- package/dist/magma-components/p-4191bf22.entry.js +0 -1
- package/dist/magma-components/p-4260da67.system.entry.js +0 -12
- package/dist/magma-components/p-43338a07.entry.js +0 -1
- package/dist/magma-components/p-4c2dad1e.system.entry.js +0 -81
- package/dist/magma-components/p-4f24ccf3.entry.js +0 -1
- package/dist/magma-components/p-51a869ee.entry.js +0 -1
- package/dist/magma-components/p-52a85b97.system.entry.js +0 -9
- package/dist/magma-components/p-52d5d104.system.entry.js +0 -17
- package/dist/magma-components/p-5439125d.system.entry.js +0 -10
- package/dist/magma-components/p-5a2deba5.entry.js +0 -1
- package/dist/magma-components/p-5cef4711.entry.js +0 -1
- package/dist/magma-components/p-61f0ebf3.entry.js +0 -1
- package/dist/magma-components/p-677ef2a3.system.entry.js +0 -55
- package/dist/magma-components/p-6da68fd5.entry.js +0 -1
- package/dist/magma-components/p-70f5536c.system.entry.js +0 -15
- package/dist/magma-components/p-7502528c.entry.js +0 -1
- package/dist/magma-components/p-7a568cbf.entry.js +0 -1
- package/dist/magma-components/p-7f776dff.entry.js +0 -1
- package/dist/magma-components/p-811272a9.entry.js +0 -1
- package/dist/magma-components/p-87b15008.entry.js +0 -1
- package/dist/magma-components/p-8a4a2b5a.entry.js +0 -1
- package/dist/magma-components/p-8c66c761.entry.js +0 -1
- package/dist/magma-components/p-914d1b2a.system.entry.js +0 -111
- package/dist/magma-components/p-91ed604f.entry.js +0 -1
- package/dist/magma-components/p-938dbe67.system.entry.js +0 -27
- package/dist/magma-components/p-93d8b236.system.entry.js +0 -10
- package/dist/magma-components/p-9a28bd8d.system.entry.js +0 -20
- package/dist/magma-components/p-9caf411a.system.entry.js +0 -13
- package/dist/magma-components/p-BHS0WXNt.system.js +0 -107
- package/dist/magma-components/p-QYez4sql.system.js +0 -5
- package/dist/magma-components/p-a08d20c2.system.entry.js +0 -1
- package/dist/magma-components/p-a51f849a.entry.js +0 -1
- package/dist/magma-components/p-a6fe6b4c.system.entry.js +0 -1
- package/dist/magma-components/p-a8593847.entry.js +0 -1
- package/dist/magma-components/p-ac4109e3.entry.js +0 -1
- package/dist/magma-components/p-b36d54e1.system.entry.js +0 -41
- package/dist/magma-components/p-b48fc62e.entry.js +0 -1
- package/dist/magma-components/p-bba4c7eb.entry.js +0 -1
- package/dist/magma-components/p-bdd18c90.system.entry.js +0 -25
- package/dist/magma-components/p-c3622315.entry.js +0 -1
- package/dist/magma-components/p-c6db7a0f.system.entry.js +0 -22
- package/dist/magma-components/p-ca8e0927.system.entry.js +0 -7
- package/dist/magma-components/p-cfe080ab.system.entry.js +0 -54
- package/dist/magma-components/p-d3678561.system.entry.js +0 -35
- package/dist/magma-components/p-d9551916.system.entry.js +0 -222
- package/dist/magma-components/p-daf9c8ca.system.entry.js +0 -4
- package/dist/magma-components/p-dd8fb2f8.system.entry.js +0 -105
- package/dist/magma-components/p-e15a874b.entry.js +0 -1
- package/dist/magma-components/p-e954b5c5.entry.js +0 -1
- package/dist/magma-components/p-eba7cfb3.entry.js +0 -1
- package/dist/magma-components/p-f454c06b.entry.js +0 -1
- package/dist/magma-components/p-f7f6881a.entry.js +0 -1
package/dist/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-22T13:02:36",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
@@ -3618,7 +3618,7 @@
|
|
|
3618
3618
|
"usage": {
|
|
3619
3619
|
"1. Description": "The `<mds-button>` web component is the primary interactive action control of the Magma Design System. It renders as a button, or as a link when `href` is set, handling form association, accessibility, loading state, and iconography natively.\n\n#### Semantic Behavior\n\n- **Button vs. link**: Providing `href` renders a real anchor inside the component and gives the host `role=\"link\"`. The browser follows the link, so a modifier or middle click opens it in a new tab and the context menu offers the link actions; `target=\"blank\"` opens a new tab on a plain click too. A `click` listener on the host cancels the navigation with `preventDefault()`, which is how a client-side router takes over. A click from the keyboard, a script or an assistive technology lands on the host and is followed the same way, unless cancelled.\n- **Form association**: Inside a `<form>` the component submits (`type=\"submit\"`, default) or resets (`type=\"reset\"`) it like a native button, with no extra wiring; use `type=\"button\"` to opt out. With `name` set, a submit sends `name=value`, so buttons that submit the same form tell the receiver which one was chosen. A custom element cannot be a submitter, so `event.submitter` is a hidden native button that stands in for the component: it carries the same `name` and `value`, but it is not the `mds-button` element.\n- **Active state**: Mirrors a visual pressed state through the `active` attribute, safe to drive from CSS attribute selectors.\n- **Disabled state**: Blocks pointer and keyboard activation and removes the host from the tab sequence. A disabled `<fieldset>` around the button disables it the same way, as it does a native button, without setting `disabled`.\n- **Await state**: Renders an inline spinner, blocks pointer and keyboard activation, and sets `aria-busy=\"true\"` for assistive tech. The button keeps the focus it had, and a click from a script or an assistive technology neither submits nor resets its form again. Remove the attribute when done - do not set `await=\"false\"`.\n- **Keyboard**: Enter activates the button as a click does, and so does Space, on release, as on a native button; a button with `href` is a link, which Enter follows and Space does not.\n- **Accessibility**: Sets `role=\"button\"` on the host, `role=\"link\"` when `href` is set, whatever the format of the icon; the `label` prop (or slotted text) is rendered as the button text, which names it. Without a label, an `aria-label` or a `title`, the component sets `title` from the last segment of the icon slug (`mi/baseline/delete` -> \"delete\"), which names the icon, not the action; an icon given as inline SVG or base64 has no slug, and leaves the button with no name at all: icon-only buttons need an explicit `aria-label` (or `title`), or an `mds-tooltip` with `relation=\"label\"`. A host with `aria-labelledby` gets no name from the slug, and loses the one it had when the attribute comes later, as it does from the tooltip.\n- **Sizing**: The `size` prop drives padding, font size, and minimum hit area. Do not override dimensions with inline `width` / `height`.\n- **Linking constraint**: `target` is effective only when `href` is set.\n\n#### Component-specific variants and tones\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). `<mds-button>` adds:\n\n- **`variant=\"google\"` / `variant=\"apple\"`**: brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n- **`tone=\"box\"`**: the `strong` fill with an embossed, raised shadow (`--shadow-box-solid-strong`) and a brighter hover: more marked than `strong`, not less.\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library; **`iconPosition`** places the glyph relative to the label (use `right` for forward-motion CTAs).\n- **`truncate`**: `word` (default) keeps the label on one line and cuts it with an ellipsis, `all` clamps it with `line-clamp` (one line in the button), `none` lets it wrap onto more lines.\n- **`animation`**: `yugop` progressively reveals characters; otherwise text renders immediately.\n- **The first letter** of the label is uppercased. For a name or an identifier that must stay as written (`rdsysadmin`), set `--mds-button-label-transform: none` on the button or on any ancestor: the property inherits, so it also reaches the buttons that other components, `mds-button-dropdown` among them, render in their shadow root.\n",
|
|
3620
3620
|
"2. Pattern": "Correct and idiomatic ways to use the `<mds-button>` 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#### Text Button via `label` Prop\n\nThe canonical form. Use the `label` prop for the button's text; it is rendered inside the button and is its accessible name, so screen readers work without extra wiring.\n\n```html\n<mds-button label=\"Conferma azione\" variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Variant and Tone for Emphasis\n\nPair the same `variant` with a different `tone` to express importance. Do not invent custom colors to dim or saturate.\n\n```html\n<!-- High emphasis: primary call to action -->\n<mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n\n<!-- Medium emphasis: supporting action -->\n<mds-button label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n\n<!-- Low emphasis: in-text or destructive secondary action -->\n<mds-button label=\"Annulla\" variant=\"error\" tone=\"text\"></mds-button>\n```\n\n#### Sizing\n\nUse the `size` prop. Do not override dimensions with inline `width` / `height`.\n\n```html\n<mds-button label=\"Small\" size=\"sm\" variant=\"primary\"></mds-button>\n<mds-button label=\"Medium\" size=\"md\" variant=\"primary\"></mds-button>\n<mds-button label=\"Large\" size=\"lg\" variant=\"primary\"></mds-button>\n<mds-button label=\"Extra large\" size=\"xl\" variant=\"primary\"></mds-button>\n```\n\n#### Button with Icon\n\nReference icons by their filename slug (no `.svg` extension). `icon-position` defaults to `left`; set it to `right` for forward-motion CTAs.\n\n```html\n<!-- Left icon (default) -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<!-- Right icon -->\n<mds-button\n label=\"Avanti\"\n icon=\"mi/baseline/arrow-forward\"\n icon-position=\"right\"\n variant=\"primary\"\n></mds-button>\n```\n\n#### Icon-Only Button\n\nOmit `label` and provide `aria-label` (or `title`) explicitly. Without one, the component names the button after the last segment of the icon slug (\"delete\"), which names the icon, not the action.\n\n```html\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\nWhen an `mds-tooltip` shows the name of the button, let the tooltip be the name with `relation=\"label\"` instead: the button then needs no `aria-label`, and gets no `title` from the icon slug.\n\n```html\n<mds-button id=\"elimina-btn\" icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#elimina-btn\" relation=\"label\">Elimina elemento</mds-tooltip>\n```\n\n#### Hyperlink via `href`\n\nSetting `href` renders a real link: the browser follows it, in a new tab on a modifier or middle click, and the context menu offers the link actions. Use `target=\"blank\"` to open in a new tab on a plain click too; default is `self`.\n\n```html\n<mds-button\n label=\"Visita il sito\"\n href=\"https://example.com\"\n target=\"blank\"\n variant=\"primary\"\n tone=\"outline\"\n></mds-button>\n```\n\n#### Client-Side Routing via `href`\n\nIn a single-page app keep `href` for the link it gives (new tab, context menu, crawlers) and register the router once with `NavigationService`, from `@maggioli-design-system/magma/services`: every component link is then routed on the client on a plain click, with no listener per button. A modifier or middle click, `target=\"blank\"` and a link to another origin stay with the browser; return `false` from the handler for a link the browser is to load.\n\n```html\n<mds-button label=\"Pratiche\" href=\"/pratiche\" variant=\"primary\" tone=\"text\"></mds-button>\n\n<script type=\"module\">\n import { NavigationService } from '@maggioli-design-system/magma/services';\n\n NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the button and route by hand: the component honours `preventDefault()`. Leave a modifier click alone, so that the browser opens the link in a new tab.\n\n```html\n<script>\n document.querySelector('mds-button[href]').addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(event.currentTarget.href);\n });\n</script>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. The component renders an inline spinner, blocks pointer activation, and sets `aria-busy=\"true\"`. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\"></mds-button>\n```\n\n#### Form Participation\n\n`<mds-button>` is form-associated. Inside a `<form>` it natively triggers submit (`type=\"submit\"`, default) or reset (`type=\"reset\"`). Use `type=\"button\"` for any action that must not submit the form.\n\n```html\n<form action=\"/save\" method=\"post\">\n <mds-input-field label=\"Titolo\">\n <mds-input name=\"title\"></mds-input>\n </mds-input-field>\n\n <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n <mds-button type=\"reset\" label=\"Reimposta\" variant=\"dark\" tone=\"outline\"></mds-button>\n <mds-button type=\"button\" label=\"Anteprima\" variant=\"primary\" tone=\"text\"></mds-button>\n</form>\n```\n\n#### Several Actions That Submit One Form\n\nGive the buttons the same `name` and a different `value`, as with native submit buttons: the receiver reads which action was chosen from `name`.\n\n```html\n<form action=\"/mail\" method=\"post\">\n <mds-input-field label=\"Oggetto\">\n <mds-input name=\"subject\"></mds-input>\n </mds-input-field>\n\n <!-- the receiver gets action=send or action=draft -->\n <mds-button name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\"></mds-button>\n <mds-button name=\"action\" value=\"draft\" label=\"Salva come bozza\" tone=\"outline\"></mds-button>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for a native button: it carries the `name` / `value` of the button that was clicked.\n\n```js\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n data.get('action'); // 'send' or 'draft'\n});\n```\n\nTo show one action and keep the others in a menu, use [`mds-button-dropdown`](../mds-button-dropdown/AGENTS.md) with `type=\"submit\"`: its primary action and its menu items send `name` / `value` the same way.\n\n#### Notification Badge via Named Slot\n\nThe `notification` slot accepts an `<mds-notification>`. This is the documented exception to the default-slot-is-text rule.\n\n```html\n<mds-button label=\"Notifiche\" icon=\"mi/baseline/notifications\" variant=\"primary\" tone=\"weak\">\n <mds-notification slot=\"notification\" value=\"12\"></mds-notification>\n</mds-button>\n```\n\n#### SSO Identity Variants\n\n`variant=\"google\"` and `variant=\"apple\"` apply the brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n\n```html\n<mds-button label=\"Accedi con Google\" variant=\"google\"></mds-button>\n<mds-button label=\"Accedi con Apple\" variant=\"apple\"></mds-button>\n```\n\n#### Styling Customization\n\nStyle the button only through its documented `--mds-button-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working.\n\n```css\n.featured-action mds-button {\n --mds-button-background: rgb(var(--magma-accent-emphasis));\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n --mds-button-gap: calc(var(--spacing) * 300);\n}\n\n/* labels that are names or identifiers, shown as written: it inherits, so it reaches the\n buttons inside other components too */\n.tenant-switcher {\n --mds-button-label-transform: none;\n}\n```\n",
|
|
3621
|
-
"3. Antipattern": "Common incorrect uses of `<mds-button>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/anti-patterns.md`](../../../../agents/anti-patterns.md) - they apply here too but are not repeated.\n\n#### Do Not Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are stripped or break layout. Use the `label` prop for text and the dedicated props/slots for everything else.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <span class=\"bold\">Scarica</span>\n <small>(PDF)</small>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Scarica (PDF)\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n```\n\n#### Do Not Nest `<mds-button>` Inside an Anchor\n\nWrapping the button in `<a>` creates nested interactive controls, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on the component instead - it renders the link itself.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/login\">\n <mds-button label=\"Accedi\"></mds-button>\n</a>\n\n<!-- CORRECT -->\n<mds-button label=\"Accedi\" href=\"/login\"></mds-button>\n```\n\n#### Do Not Follow the `href` Yourself in a Click Listener\n\nWith `href` set the component already renders a link the browser follows. Assigning `window.location` in a click listener loads the page a second time and takes a modifier click, which the browser would open in a new tab, into the current one. Either let the browser follow the link, or cancel the click and route on the client.\n\n```js\n// INCORRECT\nbutton.addEventListener('click', () => {\n window.location.href = button.href;\n});\n\n// CORRECT: a client-side router cancels the click and routes\nbutton.addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(button.href);\n});\n```\n\n#### Icon-Only Buttons Without an Accessible Name\n\nWhen `label` is empty, the component derives a `title` from the last segment of the icon slug (\"delete\"), which names the icon, not the action. Always supply an explicit `aria-label` (or `title`) for icon-only buttons, or an `mds-tooltip` with `relation=\"label\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Build the Form Data Without the Submitter\n\n`new FormData(form)` leaves out the `name` / `value` of the button that submitted the form, as it does for a native submit button. Pass `event.submitter` to read which action was chosen; do not track the clicked button in a variable or a hidden input.\n\n```js\n// INCORRECT: action is missing\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form);\n});\n\n// CORRECT\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n});\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe component's `icon` prop renders the SVG through the shared icon-set service and positions it correctly via `icon-position`. Slotting `<mds-icon>` puts it in the text-only default slot, where it is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <mds-icon name=\"mi/baseline/add\"></mds-icon>\n Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` were renamed in Magma 2.0 to `outline` and `text`. The old values are no longer accepted by the typed `ToneBoxVariantType` and silently fall back to the default tone.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-button label=\"Modifica\" tone=\"ghost\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"quiet\" variant=\"error\"></mds-button>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-button label=\"Modifica\" tone=\"outline\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"text\" variant=\"error\"></mds-button>\n```\n\n#### Customize via Documented Vars and Parts, Not Internal Selectors\n\nThe supported customization surface is `--mds-button-*` CSS custom properties plus the two documented shadow parts (`icon`, `label`). Targeting other internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-button >>> .text {\n font-weight: bold;\n}\nmds-button::part(spinner) {\n color: red;\n}\n\n/* CORRECT */\nmds-button {\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n}\nmds-button::part(icon) {\n fill: rgb(var(--magma-warning-fg));\n}\n```\n"
|
|
3621
|
+
"3. Antipattern": "Common incorrect uses of `<mds-button>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/anti-patterns.md`](../../../../agents/anti-patterns.md) - they apply here too but are not repeated.\n\n#### Do Not Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are stripped or break layout. Use the `label` prop for text and the dedicated props/slots for everything else.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <span class=\"bold\">Scarica</span>\n <small>(PDF)</small>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Scarica (PDF)\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n```\n\n#### Do Not Nest `<mds-button>` Inside an Anchor\n\nWrapping the button in `<a>` creates nested interactive controls, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on the component instead - it renders the link itself.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/login\">\n <mds-button label=\"Accedi\"></mds-button>\n</a>\n\n<!-- CORRECT -->\n<mds-button label=\"Accedi\" href=\"/login\"></mds-button>\n```\n\n#### Do Not Use `mds-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word or a phrase that links belongs to `<mds-link>`, which takes the font of the text around it.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Follow the `href` Yourself in a Click Listener\n\nWith `href` set the component already renders a link the browser follows. Assigning `window.location` in a click listener loads the page a second time and takes a modifier click, which the browser would open in a new tab, into the current one. Either let the browser follow the link, or cancel the click and route on the client.\n\n```js\n// INCORRECT\nbutton.addEventListener('click', () => {\n window.location.href = button.href;\n});\n\n// CORRECT: a client-side router cancels the click and routes\nbutton.addEventListener('click', (event) => {\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n router.navigate(button.href);\n});\n```\n\n#### Icon-Only Buttons Without an Accessible Name\n\nWhen `label` is empty, the component derives a `title` from the last segment of the icon slug (\"delete\"), which names the icon, not the action. Always supply an explicit `aria-label` (or `title`) for icon-only buttons, or an `mds-tooltip` with `relation=\"label\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button\n icon=\"mi/baseline/delete\"\n aria-label=\"Elimina elemento\"\n variant=\"error\"\n tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Build the Form Data Without the Submitter\n\n`new FormData(form)` leaves out the `name` / `value` of the button that submitted the form, as it does for a native submit button. Pass `event.submitter` to read which action was chosen; do not track the clicked button in a variable or a hidden input.\n\n```js\n// INCORRECT: action is missing\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form);\n});\n\n// CORRECT\nform.addEventListener('submit', (event) => {\n event.preventDefault();\n const data = new FormData(form, event.submitter);\n});\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe component's `icon` prop renders the SVG through the shared icon-set service and positions it correctly via `icon-position`. Slotting `<mds-icon>` puts it in the text-only default slot, where it is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n <mds-icon name=\"mi/baseline/add\"></mds-icon>\n Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` were renamed in Magma 2.0 to `outline` and `text`. The old values are no longer accepted by the typed `ToneBoxVariantType` and silently fall back to the default tone.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-button label=\"Modifica\" tone=\"ghost\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"quiet\" variant=\"error\"></mds-button>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-button label=\"Modifica\" tone=\"outline\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"text\" variant=\"error\"></mds-button>\n```\n\n#### Customize via Documented Vars and Parts, Not Internal Selectors\n\nThe supported customization surface is `--mds-button-*` CSS custom properties plus the two documented shadow parts (`icon`, `label`). Targeting other internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-button >>> .text {\n font-weight: bold;\n}\nmds-button::part(spinner) {\n color: red;\n}\n\n/* CORRECT */\nmds-button {\n --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n --mds-button-radius: var(--magma-radius-lg);\n}\nmds-button::part(icon) {\n fill: rgb(var(--magma-warning-fg));\n}\n```\n"
|
|
3622
3622
|
},
|
|
3623
3623
|
"props": [
|
|
3624
3624
|
{
|
|
@@ -6340,7 +6340,7 @@
|
|
|
6340
6340
|
}
|
|
6341
6341
|
],
|
|
6342
6342
|
"usage": {
|
|
6343
|
-
"1. Description": "The `<mds-card>` web component is the surface container of the Magma Design System: a styled, self-contained panel that groups related media, heading, body and action content into a single bounded region. It is a pure layout shell built on named slots and compound children rather than a replacement for any single HTML primitive.\n\n#### Semantic Behavior\n\n- **Layout is inferred, not declared**: The card detects which of the `media` / `header` / `content` / `footer` regions are present, again whenever its content changes, and reshapes itself to whatever content you provide.\n- **Compound parent/child relationship**: `<mds-card-media>`, `<mds-card-header>`, `<mds-card-content>` and `<mds-card-footer>` are recognized by tag name and mapped onto the corresponding region, so they slot in without an explicit `slot` attribute. Plain elements given the matching `slot` value land in that region and take part in the managed grid the same way.\n- **Responsive by width**: The card's internal layout switches between stacked and media-beside-content arrangements based on the card's own width, independent of viewport or theme.\n- **Slot regions are fixed**: Only the four named regions are rendered; there is no default (unnamed) slot, so loose text or elements without a recognized slot/tag are not laid out.\n\n#### Properties & Visual Configurations\n\n`<mds-card>` does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); it exposes a single behavioral prop.\n\n- **`disableAutoGrid`** (default `false`) toggles the intrinsic responsive grid. Leave it off to let the card own the placement and reflow of its regions; set it to opt out of the managed grid and lay the slotted content out yourself.\n\nSpacing is tuned through the `--mds-card-gap` and `--mds-card-padding` CSS custom properties rather than props, the background of the card and of its regions through `--mds-card-background`.\n",
|
|
6343
|
+
"1. Description": "The `<mds-card>` web component is the surface container of the Magma Design System: a styled, self-contained panel that groups related media, heading, body and action content into a single bounded region. It is a pure layout shell built on named slots and compound children rather than a replacement for any single HTML primitive.\n\n#### Semantic Behavior\n\n- **Layout is inferred, not declared**: The card detects which of the `media` / `header` / `content` / `footer` regions are present, again whenever its content changes, and reshapes itself to whatever content you provide.\n- **Compound parent/child relationship**: `<mds-card-media>`, `<mds-card-header>`, `<mds-card-content>` and `<mds-card-footer>` are recognized by tag name and mapped onto the corresponding region, so they slot in without an explicit `slot` attribute. Plain elements given the matching `slot` value land in that region and take part in the managed grid the same way.\n- **Responsive by width**: The card's internal layout switches between stacked and media-beside-content arrangements based on the card's own width, independent of viewport or theme.\n- **The footer closes the card**: The footer region sits at the bottom of the card whatever the other regions are. When the card is taller than its parts (a media taller than header and footer together, or a grid row that stretches a set of cards to one height) and there is no content to take the free space, that space stays above the footer, in the card's background.\n- **Slot regions are fixed**: Only the four named regions are rendered; there is no default (unnamed) slot, so loose text or elements without a recognized slot/tag are not laid out.\n\n#### Properties & Visual Configurations\n\n`<mds-card>` does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); it exposes a single behavioral prop.\n\n- **`disableAutoGrid`** (default `false`) toggles the intrinsic responsive grid. Leave it off to let the card own the placement and reflow of its regions; set it to opt out of the managed grid and lay the slotted content out yourself.\n\nSpacing is tuned through the `--mds-card-gap` and `--mds-card-padding` CSS custom properties rather than props, the background of the card and of its regions through `--mds-card-background`.\n",
|
|
6344
6344
|
"2. Pattern": "Correct and idiomatic ways to use the `<mds-card>` 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#### Full Card with All Four Regions\n\nThe most common form. Use `<mds-card-header>`, `<mds-card-media>`, `<mds-card-content>`, and `<mds-card-footer>` as direct children. Each compound child self-assigns to its slot - no explicit `slot` attribute needed.\n\n```html\n<mds-card>\n <mds-card-header>\n <mds-text typography=\"h6\">Titolo della scheda</mds-text>\n </mds-card-header>\n <mds-card-media>\n <mds-img src=\"/immagini/copertina.jpg\" class=\"object-cover\"></mds-img>\n </mds-card-media>\n <mds-card-content>\n <mds-text>\n Descrizione dettagliata del contenuto della scheda.\n </mds-text>\n </mds-card-content>\n <mds-card-footer>\n <mds-button variant=\"dark\" tone=\"text\" label=\"Annulla\"></mds-button>\n <mds-button variant=\"primary\" tone=\"strong\" label=\"Conferma\"></mds-button>\n </mds-card-footer>\n</mds-card>\n```\n\n#### Header + Content (No Media)\n\nOmit the regions you do not need - the card detects which regions are present and adapts its grid layout accordingly. A header-and-content-only card stays single-column.\n\n```html\n<mds-card>\n <mds-card-header>\n <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n </mds-card-header>\n <mds-card-content>\n <mds-text>\n Il tuo ordine e' stato elaborato correttamente.\n </mds-text>\n </mds-card-content>\n</mds-card>\n```\n\n#### Media + Content + Footer (No Header)\n\nOmitting the header region shifts media to the top and content immediately below. Useful for image-led catalog cards.\n\n```html\n<mds-card>\n <mds-card-media>\n <mds-img src=\"/immagini/prodotto.jpg\" class=\"object-cover\"></mds-img>\n </mds-card-media>\n <mds-card-content>\n <mds-text>Descrizione prodotto disponibile nella gamma autunnale.</mds-text>\n </mds-card-content>\n <mds-card-footer>\n <mds-button variant=\"primary\" label=\"Aggiungi al carrello\"></mds-button>\n </mds-card-footer>\n</mds-card>\n```\n\n#### Header with Action Button via `mds-card-header`\n\n`<mds-card-header>` has a dedicated `action` slot for icon buttons placed in the trailing position. Use it instead of laying out the button manually.\n\n```html\n<mds-card>\n <mds-card-header>\n <mds-text typography=\"h6\">Profilo utente</mds-text>\n <mds-button\n slot=\"action\"\n icon=\"mi/round/more-vert\"\n aria-label=\"Altre azioni\"\n variant=\"dark\"\n tone=\"text\"\n ></mds-button>\n </mds-card-header>\n <mds-card-content>\n <mds-text>Mario Rossi - Amministratore di sistema</mds-text>\n </mds-card-content>\n</mds-card>\n```\n\n#### Media with Overlay Content via `mds-card-media`\n\n`<mds-card-media>` exposes a `content` slot that renders in front of the media element. Use it for captions, badges, or status chips overlaid on an image.\n\n```html\n<mds-card>\n <mds-card-media>\n <mds-img src=\"/immagini/evento.jpg\" class=\"object-cover\"></mds-img>\n <mds-badge slot=\"content\" variant=\"info\" tone=\"strong\">In corso</mds-badge>\n </mds-card-media>\n <mds-card-content>\n <mds-text typography=\"h6\">Conferenza annuale 2025</mds-text>\n </mds-card-content>\n</mds-card>\n```\n\n#### Using Raw Slot Attributes Instead of Compound Children\n\nWhen the compound children (`mds-card-*`) do not fit the use case, assign the `slot` attribute directly on any element, with the same four values: `media`, `header`, `content`, and `footer`. The card reads the regions from the `slot` values, so plain elements get the same managed grid as the compound children.\n\n```html\n<mds-card>\n <div slot=\"header\" class=\"flex items-center gap-400 px-400 py-400\">\n <mds-avatar initials=\"LB\"></mds-avatar>\n <mds-text typography=\"h6\">Luca Bianchi</mds-text>\n </div>\n <mds-img slot=\"media\" src=\"/immagini/lavoro.jpg\" class=\"object-cover\"></mds-img>\n <mds-text slot=\"content\" class=\"px-400\">\n Responsabile del progetto infrastrutture.\n </mds-text>\n</mds-card>\n```\n\n#### Disabling the Auto-Grid\n\nSet `disable-auto-grid` to opt out of the managed responsive grid. The regions stack in slot order (media, header, content, footer), whatever their order in the markup, and you own all layout decisions.\n\n```html\n<mds-card disable-auto-grid>\n <mds-card-header>\n <mds-text typography=\"h6\">Layout personalizzato</mds-text>\n </mds-card-header>\n <mds-card-content>\n <mds-text>Il contenuto e' disposto senza griglia automatica.</mds-text>\n </mds-card-content>\n</mds-card>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nSet `--mds-card-gap` and `--mds-card-padding` on the host or a parent selector. Use Magma spacing tokens so the values remain consistent across themes. `--mds-card-background` recolors the card and its regions together; name a surface role so dark mode keeps working.\n\n```css\n.scheda-articolo mds-card {\n --mds-card-gap: calc(var(--spacing) * 200);\n --mds-card-padding: calc(var(--spacing) * 400);\n --mds-card-background: rgb(var(--magma-surface-overlay));\n}\n```\n\n#### Customizing the Layout Part\n\nThe inner grid element is exposed as `::part(layout)`. Use it only for layout-level overrides that the CSS custom properties cannot cover, such as overriding the `border-radius` of the inner container.\n\n```css\n.scheda-highlight mds-card::part(layout) {\n border-radius: var(--magma-radius-xl);\n}\n```\n",
|
|
6345
6345
|
"3. Antipattern": "Common incorrect uses of `<mds-card>`. 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 Put Content Outside the Four Named Slots\n\n`<mds-card>` has no default (unnamed) slot. Loose text or elements placed without a recognized `slot` attribute - or without using an `mds-card-*` compound child - are silently ignored and never rendered.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n <p>Questo testo non verra' mai visualizzato.</p>\n <mds-button label=\"Azione\"></mds-button>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n <mds-card-content>\n <mds-text>Questo testo e' correttamente posizionato nel content slot.</mds-text>\n </mds-card-content>\n <mds-card-footer>\n <mds-button label=\"Azione\" variant=\"primary\"></mds-button>\n </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Use `mds-card-*` Children Outside `<mds-card>`\n\nCompound children (`mds-card-header`, `mds-card-media`, `mds-card-content`, `mds-card-footer`) rely on `<mds-card>` for layout context. Used standalone they render without the managed grid and without the card's visual chrome.\n\n```html\n<!-- INCORRECT -->\n<div class=\"mia-sezione\">\n <mds-card-header>\n <mds-text typography=\"h6\">Titolo standalone</mds-text>\n </mds-card-header>\n</div>\n\n<!-- CORRECT -->\n<mds-card>\n <mds-card-header>\n <mds-text typography=\"h6\">Titolo nella scheda</mds-text>\n </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Pierce the Shadow DOM with Undocumented Selectors\n\nThe only supported customization surface is `--mds-card-background`, `--mds-card-gap`, `--mds-card-padding`, and `::part(layout)`. Targeting internal class names with `>>>`, `/deep/`, or any selector that reaches inside the shadow root couples your code to implementation details and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-card >>> .layout {\n padding: 16px;\n}\nmds-card .layout--cfhm {\n grid-template-columns: 1fr 1fr;\n}\n\n/* CORRECT */\nmds-card {\n --mds-card-padding: calc(var(--spacing) * 400);\n}\nmds-card::part(layout) {\n border-radius: var(--magma-radius-xl);\n}\n```\n\n#### Do Not Assign an Explicit `slot` Attribute to `mds-card-*` Children\n\n`mds-card-header`, `mds-card-media`, `mds-card-content`, and `mds-card-footer` already set their own `slot` attribute on the host element from inside the component. Adding it again from the outside is redundant and may conflict with internal wiring.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n <mds-card-header slot=\"header\">...</mds-card-header>\n <mds-card-content slot=\"content\">...</mds-card-content>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n <mds-card-header>...</mds-card-header>\n <mds-card-content>...</mds-card-content>\n</mds-card>\n```\n\n#### Do Not Put Media Elements Directly in the `header` Slot\n\nThe `header` slot is intended for title and action controls. Placing an `<mds-img>` or `<img>` directly there bypasses the media region's responsive two-column behavior. Use the `media` slot (or `<mds-card-media>`) for images and videos.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n <mds-card-header>\n <mds-img src=\"/immagini/banner.jpg\"></mds-img>\n </mds-card-header>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n <mds-card-media>\n <mds-img src=\"/immagini/banner.jpg\" class=\"object-cover\"></mds-img>\n </mds-card-media>\n <mds-card-header>\n <mds-text typography=\"h6\">Titolo della scheda</mds-text>\n </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Override Card Dimensions with Inline Styles\n\n`<mds-card>` manages its own min-height and responsive grid. A fixed `height` clips the regions (the card hides its overflow), and a fixed `width` pins the container-query layout instead of letting it follow the space its container gives.\n\n```html\n<!-- INCORRECT -->\n<mds-card style=\"width: 300px; height: 200px;\">\n ...\n</mds-card>\n\n<!-- CORRECT: size the card from a parent container or CSS custom properties -->\n<div class=\"w-[300px]\">\n <mds-card>\n ...\n </mds-card>\n</div>\n```\n"
|
|
6346
6346
|
},
|
|
@@ -8445,11 +8445,15 @@
|
|
|
8445
8445
|
{
|
|
8446
8446
|
"name": "part",
|
|
8447
8447
|
"text": "avatar - The avatar element"
|
|
8448
|
+
},
|
|
8449
|
+
{
|
|
8450
|
+
"name": "part",
|
|
8451
|
+
"text": "infos - The column that stacks the name (default slot) and the `detail` row"
|
|
8448
8452
|
}
|
|
8449
8453
|
],
|
|
8450
8454
|
"usage": {
|
|
8451
|
-
"1. Description": "The `<mds-entity>` web component represents a person, organization, or resource as a compact identity block in the Magma Design System, pairing an avatar with a name, optional secondary details, and contextual actions. It has no native HTML equivalent; it standardises how entities are surfaced in lists, headers, and cards.\n\n#### Semantic Behavior\n\n- **Avatar resolution**: The leading avatar renders only when one of `src`, `icon`, or `initials` is provided. The inner `mds-avatar` resolves a combination pairwise: `icon` hides the `src` image, `initials` hide the `icon`, `src` hides the `initials`, and with all three set it shows none of them.\n- **Await state**: While `await` is set the avatar is suppressed and a spinner is shown in its place, signalling that the entity is still loading.\n- **Conditional regions**: The `detail` and `action` regions are shown only while content is projected into those slots, also when it is added after the first render.\n- **Default slot is the name**: The default slot carries the entity's primary label (text, HTML, or components) and is always rendered inside the info column.\n\n#### Properties & Visual Configurations\n\n- **`src`** is the path to an entity image; **`icon`** is a Magma icon library slug; **`initials`** is the text shown when no image or icon fits. Provide only the one that best identifies the entity - they are not combined.\n- **`await`** marks the entity as loading and takes visual precedence over any avatar source.\n\nThe shared `tone` / `variant` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md) and color the inner avatar. `tone` is limited to the minimal `'strong'` / `'weak'` pair, and `variant` accepts the avatar colour set; pick them to colour the avatar chip in line with the entity's category. With `initials` the avatar derives its colour from the letters and ignores `variant`.\n\n#### Slots\n\n- **`detail`** holds secondary information (role, email, status) rendered beneath the name.\n- **`action`** holds trailing controls; `mds-button` is the recommended element here.\n",
|
|
8452
|
-
"2. Pattern": "Correct and idiomatic ways to use the `<mds-entity>` 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#### Person Entity with Image\n\nThe most common form. Supply `src` for the avatar image and put the entity name in the default slot. Use `<mds-text>` with `typography=\"h6\"` for the primary label so typography tokens are applied consistently.\n\n```html\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Initials Fallback\n\nWhen no image is available, provide `initials` instead of `src`. The avatar chip renders the initials text.\n\n```html\n<mds-entity initials=\"mr\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Icon\n\nUse `icon` for non-person entities (locations, files, organizations). Reference icons by their slug from the Magma icon library.\n\n```html\n<mds-entity icon=\"mi/baseline/location-on\">\n <mds-text truncate=\"word\" typography=\"h6\">Maggioli Headquarters</mds-text>\n</mds-entity>\n```\n\n#### Secondary Details via `detail` Slot\n\nProject additional information (role, email, status) into the `detail` slot. It renders below the primary name in a subdued color. Use `<mds-text typography=\"caption\">` for plain text details.\n\n```html\n<mds-entity src=\"/avatars/giulia-bianchi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Giulia Bianchi</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">giulia@example.com</mds-text>\n <mds-badge slot=\"detail\" variant=\"success\" tone=\"weak\" label=\"Attiva\"></mds-badge>\n</mds-entity>\n```\n\n#### Trailing Action Buttons via `action` Slot\n\nUse the `action` slot for icon-only `<mds-button>` elements. Each button is sized and spaced automatically by the component. Always provide `title` on icon-only buttons for accessibility.\n\n```html\n<mds-entity src=\"/avatars/luca-verdi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Luca Verdi</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">luca@example.com</mds-text>\n <mds-button slot=\"action\" icon=\"mdi/pencil\" variant=\"primary\" tone=\"strong\" title=\"Modifica\"></mds-button>\n <mds-button slot=\"action\" icon=\"mdi/delete\" variant=\"error\" tone=\"strong\" title=\"Elimina\"></mds-button>\n</mds-entity>\n```\n\n#### Colored Avatar with `variant` and `tone`\n\nPair `variant` and `tone` to color the avatar chip by entity category. `tone` is limited to `strong` and `weak`; `variant` accepts the full avatar color set.\n\n```html\n<!-- Strong fill, primary variant -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"strong\">\n <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n\n<!-- Weak tint, warning variant -->\n<mds-entity icon=\"mi/baseline/warning\" variant=\"warning\" tone=\"weak\">\n <mds-text truncate=\"word\" typography=\"h6\">Alert configurazione</mds-text>\n</mds-entity>\n```\n\n#### Await / Loading State\n\nSet the `await` boolean attribute while the entity data is being fetched. The avatar is hidden and a spinner appears in its place. Remove the attribute when loading is complete - do not set `await=\"false\"`.\n\n```html\n<mds-entity await icon=\"mi/baseline/done\" variant=\"success\">\n <mds-text truncate=\"word\" typography=\"h6\">Caricamento in corso...</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Attendere prego</mds-text>\n</mds-entity>\n```\n\n#### Upload / Async Workflow\n\nCombine `await` with `icon` and `variant` to drive a state machine: show the spinner while uploading, then reveal the result icon when done.\n\n```html\n<!-- While uploading -->\n<mds-entity await>\n <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload in corso...</mds-text>\n <mds-button slot=\"action\" icon=\"mi/baseline/cancel\" variant=\"light\" title=\"Annulla upload\"></mds-button>\n</mds-entity>\n\n<!-- After success -->\n<mds-entity icon=\"mi/baseline/done\" variant=\"success\" tone=\"weak\">\n <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload completato con successo</mds-text>\n</mds-entity>\n```\n\n#### Styling Customization\n\nStyle the entity only through its documented `--mds-entity-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. `--mds-entity-icon-background` and `--mds-entity-icon-color` paint the avatar only while it has no `variant` (none set, and no `initials`, which derive one).\n\n```css\n.entity-highlight mds-entity {\n --mds-entity-background: rgb(var(--magma-accent-surface));\n --mds-entity-color: rgb(var(--magma-accent-fg));\n --mds-entity-detail-color: rgb(var(--magma-text-muted));\n --mds-entity-icon-background: rgb(var(--magma-accent-surface-hover));\n --mds-entity-icon-color: rgb(var(--magma-accent-fg));\n}\n```\n",
|
|
8455
|
+
"1. Description": "The `<mds-entity>` web component represents a person, organization, or resource as a compact identity block in the Magma Design System, pairing an avatar with a name, optional secondary details, and contextual actions. It has no native HTML equivalent; it standardises how entities are surfaced in lists, headers, and cards.\n\n#### Semantic Behavior\n\n- **Avatar resolution**: The leading avatar renders only when one of `src`, `icon`, or `initials` is provided. The inner `mds-avatar` resolves a combination pairwise: `icon` hides the `src` image, `initials` hide the `icon`, `src` hides the `initials`, and with all three set it shows none of them.\n- **Await state**: While `await` is set the avatar is suppressed and a spinner is shown in its place, signalling that the entity is still loading.\n- **Conditional regions**: The `detail` and `action` regions are shown only while content is projected into those slots, also when it is added after the first render.\n- **Default slot is the name**: The default slot carries the entity's primary label (text, HTML, or components) and is always rendered inside the info column (the `infos` part), above the `detail` row.\n\n#### Properties & Visual Configurations\n\n- **`src`** is the path to an entity image; **`icon`** is a Magma icon library slug; **`initials`** is the text shown when no image or icon fits. Provide only the one that best identifies the entity - they are not combined.\n- **`await`** marks the entity as loading and takes visual precedence over any avatar source.\n\nThe shared `tone` / `variant` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md) and color the inner avatar. `tone` is limited to the minimal `'strong'` / `'weak'` pair, and `variant` accepts the avatar colour set; pick them to colour the avatar chip in line with the entity's category. With `initials` the avatar derives its colour from the letters and ignores `variant`.\n\n#### Slots\n\n- **`detail`** holds secondary information (role, email, status) rendered beneath the name.\n- **`action`** holds trailing controls; `mds-button` is the recommended element here.\n",
|
|
8456
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-entity>` 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#### Person Entity with Image\n\nThe most common form. Supply `src` for the avatar image and put the entity name in the default slot. Use `<mds-text>` with `typography=\"h6\"` for the primary label so typography tokens are applied consistently.\n\n```html\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Initials Fallback\n\nWhen no image is available, provide `initials` instead of `src`. The avatar chip renders the initials text.\n\n```html\n<mds-entity initials=\"mr\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Icon\n\nUse `icon` for non-person entities (locations, files, organizations). Reference icons by their slug from the Magma icon library.\n\n```html\n<mds-entity icon=\"mi/baseline/location-on\">\n <mds-text truncate=\"word\" typography=\"h6\">Maggioli Headquarters</mds-text>\n</mds-entity>\n```\n\n#### Secondary Details via `detail` Slot\n\nProject additional information (role, email, status) into the `detail` slot. It renders below the primary name in a subdued color. Use `<mds-text typography=\"caption\">` for plain text details.\n\n```html\n<mds-entity src=\"/avatars/giulia-bianchi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Giulia Bianchi</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">giulia@example.com</mds-text>\n <mds-badge slot=\"detail\" variant=\"success\" tone=\"weak\" label=\"Attiva\"></mds-badge>\n</mds-entity>\n```\n\n#### Trailing Action Buttons via `action` Slot\n\nUse the `action` slot for icon-only `<mds-button>` elements. Each button is sized and spaced automatically by the component. Always provide `title` on icon-only buttons for accessibility.\n\n```html\n<mds-entity src=\"/avatars/luca-verdi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Luca Verdi</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">luca@example.com</mds-text>\n <mds-button slot=\"action\" icon=\"mdi/pencil\" variant=\"primary\" tone=\"strong\" title=\"Modifica\"></mds-button>\n <mds-button slot=\"action\" icon=\"mdi/delete\" variant=\"error\" tone=\"strong\" title=\"Elimina\"></mds-button>\n</mds-entity>\n```\n\n#### Colored Avatar with `variant` and `tone`\n\nPair `variant` and `tone` to color the avatar chip by entity category. `tone` is limited to `strong` and `weak`; `variant` accepts the full avatar color set.\n\n```html\n<!-- Strong fill, primary variant -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"strong\">\n <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n\n<!-- Weak tint, warning variant -->\n<mds-entity icon=\"mi/baseline/warning\" variant=\"warning\" tone=\"weak\">\n <mds-text truncate=\"word\" typography=\"h6\">Alert configurazione</mds-text>\n</mds-entity>\n```\n\n#### Await / Loading State\n\nSet the `await` boolean attribute while the entity data is being fetched. The avatar is hidden and a spinner appears in its place. Remove the attribute when loading is complete - do not set `await=\"false\"`.\n\n```html\n<mds-entity await icon=\"mi/baseline/done\" variant=\"success\">\n <mds-text truncate=\"word\" typography=\"h6\">Caricamento in corso...</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Attendere prego</mds-text>\n</mds-entity>\n```\n\n#### Upload / Async Workflow\n\nCombine `await` with `icon` and `variant` to drive a state machine: show the spinner while uploading, then reveal the result icon when done.\n\n```html\n<!-- While uploading -->\n<mds-entity await>\n <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload in corso...</mds-text>\n <mds-button slot=\"action\" icon=\"mi/baseline/cancel\" variant=\"light\" title=\"Annulla upload\"></mds-button>\n</mds-entity>\n\n<!-- After success -->\n<mds-entity icon=\"mi/baseline/done\" variant=\"success\" tone=\"weak\">\n <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload completato con successo</mds-text>\n</mds-entity>\n```\n\n#### Styling Customization\n\nStyle the entity only through its documented `--mds-entity-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. `--mds-entity-icon-background` and `--mds-entity-icon-color` paint the avatar only while it has no `variant` (none set, and no `initials`, which derive one).\n\n```css\n.entity-highlight mds-entity {\n --mds-entity-background: rgb(var(--magma-accent-surface));\n --mds-entity-color: rgb(var(--magma-accent-fg));\n --mds-entity-detail-color: rgb(var(--magma-text-muted));\n --mds-entity-icon-background: rgb(var(--magma-accent-surface-hover));\n --mds-entity-icon-color: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Spacing Between the Name and the Details\n\nThe name and the `detail` row stack in the `infos` part, 2px apart, so a badge or a caption in `detail` never touches the name. When a layout needs more room between them, set the gap of the part; the nodes inside it are not API.\n\n```css\n.entity-roomy mds-entity::part(infos) {\n gap: calc(var(--spacing) * 100);\n}\n```\n",
|
|
8453
8457
|
"3. Antipattern": "Common incorrect uses of `<mds-entity>`. 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 Put the Name as a Plain Text String in the Default Slot\n\nThe default slot accepts HTML elements and components, and the component applies truncation to slotted nodes. Passing a bare string bypasses `<mds-text>` typography tokens and truncation utilities; the result may overflow or render with inconsistent styles.\n\n```html\n<!-- INCORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n Mario Rossi\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Use `await=\"false\"` to Cancel the Loading State\n\n`await` is a boolean attribute: turn it off by removing it (or setting the prop to `undefined`), as for every boolean ([`agents/anti-patterns.md`](../../../../agents/anti-patterns.md)). The runtime happens to read the string `\"false\"` as `false`, but the attribute stays in the markup until the component renders, and HTML, `[await]` selectors and `hasAttribute()` read a present attribute as set.\n\n```html\n<!-- INCORRECT -->\n<mds-entity await=\"false\" src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Put Non-Button Elements in the `action` Slot\n\nThe `action` slot is sized and spaced for icon-only `<mds-button>` elements. Projecting arbitrary elements (raw `<button>`, `<a>`, large widgets) breaks the fixed square dimensions applied by `::slotted([slot='action'])`.\n\n```html\n<!-- INCORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n <button slot=\"action\">Modifica</button>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n <mds-button slot=\"action\" icon=\"mdi/pencil\" variant=\"primary\" tone=\"strong\" title=\"Modifica\"></mds-button>\n</mds-entity>\n```\n\n#### Do Not Combine `src`, `icon`, and `initials` Expecting All Three to Show\n\nThe component resolves to a single avatar representation. Setting all three does not create a layered avatar: the inner `mds-avatar` lets `icon` hide the image, `initials` hide the icon and `src` hide the initials, so the chip renders none of them.\n\n```html\n<!-- INCORRECT (expects image, icon, and initials to all appear) -->\n<mds-entity src=\"/avatars/mario-rossi.png\" icon=\"mi/baseline/person\" initials=\"mr\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n\n<!-- CORRECT - provide the most specific source available -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Apply an Invalid `tone` Value\n\n`<mds-entity>` uses `ToneMinimalVariantType`, which accepts only `strong` and `weak`. Passing other tone values like `outline` or `text` is a type error and is silently ignored: the avatar renders with the `strong` colours.\n\n```html\n<!-- INCORRECT -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"outline\">\n <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"strong\">\n <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Avatar\n\nThe component exposes a `::part(avatar)` surface for styling the inner `<mds-avatar>`, but the part is the limit: the nodes inside it are not API. Use `--mds-entity-icon-background`, `--mds-entity-icon-color`, and other `--mds-entity-*` custom properties for color customization; do not target undocumented internals.\n\n```css\n/* INCORRECT */\nmds-entity::part(avatar) .inner-circle {\n background: hotpink;\n}\nmds-entity >>> mds-avatar {\n width: 80px;\n}\n\n/* CORRECT */\nmds-entity {\n --mds-entity-icon-background: rgb(var(--magma-accent-surface-hover));\n --mds-entity-icon-color: rgb(var(--magma-accent-fg));\n}\n```\n"
|
|
8454
8458
|
},
|
|
8455
8459
|
"props": [
|
|
@@ -8743,6 +8747,10 @@
|
|
|
8743
8747
|
"name": "avatar",
|
|
8744
8748
|
"docs": "The avatar element"
|
|
8745
8749
|
},
|
|
8750
|
+
{
|
|
8751
|
+
"name": "infos",
|
|
8752
|
+
"docs": "The column that stacks the name (default slot) and the `detail` row"
|
|
8753
|
+
},
|
|
8746
8754
|
{
|
|
8747
8755
|
"name": "spinner",
|
|
8748
8756
|
"docs": "The spinner element"
|
|
@@ -11856,6 +11864,7 @@
|
|
|
11856
11864
|
"mds-input-upload",
|
|
11857
11865
|
"mds-keyboard-key",
|
|
11858
11866
|
"mds-kpi-item",
|
|
11867
|
+
"mds-link",
|
|
11859
11868
|
"mds-list-item",
|
|
11860
11869
|
"mds-mention",
|
|
11861
11870
|
"mds-paginator-item",
|
|
@@ -11913,6 +11922,9 @@
|
|
|
11913
11922
|
"mds-kpi-item": [
|
|
11914
11923
|
"mds-icon"
|
|
11915
11924
|
],
|
|
11925
|
+
"mds-link": [
|
|
11926
|
+
"mds-icon"
|
|
11927
|
+
],
|
|
11916
11928
|
"mds-list-item": [
|
|
11917
11929
|
"mds-icon"
|
|
11918
11930
|
],
|
|
@@ -12454,7 +12466,7 @@
|
|
|
12454
12466
|
}
|
|
12455
12467
|
],
|
|
12456
12468
|
"usage": {
|
|
12457
|
-
"1. Description": "The `<mds-input>` web component is the primary single- and multi-line text entry control of the Magma Design System. It wraps a native `<input>` (or `<textarea>` when `type=\"textarea\"`) and layers on form association, validation, inline tips, iconography, password masking, numeric steppers, datalist suggestions and speech-to-text dictation.\n\n#### Semantic Behavior\n\n- **Form association**: The component reports its value to the surrounding `<form>`, so it submits natively. On `disabled` the reported value is cleared. A form reset brings back the value the field had at load, both shown and submitted, and drops the `'success'` or `'error'` look of a past blur, like a native input.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: The validators below also decide the validity reported to the form, on every change of the value or of the rules: like a native control, an invalid field matches `:invalid` and stops the submit, the browser shows a message in the page language next to the field and focuses it, and the field switches to `'error'` as on blur. Disabled and read-only fields are left out, and `novalidate` on the `<form>` turns the check off. `type=\"email\"` and `type=\"url\"` check the format of the value as a native input does.\n- **Validation on blur**: Validation runs when the field loses focus (and re-runs on input once invalid). It drives the `variant` automatically to `'success'` or `'error'`, emits `mdsInputValidation` with the boolean result, and reverts to `'primary'` when an optional field is emptied.\n- **Type-aware validators**: The active validator set is derived from `type` - `email` and `url` install the format validators of the native types, `cf` the codice fiscale format and length validators, `isbn` a checksum validator, `piva` the partita IVA one (11 digits, the last one the check digit) and `cc` the card number one (13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check); no type applies an input mask, while `required`, `min`/`max` (any number, `0` included), `minlength`/`maxlength` and `pattern` add the corresponding constraint validators. As on a native input, `pattern` has to match the whole value, an expression that does not compile sets no rule, and `number`, `date`, `time` and `textarea` ignore it. The set is rebuilt whenever one of these props changes, also after load, as with the React wrappers under SSR: a pristine field only updates its required tip, a field already validated on blur is validated again. Custom validators can be attached at runtime through the `addValidator`/`removeValidator`/`hasValidator`/`getErrors` methods.\n- **Disabled / read-only tips**: `disabled` and `readonly` surface a persistent top tip describing the state; read-only fields also auto-select their text on focus.\n- **Character counter**: When `maxlength` is set a bottom counter tip shows `current / max` and shifts through fullness variants as the value approaches the limit. A `maxlength` of `0` or less is treated as unset.\n- **Password masking**: With `type=\"password\"` a toggle button reveals/hides the value; it is disabled with the field.\n- **Number steppers**: With `type=\"number\"` increment/decrement buttons are rendered; their placement follows `controlsLayout` and their glyphs follow `controlsIcon`. They are disabled on a disabled or read-only field, like the spin buttons of a native one.\n- **Speech-to-text**: When `mic` is set a dictation button transcribes speech into the value, replacing what was there, and emits `mdsInputSpeechEnd` when the user stops the dictation; when the Web Speech API is unavailable the button switches to an error state and the value is left as it is. The dictation button is disabled on a disabled or read-only field, which the user cannot change, and a dictation in progress stops, emitting `mdsInputSpeechEnd`, when the field becomes so.\n- **Emitted events**: `mdsInputChange` carries the new value, `mdsInputKeydown` fires on every key pressed in the field with the native `KeyboardEvent` as detail (before the value changes: read the value from `mdsInputChange`), and `mdsInputFocus`/`mdsInputBlur` fire on focus transitions.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` ladder (color role) is defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-input>` consumes it for both intent styling and validation feedback, but does not expose a `tone` prop. It accepts `primary` (default), `ai`, `info`, `success`, `warning` and `error`.\n\n- **`type`** selects both the rendered control and the validation profile: it covers the native HTML types plus format types (`'cf'`, `'piva'`, `'isbn'`, `'cc'`) and switches the host to a multi-line `<textarea>` for `'textarea'`.\n- **`variant=\"ai\"`** auto-assigns the AI chatbot icon when no `icon` is otherwise provided, signposting AI-assisted fields.\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner icon, stepper buttons and password and microphone toggles scale with it. A `textarea` keeps its own height (`--mds-input-textarea-min-height`).\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library shown at the leading (left) edge of the field; it is suppressed while `await` is active, since the spinner takes its place.\n- **`controlsLayout`** chooses between stacked (`'vertical'`) and split (`'horizontal'`) stepper buttons, and **`controlsIcon`** picks arrow vs. plus/minus glyphs - both apply only to `type=\"number\"`.\n- **`datalist`** supplies suggestion options for `type=\"search\"` style autocompletion.\n- **`tip`** renders inline helper text below the field, and **`typography`** selects the field's text scale.\n",
|
|
12469
|
+
"1. Description": "The `<mds-input>` web component is the primary single- and multi-line text entry control of the Magma Design System. It wraps a native `<input>` (or `<textarea>` when `type=\"textarea\"`) and layers on form association, validation, inline tips, iconography, password masking, numeric steppers, datalist suggestions and speech-to-text dictation.\n\n#### Semantic Behavior\n\n- **Form association**: The component reports its value to the surrounding `<form>`, so it submits natively. On `disabled` the reported value is cleared. A form reset brings back the value the field had at load, both shown and submitted, and drops the `'success'` or `'error'` look of a past blur, like a native input.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: The validators below also decide the validity reported to the form, on every change of the value or of the rules: like a native control, an invalid field matches `:invalid` and stops the submit, the browser shows a message in the page language next to the field and focuses it, and the field switches to `'error'` as on blur. Disabled and read-only fields are left out, and `novalidate` on the `<form>` turns the check off. `type=\"email\"` and `type=\"url\"` check the format of the value as a native input does.\n- **Validation on blur**: Validation runs when the field loses focus (and re-runs on input once invalid). A `required` field waits for that first blur too: until then, typing only updates its required tip. It drives the `variant` automatically to `'success'` or `'error'`, emits `mdsInputValidation` with the boolean result, and reverts to `'primary'` when an optional field is emptied.\n- **Type-aware validators**: The active validator set is derived from `type` - `email` and `url` install the format validators of the native types, `cf` the codice fiscale format and length validators, `isbn` a checksum validator, `piva` the partita IVA one (11 digits, the last one the check digit) and `cc` the card number one (13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check); no type applies an input mask, while `required`, `min`/`max` (any number, `0` included), `minlength`/`maxlength` and `pattern` add the corresponding constraint validators. As on a native input, `pattern` has to match the whole value, an expression that does not compile sets no rule, and `number`, `date`, `time` and `textarea` ignore it. The set is rebuilt whenever one of these props changes, also after load, as with the React wrappers under SSR: a pristine field only updates its required tip, a field already validated on blur is validated again. Custom validators can be attached at runtime through the `addValidator`/`removeValidator`/`hasValidator`/`getErrors` methods.\n- **Localized messages**: The messages of the built-in validators, the ones `getErrors()` returns and `mds-input-field` shows, are in the language of the page when the value is validated (`el`, `en`, `es`, `it`, English for any other).\n- **Error keys**: `getErrors()` reports each failed rule under its own key: `required`, `max`, `min`, `maxlength`, `minlength`, `pattern`, `email`, `url`, `piva`, `cc`, `isbn-error`, `cf-regex` and `cf-length`, plus the keys the custom validators return. Up to 2.5.0, `maxlength` and `minlength` were both reported as `minLenght`.\n- **Disabled / read-only tips**: `disabled` and `readonly` surface a persistent top tip describing the state; read-only fields also auto-select their text on focus.\n- **Character counter**: When `maxlength` is set a bottom counter tip shows `current / max` and shifts through fullness variants as the value approaches the limit. A `maxlength` of `0` or less is treated as unset.\n- **Password masking**: With `type=\"password\"` a toggle button reveals/hides the value; it is disabled with the field.\n- **Number steppers**: With `type=\"number\"` increment/decrement buttons are rendered; their placement follows `controlsLayout` and their glyphs follow `controlsIcon`. They are disabled on a disabled or read-only field, like the spin buttons of a native one.\n- **Speech-to-text**: When `mic` is set a dictation button transcribes speech into the value, replacing what was there, and emits `mdsInputSpeechEnd` when the user stops the dictation; when the Web Speech API is unavailable the button switches to an error state and the value is left as it is. The dictation button is disabled on a disabled or read-only field, which the user cannot change, and a dictation in progress stops, emitting `mdsInputSpeechEnd`, when the field becomes so.\n- **Emitted events**: `mdsInputChange` carries the new value, `mdsInputKeydown` fires on every key pressed in the field with the native `KeyboardEvent` as detail (before the value changes: read the value from `mdsInputChange`), and `mdsInputFocus`/`mdsInputBlur` fire on focus transitions.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` ladder (color role) is defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-input>` consumes it for both intent styling and validation feedback, but does not expose a `tone` prop. It accepts `primary` (default), `ai`, `info`, `success`, `warning` and `error`.\n\n- **`type`** selects both the rendered control and the validation profile: it covers the native HTML types plus format types (`'cf'`, `'piva'`, `'isbn'`, `'cc'`) and switches the host to a multi-line `<textarea>` for `'textarea'`.\n- **`variant=\"ai\"`** auto-assigns the AI chatbot icon when no `icon` is otherwise provided, signposting AI-assisted fields.\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner icon, stepper buttons and password and microphone toggles scale with it. A `textarea` keeps its own height (`--mds-input-textarea-min-height`).\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library shown at the leading (left) edge of the field; it is suppressed while `await` is active, since the spinner takes its place.\n- **`controlsLayout`** chooses between stacked (`'vertical'`) and split (`'horizontal'`) stepper buttons, and **`controlsIcon`** picks arrow vs. plus/minus glyphs - both apply only to `type=\"number\"`.\n- **`datalist`** supplies suggestion options for `type=\"search\"` style autocompletion.\n- **`tip`** renders inline helper text below the field, and **`typography`** selects the field's text scale.\n",
|
|
12458
12470
|
"2. Pattern": "Correct and idiomatic ways to use the `<mds-input>` 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 Text Input\n\nThe simplest form: set `name` for form participation and `placeholder` for a visual hint. Wrap the component in [`mds-input-field`](../mds-input-field/AGENTS.md) to add a visible label and associated tip.\n\n```html\n<mds-input\n name=\"cognome\"\n placeholder=\"Inserisci il tuo cognome\"\n></mds-input>\n```\n\n#### Required Field with `tip` Helper Text\n\nUse `required` to validate that the field is not empty and `tip` to explain the constraint. The component surfaces a top-tip when focused and drives `variant` to `'error'` or `'success'` on blur. When the field collects the user's own data, set the matching `autocomplete` token (`email`, `given-name`, `tel`, ...) so browsers can identify its purpose (WCAG 2.1 SC 1.3.5) and offer autofill; without it the component default `autocomplete=\"off\"` applies.\n\n```html\n<mds-input\n name=\"email\"\n type=\"email\"\n autocomplete=\"email\"\n placeholder=\"nome@esempio.it\"\n required\n tip=\"Inserisci un indirizzo email valido\"\n></mds-input>\n```\n\n#### Textarea for Multi-line Content\n\nSet `type=\"textarea\"` to render a `<textarea>` instead of a single-line `<input>`. Use the `--mds-input-textarea-*` custom properties to control height and resize behaviour.\n\n```html\n<mds-input\n name=\"descrizione\"\n type=\"textarea\"\n placeholder=\"Descrivi il problema...\"\n maxlength=\"500\"\n></mds-input>\n```\n\n#### Character Counter via `maxlength`\n\nWhen `maxlength` is set the component renders a live `current / max` counter below the field. The counter shifts through fullness variants as the limit approaches. A value of `0` or less is treated as unset.\n\n```html\n<mds-input\n name=\"titolo\"\n placeholder=\"Titolo dell'articolo\"\n maxlength=\"120\"\n></mds-input>\n```\n\n#### Numeric Input with Steppers\n\nSet `type=\"number\"` to enable built-in increment/decrement buttons. Use `controlsLayout` to choose between stacked (`'vertical'`, default) and split (`'horizontal'`) placement, and `controlsIcon` to pick arrow vs. plus/minus glyphs. Use `min`, `max`, and `step` to constrain the legal range.\n\n```html\n<!-- Stacked (default) - arrow glyphs -->\n<mds-input\n name=\"quantita\"\n type=\"number\"\n min=\"1\"\n max=\"99\"\n step=\"1\"\n placeholder=\"1\"\n></mds-input>\n\n<!-- Horizontal split - arithmetic glyphs -->\n<mds-input\n name=\"quantita\"\n type=\"number\"\n min=\"0\"\n max=\"100\"\n controls-layout=\"horizontal\"\n controls-icon=\"arithmetic\"\n placeholder=\"0\"\n></mds-input>\n```\n\n#### Password Input\n\nSet `type=\"password\"` to render a masked field with a built-in visibility toggle. The component renders a custom dot-mask overlay and a show/hide button - no extra wiring is needed. Always set `autocomplete` to `new-password` (sign-up, password change) or `current-password` (login): the component default is `autocomplete=\"off\"`, which browsers and password managers ignore on credential fields, but the explicit token is what lets them pair the password with its username field and fill or generate the right value.\n\n```html\n<mds-input\n name=\"password\"\n type=\"password\"\n autocomplete=\"new-password\"\n placeholder=\"Scegli una password\"\n required\n></mds-input>\n```\n\n#### Login Form\n\nPair a username field carrying `autocomplete=\"username\"` with a password field carrying `autocomplete=\"current-password\"` inside a `<form>`, and submit through `<mds-button type=\"submit\">`. The native fields live in the Shadow DOM of each `<mds-input>`: among the password managers tested, Bitwarden, LastPass, Chrome and Edge detect and fill them, Firefox's built-in manager and KeePassXC-Browser do not (they only look at the light DOM).\n\n```html\n<form action=\"/login\" method=\"post\">\n <mds-input-field label=\"Email\">\n <mds-input name=\"username\" type=\"email\" autocomplete=\"username\" required></mds-input>\n </mds-input-field>\n <mds-input-field label=\"Password\">\n <mds-input name=\"password\" type=\"password\" autocomplete=\"current-password\" required></mds-input>\n </mds-input-field>\n\n <mds-button type=\"submit\" label=\"Accedi\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Italian-Specific Masked Types\n\n`type=\"cf\"` installs the codice fiscale format and length validators and `type=\"isbn\"` a checksum validator. `type=\"piva\"` accepts 11 digits whose last one is the check digit, without the `IT` prefix or spaces, and `type=\"cc\"` 13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check of card numbers. A value that breaks the format stops the submit of the form. No type applies a keyboard mask.\n\n```html\n<mds-input name=\"codice_fiscale\" type=\"cf\" placeholder=\"RSSMRA80A01H501Z\"></mds-input>\n<mds-input name=\"partita_iva\" type=\"piva\" placeholder=\"01234567890\"></mds-input>\n```\n\n#### Search Input with Datalist\n\nUse `type=\"search\"` combined with the `datalist` prop to offer autocomplete suggestions from a fixed list. The list is rendered inside the shadow DOM and wired automatically.\n\n```html\n<mds-input\n name=\"comune\"\n type=\"search\"\n placeholder=\"Cerca comune...\"\n></mds-input>\n```\n\n```javascript\n// Pass suggestions as a JavaScript array\ndocument.querySelector('mds-input').datalist = ['Roma', 'Milano', 'Napoli', 'Torino'];\n```\n\n#### Icon Decoration\n\nThe `icon` prop renders an SVG slug from the Magma icon library at the leading edge of the field. The icon is suppressed while `await` is active and the spinner takes its place.\n\n```html\n<mds-input\n name=\"cerca\"\n type=\"search\"\n icon=\"mi/baseline/search\"\n placeholder=\"Cerca...\"\n></mds-input>\n```\n\n#### AI-Assisted Field\n\nSet `variant=\"ai\"` to signal an AI-powered field. When no `icon` prop is present, the component auto-assigns the AI chatbot icon.\n\n```html\n<mds-input\n name=\"prompt\"\n type=\"text\"\n variant=\"ai\"\n placeholder=\"Chiedi qualcosa all'assistente...\"\n></mds-input>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while an async operation (e.g. a lookup) is in flight. The component renders an inline spinner in place of the icon. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-input name=\"codice\" placeholder=\"Verifica in corso...\" await></mds-input>\n```\n\n#### Speech-to-Text Dictation\n\nSet the `mic` boolean attribute to render a dictation button. Starting a dictation clears the current value and writes the recognized speech in its place; the component emits `mdsInputSpeechEnd` when the user stops the dictation. If the Web Speech API is unavailable the button switches to an error state and the value is kept.\n\n```html\n<mds-input\n name=\"note_vocali\"\n type=\"text\"\n mic\n placeholder=\"Parla o scrivi...\"\n></mds-input>\n```\n\n#### Listening to Events\n\nListen for `mdsInputChange` instead of native `input` or `change`: `change` does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script.\n\n```javascript\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n console.log(e.detail.value);\n});\n\ndocument.querySelector('mds-input').addEventListener('mdsInputValidation', (e) => {\n console.log('valido:', e.detail);\n});\n```\n\n#### Form Participation\n\n`<mds-input>` is form-associated. It submits natively inside a `<form>`; set `name` so the value is included in form data. Its validation is reported to the form too: an empty `required` field, or one that breaks another rule, stops the submit like a native input and shows the error. Add `novalidate` to the `<form>` when your own code validates on submit. A reset brings every field back to its value at load and to its pristine look.\n\n```html\n<form action=\"/salva\" method=\"post\">\n <mds-input name=\"nome\" type=\"text\" placeholder=\"Nome\" required></mds-input>\n <mds-input name=\"cognome\" type=\"text\" placeholder=\"Cognome\" required></mds-input>\n <mds-input name=\"email\" type=\"email\" placeholder=\"Email\" required></mds-input>\n\n <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n <mds-button type=\"reset\" label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n</form>\n```\n\n#### Read-Only Display\n\nUse `readonly` when the value should be visible but not editable. A persistent top tip describes the state, and the field text is auto-selected on focus for easy copying.\n\n```html\n<mds-input\n name=\"codice_riferimento\"\n value=\"REF-2024-00123\"\n readonly\n></mds-input>\n```\n\n#### Styling Customization\n\nStyle the input only through its documented `--mds-input-*` CSS custom properties. Set them on the host or a parent selector. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.search-bar mds-input {\n --mds-input-background: rgb(var(--magma-wash-base));\n --mds-input-placeholder-default-color: rgb(var(--magma-text-disabled));\n --mds-input-icon-color: rgb(var(--magma-accent-fg));\n}\n\n/* Textarea: fixed height, allow resize */\n.notes-area mds-input {\n --mds-input-textarea-min-height: 8rem;\n --mds-input-textarea-max-height: 24rem;\n --mds-input-textarea-resize: vertical;\n}\n```\n\n#### Sizing a Field to the Controls Next to It\n\nGive the fields of a row the `size` of the buttons beside them, so they share one height: `sm` 28px, `md` 36px, `lg` 48px (default), the sizes of [`<mds-button>`](../mds-button/AGENTS.md). `<mds-input-select>`, `<mds-input-date>` and `<mds-input-date-range>` take the same values.\n\n```html\n<div class=\"flex items-center gap-200\">\n <mds-input size=\"md\" type=\"search\" icon=\"mi/baseline/search\" placeholder=\"Cerca\"></mds-input>\n <mds-input-select size=\"md\" placeholder=\"Stato\">\n <option value=\"open\">Aperte</option>\n <option value=\"closed\">Chiuse</option>\n </mds-input-select>\n <mds-button size=\"md\" label=\"Filtra\"></mds-button>\n</div>\n```\n\n",
|
|
12459
12471
|
"3. Antipattern": "Common incorrect uses of `<mds-input>`. 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 a Raw `<input>` When `<mds-input>` Exists\n\nReaching for a plain `<input>` bypasses theming, validation, tips, accessible state announcements, and form-reset behavior provided by the component.\n\n```html\n<!-- INCORRECT -->\n<input type=\"text\" name=\"nome\" placeholder=\"Nome\" class=\"my-input\">\n\n<!-- CORRECT -->\n<mds-input name=\"nome\" type=\"text\" placeholder=\"Nome\"></mds-input>\n```\n\n#### Do Not Set Boolean Attributes to the String `\"false\"`\n\n`disabled`, `required`, `readonly`, `mic` and `await` are boolean attributes: remove the attribute entirely to turn it off. `mds-input` is form-associated, so as on a native control any value turns them on, `\"false\"` included: this markup renders a disabled, required field.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"note\" disabled=\"false\" required=\"false\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"note\"></mds-input>\n```\n\n#### Do Not Force `variant` for Validation Feedback\n\nThe component drives `variant` to `'success'` or `'error'` automatically on blur when validators are active. Setting `variant` manually overrides the feedback and breaks the visual contract.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"codice\" variant=\"error\" tip=\"Valore non valido\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"codice\" required tip=\"Inserisci un valore valido\"></mds-input>\n```\n\n#### Do Not Listen to Native `input` or `change` Events\n\nThe native `change` event does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script. Use the documented `mdsInputChange` event instead, which fires for every value change.\n\n```javascript\n// INCORRECT\ndocument.querySelector('mds-input').addEventListener('input', (e) => {\n console.log(e.target.value);\n});\n\n// CORRECT\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n console.log(e.detail.value);\n});\n```\n\n#### Do Not Use `type=\"number\"` Native Browser Spinners and Then Override the Input\n\nThe component renders its own increment/decrement buttons and hides the native browser spinners. Do not try to re-enable them via CSS, and do not add inline JS `stepUp`/`stepDown` calls - use the `controlsLayout` and `controlsIcon` props to configure the built-in controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"number\" style=\"-moz-appearance: auto;\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input\n type=\"number\"\n controls-layout=\"horizontal\"\n controls-icon=\"arithmetic\"\n min=\"0\"\n max=\"100\"\n></mds-input>\n```\n\n#### Do Not Use a Legacy or Invalid `type` Value\n\n`<mds-input>` accepts a specific set of `type` values: `text`, `email`, `number`, `password`, `search`, `tel`, `url`, `date`, `time`, `textarea`, `cf`, `piva`, `cc`, `isbn`. Supplying anything else (e.g. `\"checkbox\"`, `\"radio\"`, `\"file\"`) is passed straight to the inner native `<input>`, which renders a bare native control that the component neither styles nor reports correctly to the form. Use the dedicated Magma component for those controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"checkbox\" name=\"accetto\"></mds-input>\n<mds-input type=\"file\" name=\"allegato\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-switch name=\"accetto\"></mds-input-switch>\n<mds-input-upload name=\"allegato\"></mds-input-upload>\n```\n\n#### Do Not Use `placeholder` as the Accessible Label\n\n`placeholder` disappears on input and is never read as a label by assistive tech. Always pair `<mds-input>` with [`mds-input-field`](../mds-input-field/AGENTS.md) (which shows a visible label and passes it down as the accessible name) or supply `aria-label` directly on the host.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Cerca per nome\">\n <mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Parts\n\nThe supported customization surface is `--mds-input-*` CSS custom properties plus the documented shadow parts (`field`, `tip-top`, `tip-bottom`, `tip-count`, `password-toggle-button`, `counter-button-increase`, `counter-button-decrease`, `mic-toggle-button`). Targeting undocumented internals via `>>>` or arbitrary class names couples your code to the Shadow DOM implementation.\n\n```css\n/* INCORRECT */\nmds-input >>> .input {\n border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input {\n --mds-input-ring: 0 0 0 2px rgb(var(--magma-danger-border));\n --mds-input-background: rgb(var(--magma-danger-wash-base));\n}\nmds-input::part(field) {\n font-style: italic;\n}\n```\n"
|
|
12460
12472
|
},
|
|
@@ -16209,7 +16221,7 @@
|
|
|
16209
16221
|
}
|
|
16210
16222
|
],
|
|
16211
16223
|
"usage": {
|
|
16212
|
-
"1. Description": "The `<mds-input-select>` web component is the Magma Design System single- and multi-choice dropdown control. It wraps a native `<select>` element, adding form association, accessible status feedback, and themed chrome while accepting plain `<option>` elements through its default slot.\n\n#### Semantic Behavior\n\n- **Native select wrapping**: It renders a real `<select>` (exposed as the `select` part) so keyboard, type-ahead, and platform option lists work natively; the host owns theming and status only.\n- **Slotted options**: The default slot accepts `<option>` (and `<optgroup>`) markup; the current selection re-syncs whenever the slotted content changes.\n- **Form association**: The selection is pushed to the host form: a single select submits its `value`, a `multiple` one an entry per selected option under `name`, as a native select. A form reset brings back the selection of load, like a native select: the options the markup marks `selected` (or the placeholder), with the `value` of load on top. Toggling `disabled` removes the value from the submitted form data.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: A `required` select left empty is reported to the form as a native one: it matches `:invalid` and stops the submit, with a message in the page language. A disabled select is left out, and `novalidate` on the `<form>` turns the check off.\n- **Value syncing**: Changing the selection (by user input, the `setValue()` method, or the prop) emits `mdsInputSelectChange` with `{ value, values }` in `detail`: `value` is the first selected option as a string, `values` the values of every selected option, the placeholder left out. A `value` set by code selects its `<option>` alone, as `select.value` does, and a value cleared by code goes back to the placeholder.\n- **Placeholder option**: When `placeholder` is set, a leading empty-value `<option>` is injected as the first entry; if `required` is set that placeholder is disabled so it cannot be re-selected after a valid choice.\n- **Default selection fallback**: With no explicit value, the options the markup marks `selected` become the selection; without them, the placeholder or, with no placeholder, the first option of a single select. A `defaultValue` seeds `value` at load.\n- **Status tip**: A status tip surfaces verbose state - a disabled notice, and for required fields a `required` / `required-success` message that expands while the control has focus.\n\n#### Properties & Visual Configurations\n\nThe `variant` prop applies a status appearance drawn from the shared status ladder in [`agents/variants.md`](../../../../agents/variants.md) - use it to reflect validation outcome (`'error'`, `'success'`, `'warning'`, `'info'`) rather than decorative styling. This component exposes no separate `tone` prop.\n\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner arrow scale with it.\n\n#### Other behavioral props\n\n- **`multiple`** turns the control into a multi-select list box: the form gets an entry per selected option and `values` in the `mdsInputSelectChange` detail lists them all, while `value` holds the first one, as `select.value` does. **`rows`** sets how many option rows are visible at once, as the `size` of a native `<select>`: above `1` it shows a list box even without `multiple`. A number in `size`, the row count it used to set, still works as `rows` but warns: it is deprecated and goes in the next major.\n- **`defaultValue`** is the initial selection used to seed the value at load (notably for the React wrapper), distinct from the live `value` that reflects the current choice.\n- **`required`** both enforces a non-empty submission and locks the placeholder option so the empty entry cannot be chosen again.\n",
|
|
16224
|
+
"1. Description": "The `<mds-input-select>` web component is the Magma Design System single- and multi-choice dropdown control. It wraps a native `<select>` element, adding form association, accessible status feedback, and themed chrome while accepting plain `<option>` elements through its default slot.\n\n#### Semantic Behavior\n\n- **Native select wrapping**: It renders a real `<select>` (exposed as the `select` part) so keyboard, type-ahead, and platform option lists work natively; the host owns theming and status only.\n- **Slotted options**: The default slot accepts `<option>` (and `<optgroup>`) markup; the current selection re-syncs whenever the slotted content changes.\n- **Form association**: The selection is pushed to the host form: a single select submits its `value`, a `multiple` one an entry per selected option under `name`, as a native select. A form reset brings back the selection of load, like a native select: the options the markup marks `selected` (or the placeholder), with the `value` of load on top. Toggling `disabled` removes the value from the submitted form data.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: A `required` select left empty is reported to the form as a native one: it matches `:invalid` and stops the submit, with a message in the page language. A disabled select is left out, and `novalidate` on the `<form>` turns the check off.\n- **Value syncing**: Changing the selection (by user input, the `setValue()` method, or the prop) emits `mdsInputSelectChange` with `{ value, values }` in `detail`: `value` is the first selected option as a string, `values` the values of every selected option, the placeholder left out. Like a native `<select>`, it is not emitted on load: the selection the component starts with reaches the form, not the event. A `value` set by code selects its `<option>` alone, as `select.value` does, and a value cleared by code goes back to the placeholder.\n- **Placeholder option**: When `placeholder` is set, a leading empty-value `<option>` is injected as the first entry; if `required` is set that placeholder is disabled so it cannot be re-selected after a valid choice.\n- **Default selection fallback**: With no explicit value, the options the markup marks `selected` become the selection; without them, the placeholder or, with no placeholder, the first option of a single select. A `defaultValue` seeds `value` at load.\n- **Status tip**: A status tip surfaces verbose state - a disabled notice, and for required fields a `required` / `required-success` message that expands while the control has focus.\n\n#### Properties & Visual Configurations\n\nThe `variant` prop applies a status appearance drawn from the shared status ladder in [`agents/variants.md`](../../../../agents/variants.md) - use it to reflect validation outcome (`'error'`, `'success'`, `'warning'`, `'info'`) rather than decorative styling. This component exposes no separate `tone` prop.\n\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner arrow scale with it.\n\n#### Other behavioral props\n\n- **`multiple`** turns the control into a multi-select list box: the form gets an entry per selected option and `values` in the `mdsInputSelectChange` detail lists them all, while `value` holds the first one, as `select.value` does. **`rows`** sets how many option rows are visible at once, as the `size` of a native `<select>`: above `1` it shows a list box even without `multiple`. A number in `size`, the row count it used to set, still works as `rows` but warns: it is deprecated and goes in the next major.\n- **`defaultValue`** is the initial selection used to seed the value at load (notably for the React wrapper), distinct from the live `value` that reflects the current choice.\n- **`required`** both enforces a non-empty submission and locks the placeholder option so the empty entry cannot be chosen again.\n",
|
|
16213
16225
|
"2. Pattern": "Correct and idiomatic ways to use the `<mds-input-select>` 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 Select with Placeholder\n\nThe canonical form. Slot plain `<option>` elements as direct children. Set `placeholder` to inject a leading empty-value entry that prompts the user before a choice is made.\n\n```html\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona una categoria...\">\n <option value=\"news\">Notizie</option>\n <option value=\"eventi\">Eventi</option>\n <option value=\"avvisi\">Avvisi</option>\n</mds-input-select>\n```\n\n#### Required Select Inside a Form\n\nAdding `required` enforces a non-empty submission - an empty select stops the submit like a native one - and disables the placeholder option once a valid choice exists, so users cannot revert to the empty entry. Place the component inside a `<form>` - it is form-associated and submits natively.\n\n```html\n<form action=\"/salva\" method=\"post\">\n <mds-input-select name=\"regione\" required placeholder=\"Scegli la regione...\">\n <option value=\"lombardia\">Lombardia</option>\n <option value=\"veneto\">Veneto</option>\n <option value=\"toscana\">Toscana</option>\n </mds-input-select>\n <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Pre-selected Value via `value`\n\nPass `value` to open the component with a specific option already chosen. The matching `<option>` is marked selected automatically. Use `default-value` instead when the initial selection is set once at load and you do not need live two-way binding (notably in the React wrapper).\n\n```html\n<!-- Live controlled value -->\n<mds-input-select name=\"priorita\" value=\"alta\">\n <option value=\"bassa\">Bassa</option>\n <option value=\"media\">Media</option>\n <option value=\"alta\">Alta</option>\n</mds-input-select>\n\n<!-- Initial seed value for React / SSR -->\n<mds-input-select name=\"priorita\" default-value=\"media\">\n <option value=\"bassa\">Bassa</option>\n <option value=\"media\">Media</option>\n <option value=\"alta\">Alta</option>\n</mds-input-select>\n```\n\n#### Listening to Value Changes\n\nListen to `mdsInputSelectChange` - do not rely on the native `change` event, which may not bubble out of shadow DOM reliably. The event detail carries the chosen value as a string in `value`, and the values of every selected option in `values`.\n\n```html\n<mds-input-select id=\"stato-pratica\" name=\"stato\" placeholder=\"Seleziona stato...\">\n <option value=\"bozza\">Bozza</option>\n <option value=\"in-lavorazione\">In lavorazione</option>\n <option value=\"chiusa\">Chiusa</option>\n</mds-input-select>\n\n<script>\n document.getElementById('stato-pratica')\n .addEventListener('mdsInputSelectChange', (event) => {\n console.log('Nuovo stato:', event.detail.value);\n });\n</script>\n```\n\n#### Programmatic Value via `setValue()`\n\nUse the `setValue()` async method when you need to change the selection from JavaScript after the component has rendered - for example when a related control resets the form state.\n\n```html\n<mds-input-select id=\"provincia\" name=\"provincia\" placeholder=\"Seleziona provincia...\">\n <option value=\"MI\">Milano</option>\n <option value=\"RM\">Roma</option>\n <option value=\"TO\">Torino</option>\n</mds-input-select>\n\n<script>\n async function resetSelezione() {\n const el = document.getElementById('provincia');\n await el.setValue('MI');\n }\n</script>\n```\n\n#### Disabled State\n\nSet `disabled` as a boolean attribute to block interaction and remove the value from the submitted form data. A status tip is shown automatically while the component is disabled.\n\n```html\n<mds-input-select name=\"tipo-contratto\" disabled placeholder=\"Non disponibile\">\n <option value=\"td\">Tempo determinato</option>\n <option value=\"ti\">Tempo indeterminato</option>\n</mds-input-select>\n```\n\n#### Multi-select List Box\n\n`multiple` switches the component to a scrollable list that allows zero or more simultaneous selections. Use `rows` to control how many rows are visible without scrolling (`size` sets the height of the field). Mark the options to preselect with `selected`, as in a native `<select multiple>`. The form submits an entry per selected option under `name`, and `values` in the `mdsInputSelectChange` detail lists them all; `value` holds only the first one, as `select.value` does.\n\n```html\n<mds-input-select name=\"competenze\" multiple rows=\"4\">\n <option value=\"js\" selected>JavaScript</option>\n <option value=\"ts\" selected>TypeScript</option>\n <option value=\"css\">CSS</option>\n <option value=\"html\">HTML</option>\n <option value=\"react\">React</option>\n</mds-input-select>\n```\n\n#### Grouped Options via `<optgroup>`\n\nThe default slot also accepts `<optgroup>` elements. Use them to group related options under a visible label.\n\n```html\n<mds-input-select name=\"comune\" placeholder=\"Seleziona comune...\">\n <optgroup label=\"Lombardia\">\n <option value=\"MI\">Milano</option>\n <option value=\"BS\">Brescia</option>\n </optgroup>\n <optgroup label=\"Veneto\">\n <option value=\"VE\">Venezia</option>\n <option value=\"VR\">Verona</option>\n </optgroup>\n</mds-input-select>\n```\n\n#### Variant for Validation Feedback\n\nSet `variant` to one of the status values (`error`, `success`, `warning`, `info`) to communicate the validation outcome visually. Use this after a form submission or inline validation, not as decorative styling.\n\n```html\n<!-- Errore di validazione -->\n<mds-input-select name=\"tipologia\" variant=\"error\" required placeholder=\"Seleziona tipologia...\">\n <option value=\"A\">Tipo A</option>\n <option value=\"B\">Tipo B</option>\n</mds-input-select>\n\n<!-- Selezione valida confermata -->\n<mds-input-select name=\"tipologia\" variant=\"success\" value=\"A\">\n <option value=\"A\">Tipo A</option>\n <option value=\"B\">Tipo B</option>\n</mds-input-select>\n```\n\n#### Styling Customization\n\nCustomize the component only through its documented `--mds-input-select-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles ([`agents/color.md`](../../../../agents/color.md)) so dark mode and high-contrast modes continue to work correctly. `--mds-input-select-variant-color-rgb` takes a bare RGB triplet (`var(--magma-<role>)`, no `rgb()`); the other properties take a color (`rgb(var(--magma-<role>))`). `--mds-input-select-ring` is the ring at rest: on hover and focus the select draws its own 3px ring in the variant color, so the focus stays visible whatever the ring at rest, in dark mode and with more contrast too; change its color through `--mds-input-select-variant-color-rgb`.\n\n```css\n.sidebar-filter mds-input-select {\n --mds-input-select-variant-color-rgb: var(--magma-accent-emphasis);\n --mds-input-select-arrow-icon-hover-color: rgb(var(--magma-accent-fg));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--magma-accent-surface-hover));\n --mds-input-select-ring: 0 0 0 2px rgb(var(--magma-accent-emphasis) / 0.8);\n}\n```\n",
|
|
16214
16226
|
"3. Antipattern": "Common incorrect uses of `<mds-input-select>`. 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 Slot Non-Option Elements\n\nThe default slot is reserved for `<option>` and `<optgroup>` elements. The component clones slot children into the inner `<select>`; any other element is copied verbatim and makes the native select malformed.\n\n```html\n<!-- INCORRECT -->\n<mds-input-select name=\"categoria\">\n <div class=\"option-group\">\n <span>Notizie</span>\n <span>Eventi</span>\n </div>\n</mds-input-select>\n\n<!-- CORRECT -->\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona...\">\n <option value=\"news\">Notizie</option>\n <option value=\"eventi\">Eventi</option>\n</mds-input-select>\n```\n\n#### Do Not Listen to the Native `change` Event\n\n`<mds-input-select>` wraps a shadow-DOM `<select>`; the native `change` event does not bubble out of shadow DOM reliably. Always listen to the documented `mdsInputSelectChange` custom event instead.\n\n```html\n<!-- INCORRECT -->\n<mds-input-select id=\"sel\" name=\"tipo\"></mds-input-select>\n<script>\n document.getElementById('sel').addEventListener('change', (e) => {\n console.log(e.target.value); // may be undefined or stale\n });\n</script>\n\n<!-- CORRECT -->\n<mds-input-select id=\"sel\" name=\"tipo\"></mds-input-select>\n<script>\n document.getElementById('sel').addEventListener('mdsInputSelectChange', (e) => {\n console.log(e.detail.value);\n });\n</script>\n```\n\n#### Do Not Use `variant` for Decorative Styling\n\n`variant` maps to `ThemeStatusVariantType` (`error`, `success`, `warning`, `info`). It is meant to communicate a validation outcome, not to apply a brand color. Using a status variant to make the component visually match a section's color theme misleads users about the control's validation state.\n\n```html\n<!-- INCORRECT - using 'info' just for a blue accent -->\n<mds-input-select name=\"argomento\" variant=\"info\">\n <option value=\"A\">Argomento A</option>\n</mds-input-select>\n\n<!-- CORRECT - set variant only to reflect real validation state -->\n<mds-input-select name=\"argomento\" variant=\"error\" required placeholder=\"Obbligatorio\">\n <option value=\"A\">Argomento A</option>\n</mds-input-select>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Inner `<select>`\n\nThe supported customization surface is the documented `--mds-input-select-*` CSS custom properties and the two shadow parts (`select`, `tip-top`). Targeting internal elements with `>>>` or undocumented selectors couples your code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-select >>> select {\n font-size: 1rem;\n border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input-select {\n --mds-input-select-ring: 0 0 0 2px rgb(var(--magma-danger-emphasis));\n --mds-input-select-variant-color-rgb: var(--magma-danger-emphasis);\n}\nmds-input-select::part(select) {\n font-size: 1rem;\n}\n```\n\n#### Do Not Set `placeholder` When You Need a Real Default Selection\n\n`placeholder` injects an empty-value leading option that disappears from valid choices once `required` is set. If you want the component to open with a specific option pre-selected, use `value` or `default-value` instead.\n\n```html\n<!-- INCORRECT - a real value supplied as placeholder text -->\n<mds-input-select name=\"priorita\" placeholder=\"Media\">\n <option value=\"bassa\">Bassa</option>\n <option value=\"media\">Media</option>\n <option value=\"alta\">Alta</option>\n</mds-input-select>\n\n<!-- CORRECT - use value to pre-select a real option -->\n<mds-input-select name=\"priorita\" value=\"media\">\n <option value=\"bassa\">Bassa</option>\n <option value=\"media\">Media</option>\n <option value=\"alta\">Alta</option>\n</mds-input-select>\n```\n\n#### Do Not Replace with a Raw `<select>`\n\n`<mds-input-select>` provides theming, accessible status tips, form-reset integration, and dark/high-contrast support. Reaching for a plain `<select>` bypasses all of that and breaks visual consistency across themes.\n\n```html\n<!-- INCORRECT -->\n<select name=\"categoria\" class=\"form-select\">\n <option value=\"\">Seleziona...</option>\n <option value=\"A\">Categoria A</option>\n</select>\n\n<!-- CORRECT -->\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona...\">\n <option value=\"A\">Categoria A</option>\n</mds-input-select>\n```\n"
|
|
16215
16227
|
},
|
|
@@ -16834,7 +16846,7 @@
|
|
|
16834
16846
|
"mutable": true,
|
|
16835
16847
|
"attr": "checked",
|
|
16836
16848
|
"reflectToAttr": true,
|
|
16837
|
-
"docs": "Specifies that an
|
|
16849
|
+
"docs": "Specifies that an `<input>` element should be pre-selected\nwhen the page loads (for `type=\"checkbox\"` or `type=\"radio\"`)",
|
|
16838
16850
|
"docsTags": [],
|
|
16839
16851
|
"values": [
|
|
16840
16852
|
{
|
|
@@ -16967,7 +16979,7 @@
|
|
|
16967
16979
|
"mutable": false,
|
|
16968
16980
|
"attr": "name",
|
|
16969
16981
|
"reflectToAttr": true,
|
|
16970
|
-
"docs": "Specifies the name of an
|
|
16982
|
+
"docs": "Specifies the name of an `<input>` element",
|
|
16971
16983
|
"docsTags": [
|
|
16972
16984
|
{
|
|
16973
16985
|
"name": "default",
|
|
@@ -18167,7 +18179,7 @@
|
|
|
18167
18179
|
}
|
|
18168
18180
|
],
|
|
18169
18181
|
"usage": {
|
|
18170
|
-
"1. Description": "The `<mds-keyboard>` web component renders a keyboard shortcut as a row of physical-looking keycaps, acting as the compound parent for one or more slotted `<mds-keyboard-key>` children. It has no direct HTML equivalent; it visualizes a key combination (e.g. `Ctrl + C`) and can optionally let the user verify that combination by typing it.\n\n#### Semantic Behavior\n\n- **Default slot is the key sequence**: The component projects slotted `<mds-keyboard-key>` elements and automatically inserts a `+` separator between consecutive keys.\n- **Compound parent**: It reads each child key's `name` to build the expected combination; during a test the children are toggled to their `pressed` state.\n- **Test mode (`try`)**: When enabled the component appends a trigger button and a tooltip; clicking the button captures keystrokes and, at the first key
|
|
18182
|
+
"1. Description": "The `<mds-keyboard>` web component renders a keyboard shortcut as a row of physical-looking keycaps, acting as the compound parent for one or more slotted `<mds-keyboard-key>` children. It has no direct HTML equivalent; it visualizes a key combination (e.g. `Ctrl + C`) and can optionally let the user verify that combination by typing it.\n\n#### Semantic Behavior\n\n- **Default slot is the key sequence**: The component projects slotted `<mds-keyboard-key>` elements and automatically inserts a `+` separator between consecutive keys.\n- **Compound parent**: It reads each child key's `name` to build the expected combination; during a test the children are toggled to their `pressed` state.\n- **Test mode (`try`)**: When enabled the component appends a trigger button and a tooltip; clicking the button (or pressing Enter or Space on it) captures keystrokes and, at the first release of a key pressed during the test, compares the typed combination against the slotted keys, in any order. The release of the key that started the test is not part of it.\n- **Result feedback**: A pass shows a \"done\" icon, a fail shows a \"close\" icon, and the tooltip surfaces the localized success or error message; the outcome is also reflected on the host via the `test` attribute.\n- **Localization**: Trigger label, tooltip copy, and error messages resolve through the locale system (el/en/es/it).\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders from [`agents/variants.md`](../../../../agents/variants.md).\n\n#### Other behavioral props\n\n- **`try`** opts the keyboard into interactive verification mode. Enable it only when you want the user to be able to confirm a shortcut by typing it; leave it unset for a purely presentational shortcut display.\n- **`test`** reflects the verification outcome (`'pass'` / `'fail'`) onto the host. It is primarily driven by the test flow and is mainly useful as a styling/state hook rather than a value you set yourself.\n",
|
|
18171
18183
|
"2. Pattern": "Correct and idiomatic ways to use the `<mds-keyboard>` 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#### Single Key Display\n\nThe simplest use: one `<mds-keyboard-key>` child inside `<mds-keyboard>`. The `name` attribute selects a key from the built-in key dictionary; the component renders the physical-looking keycap with the key's alias (e.g. `F1`, `Ctrl`).\n\n```html\n<mds-keyboard>\n <mds-keyboard-key name=\"f1\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Multi-Key Shortcut Combination\n\nSlot two or more `<mds-keyboard-key>` elements. The component automatically inserts a `+` separator between consecutive keys, so you never need to add it manually.\n\n```html\n<mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Specifying Key Side (Left / Right Modifier)\n\nUse the side-specific `name` values (`controlleft`, `controlright`, `shiftleft`, `shiftright`, `commandleft`, `commandright`, etc.) when the shortcut must be typed with a specific hand. The keycap renders a small positional indicator.\n\n```html\n<!-- Only the left Shift key is accepted during a test -->\n<mds-keyboard try>\n <mds-keyboard-key name=\"shiftleft\"></mds-keyboard-key>\n <mds-keyboard-key name=\"d\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Interactive Verification Mode (`try`)\n\nAdd the `try` attribute to let the user confirm the shortcut by typing it. A trigger button appears; clicking it puts the component into capture mode. The keys can be pressed in any order, all held down together: at the first key release the component reflects the outcome (`pass` / `fail`) on the `test` attribute and shows a localized tooltip.\n\n```html\n<mds-keyboard try>\n <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Shortcut Reference Table\n\nEmbed `<mds-keyboard>` inside a `<mds-table>` to build a keyboard-shortcut reference sheet. Each row pairs the visual shortcut with its description.\n\n```html\n<mds-table>\n <mds-table-header>\n <mds-table-header-cell label=\"Combinazione\"></mds-table-header-cell>\n <mds-table-header-cell label=\"Azione\"></mds-table-header-cell>\n </mds-table-header>\n <mds-table-body>\n <mds-table-row>\n <mds-table-cell>\n <mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n </mds-keyboard>\n </mds-table-cell>\n <mds-table-cell><mds-text>Copia</mds-text></mds-table-cell>\n </mds-table-row>\n <mds-table-row>\n <mds-table-cell>\n <mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"v\"></mds-keyboard-key>\n </mds-keyboard>\n </mds-table-cell>\n <mds-table-cell><mds-text>Incolla</mds-text></mds-table-cell>\n </mds-table-row>\n <mds-table-row>\n <mds-table-cell>\n <mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n </mds-keyboard>\n </mds-table-cell>\n <mds-table-cell><mds-text>Annulla</mds-text></mds-table-cell>\n </mds-table-row>\n </mds-table-body>\n</mds-table>\n```\n\n#### Reading the `test` Outcome Attribute\n\nWhen `try` is set the `test` attribute is reflected onto the host as `\"pass\"` or `\"fail\"` after each attempt. Use it as a CSS attribute selector, or observe the attribute from JavaScript to drive follow-on UI (the component emits no event).\n\n```html\n<mds-keyboard id=\"shortcut-ctrl-s\" try>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n```javascript\nconst keyboard = document.querySelector('#shortcut-ctrl-s');\nnew MutationObserver(() => {\n if (keyboard.getAttribute('test') === 'pass') {\n console.log('Combinazione corretta!');\n }\n}).observe(keyboard, { attributes: true, attributeFilter: ['test'] });\n```\n\n#### Styling Customization\n\nAdjust colors and lighting only through the documented `--mds-keyboard-*` CSS custom properties. Use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode continues to work.\n\n```css\n.custom-keyboard mds-keyboard {\n --mds-keyboard-background: rgb(var(--magma-surface-inverse));\n --mds-keyboard-color: rgb(var(--magma-on-inverse));\n --mds-keyboard-key-background: rgb(var(--magma-surface-inverse-muted));\n --mds-keyboard-padding: calc(var(--spacing) * 300);\n}\n```\n",
|
|
18172
18184
|
"3. Antipattern": "Common incorrect uses of `<mds-keyboard>`. 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 Slot Raw Text or `<kbd>` Elements\n\nThe default slot expects `<mds-keyboard-key>` children only. Slotting plain text, `<kbd>`, or other HTML breaks the separator injection logic and the test-mode key matching.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n <kbd>Ctrl</kbd>\n <kbd>S</kbd>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Add `+` Separators Manually\n\nThe component inserts a styled `+` between consecutive keys automatically. Adding your own separator duplicates it and breaks the visual rhythm.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <span>+</span>\n <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Set `try=\"false\"` to Disable Test Mode\n\n`try` is a boolean attribute: remove it (or leave it unset) to keep the component in display-only mode. A string value is fragile: `\"false\"` is read as `false` on this component, but the attribute stays on the element until the component renders (attribute selectors and scripts reading it see it set). Never write a boolean as a string.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard try=\"false\">\n <mds-keyboard-key name=\"escape\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n <mds-keyboard-key name=\"escape\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Set `test` as a Static Attribute to Signal State\n\n`test` is a reflected output prop driven by the component's own verification flow. Setting it as a static HTML attribute paints the pass / fail state without any attempt behind it, and the next attempt overwrites it.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard test=\"pass\">\n <mds-keyboard-key name=\"enter\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard try>\n <mds-keyboard-key name=\"enter\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Use `<mds-keyboard-key>` Outside `<mds-keyboard>`\n\n`<mds-keyboard-key>` is a compound child and communicates with the parent via the Stencil DOM tree. Rendering it standalone loses the compound layout, the `+` separator, and test-mode driven `pressed` toggling.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard-key name=\"tab\"></mds-keyboard-key>\n\n<!-- CORRECT -->\n<mds-keyboard>\n <mds-keyboard-key name=\"tab\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Customize Colors with Raw CSS Values Instead of Tokens\n\nSetting `--mds-keyboard-background` or `--mds-keyboard-key-background` to a raw hex or `rgba()` literal bypasses the palette layer and breaks dark mode. Always use a semantic color role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)).\n\n```css\n/* INCORRECT */\nmds-keyboard {\n --mds-keyboard-background: #1a1a2e;\n --mds-keyboard-key-background: #16213e;\n}\n\n/* CORRECT */\nmds-keyboard {\n --mds-keyboard-background: rgb(var(--magma-surface-inverse));\n --mds-keyboard-key-background: rgb(var(--magma-surface-inverse-muted));\n}\n```\n"
|
|
18173
18185
|
},
|
|
@@ -19427,6 +19439,404 @@
|
|
|
19427
19439
|
]
|
|
19428
19440
|
}
|
|
19429
19441
|
},
|
|
19442
|
+
{
|
|
19443
|
+
"filePath": "src/components/mds-link/mds-link.tsx",
|
|
19444
|
+
"encapsulation": "shadow",
|
|
19445
|
+
"tag": "mds-link",
|
|
19446
|
+
"readme": "# mds-link\n",
|
|
19447
|
+
"docs": "",
|
|
19448
|
+
"docsTags": [
|
|
19449
|
+
{
|
|
19450
|
+
"name": "slot",
|
|
19451
|
+
"text": "- Add `text string` to this slot, the text of the link when `label` is not set; **avoid** to add `HTML elements` or `components` here."
|
|
19452
|
+
},
|
|
19453
|
+
{
|
|
19454
|
+
"name": "part",
|
|
19455
|
+
"text": "link - The element that carries the link and the focus: an anchor with `href`, an inline button without it"
|
|
19456
|
+
},
|
|
19457
|
+
{
|
|
19458
|
+
"name": "part",
|
|
19459
|
+
"text": "icon - The icon of the link"
|
|
19460
|
+
}
|
|
19461
|
+
],
|
|
19462
|
+
"usage": {
|
|
19463
|
+
"1. Description": "The `<mds-link>` web component is the inline link of Magma: a word or a phrase inside running text, usually inside an `<mds-text>`, that opens a URL or runs an inline action. It replaces a raw `<a>` styled by hand, so links look and behave the same in every app, focus ring included.\n\n#### Semantic Behavior\n\n- **A word of the sentence**: the host is inline and has no typography of its own. It takes the font of the text around it (family, size, weight, line height, letter spacing), whatever the `typography` of the `<mds-text>` it sits in, and wraps across lines with the rest of the text.\n- **A real anchor with `href`**: the link is an `<a href>` in the shadow root, and it is the element that takes the focus. The browser gives it what it gives every link: a new tab on a modifier or middle click, the context menu, drag. A click listener on the host can cancel the navigation with `preventDefault()`, and a client-side router registered with `NavigationService.setHandler()` (from `@maggioli-design-system/magma/services`) takes the plain clicks over. A `click()` from a script follows the link too, unless a listener cancels it.\n- **An inline button without `href`**: the link becomes an element with `role=\"button\"` in the tab order; a click, Enter and Space each fire one native `click` on the host. It never submits the form it sits in. It is not a native `<button>`, which cannot wrap across lines.\n- **New tab**: `target=\"blank\"` opens the URL in a new tab without giving it access to the page (`rel=\"noopener noreferrer\"`) and adds a hidden \"(opens in a new tab)\", in the language of the page, to the name the assistive technology reads. No icon is added: pick one with `icon` if the design wants it.\n- **Icon**: `icon` draws an icon, hidden from the assistive technology, sized by `--mds-link-icon-size` (a step of the spacing scale, the same in every typography). It stays on the line of the word next to it: it never wraps to a line of its own.\n- **Underline always visible**: the underline is what tells the link from the text without its color (WCAG 1.4.1), so every style keeps one, and its weight never changes. Under the pointer every link fills with a faint background that rises from the bottom, and a `weak` one also gives its line the whole color; under high contrast the tints take the full color.\n\n#### Properties & Visual Configurations\n\n- **`href`** decides what the link is: with it, a link to a page; without it, an inline action that the host's `click` listener runs. Navigation always goes through `href`, never through a click handler that changes the location.\n- **`label`** sets the text of the link; without it the link shows its default slot, which is the usual form in running text.\n- **`variant`** sets the color: `primary` (the default) paints the link with the accent, the color of links and actions on a neutral surface; `inherit` takes the color of the text around it, for a link on a colored surface (a status message, a filled banner), where the accent would lose contrast.\n- **`underline`** sets the style of the underline:\n - `solid` (the default): a thin line;\n - `dotted`: a dotted line;\n - `marker`: a tinted band under the text, lighter with `weak`, which rises under the pointer to fill the line like a highlighter, with the same faint background in both tones.\n- **`tone`** sets how much of the color the line takes: `strong` (the default) the whole color; `weak` a light tint of it, which steps back in a text dense with links and takes the whole color under the pointer. The text of the link keeps the whole color in both tones.\n- **`icon-position`** puts the icon after the text (`right`, the default: an external link, a download, a forward arrow) or before it (`left`: a back arrow).\n",
|
|
19464
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-link>` 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#### A Link Inside a Sentence\n\nThe canonical form: the link sits in the default slot of an `<mds-text>`, with its text in its own default slot, and takes the font of the paragraph.\n\n```html\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa sulla privacy</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Any Typography\n\nThe link has no typography of its own: the same markup works in a caption, a title or the reading variant.\n\n```html\n<mds-text typography=\"caption\">\n Fonte: <mds-link href=\"/report\">rapporto annuale 2025</mds-link>\n</mds-text>\n<mds-text typography=\"paragraph\" variant=\"read\">\n Il testo completo e' nell'<mds-link href=\"/regolamento\">allegato A</mds-link>.\n</mds-text>\n```\n\n#### An Inline Action\n\nWithout `href` the link is an inline button: listen for `click` on the host, which a click, Enter and Space all fire.\n\n```html\n<mds-text typography=\"paragraph\">\n Non trovi quello che cerchi? <mds-link id=\"help\">Chiedi aiuto</mds-link> al supporto.\n</mds-text>\n\n<script>\n document.getElementById('help').addEventListener('click', () => openHelp());\n</script>\n```\n\n#### A Link That Opens a New Tab\n\nWith `target=\"blank\"` the component adds `rel=\"noopener noreferrer\"` and tells the assistive technology the link opens a new tab; the icon is a choice of the design.\n\n```html\n<mds-text typography=\"detail\">\n Consulta il\n <mds-link href=\"https://example.com/report.pdf\" target=\"blank\" icon=\"mi/baseline/open-in-new\">rapporto completo</mds-link>.\n</mds-text>\n```\n\n#### An Icon Before the Text\n\nUse `icon-position=\"left\"` for an icon that leads, such as a back arrow.\n\n```html\n<mds-text typography=\"paragraph\">\n <mds-link href=\"/indice\" icon=\"mi/baseline/arrow-back\" icon-position=\"left\">Torna all'indice</mds-link>\n</mds-text>\n```\n\n#### A Link on a Colored Surface\n\nOn a status or filled surface the accent loses contrast: `variant=\"inherit\"` takes the color of the text, and the underline still marks the link.\n\n```html\n<mds-banner variant=\"error\" headline=\"Pagamento rifiutato\">\n <mds-text typography=\"detail\">\n <mds-link href=\"/carta\" variant=\"inherit\">Aggiorna la carta</mds-link> per riprovare.\n </mds-text>\n</mds-banner>\n```\n\n#### Routing in a Single-Page App\n\nRegister the router once: plain clicks on every `mds-link` (and `mds-button` with `href`) go to it, with the browser navigation already cancelled; modifier clicks, other origins and `target=\"blank\"` stay with the browser.\n\n```javascript\nimport { NavigationService } from '@maggioli-design-system/magma/services';\n\nNavigationService.setHandler((href) => router.push(href));\n```\n\n#### Styling Customization\n\nChange the color through `--mds-link-color`, with a semantic role, so dark mode, named themes and high contrast keep working - see [`agents/color.md`](../../../../agents/color.md).\n\n```css\n.legal-note mds-link {\n --mds-link-color: rgb(var(--magma-text-muted));\n}\n```\n",
|
|
19465
|
+
"3. Antipattern": "Common incorrect uses of `<mds-link>`. 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 `mds-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word that links belongs to `mds-link`.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Use `mds-link` for a Standalone Action\n\nA call to action, a form submit or a step of a flow is a control, not a word of a sentence: it needs the size, the variants and the form participation of `mds-button`.\n\n```html\n<!-- INCORRECT -->\n<form>\n <mds-link>Invia la richiesta</mds-link>\n</form>\n\n<!-- CORRECT -->\n<form>\n <mds-button type=\"submit\" label=\"Invia la richiesta\"></mds-button>\n</form>\n```\n\n#### Do Not Navigate From a Click Handler\n\nA link without `href` is a button for the browser: no new tab on a modifier click, no context menu, no address to copy, and the assistive technology announces a button. Give the URL to `href`.\n\n```html\n<!-- INCORRECT -->\n<mds-link onclick=\"location.href = '/privacy'\">informativa</mds-link>\n\n<!-- CORRECT -->\n<mds-link href=\"/privacy\">informativa</mds-link>\n```\n\n#### Do Not Style a Raw Anchor Inside `mds-text`\n\nA hand-styled `<a>` drifts from app to app in color, underline and hover, and usually loses the focus ring.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<a href=\"/privacy\" class=\"text-accent-fg underline\">informativa</a>.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa</mds-link>.\n</mds-text>\n```\n\n#### Do Not Write the New-Tab Notice Yourself\n\nWith `target=\"blank\"` the component already tells the assistive technology the link opens a new tab, in the language of the page: a notice in the text is read twice.\n\n```html\n<!-- INCORRECT -->\n<mds-link href=\"/report.pdf\" target=\"blank\">Rapporto (si apre in una nuova scheda)</mds-link>\n\n<!-- CORRECT -->\n<mds-link href=\"/report.pdf\" target=\"blank\">Rapporto</mds-link>\n```\n\n#### Do Not Remove the Underline\n\nWithout the underline the link is told from the text only by its color, which fails users who cannot see it (WCAG 1.4.1). For a quieter line, lower the `tone`.\n\n```css\n/* INCORRECT */\nmds-link::part(link) {\n text-decoration: none;\n}\n\n/* CORRECT */\n/* <mds-link href=\"/privacy\" tone=\"weak\">informativa</mds-link> */\n```\n"
|
|
19466
|
+
},
|
|
19467
|
+
"props": [
|
|
19468
|
+
{
|
|
19469
|
+
"name": "href",
|
|
19470
|
+
"type": "string | undefined",
|
|
19471
|
+
"complexType": {
|
|
19472
|
+
"original": "string",
|
|
19473
|
+
"resolved": "string | undefined",
|
|
19474
|
+
"references": {}
|
|
19475
|
+
},
|
|
19476
|
+
"mutable": false,
|
|
19477
|
+
"attr": "href",
|
|
19478
|
+
"reflectToAttr": true,
|
|
19479
|
+
"docs": "The URL of the link: a real anchor in its shadow root, so the browser gives it what it gives\nevery link (new tab on a modifier or middle click, the context menu, drag). A client-side\nrouter takes the plain clicks over once registered with `NavigationService.setHandler()`\n(from `@maggioli-design-system/magma/services`); without one, a click listener on the host can\nstill cancel the navigation with `preventDefault()`. Without `href` the link is an inline\nbutton: it answers to click, Enter and Space with a `click` event and never submits a form.",
|
|
19480
|
+
"docsTags": [],
|
|
19481
|
+
"values": [
|
|
19482
|
+
{
|
|
19483
|
+
"type": "string"
|
|
19484
|
+
},
|
|
19485
|
+
{
|
|
19486
|
+
"type": "undefined"
|
|
19487
|
+
}
|
|
19488
|
+
],
|
|
19489
|
+
"optional": true,
|
|
19490
|
+
"required": false,
|
|
19491
|
+
"getter": false,
|
|
19492
|
+
"setter": false
|
|
19493
|
+
},
|
|
19494
|
+
{
|
|
19495
|
+
"name": "icon",
|
|
19496
|
+
"type": "string | undefined",
|
|
19497
|
+
"complexType": {
|
|
19498
|
+
"original": "string",
|
|
19499
|
+
"resolved": "string | undefined",
|
|
19500
|
+
"references": {}
|
|
19501
|
+
},
|
|
19502
|
+
"mutable": false,
|
|
19503
|
+
"attr": "icon",
|
|
19504
|
+
"reflectToAttr": true,
|
|
19505
|
+
"docs": "The icon displayed in the link",
|
|
19506
|
+
"docsTags": [],
|
|
19507
|
+
"values": [
|
|
19508
|
+
{
|
|
19509
|
+
"type": "string"
|
|
19510
|
+
},
|
|
19511
|
+
{
|
|
19512
|
+
"type": "undefined"
|
|
19513
|
+
}
|
|
19514
|
+
],
|
|
19515
|
+
"optional": true,
|
|
19516
|
+
"required": false,
|
|
19517
|
+
"getter": false,
|
|
19518
|
+
"setter": false
|
|
19519
|
+
},
|
|
19520
|
+
{
|
|
19521
|
+
"name": "iconPosition",
|
|
19522
|
+
"type": "\"left\" | \"right\" | undefined",
|
|
19523
|
+
"complexType": {
|
|
19524
|
+
"original": "ButtonIconPositionType",
|
|
19525
|
+
"resolved": "\"left\" | \"right\" | undefined",
|
|
19526
|
+
"references": {
|
|
19527
|
+
"ButtonIconPositionType": {
|
|
19528
|
+
"location": "import",
|
|
19529
|
+
"path": "@type/button",
|
|
19530
|
+
"id": "src/type/button.ts::ButtonIconPositionType",
|
|
19531
|
+
"referenceLocation": "ButtonIconPositionType"
|
|
19532
|
+
}
|
|
19533
|
+
}
|
|
19534
|
+
},
|
|
19535
|
+
"mutable": false,
|
|
19536
|
+
"attr": "icon-position",
|
|
19537
|
+
"reflectToAttr": true,
|
|
19538
|
+
"docs": "Specifies the horizontal position of the icon, which never wraps to a line of its own",
|
|
19539
|
+
"docsTags": [
|
|
19540
|
+
{
|
|
19541
|
+
"name": "default",
|
|
19542
|
+
"text": "'right'"
|
|
19543
|
+
}
|
|
19544
|
+
],
|
|
19545
|
+
"default": "'right'",
|
|
19546
|
+
"values": [
|
|
19547
|
+
{
|
|
19548
|
+
"value": "left",
|
|
19549
|
+
"type": "string"
|
|
19550
|
+
},
|
|
19551
|
+
{
|
|
19552
|
+
"value": "right",
|
|
19553
|
+
"type": "string"
|
|
19554
|
+
},
|
|
19555
|
+
{
|
|
19556
|
+
"type": "undefined"
|
|
19557
|
+
}
|
|
19558
|
+
],
|
|
19559
|
+
"optional": true,
|
|
19560
|
+
"required": false,
|
|
19561
|
+
"getter": false,
|
|
19562
|
+
"setter": false
|
|
19563
|
+
},
|
|
19564
|
+
{
|
|
19565
|
+
"name": "label",
|
|
19566
|
+
"type": "string | undefined",
|
|
19567
|
+
"complexType": {
|
|
19568
|
+
"original": "string",
|
|
19569
|
+
"resolved": "string | undefined",
|
|
19570
|
+
"references": {}
|
|
19571
|
+
},
|
|
19572
|
+
"mutable": false,
|
|
19573
|
+
"attr": "label",
|
|
19574
|
+
"reflectToAttr": true,
|
|
19575
|
+
"docs": "The text of the link; without it, the text of the default slot",
|
|
19576
|
+
"docsTags": [],
|
|
19577
|
+
"values": [
|
|
19578
|
+
{
|
|
19579
|
+
"type": "string"
|
|
19580
|
+
},
|
|
19581
|
+
{
|
|
19582
|
+
"type": "undefined"
|
|
19583
|
+
}
|
|
19584
|
+
],
|
|
19585
|
+
"optional": true,
|
|
19586
|
+
"required": false,
|
|
19587
|
+
"getter": false,
|
|
19588
|
+
"setter": false
|
|
19589
|
+
},
|
|
19590
|
+
{
|
|
19591
|
+
"name": "target",
|
|
19592
|
+
"type": "\"blank\" | \"self\"",
|
|
19593
|
+
"complexType": {
|
|
19594
|
+
"original": "ButtonTargetType",
|
|
19595
|
+
"resolved": "\"blank\" | \"self\"",
|
|
19596
|
+
"references": {
|
|
19597
|
+
"ButtonTargetType": {
|
|
19598
|
+
"location": "import",
|
|
19599
|
+
"path": "@type/button",
|
|
19600
|
+
"id": "src/type/button.ts::ButtonTargetType",
|
|
19601
|
+
"referenceLocation": "ButtonTargetType"
|
|
19602
|
+
}
|
|
19603
|
+
}
|
|
19604
|
+
},
|
|
19605
|
+
"mutable": false,
|
|
19606
|
+
"attr": "target",
|
|
19607
|
+
"reflectToAttr": false,
|
|
19608
|
+
"docs": "Specifies the target of the URL, if self or blank: blank opens a new tab, without giving it\naccess to the page (`rel=\"noopener noreferrer\"`), and tells the assistive technology so",
|
|
19609
|
+
"docsTags": [
|
|
19610
|
+
{
|
|
19611
|
+
"name": "default",
|
|
19612
|
+
"text": "'self'"
|
|
19613
|
+
}
|
|
19614
|
+
],
|
|
19615
|
+
"default": "'self'",
|
|
19616
|
+
"values": [
|
|
19617
|
+
{
|
|
19618
|
+
"value": "blank",
|
|
19619
|
+
"type": "string"
|
|
19620
|
+
},
|
|
19621
|
+
{
|
|
19622
|
+
"value": "self",
|
|
19623
|
+
"type": "string"
|
|
19624
|
+
}
|
|
19625
|
+
],
|
|
19626
|
+
"optional": false,
|
|
19627
|
+
"required": false,
|
|
19628
|
+
"getter": false,
|
|
19629
|
+
"setter": false
|
|
19630
|
+
},
|
|
19631
|
+
{
|
|
19632
|
+
"name": "tone",
|
|
19633
|
+
"type": "\"strong\" | \"weak\" | undefined",
|
|
19634
|
+
"complexType": {
|
|
19635
|
+
"original": "ToneMinimalVariantType",
|
|
19636
|
+
"resolved": "\"strong\" | \"weak\" | undefined",
|
|
19637
|
+
"references": {
|
|
19638
|
+
"ToneMinimalVariantType": {
|
|
19639
|
+
"location": "import",
|
|
19640
|
+
"path": "@type/tone",
|
|
19641
|
+
"id": "src/type/tone.ts::ToneMinimalVariantType",
|
|
19642
|
+
"referenceLocation": "ToneMinimalVariantType"
|
|
19643
|
+
}
|
|
19644
|
+
}
|
|
19645
|
+
},
|
|
19646
|
+
"mutable": false,
|
|
19647
|
+
"attr": "tone",
|
|
19648
|
+
"reflectToAttr": true,
|
|
19649
|
+
"docs": "Specifies the tone of the underline: `strong` draws it in the color of the link, `weak` in\na tint of it, which takes the full color under the pointer",
|
|
19650
|
+
"docsTags": [
|
|
19651
|
+
{
|
|
19652
|
+
"name": "default",
|
|
19653
|
+
"text": "'strong'"
|
|
19654
|
+
}
|
|
19655
|
+
],
|
|
19656
|
+
"default": "'strong'",
|
|
19657
|
+
"values": [
|
|
19658
|
+
{
|
|
19659
|
+
"value": "strong",
|
|
19660
|
+
"type": "string"
|
|
19661
|
+
},
|
|
19662
|
+
{
|
|
19663
|
+
"value": "weak",
|
|
19664
|
+
"type": "string"
|
|
19665
|
+
},
|
|
19666
|
+
{
|
|
19667
|
+
"type": "undefined"
|
|
19668
|
+
}
|
|
19669
|
+
],
|
|
19670
|
+
"optional": true,
|
|
19671
|
+
"required": false,
|
|
19672
|
+
"getter": false,
|
|
19673
|
+
"setter": false
|
|
19674
|
+
},
|
|
19675
|
+
{
|
|
19676
|
+
"name": "underline",
|
|
19677
|
+
"type": "\"dotted\" | \"marker\" | \"solid\" | undefined",
|
|
19678
|
+
"complexType": {
|
|
19679
|
+
"original": "LinkUnderlineType",
|
|
19680
|
+
"resolved": "\"dotted\" | \"marker\" | \"solid\" | undefined",
|
|
19681
|
+
"references": {
|
|
19682
|
+
"LinkUnderlineType": {
|
|
19683
|
+
"location": "import",
|
|
19684
|
+
"path": "./meta/types",
|
|
19685
|
+
"id": "src/components/mds-link/meta/types.ts::LinkUnderlineType",
|
|
19686
|
+
"referenceLocation": "LinkUnderlineType"
|
|
19687
|
+
}
|
|
19688
|
+
}
|
|
19689
|
+
},
|
|
19690
|
+
"mutable": false,
|
|
19691
|
+
"attr": "underline",
|
|
19692
|
+
"reflectToAttr": true,
|
|
19693
|
+
"docs": "Specifies the style of the underline, which is always visible",
|
|
19694
|
+
"docsTags": [
|
|
19695
|
+
{
|
|
19696
|
+
"name": "default",
|
|
19697
|
+
"text": "'solid'"
|
|
19698
|
+
}
|
|
19699
|
+
],
|
|
19700
|
+
"default": "'solid'",
|
|
19701
|
+
"values": [
|
|
19702
|
+
{
|
|
19703
|
+
"value": "dotted",
|
|
19704
|
+
"type": "string"
|
|
19705
|
+
},
|
|
19706
|
+
{
|
|
19707
|
+
"value": "marker",
|
|
19708
|
+
"type": "string"
|
|
19709
|
+
},
|
|
19710
|
+
{
|
|
19711
|
+
"value": "solid",
|
|
19712
|
+
"type": "string"
|
|
19713
|
+
},
|
|
19714
|
+
{
|
|
19715
|
+
"type": "undefined"
|
|
19716
|
+
}
|
|
19717
|
+
],
|
|
19718
|
+
"optional": true,
|
|
19719
|
+
"required": false,
|
|
19720
|
+
"getter": false,
|
|
19721
|
+
"setter": false
|
|
19722
|
+
},
|
|
19723
|
+
{
|
|
19724
|
+
"name": "variant",
|
|
19725
|
+
"type": "\"inherit\" | \"primary\" | undefined",
|
|
19726
|
+
"complexType": {
|
|
19727
|
+
"original": "LinkVariantType",
|
|
19728
|
+
"resolved": "\"inherit\" | \"primary\" | undefined",
|
|
19729
|
+
"references": {
|
|
19730
|
+
"LinkVariantType": {
|
|
19731
|
+
"location": "import",
|
|
19732
|
+
"path": "./meta/types",
|
|
19733
|
+
"id": "src/components/mds-link/meta/types.ts::LinkVariantType",
|
|
19734
|
+
"referenceLocation": "LinkVariantType"
|
|
19735
|
+
}
|
|
19736
|
+
}
|
|
19737
|
+
},
|
|
19738
|
+
"mutable": false,
|
|
19739
|
+
"attr": "variant",
|
|
19740
|
+
"reflectToAttr": true,
|
|
19741
|
+
"docs": "Specifies the color of the link: `primary` paints it with the accent, `inherit` takes the\ncolor of the text around it, for a link on a colored surface",
|
|
19742
|
+
"docsTags": [
|
|
19743
|
+
{
|
|
19744
|
+
"name": "default",
|
|
19745
|
+
"text": "'primary'"
|
|
19746
|
+
}
|
|
19747
|
+
],
|
|
19748
|
+
"default": "'primary'",
|
|
19749
|
+
"values": [
|
|
19750
|
+
{
|
|
19751
|
+
"value": "inherit",
|
|
19752
|
+
"type": "string"
|
|
19753
|
+
},
|
|
19754
|
+
{
|
|
19755
|
+
"value": "primary",
|
|
19756
|
+
"type": "string"
|
|
19757
|
+
},
|
|
19758
|
+
{
|
|
19759
|
+
"type": "undefined"
|
|
19760
|
+
}
|
|
19761
|
+
],
|
|
19762
|
+
"optional": true,
|
|
19763
|
+
"required": false,
|
|
19764
|
+
"getter": false,
|
|
19765
|
+
"setter": false
|
|
19766
|
+
}
|
|
19767
|
+
],
|
|
19768
|
+
"methods": [],
|
|
19769
|
+
"events": [],
|
|
19770
|
+
"listeners": [],
|
|
19771
|
+
"styles": [
|
|
19772
|
+
{
|
|
19773
|
+
"name": "--mds-link-background-hover",
|
|
19774
|
+
"annotation": "prop",
|
|
19775
|
+
"docs": "The background that fills the link from the bottom under the pointer."
|
|
19776
|
+
},
|
|
19777
|
+
{
|
|
19778
|
+
"name": "--mds-link-color",
|
|
19779
|
+
"annotation": "prop",
|
|
19780
|
+
"docs": "The color of the text, the underline and the icon of the link."
|
|
19781
|
+
},
|
|
19782
|
+
{
|
|
19783
|
+
"name": "--mds-link-icon-gap",
|
|
19784
|
+
"annotation": "prop",
|
|
19785
|
+
"docs": "The distance between the icon and the text."
|
|
19786
|
+
},
|
|
19787
|
+
{
|
|
19788
|
+
"name": "--mds-link-icon-size",
|
|
19789
|
+
"annotation": "prop",
|
|
19790
|
+
"docs": "The size of the icon."
|
|
19791
|
+
},
|
|
19792
|
+
{
|
|
19793
|
+
"name": "--mds-link-transition-duration",
|
|
19794
|
+
"annotation": "prop",
|
|
19795
|
+
"docs": "The duration of the background filling the link under the pointer, and of the focus ring closing in on it."
|
|
19796
|
+
},
|
|
19797
|
+
{
|
|
19798
|
+
"name": "--mds-link-underline-color",
|
|
19799
|
+
"annotation": "prop",
|
|
19800
|
+
"docs": "The color of the underline, of which tone `weak` takes a tint; the tint of the band with the `marker` style."
|
|
19801
|
+
},
|
|
19802
|
+
{
|
|
19803
|
+
"name": "--mds-link-underline-offset",
|
|
19804
|
+
"annotation": "prop",
|
|
19805
|
+
"docs": "The distance between the text and the underline."
|
|
19806
|
+
},
|
|
19807
|
+
{
|
|
19808
|
+
"name": "--mds-link-underline-thickness",
|
|
19809
|
+
"annotation": "prop",
|
|
19810
|
+
"docs": "The thickness of the underline, thicker for the `dotted` style, the height of the band with the `marker` style."
|
|
19811
|
+
}
|
|
19812
|
+
],
|
|
19813
|
+
"slots": [
|
|
19814
|
+
{
|
|
19815
|
+
"name": "",
|
|
19816
|
+
"docs": "Add `text string` to this slot, the text of the link when `label` is not set; **avoid** to add `HTML elements` or `components` here."
|
|
19817
|
+
}
|
|
19818
|
+
],
|
|
19819
|
+
"parts": [
|
|
19820
|
+
{
|
|
19821
|
+
"name": "icon",
|
|
19822
|
+
"docs": "The icon of the link"
|
|
19823
|
+
},
|
|
19824
|
+
{
|
|
19825
|
+
"name": "link",
|
|
19826
|
+
"docs": "The element that carries the link and the focus: an anchor with `href`, an inline button without it"
|
|
19827
|
+
}
|
|
19828
|
+
],
|
|
19829
|
+
"states": [],
|
|
19830
|
+
"dependents": [],
|
|
19831
|
+
"dependencies": [
|
|
19832
|
+
"mds-icon"
|
|
19833
|
+
],
|
|
19834
|
+
"dependencyGraph": {
|
|
19835
|
+
"mds-link": [
|
|
19836
|
+
"mds-icon"
|
|
19837
|
+
]
|
|
19838
|
+
}
|
|
19839
|
+
},
|
|
19430
19840
|
{
|
|
19431
19841
|
"filePath": "src/components/mds-list/mds-list.tsx",
|
|
19432
19842
|
"encapsulation": "shadow",
|
|
@@ -29779,9 +30189,9 @@
|
|
|
29779
30189
|
}
|
|
29780
30190
|
],
|
|
29781
30191
|
"usage": {
|
|
29782
|
-
"1. Description": "The `<mds-text>` web component is the foundational typography primitive of the Magma Design System. It decouples the _semantic typography role_ of a piece of text from the _HTML element_ that renders it, replacing raw heading, paragraph, label and inline tags (`<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, `<code>`, ...) with a single design-tokenized text node that is consumed internally by nearly every other Magma component.\n\n#### Semantic Behavior\n\n- **Typography drives the rendered tag**: when `tag` is left unset, a sensible default element is resolved from the chosen `typography` (e.g. `typography=\"h2\"` -> `<h2>`, `paragraph`/`detail` -> `<p>`, `label`/`option` -> `<label>`, `snippet`/`hack` -> `<code>`, `tip` -> `<div>`). Setting `tag` explicitly overrides this.\n- **Semantics vs. visual style are independent**: `typography` controls the visual ramp and the default element, but you may pin any allowed `tag` to keep the correct document outline (accessibility) while choosing a different visual scale.\n- **Text source is slot or prop**: text is normally provided through the default slot. Passing the `text` prop renders that string instead of the slotted content - required for the animation path, since the animation watches the `text` value.\n- **Default-slot is text only**: the default slot is intended for a plain text string; HTML elements or other components should not be slotted in.\n- **Animated reveal**: with `animation=\"yugop\"` the component runs a randomized character \"decode\" reveal whenever the `text` prop changes after load (the initial value is rendered as is); `animation=\"none\"` (the default) skips all animation. The revealed string is always painted as text, never parsed as HTML.\n- **Animation tuning via CSS**: the yugop reveal reads `--mds-text-animation-speed` and `--mds-text-animation-placeholder-char`, so speed and placeholder glyph are themeable through CSS custom properties rather than props. They are read each time a reveal starts, so a value changed after load applies to the next reveal. The placeholder is one character (a longer string keeps its first one); a speed that is not a positive number, or an empty placeholder, falls back to the defaults (`0.5` and a space).\n\n#### Properties & Visual Configurations\n\n- **`typography`** selects the semantic text role from the shared typography ramp (titles `h1`-`h6` and `action`; informational `detail`, `paragraph`, `caption`, `label`, `option`, `tip`; monospaced `snippet`, `hack`). It is the primary prop and also determines the default rendered tag. Defaults to `'detail'`.\n- **`variant`** refines the _tone of a typography role_ and is specific to this component - it is the typography variation (`'title'`, `'info'`, `'read'`, `'code'`), not the shared component tone/variant ladder. Only `'read'` has a visual effect, and only on `paragraph`, `detail` and `caption` (it switches them to the reading family); the other values change nothing, and leaving it unset uses the role's default styling.\n- **`tag`** is an escape hatch to force a specific HTML element independently of `typography`, e.g. rendering a visually large heading as a `<span>` or marking text as `<strong>`/`<em>`/`<mark>` without changing the visual scale.\n- **`truncate`** governs overflow clipping: `'word'` forces single-line truncation (no wrapping), `'all'` clamps to a multi-line block whose line count is controlled by `--mds-text-line-clamp`, and `'none'` lets text flow normally. `'word'` and `'none'` clip only the end of the line, for the ellipsis, so the accents and the descenders of the `label` and `option` typographies (whose box is trimmed to the capitals) stay visible. `'all'` has to hide the lines after the clamp: the accents of its first line stay visible, while the descenders of its last visible line (a cedilla, the tail of a comma) are cut where the box ends.\n",
|
|
29783
|
-
"2. Pattern": "Correct and idiomatic ways to use the `<mds-text>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the typography ramp documented in [`agents/typography.md`](../../../../agents/typography.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Body Text via Default Slot\n\nThe canonical form for body copy. Slot a plain text string; `typography` defaults to `'detail'`, which renders a `<p>` element with the detail style.\n\n```html\n<mds-text>Inserisci il testo del messaggio nel campo sottostante.</mds-text>\n```\n\n#### Choosing a Typography Role\n\nSet `typography` to match the semantic role. The component resolves the correct HTML element automatically - `h1`-`h6` emit heading elements, `paragraph`/`detail` emit `<p>`, `label`/`option` emit `<label>`, `snippet`/`hack` emit `<code>`, `tip` and `action` emit `<div>` and `<span>` respectively.\n\n```html\n<mds-text typography=\"h1\">Benvenuto nel portale</mds-text>\n<mds-text typography=\"h2\">Impostazioni account</mds-text>\n<mds-text typography=\"paragraph\">Questo e' il corpo principale della pagina.</mds-text>\n<mds-text typography=\"caption\">Nota: i campi obbligatori sono contrassegnati con *</mds-text>\n<mds-text typography=\"label\">Nome utente</mds-text>\n<mds-text typography=\"tip\">Usa almeno 8 caratteri</mds-text>\n```\n\n#### Text via `text` Prop\n\nUse the `text` prop when the string comes from a JavaScript expression or data binding. This is also required for the `yugop` animation (see below) since the animation watches the prop value.\n\n```html\n<mds-text typography=\"detail\" text=\"Ultimo accesso: 3 giugno 2026\"></mds-text>\n```\n\n#### Reading Variant\n\nApply `variant=\"read\"` to `paragraph`, `detail`, or `caption` when rendering long-form editorial content. The reading variant keeps the same sizes but switches to the serif reading font (lighter for `paragraph` and `detail`), optimized for sustained reading.\n\n```html\n<mds-text typography=\"paragraph\" variant=\"read\">\n Il regolamento definisce le modalita' di accesso ai servizi digitali\n dell'amministrazione pubblica, in conformita' con le vigenti normative europee.\n</mds-text>\n\n<mds-text typography=\"detail\" variant=\"read\">\n Fonte: Gazzetta Ufficiale, serie generale n. 128 del 4 giugno 2026.\n</mds-text>\n```\n\n#### Monospaced Code Styles\n\nUse `typography=\"snippet\"` for inline code values or short terminal output. Use `typography=\"hack\"` for a smaller monospaced size suited to code-dense interfaces.\n\n```html\n<mds-text typography=\"snippet\">SELECT * FROM utenti WHERE attivo = true;</mds-text>\n<mds-text typography=\"hack\">npm install @maggioli-design-system/magma</mds-text>\n```\n\n#### Overriding the Rendered Tag\n\n`tag` is an escape hatch to pin a specific HTML element when the `typography` default is semantically wrong - for example, rendering a visually large heading as a `<span>` for a non-heading context, or marking inline text as `<strong>` or `<em>` without changing the visual scale.\n\n```html\n<!-- Visually h2 scale but not a landmark heading -->\n<mds-text typography=\"h2\" tag=\"span\">Sezione in evidenza</mds-text>\n\n<!-- Emphasized inline detail without changing scale -->\n<mds-text typography=\"detail\" tag=\"strong\">Attenzione: questa operazione e' irreversibile.</mds-text>\n\n<!-- Marked text using caption scale -->\n<mds-text typography=\"caption\" tag=\"mark\">Modificato il 3 giugno 2026</mds-text>\n```\n\n#### Single-Line Truncation\n\nUse `truncate=\"word\"` to clamp text to a single line with an ellipsis when layout space is constrained, for example inside a table cell or card header.\n\n```html\n<div style=\"width: 200px;\">\n <mds-text typography=\"detail\" truncate=\"word\">\n Titolo molto lungo che supera la larghezza disponibile del contenitore\n </mds-text>\n</div>\n```\n\n#### Multi-Line Clamp\n\nUse `truncate=\"all\"` to clamp text to a fixed number of lines. Control the number of visible lines via `--mds-text-line-clamp` (default 3).\n\n```html\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n Questo paragrafo mostra solo le prime due righe di testo, troncando il resto\n con i puntini di sospensione indipendentemente dai caratteri di confine.\n</mds-text>\n```\n\n#### Animated Character Reveal\n\nSet `animation=\"yugop\"` together with the `text` prop to run a randomized character-decode reveal each time `text` changes; the initial value is rendered without animation. Tune the speed via `--mds-text-animation-speed`.\n\n```html\n<mds-text\n typography=\"h3\"\n animation=\"yugop\"\n text=\"Benvenuto nel sistema\"\n style=\"--mds-text-animation-speed: 1;\"\n></mds-text>\n```\n\n#### Custom Text Selection Colors\n\nOverride the default selection highlight via `--mds-text-selection-background` and `--mds-text-selection-color`. Use Magma color tokens inside `rgb()` so dark mode keeps working.\n\n```css\n.articolo-in-evidenza mds-text {\n --mds-text-selection-background: rgb(var(--label-orange-09));\n --mds-text-selection-color: rgb(var(--label-orange-01));\n}\n```\n\n#### Custom Line-Clamp Count\n\nSet `--mds-text-line-clamp` on the component host (or a parent selector) to vary the clamp depth per context without duplicating attributes.\n\n```css\n.abstract mds-text {\n --mds-text-line-clamp: 4;\n}\n\n.anteprima mds-text {\n --mds-text-line-clamp: 2;\n}\n```\n",
|
|
29784
|
-
"3. Antipattern": "Common incorrect uses of `<mds-text>`. 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 Slot HTML Elements in the Default Slot\n\nThe default slot accepts plain text strings only. HTML elements or components slotted inside are outside the supported API: they keep their own browser and page styles instead of following the typography role.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n <strong>Attenzione:</strong> questa operazione e' <em>irreversibile</em>.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">Attenzione: questa operazione e' irreversibile.</mds-text>\n<mds-text typography=\"paragraph\" tag=\"strong\">Attenzione:</mds-text>\n```\n\n#### Do Not Mix `text` Prop and Slotted Content\n\nWhen `text` is set, the component renders that string and ignores the slot entirely. Do not provide both - the slotted content is silently discarded.\n\n```html\n<!-- INCORRECT -->\n<mds-text text=\"Titolo dal prop\">Titolo dallo slot</mds-text>\n\n<!-- CORRECT -->\n<!-- Use either the prop (preferred for dynamic / animated content) -->\n<mds-text text=\"Titolo dal prop\"></mds-text>\n<!-- or the slot (convenient for static markup) -->\n<mds-text>Titolo dallo slot</mds-text>\n```\n\n#### Do Not Use `animation=\"yugop\"` Without the `text` Prop\n\nThe yugop animation requires the `text` prop because it watches prop changes to retrigger. Slotted content is not observed; changing it will not re-run the animation.\n\n```html\n<!-- INCORRECT -->\n<mds-text animation=\"yugop\">Testo animato dallo slot</mds-text>\n\n<!-- CORRECT -->\n<mds-text animation=\"yugop\" text=\"Testo animato dal prop\"></mds-text>\n```\n\n#### Do Not Apply an Invalid `variant` for the Chosen `typography`\n\n`variant` is specific to the typography role: only `paragraph`, `detail`, and `caption` accept `variant=\"read\"`. Applying `variant=\"read\"` to heading or label roles silently has no visual effect and adds misleading markup.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"h2\" variant=\"read\">Impostazioni</mds-text>\n<mds-text typography=\"label\" variant=\"read\">Nome</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"h2\">Impostazioni</mds-text>\n<mds-text typography=\"paragraph\" variant=\"read\">Testo editoriale lungo.</mds-text>\n```\n\n#### Do Not Use Raw HTML Headings Instead of `<mds-text>`\n\nReplace raw `<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, and `<code>` styled with generic utilities with `<mds-text>` in Magma-managed views (or apply the typography utilities of [`agents/typography.md`](../../../../agents/typography.md)). Generic sizes and weights bypass the design-token typography ramp, causing visual inconsistency across themes and sizes.\n\n```html\n<!-- INCORRECT -->\n<h2 class=\"text-2xl font-bold\">Riepilogo ordine</h2>\n<p class=\"text-sm text-fg-muted\">Totale: 128,00 EUR</p>\n\n<!-- CORRECT -->\n<mds-text typography=\"h2\">Riepilogo ordine</mds-text>\n<mds-text typography=\"caption\">Totale: 128,00 EUR</mds-text>\n```\n\n#### Do Not Reach Into Shadow DOM to Style Internal Elements\n\nThe component exposes five `--mds-text-*` CSS custom properties for customization. Do not pierce the shadow DOM via `::part()` or `>>>` selectors targeting the internal `.text` element - that implementation detail is not a documented part and may change.\n\n```css\n/* INCORRECT */\nmds-text >>> .text {\n letter-spacing: 0.1em;\n}\n\n/* CORRECT - set via host; the host styles cascade into the shadow text node */\nmds-text {\n letter-spacing: 0.1em;\n --mds-text-selection-background: rgb(var(--label-sky-09));\n}\n```\n\n#### Do Not Confuse `truncate=\"word\"` and `truncate=\"all\"`\n\n`truncate=\"word\"` forces **single-line** truncation. `truncate=\"all\"` enables **multi-line** clamping controlled by `--mds-text-line-clamp`. Using `\"word\"` when you want multi-line clamp will collapse the text to one line unexpectedly.\n\n```html\n<!-- INCORRECT - collapses to one line when two lines were intended -->\n<mds-text typography=\"paragraph\" truncate=\"word\" style=\"--mds-text-line-clamp: 2;\">\n Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n```\n"
|
|
30192
|
+
"1. Description": "The `<mds-text>` web component is the foundational typography primitive of the Magma Design System. It decouples the _semantic typography role_ of a piece of text from the _HTML element_ that renders it, replacing raw heading, paragraph, label and inline tags (`<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, `<code>`, ...) with a single design-tokenized text node that is consumed internally by nearly every other Magma component.\n\n#### Semantic Behavior\n\n- **Typography drives the rendered tag**: when `tag` is left unset, a sensible default element is resolved from the chosen `typography` (e.g. `typography=\"h2\"` -> `<h2>`, `paragraph`/`detail` -> `<p>`, `label`/`option` -> `<label>`, `snippet`/`hack` -> `<code>`, `tip` -> `<div>`). Setting `tag` explicitly overrides this.\n- **Semantics vs. visual style are independent**: `typography` controls the visual ramp and the default element, but you may pin any allowed `tag` to keep the correct document outline (accessibility) while choosing a different visual scale.\n- **Text source is slot or prop**: text is normally provided through the default slot. Passing the `text` prop renders that string instead of the slotted content - required for the animation path, since the animation watches the `text` value.\n- **Default-slot is text only**: the default slot is intended for a plain text string; HTML elements or other components should not be slotted in. The one exception is `<mds-link>`, made to sit inside the text: it takes the font of the typography role and wraps with the words around it.\n- **Animated reveal**: with `animation=\"yugop\"` the component runs a randomized character \"decode\" reveal whenever the `text` prop changes after load (the initial value is rendered as is); `animation=\"none\"` (the default) skips all animation. The revealed string is always painted as text, never parsed as HTML.\n- **Animation tuning via CSS**: the yugop reveal reads `--mds-text-animation-speed` and `--mds-text-animation-placeholder-char`, so speed and placeholder glyph are themeable through CSS custom properties rather than props. They are read each time a reveal starts, so a value changed after load applies to the next reveal. The placeholder is one character (a longer string keeps its first one); a speed that is not a positive number, or an empty placeholder, falls back to the defaults (`0.5` and a space).\n\n#### Properties & Visual Configurations\n\n- **`typography`** selects the semantic text role from the shared typography ramp (titles `h1`-`h6` and `action`; informational `detail`, `paragraph`, `caption`, `label`, `option`, `tip`; monospaced `snippet`, `hack`). It is the primary prop and also determines the default rendered tag. Defaults to `'detail'`.\n- **`variant`** refines the _tone of a typography role_ and is specific to this component - it is the typography variation (`'title'`, `'info'`, `'read'`, `'code'`), not the shared component tone/variant ladder. Only `'read'` has a visual effect, and only on `paragraph`, `detail` and `caption` (it switches them to the reading family); the other values change nothing, and leaving it unset uses the role's default styling.\n- **`tag`** is an escape hatch to force a specific HTML element independently of `typography`, e.g. rendering a visually large heading as a `<span>` or marking text as `<strong>`/`<em>`/`<mark>` without changing the visual scale.\n- **`truncate`** governs overflow clipping: `'word'` forces single-line truncation (no wrapping), `'all'` clamps to a multi-line block whose line count is controlled by `--mds-text-line-clamp`, and `'none'` lets text flow normally. `'word'` and `'none'` clip only the end of the line, for the ellipsis, so the accents and the descenders of the `label` and `option` typographies (whose box is trimmed to the capitals) stay visible. `'all'` has to hide the lines after the clamp: the accents of its first line stay visible, while the descenders of its last visible line (a cedilla, the tail of a comma) are cut where the box ends.\n",
|
|
30193
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-text>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the typography ramp documented in [`agents/typography.md`](../../../../agents/typography.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Body Text via Default Slot\n\nThe canonical form for body copy. Slot a plain text string; `typography` defaults to `'detail'`, which renders a `<p>` element with the detail style.\n\n```html\n<mds-text>Inserisci il testo del messaggio nel campo sottostante.</mds-text>\n```\n\n#### Choosing a Typography Role\n\nSet `typography` to match the semantic role. The component resolves the correct HTML element automatically - `h1`-`h6` emit heading elements, `paragraph`/`detail` emit `<p>`, `label`/`option` emit `<label>`, `snippet`/`hack` emit `<code>`, `tip` and `action` emit `<div>` and `<span>` respectively.\n\n```html\n<mds-text typography=\"h1\">Benvenuto nel portale</mds-text>\n<mds-text typography=\"h2\">Impostazioni account</mds-text>\n<mds-text typography=\"paragraph\">Questo e' il corpo principale della pagina.</mds-text>\n<mds-text typography=\"caption\">Nota: i campi obbligatori sono contrassegnati con *</mds-text>\n<mds-text typography=\"label\">Nome utente</mds-text>\n<mds-text typography=\"tip\">Usa almeno 8 caratteri</mds-text>\n```\n\n#### Text via `text` Prop\n\nUse the `text` prop when the string comes from a JavaScript expression or data binding. This is also required for the `yugop` animation (see below) since the animation watches the prop value.\n\n```html\n<mds-text typography=\"detail\" text=\"Ultimo accesso: 3 giugno 2026\"></mds-text>\n```\n\n#### Reading Variant\n\nApply `variant=\"read\"` to `paragraph`, `detail`, or `caption` when rendering long-form editorial content. The reading variant keeps the same sizes but switches to the serif reading font (lighter for `paragraph` and `detail`), optimized for sustained reading.\n\n```html\n<mds-text typography=\"paragraph\" variant=\"read\">\n Il regolamento definisce le modalita' di accesso ai servizi digitali\n dell'amministrazione pubblica, in conformita' con le vigenti normative europee.\n</mds-text>\n\n<mds-text typography=\"detail\" variant=\"read\">\n Fonte: Gazzetta Ufficiale, serie generale n. 128 del 4 giugno 2026.\n</mds-text>\n```\n\n#### A Link Inside the Text\n\nThe default slot takes plain text and one component, `<mds-link>`: a word or a phrase that links, with the font of the typography role, wrapping with the text around it.\n\n```html\n<mds-text typography=\"paragraph\">\n Leggi l'<mds-link href=\"/privacy\">informativa sulla privacy</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Monospaced Code Styles\n\nUse `typography=\"snippet\"` for inline code values or short terminal output. Use `typography=\"hack\"` for a smaller monospaced size suited to code-dense interfaces.\n\n```html\n<mds-text typography=\"snippet\">SELECT * FROM utenti WHERE attivo = true;</mds-text>\n<mds-text typography=\"hack\">npm install @maggioli-design-system/magma</mds-text>\n```\n\n#### Overriding the Rendered Tag\n\n`tag` is an escape hatch to pin a specific HTML element when the `typography` default is semantically wrong - for example, rendering a visually large heading as a `<span>` for a non-heading context, or marking inline text as `<strong>` or `<em>` without changing the visual scale.\n\n```html\n<!-- Visually h2 scale but not a landmark heading -->\n<mds-text typography=\"h2\" tag=\"span\">Sezione in evidenza</mds-text>\n\n<!-- Emphasized inline detail without changing scale -->\n<mds-text typography=\"detail\" tag=\"strong\">Attenzione: questa operazione e' irreversibile.</mds-text>\n\n<!-- Marked text using caption scale -->\n<mds-text typography=\"caption\" tag=\"mark\">Modificato il 3 giugno 2026</mds-text>\n```\n\n#### Single-Line Truncation\n\nUse `truncate=\"word\"` to clamp text to a single line with an ellipsis when layout space is constrained, for example inside a table cell or card header.\n\n```html\n<div style=\"width: 200px;\">\n <mds-text typography=\"detail\" truncate=\"word\">\n Titolo molto lungo che supera la larghezza disponibile del contenitore\n </mds-text>\n</div>\n```\n\n#### Multi-Line Clamp\n\nUse `truncate=\"all\"` to clamp text to a fixed number of lines. Control the number of visible lines via `--mds-text-line-clamp` (default 3).\n\n```html\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n Questo paragrafo mostra solo le prime due righe di testo, troncando il resto\n con i puntini di sospensione indipendentemente dai caratteri di confine.\n</mds-text>\n```\n\n#### Animated Character Reveal\n\nSet `animation=\"yugop\"` together with the `text` prop to run a randomized character-decode reveal each time `text` changes; the initial value is rendered without animation. Tune the speed via `--mds-text-animation-speed`.\n\n```html\n<mds-text\n typography=\"h3\"\n animation=\"yugop\"\n text=\"Benvenuto nel sistema\"\n style=\"--mds-text-animation-speed: 1;\"\n></mds-text>\n```\n\n#### Custom Text Selection Colors\n\nOverride the default selection highlight via `--mds-text-selection-background` and `--mds-text-selection-color`. Use Magma color tokens inside `rgb()` so dark mode keeps working.\n\n```css\n.articolo-in-evidenza mds-text {\n --mds-text-selection-background: rgb(var(--label-orange-09));\n --mds-text-selection-color: rgb(var(--label-orange-01));\n}\n```\n\n#### Custom Line-Clamp Count\n\nSet `--mds-text-line-clamp` on the component host (or a parent selector) to vary the clamp depth per context without duplicating attributes.\n\n```css\n.abstract mds-text {\n --mds-text-line-clamp: 4;\n}\n\n.anteprima mds-text {\n --mds-text-line-clamp: 2;\n}\n```\n",
|
|
30194
|
+
"3. Antipattern": "Common incorrect uses of `<mds-text>`. 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 Slot HTML Elements in the Default Slot\n\nThe default slot accepts plain text strings only. HTML elements or components slotted inside are outside the supported API: they keep their own browser and page styles instead of following the typography role. The one exception is `<mds-link>`, a word of the sentence that takes the font of the role.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n <strong>Attenzione:</strong> questa operazione e' <em>irreversibile</em>.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">Attenzione: questa operazione e' irreversibile.</mds-text>\n<mds-text typography=\"paragraph\" tag=\"strong\">Attenzione:</mds-text>\n```\n\n#### Do Not Mix `text` Prop and Slotted Content\n\nWhen `text` is set, the component renders that string and ignores the slot entirely. Do not provide both - the slotted content is silently discarded.\n\n```html\n<!-- INCORRECT -->\n<mds-text text=\"Titolo dal prop\">Titolo dallo slot</mds-text>\n\n<!-- CORRECT -->\n<!-- Use either the prop (preferred for dynamic / animated content) -->\n<mds-text text=\"Titolo dal prop\"></mds-text>\n<!-- or the slot (convenient for static markup) -->\n<mds-text>Titolo dallo slot</mds-text>\n```\n\n#### Do Not Use `animation=\"yugop\"` Without the `text` Prop\n\nThe yugop animation requires the `text` prop because it watches prop changes to retrigger. Slotted content is not observed; changing it will not re-run the animation.\n\n```html\n<!-- INCORRECT -->\n<mds-text animation=\"yugop\">Testo animato dallo slot</mds-text>\n\n<!-- CORRECT -->\n<mds-text animation=\"yugop\" text=\"Testo animato dal prop\"></mds-text>\n```\n\n#### Do Not Apply an Invalid `variant` for the Chosen `typography`\n\n`variant` is specific to the typography role: only `paragraph`, `detail`, and `caption` accept `variant=\"read\"`. Applying `variant=\"read\"` to heading or label roles silently has no visual effect and adds misleading markup.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"h2\" variant=\"read\">Impostazioni</mds-text>\n<mds-text typography=\"label\" variant=\"read\">Nome</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"h2\">Impostazioni</mds-text>\n<mds-text typography=\"paragraph\" variant=\"read\">Testo editoriale lungo.</mds-text>\n```\n\n#### Do Not Use Raw HTML Headings Instead of `<mds-text>`\n\nReplace raw `<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, and `<code>` styled with generic utilities with `<mds-text>` in Magma-managed views (or apply the typography utilities of [`agents/typography.md`](../../../../agents/typography.md)). Generic sizes and weights bypass the design-token typography ramp, causing visual inconsistency across themes and sizes.\n\n```html\n<!-- INCORRECT -->\n<h2 class=\"text-2xl font-bold\">Riepilogo ordine</h2>\n<p class=\"text-sm text-fg-muted\">Totale: 128,00 EUR</p>\n\n<!-- CORRECT -->\n<mds-text typography=\"h2\">Riepilogo ordine</mds-text>\n<mds-text typography=\"caption\">Totale: 128,00 EUR</mds-text>\n```\n\n#### Do Not Reach Into Shadow DOM to Style Internal Elements\n\nThe component exposes five `--mds-text-*` CSS custom properties for customization. Do not pierce the shadow DOM via `::part()` or `>>>` selectors targeting the internal `.text` element - that implementation detail is not a documented part and may change.\n\n```css\n/* INCORRECT */\nmds-text >>> .text {\n letter-spacing: 0.1em;\n}\n\n/* CORRECT - set via host; the host styles cascade into the shadow text node */\nmds-text {\n letter-spacing: 0.1em;\n --mds-text-selection-background: rgb(var(--label-sky-09));\n}\n```\n\n#### Do Not Confuse `truncate=\"word\"` and `truncate=\"all\"`\n\n`truncate=\"word\"` forces **single-line** truncation. `truncate=\"all\"` enables **multi-line** clamping controlled by `--mds-text-line-clamp`. Using `\"word\"` when you want multi-line clamp will collapse the text to one line unexpectedly.\n\n```html\n<!-- INCORRECT - collapses to one line when two lines were intended -->\n<mds-text typography=\"paragraph\" truncate=\"word\" style=\"--mds-text-line-clamp: 2;\">\n Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n```\n"
|
|
29785
30195
|
},
|
|
29786
30196
|
"props": [
|
|
29787
30197
|
{
|
|
@@ -33807,6 +34217,16 @@
|
|
|
33807
34217
|
"docstring": "",
|
|
33808
34218
|
"path": "src/type/keyboard.ts"
|
|
33809
34219
|
},
|
|
34220
|
+
"src/components/mds-link/meta/types.ts::LinkVariantType": {
|
|
34221
|
+
"declaration": "\"primary\" | \"inherit\"",
|
|
34222
|
+
"docstring": "",
|
|
34223
|
+
"path": "src/components/mds-link/meta/types.ts"
|
|
34224
|
+
},
|
|
34225
|
+
"src/components/mds-link/meta/types.ts::LinkUnderlineType": {
|
|
34226
|
+
"declaration": "\"marker\" | \"solid\" | \"dotted\"",
|
|
34227
|
+
"docstring": "",
|
|
34228
|
+
"path": "src/components/mds-link/meta/types.ts"
|
|
34229
|
+
},
|
|
33810
34230
|
"src/type/typography.ts::TypographyReadingVariants": {
|
|
33811
34231
|
"declaration": "\"info\" | \"read\"",
|
|
33812
34232
|
"docstring": "",
|