@kerfjs/ui 5.0.0-beta.11 → 5.0.0-beta.12
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 +2 -0
- package/ai/component-catalog.json +102 -2
- package/ai/public-api-signatures-v1.md +43 -1
- package/ai/skill.md +2 -1
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/list-inset-control.js +3 -0
- package/dist/browser/list-inset-text.js +3 -0
- package/dist/catalog.js +2 -2
- package/dist/chunk-VPCTCUED.js +10 -0
- package/dist/chunk-VPCTCUED.js.map +1 -0
- package/dist/chunk-XE4OX6AZ.js +10 -0
- package/dist/chunk-XE4OX6AZ.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -5
- package/dist/list-inset-control.d.ts +16 -0
- package/dist/list-inset-control.js +3 -0
- package/dist/list-inset-control.js.map +1 -0
- package/dist/list-inset-text.d.ts +16 -0
- package/dist/list-inset-text.js +3 -0
- package/dist/list-inset-text.js.map +1 -0
- package/dist/split-view.js +1 -1
- package/dist/styles/list-inset-control.css +7 -0
- package/dist/styles/list-inset-text.css +5 -0
- package/docs/component-contract.md +5 -1
- package/docs/component-selection.md +2 -0
- package/llms.txt +8 -4
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -103,6 +103,8 @@ as a `New` marker.
|
|
|
103
103
|
| `ListActionRow` | `@kerfjs/ui/list-action-row` | `@kerfjs/ui/list-action-row.css` |
|
|
104
104
|
| `ListItem` | `@kerfjs/ui/list-item` | `@kerfjs/ui/list-item.css` |
|
|
105
105
|
| `ListHeader` | `@kerfjs/ui/list-header` | `@kerfjs/ui/list-header.css` |
|
|
106
|
+
| `ListInsetControl` | `@kerfjs/ui/list-inset-control` | `@kerfjs/ui/list-inset-control.css` |
|
|
107
|
+
| `ListInsetText` | `@kerfjs/ui/list-inset-text` | `@kerfjs/ui/list-inset-text.css` |
|
|
106
108
|
| Pane, content, and navigation composition | — | `@kerfjs/ui/layout.css` |
|
|
107
109
|
| `ResizableRegion` | `@kerfjs/ui/resizable-region` | `@kerfjs/ui/resizable-region.css` |
|
|
108
110
|
| `wireResizableRegions` | `@kerfjs/ui/wire-resizable-regions` | — |
|
|
@@ -385,10 +385,12 @@
|
|
|
385
385
|
"ToolbarControlGroup"
|
|
386
386
|
],
|
|
387
387
|
"useWhen": [
|
|
388
|
-
"Group related controls inside a toolbar with a supported visual treatment."
|
|
388
|
+
"Group related controls inside a toolbar with a supported visual treatment.",
|
|
389
|
+
"Fill it with plain <button> controls (the group styles > button fully); use wa-button only for a Web Awesome feature such as a wa-dropdown popup trigger."
|
|
389
390
|
],
|
|
390
391
|
"avoidWhen": [
|
|
391
|
-
"Do not use merely to align unrelated buttons or to imitate an exclusive choice."
|
|
392
|
+
"Do not use merely to align unrelated buttons or to imitate an exclusive choice.",
|
|
393
|
+
"Do not reach for wa-button for an ordinary control inside the group — a plain <button> is the default and avoids the Web Awesome dependency."
|
|
392
394
|
],
|
|
393
395
|
"alternatives": [
|
|
394
396
|
{
|
|
@@ -1109,6 +1111,104 @@
|
|
|
1109
1111
|
"recipe": "docs/component-selection.md#problem-to-component-matrix"
|
|
1110
1112
|
}
|
|
1111
1113
|
},
|
|
1114
|
+
{
|
|
1115
|
+
"id": "list-inset-control",
|
|
1116
|
+
"name": "ListInsetControl",
|
|
1117
|
+
"category": "Structure",
|
|
1118
|
+
"kind": "component",
|
|
1119
|
+
"source": "kerf",
|
|
1120
|
+
"description": "Insets a self-bordered control into a pane/list content region.",
|
|
1121
|
+
"uses": [],
|
|
1122
|
+
"purpose": "Insets a self-bordered control into a pane/list content region.",
|
|
1123
|
+
"publicExports": [
|
|
1124
|
+
"ListInsetControl"
|
|
1125
|
+
],
|
|
1126
|
+
"useWhen": [
|
|
1127
|
+
"Place a control that carries its own border and padding (an input, a wa-* control) in a pane/list content region so its edges align with .kui-content items."
|
|
1128
|
+
],
|
|
1129
|
+
"avoidWhen": [
|
|
1130
|
+
"Do not wrap a component that already owns its content-item margin (ListItem, StateBanner, …) — that double-insets it. Use ListInsetText for bare text."
|
|
1131
|
+
],
|
|
1132
|
+
"alternatives": [
|
|
1133
|
+
{
|
|
1134
|
+
"id": "list-inset-text",
|
|
1135
|
+
"relationship": "nearest"
|
|
1136
|
+
}
|
|
1137
|
+
],
|
|
1138
|
+
"appOwns": [
|
|
1139
|
+
"the wrapped control and its behavior"
|
|
1140
|
+
],
|
|
1141
|
+
"accessibility": [
|
|
1142
|
+
"A layout wrapper only; it adds no role or name — the wrapped control keeps its own."
|
|
1143
|
+
],
|
|
1144
|
+
"delivery": {
|
|
1145
|
+
"browserImport": "@kerfjs/ui/list-inset-control",
|
|
1146
|
+
"manualCssImport": "@kerfjs/ui/list-inset-control.css",
|
|
1147
|
+
"sideEffects": [
|
|
1148
|
+
"browser-condition-css"
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
"wiring": [],
|
|
1152
|
+
"publicClasses": [
|
|
1153
|
+
"kui-list-inset-control"
|
|
1154
|
+
],
|
|
1155
|
+
"publicTokens": [
|
|
1156
|
+
"--kui-layout-inline-margin"
|
|
1157
|
+
],
|
|
1158
|
+
"links": {
|
|
1159
|
+
"catalogRoute": "?component=list-inset-control",
|
|
1160
|
+
"documentation": "docs/component-selection.md",
|
|
1161
|
+
"recipe": "docs/component-selection.md#problem-to-component-matrix"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"id": "list-inset-text",
|
|
1166
|
+
"name": "ListInsetText",
|
|
1167
|
+
"category": "Structure",
|
|
1168
|
+
"kind": "component",
|
|
1169
|
+
"source": "kerf",
|
|
1170
|
+
"description": "Gives bare text the content-item geometry so it lines up with bordered items.",
|
|
1171
|
+
"uses": [],
|
|
1172
|
+
"purpose": "Gives bare text the content-item geometry so it lines up with bordered items.",
|
|
1173
|
+
"publicExports": [
|
|
1174
|
+
"ListInsetText"
|
|
1175
|
+
],
|
|
1176
|
+
"useWhen": [
|
|
1177
|
+
"Line a plain text element up with bordered .kui-content items — it adds the 8px margin, 1px transparent border, and 8px padding the text lacks."
|
|
1178
|
+
],
|
|
1179
|
+
"avoidWhen": [
|
|
1180
|
+
"Do not use it to wrap an interactive control (use ListInsetControl), or a component that already owns its content-item geometry."
|
|
1181
|
+
],
|
|
1182
|
+
"alternatives": [
|
|
1183
|
+
{
|
|
1184
|
+
"id": "list-inset-control",
|
|
1185
|
+
"relationship": "nearest"
|
|
1186
|
+
}
|
|
1187
|
+
],
|
|
1188
|
+
"appOwns": [
|
|
1189
|
+
"the text content"
|
|
1190
|
+
],
|
|
1191
|
+
"accessibility": [
|
|
1192
|
+
"A layout wrapper only; it adds no role or name."
|
|
1193
|
+
],
|
|
1194
|
+
"delivery": {
|
|
1195
|
+
"browserImport": "@kerfjs/ui/list-inset-text",
|
|
1196
|
+
"manualCssImport": "@kerfjs/ui/list-inset-text.css",
|
|
1197
|
+
"sideEffects": [
|
|
1198
|
+
"browser-condition-css"
|
|
1199
|
+
]
|
|
1200
|
+
},
|
|
1201
|
+
"wiring": [],
|
|
1202
|
+
"publicClasses": [
|
|
1203
|
+
"kui-list-inset-text"
|
|
1204
|
+
],
|
|
1205
|
+
"publicTokens": [],
|
|
1206
|
+
"links": {
|
|
1207
|
+
"catalogRoute": "?component=list-inset-text",
|
|
1208
|
+
"documentation": "docs/component-selection.md",
|
|
1209
|
+
"recipe": "docs/component-selection.md#problem-to-component-matrix"
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1112
1212
|
{
|
|
1113
1213
|
"id": "tabs",
|
|
1114
1214
|
"name": "AppTab",
|
|
@@ -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.12` and `kerfjs@5.0.0-beta.12`. 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
|
|
|
@@ -265,6 +265,48 @@ declare function ListItem({ label, icon, trailing, selected, action, itemId, cla
|
|
|
265
265
|
export { ListItem, type ListItemProps };
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
+
## `@kerfjs/ui/list-inset-control`
|
|
269
|
+
|
|
270
|
+
```ts
|
|
271
|
+
import { SafeHtml } from 'kerfjs';
|
|
272
|
+
|
|
273
|
+
interface ListInsetControlProps {
|
|
274
|
+
/** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */
|
|
275
|
+
children: SafeHtml | SafeHtml[];
|
|
276
|
+
className?: string;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Insets a control into a pane/list content region: an 8px inline margin (so its
|
|
280
|
+
* edges line up with `.kui-content` items) and a stretch flex row with an 8px gap.
|
|
281
|
+
* Use it for controls that carry their own border and padding but no outer margin
|
|
282
|
+
* — the wrapper adds only the alignment margin and layout, not a second inset.
|
|
283
|
+
*/
|
|
284
|
+
declare function ListInsetControl({ children, className }: ListInsetControlProps): SafeHtml;
|
|
285
|
+
|
|
286
|
+
export { ListInsetControl, type ListInsetControlProps };
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## `@kerfjs/ui/list-inset-text`
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
import { SafeHtml } from 'kerfjs';
|
|
293
|
+
|
|
294
|
+
interface ListInsetTextProps {
|
|
295
|
+
/** Text (or inline content) that carries no margin, border, or padding of its own. */
|
|
296
|
+
children: SafeHtml | SafeHtml[] | string;
|
|
297
|
+
className?: string;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Gives bare text the content-item geometry — an 8px inline margin, a 1px
|
|
301
|
+
* transparent border, and 8px padding — so a plain string lines up with
|
|
302
|
+
* bordered `.kui-content` items (its text edge lands at the same 17px inset).
|
|
303
|
+
* Use it for text elements that have no margin, border, or padding of their own.
|
|
304
|
+
*/
|
|
305
|
+
declare function ListInsetText({ children, className }: ListInsetTextProps): SafeHtml;
|
|
306
|
+
|
|
307
|
+
export { ListInsetText, type ListInsetTextProps };
|
|
308
|
+
```
|
|
309
|
+
|
|
268
310
|
## `@kerfjs/ui/panel-header`
|
|
269
311
|
|
|
270
312
|
```ts
|
package/ai/skill.md
CHANGED
|
@@ -63,7 +63,7 @@ Hard rules:
|
|
|
63
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.
|
|
64
64
|
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
65
|
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
|
-
16. 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`. 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.
|
|
66
|
+
16. 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.
|
|
67
67
|
17. 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.
|
|
68
68
|
18. 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.
|
|
69
69
|
19. 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.
|
|
@@ -89,6 +89,7 @@ Common mistakes:
|
|
|
89
89
|
| Choose a listed ecosystem component by default | Apply the component-selection guidance above; catalog coverage means supported and themed, not preferred |
|
|
90
90
|
| Add sidebar-specific wrapper padding | Use the unpadded `.kui-pane`; let `ListHeader`, `ListItem`, and `.kui-content-item` own their 8/1/8 geometry |
|
|
91
91
|
| Put bare text or controls directly in a toolbar slot | Wrap every item in `ToolbarControlGroup`, using `appearance="borderless"` for transparent chrome |
|
|
92
|
+
| 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 |
|
|
92
93
|
| Let the document, pane, and list all scroll | Keep fixed chrome outside one `.kui-pane__content` scroll owner per pane |
|
|
93
94
|
| Invent an `@kerfjs/ui` command-palette export | Keep the semantics application-local, reuse public layout vocabulary, and propose recurring behavior upstream |
|
|
94
95
|
| Handwrite `ValueTable` row wrappers or compensate their padding or separators | Compose `ValueTableRow`; its root-scaled block padding, optional icon hook, and separator geometry are public contract |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web Awesome JSX signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from the emitted `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from the emitted `@kerfjs/ui@5.0.0-beta.12` 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/catalog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ListHeader } from './chunk-5ATCDSQS.js';
|
|
2
|
-
import { ListItem } from './chunk-L4OKFDJY.js';
|
|
3
1
|
import { ToolbarControlGroup } from './chunk-RNPGFQ33.js';
|
|
4
2
|
import { Toolbar } from './chunk-DAFFDO33.js';
|
|
3
|
+
import { ListHeader } from './chunk-5ATCDSQS.js';
|
|
4
|
+
import { ListItem } from './chunk-L4OKFDJY.js';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/list-inset-control.tsx
|
|
4
|
+
function ListInsetControl({ children, className = "" }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { class: `kui-list-inset-control ${className}`.trim(), "data-component": "list-inset-control", children });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { ListInsetControl };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=chunk-VPCTCUED.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list-inset-control.tsx"],"names":[],"mappings":";;;AAcO,SAAS,gBAAA,CAAiB,EAAE,QAAA,EAAU,SAAA,GAAY,IAAG,EAA0B;AACpF,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,CAAA,uBAAA,EAA0B,SAAS,GAAG,IAAA,EAAK,EAAG,gBAAA,EAAe,oBAAA,EAAsB,QAAA,EAAS,CAAA;AACjH","file":"chunk-VPCTCUED.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface ListInsetControlProps {\n /** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */\n children: SafeHtml | SafeHtml[];\n className?: string;\n}\n\n/**\n * Insets a control into a pane/list content region: an 8px inline margin (so its\n * edges line up with `.kui-content` items) and a stretch flex row with an 8px gap.\n * Use it for controls that carry their own border and padding but no outer margin\n * — the wrapper adds only the alignment margin and layout, not a second inset.\n */\nexport function ListInsetControl({ children, className = '' }: ListInsetControlProps) {\n return <div class={`kui-list-inset-control ${className}`.trim()} data-component=\"list-inset-control\">{children}</div>;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/list-inset-text.tsx
|
|
4
|
+
function ListInsetText({ children, className = "" }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { class: `kui-list-inset-text ${className}`.trim(), "data-component": "list-inset-text", children });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { ListInsetText };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=chunk-XE4OX6AZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/list-inset-text.tsx"],"names":[],"mappings":";;;AAcO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,SAAA,GAAY,IAAG,EAAuB;AAC9E,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,CAAA,oBAAA,EAAuB,SAAS,GAAG,IAAA,EAAK,EAAG,gBAAA,EAAe,iBAAA,EAAmB,QAAA,EAAS,CAAA;AAC3G","file":"chunk-XE4OX6AZ.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface ListInsetTextProps {\n /** Text (or inline content) that carries no margin, border, or padding of its own. */\n children: SafeHtml | SafeHtml[] | string;\n className?: string;\n}\n\n/**\n * Gives bare text the content-item geometry — an 8px inline margin, a 1px\n * transparent border, and 8px padding — so a plain string lines up with\n * bordered `.kui-content` items (its text edge lands at the same 17px inset).\n * Use it for text elements that have no margin, border, or padding of their own.\n */\nexport function ListInsetText({ children, className = '' }: ListInsetTextProps) {\n return <div class={`kui-list-inset-text ${className}`.trim()} data-component=\"list-inset-text\">{children}</div>;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { EmptyState, EmptyStateProps } from './empty-state.js';
|
|
|
4
4
|
export { FloatingToolbar, FloatingToolbarPosition, FloatingToolbarProps } from './floating-toolbar.js';
|
|
5
5
|
export { ListActionRow, ListActionRowProps } from './list-action-row.js';
|
|
6
6
|
export { ListHeader, ListHeaderProps } from './list-header.js';
|
|
7
|
+
export { ListInsetControl, ListInsetControlProps } from './list-inset-control.js';
|
|
8
|
+
export { ListInsetText, ListInsetTextProps } from './list-inset-text.js';
|
|
7
9
|
export { ListItem, ListItemProps } from './list-item.js';
|
|
8
10
|
export { LoadingSpinner, LoadingSpinnerProps } from './loading-spinner.js';
|
|
9
11
|
export { LucideIcon, LucideIconProps, LucideNode } from './lucide-icon.js';
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
export { wireResizableRegions } from './chunk-AQNKJRFH.js';
|
|
2
2
|
export { reorderTabs, wireTabBars } from './chunk-XXMOARTH.js';
|
|
3
3
|
export { wireTokenSearchFields } from './chunk-LCOBDOCC.js';
|
|
4
|
+
export { TabBar } from './chunk-AVZHJN6C.js';
|
|
4
5
|
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-7LDCTU7D.js';
|
|
5
6
|
export { ValueTable, ValueTableRow } from './chunk-37T3VNIZ.js';
|
|
7
|
+
export { PanelHeader } from './chunk-XE5ZLPCC.js';
|
|
6
8
|
export { SegmentedControl } from './chunk-YGN7OMLT.js';
|
|
7
9
|
export { Select } from './chunk-CH4SQ6H5.js';
|
|
10
|
+
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-M5JRI6MN.js';
|
|
8
11
|
export { StateBanner } from './chunk-I7INRJO4.js';
|
|
9
|
-
export { TabBar } from './chunk-AVZHJN6C.js';
|
|
10
12
|
export { ListActionRow } from './chunk-7JB7VPRI.js';
|
|
11
|
-
export {
|
|
13
|
+
export { ListInsetControl } from './chunk-VPCTCUED.js';
|
|
14
|
+
export { ListInsetText } from './chunk-XE4OX6AZ.js';
|
|
12
15
|
export { ToolbarText } from './chunk-RUNWEPR4.js';
|
|
13
|
-
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-M5JRI6MN.js';
|
|
14
16
|
export { AppTab } from './chunk-2Z5TWHKQ.js';
|
|
15
|
-
export { ListHeader } from './chunk-5ATCDSQS.js';
|
|
16
|
-
export { ListItem } from './chunk-L4OKFDJY.js';
|
|
17
17
|
export { ToolbarControlGroup } from './chunk-RNPGFQ33.js';
|
|
18
18
|
export { Toolbar } from './chunk-DAFFDO33.js';
|
|
19
|
+
export { ListHeader } from './chunk-5ATCDSQS.js';
|
|
20
|
+
export { ListItem } from './chunk-L4OKFDJY.js';
|
|
19
21
|
|
|
20
22
|
export { Skeleton } from './chunk-B24C4A6T.js';
|
|
21
23
|
export { DisclosureArrow } from './chunk-56RJXPHG.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
|
|
3
|
+
interface ListInsetControlProps {
|
|
4
|
+
/** Control(s) that own their own border and padding (e.g. an input, a `wa-*`). */
|
|
5
|
+
children: SafeHtml | SafeHtml[];
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Insets a control into a pane/list content region: an 8px inline margin (so its
|
|
10
|
+
* edges line up with `.kui-content` items) and a stretch flex row with an 8px gap.
|
|
11
|
+
* Use it for controls that carry their own border and padding but no outer margin
|
|
12
|
+
* — the wrapper adds only the alignment margin and layout, not a second inset.
|
|
13
|
+
*/
|
|
14
|
+
declare function ListInsetControl({ children, className }: ListInsetControlProps): SafeHtml;
|
|
15
|
+
|
|
16
|
+
export { ListInsetControl, type ListInsetControlProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"list-inset-control.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
|
|
3
|
+
interface ListInsetTextProps {
|
|
4
|
+
/** Text (or inline content) that carries no margin, border, or padding of its own. */
|
|
5
|
+
children: SafeHtml | SafeHtml[] | string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Gives bare text the content-item geometry — an 8px inline margin, a 1px
|
|
10
|
+
* transparent border, and 8px padding — so a plain string lines up with
|
|
11
|
+
* bordered `.kui-content` items (its text edge lands at the same 17px inset).
|
|
12
|
+
* Use it for text elements that have no margin, border, or padding of their own.
|
|
13
|
+
*/
|
|
14
|
+
declare function ListInsetText({ children, className }: ListInsetTextProps): SafeHtml;
|
|
15
|
+
|
|
16
|
+
export { ListInsetText, type ListInsetTextProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"list-inset-text.js"}
|
package/dist/split-view.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NavStack } from './chunk-BLK3UEEI.js';
|
|
2
|
-
|
|
3
2
|
import { ResizableRegion } from './chunk-M5JRI6MN.js';
|
|
4
3
|
|
|
4
|
+
|
|
5
5
|
import { jsx, jsxs } from 'kerfjs/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function SplitView({ id, label, list, detail, compact = false, detailActive = false, listTitle = "", detailTitle = "", backLabel = "Back", resizable, className = "" }) {
|
|
@@ -113,7 +113,11 @@ changing geometry. `.kui-content-item--pill` selects the 22px radius.
|
|
|
113
113
|
|
|
114
114
|
`ToolbarControlGroup` is the unit of toolbar organization, even for dormant
|
|
115
115
|
text. Each group reserves `calc(2px + remify(42px))`, or 44px, with 8px between
|
|
116
|
-
groups and inside items.
|
|
116
|
+
groups and inside items. For an ordinary icon/action control inside a group, use
|
|
117
|
+
a plain `<button>` — the group styles `> button` fully, and it keeps the group
|
|
118
|
+
free of a Web Awesome dependency and shadow DOM. Reach for `wa-button` only when
|
|
119
|
+
you need a Web Awesome feature, chiefly the `slot="trigger"` button of a
|
|
120
|
+
`wa-dropdown` popup menu. `ListHeader` similarly separates its dormant title and
|
|
117
121
|
optional count or badge from its optional 44px action. Use the mutually
|
|
118
122
|
exclusive `count`/`countLabel` pair for non-negative safe-integer section
|
|
119
123
|
quantities; reserve `badge` for non-count `SafeHtml`. Do not concatenate counts
|
|
@@ -69,6 +69,8 @@ an upstream component or recipe request.
|
|
|
69
69
|
| Navigation row — `ListItem` | A pane or navigation area needs a selectable, disabled, dormant-trailing, or multiline action row. | Do not put a control in `trailing`; use `ListActionRow` when the trailing region must be independently interactive. Use an `<a>` for navigation that must retain link behavior, a native `<button>` for an ordinary action, or implement the complete ARIA menu widget. | Delegate its `data-action`; compose inside a `.kui-content` section. Put domain event/drop metadata in `rootAttributes` rather than adding wrapper markup. | Routing, selection, permissions, copy, action handling, and domain `data-*` values. | `@kerfjs/ui/list-item` | [Pane geometry](../README.md#pane-and-content-geometry) |
|
|
70
70
|
| Navigation row with trailing action — `ListActionRow` | A full-width row needs a selectable primary action and an independently focusable trailing action. | Use `ListItem` when trailing content is dormant metadata. Do not put controls inside the row's `label`, `icon`, or `trailingActionIcon` SafeHtml slots. Do not use `AppTab` outside tablist semantics or `ToolbarControlGroup` outside a toolbar. | Delegate both action strings; update controlled selection and any popover/context-menu state in the app. | Routing, selection, both action policies, domain metadata, and popover/context-menu behavior. | `@kerfjs/ui/list-action-row` | [Accessibility](./accessibility.md#listactionrow) |
|
|
71
71
|
| Navigation section heading — `ListHeader` | A menu section needs a full-width label, semantic count, non-count badge, logical-end action, or real disclosure state. | Do not concatenate counts into `label` or put numeric content in `badge`; use `count` with the localized full phrase in `countLabel`. Do not add a disclosure arrow to navigation that reveals nothing. Do not shrink its 44px action target to the 18px visual. Do not use it as a page, panel, or dialog title; use `PanelHeader`. | Delegate its optional action; the app controls expanded state and revealed content. Toggle mode supplies `DisclosureArrow` unless `actionIcon` replaces it. Use `triggerAttributes` only for domain `data-*` or a native popover relationship. | Section organization, valid count and localized count label, disclosure state and content, non-count badge content, popover target behavior, and policy. | `@kerfjs/ui/list-header` | [Pane geometry](../README.md#pane-and-content-geometry) |
|
|
72
|
+
| Inset self-bordered control — `ListInsetControl` | A control that owns its own border and padding but no outer margin (a search input, a `SegmentedControl`) must line up inside a `.kui-content` list with the standard 8px inline margins and stretch to fill the row. | Do not wrap a `.kui-content-item` or a `ListItem`/`ListHeader` that already owns its inline margin — that double-insets it. Do not add ad-hoc `margin`/`padding` around a bare control to align it; use this instead. | Place the self-bordered control(s) as children; they stretch to fill. It applies only the inline margin, flex stretch, and 8px gap — the child owns its own border and padding. | The control(s), their state, and action wiring. | `@kerfjs/ui/list-inset-control` | [Pane geometry](../README.md#component-subpaths) |
|
|
73
|
+
| Inset bare text — `ListInsetText` | A plain string or inline content with no margin, border, or padding of its own must sit in a `.kui-content` list with its text edge aligned to the bordered items around it. | Do not use it to wrap a component that already owns content-item geometry (`ListItem`, `StateBanner`, a `.kui-content-item`) — that double-insets it. Do not hand-roll the 8px margin / 1px border / 8px padding. | Pass the text or inline `SafeHtml` as children; it supplies the 8px inline margin, 1px transparent border, and 8px padding so the text edge lands at the standard 17px inset. | The text, copy, and localization. | `@kerfjs/ui/list-inset-text` | [Pane geometry](../README.md#component-subpaths) |
|
|
72
74
|
| Application layout composition | A sidebar, main area, inspector, or dialog needs shared toolbar/content/footer and child geometry. | Do not pad the pane shell, wrap child-owned geometry in competing insets, invent unrelated centered measures, or leave an icon-only rail for a hidden pane. | Use `.kui-pane` and one `.kui-pane__content`; add `.kui-content` and `.kui-content-item` as needed. A visible pane owns collapse in its toolbar; move a hidden inline-start pane's restore control to the main toolbar leading edge and an inline-end pane's restore control to its trailing edge. | Layout hierarchy, reading width, scroll ownership, responsive relocation, and pane visibility state. | `@kerfjs/ui/layout.css` | [Pane anatomy](./layout.md#anatomy) |
|
|
73
75
|
| Menu composition | Navigation sections need full-size rows and the same content-item geometry as every other pane. | Do not add sidebar-specific wrapper padding, shrink targets to icon size, nest an interactive trailing control in `ListItem`, or use a chevron on a row that does not disclose content. Use ordinary links for a different navigation contract. | Compose `ListHeader`, `ListItem`, and `ListActionRow` in `.kui-content`; use `ListHeader` toggle mode with real controlled content, and use `.kui-content-item` for other surfaces plus a pane footer for toolbar actions. | Information architecture, disclosure content and state, responsive drawer/shell behavior, and token overrides. | `@kerfjs/ui/layout.css` | [Pane geometry](../README.md#pane-and-content-geometry) |
|
|
74
76
|
| Resizable application pane — `ResizableRegion`, `clampRegionSize`, `resizeRegionFromPointer` | A controlled split pane needs the Kerf separator, collapse state, pointer plus keyboard resizing, or a product-specific decorative grip. | Do not use it for a static two-column layout; use CSS grid. Prefer it over Web Awesome `wa-split-panel` unless that component's distinct API is required. Keep `handleIcon` noninteractive. | Call `wireResizableRegions` from `@kerfjs/ui/wire-resizable-regions` once and retain its disposer. | Size signal, min/max policy, collapse policy, persistence, and optional decorative handle icon. | `@kerfjs/ui/resizable-region` | [ResizableRegion contract](./accessibility.md#resizableregion) |
|
package/llms.txt
CHANGED
|
@@ -47,9 +47,12 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
|
|
|
47
47
|
- **Toolbars hold only `ToolbarText` and `ToolbarControlGroup`.** Never put a bare
|
|
48
48
|
button, input, link, or loose markup in a `leading`/`center`/`trailing` zone.
|
|
49
49
|
Wrap every control — `SegmentedControl`, `Select`, a collapsible
|
|
50
|
-
`TokenSearchField`, Web Awesome controls — inside a `ToolbarControlGroup`.
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
`TokenSearchField`, Web Awesome controls — inside a `ToolbarControlGroup`. For an
|
|
51
|
+
ordinary icon/action control inside the group use a **plain `<button>`** (the
|
|
52
|
+
group styles it fully) — that is the default; reach for `wa-button` only when you
|
|
53
|
+
need a Web Awesome feature, chiefly the `slot="trigger"` button of a `wa-dropdown`
|
|
54
|
+
popup menu. A toolbar popup menu is a `single` `ToolbarControlGroup` around a
|
|
55
|
+
`wa-dropdown` (its `slot="trigger"` `wa-button` is the toolbar button, kept under
|
|
53
56
|
`data-morph-skip-children`).
|
|
54
57
|
- **`PanelHeader` is *the* panel/dialog/page heading.** A plain toolbar with an
|
|
55
58
|
optional bordered icon group, an extra-large `ToolbarText` title, the trailing
|
|
@@ -100,7 +103,8 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
|
|
|
100
103
|
## Public exports
|
|
101
104
|
|
|
102
105
|
`LucideIcon`, `DisclosureArrow`, `Toolbar`, `ToolbarControlGroup`, `FloatingToolbar`, `ToolbarText`,
|
|
103
|
-
`PanelHeader`, `ListItem`, `ListActionRow`, `ListHeader`, `
|
|
106
|
+
`PanelHeader`, `ListItem`, `ListActionRow`, `ListHeader`, `ListInsetControl`,
|
|
107
|
+
`ListInsetText`, `SegmentedControl`,
|
|
104
108
|
`Select`, `TokenSearchField` (+ `readTokenSearchField`, `placeTokenSearchCaret`,
|
|
105
109
|
`wireTokenSearchFields`), `AppTab`, `TabBar` (+ `wireTabBars`, `reorderTabs`),
|
|
106
110
|
`ResizableRegion` (+ `wireResizableRegions`), `StateBanner`, `EmptyState`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerfjs/ui",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.12",
|
|
4
4
|
"description": "Accessible, composable UI primitives for kerf applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -84,6 +84,16 @@
|
|
|
84
84
|
"browser": "./dist/browser/list-header.js",
|
|
85
85
|
"import": "./dist/list-header.js"
|
|
86
86
|
},
|
|
87
|
+
"./list-inset-control": {
|
|
88
|
+
"types": "./dist/list-inset-control.d.ts",
|
|
89
|
+
"browser": "./dist/browser/list-inset-control.js",
|
|
90
|
+
"import": "./dist/list-inset-control.js"
|
|
91
|
+
},
|
|
92
|
+
"./list-inset-text": {
|
|
93
|
+
"types": "./dist/list-inset-text.d.ts",
|
|
94
|
+
"browser": "./dist/browser/list-inset-text.js",
|
|
95
|
+
"import": "./dist/list-inset-text.js"
|
|
96
|
+
},
|
|
87
97
|
"./resizable-region": {
|
|
88
98
|
"types": "./dist/resizable-region.d.ts",
|
|
89
99
|
"browser": "./dist/browser/resizable-region.js",
|
|
@@ -225,6 +235,8 @@
|
|
|
225
235
|
"./list-action-row.css": "./dist/styles/list-action-row.css",
|
|
226
236
|
"./list-item.css": "./dist/styles/list-item.css",
|
|
227
237
|
"./list-header.css": "./dist/styles/list-header.css",
|
|
238
|
+
"./list-inset-control.css": "./dist/styles/list-inset-control.css",
|
|
239
|
+
"./list-inset-text.css": "./dist/styles/list-inset-text.css",
|
|
228
240
|
"./resizable-region.css": "./dist/styles/resizable-region.css",
|
|
229
241
|
"./app-tab.css": "./dist/styles/app-tab.css",
|
|
230
242
|
"./catalog.css": "./dist/styles/catalog.css",
|