schema: ai-cjm-component-contract/v1 id: metric version: 1.0.0 status: stable owner: AI CJM Design purpose: Показывает измеримый результат вместе с единицей и контекстом. use_when: - Есть подтверждённое количественное изменение. evidence: - id: production-style url: https://aicjm.ru/edu/styles.css?v=20260811-edu-canon locator: .hero__metrics, .hero__metrics dt, .hero__metrics dd supports: - anatomy - variant:summary - size:default - state:default - id: production-dom url: https://aicjm.ru/edu/cases/goodwood/ locator: .hero dl.hero__metrics and case result metric groups supports: - approved-example - content - id: production-case-style url: https://aicjm.ru/edu/cases/case.css?v=20260811-card-source locator: .case-result-facts, .case-result-facts div, .case-result-facts strong, .case-result-facts span supports: - variant:result anatomy: - id: value required: true role: Число или диапазон. - id: unit required: true role: Единица измерения. - id: label required: true role: Что измерено. - id: source required: true role: Evidence locator. variants: - id: result status: stable description: Результат кейса. evidence_refs: - production-case-style - id: summary status: stable description: Сводная метрика секции. evidence_refs: - production-style sizes: - id: default status: stable description: Размер определяется содержимым и перечисленными semantic/component tokens; raw dimensions запрещены. evidence_refs: - production-style states: default: status: stable basis: observed description: default is observed at the exact production locator in evidence_refs. evidence_refs: - production-style hover: status: not-applicable basis: not-applicable description: hover is not owned by metric. focus-visible: status: not-applicable basis: not-applicable description: focus-visible is not owned by metric. active: status: not-applicable basis: not-applicable description: active is not owned by metric. selected: status: not-applicable basis: not-applicable description: selected is not owned by metric. open: status: not-applicable basis: not-applicable description: open is not owned by metric. disabled: status: not-applicable basis: not-applicable description: disabled is not owned by metric. loading: status: not-applicable basis: not-applicable description: loading is not owned by metric. success: status: not-applicable basis: not-applicable description: success is not owned by metric. error: status: not-applicable basis: not-applicable description: error is not owned by metric. empty: status: not-applicable basis: not-applicable description: empty is not owned by metric. responsive: mode: metric-row-to-list reading_order: DOM order remains authoritative in every mode. rules: - Keep value before its label in every metric. - Collapse the metric row to a single column and replace vertical dividers with horizontal separators. accessibility: pattern: description-list-metrics semantics: - Use a description list or equivalent value/label pairs; include source context in text. keyboard: - Metrics own no keyboard behavior unless a separate source link is present. focus: - Source links use text-link focus behavior. motion: - Do not animate values as the only way to expose the result. tokens: - action.primary - text.primary - text.secondary - type.weight.proof - type.size.heading-medium - type.size.body-small content: required: - Значение. - Единица. - Период или база сравнения. - Источник. constraints: - Запрещены неподтверждённые числа. - Процент указывает базу сравнения. do: - Сохранять число и пояснение одним смысловым блоком. dont: - Не использовать метрику как декоративное крупное число. examples: approved: status: stable description: Компонент metric в указанном scoped production locator. evidence: https://aicjm.ru/edu/cases/goodwood/ prohibited: description: Не использовать метрику как декоративное крупное число. acceptance: - id: metric-1 criterion: Каждая метрика имеет source locator. method: manual - id: metric-2 criterion: Значение читается без цвета. method: manual