Vue kit: UiCheckbox for the Visual, voice, Data Library and welcome checkboxes

UiCheckbox is a label wrapping a native checkbox and its words; trailing
puts the box after them, as the Visual panel's rows have it. v-model shows
the value and emits the checked state, and change is emitted with its event;
without a modelValue the box is the browser's own, as the welcome card's
"Don't show this again" is. restore puts the box back to modelValue once a
change has rendered without the owner taking it, which is what the voice
panel's v-checked directive did for a refused preference. Attributes go to
the label; inputId and inputAttrs to the box.

checkbox.css holds the centred flex row, moved out of the two labels that
hold only a checkbox (first-run.css, library.css) and loaded before them.
Each box keeps its skin's size, margin and accent colour. checkboxes.test.mjs
fails if a view writes a checkbox by hand; Story Explore's filters are not
converted yet.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-19 01:05:12 -08:00
1 parent 52dd576769
commit 2d7b7be890
18 files changed
+385 -41

No files matched your search

+17 -1
View File
@@ -38,7 +38,7 @@ one-panel rule too. Share links continue to record which panels are open.
`src/ui/kit/` holds the generic components: `UiRail`, `UiTooltip`, `UiIcon`,
`UiButton`, `UiCloseButton`, `UiPanel`, `UiSegmented`, `UiSlider`, `UiChip`,
`UiSelect`, `UiSearchField`, `UiBadge` and `UiEmpty` so far, with more
`UiSelect`, `UiSearchField`, `UiCheckbox`, `UiBadge` and `UiEmpty` so far, with more
joining as the controls they serve are converted. One component
serves every use of a control, with props for the differences (`UiPanel`'s
`sideways`, `glow`, `scroll`), rather than a copy per panel. The components
@@ -55,6 +55,7 @@ never copied:
| `UiButton` `variant="icon"` | the 22px square glyph button of a panel's collapse toggle | `src/ui/styles/controls.css` |
| `UiCloseButton` | a close, dismiss or clear button: a bare glyph (× with `glyph="times"`, the Material `close` symbol with `glyph="icon"`) with no padding, border or background of its own and a pointer; the site's feature class sets size, colour, hover and any surface, and `bare` leaves the look off for a skin that keeps the browser's padding | `src/ui/styles/close-button.css` |
| `UiSearchField` | a search field: the Material `search` glyph and a search input in a flex row, the input bare (no border or background, free to shrink); the site's feature classes set the frame's size, surface and focus ring and the input's type and outline, and the browser's own cancel button is left to each skin | `src/ui/styles/search-field.css` |
| `UiCheckbox` | a checkbox: a label wrapping a native box and its words in a centred flex row; the box keeps each site's size, margin and accent colour, and the site's feature class sets the row's gap, direction and colour | `src/ui/styles/checkbox.css` |
| `UiChip` | the read-only chip (a pill of uppercase mono text); `selected` takes the accent | `src/ui/styles/chip.css` |
| `UiEmpty` | the one-line empty state (dim mono text), its hint on a line below | `src/ui/styles/empty-state.css` |
| `UiBadge` | the read-only badge (`gev-status-badge`) | `src/ui/styles/status-badge.css` |
@@ -120,6 +121,21 @@ focuses the input. The Context search and the Layer Finder's are
`UiSearchField`s; the locale picker's combobox, the Omnibar's location
field and the Data Library's labelled search are other controls. Its kit rules hold the declarations both search
skins had in common, moved rather than copied, and load before them.
`UiCheckbox` is a `<label>` wrapping a native `<input type="checkbox">` and
its default slot; `trailing` puts the box after the words, as the Visual
panel's rows have it. It takes `v-model` (the change emits the checked state)
and emits `change` with its event; without a `modelValue` the box is the
browser's own, as the welcome card's "Don't show this again" is, whose
owner puts a refused save back itself. `restore` puts the box back to
`modelValue` once a change has rendered without the owner taking it, so the
voice panel's quick commands and Voice Preview show the applied value after
a refused change. Attributes and classes go to the label; `inputId` and
`inputAttrs` (such as `aria-describedby` or a data hook) to the box. The
Visual panel's Scope, sky and application toggles, the voice and chat
preferences, the Data Library's filter and the welcome card's box are
`UiCheckbox`es (`src/ui/kit/checkboxes.test.mjs` pins it); Story Explore's
filters are not converted yet. Its kit rule holds the centred row the
checkbox-only labels drew, moved rather than copied.
`UiSlider` keeps the native range input rather than drawing a
`role="slider"` track, so Core's keyboard, form behaviour and styling stay;
it takes `v-model`, `min`, `max`, `step` and `disabled`, emits a