@kerfjs/ui 5.0.0-beta.132 → 5.0.0-beta.134
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 +26 -1
- package/ai/choice-wiring-mode.cjs +68 -0
- package/ai/component-catalog.json +4 -2
- package/ai/component-composition.json +6 -1
- package/ai/components/combobox.md +1 -1
- package/ai/components/popup-menu.md +1 -0
- package/ai/components/switch.md +1 -1
- package/ai/public-api-signatures-v1.md +49 -9
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/catalog-library.d.ts +26 -0
- package/dist/catalog-library.js +2484 -0
- package/dist/catalog-library.js.map +1 -0
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog-resources.js +1 -20
- package/dist/catalog-resources.js.map +1 -1
- package/dist/catalog.d.ts +3 -2
- package/dist/catalog.js +140 -13
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-DUKE3PLH.js → chunk-DXZA7OC6.js} +57 -13
- package/dist/chunk-DXZA7OC6.js.map +1 -0
- package/dist/{chunk-RYBJ7OZB.js → chunk-IXT2ARIM.js} +2 -2
- package/dist/{chunk-RYBJ7OZB.js.map → chunk-IXT2ARIM.js.map} +1 -1
- package/dist/{chunk-4YXKDS6I.js → chunk-PBXTHYB4.js} +1 -1
- package/dist/chunk-PBXTHYB4.js.map +1 -0
- package/dist/{chunk-FJAAOIMP.js → chunk-PIYFVFPL.js} +8 -2
- package/dist/chunk-PIYFVFPL.js.map +1 -0
- package/dist/{chunk-H2XGWH4V.js → chunk-QNB5DKKP.js} +2 -2
- package/dist/{chunk-H2XGWH4V.js.map → chunk-QNB5DKKP.js.map} +1 -1
- package/dist/{chunk-TNJGPG6R.js → chunk-QWAAR5JX.js} +2 -2
- package/dist/{chunk-TNJGPG6R.js.map → chunk-QWAAR5JX.js.map} +1 -1
- package/dist/{chunk-Z4PGAYO7.js → chunk-XNSYDA6G.js} +4 -4
- package/dist/{chunk-Z4PGAYO7.js.map → chunk-XNSYDA6G.js.map} +1 -1
- package/dist/chunk-YM7VF5SY.js +22 -0
- package/dist/chunk-YM7VF5SY.js.map +1 -0
- package/dist/{chunk-5L3MLWD5.js → chunk-YRQ4KKLG.js} +11 -2
- package/dist/chunk-YRQ4KKLG.js.map +1 -0
- package/dist/{chunk-EWCTBJ5O.js → chunk-ZDI5I2HT.js} +2 -2
- package/dist/{chunk-EWCTBJ5O.js.map → chunk-ZDI5I2HT.js.map} +1 -1
- package/dist/collapsible-panel.js +2 -2
- package/dist/combobox.d.ts +5 -1
- package/dist/combobox.js +1 -1
- package/dist/compose-B_GFfFhm.d.ts +36 -0
- package/dist/index.js +9 -9
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.js +2 -2
- package/dist/nav-stack.js +1 -1
- package/dist/popup-menu-register.js +7 -1
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +2 -0
- package/dist/popup-menu.js +1 -1
- package/dist/select-register.js +2 -1
- package/dist/select-register.js.map +1 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/components/actions/popup-menu/popup-menu.css +12 -1
- package/dist/styles/components/data-display/value-table/value-table.css +3 -1
- package/dist/styles/components/forms/switch/switch.css +9 -0
- package/dist/styles/popup-menu.css +12 -1
- package/dist/styles/switch.css +9 -0
- package/dist/styles/value-table.css +3 -1
- package/dist/switch.d.ts +3 -1
- package/dist/switch.js +1 -1
- package/dist/{types-DmHWkSd6.d.ts → types-CuKf5G87.d.ts} +6 -2
- package/dist/wire-catalog.d.ts +3 -3
- package/dist/wire-catalog.js +11 -2
- package/dist/wire-catalog.js.map +1 -1
- package/dist/workbench-dialog.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/catalog.md +59 -0
- package/docs/component-selection.md +6 -1
- package/docs/examples/composed-catalog.tsx +113 -0
- package/docs/examples/scoped-combobox.ts +99 -0
- package/docs/examples/typed-action-table.tsx +34 -0
- package/docs/forms-and-validation.md +2 -0
- package/docs/investigations/combobox-seed-ownership.md +49 -0
- package/docs/investigations/measure-scoped-combobox.mjs +87 -0
- package/docs/investigations/scoped-combobox.md +98 -0
- package/docs/switch.md +21 -0
- package/docs/ui-doctor.md +16 -0
- package/doctor/cli.mjs +38 -25
- package/doctor/explain-use.mjs +320 -0
- package/package.json +5 -2
- package/dist/chunk-4YXKDS6I.js.map +0 -1
- package/dist/chunk-5L3MLWD5.js.map +0 -1
- package/dist/chunk-DUKE3PLH.js.map +0 -1
- package/dist/chunk-FJAAOIMP.js.map +0 -1
package/README.md
CHANGED
|
@@ -124,6 +124,16 @@ mount(root, () => (
|
|
|
124
124
|
|
|
125
125
|
Components return Kerf `SafeHtml`. They do not own application state or attach transient listeners. Actions are stable `data-action` hooks; the application wires them once with `delegate()` or `delegateActions()` and retains the disposer.
|
|
126
126
|
|
|
127
|
+
For an application-owned command table, derive the accepted names from its
|
|
128
|
+
handlers with `const click = action<keyof typeof clicks>`. Pass the resulting
|
|
129
|
+
spec's `.value` to a UI component or spread its `.attrs` onto native JSX.
|
|
130
|
+
Use `satisfies Record<string, ActionHandler<…>>` to check the table while
|
|
131
|
+
retaining its literal keys. An explicit `Record<string, …>` annotation widens
|
|
132
|
+
the keys to arbitrary strings. Define a separate table for each event. Direct
|
|
133
|
+
string props still accept application- or plugin-defined names. The
|
|
134
|
+
[typed action table example](./docs/examples/typed-action-table.tsx) shows
|
|
135
|
+
both emitters and the owning root's setup and cleanup.
|
|
136
|
+
|
|
127
137
|
Component content positions use one convention: `children` is the homogeneous
|
|
128
138
|
primary region, while semantic positions and replacement content use explicit
|
|
129
139
|
named `SafeHtml` props such as `header`, `footer`, `leading`, `trailing`,
|
|
@@ -440,6 +450,11 @@ pretending app-local components are `@kerfjs/ui` exports. A package that
|
|
|
440
450
|
keeps a `kerf.components.json` generates this extension with
|
|
441
451
|
`kerf-component-catalog` by setting `kerfComponentCatalog.selectionOutput`
|
|
442
452
|
instead of maintaining a second JSON by hand.
|
|
453
|
+
A developer catalog can import the published `kerfCatalogPackage` from
|
|
454
|
+
`@kerfjs/ui/catalog-library`, including its Web Awesome integration catalog.
|
|
455
|
+
`composeCatalog` resolves package-qualified navigation, Uses and Used by, and
|
|
456
|
+
optional previews. See [Import a library catalog](./docs/catalog.md#import-a-library-catalog).
|
|
457
|
+
|
|
443
458
|
For a consumer UX demo, `@kerfjs/ui/catalog-projection` derives rows and
|
|
444
459
|
relationships from that extension; `kerf-catalog-demo --write` emits a typed
|
|
445
460
|
module and `--check` catches drift. See the [catalog guide](./docs/catalog.md)
|
|
@@ -553,7 +568,7 @@ context so adding the declaration boundary does not mutate a frozen measured
|
|
|
553
568
|
regression suite.
|
|
554
569
|
|
|
555
570
|
`npm run catalog:sync` deterministically projects the fields used by the UX
|
|
556
|
-
catalog into `
|
|
571
|
+
catalog into `src/catalog/packages/catalog.generated.ts`, including the existing guidance
|
|
557
572
|
path and the first-party source path for each main, recipe, or Web Awesome
|
|
558
573
|
specimen. First-party component entries also derive their implementation path
|
|
559
574
|
from the canonical browser import. Do not edit that generated file.
|
|
@@ -972,3 +987,13 @@ declarations. An application that bundles Web Awesome components
|
|
|
972
987
|
redistributes them, so it should retain Web Awesome's MIT notice; Font Awesome
|
|
973
988
|
Free, whose icons Web Awesome embeds, asks that the attribution comments in
|
|
974
989
|
those icons stay intact.
|
|
990
|
+
|
|
991
|
+
To inspect one Combobox or ChoiceChips use, run
|
|
992
|
+
`kerf-ui-doctor --root . --explain-use src/picker.tsx:12:7` at a position
|
|
993
|
+
inside its JSX opening tag. Add `--format json` for the versioned result.
|
|
994
|
+
The query reads the consumer's nearest workspace tsconfig and the shipped
|
|
995
|
+
component contract. With no tsconfig it inspects the selected file and its
|
|
996
|
+
imports. It reports literal interaction mode, application-owned state, wiring
|
|
997
|
+
and cleanup call sites, and unresolved relationships. Use those sites to
|
|
998
|
+
verify root containment and actual teardown. Dynamic props and application
|
|
999
|
+
wrappers can leave the mode or contract unknown.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Ordered JSX attributes. A spread can override either option until a later
|
|
2
|
+
// literal settles it. null means the value cannot be recovered statically.
|
|
3
|
+
function choiceMode(attributes) {
|
|
4
|
+
let multiple = false;
|
|
5
|
+
let overflow = 'wrap';
|
|
6
|
+
for (const [name, value] of attributes) {
|
|
7
|
+
if (name === '...') {
|
|
8
|
+
multiple = null;
|
|
9
|
+
overflow = null;
|
|
10
|
+
}
|
|
11
|
+
if (name === 'multiple') multiple = value;
|
|
12
|
+
if (name === 'overflow') overflow = value;
|
|
13
|
+
}
|
|
14
|
+
const mode =
|
|
15
|
+
multiple === null
|
|
16
|
+
? 'unknown'
|
|
17
|
+
: multiple === true
|
|
18
|
+
? 'listbox'
|
|
19
|
+
: multiple === 'toggle'
|
|
20
|
+
? 'checkboxes'
|
|
21
|
+
: 'radios';
|
|
22
|
+
const required =
|
|
23
|
+
mode === 'listbox' || overflow === 'scroll'
|
|
24
|
+
? true
|
|
25
|
+
: mode === 'unknown' || overflow === null
|
|
26
|
+
? null
|
|
27
|
+
: false;
|
|
28
|
+
return { mode, required };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function tsAttributes(ts, opening) {
|
|
32
|
+
return opening.attributes.properties.map((prop) => {
|
|
33
|
+
if (ts.isJsxSpreadAttribute(prop)) return ['...', null];
|
|
34
|
+
const name = prop.name.getText();
|
|
35
|
+
if (!prop.initializer) return [name, true];
|
|
36
|
+
let value = prop.initializer;
|
|
37
|
+
if (ts.isJsxExpression(value)) value = value.expression;
|
|
38
|
+
if (value && ts.isStringLiteral(value)) return [name, value.text];
|
|
39
|
+
if (value?.kind === ts.SyntaxKind.TrueKeyword) return [name, true];
|
|
40
|
+
if (value?.kind === ts.SyntaxKind.FalseKeyword) return [name, false];
|
|
41
|
+
return [name, null];
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ESLint's cross-file pass has source text only. Parse JSX syntax rather
|
|
46
|
+
// than guessing where a JSX opening ends around nested expressions.
|
|
47
|
+
function choiceUses(source, name) {
|
|
48
|
+
const ts = require('typescript');
|
|
49
|
+
const file = ts.createSourceFile(
|
|
50
|
+
'use.tsx',
|
|
51
|
+
source,
|
|
52
|
+
ts.ScriptTarget.Latest,
|
|
53
|
+
true,
|
|
54
|
+
ts.ScriptKind.TSX,
|
|
55
|
+
);
|
|
56
|
+
const visit = (node) => {
|
|
57
|
+
if (
|
|
58
|
+
(ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node)) &&
|
|
59
|
+
node.tagName.getText(file) === name &&
|
|
60
|
+
choiceMode(tsAttributes(ts, node)).required !== false
|
|
61
|
+
)
|
|
62
|
+
return true;
|
|
63
|
+
return ts.forEachChild(node, visit);
|
|
64
|
+
};
|
|
65
|
+
return Boolean(visit(file));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = { choiceMode, tsAttributes, choiceUses };
|
|
@@ -7856,7 +7856,8 @@
|
|
|
7856
7856
|
"appOwns": [
|
|
7857
7857
|
"the suggestions and the committed values",
|
|
7858
7858
|
"normalizing and validating created values",
|
|
7859
|
-
"clearing the field after a commit"
|
|
7859
|
+
"clearing the field after a commit",
|
|
7860
|
+
"a stable value prop for initial and form-reset text; changing it after blur replaces the displayed text"
|
|
7860
7861
|
],
|
|
7861
7862
|
"variants": [
|
|
7862
7863
|
"with create",
|
|
@@ -8507,7 +8508,7 @@
|
|
|
8507
8508
|
"border": "self",
|
|
8508
8509
|
"padding": "none",
|
|
8509
8510
|
"notes": [
|
|
8510
|
-
"
|
|
8511
|
+
"By default the 35×20 track (31.5×18 compact) precedes its label by 8px (7px). For a settings row, labelPlacement=\"start\" aligns the label and hint at the inline start and the track at the inline end. Both placements align the hint under the label."
|
|
8511
8512
|
]
|
|
8512
8513
|
},
|
|
8513
8514
|
"delivery": {
|
|
@@ -8780,6 +8781,7 @@
|
|
|
8780
8781
|
"disabled items",
|
|
8781
8782
|
"nested actions",
|
|
8782
8783
|
"checked choices and trailing details",
|
|
8784
|
+
"description: a quiet second line under an item’s label for secondary text, such as a ticket title under its number",
|
|
8783
8785
|
"danger tone and disabled reasons",
|
|
8784
8786
|
"context trigger with a rendered anchor point and a zero-footprint anchor host",
|
|
8785
8787
|
"placement",
|
|
@@ -6107,6 +6107,11 @@
|
|
|
6107
6107
|
"id": "clearing the field after a commit",
|
|
6108
6108
|
"owner": "application",
|
|
6109
6109
|
"required": false
|
|
6110
|
+
},
|
|
6111
|
+
{
|
|
6112
|
+
"id": "a stable value prop for initial and form-reset text; changing it after blur replaces the displayed text",
|
|
6113
|
+
"owner": "application",
|
|
6114
|
+
"required": false
|
|
6110
6115
|
}
|
|
6111
6116
|
],
|
|
6112
6117
|
"wiring": {
|
|
@@ -6566,7 +6571,7 @@
|
|
|
6566
6571
|
"border": "self",
|
|
6567
6572
|
"padding": "none",
|
|
6568
6573
|
"notes": [
|
|
6569
|
-
"
|
|
6574
|
+
"By default the 35×20 track (31.5×18 compact) precedes its label by 8px (7px). For a settings row, labelPlacement=\"start\" aligns the label and hint at the inline start and the track at the inline end. Both placements align the hint under the label."
|
|
6570
6575
|
]
|
|
6571
6576
|
}
|
|
6572
6577
|
},
|
|
@@ -49,7 +49,7 @@ Exact prop names and types: [`@kerfjs/ui/combobox`](../public-api-signatures-v1.
|
|
|
49
49
|
|
|
50
50
|
## State and wiring
|
|
51
51
|
|
|
52
|
-
**The app owns:** the suggestions and the committed values; normalizing and validating created values; clearing the field after a commit.
|
|
52
|
+
**The app owns:** the suggestions and the committed values; normalizing and validating created values; clearing the field after a commit; a stable value prop for initial and form-reset text; changing it after blur replaces the displayed text.
|
|
53
53
|
|
|
54
54
|
**Wiring:** `wireComboboxes` is required.
|
|
55
55
|
|
|
@@ -45,6 +45,7 @@ Exact prop names and types: [`@kerfjs/ui/popup-menu`](../public-api-signatures-v
|
|
|
45
45
|
- disabled items
|
|
46
46
|
- nested actions
|
|
47
47
|
- checked choices and trailing details
|
|
48
|
+
- description: a quiet second line under an item’s label for secondary text, such as a ticket title under its number
|
|
48
49
|
- danger tone and disabled reasons
|
|
49
50
|
- context trigger with a rendered anchor point and a zero-footprint anchor host
|
|
50
51
|
- placement
|
package/ai/components/switch.md
CHANGED
|
@@ -56,7 +56,7 @@ No wiring helper.
|
|
|
56
56
|
|
|
57
57
|
Margin: none · border: self · padding: none (layout role: controls). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
58
58
|
|
|
59
|
-
-
|
|
59
|
+
- By default the 35×20 track (31.5×18 compact) precedes its label by 8px (7px). For a settings row, labelPlacement="start" aligns the label and hint at the inline start and the track at the inline end. Both placements align the hint under the label.
|
|
60
60
|
|
|
61
61
|
## Accessibility
|
|
62
62
|
|
|
@@ -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.134` and `kerfjs@5.0.0-beta.134`. 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
|
|
|
@@ -643,6 +643,8 @@ type PopupMenuDataAttributes = Readonly<Record<`data-${string}`, string | undefi
|
|
|
643
643
|
interface PopupMenuItem {
|
|
644
644
|
kind?: 'item';
|
|
645
645
|
label: string;
|
|
646
|
+
/** Quiet secondary text beneath the label, announced as the item description. */
|
|
647
|
+
description?: string;
|
|
646
648
|
/** Delegated `data-action` the app handles when the item is chosen. */
|
|
647
649
|
action?: string;
|
|
648
650
|
/** The item's value, reported in the menu's `kui-menu-select` event. */
|
|
@@ -3664,9 +3666,10 @@ export { DEFAULT_BREAKPOINTS, type DeviceBreakpoints, type DeviceClass, type Dev
|
|
|
3664
3666
|
```ts
|
|
3665
3667
|
import * as kerfjs from 'kerfjs';
|
|
3666
3668
|
import { SafeHtml } from 'kerfjs';
|
|
3667
|
-
import {
|
|
3668
|
-
export {
|
|
3669
|
+
import { d as CatalogProps } from './types-CuKf5G87.js';
|
|
3670
|
+
export { c as CatalogBackgroundStyle, e as CatalogBrand, a as CatalogEntry, f as CatalogRelated, C as CatalogResource, b as CatalogSecondaryGroup, g as CatalogSection, h as CatalogSettingsConfig, i as CatalogStageRootAttributes, j as CatalogTagFilter, k as CatalogUxReview } from './types-CuKf5G87.js';
|
|
3669
3671
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3672
|
+
export { C as CatalogPackage, a as CatalogPackageEntry, b as CatalogPreview, c as CatalogReference, d as ComposedCatalog, e as catalogEntryId, f as composeCatalog } from './compose-B_GFfFhm.js';
|
|
3670
3673
|
import './toolbar.js';
|
|
3671
3674
|
import './extension-attributes-CnqvBmj3.js';
|
|
3672
3675
|
import './sides-BPSWde0A.js';
|
|
@@ -3818,10 +3821,41 @@ declare function loadUxReviewProject(pageUrl: string | URL, fetchImpl?: typeof g
|
|
|
3818
3821
|
export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogExampleStackWidth, type CatalogExampleViewport, CatalogProps, UX_REVIEW_PROJECT_PATH, type UxReviewCapture, loadUxReviewProject, uxReviewCaptureUrl };
|
|
3819
3822
|
```
|
|
3820
3823
|
|
|
3824
|
+
## `@kerfjs/ui/catalog-library`
|
|
3825
|
+
|
|
3826
|
+
```ts
|
|
3827
|
+
import { C as CatalogPackage } from './compose-B_GFfFhm.js';
|
|
3828
|
+
import './semantic-content-BbzjvSu9.js';
|
|
3829
|
+
import 'kerfjs';
|
|
3830
|
+
import './types-CuKf5G87.js';
|
|
3831
|
+
import './toolbar.js';
|
|
3832
|
+
import './extension-attributes-CnqvBmj3.js';
|
|
3833
|
+
import './sides-BPSWde0A.js';
|
|
3834
|
+
import './pane.js';
|
|
3835
|
+
import './scroll-clearance-BikHljTc.js';
|
|
3836
|
+
import './anchor-name-BZ1rpxaw.js';
|
|
3837
|
+
import './css-values.js';
|
|
3838
|
+
import './surface-tint-DQgYCaP9.js';
|
|
3839
|
+
import './workbench.js';
|
|
3840
|
+
import './nav-stack-IKSMxo2A.js';
|
|
3841
|
+
import './list.js';
|
|
3842
|
+
import './flex-alignment-4ms8ZbV8.js';
|
|
3843
|
+
import './panel-toolbar-CEcHHDkn.js';
|
|
3844
|
+
import './lucide-icon.js';
|
|
3845
|
+
import 'lucide';
|
|
3846
|
+
import './toolbar-text.js';
|
|
3847
|
+
import './resizable-region.js';
|
|
3848
|
+
|
|
3849
|
+
/** The shipped Kerf UI catalog, including its curated Web Awesome integration catalog. */
|
|
3850
|
+
declare const kerfCatalogPackage: CatalogPackage;
|
|
3851
|
+
|
|
3852
|
+
export { kerfCatalogPackage };
|
|
3853
|
+
```
|
|
3854
|
+
|
|
3821
3855
|
## `@kerfjs/ui/catalog-resources`
|
|
3822
3856
|
|
|
3823
3857
|
```ts
|
|
3824
|
-
import { C as CatalogResource } from './types-
|
|
3858
|
+
import { C as CatalogResource } from './types-CuKf5G87.js';
|
|
3825
3859
|
import './toolbar.js';
|
|
3826
3860
|
import 'kerfjs';
|
|
3827
3861
|
import './semantic-content-BbzjvSu9.js';
|
|
@@ -3879,7 +3913,7 @@ export { type CatalogGuidanceKind, type CatalogResourceKind, type CatalogResourc
|
|
|
3879
3913
|
|
|
3880
3914
|
```ts
|
|
3881
3915
|
import { Signal } from 'kerfjs';
|
|
3882
|
-
import {
|
|
3916
|
+
import { c as CatalogBackgroundStyle } from './types-CuKf5G87.js';
|
|
3883
3917
|
import './toolbar.js';
|
|
3884
3918
|
import './semantic-content-BbzjvSu9.js';
|
|
3885
3919
|
import './extension-attributes-CnqvBmj3.js';
|
|
@@ -3918,12 +3952,12 @@ interface WireCatalogOptions {
|
|
|
3918
3952
|
*/
|
|
3919
3953
|
onToggleSettings?: () => void;
|
|
3920
3954
|
/** Invoked when the secondary (ecosystem) group's disclosure toggle is activated. */
|
|
3921
|
-
onToggleSecondary?: () => void;
|
|
3955
|
+
onToggleSecondary?: (groupId?: string) => void;
|
|
3922
3956
|
/**
|
|
3923
3957
|
* Invoked with the switch's new state when the secondary group's tag-filter
|
|
3924
3958
|
* switch changes; the app updates `tagFilter.show`.
|
|
3925
3959
|
*/
|
|
3926
|
-
onToggleSecondaryFilter?: (show: boolean) => void;
|
|
3960
|
+
onToggleSecondaryFilter?: (show: boolean, groupId?: string) => void;
|
|
3927
3961
|
/** When set, `?<urlParam>=<id>` is written on select via `history.replaceState`. */
|
|
3928
3962
|
urlParam?: string;
|
|
3929
3963
|
/**
|
|
@@ -7425,7 +7459,11 @@ interface ComboboxProps {
|
|
|
7425
7459
|
label: string;
|
|
7426
7460
|
/** Suggestions to filter as the person types. */
|
|
7427
7461
|
suggestions: readonly ComboboxSuggestion[];
|
|
7428
|
-
/**
|
|
7462
|
+
/**
|
|
7463
|
+
* Text on first render and native form reset. Keep this value stable while the
|
|
7464
|
+
* user edits. Changing it while focused updates the reset value; changing it
|
|
7465
|
+
* after blur also replaces the displayed text.
|
|
7466
|
+
*/
|
|
7429
7467
|
value?: string;
|
|
7430
7468
|
placeholder?: string;
|
|
7431
7469
|
/** Optional hint below the field, such as "Press Enter to add". */
|
|
@@ -7808,6 +7846,8 @@ interface SwitchProps {
|
|
|
7808
7846
|
value?: string;
|
|
7809
7847
|
/** Supporting text below the label, also the switch's description. */
|
|
7810
7848
|
hint?: string;
|
|
7849
|
+
/** Place text after the track (default), or at the row's start with a trailing track. */
|
|
7850
|
+
labelPlacement?: 'end' | 'start';
|
|
7811
7851
|
size?: SwitchSize;
|
|
7812
7852
|
disabled?: boolean;
|
|
7813
7853
|
/** Delegated `data-action` on the input; listen for `change`. */
|
|
@@ -7827,7 +7867,7 @@ interface SwitchProps {
|
|
|
7827
7867
|
* `role="switch"`, drawn as a track and thumb beside its label, with an
|
|
7828
7868
|
* optional hint aligned under the label.
|
|
7829
7869
|
*/
|
|
7830
|
-
declare function Switch({ label, checked, name, value, hint, size, disabled, action, form, id, className, rootAttributes, slot, }: SwitchProps): kerfjs.SafeHtml;
|
|
7870
|
+
declare function Switch({ label, checked, name, value, hint, labelPlacement, size, disabled, action, form, id, className, rootAttributes, slot, }: SwitchProps): kerfjs.SafeHtml;
|
|
7831
7871
|
|
|
7832
7872
|
export { Switch, type SwitchProps, type SwitchRootAttributes, type SwitchSize };
|
|
7833
7873
|
```
|
|
@@ -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.134` 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';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { C as CatalogPackage } from './compose-B_GFfFhm.js';
|
|
2
|
+
import './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import 'kerfjs';
|
|
4
|
+
import './types-CuKf5G87.js';
|
|
5
|
+
import './toolbar.js';
|
|
6
|
+
import './extension-attributes-CnqvBmj3.js';
|
|
7
|
+
import './sides-BPSWde0A.js';
|
|
8
|
+
import './pane.js';
|
|
9
|
+
import './scroll-clearance-BikHljTc.js';
|
|
10
|
+
import './anchor-name-BZ1rpxaw.js';
|
|
11
|
+
import './css-values.js';
|
|
12
|
+
import './surface-tint-DQgYCaP9.js';
|
|
13
|
+
import './workbench.js';
|
|
14
|
+
import './nav-stack-IKSMxo2A.js';
|
|
15
|
+
import './list.js';
|
|
16
|
+
import './flex-alignment-4ms8ZbV8.js';
|
|
17
|
+
import './panel-toolbar-CEcHHDkn.js';
|
|
18
|
+
import './lucide-icon.js';
|
|
19
|
+
import 'lucide';
|
|
20
|
+
import './toolbar-text.js';
|
|
21
|
+
import './resizable-region.js';
|
|
22
|
+
|
|
23
|
+
/** The shipped Kerf UI catalog, including its curated Web Awesome integration catalog. */
|
|
24
|
+
declare const kerfCatalogPackage: CatalogPackage;
|
|
25
|
+
|
|
26
|
+
export { kerfCatalogPackage };
|