kerfjs 5.0.0-beta.107 → 5.0.0-beta.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -2
- package/ai/manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,13 +8,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
10
|
|
|
11
|
+
- **`--kui-color-brand`.** An application sets one opt-in token on `:root` to change its brand: Kerf derives the brand fill (and the quiet and normal fills and borders mixed from it), on-loud text, brand text and links, brand text on brand fills, and the focus ring, clamping lightness so every pair keeps WCAG AA for any hue and chroma; Web Awesome's `--wa-color-brand-*` and `--wa-color-focus` follow. Unset, every brand token keeps its tuned default exactly. Previously an app that overrode only the brand fill kept the default blue brand text and focus ring (`KF-EM1T5S`).
|
|
12
|
+
- **A wrapped `Toolbar` keeps its height beside a long scroller.** In a `List` shell (a filling List holding a `Toolbar` above a `flex` `scrollable` List), a toolbar that wraps or stacks onto two rows at a phone width no longer shrinks to one control band when the scroller below holds a long page, which clipped its second row. A Toolbar in a List no longer shrinks; the app wrapper (`List flex="none"`) is unnecessary (`KF-0A7B8D`).
|
|
13
|
+
- **`wireWorkbench` focuses an overlay opened from an external toggle.** An overlay rail or drawer opened from a persistent toggle outside the Workbench (an app-bar button whose `aria-controls` names the panel) now receives focus once it becomes focusable. Previously the opening `focus()` ran while the app's render had not yet shown the panel, and the only retry waited for the Workbench's own toggle to be removed, so focus stayed on the toggle behind the overlay. Focus the person has moved elsewhere is never taken (`KF-7QMRFN`).
|
|
14
|
+
- **`ToolbarControlGroup` `visibility="yield-to-priority-row"`.** A trailing group yields exactly while its Toolbar's `responsive="trailing-priority"` row is active, from the same container query as the row at the Toolbar's `responsiveAt`, so an app no longer restates that breakpoint with `hideBelow`. `hideBelow` is strict where the Toolbar's widths are inclusive, so at exactly 704px the row was active while `hideBelow={rem(44)}` still showed the group, which wrapped onto a third row. The contract and selection docs now say so (`KF-Y19A2V`).
|
|
15
|
+
- **A `fill` SearchField keeps a `sizing="grow"` group's basis.** Opening a collapsible `fill` SearchField inside a `ToolbarControlGroup` with `sizing="grow"` no longer makes the group take the whole line, which wrapped every sibling group onto a second row at any toolbar width; the grow basis sizes the group, and `fill` fills the group (`KF-3P3GNH`).
|
|
16
|
+
- **`Toolbar` and `List` `id`; `Chip` `rootAttributes`.** `Toolbar` and `List` take an `id`, so a toolbar above a scrolling list can be named as its chrome in `wireScrollDividers({ targets })` instead of falling back to a permanent `dividerSides`. `Chip` takes safe `data-*` `rootAttributes` on its plain, link, and action roots, for tests and delegated handlers; Chip-owned attributes stay protected (`KF-Q2MKX9`).
|
|
17
|
+
- **`DialogSurface` `alert`.** `alert` marks a confirmation before a destructive action as an alert dialog: the native `<dialog>` renders `role="alertdialog"`, described by its message through `describedBy`. A `rootAttributes` role is still ignored. The catalog shows an Alert Dialog example (`KF-Z0EFSY`).
|
|
18
|
+
- **`SegmentedControl` `disabled`.** A group-level `disabled` makes the whole control unavailable: every segment is disabled and dimmed like an author-disabled choice, the current selection stays visible, and the group reports `aria-disabled`. A choice's own `disabled` still disables just that segment, and a disabled control's `placeholder` stays dimmed. The catalog shows a Disabled example (`KF-DJN15J`).
|
|
11
19
|
- **`KUI-L204`: inset-bearing children inside an embedded `Disclosure`.** `kerf-ui-doctor` (through `eslint-plugin-kerfjs`'s `ui-composition` rule) now reports a block `Text`, or any other child whose catalog geometry owns its margin, border, and padding, written directly inside `Disclosure appearance="embedded"`, where it re-adds the 1px border and 8px padding the owner chrome already provides; the message names `Text flush` / `variant="span"` or inline content as the fix. The check is catalog-driven: composition entries declare `insetFreeChildren` (prop conditions under which direct children must be inset-free) and `insetFreeWhen` (a child's inset-free forms), so a third-party catalog can declare the same contract (`KF-E8PGDQ`).
|
|
12
20
|
- **Inset-free metadata in `create-kerf-component`.** A component package's `kerf.components.json` can now declare `composition.insetFreeChildren` (prop conditions under which a container's direct children must bring no content-item inset) and `composition.insetFreeWhen` (a component's own inset-free forms). `kerf-component-catalog` validates each `{ prop, equals }` condition at its exact metadata path, accepting the same shapes as `@kerfjs/ui`'s catalog validator, and copies both fields into the generated `component-composition.json`, so `kerf-ui-doctor` reports `KUI-L204` for a package-declared inset-free container (`KF-3CCTAQ`).
|
|
13
21
|
- **`Button` `fill`.** `fill` spans a Button across its parent's available inline width instead of sizing it to its label, for a full-width primary action in a form, sheet, or narrow column; it is the same `fill` `SplitButton` takes. The icon and label stay centered as one group, the label ellipsizes once the column is narrower than it, a link Button (`href`) fills the same way, and the default outside focus ring and `focusRingInset` keep their geometry. `data-fill` is protected from `rootAttributes`. The catalog's Button demo and design template show a Full-Width Primary Action (`KF-FXKCHW`).
|
|
14
22
|
- **`Disclosure` `appearance="embedded"`.** A Disclosure inside a `ContentItem` (or other chrome that already owns the content-item inset) no longer frames its content twice: `embedded` drops the Disclosure's own 8px inline margin, 1px border, and 8px summary padding, so the summary row and its `DisclosureArrow` sit on the item's content inset, and the summary becomes a compact 24px-minimum row without a hover fill. The native `<details>` state, Enter/Space toggling, and the arrow's rotation are unchanged; the content (a `flush` `Text`) starts on the title's text column 8px below the summary. The UX catalog shows it in a framed ContentItem (`KF-2JTH1A`).
|
|
15
23
|
- **`ListHeader` `wrap`.** A `ListHeader` label is one ellipsized line by default; `wrap` breaks it onto further lines instead, for a heading whose whole label must stay readable in a narrow column. Wrapped lines keep a 4px block inset inside the unchanged minimum height, and `data-wrap` is protected from `rootAttributes` (`KF-12WBGR`).
|
|
16
24
|
- **`openPopupMenuAt` placement.** `openPopupMenuAt(menu, x, y, { placement })` takes an optional `PopupMenuPlacement` for that opening, so a button-triggered menu (a `ListActionRow` trailing menu opened from the row's `contextmenu`) can open `top-start` above the pointer instead of `bottom-start` below it; the viewport flip, shift, and height cap still apply, and the next opening returns to its trigger and its own placement. Omitted, nothing changes: a button-triggered menu opens `bottom-start` at the point and a context menu at its `placement` (`KF-QGT77X`).
|
|
17
|
-
- **`Button` and `SplitButton` `focusRingInset`.** Inside an ancestor that clips overflow, `focusRingInset` draws the focus ring inside the box (each half's, on a SplitButton) instead of 1px outside it, the same option `Select` takes. The inset ring is two-tone, a 3px surface-colored line inside the ring color, so it keeps 3:1 contrast on a loud fill of its own hue (a single-color inset ring measured 1.0:1 on the brand fill); `data-focus-ring-inset` is protected from `rootAttributes`. The default outside ring is unchanged (`KF-BZE90H`). The line paints the surface the control sits on, through a new foundation surface context (`--kui-color-surface-current`, `--kui-color-surface-current-region`, `--kui-color-surface-current-tint`) that `SunkenPanel`, sunken `Disclosure`, `FramedList`, quiet `ContentItem`s, `List` `surface`, `AnchoredSurface`, dialogs, and sunken `Pane`/`Workbench`/`TabNavigator` regions publish on their own elements, so on a lowered or tinted surface it no longer reads as a light halo (`KF-40SSN2`).
|
|
25
|
+
- **`Button` and `SplitButton` `focusRingInset`.** Inside an ancestor that clips overflow, `focusRingInset` draws the focus ring inside the box (each half's, on a SplitButton) instead of 1px outside it, the same option `Select` takes. The inset ring is two-tone, a 3px surface-colored line inside the ring color, so it keeps 3:1 contrast on a loud fill of its own hue (a single-color inset ring measured 1.0:1 on the brand fill); `data-focus-ring-inset` is protected from `rootAttributes`. The default outside ring is unchanged (`KF-BZE90H`). The line paints the surface the control sits on, through a new foundation surface context (`--kui-color-surface-current`, `--kui-color-surface-current-region`, `--kui-color-surface-current-tint`) that `SunkenPanel`, sunken `Disclosure`, `FramedList`, quiet `ContentItem`s, `List` `surface`, `AnchoredSurface`, dialogs, and sunken `Pane`/`Workbench`/`TabNavigator` regions publish on their own elements, so on a lowered or tinted surface it no longer reads as a light halo (`KF-40SSN2`). Highlighted `FramedList` rows, `TabBar` strips, `Pane` and `TabNavigator` app `background` colors, and glass chrome at rest (overlay Pane headers, NavStack chrome and bottom toolbars, TabNavigator bars, floating dialog headers) publish it too (`KF-MWN5CW`).
|
|
18
26
|
- **Dialog accessible descriptions.** `DialogSurface` takes an optional `describedBy` id, rendered as `aria-describedby` on its native `<dialog>`, so a modal dialog can name its heading `ToolbarText`'s `descriptionId` or app-owned summary copy in its body as its accessible description; `rootAttributes` still takes only `data-*` attributes and cannot set it. `WorkbenchDialog` now describes itself by its title `description` automatically (id `<id>-description`) and takes `describedBy` for other content; `ListDetailDialog` takes `describedBy` (its detail description describes the selection, not the dialog). The catalog's Viewport-Bounded Modal and Floating Title Bar dialogs demonstrate it (`KF-JNV47V`).
|
|
19
27
|
- **`CheckboxGroup` in `@kerfjs/ui`.** `@kerfjs/ui/checkbox-group` puts a labeled set of related options in a native fieldset of `Checkbox`es: a `choices` array with per-choice hints and disabled choices, an array `value` of checked values that all submit under `name`, a group `hint` and `error` (marking the group invalid), `default` or `compact` size, and a stacked or wrapping horizontal `orientation`. It is named by `label`, `ariaLabel`, or `labelledBy` and laid out exactly like `RadioGroup`: each box on the inline-start edge, choices at the shared 28px pitch, hints on the label column. `wa-checkbox-group` now points to it (`KF-JJ80V3`).
|
|
20
28
|
- **`SplitButton` `shape`.** `shape="pill"` fully rounds both outer ends of a SplitButton, the same `rounded` (default) or `pill` choice `Button` takes; the divider between the halves stays square, and each half's hover fill and focus ring follow its rounded end (`KF-4GC1J4`).
|
|
@@ -143,7 +151,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
143
151
|
|
|
144
152
|
- **Web Awesome Carousel specimens show full slides in Firefox.** A `wa-carousel`'s scroll container is a `grid-auto-columns: 100%` track under an aspect ratio, so it has no definite intrinsic width. In the catalog's shrink-to-fit specimen column Chromium and WebKit resolved it from the aspect ratio (a 457px carousel at 1100px), but Firefox sized it to the first slide's text: a 191px carousel with a 103×34px track that clipped "Foundation" and "Focused carousel item" at every width. The Carousel and Carousel Item specimens now take the medium width tier, as the Zoomable Frame specimen does, so every engine renders the same full slides. A three-engine check asserts the track holds the whole slide at 1100px and 320px (`KF-0TGNQG`).
|
|
145
153
|
- **Web Awesome OTP Input cells render whole.** Upstream caps the OTP Input's segments box, which reserves its focus-ring bleed with 4px padding and an equal negative margin, at 100% of the host. In a shrink-to-fit host (the catalog's start-aligned example grid, any start-aligned grid or flex item) the host is only the cells' width minus that bleed, so the padded box was 8px too narrow and silently clipped the last cell's inline-end edge inside its scroll container at every width. `@kerfjs/ui/webawesome.css` caps it at the host's width plus the bleed its negative margins reserve: a host narrower than the code still scrolls, and the `contained` appearance keeps upstream's cap. The catalog's phone-width check now measures the cells inside the shadow root (`KF-SPEQPY`).
|
|
146
|
-
- **Row and Grid catalog specimens fit a 320px phone.** The Row catalog's vertical-alignment rows now `wrap`, so the Baseline Alignment row's taller chips move the third chip to a second line instead of running 13px past the example. The Grid catalog's Four Columns example shows short quarter tiles (`Q1` … `Q4 est.`) that fit a phone-width track instead of process-stage words that ran past their own tiles and up to 11px past the example; its note now says a fixed count suits short content and points longer labels at `minColumnWidth`. Both catalogs join the phone-width overrun check (`KF-37ERTC`).
|
|
154
|
+
- **Row and Grid catalog specimens fit a 320px phone.** The Row catalog's vertical-alignment rows now `wrap`, so the Baseline Alignment row's taller chips move the third chip to a second line instead of running 13px past the example, and the non-wrapping Default, Distribution, and Side-Selectable Insets rows use short `One` / `Two` / `Three` chips, which fit 320px with room to spare even in Linux's wider fallback font (the prefixed `Default three` ran about 15px past the example there) (`KF-JWT4QZ`). The Grid catalog's Four Columns example shows short quarter tiles (`Q1` … `Q4 est.`) that fit a phone-width track instead of process-stage words that ran past their own tiles and up to 11px past the example; its note now says a fixed count suits short content and points longer labels at `minColumnWidth`. Both catalogs join the phone-width overrun check (`KF-37ERTC`).
|
|
147
155
|
- **Catalog labels and specimens fit a 320px phone.** A `CatalogExample` label is a content-width `ListHeader`, and its single unbreakable line set the header's minimum width, so about twenty long labels ("Sunken Workbench Regions Without Pane Chrome", "Accessible Name Without a Visible Label", …) ran past the example and were cut off at the stage edge instead of truncating. The label now wraps through the new `ListHeader` `wrap`. The Web Awesome OTP Input specimen uses the small size, whose six grouped cells fit the 280px specimen column (the default size needs 292px), and the ListHeader catalog's inline-header row wraps its trailing status instead of running 16px past the example (`KF-12WBGR`).
|
|
148
156
|
- **Aligned `CatalogExample` specimens no longer run past the example's end edge.** An aligned example (`align="glyph"`, `"inline-control"`, or `"text-trigger"`) inset each specimen with a start margin, so a full-width specimen — the SearchField catalog's Disabled field, the Select catalog's fill-width Visible Label select, the SegmentedControl catalog's control-width Rounded Rectangle frame — kept its full width and ran 8px past the example at every stage width. The inset is now the example's own grid column: the label and note span the full width and every specimen sits in the inset column, so a percentage width resolves against that column and ends on the example's edge, while specimens keep their own width caps. A page-fixed specimen (the EdgeActivityIndicator strip) no longer picks up the inset either (`KF-EE4WEN`).
|
|
149
157
|
- **`ColorPicker` dark design templates draw a solid opacity track end.** The templates' opacity-track stand-in drew its translucent dark checker squares straight onto the template's transparent background, so in the dark templates they took on the viewer's backdrop and showed through the track's opaque end. The checkerboard now sits on an opaque surface underlay, like the component's own, and fades out toward full opacity in light and dark alike (`KF-MV5GE6`).
|
package/ai/manifest.json
CHANGED
package/package.json
CHANGED