@kerfjs/ui 5.0.0-beta.50 → 5.0.0-beta.51
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 +29 -5
- package/ai/compile-time-contracts-v1.json +5 -2
- package/ai/component-catalog-v2.d.ts +19 -1
- package/ai/component-catalog-v2.json +842 -127
- package/ai/component-catalog-v2.schema.json +33 -1
- package/ai/component-catalog.json +603 -126
- package/ai/component-catalog.schema.json +21 -1
- package/ai/public-api-signatures-v1.md +201 -29
- package/ai/skill.md +12 -9
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/index.mjs +105 -35
- package/dist/app-tab.js +1 -1
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +28 -5
- package/dist/catalog.js +66 -25
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-COUPLRZG.js → chunk-5FZZMIMD.js} +3 -3
- package/dist/{chunk-COUPLRZG.js.map → chunk-5FZZMIMD.js.map} +1 -1
- package/dist/{chunk-DARTMI5Z.js → chunk-5PMGQDG7.js} +2 -2
- package/dist/{chunk-DARTMI5Z.js.map → chunk-5PMGQDG7.js.map} +1 -1
- package/dist/{chunk-V6RZWDII.js → chunk-7GUQYHKA.js} +19 -2
- package/dist/chunk-7GUQYHKA.js.map +1 -0
- package/dist/{chunk-ZNZ2JDBW.js → chunk-7IUSV4XG.js} +1 -1
- package/dist/chunk-7IUSV4XG.js.map +1 -0
- package/dist/{chunk-ELRMBQEC.js → chunk-AEPXGCNF.js} +17 -2
- package/dist/chunk-AEPXGCNF.js.map +1 -0
- package/dist/{chunk-5CE64WGC.js → chunk-D547PH4L.js} +3 -3
- package/dist/{chunk-5CE64WGC.js.map → chunk-D547PH4L.js.map} +1 -1
- package/dist/{chunk-S6ZTTTV7.js → chunk-DVZCMMB3.js} +3 -3
- package/dist/{chunk-S6ZTTTV7.js.map → chunk-DVZCMMB3.js.map} +1 -1
- package/dist/chunk-EKYZCRCX.js +256 -0
- package/dist/chunk-EKYZCRCX.js.map +1 -0
- package/dist/{chunk-3V75EQIP.js → chunk-JM53SMVF.js} +3 -3
- package/dist/{chunk-3V75EQIP.js.map → chunk-JM53SMVF.js.map} +1 -1
- package/dist/{chunk-2WMSE4MK.js → chunk-JMGKM7RK.js} +2 -2
- package/dist/{chunk-2WMSE4MK.js.map → chunk-JMGKM7RK.js.map} +1 -1
- package/dist/{chunk-2YOUUEWR.js → chunk-KX7DP2GO.js} +4 -4
- package/dist/{chunk-2YOUUEWR.js.map → chunk-KX7DP2GO.js.map} +1 -1
- package/dist/{chunk-OL4TC3U2.js → chunk-MO56ZZLG.js} +6 -2
- package/dist/chunk-MO56ZZLG.js.map +1 -0
- package/dist/{chunk-OQI7RCRP.js → chunk-MTM43SJO.js} +7 -1
- package/dist/chunk-MTM43SJO.js.map +1 -0
- package/dist/{chunk-ZSYLBVWG.js → chunk-NMGTHYW3.js} +3 -3
- package/dist/{chunk-ZSYLBVWG.js.map → chunk-NMGTHYW3.js.map} +1 -1
- package/dist/{chunk-AQSKJ6U6.js → chunk-NZXWU4R5.js} +21 -2
- package/dist/chunk-NZXWU4R5.js.map +1 -0
- package/dist/{chunk-DJKWFYAA.js → chunk-O3RCCSQJ.js} +3 -3
- package/dist/{chunk-DJKWFYAA.js.map → chunk-O3RCCSQJ.js.map} +1 -1
- package/dist/{chunk-UMGY5JSP.js → chunk-S4QRSBFI.js} +22 -2
- package/dist/chunk-S4QRSBFI.js.map +1 -0
- package/dist/{chunk-KKNK3JUT.js → chunk-UBH743HV.js} +5 -5
- package/dist/chunk-UBH743HV.js.map +1 -0
- package/dist/{chunk-54HM36IQ.js → chunk-ULCDZTWL.js} +2 -2
- package/dist/{chunk-54HM36IQ.js.map → chunk-ULCDZTWL.js.map} +1 -1
- package/dist/{chunk-SIU2AC5W.js → chunk-UPZ6EEJN.js} +3 -3
- package/dist/{chunk-SIU2AC5W.js.map → chunk-UPZ6EEJN.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +1 -1
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/css-values.d.ts +39 -3
- package/dist/css-values.js +1 -1
- package/dist/grid.d.ts +15 -1
- package/dist/grid.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -19
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +21 -2
- package/dist/list.js +2 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +17 -2
- package/dist/pane.js +1 -1
- package/dist/row.d.ts +19 -1
- package/dist/row.js +2 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +13 -3
- package/dist/select.js +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/spacer.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog/components/catalog-example-stack.css +4 -1
- package/dist/styles/catalog/components/catalog-example.css +145 -0
- package/dist/styles/collapsible-panel.css +132 -4
- package/dist/styles/document.css +23 -0
- package/dist/styles/foundation.css +21 -7
- package/dist/styles/grid.css +10 -0
- package/dist/styles/list-header.css +45 -0
- package/dist/styles/list-inset-control.css +8 -1
- package/dist/styles/list-item.css +6 -0
- package/dist/styles/list.css +11 -0
- package/dist/styles/nav-stack.css +89 -2
- package/dist/styles/pane.css +86 -1
- package/dist/styles/resizable-region.css +93 -5
- package/dist/styles/row.css +10 -0
- package/dist/styles/select.css +39 -4
- package/dist/styles/split-view.css +107 -1
- package/dist/styles/tab-scaffold.css +64 -1
- package/dist/styles/text.css +6 -0
- package/dist/styles/toolbar-control-group.css +90 -11
- package/dist/styles/toolbar-text.css +4 -1
- package/dist/styles/toolbar.css +130 -38
- package/dist/styles/webawesome.css +48 -2
- package/dist/styles/workbench.css +136 -4
- package/dist/text.d.ts +4 -3
- package/dist/text.js +1 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +24 -3
- package/dist/toolbar.js +1 -1
- package/dist/{types-CzgSrFXP.d.ts → types-CEsieBZi.d.ts} +6 -1
- package/dist/value-table.js +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.d.ts +18 -3
- package/dist/wire-sidebar.js +95 -14
- package/dist/wire-sidebar.js.map +1 -1
- package/docs/accessibility.md +45 -8
- package/docs/app-layouts.md +73 -0
- package/docs/catalog.md +23 -2
- package/docs/collapsible-panel.md +81 -8
- package/docs/component-contract.md +28 -9
- package/docs/component-integration.md +9 -4
- package/docs/component-selection.md +25 -6
- package/docs/design/templates/list/stack-dark.svg +1 -1
- package/docs/design/templates/list/stack.svg +1 -1
- package/docs/design/templates/list-dark.svg +1 -1
- package/docs/design/templates/list-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/count-dark.svg +1 -1
- package/docs/design/templates/list-header/count.svg +1 -1
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
- package/docs/design/templates/list-header/inline-action.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/design/templates/list.svg +1 -1
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
- package/docs/design/templates/state-banner/info-badge.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -1
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group.svg +1 -1
- package/docs/design/templates/toolbar-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/default-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/default.svg +1 -1
- package/docs/design/templates/toolbar-text/large-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/large.svg +1 -1
- package/docs/design/templates/toolbar-text/small-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/small.svg +1 -1
- package/docs/design/templates/toolbar-text-dark.svg +1 -1
- package/docs/design/templates/toolbar-text.svg +1 -1
- package/docs/design/templates/toolbar.svg +1 -1
- package/docs/document-baseline.md +31 -0
- package/docs/layout.md +86 -21
- package/docs/nav-stack.md +8 -0
- package/docs/recipes.md +78 -43
- package/docs/split-view.md +8 -0
- package/docs/tab-scaffold.md +4 -2
- package/docs/type-contracts.md +21 -17
- package/docs/ui-analyzer.md +19 -0
- package/docs/ui-evaluator.md +17 -0
- package/docs/ux-demo.md +4 -4
- package/docs/webawesome-theme.md +20 -2
- package/docs/workbench.md +20 -1
- package/evaluator/index.mjs +73 -8
- package/llms.txt +32 -14
- package/package.json +4 -2
- package/ux-demo/recipes/app-shell.tsx +209 -178
- package/ux-demo/recipes/collapsible-sidebar.tsx +188 -159
- package/ux-demo/recipes/compact-toolbar.tsx +48 -35
- package/ux-demo/recipes/composer-form.tsx +85 -79
- package/ux-demo/recipes/list-detail-dialog.tsx +124 -142
- package/ux-demo/recipes/list-workspace-states.tsx +83 -83
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +157 -160
- package/ux-demo/recipes/navigation-sidebar.tsx +111 -109
- package/ux-demo/recipes/navigation-stack.tsx +50 -49
- package/ux-demo/recipes/types.ts +14 -0
- package/ux-demo/recipes/workspace-header.tsx +73 -56
- package/dist/chunk-AQSKJ6U6.js.map +0 -1
- package/dist/chunk-ELRMBQEC.js.map +0 -1
- package/dist/chunk-J3EE6XWD.js +0 -115
- package/dist/chunk-J3EE6XWD.js.map +0 -1
- package/dist/chunk-KKNK3JUT.js.map +0 -1
- package/dist/chunk-OL4TC3U2.js.map +0 -1
- package/dist/chunk-OQI7RCRP.js.map +0 -1
- package/dist/chunk-UMGY5JSP.js.map +0 -1
- package/dist/chunk-V6RZWDII.js.map +0 -1
- package/dist/chunk-ZNZ2JDBW.js.map +0 -1
- package/ux-demo/recipes/app-shell.css +0 -87
- package/ux-demo/recipes/collapsible-sidebar.css +0 -83
- package/ux-demo/recipes/compact-toolbar.css +0 -35
- package/ux-demo/recipes/composer-form.css +0 -19
- package/ux-demo/recipes/list-detail-dialog.css +0 -42
- package/ux-demo/recipes/list-workspace-states.css +0 -30
- package/ux-demo/recipes/loading-inspector.css +0 -7
- package/ux-demo/recipes/navigation-sidebar.css +0 -12
- package/ux-demo/recipes/navigation-stack.css +0 -12
- package/ux-demo/recipes/recipe-root.css +0 -67
- package/ux-demo/recipes/recipe-root.tsx +0 -87
- package/ux-demo/recipes/workspace-header.css +0 -7
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ geometry inspection, and metadata ownership. AI tools can discover that
|
|
|
20
20
|
contract and its public imports through the shipped
|
|
21
21
|
[`catalog-authoring.json`](./ai/catalog-authoring.json) artifact.
|
|
22
22
|
|
|
23
|
-
For connective application patterns, use the
|
|
23
|
+
For connective application patterns, use the ten [production composition
|
|
24
24
|
recipes](./docs/recipes.md). Each has a stable catalog route, runnable state,
|
|
25
25
|
public-subpath source, semantic layout ownership, and explicit application
|
|
26
26
|
customization boundaries. The composer recipe demonstrates one coherent form
|
|
@@ -111,13 +111,16 @@ supports it as a normal single-root control.
|
|
|
111
111
|
|
|
112
112
|
`ListItem.rootAttributes`, `ListHeader.rootAttributes`,
|
|
113
113
|
`ListActionRow.rootAttributes`, `AppTab.rootAttributes`,
|
|
114
|
-
`CatalogExample.rootAttributes`, and `CatalogExampleStack.rootAttributes` carry typed
|
|
114
|
+
`Catalog.stageRootAttributes`, `CatalogExample.rootAttributes`, and `CatalogExampleStack.rootAttributes` carry typed
|
|
115
115
|
application `data-*` metadata without
|
|
116
116
|
teaching the package domain fields. `ListHeader.triggerAttributes` and
|
|
117
117
|
`ListActionRow.trailingActionAttributes` additionally support native popover
|
|
118
118
|
target and relationship attributes. Roles and component-owned action, selection,
|
|
119
119
|
disclosure, naming, disabled, icon, and catalog-structure semantics remain protected props; an
|
|
120
120
|
isolated `role="menuitem"` is not an extension shortcut.
|
|
121
|
+
`CatalogExample.viewport` owns the finite layout constraints needed by focused
|
|
122
|
+
specimens, so catalog authors do not need route-local stylesheets, inline
|
|
123
|
+
styles, or styling-only demo classes.
|
|
121
124
|
The slots are also filtered at runtime, so structurally widened objects and
|
|
122
125
|
JavaScript callers cannot bypass those protections with case-variant names.
|
|
123
126
|
`ListItem.trailing` is dormant metadata. Use `ListActionRow` when a row needs
|
|
@@ -164,7 +167,9 @@ for asymmetric or intrinsic tracks and `ResizableRegion` for adjustable ones.
|
|
|
164
167
|
The same property-specific boundary applies beyond spacing: use `flex()` (or a
|
|
165
168
|
finite keyword) for `Row.flex`, `Grid.flex`, and `List.flex`; length builders and intrinsic-size keywords for
|
|
166
169
|
`Skeleton.width`/`height`; length builders for `Skeleton.radius`; and
|
|
167
|
-
|
|
170
|
+
a foreground color for `SelectChoice.color` — `uiColor()` with a foreground
|
|
171
|
+
token such as `success-on-quiet`, or `foregroundColorVar()` (fill aliases such
|
|
172
|
+
as `uiColor('success')` are rejected). These grammars are not
|
|
168
173
|
interchangeable. `ListItem` and `ListActionRow` deliberately expose no raw
|
|
169
174
|
`style` declarations; use `className`, public tokens, and component props.
|
|
170
175
|
|
|
@@ -230,7 +235,17 @@ icon in a `ToolbarControlGroup`, use a direct extra-large `ToolbarText` for the
|
|
|
230
235
|
title, and put actions in the trailing zone inside their own control group. Set
|
|
231
236
|
`headingLevel` for page or section headings. Supporting copy is app-owned content
|
|
232
237
|
below the toolbar and should be connected to its host with `aria-describedby`
|
|
233
|
-
when it adds useful context.
|
|
238
|
+
when it adds useful context. Set `responsive="wrap"` on a heading whose title
|
|
239
|
+
must stay whole: it keeps one row while everything fits and otherwise moves the
|
|
240
|
+
trailing actions below the title instead of truncating it.
|
|
241
|
+
|
|
242
|
+
A toolbar never clips an action. Its trailing zone wraps whole control groups
|
|
243
|
+
onto another trailing-aligned row under every `responsive` policy, and a
|
|
244
|
+
`responsive="stack"` toolbar wraps its stacked center and trailing groups the
|
|
245
|
+
same way. Wrapping keeps every command visible at its full 44px target without
|
|
246
|
+
moving focus or DOM identity. When a product wants fewer visible commands at
|
|
247
|
+
narrow widths, it chooses them: render a lower-priority command inside an
|
|
248
|
+
app-owned "More" popup menu (a `single` group around a `wa-dropdown`).
|
|
234
249
|
|
|
235
250
|
`DisclosureArrow` defaults to an 18px root-scaled decorative visual. Override
|
|
236
251
|
`--kui-disclosure-arrow-size` at the narrowest useful scope when a consumer
|
|
@@ -418,7 +433,9 @@ file.
|
|
|
418
433
|
`npm run check:css-ownership` keeps that boundary honest: application CSS may
|
|
419
434
|
style only application-owned structure, never package component classes or
|
|
420
435
|
Web Awesome descendants. The UX catalog's `style.css` contains document-shell
|
|
421
|
-
mechanics only, recipes
|
|
436
|
+
mechanics only, recipes ship no stylesheets (`npm run check:recipes` rejects
|
|
437
|
+
route stylesheets, inline styles, and styling-only classes), and `catalog.css`
|
|
438
|
+
remains a
|
|
422
439
|
minimal compatibility entrypoint.
|
|
423
440
|
|
|
424
441
|
The root `@kerfjs/ui` barrel stays JavaScript-only because making a side-effectful
|
|
@@ -432,6 +449,13 @@ manual delivery. Its complete supported `--kui-*` token surface is cataloged
|
|
|
432
449
|
under the `foundation` entry. Load application overrides after package styles,
|
|
433
450
|
or scope variables directly on a component instance.
|
|
434
451
|
|
|
452
|
+
Applications can separately opt into `@kerfjs/ui/document.css` for border-box
|
|
453
|
+
sizing, token-backed body typography/colors, zero body margin, plain-link color,
|
|
454
|
+
and a definite full-height chain. Add `class="kui-app-root"` to the one direct
|
|
455
|
+
mount container when a percentage-height application shell must fill the
|
|
456
|
+
viewport. This global baseline is deliberately absent from `styles.css` and
|
|
457
|
+
component browser imports. See [Document baseline](./docs/document-baseline.md).
|
|
458
|
+
|
|
435
459
|
## Pane and content geometry
|
|
436
460
|
|
|
437
461
|
Import `@kerfjs/ui/layout.css` and use the same structural vocabulary for a
|
|
@@ -121,12 +121,15 @@
|
|
|
121
121
|
"CssFlex",
|
|
122
122
|
"CssSize",
|
|
123
123
|
"CssColor",
|
|
124
|
+
"CssForegroundColor",
|
|
125
|
+
"UiForegroundColorName",
|
|
124
126
|
"flex",
|
|
125
127
|
"uiColor",
|
|
126
|
-
"colorVar"
|
|
128
|
+
"colorVar",
|
|
129
|
+
"foregroundColorVar"
|
|
127
130
|
],
|
|
128
131
|
"kind": "property-specific-css-value",
|
|
129
|
-
"summary": "List flex, Skeleton dimensions, and Select icon colors use separate typed CSS grammars;
|
|
132
|
+
"summary": "List flex, Skeleton dimensions, and Select icon colors use separate typed CSS grammars; Select icon colors accept only foreground colors, so fill aliases such as uiColor('success') and unqualified colorVar() values are rejected. Row declaration-string props are absent rather than sharing a generic CSS escape hatch."
|
|
130
133
|
},
|
|
131
134
|
{
|
|
132
135
|
"id": "KUI-T014",
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
export type CatalogQualifiedKey = `${string}:${string}`;
|
|
2
|
+
/** A `data-*` attribute a wiring helper writes at runtime. The application
|
|
3
|
+
* must not render, remove, or treat it as its own state. */
|
|
4
|
+
export interface CatalogStateAttribute {
|
|
5
|
+
name: `data-${string}`;
|
|
6
|
+
/** The element that carries it: a public class, or the element passed to the helper. */
|
|
7
|
+
on: string;
|
|
8
|
+
/** The helper, one of `wiring.helpers`, that writes it. */
|
|
9
|
+
helper: string;
|
|
10
|
+
/** What its presence or value means. */
|
|
11
|
+
meaning: string;
|
|
12
|
+
}
|
|
2
13
|
export type CatalogCardinality = {
|
|
3
14
|
min: number;
|
|
4
15
|
max: number | 'unbounded';
|
|
@@ -58,7 +69,14 @@ export interface CatalogCompositionEntryV2 {
|
|
|
58
69
|
owner: 'application' | 'controlled' | 'component';
|
|
59
70
|
required: boolean;
|
|
60
71
|
}>;
|
|
61
|
-
wiring: {
|
|
72
|
+
wiring: {
|
|
73
|
+
required: boolean;
|
|
74
|
+
helpers: string[];
|
|
75
|
+
obligations: string[];
|
|
76
|
+
/** Wiring-owned `data-*` attributes a helper writes at runtime. Optional
|
|
77
|
+
* for extension catalogs; first-party entries always list it. */
|
|
78
|
+
stateAttributes?: CatalogStateAttribute[];
|
|
79
|
+
};
|
|
62
80
|
responsive: {
|
|
63
81
|
owner: 'application' | 'component' | 'shared' | 'not-applicable';
|
|
64
82
|
behaviors: string[];
|