@kerfjs/ui 5.0.0-beta.54 → 5.0.0-beta.55
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/README.md +3 -2
- package/ai/component-catalog-v2.json +58 -1
- package/ai/component-catalog.json +105 -8
- package/ai/public-api-signatures-v1.md +265 -28
- package/ai/skill.md +6 -4
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/popup-menu.js +3 -0
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +10 -4
- package/dist/catalog.js +243 -300
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-7IUSV4XG.js → chunk-24PHKUR3.js} +2 -2
- package/dist/chunk-24PHKUR3.js.map +1 -0
- package/dist/chunk-4BIMLITI.js +92 -0
- package/dist/chunk-4BIMLITI.js.map +1 -0
- package/dist/{chunk-ZK5EGVFP.js → chunk-5OLVUEND.js} +12 -2
- package/dist/chunk-5OLVUEND.js.map +1 -0
- package/dist/{chunk-CMUIXJZM.js → chunk-BSKEH3UC.js} +2 -2
- package/dist/{chunk-CMUIXJZM.js.map → chunk-BSKEH3UC.js.map} +1 -1
- package/dist/chunk-EAX2GSS4.js +384 -0
- package/dist/chunk-EAX2GSS4.js.map +1 -0
- package/dist/chunk-KH6VUGHU.js +399 -0
- package/dist/chunk-KH6VUGHU.js.map +1 -0
- package/dist/{chunk-BJJKFVWW.js → chunk-LZXQVUGN.js} +2 -2
- package/dist/chunk-LZXQVUGN.js.map +1 -0
- package/dist/chunk-N7FHFNT6.js +55 -0
- package/dist/chunk-N7FHFNT6.js.map +1 -0
- package/dist/{chunk-KPNTVB7A.js → chunk-R754MHXX.js} +3 -3
- package/dist/{chunk-KPNTVB7A.js.map → chunk-R754MHXX.js.map} +1 -1
- package/dist/{chunk-HJKRCKDR.js → chunk-RNRUVPJ3.js} +4 -2
- package/dist/chunk-RNRUVPJ3.js.map +1 -0
- package/dist/collapsible-panel.d.ts +40 -13
- package/dist/collapsible-panel.js +41 -10
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -16
- package/dist/list-header.js +1 -1
- package/dist/list-inset-text.d.ts +7 -1
- package/dist/list-inset-text.js +2 -1
- package/dist/panel-toolbar-BFQxFITu.d.ts +52 -0
- package/dist/popup-menu-register.d.ts +9 -0
- package/dist/popup-menu-register.js +30 -0
- package/dist/popup-menu-register.js.map +1 -0
- package/dist/popup-menu.d.ts +71 -0
- package/dist/popup-menu.js +3 -0
- package/dist/popup-menu.js.map +1 -0
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog/components/catalog-example.css +0 -16
- package/dist/styles/catalog/components/catalog-stage.css +8 -13
- package/dist/styles/catalog/components/catalog.css +8 -18
- package/dist/styles/catalog.css +0 -5
- package/dist/styles/popup-menu.css +12 -0
- package/dist/styles/state-banner.css +13 -4
- package/dist/styles/styles.css +1 -0
- package/dist/styles/tab-bar.css +31 -3
- package/dist/styles/toolbar-control-group.css +13 -0
- package/dist/styles/toolbar.css +43 -2
- package/dist/styles/workbench.css +31 -0
- package/dist/text.js +1 -1
- package/dist/token-search-field.d.ts +10 -1
- package/dist/token-search-field.js +1 -1
- package/dist/{types-CEsieBZi.d.ts → types-D6vzj-VT.d.ts} +15 -0
- package/dist/wire-catalog.d.ts +13 -1
- package/dist/wire-catalog.js +18 -3
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-sidebar.js +6 -3
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/wire-workbench.js +1 -350
- package/dist/wire-workbench.js.map +1 -1
- package/dist/workbench.d.ts +107 -6
- package/dist/workbench.js +11 -208
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +12 -1
- package/docs/catalog.md +27 -9
- package/docs/collapsible-panel.md +55 -0
- package/docs/component-contract.md +2 -2
- package/docs/component-selection.md +25 -17
- package/docs/design/templates/state-banner/danger-dark.svg +1 -1
- package/docs/design/templates/state-banner/danger.svg +1 -1
- package/docs/design/templates/state-banner/info-dark.svg +1 -1
- package/docs/design/templates/state-banner/info.svg +1 -1
- package/docs/design/templates/state-banner/success-dark.svg +1 -1
- package/docs/design/templates/state-banner/success.svg +1 -1
- package/docs/design/templates/state-banner/warning-dark.svg +1 -1
- package/docs/design/templates/state-banner/warning.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.svg +1 -1
- package/docs/layout.md +5 -0
- package/docs/recipes.md +44 -37
- package/docs/surface-scaffold.md +1 -1
- package/docs/ux-demo.md +6 -2
- package/docs/workbench.md +92 -7
- package/llms.txt +6 -5
- package/package.json +13 -2
- package/ux-demo/recipes/app-shell.tsx +141 -223
- package/ux-demo/recipes/collapsible-sidebar.tsx +44 -75
- package/ux-demo/recipes/list-detail-dialog.tsx +150 -54
- package/ux-demo/recipes/mount-recipe.ts +0 -5
- package/ux-demo/recipes/types.ts +0 -1
- package/dist/chunk-7IUSV4XG.js.map +0 -1
- package/dist/chunk-BJJKFVWW.js.map +0 -1
- package/dist/chunk-HJKRCKDR.js.map +0 -1
- package/dist/chunk-ZK5EGVFP.js.map +0 -1
- package/dist/styles/catalog/components/catalog-detail.css +0 -35
- package/dist/styles/catalog/components/catalog-resource-footer.css +0 -37
- package/dist/styles/catalog/components/catalog-secondary-sections.css +0 -38
- package/dist/styles/catalog/components/catalog-section-list.css +0 -22
- package/dist/styles/catalog/components/catalog-sidebar.css +0 -82
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.55` and `kerfjs@5.0.0-beta.55`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -351,6 +351,82 @@ declare function FloatingToolbar({ children, label, position, className, slot, }
|
|
|
351
351
|
export { FloatingToolbar, type FloatingToolbarPosition, type FloatingToolbarProps };
|
|
352
352
|
```
|
|
353
353
|
|
|
354
|
+
## `@kerfjs/ui/popup-menu`
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
import { SafeHtml } from 'kerfjs';
|
|
358
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
359
|
+
|
|
360
|
+
type PopupMenuPlacement = 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end';
|
|
361
|
+
type PopupMenuDataAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
362
|
+
'data-action'?: never;
|
|
363
|
+
'data-component'?: never;
|
|
364
|
+
'data-key'?: never;
|
|
365
|
+
'data-morph-skip-children'?: never;
|
|
366
|
+
}>;
|
|
367
|
+
/** One command in the menu. */
|
|
368
|
+
interface PopupMenuItem {
|
|
369
|
+
kind?: 'item';
|
|
370
|
+
label: string;
|
|
371
|
+
/** Delegated `data-action` the app handles when the item is chosen. */
|
|
372
|
+
action?: string;
|
|
373
|
+
/** Native `wa-dropdown-item` value, reported by its `wa-select` event. */
|
|
374
|
+
value?: string;
|
|
375
|
+
/** Leading icon, typically a `LucideIcon`; it is placed in the item's icon slot. */
|
|
376
|
+
icon?: SafeHtml;
|
|
377
|
+
disabled?: boolean;
|
|
378
|
+
/** Application `data-*` metadata such as a record id. */
|
|
379
|
+
attributes?: PopupMenuDataAttributes;
|
|
380
|
+
}
|
|
381
|
+
/** A labeled group heading; items that follow it belong to the group. */
|
|
382
|
+
interface PopupMenuHeading {
|
|
383
|
+
kind: 'heading';
|
|
384
|
+
label: string;
|
|
385
|
+
}
|
|
386
|
+
/** A separator between groups of items. */
|
|
387
|
+
interface PopupMenuDivider {
|
|
388
|
+
kind: 'divider';
|
|
389
|
+
}
|
|
390
|
+
type PopupMenuEntry = PopupMenuItem | PopupMenuHeading | PopupMenuDivider;
|
|
391
|
+
type PopupMenuTriggerName = {
|
|
392
|
+
/** Visible trigger text, which is also its accessible name. */
|
|
393
|
+
text: string;
|
|
394
|
+
label?: never;
|
|
395
|
+
} | {
|
|
396
|
+
text?: never;
|
|
397
|
+
/**
|
|
398
|
+
* Accessible name of an icon-only trigger, rendered as visually hidden
|
|
399
|
+
* slotted text (a Web Awesome button takes its name from its content).
|
|
400
|
+
*/
|
|
401
|
+
label: string;
|
|
402
|
+
};
|
|
403
|
+
type PopupMenuProps = PopupMenuTriggerName & {
|
|
404
|
+
/** Trigger icon, typically a `LucideIcon`, before any visible text. */
|
|
405
|
+
icon?: KerfUiContent;
|
|
406
|
+
items: readonly PopupMenuEntry[];
|
|
407
|
+
/** Where the menu opens relative to its trigger. Defaults to `bottom-start`. */
|
|
408
|
+
placement?: PopupMenuPlacement;
|
|
409
|
+
/** Show the disclosure caret after the trigger content. Defaults to true. */
|
|
410
|
+
caret?: boolean;
|
|
411
|
+
disabled?: boolean;
|
|
412
|
+
/** Application `data-*` metadata on the menu root. */
|
|
413
|
+
rootAttributes?: PopupMenuDataAttributes;
|
|
414
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
415
|
+
slot?: string;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* An action menu: a trigger button that opens a list of commands. Renders the
|
|
419
|
+
* `wa-dropdown` root directly, so a `single` `ToolbarControlGroup` (with
|
|
420
|
+
* `nestedDropdown`) or a `PopupSurface` sizes and insets it as usual. Items
|
|
421
|
+
* dispatch through delegated `data-action`s; the app owns the commands and any
|
|
422
|
+
* open-state reaction. Import `@kerfjs/ui/popup-menu/register` once to register
|
|
423
|
+
* the Web Awesome elements.
|
|
424
|
+
*/
|
|
425
|
+
declare function PopupMenu({ text, label, icon, items, placement, caret, disabled, rootAttributes, slot, }: PopupMenuProps): SafeHtml;
|
|
426
|
+
|
|
427
|
+
export { PopupMenu, type PopupMenuDivider, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps };
|
|
428
|
+
```
|
|
429
|
+
|
|
354
430
|
## `@kerfjs/ui/list-header`
|
|
355
431
|
|
|
356
432
|
```ts
|
|
@@ -656,6 +732,10 @@ import * as kerfjs from 'kerfjs';
|
|
|
656
732
|
import { S as Sides } from './divider-sides-BzB6rphT.js';
|
|
657
733
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
658
734
|
|
|
735
|
+
type ListInsetTextRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
736
|
+
'data-component'?: never;
|
|
737
|
+
'data-sides'?: never;
|
|
738
|
+
}>;
|
|
659
739
|
interface ListInsetTextProps {
|
|
660
740
|
/** Text (or inline content) that carries no margin, border, or padding of its own. */
|
|
661
741
|
children: KerfUiContent | string;
|
|
@@ -669,6 +749,8 @@ interface ListInsetTextProps {
|
|
|
669
749
|
*/
|
|
670
750
|
horizontalOnly?: boolean;
|
|
671
751
|
className?: string;
|
|
752
|
+
/** Safe `data-*` metadata; component-owned structural attributes stay protected. */
|
|
753
|
+
rootAttributes?: ListInsetTextRootAttributes;
|
|
672
754
|
/** Native named-slot assignment when composed inside a web component. */
|
|
673
755
|
slot?: string;
|
|
674
756
|
}
|
|
@@ -680,7 +762,7 @@ interface ListInsetTextProps {
|
|
|
680
762
|
* Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box
|
|
681
763
|
* space for tight text layout.
|
|
682
764
|
*/
|
|
683
|
-
declare function ListInsetText({ children, sides, horizontalOnly, className, slot, }: ListInsetTextProps): kerfjs.SafeHtml;
|
|
765
|
+
declare function ListInsetText({ children, sides, horizontalOnly, className, rootAttributes, slot, }: ListInsetTextProps): kerfjs.SafeHtml;
|
|
684
766
|
|
|
685
767
|
export { ListInsetText, type ListInsetTextProps, Sides };
|
|
686
768
|
```
|
|
@@ -1055,13 +1137,68 @@ export { Pane, type PaneContentElement, type PaneElement, type PaneProps, type P
|
|
|
1055
1137
|
import { SafeHtml } from 'kerfjs';
|
|
1056
1138
|
import { ResizableRegionSeparator, ResizableRegionCollapseMotion, ResizableRegionContentOverflow, ResizableRegionPresentation, ResizableRegionRestorePosition } from './resizable-region.js';
|
|
1057
1139
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
1140
|
+
import { a as PanelToolbar, b as PanelToggle } from './panel-toolbar-BFQxFITu.js';
|
|
1141
|
+
import { ToolbarProps } from './toolbar.js';
|
|
1142
|
+
import './lucide-icon.js';
|
|
1143
|
+
import 'lucide';
|
|
1144
|
+
import './divider-sides-BzB6rphT.js';
|
|
1145
|
+
import './pane.js';
|
|
1146
|
+
|
|
1147
|
+
/** The standard toggle a Workbench renders for a panel (see {@link PanelToggle}). */
|
|
1148
|
+
type WorkbenchPanelToggle = PanelToggle;
|
|
1149
|
+
/**
|
|
1150
|
+
* A Workbench panel's top toolbar, composed by the Workbench so its groups can
|
|
1151
|
+
* follow the panel's open state (see {@link PanelToolbar} for the roles).
|
|
1152
|
+
* A collapsed rail's `constant` groups and toggle go to the leading edge of
|
|
1153
|
+
* `mainToolbar` (left rail) or its trailing edge (right rail); a collapsed
|
|
1154
|
+
* drawer's go to the trailing edge of `mainBottomToolbar`, else to a
|
|
1155
|
+
* `FloatingToolbar` in the work area's bottom-end corner.
|
|
1156
|
+
*/
|
|
1157
|
+
type WorkbenchPanelToolbar = PanelToolbar;
|
|
1158
|
+
/** The work area's top toolbar; collapsed rails add their groups to it. */
|
|
1159
|
+
interface WorkbenchMainToolbar {
|
|
1160
|
+
label: string;
|
|
1161
|
+
/** The work area's title, usually an extra-large `ToolbarText`. */
|
|
1162
|
+
title?: KerfUiContent;
|
|
1163
|
+
/** Groups after the title. */
|
|
1164
|
+
leading?: KerfUiContent;
|
|
1165
|
+
center?: KerfUiContent;
|
|
1166
|
+
/** Groups at the trailing edge, before a collapsed right rail's groups. */
|
|
1167
|
+
trailing?: KerfUiContent;
|
|
1168
|
+
/** The toolbar's narrow-width policy (see `Toolbar.responsive`). */
|
|
1169
|
+
responsive?: ToolbarProps['responsive'];
|
|
1170
|
+
responsiveAt?: ToolbarProps['responsiveAt'];
|
|
1171
|
+
}
|
|
1172
|
+
/** The work area's bottom toolbar; a collapsed drawer adds its groups to it. */
|
|
1173
|
+
interface WorkbenchMainBottomToolbar {
|
|
1174
|
+
label: string;
|
|
1175
|
+
leading?: KerfUiContent;
|
|
1176
|
+
trailing?: KerfUiContent;
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* The work area: the app's `main` under `mainToolbar` (and above
|
|
1180
|
+
* `mainBottomToolbar`), with each collapsed panel's groups added to the
|
|
1181
|
+
* toolbar on its side. Without either toolbar, `main` renders as given.
|
|
1182
|
+
*/
|
|
1183
|
+
/**
|
|
1184
|
+
* Whether the work area's header or footer chrome stays pinned (`fixed`) or
|
|
1185
|
+
* scrolls away with the content (`scroll`).
|
|
1186
|
+
*/
|
|
1187
|
+
type WorkbenchChromePlacement = 'fixed' | 'scroll';
|
|
1058
1188
|
|
|
1059
1189
|
/**
|
|
1060
1190
|
* The Workbench container breakpoint below which a panel presents as an
|
|
1061
1191
|
* overlay: `narrow` (704px or less) or `compact` (448px or less) — the same
|
|
1062
|
-
* breakpoints as `ResizableRegion`'s `responsiveFillAt
|
|
1192
|
+
* breakpoints as `ResizableRegion`'s `responsiveFillAt` — or `never` to keep
|
|
1193
|
+
* it inline at every width.
|
|
1194
|
+
*/
|
|
1195
|
+
type WorkbenchResponsiveOverlayAt = 'compact' | 'narrow' | 'never';
|
|
1196
|
+
/**
|
|
1197
|
+
* How wide a rail's overlay is in a compact (448px or less) Workbench: `inset`
|
|
1198
|
+
* fills the Workbench less a dismiss margin on the side away from the rail's
|
|
1199
|
+
* edge, so a press beside it closes it; `full` fills the Workbench.
|
|
1063
1200
|
*/
|
|
1064
|
-
type
|
|
1201
|
+
type WorkbenchCompactOverlay = 'inset' | 'full';
|
|
1065
1202
|
/** Drag-resize limits for a resizable Workbench panel, in px. */
|
|
1066
1203
|
interface WorkbenchPanelResizable {
|
|
1067
1204
|
/** Smallest size (default 180 for a rail, 120 for the drawer). */
|
|
@@ -1072,6 +1209,14 @@ interface WorkbenchPanelResizable {
|
|
|
1072
1209
|
/** A collapsible Workbench panel — a side rail or the bottom drawer. */
|
|
1073
1210
|
interface WorkbenchPanel {
|
|
1074
1211
|
content: KerfUiContent;
|
|
1212
|
+
/**
|
|
1213
|
+
* The panel's top toolbar, composed by the Workbench: its `constant` groups
|
|
1214
|
+
* and standard `toggle` move to the work area's toolbar while the panel is
|
|
1215
|
+
* collapsed. With it, `content` renders in a `Pane` below the toolbar.
|
|
1216
|
+
*/
|
|
1217
|
+
toolbar?: WorkbenchPanelToolbar;
|
|
1218
|
+
/** Optional bottom toolbar under a `toolbar` panel's content. */
|
|
1219
|
+
footer?: KerfUiContent;
|
|
1075
1220
|
/** Whether the panel is currently collapsed (the app owns this). */
|
|
1076
1221
|
collapsed?: boolean;
|
|
1077
1222
|
/**
|
|
@@ -1097,13 +1242,22 @@ interface WorkbenchPanel {
|
|
|
1097
1242
|
* Present the panel as an overlay, without a separator, below a Workbench
|
|
1098
1243
|
* container breakpoint, and inline above it — the CSS decides, so the app
|
|
1099
1244
|
* needs no device-class check. A rail overlays from its side at full
|
|
1100
|
-
* height
|
|
1245
|
+
* height, over the work area and an open drawer; the bottom drawer
|
|
1246
|
+
* overlays the bottom of the work-area column. Rails default to `narrow`
|
|
1247
|
+
* (pass `never` to keep one inline); the drawer defaults to inline.
|
|
1101
1248
|
*/
|
|
1102
1249
|
responsiveOverlayAt?: WorkbenchResponsiveOverlayAt;
|
|
1250
|
+
/**
|
|
1251
|
+
* A rail's overlay width in a compact Workbench (default `inset`: the
|
|
1252
|
+
* Workbench less `--kui-workbench-overlay-dismiss-margin`, 44px). Ignored
|
|
1253
|
+
* by the drawer.
|
|
1254
|
+
*/
|
|
1255
|
+
compactOverlay?: WorkbenchCompactOverlay;
|
|
1103
1256
|
/**
|
|
1104
1257
|
* Control shown while collapsed, in a safe-area-aware corner of the
|
|
1105
1258
|
* Workbench (not the viewport); the bottom drawer's sits in the work-area
|
|
1106
|
-
* column.
|
|
1259
|
+
* column. Prefer `toolbar.toggle`, which the Workbench relocates into the
|
|
1260
|
+
* work area's toolbar (or this corner when that toolbar is absent).
|
|
1107
1261
|
*/
|
|
1108
1262
|
restoreControl?: SafeHtml;
|
|
1109
1263
|
restorePosition?: ResizableRegionRestorePosition;
|
|
@@ -1118,6 +1272,35 @@ interface WorkbenchProps {
|
|
|
1118
1272
|
label: string;
|
|
1119
1273
|
/** The central work area. */
|
|
1120
1274
|
main: KerfUiContent;
|
|
1275
|
+
/**
|
|
1276
|
+
* The work area's top toolbar. A collapsed left rail's `constant` groups
|
|
1277
|
+
* and toggle lead it; a collapsed right rail's trail it. With it, `main`
|
|
1278
|
+
* renders in a `Pane` below the toolbar.
|
|
1279
|
+
*/
|
|
1280
|
+
mainToolbar?: WorkbenchMainToolbar;
|
|
1281
|
+
/**
|
|
1282
|
+
* Fixed content under `mainToolbar` — supporting copy such as a
|
|
1283
|
+
* description — divided from the scrolling `main` below it.
|
|
1284
|
+
*/
|
|
1285
|
+
mainHeader?: KerfUiContent;
|
|
1286
|
+
/**
|
|
1287
|
+
* Fixed content over `mainBottomToolbar` — a status line or a resource
|
|
1288
|
+
* toolbar — divided from the scrolling `main` above it.
|
|
1289
|
+
*/
|
|
1290
|
+
mainFooter?: KerfUiContent;
|
|
1291
|
+
/**
|
|
1292
|
+
* The work area's bottom toolbar. A collapsed drawer's `constant` groups and
|
|
1293
|
+
* toggle trail it; without it they float in the work area's corner.
|
|
1294
|
+
*/
|
|
1295
|
+
mainBottomToolbar?: WorkbenchMainBottomToolbar;
|
|
1296
|
+
/**
|
|
1297
|
+
* Whether `mainToolbar` and `mainHeader` stay pinned (`fixed`, default) or
|
|
1298
|
+
* scroll away with `main` (`scroll`) — useful where large text would leave
|
|
1299
|
+
* pinned chrome little room.
|
|
1300
|
+
*/
|
|
1301
|
+
mainHeaderPlacement?: WorkbenchChromePlacement;
|
|
1302
|
+
/** The same for `mainFooter` and `mainBottomToolbar` (default `fixed`). */
|
|
1303
|
+
mainFooterPlacement?: WorkbenchChromePlacement;
|
|
1121
1304
|
leftRail?: WorkbenchPanel;
|
|
1122
1305
|
rightRail?: WorkbenchPanel;
|
|
1123
1306
|
bottomDrawer?: WorkbenchPanel;
|
|
@@ -1154,9 +1337,9 @@ interface WorkbenchProps {
|
|
|
1154
1337
|
* lives outside it and stays reachable). A panel may opt in to drag and keyboard resizing with
|
|
1155
1338
|
* `resizable`, which `wireWorkbench` drives. See `docs/23-app-layouts.md` §3.3.
|
|
1156
1339
|
*/
|
|
1157
|
-
declare function Workbench({ id, label, main, leftRail, rightRail, bottomDrawer, mainMinSize, mainMinHeight, className, slot, }: WorkbenchProps): SafeHtml;
|
|
1340
|
+
declare function Workbench({ id, label, main, leftRail, rightRail, bottomDrawer, mainToolbar, mainHeader, mainFooter, mainBottomToolbar, mainHeaderPlacement, mainFooterPlacement, mainMinSize, mainMinHeight, className, slot, }: WorkbenchProps): SafeHtml;
|
|
1158
1341
|
|
|
1159
|
-
export { Workbench, type WorkbenchPanel, type WorkbenchPanelResizable, type WorkbenchProps, type WorkbenchResponsiveOverlayAt };
|
|
1342
|
+
export { Workbench, type WorkbenchChromePlacement, type WorkbenchCompactOverlay, type WorkbenchMainBottomToolbar, type WorkbenchMainToolbar, type WorkbenchPanel, type WorkbenchPanelResizable, type WorkbenchPanelToggle, type WorkbenchPanelToolbar, type WorkbenchProps, type WorkbenchResponsiveOverlayAt };
|
|
1160
1343
|
```
|
|
1161
1344
|
|
|
1162
1345
|
## `@kerfjs/ui/wire-workbench`
|
|
@@ -1277,24 +1460,24 @@ export { type WireWorkbenchOptions, type WireWorkbenchPanel, type WorkbenchPanel
|
|
|
1277
1460
|
|
|
1278
1461
|
```ts
|
|
1279
1462
|
import { SafeHtml } from 'kerfjs';
|
|
1280
|
-
import {
|
|
1463
|
+
import { P as PanelSide, a as PanelToolbar, b as PanelToggle } from './panel-toolbar-BFQxFITu.js';
|
|
1464
|
+
export { c as collapsiblePanelToggleIcon } from './panel-toolbar-BFQxFITu.js';
|
|
1281
1465
|
import { ResizableRegionSeparator, ResizableRegionCollapseMotion, ResizableRegionContentOverflow, ResizableRegionPresentation, ResizableRegionRestorePosition } from './resizable-region.js';
|
|
1282
1466
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
1467
|
+
import './lucide-icon.js';
|
|
1283
1468
|
import 'lucide';
|
|
1284
1469
|
|
|
1285
1470
|
/** Which edge a {@link CollapsiblePanel} docks to. */
|
|
1286
|
-
type CollapsiblePanelSide =
|
|
1471
|
+
type CollapsiblePanelSide = PanelSide;
|
|
1472
|
+
/** The standard toggle a panel toolbar renders (see {@link CollapsiblePanelToolbar}). */
|
|
1473
|
+
type CollapsiblePanelToolbarToggle = PanelToggle;
|
|
1287
1474
|
/**
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1290
|
-
* `
|
|
1291
|
-
*
|
|
1292
|
-
* collapsed. Exposed so an app can render its own toggle affordance.
|
|
1475
|
+
* A panel's composed top toolbar. `title` and `panelOnly` groups lead it and
|
|
1476
|
+
* are available only while the panel is open; `constant` groups and the
|
|
1477
|
+
* standard `toggle` trail it while open and move to the app's work-area
|
|
1478
|
+
* toolbar — through {@link CollapsiblePanelRelocated} — while it is collapsed.
|
|
1293
1479
|
*/
|
|
1294
|
-
|
|
1295
|
-
icon: Parameters<typeof LucideIcon>[0]['icon'];
|
|
1296
|
-
name: string;
|
|
1297
|
-
};
|
|
1480
|
+
type CollapsiblePanelToolbar = PanelToolbar;
|
|
1298
1481
|
interface CollapsiblePanelToggleProps {
|
|
1299
1482
|
/** The panel this toggle controls. */
|
|
1300
1483
|
side: CollapsiblePanelSide;
|
|
@@ -1331,6 +1514,15 @@ interface CollapsiblePanelProps {
|
|
|
1331
1514
|
label?: string;
|
|
1332
1515
|
/** Panel content. */
|
|
1333
1516
|
children?: KerfUiContent;
|
|
1517
|
+
/**
|
|
1518
|
+
* The panel's top toolbar, composed so its groups follow the panel's open
|
|
1519
|
+
* state. With it, `children` renders in a `Pane` below the toolbar; render
|
|
1520
|
+
* {@link CollapsiblePanelRelocated} in the app's work-area toolbar so the
|
|
1521
|
+
* `constant` groups and toggle stay reachable while the panel is collapsed.
|
|
1522
|
+
*/
|
|
1523
|
+
toolbar?: CollapsiblePanelToolbar;
|
|
1524
|
+
/** Optional bottom toolbar under a `toolbar` panel's content. */
|
|
1525
|
+
footer?: KerfUiContent;
|
|
1334
1526
|
separator?: ResizableRegionSeparator;
|
|
1335
1527
|
collapseMotion?: ResizableRegionCollapseMotion;
|
|
1336
1528
|
contentOverflow?: ResizableRegionContentOverflow;
|
|
@@ -1356,9 +1548,27 @@ interface CollapsiblePanelProps {
|
|
|
1356
1548
|
* and persistence semantics, and with `CollapsiblePanelToggle` for the standard
|
|
1357
1549
|
* affordance. See `ui/docs/collapsible-panel.md` and `docs/23-app-layouts.md`.
|
|
1358
1550
|
*/
|
|
1359
|
-
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, separator, collapseMotion, contentOverflow, presentation, restoreControl, restorePosition, className, }: CollapsiblePanelProps): SafeHtml;
|
|
1551
|
+
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, toolbar, footer, separator, collapseMotion, contentOverflow, presentation, restoreControl, restorePosition, className, }: CollapsiblePanelProps): SafeHtml;
|
|
1552
|
+
interface CollapsiblePanelRelocatedProps {
|
|
1553
|
+
/** The panel's `id`. */
|
|
1554
|
+
panelId: string;
|
|
1555
|
+
side: CollapsiblePanelSide;
|
|
1556
|
+
/** The panel's current collapsed state. */
|
|
1557
|
+
collapsed: boolean;
|
|
1558
|
+
/** The same `toolbar` the panel receives. */
|
|
1559
|
+
toolbar: CollapsiblePanelToolbar;
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* A collapsed {@link CollapsiblePanel}'s `constant` groups and standard
|
|
1563
|
+
* toggle, for the app's work-area toolbar — nothing while the panel is open.
|
|
1564
|
+
* Put it first in the leading zone for a left rail, last in the trailing zone
|
|
1565
|
+
* for a right rail, and last in a bottom toolbar (or a `FloatingToolbar`
|
|
1566
|
+
* `restoreControl`) for a bottom drawer. `wireSidebar` hands focus to it when
|
|
1567
|
+
* the panel closes from its own toggle.
|
|
1568
|
+
*/
|
|
1569
|
+
declare function CollapsiblePanelRelocated({ panelId, side, collapsed, toolbar, }: CollapsiblePanelRelocatedProps): SafeHtml;
|
|
1360
1570
|
|
|
1361
|
-
export { CollapsiblePanel, type CollapsiblePanelProps, type CollapsiblePanelSide, CollapsiblePanelToggle, type CollapsiblePanelToggleProps,
|
|
1571
|
+
export { CollapsiblePanel, type CollapsiblePanelProps, CollapsiblePanelRelocated, type CollapsiblePanelRelocatedProps, type CollapsiblePanelSide, CollapsiblePanelToggle, type CollapsiblePanelToggleProps, type CollapsiblePanelToolbar, type CollapsiblePanelToolbarToggle };
|
|
1362
1572
|
```
|
|
1363
1573
|
|
|
1364
1574
|
## `@kerfjs/ui/wire-sidebar`
|
|
@@ -1628,12 +1838,18 @@ export { DEFAULT_BREAKPOINTS, type DeviceBreakpoints, type DeviceClass, type Dev
|
|
|
1628
1838
|
```ts
|
|
1629
1839
|
import * as kerfjs from 'kerfjs';
|
|
1630
1840
|
import { SafeHtml } from 'kerfjs';
|
|
1631
|
-
import { a as CatalogProps } from './types-
|
|
1632
|
-
export { b as CatalogBrand, c as CatalogEntry, d as CatalogRelated, C as CatalogResource, e as CatalogSecondaryGroup, f as CatalogSection, g as CatalogStageRootAttributes } from './types-
|
|
1841
|
+
import { a as CatalogProps } from './types-D6vzj-VT.js';
|
|
1842
|
+
export { b as CatalogBrand, c as CatalogEntry, d as CatalogRelated, C as CatalogResource, e as CatalogSecondaryGroup, f as CatalogSection, g as CatalogStageRootAttributes } from './types-D6vzj-VT.js';
|
|
1633
1843
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
1634
1844
|
|
|
1635
|
-
/**
|
|
1636
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* Controlled, stateless component-catalog shell: a `Workbench` whose left rail
|
|
1847
|
+
* is the catalog navigation and whose work area is the active entry — its
|
|
1848
|
+
* toolbar, description, preview stage, and resource footer. The sidebar's
|
|
1849
|
+
* standard toggle moves into the entry toolbar while it is collapsed, and on
|
|
1850
|
+
* a small screen the sidebar overlays the stage like any Workbench rail.
|
|
1851
|
+
*/
|
|
1852
|
+
declare function Catalog({ id, brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, geometryOverlay, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, headerPlacement, footerPlacement, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
1637
1853
|
|
|
1638
1854
|
/** How a specimen aligns its visible edge with its `ListHeader` label. */
|
|
1639
1855
|
type CatalogExampleAlign = 'glyph' | 'inline-control' | 'none';
|
|
@@ -1704,7 +1920,7 @@ export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleP
|
|
|
1704
1920
|
## `@kerfjs/ui/catalog-resources`
|
|
1705
1921
|
|
|
1706
1922
|
```ts
|
|
1707
|
-
import { C as CatalogResource } from './types-
|
|
1923
|
+
import { C as CatalogResource } from './types-D6vzj-VT.js';
|
|
1708
1924
|
import './semantic-content-BbzjvSu9.js';
|
|
1709
1925
|
import 'kerfjs';
|
|
1710
1926
|
|
|
@@ -1744,6 +1960,8 @@ export { type CatalogGuidanceKind, type CatalogResourceKind, type CatalogResourc
|
|
|
1744
1960
|
## `@kerfjs/ui/wire-catalog`
|
|
1745
1961
|
|
|
1746
1962
|
```ts
|
|
1963
|
+
import { Signal } from 'kerfjs';
|
|
1964
|
+
|
|
1747
1965
|
interface WireCatalogOptions {
|
|
1748
1966
|
/** Invoked with the entry id when a sidebar item or a related-entry option is chosen. */
|
|
1749
1967
|
onSelect: (id: string) => void;
|
|
@@ -1764,6 +1982,16 @@ interface WireCatalogOptions {
|
|
|
1764
1982
|
toggleSidebarAction?: string;
|
|
1765
1983
|
toggleThemeAction?: string;
|
|
1766
1984
|
toggleSecondaryAction?: string;
|
|
1985
|
+
/**
|
|
1986
|
+
* The sidebar's app-owned collapsed flag. With it, the catalog's Workbench
|
|
1987
|
+
* sidebar is wired like any Workbench rail: it becomes a transient overlay
|
|
1988
|
+
* on a small screen (collapsed as the breakpoint applies, closed on Escape
|
|
1989
|
+
* or a press outside, focus handed back), and choosing an entry from the
|
|
1990
|
+
* open overlay closes it.
|
|
1991
|
+
*/
|
|
1992
|
+
collapsed?: Signal<boolean>;
|
|
1993
|
+
/** The Catalog's `id`, when it is not the default `kui-catalog`. */
|
|
1994
|
+
id?: string;
|
|
1767
1995
|
}
|
|
1768
1996
|
interface CatalogRevealOptions {
|
|
1769
1997
|
/** Scroll alignment within the sidebar. Default `'nearest'`. */
|
|
@@ -1798,7 +2026,7 @@ declare function wireCatalogGeometryOverlay(root: HTMLElement): () => void;
|
|
|
1798
2026
|
* them in the callbacks; optionally mirror the active id into the URL via `urlParam`.
|
|
1799
2027
|
* Returns a disposer.
|
|
1800
2028
|
*/
|
|
1801
|
-
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleSecondary, urlParam, revealSelection, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, }: WireCatalogOptions): () => void;
|
|
2029
|
+
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleSecondary, urlParam, revealSelection, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, collapsed, id: catalogId, }: WireCatalogOptions): () => void;
|
|
1802
2030
|
|
|
1803
2031
|
export { type CatalogRevealOptions, type WireCatalogOptions, revealCatalogEntry, wireCatalog, wireCatalogGeometryOverlay };
|
|
1804
2032
|
```
|
|
@@ -2066,6 +2294,15 @@ interface TokenSearchFieldBaseProps {
|
|
|
2066
2294
|
label: string;
|
|
2067
2295
|
query?: string;
|
|
2068
2296
|
tokens?: readonly TokenSearchToken[];
|
|
2297
|
+
/**
|
|
2298
|
+
* Editor identity for a programmatic text replacement. The editor's text is
|
|
2299
|
+
* DOM-owned between token changes, so a new `query` with the same tokens
|
|
2300
|
+
* does not re-render it (that would reset the caret on every keystroke).
|
|
2301
|
+
* Change `revision` when the app replaces the text itself — reseeding a
|
|
2302
|
+
* persistent dialog's field on reopen, applying a saved search — and the
|
|
2303
|
+
* editor is rebuilt from `query` and `tokens`.
|
|
2304
|
+
*/
|
|
2305
|
+
revision?: string | number;
|
|
2069
2306
|
placeholder?: string;
|
|
2070
2307
|
tokenPlaceholder?: string;
|
|
2071
2308
|
disabled?: boolean;
|
|
@@ -2101,7 +2338,7 @@ interface TokenSearchFieldValue {
|
|
|
2101
2338
|
query: string;
|
|
2102
2339
|
tokens: TokenSearchToken[];
|
|
2103
2340
|
}
|
|
2104
|
-
declare function TokenSearchField({ id, label, query, tokens, placeholder, tokenPlaceholder, disabled, autofocus, collapsible, expanded, expandAction, expandLabel, leading, trailing, presentation, editAction, removeAction, clearAction, clearLabel, className, editorAttributes, slot, }: TokenSearchFieldProps): kerfjs.SafeHtml;
|
|
2341
|
+
declare function TokenSearchField({ id, label, query, tokens, revision, placeholder, tokenPlaceholder, disabled, autofocus, collapsible, expanded, expandAction, expandLabel, leading, trailing, presentation, editAction, removeAction, clearAction, clearLabel, className, editorAttributes, slot, }: TokenSearchFieldProps): kerfjs.SafeHtml;
|
|
2105
2342
|
/** Read editable text and ordered token offsets from a rendered TokenSearchField editor. */
|
|
2106
2343
|
declare function readTokenSearchField(editor: HTMLElement, knownTokens?: readonly TokenSearchToken[]): TokenSearchFieldValue;
|
|
2107
2344
|
/** Focus an editor and place its caret at a text offset, skipping atomic token chips. */
|
package/ai/skill.md
CHANGED
|
@@ -101,6 +101,7 @@ Quick routing:
|
|
|
101
101
|
| Loading placeholder | a component's `placeholder` prop, or `Skeleton` | Set `placeholder` on a value-bearing component (`Select`, `ListHeader`, `ListItem`, `ValueTableRow`, `SegmentedControl`, `StateBanner`, `AppTab`, `ToolbarText`, `ListActionRow`) to render its real chrome with value slots as subtle **unanimated** skeletons and interactivity disabled; only unknown values change, so a placeholder is never dimmed or styled as disabled (a control whose own `disabled` / `trailingActionDisabled` / choice `disabled` / `actionDisabled` prop is set keeps its live disabled tone via the reserved `data-kui-disabled` marker) — do not hand-rebuild an empty state. Component-drawn chrome stays live too: a `ListItem` or `ListActionRow` placeholder keeps its `busy` spinner while its `status` text (and a `ListItem`'s `trailing` content, always a value) becomes a skeleton. `Skeleton` is the standalone block for a custom slot. A known `AppTab` that is still opening takes `pending` instead: it keeps its name (quiet, and as its accessible name) and the same geometry, shows your `trailing` spinner, and stays selectable (close and drag disabled) so your panel can show placeholders until it loads. Use `LoadingSpinner` for known busy activity, not a skeleton; never animate a skeleton; prefer it over `wa-skeleton`. |
|
|
102
102
|
| Adjustable or asymmetric columns | `ResizableRegion` or CSS grid | Use `ResizableRegion` only for a user-operable controlled separator, CSS grid for asymmetric/intrinsic tracks, and `Grid` for static equal-width tracks. |
|
|
103
103
|
| Structured or ordinary search | `TokenSearchField` or an input | Use token search only when text and ordered filter chips form one editor. |
|
|
104
|
+
| Command menu | `PopupMenu` | Put it in a `single` `ToolbarControlGroup` with `nestedDropdown`; register `@kerfjs/ui/popup-menu/register` once. Use `Select` when the user chooses a persistent value. |
|
|
104
105
|
| Key/value facts | `ValueTable` with `ValueTableRow` | Use rows with `icon` only when the optional 24px leading visual adds context. |
|
|
105
106
|
| Command search | Application-local semantics using shared layout vocabulary | No runtime component or production recipe is exported; the app owns behavior, policy, and copy. |
|
|
106
107
|
|
|
@@ -146,19 +147,19 @@ Hard rules:
|
|
|
146
147
|
8. `ResizableRegion` uses `wireResizableRegions()` for Arrow, Shift+Arrow, Home/End, and pointer behavior. The app owns size persistence. `handleIcon` replaces decorative dormant glyph content only. Set `responsiveFillAt="narrow"` or `"compact"` when a responsive composition exposes the pane as its only inline track; the component fills that track and hides its dormant separator. For compact overlays, set `presentation="overlay"` and the overlay maximum variables. A lone child (normally a `Pane`) fills the region and owns scrolling; several children stack at natural height. Do not add descendant width/height overrides.
|
|
147
148
|
9. Use controlled `SegmentedControl` for a small exclusive choice set. Select `appearance="toolbar"` when nesting it inside `ToolbarControlGroup`; use rounded or pill shapes for standalone contexts. The package derives inset hover/selection radii from the owning outer shape through `--kui-layout-highlight-inset`; do not restyle an inner highlight to an independent radius. Handle its action, update `value`, keep meaningful choice labels, and preserve every enabled native button in sequential Tab order.
|
|
148
149
|
10. Compose `AppTab` inside controlled `TabBar`; call `wireTabBars()` once and retain its disposer. It owns same-bar drag mechanics, including proximity-based horizontal edge autoscroll, while the app applies `onReorder` and owns order, selection, panels, close policy, routing, and persistence. For a tab-local action followed by a separately pinned workspace action, set `trailingPlacement="adjacent"`, put the local action in `trailing`, and the workspace action in `end`; TabBar owns the shrinking/scrolling tabs and fixed action geometry, so do not add descendant flex overrides. Arrow/Home/End select on move by default and restore focus by bar/tab identity when controlled activation replaces the strip; pass `activation: 'manual'` (or `TabBar activation="manual"` per strip) so arrow keys move focus only and the user selects with Enter/Space/click — use it when selecting a tab is a heavy action. Use runtime-filtered `rootAttributes` for domain metadata and keep an optional `closeIcon` decorative and noninteractive.
|
|
149
|
-
11. Use token-controlled `TokenSearchField` when free text and removable structured filters share one editor. Editable text stays DOM-owned between token changes. The leading icon, first text line, clear action, and trailing slot share one fixed row when content wraps. The app owns parsing and suggestions; call `readTokenSearchField()` on input, empty `textContent` on clear, use `placeTokenSearchCaret()` after explicit controlled focus changes, and call `wireTokenSearchFields()` once so Enter submits without inserting a line break and keyboard chip deletion restores focus plus the text-relative caret after controlled replacement. Enable `collapsible` for an animated iconic closed state, standalone or inside `ToolbarControlGroup`; the field keeps text or tokens expanded, and `wireTokenSearchFields()` manages the transient expand/collapse/focus by default (activate to reveal + focus, Escape or empty blur to collapse). Bind the field's `expanded` to the returned handle's `expanded(id)` signal or adopt your own via `collapsible.signals`; opt a behavior out only when the app must own it. Do not hand-roll the open handler, the focusout collapse, a clear-button mousedown guard, or reopening after controlled clear or Select All deletion — the helper keeps the replacement editor open and focused. Clear and deletion restoration finish at the replacement mutation checkpoint before the next input task, so shortcut-letter typing cannot escape to the page and delayed animation frames cannot overwrite a later selection. Persist both query and tokens returned by the DOM read. For real-app adoption it also provides a focusout keep-open exception (`data-token-search-keep-open` regions or `collapsible.keepOpenOn(target)`, so a sibling suggestions/date/help surface does not collapse an empty field), opt-in atomic-chip keyboard (`keyboard`: Backspace/Delete remove the adjacent chip via `onRemoveToken`, ArrowRight moves the caret past a trailing chip), and an `onEdit({id, editor, event})` input callback (the `InputEvent` lets you gate on `inputType`/`data`) — reach for these instead of re-adding hand-rolled keydown/input handlers around the field.
|
|
150
|
+
11. Use token-controlled `TokenSearchField` when free text and removable structured filters share one editor. Editable text stays DOM-owned between token changes; to replace the text programmatically (reseeding a persistent dialog's field on reopen, applying a saved search) change the field's `revision` along with `query`, never re-key a wrapper. The leading icon, first text line, clear action, and trailing slot share one fixed row when content wraps. The app owns parsing and suggestions; call `readTokenSearchField()` on input, empty `textContent` on clear, use `placeTokenSearchCaret()` after explicit controlled focus changes, and call `wireTokenSearchFields()` once so Enter submits without inserting a line break and keyboard chip deletion restores focus plus the text-relative caret after controlled replacement. Enable `collapsible` for an animated iconic closed state, standalone or inside `ToolbarControlGroup`; the field keeps text or tokens expanded, and `wireTokenSearchFields()` manages the transient expand/collapse/focus by default (activate to reveal + focus, Escape or empty blur to collapse). Bind the field's `expanded` to the returned handle's `expanded(id)` signal or adopt your own via `collapsible.signals`; opt a behavior out only when the app must own it. Do not hand-roll the open handler, the focusout collapse, a clear-button mousedown guard, or reopening after controlled clear or Select All deletion — the helper keeps the replacement editor open and focused. Clear and deletion restoration finish at the replacement mutation checkpoint before the next input task, so shortcut-letter typing cannot escape to the page and delayed animation frames cannot overwrite a later selection. Persist both query and tokens returned by the DOM read. For real-app adoption it also provides a focusout keep-open exception (`data-token-search-keep-open` regions or `collapsible.keepOpenOn(target)`, so a sibling suggestions/date/help surface does not collapse an empty field), opt-in atomic-chip keyboard (`keyboard`: Backspace/Delete remove the adjacent chip via `onRemoveToken`, ArrowRight moves the caret past a trailing chip), and an `onEdit({id, editor, event})` input callback (the `InputEvent` lets you gate on `inputType`/`data`) — reach for these instead of re-adding hand-rolled keydown/input handlers around the field.
|
|
150
151
|
12. Demo work uses public production component subpaths and their browser-selected CSS. Focused demos and recipes have no local stylesheet, inline style, or styling-only class; use public components and `CatalogExample.viewport` for unavoidable specimen constraints (a recipe declares its frame through its exported `presentation`). When a recipe needs a capability no component offers, report the component gap instead of adding CSS. Use exactly three demo kinds: a `component` is one component with variants/states, a `composition` is a focused container of components commonly used together, and a `recipe` is the recommended production approach to a task. Organize catalog routes into product-important functional groups; within each group put all components before compositions, order each kind by importance with display-name alphabetical tie-breaking, and put recipes after every component/composition group. Show `Composition` as an entry tag instead of repeating the word in its name. Give every public visual component its own category-grouped catalog route; list themed third-party components under a clearly labeled collapsible ecosystem section, with a focused route for each. For the complete taxonomy, focused/composition decision, `CatalogExample` / `CatalogExampleStack` row/group nesting, exact specimen selection, geometry-overlay legend and exclusions, skip-marker behavior, and metadata ownership, follow the single [Catalog demo authoring contract](../docs/catalog.md#catalog-demo-authoring-contract), discovered machine-readably through [`catalog-authoring.json`](./catalog-authoring.json). Never infer structure from private `kui-catalog-*` classes. Project each component's deterministic repository-relative demo source and existing documentation path so the detail can expose `View demo source` and `Read guidance` links without a runtime export; also derive first-party component implementation paths from their canonical browser imports, and label Web Awesome documentation as Kerf integration guidance. Declare direct `uses` relationships so `Used by` stays derivable, and theme shell chrome through the same semantic tokens as the stage instead of drawing a substitute. Enable `wireCatalog({ revealSelection: true })` for long desktop sidebars so controlled selections remain visible without moving focus; keep its default compact media guard unless compact scrolling is an explicit product behavior, and use `revealCatalogEntry` for an initial deep link.
|
|
151
152
|
13. The Web Awesome theme makes Tooltip and Popover arrowless by default. Keep that default unless a pointer materially clarifies the anchor; opt back in with `--wa-tooltip-arrow-size`, `--kui-wa-popover-arrow-size`, or a popover's public `--arrow-size`, and use `without-arrow` when local no-arrow intent should survive theme changes. Its non-field chrome uses `--kui-wa-control-inset` (8px controls/items), `--kui-wa-surface-margin` / `--kui-wa-surface-inset` (8px around/inside Accordion, Card, Details, Callout, and Include), and `--kui-wa-container-inset` (16px Tab Panel content and framed disclosure regions). Plain Details use the 8px surface inset on the trigger and keep the body flush; plain Accordion items use it on both trigger and body. Outlined and sunken Details use the 16px container inset on the trigger and 8px on the body; framed Accordion items use 16px on both. Dialog maps its body to the 8px surface tier and its footer to the 16px container tier independently of `--spacing`. Override those tiers instead of restyling individual parts. Filled badges use each variant's quiet fill with normal text so their compact copy stays WCAG-AA readable; override the pair with `--kui-wa-badge-filled-background` / `--kui-wa-badge-filled-foreground`, not host selectors. When a dialog provides another dismissal affordance, put `hide-actions` on the `wa-dialog` host to hide its directly exported `header-actions` part; never chain `::part()` selectors through internal parts. Checkbox and Radio Group option regions, the Color Picker trigger, and Slider's complete interactive region receive the shared 8px logical inline outer inset because those controls have no bordered field shell. Known Date field captions and bordered text-like field hints align with values at the 9px border-plus-padding inset. OTP Input's label uses the same uppercase xs/650 treatment as other field labels, and both its label and hint use that 9px inset.
|
|
152
153
|
14. Treat the complete Web Awesome catalog as support coverage, not a recommendation list. Its UX sidebar marks superseded and exceptional entries `Discouraged`. Consider Popup when it replaces custom anchored positioning. Prefer Kerf `Select` over direct Dropdown/Dropdown Item/Select/Option composition, `SegmentedControl` over Button Group, `TabBar` or `SegmentedControl` over Web Awesome Tabs, `LucideIcon` over Web Awesome Icon, and `ResizableRegion` over Split Panel. Use Tree/Tree Item, Animated Image, and Comparison only for a specific required behavior; avoid Zoomable Frame.
|
|
153
154
|
15. Build sidebars, main areas, inspectors, and dialogs from `@kerfjs/ui/layout.css`: an unpadded `.kui-pane`, optional `.kui-pane__toolbar`, one scrolling `.kui-pane__content`, and optional `.kui-pane__footer`. Use `Row` instead of a hand-written flex-row wrapper, `List` instead of a hand-written flex-column wrapper, and `Grid` instead of repeated equal-track CSS when children need a fixed positive count of evenly distributed columns. `Row` defaults to left/full with an `xs` gap and no wrapping; Grid defaults to an `xs` gap and keeps each track at `minmax(0, 1fr)`; List retains full/top and zero-gap defaults. The app owns Grid's responsive column-count changes. When a Row, List, or Grid is the layout root of a definite-height parent (an app root or a fixed-height frame), pass `fill` so it takes that full height, and put route/test/recipe `data-*` markers in its `rootAttributes`; never wrap a layout in a frame `Pane` just for height or a root attribute, because its content slot becomes a scroll owner that never scrolls. Inside a flex layout use `flex`, not `fill`. Use `List` when rows or sections also need flex growth, one vertical scroll owner, or physical-edge dividers. `dividerSides`, `textInsets`, and `controlInsets` use canonical physical `t`/`r`/`b`/`l` order; text geometry wins where text and control selections overlap. `ListInsetText` and `ListInsetControl` inset all four sides by default and accept the same `sides` grammar for selective edges. A dialog body is generally a `List`: set `DialogSurface bodyInset="none"` when its list children own geometry, and wrap bare dialog prose in `ListInsetText` so it aligns with bordered siblings without a second inset. Add `.kui-content` for 24px major vertical separation and `.kui-content-item` for a child-owned 8px inline margin, 1px transparent-or-visible border, 8px padding, and 12px radius. Use the pill modifier for 22px. Do not pad pane shells, duplicate item geometry in wrappers, or create nested scroll owners.
|
|
154
155
|
15a. Use `Text` from `@kerfjs/ui/text` for ordinary headings, paragraphs, and inline secondary text outside toolbar title zones. Omit `variant` for the default `p`, pass `h1`–`h6` according to the document outline, or use `variant="span"` inside a row, label, or table cell; ordinary native attributes pass through. Express supporting, error, compact, or code text with the independent finite `tone="quiet|danger"`, `size="compact"`, and `font="monospace"` props instead of global utility classes or appearance-only heading choices. Block Text variants own a transparent 1px border and the standard item padding; `span` owns no box geometry. Keep toolbar identity/title content on `ToolbarText` and list-aligned bare prose on `ListInsetText`. `ToolbarText` below `xlarge` is intentionally quiet identity text with no tone option; a normal-color subsection title is `Text` with an `h2`–`h6` variant (or `ListHeader` for a list or menu section), never a recolored `ToolbarText`.
|
|
155
156
|
16. Keep a visible collapsible pane's collapse control in its own toolbar. When hidden, move its restore control into the adjacent main toolbar on the corresponding logical edge: leading for an inline-start sidebar and trailing for an inline-end inspector. Collapse the pane completely; do not preserve an empty icon-only rail.
|
|
156
|
-
17. The only direct children of a `Toolbar` zone (`leading`/`center`/`trailing`) are `ToolbarText` (identity/title text) and `ToolbarControlGroup`; never drop bare buttons, inputs, links, or arbitrary markup straight into a zone. Put identity/title text directly in the zone as `ToolbarText`; wrap interactive controls and icon tiles in `ToolbarControlGroup`. `SegmentedControl`, `Select`, a collapsible `TokenSearchField`, and Web Awesome controls all live inside a group. Configure zone behavior with `Toolbar.centerAlign` and its `responsive` / `responsiveAt` policy instead of selecting toolbar zone classes. No policy clips an action: trailing (and stacked center) zones wrap whole groups onto another row, so never hide or shrink a toolbar control to make it fit; use `responsive="wrap"` for a heading whose title must stay whole, and move genuinely lower-priority commands into an app-owned "More" popup menu. For an ordinary icon/action control inside a group, use a plain `<button>` (the group styles `> button` fully) — that is the default; reach for `wa-button` only when you need a Web Awesome feature
|
|
157
|
+
17. The only direct children of a `Toolbar` zone (`leading`/`center`/`trailing`) are `ToolbarText` (identity/title text) and `ToolbarControlGroup`; never drop bare buttons, inputs, links, or arbitrary markup straight into a zone. Put identity/title text directly in the zone as `ToolbarText`; wrap interactive controls and icon tiles in `ToolbarControlGroup`. `SegmentedControl`, `Select`, a collapsible `TokenSearchField`, and Web Awesome controls all live inside a group. Configure zone behavior with `Toolbar.centerAlign` and its `responsive` / `responsiveAt` policy instead of selecting toolbar zone classes. No policy clips an action: trailing (and stacked center) zones wrap whole groups onto another row, so never hide or shrink a toolbar control to make it fit; use `responsive="wrap"` for a heading whose title must stay whole, and move genuinely lower-priority commands into an app-owned "More" popup menu. For an ordinary icon/action control inside a group, use a plain `<button>` (the group styles `> button` fully) — that is the default; reach for `wa-button` only when you need a Web Awesome feature. A popup menu in a toolbar is a `PopupMenu` (`@kerfjs/ui/popup-menu`, registered once via `@kerfjs/ui/popup-menu/register`) in a `single` group with `nestedDropdown` and a `menuInset`: give it typed `items` (commands with `action`s, `heading`s, `divider`s) and a trigger `icon` plus visible `text` or an accessible `label`; never hand-write `wa-dropdown` / `wa-dropdown-item` markup for a menu. Let the group size that trigger from its icon, localized text, and caret; do not force a width on the menu or button. For a compact mixed group, keep the standard item padding and raised selected chrome; the selected item paints over the outer border without an internal separator. For an avatar control, set `content="avatar"` and `avatarImage` on the group instead of inserting an `img`: a lone control paints the contained image on the outer group and a multi-button group paints it only on the pressed selection highlight. Compose panel/dialog/page headings with a direct extra-large `ToolbarText`, optional grouped icon, grouped trailing controls, and app-owned supporting copy below. A non-interactive heading icon is an icon tile: put the `LucideIcon` directly in its `ToolbarControlGroup` (it takes an icon button's 40px slot and centers), never inside a `<button>` that does nothing. A group remains 44px outside (`calc(2px + remify(42px))`) when its border/background are transparent; use 8px between groups and inside items. Each zone item sits in the toolbar's top 44px control band, centered by its own size; a taller item (a wrapped title, a second trailing row) starts at the band's top and grows down without moving the others, so a wrapped `ToolbarText` keeps trailing controls beside its first line — do not add alignment CSS for this. Split dormant and interactive regions: `ListHeader` fills the available inline width by default; set `width="content"` to shrink-wrap while retaining its normal geometry, or `inline` when it belongs in surrounding text without outer margin, border, or padding. It keeps its label and mutually exclusive semantic count or non-count `badge` together, with an independent logical-end action unless disclosure mode makes the title cluster the button. Its action visual defaults to 18px through `--kui-list-header-action-icon-size` inside a fitted 36px hover square whose transparent hit layer keeps the pointer target at least 44px (44px wide by the 36px row in `density="compact"`); never shrink the target to match the visual, and never force the button to 44px. Pass every non-negative safe-integer section quantity through `count` with a localized full spoken `countLabel`; never concatenate it into `label` or put a number in `badge`. `ListItem.trailing` is dormant; use `ListActionRow` when primary and trailing actions need sibling native buttons. Its `label`, `icon`, and `trailingActionIcon` slots are also dormant and cannot contain controls. Let panes relocate at narrow widths instead of shrinking targets.
|
|
157
158
|
18. When a recurring concept has no matching export or production recipe, keep its semantics in a thin application adapter while reusing the public layout vocabulary. The composer recipe uses one visible form surface, toolbar title/supporting-copy ids, shared 8px field/action gutters, 24px major rhythm, and a conditional StateBanner as its only nested semantic surface; do not turn every section into a card or double-inset intrinsically bordered controls. The application-local `../docs/examples/command-palette-adapter.tsx` is reference source for one such missing concept, not an `@kerfjs/ui` runtime export or catalog recipe. The application owns its registration, ranking, history, permissions, availability, shortcut policy, focus policy, dispatch, and copy. If a missing concept recurs across products, open an upstream component or recipe request.
|
|
158
159
|
19. Compose `ValueTable` from typed `ValueTableRow` entries instead of handwritten `dt`/`dd` wrappers. Pass `icon` for the optional 24px leading visual; the row owns 8px of root-scaled top and bottom padding, the 8px iconless or 40px icon-bearing separator start, and the common 8px right inset.
|
|
159
160
|
20. Use the standard direct `Toolbar` composition for a panel, dialog, or page heading, not a private wrapper or custom heading row. Put an optional icon in a `ToolbarControlGroup`, the title directly in the leading zone as extra-large `ToolbarText`, and actions in a trailing group. Set `headingLevel` for page/section landmarks. Supporting copy stays below the toolbar as app-owned content. The app owns modal behavior, focus, dismissal, command policy, ids, and action handling.
|
|
160
161
|
21. Space with the official five-step scale, picked by how connected two elements are — not by eye. `0` `--kui-space-none` = no separation (one unit); `4px` `--kui-space-2xs` = very minor air on a connected cluster; `8px` `--kui-space-xs` = standard, between elements within a group; `16px` `--kui-space-m` = minor, between homogeneous groups; `24px` `--kui-space-l` = major, between heterogeneous groups (the `.kui-content` rhythm). The 8px-vs-24px distinction is inside-a-group vs between-major-differing-regions. `--kui-space-s` (12px) and `--kui-space-xl` (32px) are off-scale exceptions. For `Row.gap`, `Grid.gap`, or `List.gap`, pass a finite shorthand such as `gap="xs"` or `gap="m"`; use `Spacer` for one intentional typed empty width/height or a flexible main-axis gap. When one token is insufficient, import typed builders from the CSS-free `@kerfjs/ui/css-values` subpath. Preserve property grammar: lengths for gap/Spacer/Skeleton geometry, `flex()` for Row/Grid/List flex, and a foreground color for choice icons: `uiColor()` with a `*-on-*` or text token (`success-on-quiet`, `text-quiet`) or `foregroundColorVar()`. The bare `success`/`warning`/`danger`/`pop`/`accent` tokens are quiet fill aliases, not foregrounds, and `SelectChoice.color` rejects them. Never cast between brands or emit raw row `style` declarations. `plus` is not standalone and must be wrapped in `calc`; `remify()` remains source-CSS syntax and is never a runtime prop value. See `docs/layout.md` "Spacing scale".
|
|
161
|
-
22. Pick a whole-screen layout from the opt-in, tree-shakeable subpaths by data + interaction + device, and derive responsiveness from `@kerfjs/ui/device-class`'s `deviceClass()` (`compact` = handset or portrait tablet = one pane at a time). Simple/flat → `NavStack` with one entry (single pane), plus `TabScaffold` (`@kerfjs/ui/tab-scaffold`, iOS bottom tabs, each tab its own `NavStack`) for 2–5 co-equal sections on `compact`. Drill-down → `NavStack` (`@kerfjs/ui/nav-stack`), upgrading to `SplitView` (`@kerfjs/ui/split-view`, list-detail) once both panes fit (`atLeast('tablet')` landscape); `SplitView` collapses to a `NavStack` on `compact`. Keep each stack's ordered views controlled; put view-specific bottom chrome on `NavStackView.bottomToolbar` (or use the component-level persistent fallback), then call `wireNavStack` so content slides while the active view's top and bottom chrome cross-fade and focus moves into the new top view/restores on pop. Mark a preferred initial heading or control with `data-nav-focus` when DOM order is not sufficient. Complex tool with peripheral panels → `Workbench` (`@kerfjs/ui/workbench`, collapsible rails + drawer) `atLeast('desktop')`, degrading to `NavStack`/overlays below. Workbench panels are fixed-size unless a panel opts in with `resizable` (`true` or `{ min, max }`); then render `size={sizeSignal.value}` and call `wireWorkbench(root, { id, panels: { leftRail: { size: sizeSignal, storageKey? } }, deviceClass })` from `@kerfjs/ui/wire-workbench` for pointer drags, arrow/Shift+arrow/Home/End on the separator, persistence, and no resizing on `compact` classes. Inline rails, fixed or resizable, leave the work area `mainMinSize` px of width (a `Workbench` prop, default 320, `0` off), and an inline bottom drawer leaves it `mainMinHeight` px of height (default 120, `0` off): resizable panels stop growing there, rails shrink in proportion when the Workbench narrows and the drawer when it gets shorter, so do not add your own main-area `min-width` / `min-height`.
|
|
162
|
+
22. Pick a whole-screen layout from the opt-in, tree-shakeable subpaths by data + interaction + device, and derive responsiveness from `@kerfjs/ui/device-class`'s `deviceClass()` (`compact` = handset or portrait tablet = one pane at a time). Simple/flat → `NavStack` with one entry (single pane), plus `TabScaffold` (`@kerfjs/ui/tab-scaffold`, iOS bottom tabs, each tab its own `NavStack`) for 2–5 co-equal sections on `compact`. Drill-down → `NavStack` (`@kerfjs/ui/nav-stack`), upgrading to `SplitView` (`@kerfjs/ui/split-view`, list-detail) once both panes fit (`atLeast('tablet')` landscape); `SplitView` collapses to a `NavStack` on `compact`. Keep each stack's ordered views controlled; put view-specific bottom chrome on `NavStackView.bottomToolbar` (or use the component-level persistent fallback), then call `wireNavStack` so content slides while the active view's top and bottom chrome cross-fade and focus moves into the new top view/restores on pop. Mark a preferred initial heading or control with `data-nav-focus` when DOM order is not sufficient. Complex tool with peripheral panels → `Workbench` (`@kerfjs/ui/workbench`, collapsible rails + drawer) `atLeast('desktop')`, degrading to `NavStack`/overlays below. Workbench panels are fixed-size unless a panel opts in with `resizable` (`true` or `{ min, max }`); then render `size={sizeSignal.value}` and call `wireWorkbench(root, { id, panels: { leftRail: { size: sizeSignal, storageKey? } }, deviceClass })` from `@kerfjs/ui/wire-workbench` for pointer drags, arrow/Shift+arrow/Home/End on the separator, persistence, and no resizing on `compact` classes. Inline rails, fixed or resizable, leave the work area `mainMinSize` px of width (a `Workbench` prop, default 320, `0` off), and an inline bottom drawer leaves it `mainMinHeight` px of height (default 120, `0` off): resizable panels stop growing there, rails shrink in proportion when the Workbench narrows and the drawer when it gets shorter, so do not add your own main-area `min-width` / `min-height`. Rails present as overlays below the `narrow` Workbench container breakpoint (704px) by default — `responsiveOverlayAt: "compact"` moves that to 448px and `"never"` keeps a rail inline — and a bottom drawer opts in the same way; do not derive `presentation` from `deviceClass`, and overlays never resize. At compact widths an overlay rail fills the Workbench less a 44px dismiss strip (`--kui-workbench-overlay-dismiss-margin`) on the side away from its edge; `compactOverlay: "full"` makes one rail fill it. Pass each such panel's `collapsed` signal to `wireWorkbench` too (`panels: { leftRail: { collapsed: navCollapsed } }`, `size` optional) so the overlay is transient like `wireSidebar`'s compact overlay: it collapses when the breakpoint begins to apply (the inline state returns when it ends), takes focus on its first control and keeps Tab inside it while open, and closes on Escape or an outside press with focus returned to its toggle (give each toggle `aria-controls` naming its panel's derived id, `<workbench id>-left-rail` / `-right-rail` / `-bottom-drawer`, so a panel open at wire-up has a focus target too); opening one overlay closes the other open overlays, so they never cover each other's controls; do not hand-roll those listeners (`dismissOverlays: false` opts out of all of it, `exclusiveOverlays: false` of exclusivity only). Collapse stays the app's `collapsed` flag and keeps the size, so an expanded panel returns at its last size. Let the Workbench compose panel toolbars: give each panel `toolbar: { label, title?, panelOnly?, constant?, toggle: { action, name } }` and the work area `mainToolbar` (and `mainBottomToolbar` for a drawer). Open, a panel's toolbar holds its title and panel-only groups, then its constant groups and its toggle last; closed, its constant groups and toggle move to the work area — a left rail's lead `mainToolbar`, a right rail's end it, a drawer's trail `mainBottomToolbar` or float in a corner `FloatingToolbar` — and panel-only groups stay behind. Do not hand-place panel toggles in the work-area toolbar or render a second copy, and handle only the toggle's `data-action`. A collapsed panel renders `inert` and `aria-hidden` by itself, on the rail/drawer and its content (its `restoreControl` stays outside and reachable), so do not add your own `tabindex`, `aria-hidden`, or `inert` to hide it. These are declarative (the app owns the stack/selection/collapsed/active state as signals) with disposer-returning `wire…` helpers; each ships a companion CSS import and stays out of the barrel. For a standalone collapsible rail or bottom drawer outside a full shell, use `CollapsiblePanel` + `CollapsiblePanelToggle` (`@kerfjs/ui/collapsible-panel`) with `wireSidebar` (`@kerfjs/ui/wire-sidebar`): the standard collapse animation and per-side icon convention (`PanelLeft*`/`PanelRight*`/`PanelBottom*`) plus toggle, focus, compact overlay, and persistence semantics. Give a standalone panel the same `toolbar` roles and render `CollapsiblePanelRelocated` in your work-area toolbar (first in leading for a left rail, last in trailing for a right rail, a bottom toolbar or a `FloatingToolbar` restoreControl for a drawer) instead of hand-placing a second toggle. A collapsed `CollapsiblePanel`, `ResizableRegion`, or Workbench panel renders `inert` and `aria-hidden` by itself, so do not hide collapsed content yourself either. A compact overlay opens only on a user action: wire-up on a compact device and a wide-to-compact crossing collapse every panel, and a wide crossing restores the inline state. Seed the signal with `signal(device.value.compact)` and pass the panel's `inlineCollapsed` default so the first compact render has no overlay. Dialogs pick the same inner layout, then present per device class (full-screen modal on `compact`, inline on desktop). A list-detail dialog is a Workbench-shaped layout on roomy devices: a full-height list sidebar and a full-height main column, each a `Pane` with its own top `Toolbar`; the main column holds the primary xl title, the close control (`data-dialog="close"` in a `without-header` Web Awesome dialog), and the record actions, never a header spanning both columns. A top-level percentage-height shell needs a definite containing height: opt into `@kerfjs/ui/document.css` and put `.kui-app-root` on the one direct mount container, or provide equivalent application-owned geometry. The global baseline is deliberately absent from `styles.css` and component imports. See `docs/app-layouts.md`, `docs/document-baseline.md`, and `docs/collapsible-panel.md`.
|
|
162
163
|
23. Layouts and `Pane` are safe-area aware without configuration: backgrounds, separators, and dividers paint through a device's unsafe areas (a collapsible rail or drawer grows by the inset it docks to), content is padded only on the sides a region actually reaches, and block insets are scroll padding inside the scroller so first/last content can always be scrolled clear. Interior edges get nothing, and a collapsed rail hands its edge back to the center. Never add your own `env(safe-area-inset-*)` padding around a kerf layout or pane — that double-insets. In an app-owned arrangement of panes, pass `Pane.safeAreaEdges` (the sides that pane reaches; `[]` opts out); give an app bar or bottom bar that sits at a screen edge outside a Pane header or footer `Toolbar.safeAreaEdges` for the sides it reaches (for example `['block-start', 'inline-start', 'inline-end']`); or set `--kui-edge-inset-*: 0px` on a region for each edge it does not reach. The device insets are `--kui-safe-area-*` (defaulting to `env()`), overridable on `:root`. See `docs/app-layouts.md` "Safe areas".
|
|
163
164
|
|
|
164
165
|
Common mistakes:
|
|
@@ -180,7 +181,8 @@ Common mistakes:
|
|
|
180
181
|
| Choose a listed ecosystem component by default | Apply the component-selection guidance above; catalog coverage means supported and themed, not preferred |
|
|
181
182
|
| Add sidebar-specific wrapper padding | Use the unpadded `.kui-pane`; let `ListHeader`, `ListItem`, and `.kui-content-item` own their 8/1/8 geometry |
|
|
182
183
|
| Put bare text or controls directly in a toolbar slot | Wrap every item in `ToolbarControlGroup`, using `appearance="borderless"` for transparent chrome |
|
|
183
|
-
| Reach for `wa-button` for a plain control inside a `ToolbarControlGroup` | Use a plain `<button>` (the group styles it fully);
|
|
184
|
+
| Reach for `wa-button` for a plain control inside a `ToolbarControlGroup` | Use a plain `<button>` (the group styles it fully); for a popup menu use `PopupMenu`, which renders its own trigger |
|
|
185
|
+
| Hand-write `wa-dropdown` / `wa-dropdown-item` markup for an action menu | Use `PopupMenu` with typed `items` in a `single` `ToolbarControlGroup` with `nestedDropdown` |
|
|
184
186
|
| Let the document, pane, and list all scroll | Keep fixed chrome outside one `.kui-pane__content` scroll owner per pane |
|
|
185
187
|
| Invent an `@kerfjs/ui` command-palette export | Keep the semantics application-local, reuse public layout vocabulary, and propose recurring behavior upstream |
|
|
186
188
|
| Handwrite `ValueTable` row wrappers or compensate their padding or separators | Compose `ValueTableRow`; its root-scaled block padding, optional icon hook, and separator geometry are public contract |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web Awesome JSX signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from the emitted `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from the emitted `@kerfjs/ui@5.0.0-beta.55` declaration boundary. Import `@kerfjs/ui/webawesome` for type effects when authoring direct `wa-*` JSX. The module emits no runtime behavior and does not register custom elements.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { KerfCustomElement } from 'kerfjs/jsx-runtime';
|