docs: describe the component kit on its own terms

The kit's comments and docs describe its props and classes directly instead
of by reference to another kit.
This commit is contained in:
Sameh Khamis committed 2026-11-01 19:40:46 -08:00
1 parent 859ceac8b4
commit 5582ff288d
12 files changed
+33 -46

No files matched your search

+1 -2
View File
@@ -1,6 +1,5 @@
<script setup>
// Core's read-only badge, with @halfpixel/ui-vue UiBadge's `tone` and classes
// so the two kits can merge. It carries Core's `gev-status-badge` class, and
// Core's read-only badge, with a `tone` and the kit's classes. It carries Core's `gev-status-badge` class, and
// callers add its density variants (`gev-status-badge--box`, `--plain`) and
// the feature classes that colour it; the kit classes carry no Core styles
// yet. Not mirrored yet: pulse, busy, the tone glyphs and the clipped title.
+1 -2
View File
@@ -2,8 +2,7 @@
import { computed } from 'vue';
import { vClassToggle } from '../rail/classToggle.js';
// Core's button, with @halfpixel/ui-vue UiButton's props, classes and
// attribute contract so the two kits can merge: the button is always the root,
// Core's button and its attribute contract: the button is always the root,
// attributes passed in win over its own (a `title` replaces the label's), and
// `pressed` renders aria-pressed only when it is passed. Core styles the
// button through the classes its callers pass; the kit classes carry no Core
+1 -2
View File
@@ -1,6 +1,5 @@
<script setup>
// Core's chip, with @halfpixel/ui-vue UiChip's props and classes so the two
// kits can merge: a label that says what something is, never a control.
// Core's chip: a label that says what something is, never a control.
// Core styles it through the classes its callers pass; the kit classes carry
// no Core styles yet. A chip that presses is a UiButton with pressedClass.
defineProps({
+3 -3
View File
@@ -1,7 +1,7 @@
<script setup>
// Core's empty state, with @halfpixel/ui-vue UiEmpty's `title` and `hint` so
// the two kits can merge. Core's empty states are one line, so the title is
// the text itself rather than ui-vue's bold heading; a hint follows it. Core
// Core's empty state, with a `title` and `hint`. Core's empty states are one
// line, so the title is the text itself rather than a bold heading; a hint
// follows it. Core
// styles it through the classes its callers pass. Not mirrored yet: icon.
defineProps({
title: { type: String, required: true },
+2 -3
View File
@@ -2,11 +2,10 @@
import { vClassToggle } from '../rail/classToggle.js';
import UiPanelToggle from './UiPanelToggle.vue';
// Core's panel, with @halfpixel/ui-vue UiPanel's name, title, slots and
// v-model:collapsed so the two kits can merge. It draws Core's panel markup
// Core's panel, with a name, title, slots and v-model:collapsed. It draws Core's panel markup
// (glow, inner, a header with the title, badges, divider, actions and the
// collapse button, then the body) and keeps Core's classes beside the kit's.
// Unlike ui-vue's, `collapsed` does not hide the body: the root's classes
// `collapsed` does not hide the body: the root's classes
// stay as rendered, and whatever owns the panel's state writes its
// `collapsed` class at once (PanelChrome, through vPanelState), because the
// rails measure a panel in the task that opens it. `collapsed` drives the
+3 -4
View File
@@ -1,11 +1,10 @@
<script setup>
import { computed } from 'vue';
// Core's segmented control, with @halfpixel/ui-vue UiSegmented's
// v-model, options, label, stacked and disabled so the two kits can merge.
// Core adds `keyboard`, because its groups keep their own policy: `none`
// Core's segmented control, with v-model, options, label, stacked and
// disabled. It adds `keyboard`, because its groups keep their own policy: `none`
// (Tab reaches every option and arrows do nothing), `arrows` (a roving tab
// stop that arrows move, as in ui-vue) or `radio` (arrows plus Home and
// stop that arrows move) or `radio` (arrows plus Home and
// End). Each option may carry `attrs` (an id, data attributes, a tip), and
// Core's classes sit beside the kit's: `gev-segmented`, `gev-segment` and the
// selected option's `activeClass`. Not mirrored yet: an option's icon.
+1 -2
View File
@@ -16,8 +16,7 @@ function takeModel(select, props) {
}
/**
* Core's select, with @halfpixel/ui-vue UiSelect's v-model, options and
* disabled so the two kits can merge. Core renders the bare select: its
* Core's select, with v-model, options and disabled. Core renders the bare select: its
* labels sit outside it or come as an `aria-label` attribute, so the attribute
* pass translates them. Options come from `options` ({ value, label }) or,
* where they carry their own attributes, the default slot. A change emits the
+3 -4
View File
@@ -18,10 +18,9 @@ function takeModel(input, props) {
}
/**
* Core's slider, with @halfpixel/ui-vue UiSlider's v-model, min, max, step
* and disabled so the two kits can merge. Core keeps the native range input
* (its keyboard, form and styling) where ui-vue draws a `role="slider"`
* track. The input carries Core's `gev-quantitative-slider` class ahead of
* Core's slider, with v-model, min, max, step and disabled. Core keeps the
* native range input (its keyboard, form and styling) rather than drawing a
* `role="slider"` track. The input carries Core's `gev-quantitative-slider` class ahead of
* the caller's (`unstyled` leaves it off, for a range drawn as the browser's
* own), the caller's attributes come first, as in the markup this replaced,
* and the accessible name comes as an `aria-label` attribute so the attribute
+3 -4
View File
@@ -1,8 +1,7 @@
/* Generic components in src/ui/kit. Names follow Halfpixel's ui-vue kit; the
surfaces use this application's glass, accent and type tokens. */
/* Generic components in src/ui/kit. The surfaces use this application's
glass, accent and type tokens. */
/* The thin themed scrollbar every scrolling surface wears, as ui-vue's
.ui-scroll. Without it a surface draws the platform's light scrollbar,
/* The thin themed scrollbar every scrolling surface wears (.ui-scroll). Without it a surface draws the platform's light scrollbar,
because the page declares no dark color-scheme. */
/* Cesium builds its credit list and the rail card builder its lines, so
those two surfaces are named here instead of carrying the class. */