(states: StateBlock)
| 25 | } |
| 26 | |
| 27 | const stateEntries = (states: StateBlock): Array<[string, string]> => |
| 28 | (Object.keys(states) as Array<keyof StateBlock>).flatMap((state) => { |
| 29 | const props = states[state]; |
| 30 | if (!props) { |
| 31 | return []; |
| 32 | } |
| 33 | return Object.keys(props) |
| 34 | .filter((prop) => props[prop] !== undefined) |
| 35 | .map((prop): [string, string] => [`${state}-${prop}`, props[prop]!]); |
| 36 | }); |
| 37 | |
| 38 | /** |
| 39 | * Emits the theme-aware `--{varPrefix}-{state}-{prop}` tokens of every |