@kerfjs/ui 5.0.0-beta.45 → 5.0.0-beta.47
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 -1
- package/ai/component-catalog-v2-overrides.json +12 -0
- package/ai/component-catalog-v2.json +36 -60
- package/ai/component-catalog.json +54 -134
- package/ai/public-api-signatures-v1.md +12 -3
- package/ai/skill.md +2 -2
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/catalog.js +2 -2
- package/dist/{chunk-SE7MQMW7.js → chunk-GYGM363P.js} +2 -2
- package/dist/{chunk-SE7MQMW7.js.map → chunk-GYGM363P.js.map} +1 -1
- package/dist/chunk-XKFRMGMW.js +31 -0
- package/dist/chunk-XKFRMGMW.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/list-header.js +1 -1
- package/dist/styles/catalog.css +5 -3
- package/dist/styles/list.css +4 -0
- package/dist/styles/row.css +4 -0
- package/dist/styles/text.css +16 -0
- package/dist/styles/webawesome.css +61 -0
- package/dist/text.d.ts +11 -2
- package/dist/text.js +1 -1
- package/docs/component-selection.md +36 -36
- package/docs/layout.md +10 -0
- package/docs/ux-demo.md +6 -5
- package/docs/webawesome-theme.md +21 -5
- package/llms.txt +10 -3
- package/package.json +1 -1
- package/dist/chunk-QM4GQ7W3.js +0 -17
- package/dist/chunk-QM4GQ7W3.js.map +0 -1
package/docs/ux-demo.md
CHANGED
|
@@ -19,7 +19,7 @@ deterministic state, and semantic layout owners from the [recipe guide](./recipe
|
|
|
19
19
|
- It imports public component subpaths, exercising their browser-selected reachable CSS rather than a catalog-only style path.
|
|
20
20
|
- The `ListActionRow` route demonstrates sibling primary/trailing native controls, independent disabled states, controlled selection, first-line leading-icon alignment for wrapped labels, and an application-owned native popover relationship without nesting controls. The `ListItem` route demonstrates the same multiline leading-icon anchor alongside its single-control navigation contract.
|
|
21
21
|
- The `AppTab` and `TabBar` routes are focused component specimens: AppTab shows its selected, compact, segmented, icon-only, truncation, placeholder, metadata, and close-icon axes inside the required tablist context; TabBar shows its rail, segmented, inspector, allocation, placement, and accessory-zone axes without application readouts. The separate `Application tabs composition` route demonstrates controlled selection, matching panel content, overflow, adding, closing, keyboard/pointer reordering, and application-owned ordering. The `ResizableRegion` route likewise replaces only the decorative handle glyph while retaining separator semantics and shared wiring.
|
|
22
|
-
- Every first-party visual component and every free Web Awesome 3.12 component has its own stable `?component=<id>` URL and focused demo. Composite header, menu,
|
|
22
|
+
- Every first-party visual component and every free Web Awesome 3.12 component has its own stable `?component=<id>` URL and focused demo. Composite header, menu, and feedback scenarios remain addressable alongside their subcomponents; the root opens the first Kerf component. The former aggregate Web Awesome theme specimen is intentionally omitted because its component families are covered by those focused routes.
|
|
23
23
|
- `ai/component-catalog.json` is the canonical catalog metadata. A deterministic checked-in projection supplies the demo's unique id, category, kind (`component`, `composition`, or `recipe`), source (`kerf` or `webawesome`), name, description, recommendation, direct `uses` dependencies, existing documentation path, and demo-source path; first-party, recipe, and Web Awesome renderer maps are exhaustively typed against its generated id unions. Non-supported Web Awesome recommendations project to a visible `Discouraged` sidebar tag, with Popup as the deliberate conditional exception. Demo paths resolve to the matching `ui/ux-demo/demos/<id>.tsx` or `ui/ux-demo/recipes/*.tsx` file, or to `ui/ux-demo/webawesome-demos.tsx` for Web Awesome entries. `ui/ux-demo/main.tsx` owns only the catalog shell, shared state, routing, and interaction wiring. First-party component entries additionally derive `ui/src/<public-subpath>.tsx` from their canonical `delivery.browserImport` or opt-in `delivery.moduleImport`.
|
|
24
24
|
- Every detail footer groups compact `Demo source` and `Guidance` actions; first-party component details also expose `Component source`. Web Awesome details say `Integration guidance` to distinguish the local integration contract from the upstream component implementation. Each button retains its repository-relative path in the DOM for verification and uses a deploy-safe absolute GitHub blob URL with a contextual new-tab name; the demo does not depend on a local source server or add a package runtime export. At phone widths, the resource group and related-component selector stack as full-width rows, with any resource overflow contained locally so labels cannot overlap the selector or widen the document.
|
|
25
25
|
- The master/detail shell groups first-party routes by category with production `ListHeader` and `ListItem` components. Catalog entries can supply short reusable trailing tags; the Web Awesome projection uses them to label exactly the 15 discouraged choices. The 70 ecosystem components live in a separate `Web Awesome` disclosure with seven subgroups, so they remain discoverable without being presented as first-class `@kerfjs/ui` exports. Direct Web Awesome routes open the disclosure and reveal the selected row at wide sizes; narrow layouts keep the expanded list in document flow rather than introducing a competing nested scroller.
|
|
@@ -31,12 +31,13 @@ deterministic state, and semantic layout owners from the [recipe guide](./recipe
|
|
|
31
31
|
- The `DisclosureArrow` route renders the production 18px root-scaled default without a catalog-only size override. Its two native buttons independently control the default right-to-down chevron and a recognizable right-facing replacement arrow with left-to-up custom directions; both use shortest-path rotation and their names stay stable while `aria-expanded` communicates state. Browser coverage verifies the custom clockwise path, pointer and native keyboard activation, focus, narrow and 200%-zoom stacking with contained labels, consumer sizing, and the independent `.5` Web Awesome glyph scale retained by Kerf `Select`.
|
|
32
32
|
- A detail with relationships renders one content-fitted `Components` footer selector: `Uses` links to direct dependencies and `Used by` links to reverse dependents. Its popup owns the standard surface inset so headings and even long component names stay clear of the menu border. Choosing either navigates to that component's demo. The relationship group is absent when both sets are empty; no duplicate summary is rendered.
|
|
33
33
|
- Demo-only CSS supplies only the catalog shell and stages; component appearance stays in package CSS. Decorative chrome and Web Awesome controls share the same semantic system palette instead of carrying a separate demo identity.
|
|
34
|
-
- Scenarios use deterministic data and cover real variants, long content, disabled state, selection, progress, feedback, overlays, media, helpers, and stateful interactions.
|
|
34
|
+
- Scenarios use deterministic data and cover real variants, long content, disabled state, selection, progress, feedback, overlays, media, helpers, and stateful interactions. Individual Web Awesome action, form, layout, navigation, feedback, media, and helper routes provide focused theme specimens without a redundant aggregate route; ListItem and ListHeader demonstrate typed domain metadata, protected native button/disclosure semantics, and a native popover trigger relationship without product props; the Headers composition demonstrates direct toolbar headings with an extra-large title, optional supporting copy, and grouped icon/actions; the Select route verifies that option icons survive unrelated Kerf rerenders and selected slot content follows value changes; the Animation route exposes preset, easing, duration, playback-rate, and transport controls with live lifecycle status; observer routes provide user-driven intersection, mutation, and resize events with live results; ToolbarControlGroup exposes all eight Hot Sheet 2 variants, loads the Web Awesome registrations needed by its popup specimen, and preserves the upgraded dropdown's managed light-DOM children across Kerf rerenders; the Toolbar route composes a collapsible TokenSearchField inside a group, animates between the empty iconic and complete field states, stays open while populated, and focuses the revealed editor; SegmentedControl covers toolbar, rounded-rectangle, pill, equal-width, and disabled presentations; TokenSearchField covers editable ordered chips, pointer and keyboard removal, caret-preserving controlled deletion, editing, clearing, free text, disabled state, and fixed first-line alignment while content wraps; StateBanner exposes every built-in tone with tone-tinted badges plus a scoped override; the Application tabs composition demonstrates overflow, edge autoscroll, and controlled pointer/keyboard reordering.
|
|
35
35
|
- The ToolbarControlGroup route also demonstrates the public compact/tight,
|
|
36
36
|
mixed-content, filled-selection, nested-dropdown, and avatar/scrim contracts
|
|
37
37
|
added for consumers that previously restyled group descendants. The compact
|
|
38
|
-
mixed specimen keeps its separator
|
|
39
|
-
|
|
38
|
+
mixed specimen keeps its connected separator plus the standard 8px dropdown
|
|
39
|
+
trigger inset, label, and caret inside both pill and rounded group shapes.
|
|
40
|
+
Avatar images are chrome rather than nested `img`
|
|
40
41
|
elements: a lone avatar paints the group, while a multi-button avatar group
|
|
41
42
|
paints only the pressed selection, with contain fitting in both cases. Its
|
|
42
43
|
collapsible-search specimen follows the selected group shape with a
|
|
@@ -46,6 +47,6 @@ deterministic state, and semantic layout owners from the [recipe guide](./recipe
|
|
|
46
47
|
- The footer action log is an `aria-live` region, making interactions visible to both people and browser tests.
|
|
47
48
|
- The focused Toast route calls Web Awesome's documented programmatic stack API and notes that Hot Sheet 2 still uses its own app-level toast implementation; the catalog demonstrates ecosystem support without implying current product adoption.
|
|
48
49
|
- Browser coverage walks every Kerf, composition, and Web Awesome route, checks every listed Web Awesome custom element is registered in its focused specimen, exercises the ecosystem disclosure and both relationship directions, validates offline source/guidance hrefs and accessible wide/narrow/200%-zoom wrapping, and covers tab selection/reordering/overflow, semantic palettes and scoped overrides, light/dark rendering, toolbar popup and responsive find behavior, single/multiline search alignment, menu alignment, banner urgency, keyboard resizing, live custom-element values, and representative wide/narrow captures.
|
|
49
|
-
- The production build keeps the catalog shell and Kerf routes in the entry chunk, then dynamically imports the complete Web Awesome specimen and registration surface when an ecosystem route
|
|
50
|
+
- The production build keeps the catalog shell and Kerf routes in the entry chunk, then dynamically imports the complete Web Awesome specimen and registration surface when an ecosystem route or the ToolbarControlGroup popup specimen is selected. Directly addressed routes pass through the same loader.
|
|
50
51
|
|
|
51
52
|
Before handoff, inspect the actual captures for readability, context, alignment, clipping, spacing, responsiveness, focus, and obvious defects. Fix and recapture rather than treating the screenshot as proof by itself.
|
package/docs/webawesome-theme.md
CHANGED
|
@@ -97,6 +97,11 @@ tiers:
|
|
|
97
97
|
complete surface and the inset within it. Accordion applies the outer margin
|
|
98
98
|
once to the group rather than separating connected items; Card's header,
|
|
99
99
|
body, and footer all receive the full inset.
|
|
100
|
+
- `appearance="sunken"` is a Kerf theme extension for Accordion, Card, and
|
|
101
|
+
Details. It removes raised chrome, paints the lowered semantic surface, and
|
|
102
|
+
uses the shared rounded-rectangle radius. Override
|
|
103
|
+
`--kui-wa-sunken-background` or `--kui-wa-sunken-radius` on an instance or
|
|
104
|
+
containing scope when that surface needs different tokens.
|
|
100
105
|
- `--kui-wa-container-inset` defaults to the 16px homogeneous-group step. Tab
|
|
101
106
|
Panel retains this roomier tier for unframed panel content. Dialog body uses
|
|
102
107
|
the 8px surface inset, while its footer uses the 16px container inset so
|
|
@@ -111,9 +116,19 @@ parts, which CSS shadow parts do not support.
|
|
|
111
116
|
|
|
112
117
|
Badge remains intentionally compact at Web Awesome's intrinsic `0.375em` block /
|
|
113
118
|
`0.625em` inline padding (4.5px / 7.5px at its default 12px text size): it is a
|
|
114
|
-
short status or count, not a content item.
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
short status or count, not a content item. A badge with `appearance="filled"` or
|
|
120
|
+
`appearance="filled-outlined"` uses its variant's quiet fill with normal text by
|
|
121
|
+
default so every shipped semantic variant meets WCAG AA for that small text;
|
|
122
|
+
filled-outlined keeps its normal variant border. Accent badges keep their loud
|
|
123
|
+
fills, with brand, success, and danger using a dark foreground that clears AA in
|
|
124
|
+
both themes (neutral and warning retain their already-safe variant foregrounds).
|
|
125
|
+
Override
|
|
126
|
+
`--kui-wa-badge-filled-background` and `--kui-wa-badge-filled-foreground` on a
|
|
127
|
+
badge or containing scope when a product needs a different contrast-safe pair,
|
|
128
|
+
or `--kui-wa-badge-accent-foreground` for a reviewed accent foreground.
|
|
129
|
+
Breadcrumb has no bordered or filled container, and Scroller delegates item chrome
|
|
130
|
+
to its slotted children, so both retain their upstream geometry. Web Awesome
|
|
131
|
+
3.12's free catalog has
|
|
117
132
|
`wa-dropdown-item`, but no `wa-menu-item`; the theme therefore styles the
|
|
118
133
|
supported dropdown item rather than carrying a dead selector.
|
|
119
134
|
|
|
@@ -174,8 +189,9 @@ generic Kerf wrappers around them. Their variants and appearances already read
|
|
|
174
189
|
the semantic palette above, and importing their component modules remains
|
|
175
190
|
independent and tree-shakeable.
|
|
176
191
|
|
|
177
|
-
- Use `wa-badge pill` for compact status, count, or activity
|
|
178
|
-
2's pill-shaped ticket status treatment
|
|
192
|
+
- Use `wa-badge pill appearance="filled"` for compact status, count, or activity
|
|
193
|
+
labels. Hot Sheet 2's quiet, contrast-safe pill-shaped ticket status treatment
|
|
194
|
+
is the reference shape.
|
|
179
195
|
- Use the default, non-pill `wa-tag` for categories, filters, and removable
|
|
180
196
|
selections. Its medium-radius rounded rectangle keeps tags distinct from
|
|
181
197
|
status badges. Handle the bubbling `wa-remove` event in the feature that owns
|
package/llms.txt
CHANGED
|
@@ -115,6 +115,11 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
|
|
|
115
115
|
the surface (8px) and container (16px) tiers respectively, independent of the
|
|
116
116
|
dialog's shared `--spacing`. Override the tier at the narrowest useful scope
|
|
117
117
|
instead of restyling individual shadow parts.
|
|
118
|
+
Filled badges use each semantic variant's quiet fill with normal text for
|
|
119
|
+
WCAG-AA compact-copy contrast. Override
|
|
120
|
+
`--kui-wa-badge-filled-background` and
|
|
121
|
+
`--kui-wa-badge-filled-foreground` as a contrast-safe pair instead of adding
|
|
122
|
+
host selectors.
|
|
118
123
|
When a dialog provides another dismissal affordance, add `hide-actions` to
|
|
119
124
|
the `wa-dialog` host; the theme hides its directly exported `header-actions`
|
|
120
125
|
part without an unsupported chained `::part()` selector.
|
|
@@ -160,9 +165,11 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
|
|
|
160
165
|
toolbar.
|
|
161
166
|
- **Use `Text` for ordinary semantic headings and paragraphs outside toolbar
|
|
162
167
|
title zones.** Omit `variant` for the default `p`, or pass `h1`–`h6` based on
|
|
163
|
-
the document outline.
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
the document outline. Independently compose `tone="quiet|danger"`,
|
|
169
|
+
`size="compact"`, and `font="monospace"` for supporting, error, compact, and
|
|
170
|
+
code roles instead of global utility classes. It passes native attributes
|
|
171
|
+
through and owns the standard transparent border plus item padding; keep
|
|
172
|
+
toolbar titles on `ToolbarText` and list-aligned bare prose on `ListInsetText`.
|
|
166
173
|
- **Space by the five-step scale, by relationship not by eye.** `0`
|
|
167
174
|
`--kui-space-none`, `4px` `--kui-space-2xs`, `8px` `--kui-space-xs` (inside a
|
|
168
175
|
group), `16px` `--kui-space-m`, `24px` `--kui-space-l` (between major differing
|
package/package.json
CHANGED
package/dist/chunk-QM4GQ7W3.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/text.tsx
|
|
4
|
-
function Text({
|
|
5
|
-
variant: Variant = "p",
|
|
6
|
-
children,
|
|
7
|
-
class: classValue = "",
|
|
8
|
-
className = "",
|
|
9
|
-
...attributes
|
|
10
|
-
}) {
|
|
11
|
-
const classes = `kui-text ${classValue} ${className}`.trim();
|
|
12
|
-
return /* @__PURE__ */ jsx(Variant, { ...attributes, class: classes, "data-component": "text", children });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { Text };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=chunk-QM4GQ7W3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/text.tsx"],"names":[],"mappings":";;;AAwBO,SAAS,IAAA,CAAK;AAAA,EACnB,SAAS,OAAA,GAAU,GAAA;AAAA,EACnB,QAAA;AAAA,EACA,OAAO,UAAA,GAAa,EAAA;AAAA,EACpB,SAAA,GAAY,EAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAc;AACZ,EAAA,MAAM,UAAU,CAAA,SAAA,EAAY,UAAU,CAAA,CAAA,EAAI,SAAS,GAAG,IAAA,EAAK;AAC3D,EAAA,uBACE,GAAA,CAAC,WAAS,GAAG,UAAA,EAAY,OAAO,OAAA,EAAS,gBAAA,EAAe,QACrD,QAAA,EACH,CAAA;AAEJ","file":"chunk-QM4GQ7W3.js","sourcesContent":["import type { KerfBaseAttrs } from 'kerfjs/jsx-runtime';\n\nimport type { KerfUiContent } from './semantic-content.js';\n\nexport type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';\n\nexport type TextContent =\n KerfUiContent | string | number | readonly TextContent[];\n\nexport type TextProps = Omit<\n KerfBaseAttrs,\n 'children' | 'class' | 'className'\n> & {\n /** Native heading or paragraph element to render. Defaults to `p`. */\n variant?: TextVariant;\n children: TextContent;\n class?: string;\n className?: string;\n};\n\n/**\n * Semantic heading or paragraph text with the standard content-item padding.\n * All ordinary native heading/paragraph attributes pass through to the element.\n */\nexport function Text({\n variant: Variant = 'p',\n children,\n class: classValue = '',\n className = '',\n ...attributes\n}: TextProps) {\n const classes = `kui-text ${classValue} ${className}`.trim();\n return (\n <Variant {...attributes} class={classes} data-component=\"text\">\n {children}\n </Variant>\n );\n}\n"]}
|