@kerfjs/ui 5.0.0-beta.16 → 5.0.0-beta.18
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 +111 -81
- package/ai/component-catalog-extension.schema.json +79 -0
- package/ai/component-catalog.json +499 -0
- package/ai/component-catalog.schema.json +15 -0
- package/ai/public-api-signatures-v1.md +86 -32
- package/ai/skill.md +60 -51
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/app-tab.d.ts +1 -1
- package/dist/app-tab.js +1 -1
- package/dist/catalog.d.ts +12 -3
- package/dist/catalog.js +283 -90
- package/dist/catalog.js.map +1 -1
- package/dist/chunk-43FUQH35.js +83 -0
- package/dist/chunk-43FUQH35.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-4TRDV6RL.js} +2 -2
- package/dist/chunk-4TRDV6RL.js.map +1 -0
- package/dist/chunk-6ETZKKAE.js +38 -0
- package/dist/chunk-6ETZKKAE.js.map +1 -0
- package/dist/chunk-6WTETUZ6.js +21 -0
- package/dist/chunk-6WTETUZ6.js.map +1 -0
- package/dist/chunk-7L6EHUMV.js +31 -0
- package/dist/chunk-7L6EHUMV.js.map +1 -0
- package/dist/chunk-BBRXX6PF.js +108 -0
- package/dist/chunk-BBRXX6PF.js.map +1 -0
- package/dist/chunk-DPDBVKNA.js +113 -0
- package/dist/chunk-DPDBVKNA.js.map +1 -0
- package/dist/chunk-ELSJX4W7.js +68 -0
- package/dist/chunk-ELSJX4W7.js.map +1 -0
- package/dist/{chunk-LCOBDOCC.js → chunk-ENVTNLYC.js} +153 -67
- package/dist/chunk-ENVTNLYC.js.map +1 -0
- package/dist/{chunk-AHQI52QO.js → chunk-FEY65TBV.js} +6 -2
- package/dist/chunk-FEY65TBV.js.map +1 -0
- package/dist/chunk-JTHUXDN2.js +58 -0
- package/dist/chunk-JTHUXDN2.js.map +1 -0
- package/dist/chunk-LPOMRC4C.js +25 -0
- package/dist/chunk-LPOMRC4C.js.map +1 -0
- package/dist/chunk-NENBUYX5.js +79 -0
- package/dist/chunk-NENBUYX5.js.map +1 -0
- package/dist/{chunk-XXMOARTH.js → chunk-NVWXKU37.js} +57 -16
- package/dist/chunk-NVWXKU37.js.map +1 -0
- package/dist/chunk-PIDTEQ3U.js +105 -0
- package/dist/chunk-PIDTEQ3U.js.map +1 -0
- package/dist/chunk-PX3YSS5C.js +32 -0
- package/dist/chunk-PX3YSS5C.js.map +1 -0
- package/dist/chunk-PZQVSDLH.js +61 -0
- package/dist/chunk-PZQVSDLH.js.map +1 -0
- package/dist/chunk-QIRXYKCE.js +113 -0
- package/dist/chunk-QIRXYKCE.js.map +1 -0
- package/dist/chunk-QO55FN2Y.js +20 -0
- package/dist/chunk-QO55FN2Y.js.map +1 -0
- package/dist/chunk-QQFJMRIB.js +45 -0
- package/dist/chunk-QQFJMRIB.js.map +1 -0
- package/dist/chunk-S3HKPI7I.js +218 -0
- package/dist/chunk-S3HKPI7I.js.map +1 -0
- package/dist/chunk-S3PCZ7NV.js +38 -0
- package/dist/chunk-S3PCZ7NV.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-SRSJO5QE.js} +13 -4
- package/dist/chunk-SRSJO5QE.js.map +1 -0
- package/dist/chunk-U5IFGQCD.js +117 -0
- package/dist/chunk-U5IFGQCD.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-Y6LYKFXY.js} +1 -1
- package/dist/{chunk-56RJXPHG.js.map → chunk-Y6LYKFXY.js.map} +1 -1
- package/dist/chunk-ZK2G3VR5.js +35 -0
- package/dist/chunk-ZK2G3VR5.js.map +1 -0
- package/dist/chunk-ZVI5YST2.js +41 -0
- package/dist/chunk-ZVI5YST2.js.map +1 -0
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +47 -6
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/device-class.js +33 -5
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/floating-toolbar.d.ts +1 -1
- package/dist/floating-toolbar.js +1 -1
- package/dist/index.js +25 -25
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +1 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/loading-spinner.js +1 -1
- package/dist/nav-stack.d.ts +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/panel-header.d.ts +1 -1
- package/dist/panel-header.js +1 -1
- package/dist/resizable-region.d.ts +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +70 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog.css +48 -1
- package/dist/styles/toolbar-text.css +54 -2
- package/dist/styles/webawesome.css +131 -0
- package/dist/tab-bar.d.ts +1 -1
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +1 -1
- package/dist/tab-scaffold.js +43 -8
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +1 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +17 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/value-table.d.ts +2 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +31 -2
- package/dist/wire-catalog.js +203 -8
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-nav-stack.js +22 -7
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.js +52 -41
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-scaffold.js +9 -4
- package/dist/wire-tab-scaffold.js.map +1 -1
- package/dist/wire-token-search-fields.d.ts +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +56 -9
- package/dist/workbench.js.map +1 -1
- package/docs/app-layouts.md +7 -7
- package/docs/catalog.md +110 -25
- package/docs/collapsible-panel.md +38 -11
- package/docs/component-contract.md +30 -2
- package/docs/component-selection.md +76 -65
- package/docs/design/templates.md +1 -1
- package/docs/design-philosophy.md +5 -5
- package/docs/device-class.md +8 -8
- package/docs/examples/command-palette-adapter.tsx +67 -17
- package/docs/examples/component-catalog-extension.json +45 -0
- package/docs/layout.md +19 -19
- package/docs/nav-stack.md +15 -6
- package/docs/recipes.md +4 -4
- package/docs/split-view.md +3 -3
- package/docs/tab-scaffold.md +16 -7
- package/docs/ux-demo.md +2 -2
- package/docs/webawesome-theme.md +73 -8
- package/docs/workbench.md +18 -5
- package/llms.txt +36 -15
- package/package.json +6 -4
- package/ux-demo/recipes/app-shell.tsx +206 -10
- package/ux-demo/recipes/collapsible-sidebar.tsx +167 -44
- package/ux-demo/recipes/compact-toolbar.tsx +114 -12
- package/ux-demo/recipes/composer-form.tsx +106 -18
- package/ux-demo/recipes/list-detail-dialog.tsx +144 -8
- package/ux-demo/recipes/list-workspace-states.tsx +165 -8
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +124 -41
- package/ux-demo/recipes/mount-recipe.ts +27 -6
- package/ux-demo/recipes/navigation-sidebar.tsx +120 -9
- package/ux-demo/recipes/navigation-stack.tsx +61 -19
- package/ux-demo/recipes/types.ts +3 -1
- package/ux-demo/recipes/workspace-header.tsx +57 -2
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-37T3VNIZ.js +0 -19
- package/dist/chunk-37T3VNIZ.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-5ATCDSQS.js +0 -42
- package/dist/chunk-5ATCDSQS.js.map +0 -1
- package/dist/chunk-5E2HVJ33.js +0 -10
- package/dist/chunk-5E2HVJ33.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7JB7VPRI.js +0 -34
- package/dist/chunk-7JB7VPRI.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AHQI52QO.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-AVZHJN6C.js +0 -14
- package/dist/chunk-AVZHJN6C.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-BLK3UEEI.js +0 -23
- package/dist/chunk-BLK3UEEI.js.map +0 -1
- package/dist/chunk-CH4SQ6H5.js +0 -39
- package/dist/chunk-CH4SQ6H5.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-L4OKFDJY.js +0 -24
- package/dist/chunk-L4OKFDJY.js.map +0 -1
- package/dist/chunk-LCOBDOCC.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-RNPGFQ33.js +0 -10
- package/dist/chunk-RNPGFQ33.js.map +0 -1
- package/dist/chunk-RUNWEPR4.js +0 -10
- package/dist/chunk-RUNWEPR4.js.map +0 -1
- package/dist/chunk-VPCTCUED.js +0 -10
- package/dist/chunk-VPCTCUED.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-XE5ZLPCC.js +0 -20
- package/dist/chunk-XE5ZLPCC.js.map +0 -1
- package/dist/chunk-XXMOARTH.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
|
@@ -40,11 +40,26 @@
|
|
|
40
40
|
"accessibility": { "type": "array", "items": { "type": "string" } },
|
|
41
41
|
"publicClasses": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
42
42
|
"publicTokens": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
43
|
+
"geometry": { "$ref": "#/$defs/geometry" },
|
|
43
44
|
"delivery": { "$ref": "#/$defs/delivery" },
|
|
44
45
|
"links": { "$ref": "#/$defs/links" }
|
|
45
46
|
},
|
|
46
47
|
"additionalProperties": false
|
|
47
48
|
},
|
|
49
|
+
"geometry": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["margin", "border", "padding"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"margin": { "$ref": "#/$defs/geometryOwner" },
|
|
54
|
+
"border": { "$ref": "#/$defs/geometryOwner" },
|
|
55
|
+
"padding": { "$ref": "#/$defs/geometryOwner" },
|
|
56
|
+
"notes": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1 }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
"geometryOwner": {
|
|
61
|
+
"enum": ["self", "parent", "child", "none", "conditional"]
|
|
62
|
+
},
|
|
48
63
|
"alternative": {
|
|
49
64
|
"type": "object",
|
|
50
65
|
"required": ["id", "relationship"],
|
|
@@ -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.18` and `kerfjs@5.0.0-beta.18`. 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/disclosure-arrow`
|
|
6
6
|
|
|
@@ -34,7 +34,7 @@ interface ToolbarProps {
|
|
|
34
34
|
divider?: boolean;
|
|
35
35
|
className?: string;
|
|
36
36
|
}
|
|
37
|
-
declare function Toolbar({ leading, center, trailing, label, divider, className }: ToolbarProps): SafeHtml;
|
|
37
|
+
declare function Toolbar({ leading, center, trailing, label, divider, className, }: ToolbarProps): SafeHtml;
|
|
38
38
|
|
|
39
39
|
export { Toolbar, type ToolbarProps };
|
|
40
40
|
```
|
|
@@ -61,8 +61,24 @@ interface ToolbarTextProps {
|
|
|
61
61
|
headingLevel?: HeadingLevel;
|
|
62
62
|
/** Render the text as an unanimated loading skeleton instead of its value. */
|
|
63
63
|
placeholder?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Wrap onto multiple lines when the text does not fit, instead of the default
|
|
66
|
+
* single line. Combine with `maxLines` to cap the number of lines. Default false.
|
|
67
|
+
*/
|
|
68
|
+
wrap?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Show a trailing ellipsis (…) where the text is truncated — on the single line
|
|
71
|
+
* (default), or at the `maxLines` boundary when wrapping. Set false to hard-clip
|
|
72
|
+
* instead. Default true.
|
|
73
|
+
*/
|
|
74
|
+
ellipsis?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Cap wrapped text to this many lines, truncating past it. Only takes effect with
|
|
77
|
+
* `wrap`; ignored on a single line. `null`/omitted wraps without a line cap. Default null.
|
|
78
|
+
*/
|
|
79
|
+
maxLines?: number | null;
|
|
64
80
|
}
|
|
65
|
-
declare function ToolbarText({ text, size, className, id, headingLevel, placeholder }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
81
|
+
declare function ToolbarText({ text, size, className, id, headingLevel, placeholder, wrap, ellipsis, maxLines, }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
66
82
|
|
|
67
83
|
export { type HeadingLevel, ToolbarText, type ToolbarTextProps, type ToolbarTextSize };
|
|
68
84
|
```
|
|
@@ -84,7 +100,7 @@ interface ToolbarControlGroupProps {
|
|
|
84
100
|
/** Corner shape: fully round `pill` (default) or a softer `rounded` rectangle. */
|
|
85
101
|
shape?: 'pill' | 'rounded';
|
|
86
102
|
}
|
|
87
|
-
declare function ToolbarControlGroup({ children, label, className, expanded, single, appearance, tone, buttonAppearance, shape }: ToolbarControlGroupProps): SafeHtml;
|
|
103
|
+
declare function ToolbarControlGroup({ children, label, className, expanded, single, appearance, tone, buttonAppearance, shape, }: ToolbarControlGroupProps): SafeHtml;
|
|
88
104
|
|
|
89
105
|
export { ToolbarControlGroup, type ToolbarControlGroupProps };
|
|
90
106
|
```
|
|
@@ -117,7 +133,7 @@ interface FloatingToolbarProps {
|
|
|
117
133
|
* top toolbar's own inset); override that token to move it. The app owns the
|
|
118
134
|
* controls and their behavior — wire them with `delegate()` as usual.
|
|
119
135
|
*/
|
|
120
|
-
declare function FloatingToolbar({ children, label, position, className }: FloatingToolbarProps): SafeHtml;
|
|
136
|
+
declare function FloatingToolbar({ children, label, position, className, }: FloatingToolbarProps): SafeHtml;
|
|
121
137
|
|
|
122
138
|
export { FloatingToolbar, type FloatingToolbarPosition, type FloatingToolbarProps };
|
|
123
139
|
```
|
|
@@ -165,7 +181,7 @@ type ListHeaderIndicatorProps = {
|
|
|
165
181
|
badge?: SafeHtml;
|
|
166
182
|
};
|
|
167
183
|
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps;
|
|
168
|
-
declare function ListHeader({ label, count, countLabel, badge, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes }: ListHeaderProps): SafeHtml;
|
|
184
|
+
declare function ListHeader({ label, count, countLabel, badge, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, }: ListHeaderProps): SafeHtml;
|
|
169
185
|
|
|
170
186
|
export { ListHeader, type ListHeaderProps };
|
|
171
187
|
```
|
|
@@ -222,7 +238,7 @@ interface ListActionRowProps {
|
|
|
222
238
|
rootAttributes?: ListActionRowRootAttributes;
|
|
223
239
|
trailingActionAttributes?: ListActionRowTrailingAttributes;
|
|
224
240
|
}
|
|
225
|
-
declare function ListActionRow({ label, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, className, style, rootAttributes, trailingActionAttributes }: ListActionRowProps): SafeHtml;
|
|
241
|
+
declare function ListActionRow({ label, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, className, style, rootAttributes, trailingActionAttributes, }: ListActionRowProps): SafeHtml;
|
|
226
242
|
|
|
227
243
|
export { ListActionRow, type ListActionRowProps };
|
|
228
244
|
```
|
|
@@ -260,7 +276,7 @@ interface ListItemProps {
|
|
|
260
276
|
placeholder?: boolean;
|
|
261
277
|
rootAttributes?: ListItemRootAttributes;
|
|
262
278
|
}
|
|
263
|
-
declare function ListItem({ label, icon, trailing, selected, action, itemId, className, style, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, rootAttributes }: ListItemProps): SafeHtml;
|
|
279
|
+
declare function ListItem({ label, icon, trailing, selected, action, itemId, className, style, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, rootAttributes, }: ListItemProps): SafeHtml;
|
|
264
280
|
|
|
265
281
|
export { ListItem, type ListItemProps };
|
|
266
282
|
```
|
|
@@ -281,7 +297,7 @@ interface ListInsetControlProps {
|
|
|
281
297
|
* Use it for controls that carry their own border and padding but no outer margin
|
|
282
298
|
* — the wrapper adds only the alignment margin and layout, not a second inset.
|
|
283
299
|
*/
|
|
284
|
-
declare function ListInsetControl({ children, className }: ListInsetControlProps): SafeHtml;
|
|
300
|
+
declare function ListInsetControl({ children, className, }: ListInsetControlProps): SafeHtml;
|
|
285
301
|
|
|
286
302
|
export { ListInsetControl, type ListInsetControlProps };
|
|
287
303
|
```
|
|
@@ -311,7 +327,7 @@ interface ListInsetTextProps {
|
|
|
311
327
|
* Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box
|
|
312
328
|
* space for tight text layout.
|
|
313
329
|
*/
|
|
314
|
-
declare function ListInsetText({ children, horizontalOnly, className }: ListInsetTextProps): SafeHtml;
|
|
330
|
+
declare function ListInsetText({ children, horizontalOnly, className, }: ListInsetTextProps): SafeHtml;
|
|
315
331
|
|
|
316
332
|
export { ListInsetText, type ListInsetTextProps };
|
|
317
333
|
```
|
|
@@ -352,7 +368,7 @@ interface PanelHeaderProps {
|
|
|
352
368
|
* is passed straight into the toolbar's trailing zone; the app supplies whatever
|
|
353
369
|
* trailing controls it needs (typically a `ToolbarControlGroup`).
|
|
354
370
|
*/
|
|
355
|
-
declare function PanelHeader({ title, titleId, summary, summaryId, icon, iconClassName, actions, headingLevel, placeholder }: PanelHeaderProps): SafeHtml;
|
|
371
|
+
declare function PanelHeader({ title, titleId, summary, summaryId, icon, iconClassName, actions, headingLevel, placeholder, }: PanelHeaderProps): SafeHtml;
|
|
356
372
|
|
|
357
373
|
export { PanelHeader, type PanelHeaderProps };
|
|
358
374
|
```
|
|
@@ -370,14 +386,14 @@ interface ValueTableRowProps {
|
|
|
370
386
|
/** Render the value as an unanimated loading skeleton, keeping the field label. */
|
|
371
387
|
placeholder?: boolean;
|
|
372
388
|
}
|
|
373
|
-
declare function ValueTableRow({ label, value, icon, className, placeholder }: ValueTableRowProps): SafeHtml;
|
|
389
|
+
declare function ValueTableRow({ label, value, icon, className, placeholder, }: ValueTableRowProps): SafeHtml;
|
|
374
390
|
|
|
375
391
|
interface ValueTableProps {
|
|
376
392
|
label: string;
|
|
377
393
|
className?: string;
|
|
378
394
|
children: SafeHtml | readonly SafeHtml[];
|
|
379
395
|
}
|
|
380
|
-
declare function ValueTable({ label, className, children }: ValueTableProps): SafeHtml;
|
|
396
|
+
declare function ValueTable({ label, className, children, }: ValueTableProps): SafeHtml;
|
|
381
397
|
|
|
382
398
|
export { ValueTable, type ValueTableProps, ValueTableRow, type ValueTableRowProps };
|
|
383
399
|
```
|
|
@@ -412,7 +428,7 @@ interface AppTabProps {
|
|
|
412
428
|
placeholder?: boolean;
|
|
413
429
|
rootAttributes?: AppTabRootAttributes;
|
|
414
430
|
}
|
|
415
|
-
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes }: AppTabProps): SafeHtml;
|
|
431
|
+
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes, }: AppTabProps): SafeHtml;
|
|
416
432
|
|
|
417
433
|
export { AppTab, type AppTabProps };
|
|
418
434
|
```
|
|
@@ -438,7 +454,7 @@ interface TabBarProps {
|
|
|
438
454
|
activation?: 'automatic' | 'manual';
|
|
439
455
|
}
|
|
440
456
|
/** Render a controlled tab strip. The application owns selection, order, and persistence. */
|
|
441
|
-
declare function TabBar({ id, label, children, leading, trailing, className, activation }: TabBarProps): SafeHtml;
|
|
457
|
+
declare function TabBar({ id, label, children, leading, trailing, className, activation, }: TabBarProps): SafeHtml;
|
|
442
458
|
|
|
443
459
|
export { TabBar, type TabBarProps };
|
|
444
460
|
```
|
|
@@ -516,7 +532,7 @@ interface NavStackProps {
|
|
|
516
532
|
* cross-fades the chrome across a change. A single-pane layout is a `NavStack`
|
|
517
533
|
* with one entry. See `docs/23-app-layouts.md` §3.1.
|
|
518
534
|
*/
|
|
519
|
-
declare function NavStack({ id, label, views, backLabel, hideToolbar, bottomToolbar, className }: NavStackProps): SafeHtml;
|
|
535
|
+
declare function NavStack({ id, label, views, backLabel, hideToolbar, bottomToolbar, className, }: NavStackProps): SafeHtml;
|
|
520
536
|
|
|
521
537
|
export { NavStack, type NavStackProps, type NavStackView };
|
|
522
538
|
```
|
|
@@ -583,7 +599,7 @@ interface SplitViewProps {
|
|
|
583
599
|
* resizable wiring with `wireResizableRegions` and the compact back with
|
|
584
600
|
* `wireNavStack`.
|
|
585
601
|
*/
|
|
586
|
-
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, resizable, className }: SplitViewProps): SafeHtml;
|
|
602
|
+
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, resizable, className, }: SplitViewProps): SafeHtml;
|
|
587
603
|
|
|
588
604
|
export { SplitView, type SplitViewProps, type SplitViewResizable };
|
|
589
605
|
```
|
|
@@ -621,7 +637,7 @@ interface WorkbenchProps {
|
|
|
621
637
|
* work area relayouts once, not per frame. The app owns each `collapsed` flag;
|
|
622
638
|
* the collapse is pure CSS (no wire). See `docs/23-app-layouts.md` §3.3.
|
|
623
639
|
*/
|
|
624
|
-
declare function Workbench({ id, label, main, leftRail, rightRail, bottomDrawer, className }: WorkbenchProps): SafeHtml;
|
|
640
|
+
declare function Workbench({ id, label, main, leftRail, rightRail, bottomDrawer, className, }: WorkbenchProps): SafeHtml;
|
|
625
641
|
|
|
626
642
|
export { Workbench, type WorkbenchPanel, type WorkbenchProps };
|
|
627
643
|
```
|
|
@@ -666,7 +682,7 @@ interface CollapsiblePanelToggleProps {
|
|
|
666
682
|
* put it in the panel's own header (to collapse) and somewhere always-visible
|
|
667
683
|
* (to expand while collapsed).
|
|
668
684
|
*/
|
|
669
|
-
declare function CollapsiblePanelToggle({ side, collapsed, action, panelId, label, className }: CollapsiblePanelToggleProps): SafeHtml;
|
|
685
|
+
declare function CollapsiblePanelToggle({ side, collapsed, action, panelId, label, className, }: CollapsiblePanelToggleProps): SafeHtml;
|
|
670
686
|
interface CollapsiblePanelProps {
|
|
671
687
|
/** A stable id for the panel — `wireSidebar` targets it and toggles reference it. */
|
|
672
688
|
id: string;
|
|
@@ -692,7 +708,7 @@ interface CollapsiblePanelProps {
|
|
|
692
708
|
* and persistence semantics, and with `CollapsiblePanelToggle` for the standard
|
|
693
709
|
* affordance. See `docs/24-collapsible-panel.md`.
|
|
694
710
|
*/
|
|
695
|
-
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, className }: CollapsiblePanelProps): SafeHtml;
|
|
711
|
+
declare function CollapsiblePanel({ id, side, collapsed, size, label, children, className, }: CollapsiblePanelProps): SafeHtml;
|
|
696
712
|
|
|
697
713
|
export { CollapsiblePanel, type CollapsiblePanelProps, type CollapsiblePanelSide, CollapsiblePanelToggle, type CollapsiblePanelToggleProps, collapsiblePanelToggleIcon };
|
|
698
714
|
```
|
|
@@ -775,7 +791,7 @@ interface TabScaffoldProps {
|
|
|
775
791
|
* On larger classes, promote the tabs to a `Workbench` rail or sidebar instead of
|
|
776
792
|
* a bottom bar. See `docs/23-app-layouts.md` §3.4.
|
|
777
793
|
*/
|
|
778
|
-
declare function TabScaffold({ id, label, tabs, active, className }: TabScaffoldProps): SafeHtml;
|
|
794
|
+
declare function TabScaffold({ id, label, tabs, active, className, }: TabScaffoldProps): SafeHtml;
|
|
779
795
|
|
|
780
796
|
export { TabScaffold, type TabScaffoldProps, type TabScaffoldTab };
|
|
781
797
|
```
|
|
@@ -819,7 +835,7 @@ interface ResizableRegionProps {
|
|
|
819
835
|
}
|
|
820
836
|
declare const clampRegionSize: (size: number, min: number, max: number) => number;
|
|
821
837
|
declare const resizeRegionFromPointer: (startSize: number, delta: number, edge: ResizableRegionEdge) => number;
|
|
822
|
-
declare function ResizableRegion({ id, label, size, min, max, axis, edge, collapsed, transitioning, handleIcon, children }: ResizableRegionProps): SafeHtml;
|
|
838
|
+
declare function ResizableRegion({ id, label, size, min, max, axis, edge, collapsed, transitioning, handleIcon, children, }: ResizableRegionProps): SafeHtml;
|
|
823
839
|
|
|
824
840
|
export { ResizableRegion, type ResizableRegionAxis, type ResizableRegionEdge, type ResizableRegionProps, clampRegionSize, resizeRegionFromPointer };
|
|
825
841
|
```
|
|
@@ -839,7 +855,7 @@ interface WireResizableRegionsOptions {
|
|
|
839
855
|
onCommit: (change: ResizeCommit) => void;
|
|
840
856
|
}
|
|
841
857
|
/** Wire pointer and separator-keyboard behavior for every ResizableRegion below root. */
|
|
842
|
-
declare function wireResizableRegions(root: HTMLElement, { step, largeStep, onPreview, onCommit }: WireResizableRegionsOptions): () => void;
|
|
858
|
+
declare function wireResizableRegions(root: HTMLElement, { step, largeStep, onPreview, onCommit, }: WireResizableRegionsOptions): () => void;
|
|
843
859
|
|
|
844
860
|
export { type ResizeCommit, type WireResizableRegionsOptions, wireResizableRegions };
|
|
845
861
|
```
|
|
@@ -934,6 +950,8 @@ interface CatalogEntry {
|
|
|
934
950
|
id: string;
|
|
935
951
|
name: string;
|
|
936
952
|
description?: string;
|
|
953
|
+
/** Short metadata tags shown at the trailing edge of the sidebar row. */
|
|
954
|
+
tags?: readonly string[];
|
|
937
955
|
resources?: readonly CatalogResource[];
|
|
938
956
|
related?: readonly CatalogRelated[];
|
|
939
957
|
}
|
|
@@ -980,6 +998,13 @@ interface CatalogProps {
|
|
|
980
998
|
sidebarFooter?: SafeHtml;
|
|
981
999
|
/** Status line content shown at the start of the detail footer. */
|
|
982
1000
|
status?: SafeHtml;
|
|
1001
|
+
/**
|
|
1002
|
+
* Whether to highlight transparent specimens' outer bounds and non-zero
|
|
1003
|
+
* margins. Pass a boolean (rather than omitting the prop) when the active
|
|
1004
|
+
* entry can switch between component and composition previews;
|
|
1005
|
+
* `wireCatalogGeometryOverlay` keeps the overlay synchronized.
|
|
1006
|
+
*/
|
|
1007
|
+
geometryOverlay?: boolean;
|
|
983
1008
|
selectAction?: string;
|
|
984
1009
|
toggleSidebarAction?: string;
|
|
985
1010
|
toggleThemeAction?: string;
|
|
@@ -995,7 +1020,7 @@ interface CatalogProps {
|
|
|
995
1020
|
* `collapsed`, and `theme` signals and computes `content` from `active` in its own
|
|
996
1021
|
* render; wire the sidebar/collapse/theme actions with `wireCatalog`.
|
|
997
1022
|
*/
|
|
998
|
-
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, }: CatalogProps): SafeHtml;
|
|
1023
|
+
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, geometryOverlay, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, }: CatalogProps): SafeHtml;
|
|
999
1024
|
/**
|
|
1000
1025
|
* How a {@link CatalogExample}'s content aligns its visible left edge with the
|
|
1001
1026
|
* example's `ListHeader` label (which sits 16px in — 8px title + 8px label):
|
|
@@ -1022,7 +1047,7 @@ interface CatalogExampleProps {
|
|
|
1022
1047
|
* `--kui-catalog-example-align` custom property so a debug overlay can exclude it
|
|
1023
1048
|
* from a specimen's measured margin.
|
|
1024
1049
|
*/
|
|
1025
|
-
declare function CatalogExample({ label, note, align, className, children }: CatalogExampleProps): SafeHtml;
|
|
1050
|
+
declare function CatalogExample({ label, note, align, className, children, }: CatalogExampleProps): SafeHtml;
|
|
1026
1051
|
interface CatalogExampleStackProps {
|
|
1027
1052
|
/** Accessible label for the stack region. */
|
|
1028
1053
|
label?: string;
|
|
@@ -1030,7 +1055,7 @@ interface CatalogExampleStackProps {
|
|
|
1030
1055
|
children?: SafeHtml | readonly SafeHtml[];
|
|
1031
1056
|
}
|
|
1032
1057
|
/** A vertically-stacked group of {@link CatalogExample}s with the catalog's example rhythm. */
|
|
1033
|
-
declare function CatalogExampleStack({ label, className, children }: CatalogExampleStackProps): SafeHtml;
|
|
1058
|
+
declare function CatalogExampleStack({ label, className, children, }: CatalogExampleStackProps): SafeHtml;
|
|
1034
1059
|
|
|
1035
1060
|
export { Catalog, type CatalogBrand, type CatalogEntry, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogProps, type CatalogRelated, type CatalogResource, type CatalogSecondaryGroup, type CatalogSection };
|
|
1036
1061
|
```
|
|
@@ -1049,11 +1074,40 @@ interface WireCatalogOptions {
|
|
|
1049
1074
|
onToggleSecondary?: () => void;
|
|
1050
1075
|
/** When set, `?<urlParam>=<id>` is written on select via `history.replaceState`. */
|
|
1051
1076
|
urlParam?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* Reveal the chosen sidebar row after selection. `true` uses desktop-safe
|
|
1079
|
+
* defaults; pass options to customize scroll alignment or the media guard.
|
|
1080
|
+
*/
|
|
1081
|
+
revealSelection?: boolean | CatalogRevealOptions;
|
|
1052
1082
|
selectAction?: string;
|
|
1053
1083
|
toggleSidebarAction?: string;
|
|
1054
1084
|
toggleThemeAction?: string;
|
|
1055
1085
|
toggleSecondaryAction?: string;
|
|
1056
1086
|
}
|
|
1087
|
+
interface CatalogRevealOptions {
|
|
1088
|
+
/** Scroll alignment within the sidebar. Default `'nearest'`. */
|
|
1089
|
+
block?: ScrollLogicalPosition;
|
|
1090
|
+
/** Cross-axis alignment. Default `'nearest'`. */
|
|
1091
|
+
inline?: ScrollLogicalPosition;
|
|
1092
|
+
/** Scroll behavior. Default `'auto'`. */
|
|
1093
|
+
behavior?: ScrollBehavior;
|
|
1094
|
+
/**
|
|
1095
|
+
* Only reveal when this media query matches. Defaults to the Catalog's
|
|
1096
|
+
* desktop layout; pass `false` to reveal at every viewport size.
|
|
1097
|
+
*/
|
|
1098
|
+
media?: string | false;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Reveal one Catalog sidebar entry after the controlled render settles without
|
|
1102
|
+
* moving focus. Returns a cancellation function for rapid selection changes.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function revealCatalogEntry(root: HTMLElement, id: string, { block, inline, behavior, media, }?: CatalogRevealOptions): () => void;
|
|
1105
|
+
/**
|
|
1106
|
+
* Keep a Catalog's opt-in geometry overlay synchronized with its preview.
|
|
1107
|
+
* Transparent specimens receive a dashed outer bound and positive margins use
|
|
1108
|
+
* devtools-style orange bands. Returns a disposer.
|
|
1109
|
+
*/
|
|
1110
|
+
declare function wireCatalogGeometryOverlay(root: HTMLElement): () => void;
|
|
1057
1111
|
/**
|
|
1058
1112
|
* Wire a {@link Catalog}'s interactions with one delegated listener set: sidebar
|
|
1059
1113
|
* item selection (and the related-entry popup menu), the sidebar collapse toggle, and
|
|
@@ -1061,9 +1115,9 @@ interface WireCatalogOptions {
|
|
|
1061
1115
|
* them in the callbacks; optionally mirror the active id into the URL via `urlParam`.
|
|
1062
1116
|
* Returns a disposer.
|
|
1063
1117
|
*/
|
|
1064
|
-
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleSecondary, urlParam, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, }: WireCatalogOptions): () => void;
|
|
1118
|
+
declare function wireCatalog(root: HTMLElement, { onSelect, onToggleSidebar, onToggleTheme, onToggleSecondary, urlParam, revealSelection, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, }: WireCatalogOptions): () => void;
|
|
1065
1119
|
|
|
1066
|
-
export { type WireCatalogOptions, wireCatalog };
|
|
1120
|
+
export { type CatalogRevealOptions, type WireCatalogOptions, revealCatalogEntry, wireCatalog, wireCatalogGeometryOverlay };
|
|
1067
1121
|
```
|
|
1068
1122
|
|
|
1069
1123
|
## `@kerfjs/ui/segmented-control`
|
|
@@ -1118,7 +1172,7 @@ interface StateBannerProps {
|
|
|
1118
1172
|
/** Render the title and detail as unanimated loading skeletons, keeping the icon and tone. */
|
|
1119
1173
|
placeholder?: boolean;
|
|
1120
1174
|
}
|
|
1121
|
-
declare function StateBanner({ title, detail, icon, action, tone, urgency, className, placeholder }: StateBannerProps): SafeHtml;
|
|
1175
|
+
declare function StateBanner({ title, detail, icon, action, tone, urgency, className, placeholder, }: StateBannerProps): SafeHtml;
|
|
1122
1176
|
|
|
1123
1177
|
export { StateBanner, type StateBannerProps, type StateBannerTone };
|
|
1124
1178
|
```
|
|
@@ -1136,7 +1190,7 @@ interface EmptyStateProps {
|
|
|
1136
1190
|
busy?: boolean;
|
|
1137
1191
|
className?: string;
|
|
1138
1192
|
}
|
|
1139
|
-
declare function EmptyState({ title, detail, icon, action, busy, className }: EmptyStateProps): SafeHtml;
|
|
1193
|
+
declare function EmptyState({ title, detail, icon, action, busy, className, }: EmptyStateProps): SafeHtml;
|
|
1140
1194
|
|
|
1141
1195
|
export { EmptyState, type EmptyStateProps };
|
|
1142
1196
|
```
|
|
@@ -1180,7 +1234,7 @@ interface SkeletonProps {
|
|
|
1180
1234
|
* `placeholder` prop. Decorative by default (`aria-hidden`); pass `label` to
|
|
1181
1235
|
* announce it. Sizes to its slot unless `width`/`height` are given.
|
|
1182
1236
|
*/
|
|
1183
|
-
declare function Skeleton({ width, height, radius, lines, label, className }: SkeletonProps): kerfjs.SafeHtml;
|
|
1237
|
+
declare function Skeleton({ width, height, radius, lines, label, className, }: SkeletonProps): kerfjs.SafeHtml;
|
|
1184
1238
|
|
|
1185
1239
|
export { Skeleton, type SkeletonProps };
|
|
1186
1240
|
```
|
|
@@ -1339,7 +1393,7 @@ interface TokenSearchFieldsHandle {
|
|
|
1339
1393
|
* expand/collapse/focus. Returns a {@link TokenSearchFieldsHandle} — a disposer that also
|
|
1340
1394
|
* exposes the managed `expanded` state per field id.
|
|
1341
1395
|
*/
|
|
1342
|
-
declare function wireTokenSearchFields(root: HTMLElement, { onSubmit, onEdit, collapsible, keyboard }?: WireTokenSearchFieldsOptions): TokenSearchFieldsHandle;
|
|
1396
|
+
declare function wireTokenSearchFields(root: HTMLElement, { onSubmit, onEdit, collapsible, keyboard, }?: WireTokenSearchFieldsOptions): TokenSearchFieldsHandle;
|
|
1343
1397
|
|
|
1344
1398
|
export { type TokenSearchCollapsibleOptions, type TokenSearchEdit, type TokenSearchFieldsHandle, type TokenSearchKeyboardOptions, type TokenSearchSubmit, type TokenSearchTokenRemoval, type WireTokenSearchFieldsOptions, wireTokenSearchFields };
|
|
1345
1399
|
```
|
package/ai/skill.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kerf-ui
|
|
3
3
|
description: Build interfaces with kerfjs and the @kerfjs/ui production component package. Use whenever code imports @kerfjs/ui or a task asks for Kerf UI components.
|
|
4
|
-
kerf-ui-skill-version: 1.
|
|
4
|
+
kerf-ui-skill-version: 1.36.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Building with @kerfjs/ui
|
|
@@ -15,9 +15,18 @@ return values, and supported import paths; do not infer them from examples.
|
|
|
15
15
|
Read `../docs/webawesome-theme.md` when using Web Awesome components or changing
|
|
16
16
|
shared theme tokens.
|
|
17
17
|
|
|
18
|
+
Before choosing or aligning components, look for a consumer-owned catalog that
|
|
19
|
+
conforms to `./component-catalog-extension.schema.json`. Treat its entries as a
|
|
20
|
+
second, package-qualified input beside `./component-catalog.json`: search both,
|
|
21
|
+
preserve their source identity, and use the shared `geometry` vocabulary across
|
|
22
|
+
their composition boundary. When a consuming project has reusable visual
|
|
23
|
+
components but no extension, generate and maintain one from
|
|
24
|
+
`../docs/examples/component-catalog-extension.json`; do not infer their geometry
|
|
25
|
+
from rendered appearance alone.
|
|
26
|
+
|
|
18
27
|
Choose from the need, not from visual resemblance:
|
|
19
28
|
|
|
20
|
-
1. Search the Kerf catalog and preferred Web Awesome subset.
|
|
29
|
+
1. Search the consumer extension first, then the Kerf catalog and preferred Web Awesome subset.
|
|
21
30
|
2. Reuse a primitive when purpose, anatomy, state, and interaction match.
|
|
22
31
|
3. Compose primitives for recurring layout. Prefer public props and tokens; use only cataloged `publicClasses` when composition-specific CSS needs a selector.
|
|
23
32
|
4. Add a thin application adapter for copy, domain mapping, actions, routing, persistence, permissions, and transport.
|
|
@@ -25,25 +34,25 @@ Choose from the need, not from visual resemblance:
|
|
|
25
34
|
|
|
26
35
|
Quick routing:
|
|
27
36
|
|
|
28
|
-
| Need
|
|
29
|
-
|
|
|
30
|
-
| Navigation row
|
|
31
|
-
| Navigation row with a trailing action | `ListActionRow`
|
|
32
|
-
| Page, panel, or dialog heading
|
|
33
|
-
| Exclusive choice
|
|
34
|
-
| Status or absent content
|
|
35
|
-
| Loading placeholder
|
|
36
|
-
| Adjustable or static columns
|
|
37
|
-
| Structured or ordinary search
|
|
38
|
-
| Key/value facts
|
|
39
|
-
| Command search
|
|
37
|
+
| Need | Choose | Nearest alternatives / boundary |
|
|
38
|
+
| ------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| Navigation row | `ListItem` | Use an ordinary link or button when sidebar/menu anatomy and state do not apply. Multiline leading icons stay aligned with the first text line. |
|
|
40
|
+
| Navigation row with a trailing action | `ListActionRow` | Use `ListItem` when the trailing region is dormant; never put controls inside either component's SafeHtml slots. Multiline leading icons stay aligned with the first text line. |
|
|
41
|
+
| Page, panel, or dialog heading | `Toolbar` or `PanelHeader` | Toolbar is persistent chrome; `PanelHeader` heads a panel, dialog, or page. |
|
|
42
|
+
| Exclusive choice | `TabBar`, `SegmentedControl`, or `Select` | Tabs switch tabpanels; segments expose a few choices; Select handles a longer value list. |
|
|
43
|
+
| Status or absent content | `StateBanner` or `EmptyState` | Web Awesome callouts suit ecosystem content; toasts are transient and never the only record of important state. |
|
|
44
|
+
| Loading placeholder | a component's `placeholder` prop, or `Skeleton` | Set `placeholder` on a value-bearing component (`Select`, `ListHeader`, `ListItem`, `ValueTableRow`, `PanelHeader`, `SegmentedControl`, `StateBanner`, `AppTab`, `ToolbarText`, `ListActionRow`) to render its real chrome with value slots as subtle **unanimated** skeletons and interactivity disabled — do not hand-rebuild an empty state. `Skeleton` is the standalone block for a custom slot. Use `LoadingSpinner` for known busy activity, not a skeleton; never animate a skeleton; prefer it over `wa-skeleton`. |
|
|
45
|
+
| Adjustable or static columns | `ResizableRegion` or CSS grid | Use the component only for a user-operable controlled separator. |
|
|
46
|
+
| Structured or ordinary search | `TokenSearchField` or an input | Use token search only when text and ordered filter chips form one editor. |
|
|
47
|
+
| Key/value facts | `ValueTable` with `ValueTableRow` | Use rows with `icon` only when the optional 24px leading visual adds context. |
|
|
48
|
+
| Command search | Application-local semantics using shared layout vocabulary | No runtime component or production recipe is exported; the app owns behavior, policy, and copy. |
|
|
40
49
|
|
|
41
50
|
For a complete shell, sidebar, workspace header, list-detail dialog, composer
|
|
42
51
|
form, list-state lifecycle, or mixed-control toolbar, start from the runnable
|
|
43
52
|
reference in [`docs/recipes.md`](../docs/recipes.md). Preserve its production
|
|
44
53
|
primitives and semantic ownership; replace application state, policy, and copy.
|
|
45
54
|
|
|
46
|
-
The concise human decision matrix is in [`component-selection.md`](../docs/component-selection.md). For exhaustive tool retrieval, load [`component-catalog.json`](./component-catalog.json), the canonical metadata for every public component/helper, composition, and supported Web Awesome entry. Use its linked current recipes instead of inferring behavior from CSS.
|
|
55
|
+
The concise human decision matrix is in [`component-selection.md`](../docs/component-selection.md). For exhaustive tool retrieval, load [`component-catalog.json`](./component-catalog.json), the canonical metadata for every public component/helper, composition, and supported Web Awesome entry. Its `geometry` object identifies who owns margin, border, and padding; use that contract to avoid double-insetting or wrapping an already complete surface. Use its linked current recipes instead of inferring behavior from CSS.
|
|
47
56
|
|
|
48
57
|
Hard rules:
|
|
49
58
|
|
|
@@ -58,44 +67,44 @@ Hard rules:
|
|
|
58
67
|
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. Handle its action, update `value`, keep meaningful choice labels, and preserve every enabled native button in sequential Tab order.
|
|
59
68
|
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. Arrow/Home/End select on move by default; 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.
|
|
60
69
|
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, or a clear-button mousedown guard — the helper owns them. 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.
|
|
61
|
-
12. Demo work uses public production component subpaths and their browser-selected CSS. 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. Project its 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.
|
|
62
|
-
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.
|
|
63
|
-
14. Treat the complete Web Awesome catalog as support coverage, not a recommendation list. 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.
|
|
70
|
+
12. Demo work uses public production component subpaths and their browser-selected CSS. 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. Project its 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. For focused component previews, pass `geometryOverlay={true}` to `Catalog` so transparent bounds and positive margins remain inspectable; disable it for compositions, and use the catalog's machine-readable `geometry` ownership to interpret the result instead of treating every visible inset as component-owned. 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.
|
|
71
|
+
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); override those tiers instead of restyling individual 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.
|
|
72
|
+
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.
|
|
64
73
|
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`. 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 or duplicate item geometry in wrappers.
|
|
65
74
|
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.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
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. `SegmentedControl`, `Select`, a collapsible `TokenSearchField`, and Web Awesome controls all live inside a `ToolbarControlGroup`. 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, chiefly a `wa-dropdown` popup trigger. A popup menu in a toolbar is a `single` `ToolbarControlGroup` wrapping a `wa-dropdown` whose `slot="trigger"` `wa-button` is the toolbar button and whose `wa-dropdown-item`s are the menu, with the dropdown kept under `data-morph-skip-children`. `PanelHeader` composes these for you as a panel/dialog/page heading. Wrap every toolbar item, including dormant text, in `ToolbarControlGroup`. A group remains 44px outside (`calc(2px + remify(42px))`) when its border/background are transparent; use 8px between groups and inside items. Split dormant and interactive regions: `ListHeader` fills the available inline width and keeps its label and mutually exclusive semantic count or non-count `badge` together, with an independent logical-end 44px action unless disclosure mode makes the title cluster the button. Its action visual defaults to 18px through `--kui-list-header-action-icon-size`; never shrink the target to match it. 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 44px 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.
|
|
76
|
+
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, `PanelHeader` title/summary 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.
|
|
77
|
+
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.
|
|
78
|
+
20. Use `PanelHeader` for a panel, dialog, or page heading, not a custom heading row. It is a plain top `Toolbar` (overriding no Toolbar styles): the leading zone holds an optional icon (a normal bordered `ToolbarControlGroup` given a brand fill with a matching border) and the title as extra-large `ToolbarText`; the app's trailing controls (typically a `ToolbarControlGroup`) go straight in the trailing zone, and the icon group is omitted when no icon is passed. Its optional `summary`/`summaryId` row stays below the title. The app owns modal behavior, focus, dismissal, command policy, and action handling.
|
|
79
|
+
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; prefer the five canonical remify-authored tokens. See `docs/layout.md` "Spacing scale".
|
|
80
|
+
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`. Complex tool with peripheral panels → `Workbench` (`@kerfjs/ui/workbench`, collapsible rails + drawer) `atLeast('desktop')`, degrading to `NavStack`/overlays below. 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. Dialogs pick the same inner layout, then present per device class (full-screen modal on `compact`, inline on desktop). See `docs/app-layouts.md` and `docs/collapsible-panel.md`.
|
|
72
81
|
|
|
73
82
|
Common mistakes:
|
|
74
83
|
|
|
75
|
-
| Mistake
|
|
76
|
-
|
|
|
77
|
-
| Hard-coded project/transport action in a component
|
|
78
|
-
| Per-instance signal at module scope
|
|
79
|
-
| `role="menuitem"` on one button
|
|
80
|
-
| Put a button/link/interactive role in `ListItem.trailing` or a `ListActionRow` SafeHtml slot | Use `ListActionRow` for the sibling controls and keep its label/icon slots dormant
|
|
81
|
-
| Copy ListItem/ListHeader markup to add product data or a popover target
|
|
82
|
-
| Concatenate a section count into a ListHeader label or numeric badge
|
|
83
|
-
| Put a chevron on navigation that reveals nothing
|
|
84
|
-
| Test only a custom-element attribute
|
|
85
|
-
| Import all Web Awesome components
|
|
86
|
-
| Write `wa-*` JSX without activating its types
|
|
87
|
-
| Maintain a root list of component styles
|
|
88
|
-
| Add demo-only markup for a production state
|
|
89
|
-
| Choose a listed ecosystem component by default
|
|
90
|
-
| Add sidebar-specific wrapper padding
|
|
91
|
-
| Put bare text or controls directly in a toolbar slot
|
|
92
|
-
| Reach for `wa-button` for a plain control inside a `ToolbarControlGroup`
|
|
93
|
-
| Let the document, pane, and list all scroll
|
|
94
|
-
| Invent an `@kerfjs/ui` command-palette export
|
|
95
|
-
| Handwrite `ValueTable` row wrappers or compensate their padding or separators
|
|
96
|
-
| Rebuild a panel/dialog heading row by hand
|
|
97
|
-
| Force a `width`/`height`/`padding` on a component to size or space it
|
|
98
|
-
| Wrap a component or region in a card, border, backdrop, or outline to "contain" it
|
|
99
|
-
| Add another container's padding on top of a content-item's own margin
|
|
100
|
-
| Keep chrome, a label, or a readout that aids no decision
|
|
101
|
-
| Override a component's default size or color because it "looks off"
|
|
84
|
+
| Mistake | Fix |
|
|
85
|
+
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| Hard-coded project/transport action in a component | Pass a semantic `data-action` string from an application adapter |
|
|
87
|
+
| Per-instance signal at module scope | Create state in the application or a factory and pass it in |
|
|
88
|
+
| `role="menuitem"` on one button | Use the native button, or implement the complete ARIA menu widget |
|
|
89
|
+
| Put a button/link/interactive role in `ListItem.trailing` or a `ListActionRow` SafeHtml slot | Use `ListActionRow` for the sibling controls and keep its label/icon slots dormant |
|
|
90
|
+
| Copy ListItem/ListHeader markup to add product data or a popover target | Use the typed `rootAttributes`/`triggerAttributes` slots and retain the component's protected semantics |
|
|
91
|
+
| Concatenate a section count into a ListHeader label or numeric badge | Pass `count={value}` and a localized full phrase such as `countLabel="3 notes"`; reserve `badge` for non-count SafeHtml |
|
|
92
|
+
| Put a chevron on navigation that reveals nothing | Remove it, or model a real controlled `ListHeader` disclosure; omit `actionIcon` to use the production `DisclosureArrow` |
|
|
93
|
+
| Test only a custom-element attribute | Assert live property, emitted event, focus, and rendered output |
|
|
94
|
+
| Import all Web Awesome components | Import only `@kerfjs/ui/select/register` for `Select`, or individual Web Awesome modules for other controls; `webawesome.css` registers no JavaScript |
|
|
95
|
+
| Write `wa-*` JSX without activating its types | Add `import type {} from '@kerfjs/ui/webawesome'`; registration and theme imports remain separate |
|
|
96
|
+
| Maintain a root list of component styles | Import each visual component from its JS subpath; its reachable CSS follows automatically |
|
|
97
|
+
| Add demo-only markup for a production state | Add the state to the production component, then render that export in the catalog |
|
|
98
|
+
| Choose a listed ecosystem component by default | Apply the component-selection guidance above; catalog coverage means supported and themed, not preferred |
|
|
99
|
+
| Add sidebar-specific wrapper padding | Use the unpadded `.kui-pane`; let `ListHeader`, `ListItem`, and `.kui-content-item` own their 8/1/8 geometry |
|
|
100
|
+
| Put bare text or controls directly in a toolbar slot | Wrap every item in `ToolbarControlGroup`, using `appearance="borderless"` for transparent chrome |
|
|
101
|
+
| Reach for `wa-button` for a plain control inside a `ToolbarControlGroup` | Use a plain `<button>` (the group styles it fully); `wa-button` is only for Web Awesome features like a `wa-dropdown` popup trigger |
|
|
102
|
+
| Let the document, pane, and list all scroll | Keep fixed chrome outside one `.kui-pane__content` scroll owner per pane |
|
|
103
|
+
| Invent an `@kerfjs/ui` command-palette export | Keep the semantics application-local, reuse public layout vocabulary, and propose recurring behavior upstream |
|
|
104
|
+
| 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 |
|
|
105
|
+
| Rebuild a panel/dialog heading row by hand | Use `PanelHeader`: a plain toolbar with an optional bordered icon group, an xl title, trailing controls you pass, and the optional subtitle below |
|
|
106
|
+
| Force a `width`/`height`/`padding` on a component to size or space it | Let it size to its content and tokens; a forced box leaves a halo or a stretched oval — adjust an icon-size or spacing token, not the box |
|
|
107
|
+
| Wrap a component or region in a card, border, backdrop, or outline to "contain" it | Let it sit on the surface; add a `.kui-content-item` only for a real distinction — hierarchy comes from alignment, spacing, and type first |
|
|
108
|
+
| Add another container's padding on top of a content-item's own margin | Pick one owner of the inset; a pane has no padding and its `.kui-content` children own the 8/1/8 geometry — stacking them double-insets |
|
|
109
|
+
| Keep chrome, a label, or a readout that aids no decision | Delete it; every element must help a person decide or act |
|
|
110
|
+
| Override a component's default size or color because it "looks off" | Trust the default (a LucideIcon is 24px) and fix the surrounding layout instead |
|
|
@@ -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.18` 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';
|
package/dist/app-tab.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ interface AppTabProps {
|
|
|
25
25
|
placeholder?: boolean;
|
|
26
26
|
rootAttributes?: AppTabRootAttributes;
|
|
27
27
|
}
|
|
28
|
-
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes }: AppTabProps): SafeHtml;
|
|
28
|
+
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes, }: AppTabProps): SafeHtml;
|
|
29
29
|
|
|
30
30
|
export { AppTab, type AppTabProps };
|
package/dist/app-tab.js
CHANGED