/** * Semantic color token accepted by the `color` attribute of * {@link KUBAButtonElement}. Resolved as a bare `--color-{value}` CSS * custom property (see `packages/pixel/tokens/color.css`) — shade suffixes * like `-dark`/`-light` are not valid here, only the base token names. */ type KUBAButtonColorAttribute = | 'master' | 'primary' | 'complete' | 'success' | 'warning' | 'danger' | 'info' | 'menu' /** * Visual style accepted by the `variant` attribute of * {@link KUBAButtonElement}, each backed by a `:host(:state(...))` rule in * `style.js`. `'solid'` has no matching state — it is the unstyled default. */ type KUBAButtonVariantAttribute = 'solid' | 'naked' | 'ghost' | 'link' | 'icon' /** * How `sink` is applied on {@link KUBAButtonElement}, within its `on` * attribute. */ type KUBAButtonOnAttributeSink = 'method' | 'attribute' | 'setter' /** * Shape of the `on` attribute of {@link KUBAButtonElement} — an arc string * in the form `source/event:type/sink`, optionally followed by one or more * `|filter=value` pairs. Inherited from the `Echo` mixin. * * This only constrains the shape (the four `/`/`:`-separated segments and * the `type` segment); `source`, `event`, `sink`, and filter contents remain * free-form strings, since TypeScript cannot validate the full grammar (e.g. * arbitrary characters, filter repetition) through a template literal type. * The check only applies to string literals — a value assigned from a plain * `string` variable falls back to unchecked `string`. */ type KUBAButtonOnAttribute = `${string}/${string}:${KUBAButtonOnAttributeSink}/${string}${'' | `|${string}`}` /** * Shape of the `width` attribute of {@link KUBAButtonElement}. Normalized * by the `resizing` filter: numeric `px`/`%` values pass through, `'hug'` * becomes `'auto'`, `'fill'` becomes `'100%'`, and anything else defaults * to `'auto'`. */ type KUBAButtonWidthAttribute = | `${number}px` | `${number}%` | 'hug' | 'fill' | 'auto' /** * Custom element `` — a form-associated button that renders a * native `