ID:WORK-065Status:done
Interactive State Dimension
Priority:mediumComplexity:moderateMilestone:v0.9.0Source:SPEC-025
No incremental history — criteria tracking started on Apr 19.
Migrate interactive rune behaviours from class-based state toggling to data-state attribute toggling. Currently, the @refrakt-md/behaviors scripts toggle BEM modifier classes (e.g., rune-accordion__panel--open). After this change, they toggle data-state values (e.g., data-state="open"), enabling themes to style all interactive states generically.
data-state attributes on interactive elements (e.g., first accordion panel data-state="open", rest data-state="closed")data-state="open" / data-state="closed" on panels and data-state="active" / data-state="inactive" on triggersdata-state="active" / data-state="inactive" on tabs and panelsdata-state="selected"data-state="disabled"[data-state] selectors in addition to (or replacing) BEM state modifiersdata-state attributes based on the rune's default state (first panel open, rest closed, etc.)packages/behaviors/src/behaviors/ to toggle data-state instead of (or in addition to) BEM modifier classes[data-state] selectors