@maggioli-design-system/magma 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +7 -0
- package/agents/mcp.md +12 -4
- package/agents/patterns/previews/actions/banner.dark.webp +0 -0
- package/agents/patterns/previews/actions/banner.light.webp +0 -0
- package/agents/patterns/previews/actions/confirm.dark.webp +0 -0
- package/agents/patterns/previews/actions/confirm.light.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.dark.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.light.webp +0 -0
- package/agents/patterns/previews/actions/destructive-in-menu.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss-message.light.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.light.webp +0 -0
- package/agents/patterns/previews/actions/part-primary.light.webp +0 -0
- package/agents/patterns/previews/actions/stacked.light.webp +0 -0
- package/agents/patterns/previews/app-shell/back-office.light.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.light.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.light.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.light.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.light.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.light.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.light.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.light.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/check-or-repeat.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/content-another-way.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-action.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-content.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.light.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.dark.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.light.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.dark.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.light.webp +0 -0
- package/agents/patterns/previews/labels-and-values/payment-before-paying.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/find-and-open.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.light.webp +0 -0
- package/agents/patterns/previews/loading/await-and-say.dark.webp +0 -0
- package/agents/patterns/previews/loading/first-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/first-load.light.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.dark.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load.light.webp +0 -0
- package/agents/patterns/previews/loading/progress-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-elsewhere.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-elsewhere.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/app-failed.light.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.light.webp +0 -0
- package/agents/patterns/previews/message-placement/field-hint.light.webp +0 -0
- package/agents/patterns/previews/message-placement/region-failed.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.light.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.dark.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.light.webp +0 -0
- package/agents/patterns/previews/page-header/members-of-a-group.light.webp +0 -0
- package/agents/patterns/previews/page-header/request-from-the-list.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/ask-for-words.light.webp +0 -0
- package/agents/patterns/previews/record-detail/edit-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.light.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.light.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-groups.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inline.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.light.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.light.webp +0 -0
- package/agents/patterns/previews/surfaces/band.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/band.light.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.light.webp +0 -0
- package/agents/patterns/previews/surfaces/card.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/card.light.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.light.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.light.webp +0 -0
- package/agents/patterns/previews/surfaces/intro-band.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/intro-band.light.webp +0 -0
- package/agents/patterns/previews/surfaces/section.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/section.light.webp +0 -0
- package/agents/patterns/previews/titles/dialog.dark.webp +0 -0
- package/agents/patterns/previews/titles/dialog.light.webp +0 -0
- package/agents/patterns/previews/titles/group.light.webp +0 -0
- package/agents/patterns/previews/titles/page.light.webp +0 -0
- package/agents/patterns/previews/titles/part.light.webp +0 -0
- package/agents/patterns/previews/titles/section.light.webp +0 -0
- package/agents/patterns/previews/widths/dialog.light.webp +0 -0
- package/agents/patterns/previews/widths/field.dark.webp +0 -0
- package/agents/patterns/previews/widths/field.light.webp +0 -0
- package/agents/patterns/previews/widths/form.dark.webp +0 -0
- package/agents/patterns/previews/widths/form.light.webp +0 -0
- package/agents/patterns/previews/widths/page.dark.webp +0 -0
- package/agents/patterns/previews/widths/page.light.webp +0 -0
- package/agents/patterns/previews/widths/reading.dark.webp +0 -0
- package/agents/patterns/previews/widths/reading.light.webp +0 -0
- package/agents/patterns.md +4 -3
- package/dist/cjs/mds-input-range.cjs.entry.js +27 -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-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +1 -1
- package/dist/collection/components/mds-author/AGENTS.md +1 -1
- package/dist/collection/components/mds-author/documentation.json +1 -1
- package/dist/collection/components/mds-avatar/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +1 -1
- package/dist/collection/components/mds-badge/AGENTS.md +1 -1
- package/dist/collection/components/mds-badge/documentation.json +1 -1
- package/dist/collection/components/mds-banner/AGENTS.md +1 -1
- package/dist/collection/components/mds-banner/documentation.json +1 -1
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +1 -1
- package/dist/collection/components/mds-bibliography/AGENTS.md +1 -1
- package/dist/collection/components/mds-bibliography/documentation.json +1 -1
- package/dist/collection/components/mds-book/AGENTS.md +1 -1
- package/dist/collection/components/mds-book/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +1 -1
- package/dist/collection/components/mds-button/AGENTS.md +1 -1
- package/dist/collection/components/mds-button/documentation.json +1 -1
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-button-group/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-group/documentation.json +1 -1
- package/dist/collection/components/mds-calendar/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar/documentation.json +1 -1
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +1 -1
- package/dist/collection/components/mds-card/AGENTS.md +1 -1
- package/dist/collection/components/mds-card/documentation.json +1 -1
- package/dist/collection/components/mds-card-content/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-content/documentation.json +1 -1
- package/dist/collection/components/mds-card-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-footer/documentation.json +1 -1
- package/dist/collection/components/mds-card-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-header/documentation.json +1 -1
- package/dist/collection/components/mds-card-media/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-media/documentation.json +1 -1
- package/dist/collection/components/mds-chip/AGENTS.md +1 -1
- package/dist/collection/components/mds-chip/documentation.json +1 -1
- package/dist/collection/components/mds-details/AGENTS.md +1 -1
- package/dist/collection/components/mds-details/documentation.json +1 -1
- package/dist/collection/components/mds-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/AGENTS.md +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +1 -1
- package/dist/collection/components/mds-entity/AGENTS.md +1 -1
- package/dist/collection/components/mds-entity/documentation.json +1 -1
- package/dist/collection/components/mds-file/AGENTS.md +1 -1
- package/dist/collection/components/mds-file/documentation.json +1 -1
- package/dist/collection/components/mds-file-preview/AGENTS.md +1 -1
- package/dist/collection/components/mds-file-preview/documentation.json +1 -1
- package/dist/collection/components/mds-filter/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter/documentation.json +1 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter-item/documentation.json +1 -1
- package/dist/collection/components/mds-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-header/documentation.json +1 -1
- package/dist/collection/components/mds-header-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-header-bar/documentation.json +1 -1
- package/dist/collection/components/mds-help/AGENTS.md +1 -1
- package/dist/collection/components/mds-help/documentation.json +1 -1
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +1 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +1 -1
- package/dist/collection/components/mds-hr/AGENTS.md +1 -1
- package/dist/collection/components/mds-hr/documentation.json +1 -1
- package/dist/collection/components/mds-icon/AGENTS.md +1 -1
- package/dist/collection/components/mds-icon/documentation.json +1 -1
- package/dist/collection/components/mds-img/AGENTS.md +1 -1
- package/dist/collection/components/mds-img/documentation.json +1 -1
- package/dist/collection/components/mds-input/AGENTS.md +1 -1
- package/dist/collection/components/mds-input/documentation.json +1 -1
- package/dist/collection/components/mds-input-date/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +1 -1
- package/dist/collection/components/mds-input-field/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-field/documentation.json +1 -1
- package/dist/collection/components/mds-input-otp/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-otp/documentation.json +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +3 -1
- package/dist/collection/components/mds-input-range/documentation.json +2 -2
- package/dist/collection/components/mds-input-range/mds-input-range.css +109 -1
- package/dist/collection/components/mds-input-range/mds-input-range.js +35 -5
- package/dist/collection/components/mds-input-range-value/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-range-value/documentation.json +1 -1
- package/dist/collection/components/mds-input-select/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-select/documentation.json +1 -1
- package/dist/collection/components/mds-input-switch/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-switch/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +1 -1
- package/dist/collection/components/mds-input-upload/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-upload/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +1 -1
- package/dist/collection/components/mds-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +1 -1
- package/dist/collection/components/mds-kpi-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +1 -1
- package/dist/collection/components/mds-label/AGENTS.md +1 -1
- package/dist/collection/components/mds-label/documentation.json +1 -1
- package/dist/collection/components/mds-link/AGENTS.md +1 -1
- package/dist/collection/components/mds-link/documentation.json +1 -1
- package/dist/collection/components/mds-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +1 -1
- package/dist/collection/components/mds-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +1 -1
- package/dist/collection/components/mds-modal/AGENTS.md +1 -1
- package/dist/collection/components/mds-modal/documentation.json +1 -1
- package/dist/collection/components/mds-note/AGENTS.md +1 -1
- package/dist/collection/components/mds-note/documentation.json +1 -1
- package/dist/collection/components/mds-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-notification/documentation.json +1 -1
- package/dist/collection/components/mds-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +1 -1
- package/dist/collection/components/mds-paginator-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +1 -1
- package/dist/collection/components/mds-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +1 -1
- package/dist/collection/components/mds-pref/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref/documentation.json +1 -1
- package/dist/collection/components/mds-pref-animation/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-mode/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +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-price-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-progress/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +1 -1
- package/dist/collection/components/mds-quote/AGENTS.md +1 -1
- package/dist/collection/components/mds-quote/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +1 -1
- package/dist/collection/components/mds-radial-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +1 -1
- package/dist/collection/components/mds-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +1 -1
- package/dist/collection/components/mds-spinner/AGENTS.md +1 -1
- package/dist/collection/components/mds-spinner/documentation.json +1 -1
- package/dist/collection/components/mds-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +1 -1
- package/dist/collection/components/mds-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-table/documentation.json +1 -1
- package/dist/collection/components/mds-table-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +1 -1
- package/dist/collection/components/mds-table-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-row/documentation.json +1 -1
- package/dist/collection/components/mds-text/AGENTS.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +1 -1
- package/dist/collection/components/mds-toast/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast/documentation.json +1 -1
- package/dist/collection/components/mds-toast-region/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast-region/documentation.json +1 -1
- package/dist/collection/components/mds-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +1 -1
- package/dist/collection/components/mds-tree/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree/documentation.json +1 -1
- package/dist/collection/components/mds-tree-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +1 -1
- package/dist/collection/components/mds-usage/AGENTS.md +1 -1
- package/dist/collection/components/mds-usage/documentation.json +1 -1
- package/dist/collection/components/mds-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/documentation.json +2 -2
- package/dist/esm/mds-input-range.entry.js +27 -6
- package/dist/esm-es5/mds-input-range.entry.js +31 -24
- package/dist/hydrate/index.js +36 -6
- package/dist/hydrate/index.mjs +36 -6
- package/dist/lint/mcp/tools.json +21 -3
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/p-1e43613e.entry.js +1 -0
- package/dist/magma-components/p-B7Jp0tqu.system.js +1 -1
- package/dist/magma-components/p-b20f811b.system.entry.js +120 -0
- package/dist/mcp/checks.js +49 -20
- package/dist/mcp/cli.js +8 -2
- package/dist/mcp/context.js +21 -0
- package/dist/mcp/guides.js +2 -1
- package/dist/mcp/patterns.js +19 -9
- package/dist/mcp/render.js +4 -4
- package/dist/mcp/root.js +63 -0
- package/dist/mcp/tools.json +21 -3
- package/dist/stats.json +21 -19
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +9 -0
- package/package.json +1 -1
- package/dist/magma-components/p-ccb64689.system.entry.js +0 -113
- package/dist/magma-components/p-d32ca6ce.entry.js +0 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-filter-item
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-filter-item>` web component is a single selectable option inside the [`<mds-filter>`](../mds-filter/AGENTS.md) container of the Magma Design System. It renders as a toggle button (icon, label, and an optional count badge) and acts as the toggleable unit that drives the parent's filter selection - it has no standalone HTML primitive equivalent.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-header
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-header>` web component is the top-level page header container of the Magma Design System. It is a compound parent that wraps one or more `<mds-header-bar>` elements, orchestrating their scroll-driven appearance, auto-hide visibility, and an optional mobile menu rendered as a side modal.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-header-bar
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-header-bar>` web component is the top bar of a Magma application layout: it holds the product branding on the left and the primary navigation actions on the right, collapsing those actions into a hamburger menu on smaller viewports. It is a structural compound element, typically nested inside an `<mds-header>`, with no native HTML primitive equivalent.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-help
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-help>` web component is a contextual help affordance of the Magma Design System: a small help icon that reveals an explanatory tooltip on interaction. It composes [`mds-icon`](../mds-icon/AGENTS.md) and [`mds-tooltip`](../mds-tooltip/AGENTS.md) into a single drop-in element, so there is no native HTML primitive it replaces.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-horizontal-scroll
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-horizontal-scroll>` web component is a horizontally scrolling container of the Magma Design System. It wraps any slotted content in a snap-scrolling viewport and overlays optional navigation controls, replacing the manual overflow/scroll-snap CSS plumbing you would otherwise write around a `<div>`.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-hr
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-hr>` web component is the horizontal rule of the Magma Design System. It is a purely presentational separator that replaces the native `<hr>` element, rendering a thin themed divider line to split content into visual sections.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-icon
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-icon>` web component is the single glyph primitive of the Magma Design System: it inlines an SVG into the DOM so the artwork inherits color and sizing from CSS, and it is the building block that nearly every other component (button, chip, input, banner, list-item, etc.) composes to render its iconography. It replaces a raw `<img>`/`<svg>` tag and centralizes how icon artwork is resolved.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-img
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-img>` web component is the responsive image primitive of the Magma Design System. It wraps the native `<img>` element, adding accessible defaults, a built-in error/fallback state, and data-consumption-aware source selection driven by the user's bandwidth preference.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
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, colour codes with a swatch and the picker of the platform, datalist suggestions and speech-to-text dictation.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-date
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-date>` web component is the Magma Design System control for capturing a single calendar date. It wraps a native `<input type="date">`, adding form association, ISO value validation against an optional `min`/`max` range, contextual tips, and a button-triggered calendar dropdown for visual date picking.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-date-range
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-date-range>` web component is the Magma Design System control for capturing a start/end date pair, composing two slotted `<mds-input-date>` fields with a shared pop-up `mds-calendar` (in range mode) and optional quick-pick presets. It is a form-associated compound parent that orchestrates its children rather than rendering its own native inputs.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-date-range-preselection
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-date-range-preselection>` web component is a compound child of [`<mds-input-date-range>`](../mds-input-date-range/AGENTS.md). It renders a clickable shortcut button (a quick range like "Last 7 days" or "This month") that, when activated, fills the parent's date range with a predefined `start`/`end` pair instead of requiring the user to pick dates manually on the calendar.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-field
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-field>` web component is the form-field wrapper of the Magma Design System. It does not render an input itself; instead it decorates a slotted `<mds-input>` (or similar control) with a top label and a bottom message area, and reacts to the control's validation lifecycle. It plays the role the native `<label>` + helper-text grouping plays around an `<input>`.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-otp
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-otp>` web component is the Magma Design System control for entering one-time passcodes, rendering a row of single-digit fields that together compose a single form value. It is form-associated, so it behaves like a native input whose value is the concatenated OTP code.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-range
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-range>` web component is the Magma Design System slider control for picking a numeric value from a continuous interval, or several values on one track. It wraps a native `<input type="range">` per thumb, adding a labelled header, a styled track with a live progress fill, form association, and value formatting.
|
|
12
12
|
|
|
@@ -19,6 +19,7 @@ The `<mds-input-range>` web component is the Magma Design System slider control
|
|
|
19
19
|
- **Emitted event**: `mdsInputRangeChange` carries the new numeric value whenever `value` actually changes.
|
|
20
20
|
- **Accessibility**: The control takes its accessible name from the slotted label text; with `formatValue` it also announces the formatted value (`aria-valuetext`). The ring of the focus goes round the thumb.
|
|
21
21
|
- **Default slot is the label**: The default slot holds the field's text label, rendered in the header alongside the formatted current value.
|
|
22
|
+
- **Tip over the thumb**: while the pointer is on the slider, while the thumb is dragged and while it has the focus of the keyboard, the thumb shows its value, formatted as in the header, in a tip over it; the header keeps the value, for when nothing moves, and a header hidden through its `header` part leaves the tip. The tip follows its thumb, its arrow on the thumb and its bubble inside the track at the ends; it lies on the line of the header, its value on the line of the header value, and covers whole the part of the header it meets. It is drawn only, since the thumb already announces its value.
|
|
22
23
|
- **Width**: The slider takes the width its container gives it, a narrow grid cell too: the track gets shorter and a label longer than the room left by the value ends in an ellipsis.
|
|
23
24
|
|
|
24
25
|
#### Several Values on One Track
|
|
@@ -31,6 +32,7 @@ An [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) child per val
|
|
|
31
32
|
- **Order and limits of the markup**: the thumbs follow the values from the lowest, whatever the order of the children; each keeps the name of its own child. A value outside `min` and `max`, or off the step, is brought inside and onto the step, as a native input sanitizes it, and written back on its child; a child without a value starts in the middle.
|
|
32
33
|
- **Names**: the text of the range names the group of thumbs, the text of each child names its thumb, as in the multi-thumb slider of the WAI-ARIA APG. A child without text gets the label and the position of its thumb ("Prezzo, 1 di 2", in the language of the page).
|
|
33
34
|
- **Header**: the values in order, formatted as the one value: two are an interval joined by an en dash ("20 - 80" with a long dash), more a list joined by a middle dot.
|
|
35
|
+
- **Tip over each thumb**: each thumb has its own tip, with its own value. The one value shows its tip with the pointer anywhere on the track, its input taking the whole track; with two thumbs or more, the pointer finds a thumb only on the thumb, and its tip shows then.
|
|
34
36
|
- **Fill**: from the first thumb to the last.
|
|
35
37
|
- **Overlap**: a thumb is as wide as the track is tall, so two near values lie on each other: the thumb with the focus lies on top and the keys move it alone. Without the focus, a thumb held by its neighbours lies under them, so that the one on top can move.
|
|
36
38
|
- **Pointer**: a thumb drags itself; a press on the track moves the nearest thumb there.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-12T16:08:51",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.3",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
34
|
"usage": {
|
|
35
|
-
"1. Description": "The `<mds-input-range>` web component is the Magma Design System slider control for picking a numeric value from a continuous interval, or several values on one track. It wraps a native `<input type=\"range\">` per thumb, adding a labelled header, a styled track with a live progress fill, form association, and value formatting.\n\n#### Semantic Behavior\n\n- **Form association**: Inside a `<form>` the selected number is reported under `name` with no extra wiring. A form reset brings back the value of load, thumb and progress included, or the middle of the range when the markup sets no `value`, like a native input.\n- **Value clamping and snapping**: On input the value is clamped into `[min, max]` and snapped to the nearest `step` increment, so the committed `value` is always valid even when set programmatically out of range.\n- **Decimal awareness**: The number of decimal places is derived from `step`, letting fractional steps snap correctly; as on a native input, a `step` that is not a positive number, from the start or set later, falls back to the default step, `1`.\n- **Disabled state**: Blocks interaction and clears the reported form value while disabled; enabled again, the range reports its value again. A disabled `<fieldset>` around the component does the same, as it does a native input.\n- **Emitted event**: `mdsInputRangeChange` carries the new numeric value whenever `value` actually changes.\n- **Accessibility**: The control takes its accessible name from the slotted label text; with `formatValue` it also announces the formatted value (`aria-valuetext`). The ring of the focus goes round the thumb.\n- **Default slot is the label**: The default slot holds the field's text label, rendered in the header alongside the formatted current value.\n- **Width**: The slider takes the width its container gives it, a narrow grid cell too: the track gets shorter and a label longer than the room left by the value ends in an ellipsis.\n\n#### Several Values on One Track\n\nAn [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) child per value turns the range into a slider with a thumb per value, as an `<option>` per choice turns a `<select>` into a list: a minimum and a maximum, or the stops of a scale.\n\n- **From the first child on**: with one child or more, the values are the children's, one child included; `value` and `mdsInputRangeChange` are left out, and keep the one value of a range without children.\n- **One native input per thumb**: each thumb is a native range input, all of them stacked on the track. The native input gives the slider role, the value, the name, the focus and the drag; a component of `role=\"slider\"` elements would rewrite them, and leave the one value on another control.\n- **Neighbours bound each other**: a thumb never passes the thumbs next to it, but can reach them. The arrows move the thumb with the focus by one `step`, Page Up and Page Down by a tenth of the range, Home and End take it to its neighbours (or to `min` and `max`): the component handles these keys itself, because a native input knows only `min` and `max`.\n- **Order and limits of the markup**: the thumbs follow the values from the lowest, whatever the order of the children; each keeps the name of its own child. A value outside `min` and `max`, or off the step, is brought inside and onto the step, as a native input sanitizes it, and written back on its child; a child without a value starts in the middle.\n- **Names**: the text of the range names the group of thumbs, the text of each child names its thumb, as in the multi-thumb slider of the WAI-ARIA APG. A child without text gets the label and the position of its thumb (\"Prezzo, 1 di 2\", in the language of the page).\n- **Header**: the values in order, formatted as the one value: two are an interval joined by an en dash (\"20 - 80\" with a long dash), more a list joined by a middle dot.\n- **Fill**: from the first thumb to the last.\n- **Overlap**: a thumb is as wide as the track is tall, so two near values lie on each other: the thumb with the focus lies on top and the keys move it alone. Without the focus, a thumb held by its neighbours lies under them, so that the one on top can move.\n- **Pointer**: a thumb drags itself; a press on the track moves the nearest thumb there.\n- **Adding and removing**: adding a value is adding a child, removing one is removing it; the range watches its children, their values and their text.\n- **Form**: an entry per value under `name`, in order, as a native `<select multiple>`; a form reset gives each child back the value it had when the range first read it.\n- **Event**: `mdsInputRangeValuesChange` carries `{ values }`, in order, whenever the list changes: from a thumb, from code, as a child comes or goes, on a reset. The values of load are not a change.\n\n#### Properties & Visual Configurations\n\n- **`min` / `max` / `step`** define the permitted interval and granularity; `step` also controls how fractional values are snapped and how many decimals are preserved.\n- **`value`** is the committed numeric selection of a range without `<mds-input-range-value>` children, kept clamped and snapped - set it programmatically to move the thumb. With children, each child holds the value of its thumb.\n- **`formatValue`** is a function `(value: number) => string` for presentation only: use it to render the header value as currency, a percentage, or a unit-suffixed label without changing the underlying numeric `value`.\n\nThis component does not use the shared `variant` / `tone` ladders ([`agents/variants.md`](../../../../agents/variants.md)); it has no public CSS custom property: the thumb and the track follow the theme, and the `header` and `track` parts listed in [`AGENTS.md`](AGENTS.md) are its styling hooks.\n",
|
|
35
|
+
"1. Description": "The `<mds-input-range>` web component is the Magma Design System slider control for picking a numeric value from a continuous interval, or several values on one track. It wraps a native `<input type=\"range\">` per thumb, adding a labelled header, a styled track with a live progress fill, form association, and value formatting.\n\n#### Semantic Behavior\n\n- **Form association**: Inside a `<form>` the selected number is reported under `name` with no extra wiring. A form reset brings back the value of load, thumb and progress included, or the middle of the range when the markup sets no `value`, like a native input.\n- **Value clamping and snapping**: On input the value is clamped into `[min, max]` and snapped to the nearest `step` increment, so the committed `value` is always valid even when set programmatically out of range.\n- **Decimal awareness**: The number of decimal places is derived from `step`, letting fractional steps snap correctly; as on a native input, a `step` that is not a positive number, from the start or set later, falls back to the default step, `1`.\n- **Disabled state**: Blocks interaction and clears the reported form value while disabled; enabled again, the range reports its value again. A disabled `<fieldset>` around the component does the same, as it does a native input.\n- **Emitted event**: `mdsInputRangeChange` carries the new numeric value whenever `value` actually changes.\n- **Accessibility**: The control takes its accessible name from the slotted label text; with `formatValue` it also announces the formatted value (`aria-valuetext`). The ring of the focus goes round the thumb.\n- **Default slot is the label**: The default slot holds the field's text label, rendered in the header alongside the formatted current value.\n- **Tip over the thumb**: while the pointer is on the slider, while the thumb is dragged and while it has the focus of the keyboard, the thumb shows its value, formatted as in the header, in a tip over it; the header keeps the value, for when nothing moves, and a header hidden through its `header` part leaves the tip. The tip follows its thumb, its arrow on the thumb and its bubble inside the track at the ends; it lies on the line of the header, its value on the line of the header value, and covers whole the part of the header it meets. It is drawn only, since the thumb already announces its value.\n- **Width**: The slider takes the width its container gives it, a narrow grid cell too: the track gets shorter and a label longer than the room left by the value ends in an ellipsis.\n\n#### Several Values on One Track\n\nAn [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) child per value turns the range into a slider with a thumb per value, as an `<option>` per choice turns a `<select>` into a list: a minimum and a maximum, or the stops of a scale.\n\n- **From the first child on**: with one child or more, the values are the children's, one child included; `value` and `mdsInputRangeChange` are left out, and keep the one value of a range without children.\n- **One native input per thumb**: each thumb is a native range input, all of them stacked on the track. The native input gives the slider role, the value, the name, the focus and the drag; a component of `role=\"slider\"` elements would rewrite them, and leave the one value on another control.\n- **Neighbours bound each other**: a thumb never passes the thumbs next to it, but can reach them. The arrows move the thumb with the focus by one `step`, Page Up and Page Down by a tenth of the range, Home and End take it to its neighbours (or to `min` and `max`): the component handles these keys itself, because a native input knows only `min` and `max`.\n- **Order and limits of the markup**: the thumbs follow the values from the lowest, whatever the order of the children; each keeps the name of its own child. A value outside `min` and `max`, or off the step, is brought inside and onto the step, as a native input sanitizes it, and written back on its child; a child without a value starts in the middle.\n- **Names**: the text of the range names the group of thumbs, the text of each child names its thumb, as in the multi-thumb slider of the WAI-ARIA APG. A child without text gets the label and the position of its thumb (\"Prezzo, 1 di 2\", in the language of the page).\n- **Header**: the values in order, formatted as the one value: two are an interval joined by an en dash (\"20 - 80\" with a long dash), more a list joined by a middle dot.\n- **Tip over each thumb**: each thumb has its own tip, with its own value. The one value shows its tip with the pointer anywhere on the track, its input taking the whole track; with two thumbs or more, the pointer finds a thumb only on the thumb, and its tip shows then.\n- **Fill**: from the first thumb to the last.\n- **Overlap**: a thumb is as wide as the track is tall, so two near values lie on each other: the thumb with the focus lies on top and the keys move it alone. Without the focus, a thumb held by its neighbours lies under them, so that the one on top can move.\n- **Pointer**: a thumb drags itself; a press on the track moves the nearest thumb there.\n- **Adding and removing**: adding a value is adding a child, removing one is removing it; the range watches its children, their values and their text.\n- **Form**: an entry per value under `name`, in order, as a native `<select multiple>`; a form reset gives each child back the value it had when the range first read it.\n- **Event**: `mdsInputRangeValuesChange` carries `{ values }`, in order, whenever the list changes: from a thumb, from code, as a child comes or goes, on a reset. The values of load are not a change.\n\n#### Properties & Visual Configurations\n\n- **`min` / `max` / `step`** define the permitted interval and granularity; `step` also controls how fractional values are snapped and how many decimals are preserved.\n- **`value`** is the committed numeric selection of a range without `<mds-input-range-value>` children, kept clamped and snapped - set it programmatically to move the thumb. With children, each child holds the value of its thumb.\n- **`formatValue`** is a function `(value: number) => string` for presentation only: use it to render the header value as currency, a percentage, or a unit-suffixed label without changing the underlying numeric `value`.\n\nThis component does not use the shared `variant` / `tone` ladders ([`agents/variants.md`](../../../../agents/variants.md)); it has no public CSS custom property: the thumb and the track follow the theme, and the `header` and `track` parts listed in [`AGENTS.md`](AGENTS.md) are its styling hooks.\n",
|
|
36
36
|
"2. Examples": "Correct and idiomatic ways to use the `<mds-input-range>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Slider with a Label\n\nThe minimum viable form. Put the field's text label in the default slot - it is rendered in the header and used as the accessible name for the underlying input. The default range is 0-100 with a step of 1.\n\n```html\n<mds-input-range name=\"volume\">Volume</mds-input-range>\n```\n\n#### Setting `min`, `max`, and `step`\n\nConstrain the range to a meaningful interval. Use `step` to enforce granularity - the component snaps the selected value to the nearest multiple automatically.\n\n```html\n<!-- Percentage slider, 5-point increments -->\n<mds-input-range name=\"completamento\" min=\"0\" max=\"100\" step=\"5\">Completamento (%)</mds-input-range>\n\n<!-- Temperature slider, half-degree steps -->\n<mds-input-range name=\"temperatura\" min=\"16\" max=\"30\" step=\"0.5\">Temperatura (C)</mds-input-range>\n```\n\n#### Pre-selected Value via `value`\n\nPass `value` to initialize the thumb at a specific position. The prop is reflected, so it also stays in sync when the user drags.\n\n```html\n<mds-input-range name=\"priorita\" min=\"1\" max=\"10\" value=\"7\">Priorita</mds-input-range>\n```\n\n#### Listening to `mdsInputRangeChange`\n\nThe component emits `mdsInputRangeChange` with the new numeric value in `event.detail` whenever the committed value changes. Do not listen to the raw `input` or `change` events - they may not bubble out of shadow DOM as expected.\n\n```html\n<mds-input-range id=\"rating\" name=\"valutazione\" min=\"1\" max=\"5\">Valutazione</mds-input-range>\n\n<script>\n document.querySelector('#rating').addEventListener('mdsInputRangeChange', (event) => {\n console.log('Nuovo valore:', event.detail);\n });\n</script>\n```\n\n#### Custom Value Display with `formatValue`\n\nSupply a `(value: number) => string` function to `formatValue` to change how the current value is shown in the header label - for example to add a unit suffix, format as currency, or humanize byte counts. The underlying numeric `value` is not affected.\n\n```html\n<mds-input-range id=\"prezzo\" name=\"prezzo\" min=\"0\" max=\"10000\" step=\"50\">Prezzo massimo</mds-input-range>\n\n<script>\n document.querySelector('#prezzo').formatValue = (v) =>\n v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n</script>\n```\n\n#### Disabled Slider\n\nSet the boolean `disabled` attribute to prevent interaction. The component applies disabled visual tokens and clears the reported form value automatically. Do not use `disabled=\"false\"` to re-enable - remove the attribute instead.\n\n```html\n<mds-input-range name=\"soglia\" min=\"0\" max=\"100\" value=\"40\" disabled>Soglia (disabilitato)</mds-input-range>\n```\n\n#### Form Participation\n\n`<mds-input-range>` is form-associated. Place it inside a `<form>` with a `name` attribute and the selected value is submitted automatically alongside other fields.\n\n```html\n<form action=\"/impostazioni\" method=\"post\">\n <mds-input-range name=\"luminosita\" min=\"0\" max=\"100\" value=\"75\">Luminosita</mds-input-range>\n <mds-input-range name=\"contrasto\" min=\"0\" max=\"100\" value=\"50\">Contrasto</mds-input-range>\n\n <mds-button type=\"submit\" label=\"Salva impostazioni\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Several Values: an Interval\n\nPut an [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) per value inside the range: a thumb each. The text of the range is the label of the group, the text of each value names its thumb. The header shows the two values as an interval, formatted by `formatValue` as the one value.\n\n```html\n<mds-input-range id=\"prezzo-intervallo\" min=\"0\" max=\"500\" step=\"10\" name=\"prezzo\">\n Prezzo\n <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n\n<script>\n document.querySelector('#prezzo-intervallo').formatValue = (v) =>\n v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n</script>\n```\n\nThe form receives one entry per value under `name`, in order: `prezzo=100&prezzo=400`, read on the server as a list, as the entries of a `<select multiple>`.\n\n#### Several Values: Listening to `mdsInputRangeValuesChange`\n\nWith values, the range emits `mdsInputRangeValuesChange`, whose `detail.values` lists them in order from the lowest. It fires whenever the list changes: a thumb moved, a value set from code, a value added or removed, a form reset.\n\n```html\n<mds-input-range id=\"scala\" min=\"1\" max=\"21\" step=\"0.5\" name=\"contrasto\">\n Scala di contrasto\n <mds-input-range-value value=\"3\"></mds-input-range-value>\n <mds-input-range-value value=\"4.5\"></mds-input-range-value>\n <mds-input-range-value value=\"7\"></mds-input-range-value>\n <mds-input-range-value value=\"12\"></mds-input-range-value>\n</mds-input-range>\n\n<script>\n document.querySelector('#scala').addEventListener('mdsInputRangeValuesChange', (event) => {\n console.log('Passi:', event.detail.values); // [3, 4.5, 7, 12]\n });\n</script>\n```\n\nThe values without text are named after the label and their position (\"Scala di contrasto, 2 di 4\"). Adding a stop is appending an `<mds-input-range-value>`, removing one is removing it.\n\n#### Hiding the Header via `::part(header)`\n\nUse `::part(header)` to hide the label-and-value header when the surrounding UI already provides that context - for example in a compact settings row where the label lives outside the component.\n\n```css\n.slider-compatto mds-input-range::part(header) {\n display: none;\n}\n```\n\n#### Styling Customization\n\n`<mds-input-range>` has no public CSS custom property: the thumb and the track take their sizes from the component and their colours from the semantic color roles ([`agents/color.md`](../../../../agents/color.md)), the progress from the accent, so themes and dark mode recolour it without overrides. Adjust the slider only through its documented `header` and `track` parts, as in the example above.\n",
|
|
37
37
|
"3. Mistakes": "Common incorrect uses of `<mds-input-range>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use a Raw `<input type=\"range\">` Instead of the Component\n\nReaching for the native element bypasses the Magma-styled track, the progress fill, the labelled header, form association wiring, and the snapping logic.\n\n```html\n<!-- INCORRECT -->\n<label for=\"v\">Volume</label>\n<input type=\"range\" id=\"v\" name=\"volume\" min=\"0\" max=\"100\">\n\n<!-- CORRECT -->\n<mds-input-range name=\"volume\" min=\"0\" max=\"100\">Volume</mds-input-range>\n```\n\n#### Do Not Omit the Label Slot\n\nWithout slotted text the slider has no accessible name - screen readers cannot announce the control's purpose. Always put a meaningful text label in the default slot.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"luminosita\" min=\"0\" max=\"100\"></mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"luminosita\" min=\"0\" max=\"100\">Luminosita</mds-input-range>\n```\n\n#### Do Not Use `disabled=\"false\"` to Enable the Slider\n\n`disabled` is a boolean attribute and `mds-input-range` is form-associated: as on a native control, any value turns it on, `\"false\"` included, so this markup disables the slider. Remove the attribute entirely to enable it.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"soglia\" disabled=\"false\">Soglia</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"soglia\">Soglia</mds-input-range>\n```\n\n#### Do Not Listen to Raw `input` / `change` Events\n\nNative events may not bubble out of shadow DOM the way you expect. Listen to `mdsInputRangeChange`, which the component emits on every committed value change.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range id=\"r\" name=\"valore\">Valore</mds-input-range>\n<script>\n document.querySelector('#r').addEventListener('change', (e) => {\n console.log(e.target.value); // unreliable across shadow DOM\n });\n</script>\n\n<!-- CORRECT -->\n<mds-input-range id=\"r\" name=\"valore\">Valore</mds-input-range>\n<script>\n document.querySelector('#r').addEventListener('mdsInputRangeChange', (e) => {\n console.log(e.detail); // numeric value, always reliable\n });\n</script>\n```\n\n#### Do Not Set `step` to Zero or a Negative Number\n\nA `step` of zero or negative is invalid: as on a native input it is ignored and the default step, `1`, applies instead, which is rarely the granularity you meant. Use a positive integer or decimal.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"q\" step=\"0\">Quantita</mds-input-range>\n<mds-input-range name=\"q\" step=\"-1\">Quantita</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"q\" step=\"1\">Quantita</mds-input-range>\n```\n\n#### Do Not Put Several Ranges Side by Side for One Interval\n\nTwo ranges for a minimum and a maximum let the minimum pass the maximum, and give the form two names. Put both values on one range.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"prezzo-min\" value=\"100\">Prezzo minimo</mds-input-range>\n<mds-input-range name=\"prezzo-max\" value=\"400\">Prezzo massimo</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"prezzo\">\n Prezzo\n <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Set `value` on a Range with Values\n\nWith `<mds-input-range-value>` children, the values are theirs: `value` of the range and `mdsInputRangeChange` are left out. Set and read the values on the children, or listen to `mdsInputRangeValuesChange`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range value=\"20\">\n Prezzo\n <mds-input-range-value>Minimo</mds-input-range-value>\n <mds-input-range-value>Massimo</mds-input-range-value>\n</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range>\n Prezzo\n <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n <mds-input-range-value value=\"80\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Track or Thumb\n\nThe component exposes `::part(header)` and `::part(track)` for all supported customization; it has no public CSS custom property, and the thumb and the track take their colours from the theme. Targeting internal class names via `>>>` or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-range >>> .track-progress {\n background-color: hotpink;\n}\nmds-input-range::part(thumb) { /* \"thumb\" is not a documented part */\n border-radius: 0;\n}\n\n/* CORRECT */\nmds-input-range::part(track) { /* \"track\" is a documented part */\n opacity: 0.8;\n}\n```\n\n#### Do Not Use `formatValue` to Change the Submitted Form Value\n\n`formatValue` is purely presentational - it only changes the header display string. The submitted form value is always the raw number. Do not rely on it for data transformation.\n\n```html\n<!-- INCORRECT: expecting the form to submit the formatted string -->\n<mds-input-range id=\"p\" name=\"prezzo\">Prezzo</mds-input-range>\n<script>\n // This changes what is shown but NOT what is submitted\n document.querySelector('#p').formatValue = (v) => v + ' EUR';\n // form.submit() still sends a plain number for \"prezzo\"\n</script>\n\n<!-- CORRECT: format on the server or in a submit handler using event.detail -->\n<mds-input-range id=\"p\" name=\"prezzo\">Prezzo</mds-input-range>\n<script>\n document.querySelector('#p').formatValue = (v) =>\n v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n // The display is formatted; handle raw numeric value on submit separately\n</script>\n```\n"
|
|
38
38
|
},
|
|
@@ -41,6 +41,14 @@ mds-text {
|
|
|
41
41
|
);
|
|
42
42
|
--private-thumb-size: calc(var(--mds-input-range-thumb-size) + var(--private-border-width) * 2);
|
|
43
43
|
|
|
44
|
+
/* the shadow of the tip of a value, as the one of mds-tooltip; high contrast trades it for a
|
|
45
|
+
* glow (css/mds-input-range-pref-contrast.css) */
|
|
46
|
+
--private-input-range-tip-shadow: drop-shadow(
|
|
47
|
+
0 --spacing(250) --spacing(200) rgb(var(--magma-shadow-ink, var(--tone-neutral-01, 5 5 5)) / 0.04)
|
|
48
|
+
)
|
|
49
|
+
drop-shadow(0 --spacing(100) --spacing(75) rgb(var(--magma-shadow-ink, var(--tone-neutral-01, 5 5 5)) / 0.1))
|
|
50
|
+
drop-shadow(0 0 1px rgb(var(--magma-shadow-ink, var(--tone-neutral-01, 5 5 5)) / 0.1));
|
|
51
|
+
|
|
44
52
|
display: grid;
|
|
45
53
|
gap: --spacing(200);
|
|
46
54
|
|
|
@@ -196,6 +204,92 @@ mds-text {
|
|
|
196
204
|
z-index: 30;
|
|
197
205
|
}
|
|
198
206
|
|
|
207
|
+
/* The value of a thumb in a tip over it, one thumb or several: the header holds the values at its
|
|
208
|
+
* end, far from the thumb that moves. It shows while the input of its thumb is under the pointer,
|
|
209
|
+
* pressed (a drag keeps it, wherever the pointer goes) or focused from the keyboard, and follows
|
|
210
|
+
* the thumb at once. The input of the one value takes the whole track, so its tip shows with the
|
|
211
|
+
* pointer anywhere on the track; the inputs of several thumbs let the pointer through but on the
|
|
212
|
+
* thumb (.range--several), so each tip shows with the pointer on its thumb.
|
|
213
|
+
*
|
|
214
|
+
* Nothing is measured: the tip is a strip as wide as the track, over it, and a container, so that
|
|
215
|
+
* its parts know that width (100cqi). Its centre is the centre of the thumb, from the same value
|
|
216
|
+
* the fill takes (--private-input-range-tip-position, 0 to 100). The arrow stays on that centre;
|
|
217
|
+
* the bubble is centred on it, and slides back inside the track near its ends. It looks like
|
|
218
|
+
* mds-tooltip: overlay surface, radius, drop shadow.
|
|
219
|
+
*
|
|
220
|
+
* The bubble lies on the line of the header, its value on the line of the values of the header:
|
|
221
|
+
* the header is as tall as its capitals (mds-text trims the label) and ends --spacing(200) over
|
|
222
|
+
* the track (the gap of the host), so a bubble padded by --spacing(100) ends --spacing(100) over
|
|
223
|
+
* the track. It covers what of the header lies under it whole: a tip set higher covered the top
|
|
224
|
+
* of the letters and left their foot out. The arrow fills the --spacing(100) left, down to the
|
|
225
|
+
* thumb. */
|
|
226
|
+
|
|
227
|
+
.tip {
|
|
228
|
+
--private-input-range-tip-centre: calc(
|
|
229
|
+
(100cqi - var(--mds-input-range-track-size)) *
|
|
230
|
+
(var(--private-input-range-tip-position, 0) * 0.01) + (var(--mds-input-range-track-size) / 2)
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
bottom: 100%;
|
|
234
|
+
container-type: inline-size;
|
|
235
|
+
filter: var(--private-input-range-tip-shadow);
|
|
236
|
+
height: 0;
|
|
237
|
+
inset-inline: 0;
|
|
238
|
+
opacity: 0;
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
position: absolute;
|
|
241
|
+
transition-duration: var(--private-input-range-transition-duration);
|
|
242
|
+
transition-property: opacity;
|
|
243
|
+
transition-timing-function: var(--ease-out-sine, cubic-bezier(0.39, 0.575, 0.565, 1));
|
|
244
|
+
z-index: 40;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.field:hover:not(:disabled) + .tip,
|
|
248
|
+
.field:active:not(:disabled) + .tip,
|
|
249
|
+
.field:focus-visible + .tip {
|
|
250
|
+
opacity: 1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.tip-bubble {
|
|
254
|
+
background-color: rgb(var(--magma-surface-overlay, var(--surface-neutral-overlay, 255 255 255)));
|
|
255
|
+
border-radius: var(--magma-radius-3xs, var(--radius-squircle-3xs, 6px));
|
|
256
|
+
bottom: --spacing(100);
|
|
257
|
+
box-sizing: border-box;
|
|
258
|
+
color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
|
|
259
|
+
corner-shape: var(--magma-corner-shape, squircle);
|
|
260
|
+
display: flex;
|
|
261
|
+
left: var(--private-input-range-tip-centre);
|
|
262
|
+
padding-block: --spacing(100);
|
|
263
|
+
padding-inline: --spacing(200);
|
|
264
|
+
position: absolute;
|
|
265
|
+
|
|
266
|
+
/* centred on the thumb, inside the track: its left edge from 0 to the track less the bubble */
|
|
267
|
+
translate: clamp(
|
|
268
|
+
calc(var(--private-input-range-tip-centre) * -1),
|
|
269
|
+
-50%,
|
|
270
|
+
calc(100cqi - 100% - var(--private-input-range-tip-centre))
|
|
271
|
+
)
|
|
272
|
+
0;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
|
|
275
|
+
/* as wide as its value: an absolute box near the end of the track would wrap it */
|
|
276
|
+
width: max-content;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* the arrow of mds-tooltip is --spacing(225) tall: here it has --spacing(100), and a triangle
|
|
280
|
+
* drawn in CSS keeps its point where a squeezed copy of that shape would round it off */
|
|
281
|
+
|
|
282
|
+
.tip-arrow {
|
|
283
|
+
background-color: rgb(var(--magma-surface-overlay, var(--surface-neutral-overlay, 255 255 255)));
|
|
284
|
+
bottom: 0;
|
|
285
|
+
clip-path: polygon(0 0, 100% 0, 50% 100%);
|
|
286
|
+
height: --spacing(100);
|
|
287
|
+
left: var(--private-input-range-tip-centre);
|
|
288
|
+
position: absolute;
|
|
289
|
+
translate: -50% 0;
|
|
290
|
+
width: --spacing(250);
|
|
291
|
+
}
|
|
292
|
+
|
|
199
293
|
.track-total {
|
|
200
294
|
background-color: var(--mds-input-range-track-background);
|
|
201
295
|
border-radius: var(--mds-input-range-track-size);
|
|
@@ -305,15 +399,29 @@ mds-text {
|
|
|
305
399
|
/* Contrast preference. The component reflects the resolved mode from <html> onto
|
|
306
400
|
* its host as pref-contrast (see subscribePreference in @common/preference); these
|
|
307
401
|
* plain shadow selectors refine for high contrast. `more` is the explicit choice;
|
|
308
|
-
* `system` and no controller follow the OS via @media. Cross-browser, no :host-context.
|
|
402
|
+
* `system` and no controller follow the OS via @media. Cross-browser, no :host-context.
|
|
403
|
+
* The tip of a value takes the glow of mds-tooltip in high contrast: a centred glow is an
|
|
404
|
+
* outline, not a projected shadow, so it names --magma-text-default, which flips with the mode. */
|
|
309
405
|
|
|
310
406
|
:host([pref-contrast='more']) {
|
|
407
|
+
--private-input-range-tip-shadow: drop-shadow(
|
|
408
|
+
0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.05)
|
|
409
|
+
)
|
|
410
|
+
drop-shadow(0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.3))
|
|
411
|
+
drop-shadow(0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.3));
|
|
412
|
+
|
|
311
413
|
color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
|
|
312
414
|
}
|
|
313
415
|
|
|
314
416
|
@media (prefers-contrast: more) {
|
|
315
417
|
:host([pref-contrast='system']),
|
|
316
418
|
:host(:not([pref-contrast])) {
|
|
419
|
+
--private-input-range-tip-shadow: drop-shadow(
|
|
420
|
+
0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.05)
|
|
421
|
+
)
|
|
422
|
+
drop-shadow(0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.3))
|
|
423
|
+
drop-shadow(0 0 --spacing(100) rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)) / 0.3));
|
|
424
|
+
|
|
317
425
|
color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
|
|
318
426
|
}
|
|
319
427
|
}
|
|
@@ -29,6 +29,15 @@ const VALUE_TAG = 'mds-input-range-value';
|
|
|
29
29
|
* value outside `min` and `max`, or off the step, is brought inside and onto the step, as a
|
|
30
30
|
* native input sanitizes it, and written back on its child; a child without a value starts in
|
|
31
31
|
* the middle, as a native range input.
|
|
32
|
+
* - Each thumb shows its value in a tip over it while the pointer is on it, while it is dragged
|
|
33
|
+
* and while it has the focus of the keyboard: the header holds the value, or lists them all, at
|
|
34
|
+
* its end, far from the thumb that moves. One thumb has its tip too: the distance is the same,
|
|
35
|
+
* a range that loses all but one value keeps it, and a range with its header hidden still shows
|
|
36
|
+
* its value. The pointer finds the input, and the input of the one value takes the whole track
|
|
37
|
+
* (a press on the track moves its thumb natively): there the tip shows with the pointer anywhere
|
|
38
|
+
* on the track, with several thumbs on the thumb alone. The tip is drawn, not announced: the
|
|
39
|
+
* input already names its value (aria-valuetext). It follows the thumb by its value alone, in
|
|
40
|
+
* CSS, as the fill does: nothing is measured.
|
|
32
41
|
*/
|
|
33
42
|
/**
|
|
34
43
|
* @part header - The element containing the labels displayed over the input element
|
|
@@ -352,9 +361,13 @@ export class MdsInputRange {
|
|
|
352
361
|
* between spaces.
|
|
353
362
|
*/
|
|
354
363
|
displayValues() {
|
|
355
|
-
const texts = this.thumbs.map(({ value }) => this.
|
|
364
|
+
const texts = this.thumbs.map(({ value }) => this.formatted(value));
|
|
356
365
|
return texts.join(texts.length === 2 ? ' \u2013 ' : ' \u00b7 ');
|
|
357
366
|
}
|
|
367
|
+
/** A value as the range shows it: through `formatValue`, or as it is. */
|
|
368
|
+
formatted(value) {
|
|
369
|
+
return this.formatValue ? this.formatValue(value) : String(value);
|
|
370
|
+
}
|
|
358
371
|
disabledChanged(newValue) {
|
|
359
372
|
/**
|
|
360
373
|
* This is related to ALL disabled attributes set on Magma input components
|
|
@@ -475,14 +488,26 @@ export class MdsInputRange {
|
|
|
475
488
|
this.onInput();
|
|
476
489
|
this.calculateProgress();
|
|
477
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* The tip of a value, right after the input of its thumb: the CSS shows it while that input is
|
|
493
|
+
* under the pointer, pressed or focused from the keyboard (`.field:hover + .tip`), and places it
|
|
494
|
+
* from `position`, where the value sits on the track (0 to 100).
|
|
495
|
+
*/
|
|
496
|
+
renderTip(position, text, key) {
|
|
497
|
+
return (h("div", { key: key, class: "tip", "aria-hidden": "true", style: { '--private-input-range-tip-position': `${position}` } }, h("span", { class: "tip-bubble" }, h("mds-text", { class: "tip-value", typography: "label" }, text)), h("span", { class: "tip-arrow" })));
|
|
498
|
+
}
|
|
499
|
+
/** A native input per thumb, each followed by the tip of its value. */
|
|
478
500
|
renderThumbs() {
|
|
479
501
|
return this.thumbs.map((thumb, index) => {
|
|
480
502
|
const [low, high] = this.bounds(index);
|
|
481
|
-
return
|
|
503
|
+
return [
|
|
504
|
+
h("input", { key: thumb.key, class: { field: true, 'field--held': low === high }, type: "range", "aria-label": this.thumbName(index), "aria-valuetext": this.formatValue ? this.formatValue(thumb.value) : undefined, disabled: this.isDisabled(), max: this.max, min: this.min, onInput: this.onThumbInput, onKeyDown: this.onThumbKeyDown, step: this.allowedStep(), value: thumb.value }),
|
|
505
|
+
this.renderTip(this.percent(thumb.value), this.formatted(thumb.value), `tip-${thumb.key}`),
|
|
506
|
+
];
|
|
482
507
|
});
|
|
483
508
|
}
|
|
484
509
|
render() {
|
|
485
|
-
var _a;
|
|
510
|
+
var _a, _b;
|
|
486
511
|
const children = this.thumbs.length > 0;
|
|
487
512
|
const several = this.thumbs.length > 1;
|
|
488
513
|
const first = this.thumbs[0];
|
|
@@ -493,11 +518,16 @@ export class MdsInputRange {
|
|
|
493
518
|
};
|
|
494
519
|
if (several)
|
|
495
520
|
progress['--private-input-range-progress-start'] = `${this.percent(first.value)}`;
|
|
496
|
-
return (h(Host, { key: '
|
|
521
|
+
return (h(Host, { key: '26a7ec9fdca1190c60a031c122d4726caba0dc09', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("header", { key: 'eac882dc3793792bd88e100e295b70ffcbfc41ea', class: "header", part: "header" }, h("mds-text", { key: '4cd4bc7b76cc7014520dd805930900e358ec2876', class: "label", truncate: "word", typography: "label" }, h("slot", { key: '28afcfce8b82d8288c8b61e4e461c566c0778c73' })), h("mds-text", { key: 'c12a80857ec6ff4961e8a294c3e43c4bbce2cecb', class: "value", typography: "label" }, children
|
|
497
522
|
? this.displayValues()
|
|
498
523
|
: this.formatValue
|
|
499
524
|
? this.formatValue(this.value)
|
|
500
|
-
: this.value)), h("div", { key: '
|
|
525
|
+
: this.value)), h("div", { key: 'a1745566763926db65a8daa6dd0f786ebb41bca5', class: { range: true, 'range--several': several }, role: children ? 'group' : undefined, "aria-label": children && this.label !== '' ? this.label : undefined, onPointerDown: this.onTrackPointerDown }, h("div", { key: '22a55f00ab4fb181744595ddeef84b48d308e9ce', class: "track", part: "track" }, h("div", { key: '27a45042881334d1ec9082c93b209eb306904642', class: "contrast-area" }), h("div", { key: '3a58b1a75392d4c7c907fc1029d7b60d396b1a71', class: "track-total" }, h("div", { key: 'ea616e7ab8b5084978cb3d8763f5f3c5b49101cf', class: { 'track-progress': true, 'track-progress--between': several }, style: progress }))), children
|
|
526
|
+
? this.renderThumbs()
|
|
527
|
+
: [
|
|
528
|
+
h("input", { ref: (el) => (this.inputElement = el), class: "field", "aria-label": this.label, "aria-valuetext": this.formatValue ? this.formatValue(this.value) : undefined, disabled: this.isDisabled(), max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value, name: this.name }),
|
|
529
|
+
this.renderTip((_b = this.progress) !== null && _b !== void 0 ? _b : 0, this.value == null ? '' : this.formatted(this.value)),
|
|
530
|
+
])));
|
|
501
531
|
}
|
|
502
532
|
static get is() { return "mds-input-range"; }
|
|
503
533
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-range-value
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-input-range-value>` web component is one value of a [`<mds-input-range>`](../mds-input-range/AGENTS.md) that holds several values on one track, as an `<option>` is one choice of a `<select>`. The range draws a thumb for each of its `<mds-input-range-value>` children; the child itself draws nothing.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-input-select
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.14.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
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.
|
|
12
12
|
|