Problem
When config.processing.states maps a state concept to a prop without specifying a value (e.g. selected: { prop: selected }), the css transformer only recognizes the boolean form of that prop. If the prop is actually an enum (e.g. selected: unselected | selected | indeterminate), variants configured with enum values — like Checkbox's Selected=Selected — never match a state concept and are silently skipped. Their styling (the checkbox's selected fill, border, and icon visibility) never reaches the generated styles.css, even though it exists in the component spec.
Solution
Variants whose state-classified prop carries an enum value should still produce CSS. Either the state lookup understands enum-valued props (each non-rest value resolves to an appropriate selector), or configuration validation warns that a valueless state mapping doesn't cover the prop's enum values — silence is the bug.
Acceptance criteria
Notes
Found during Storybook scaffold work (project 010): the authored Checkbox had to re-express selected-state styling by hand even though the data exists in variants.yaml.
Implementation details are tracked internally.
Problem
When
config.processing.statesmaps a state concept to a prop without specifying avalue(e.g.selected: { prop: selected }), the css transformer only recognizes the boolean form of that prop. If the prop is actually an enum (e.g.selected: unselected | selected | indeterminate), variants configured with enum values — like Checkbox'sSelected=Selected— never match a state concept and are silently skipped. Their styling (the checkbox's selected fill, border, and icon visibility) never reaches the generatedstyles.css, even though it exists in the component spec.Solution
Variants whose state-classified prop carries an enum value should still produce CSS. Either the state lookup understands enum-valued props (each non-rest value resolves to an appropriate selector), or configuration validation warns that a valueless state mapping doesn't cover the prop's enum values — silence is the bug.
Acceptance criteria
specs transform cssemits selected-state styling for EGDS Checkbox (Selected=Selectedvariants appear in generatedstyles.css)processing.stateswithout avalueproduces CSS for all its non-rest values, or a clear warning explaining the config gapdisabled,focused, …)Notes
Found during Storybook scaffold work (project 010): the authored Checkbox had to re-express selected-state styling by hand even though the data exists in
variants.yaml.