@kerfjs/ui 5.0.0-beta.39 → 5.0.0-beta.40

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.
Files changed (41) hide show
  1. package/README.md +1 -0
  2. package/ai/compile-time-contracts-v1.json +1 -0
  3. package/ai/component-catalog-v2.json +51 -0
  4. package/ai/component-catalog.json +57 -1
  5. package/ai/public-api-signatures-v1.md +26 -1
  6. package/ai/skill.md +1 -0
  7. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  8. package/dist/browser/list-header.js +1 -0
  9. package/dist/browser/text.js +3 -0
  10. package/dist/catalog.js +23 -7
  11. package/dist/catalog.js.map +1 -1
  12. package/dist/{chunk-5FJ53EOF.js → chunk-DEYOGDE7.js} +11 -2
  13. package/dist/chunk-DEYOGDE7.js.map +1 -0
  14. package/dist/chunk-ZASJJMGV.js +17 -0
  15. package/dist/chunk-ZASJJMGV.js.map +1 -0
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.js +2 -1
  18. package/dist/list-header.js +2 -1
  19. package/dist/styles/list-header.css +1 -5
  20. package/dist/styles/styles.css +1 -0
  21. package/dist/styles/text.css +5 -0
  22. package/dist/text.d.ts +20 -0
  23. package/dist/text.js +3 -0
  24. package/dist/text.js.map +1 -0
  25. package/docs/accessibility.md +5 -0
  26. package/docs/component-selection.md +1 -0
  27. package/docs/examples/command-palette-adapter.tsx +3 -2
  28. package/docs/layout.md +18 -0
  29. package/llms.txt +6 -1
  30. package/package.json +7 -1
  31. package/ux-demo/recipes/app-shell.tsx +5 -4
  32. package/ux-demo/recipes/collapsible-sidebar.tsx +5 -4
  33. package/ux-demo/recipes/compact-toolbar.tsx +3 -2
  34. package/ux-demo/recipes/composer-form.tsx +3 -2
  35. package/ux-demo/recipes/list-detail-dialog.tsx +14 -6
  36. package/ux-demo/recipes/list-workspace-states.tsx +3 -2
  37. package/ux-demo/recipes/loading-inspector.tsx +9 -4
  38. package/ux-demo/recipes/navigation-sidebar.tsx +5 -4
  39. package/ux-demo/recipes/navigation-stack.tsx +6 -3
  40. package/ux-demo/recipes/workspace-header.tsx +8 -4
  41. package/dist/chunk-5FJ53EOF.js.map +0 -1
package/README.md CHANGED
@@ -163,6 +163,7 @@ interchangeable. `ListItem` and `ListActionRow` deliberately expose no raw
163
163
  | `DialogSurface`, `PopupSurface` | `@kerfjs/ui/surface-scaffold` | `@kerfjs/ui/surface-scaffold.css` |
164
164
  | `FloatingToolbar` | `@kerfjs/ui/floating-toolbar` | `@kerfjs/ui/floating-toolbar.css` |
165
165
  | `ToolbarText` | `@kerfjs/ui/toolbar-text` | `@kerfjs/ui/toolbar-text.css` |
166
+ | `Text` | `@kerfjs/ui/text` | `@kerfjs/ui/text.css` |
166
167
  | `List` | `@kerfjs/ui/list` | `@kerfjs/ui/list.css` |
167
168
  | `Row` | `@kerfjs/ui/row` | `@kerfjs/ui/row.css` |
168
169
  | `Spacer` | `@kerfjs/ui/spacer` | `@kerfjs/ui/spacer.css` |
@@ -82,6 +82,7 @@
82
82
  "DividerSides",
83
83
  "StateBannerUrgency",
84
84
  "TabActivation",
85
+ "TextVariant",
85
86
  "ToolbarControlGroupAppearance",
86
87
  "ToolbarControlGroupButtonAppearance",
87
88
  "ToolbarControlGroupShape",
@@ -1305,6 +1305,57 @@
1305
1305
  "composition": "generated-permissive-default"
1306
1306
  }
1307
1307
  },
1308
+ {
1309
+ "key": "@kerfjs/ui:text",
1310
+ "package": "@kerfjs/ui",
1311
+ "id": "text",
1312
+ "name": "Text",
1313
+ "kind": "component",
1314
+ "source": "kerf",
1315
+ "parents": { "mode": "any", "entries": [] },
1316
+ "contexts": ["application-ui"],
1317
+ "zones": [],
1318
+ "children": { "mode": "any", "concepts": [], "requiredConcepts": [] },
1319
+ "state": [
1320
+ { "id": "semantic variant", "owner": "application", "required": false },
1321
+ { "id": "copy", "owner": "application", "required": false },
1322
+ {
1323
+ "id": "document heading hierarchy",
1324
+ "owner": "application",
1325
+ "required": false
1326
+ }
1327
+ ],
1328
+ "wiring": { "required": false, "helpers": [], "obligations": [] },
1329
+ "responsive": { "owner": "not-applicable", "behaviors": [] },
1330
+ "layout": {
1331
+ "roles": ["structure"],
1332
+ "geometry": {
1333
+ "margin": "self",
1334
+ "border": "self",
1335
+ "padding": "self",
1336
+ "notes": [
1337
+ "Text keeps the native variant's margin and adds a 1px transparent border plus the standard 8px item padding."
1338
+ ]
1339
+ }
1340
+ },
1341
+ "accessibility": {
1342
+ "obligations": [
1343
+ "Text renders the selected native element; choose heading levels by document outline rather than appearance.",
1344
+ "Ordinary global, data, and ARIA attributes pass through to the native element."
1345
+ ]
1346
+ },
1347
+ "cssValueProps": [],
1348
+ "boundaries": {
1349
+ "rootClass": "kui-text",
1350
+ "publicClasses": ["kui-text"],
1351
+ "publicTokens": ["--kui-layout-item-padding"]
1352
+ },
1353
+ "diagnostics": [],
1354
+ "provenance": {
1355
+ "selection": "ai/component-catalog.json",
1356
+ "composition": "generated-permissive-default"
1357
+ }
1358
+ },
1308
1359
  {
1309
1360
  "key": "@kerfjs/ui:headers",
1310
1361
  "package": "@kerfjs/ui",
@@ -1508,6 +1508,61 @@
1508
1508
  "recipe": "docs/component-selection.md#problem-to-component-matrix"
1509
1509
  }
1510
1510
  },
1511
+ {
1512
+ "id": "text",
1513
+ "name": "Text",
1514
+ "category": "Structure",
1515
+ "kind": "component",
1516
+ "source": "kerf",
1517
+ "description": "Semantic native heading and paragraph text with standard padded content geometry.",
1518
+ "uses": [],
1519
+ "purpose": "Render h1 through h6 or paragraph semantics while consistently supplying the standard transparent border and content padding.",
1520
+ "publicExports": ["Text"],
1521
+ "useWhen": [
1522
+ "Render ordinary application headings or paragraphs that should use native document semantics and the standard text-box inset."
1523
+ ],
1524
+ "avoidWhen": [
1525
+ "Do not use Text for toolbar identity or title content; use ToolbarText inside a Toolbar zone.",
1526
+ "Do not choose a heading variant for visual size alone; preserve the document heading hierarchy."
1527
+ ],
1528
+ "alternatives": [
1529
+ {
1530
+ "id": "toolbar-text",
1531
+ "relationship": "toolbar-specific"
1532
+ },
1533
+ {
1534
+ "id": "list-inset-text",
1535
+ "relationship": "list-geometry-specific"
1536
+ }
1537
+ ],
1538
+ "appOwns": ["semantic variant", "copy", "document heading hierarchy"],
1539
+ "variants": ["h1", "h2", "h3", "h4", "h5", "h6", "p"],
1540
+ "accessibility": [
1541
+ "Text renders the selected native element; choose heading levels by document outline rather than appearance.",
1542
+ "Ordinary global, data, and ARIA attributes pass through to the native element."
1543
+ ],
1544
+ "geometry": {
1545
+ "margin": "self",
1546
+ "border": "self",
1547
+ "padding": "self",
1548
+ "notes": [
1549
+ "Text keeps the native variant's margin and adds a 1px transparent border plus the standard 8px item padding."
1550
+ ]
1551
+ },
1552
+ "delivery": {
1553
+ "browserImport": "@kerfjs/ui/text",
1554
+ "manualCssImport": "@kerfjs/ui/text.css",
1555
+ "sideEffects": ["browser-condition-css"]
1556
+ },
1557
+ "wiring": [],
1558
+ "publicClasses": ["kui-text"],
1559
+ "publicTokens": ["--kui-layout-item-padding"],
1560
+ "links": {
1561
+ "catalogRoute": "?component=text",
1562
+ "documentation": "docs/component-selection.md",
1563
+ "recipe": "docs/component-selection.md#problem-to-component-matrix"
1564
+ }
1565
+ },
1511
1566
  {
1512
1567
  "id": "headers",
1513
1568
  "name": "Header composition",
@@ -1948,7 +2003,8 @@
1948
2003
  "description": "Configurable section headings with full-width or shrink-wrapped inline presentation, semantic count/status indicators, density, group dividers, a logical-end action, disclosure states, and protected native-popover trigger metadata.",
1949
2004
  "uses": [
1950
2005
  "lucide-icon",
1951
- "disclosure-arrow"
2006
+ "disclosure-arrow",
2007
+ "text"
1952
2008
  ],
1953
2009
  "purpose": "Fill the available section width by default, or shrink-wrap without outer geometry when inline, while splitting a dormant title and mutually exclusive semantic count or legacy badge from an optional logical-end action with an 18px visual; disclosure mode renders the title cluster as a button with a default production DisclosureArrow.",
1954
2010
  "publicExports": [
@@ -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.39` and `kerfjs@5.0.0-beta.39`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
3
+ Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.40` and `kerfjs@5.0.0-beta.40`. 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
 
@@ -2004,6 +2004,31 @@ declare function PopupSurface({ children, inset, className, }: PopupSurfaceProps
2004
2004
  export { DialogSurface, type DialogSurfacePresentation, type DialogSurfaceProps, type DialogSurfaceSize, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, type SurfaceInset };
2005
2005
  ```
2006
2006
 
2007
+ ## `@kerfjs/ui/text`
2008
+
2009
+ ```ts
2010
+ import * as kerfjs from 'kerfjs';
2011
+ import { KerfBaseAttrs } from 'kerfjs/jsx-runtime';
2012
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
2013
+
2014
+ type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
2015
+ type TextContent = KerfUiContent | string | number | readonly TextContent[];
2016
+ type TextProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> & {
2017
+ /** Native heading or paragraph element to render. */
2018
+ variant: TextVariant;
2019
+ children: TextContent;
2020
+ class?: string;
2021
+ className?: string;
2022
+ };
2023
+ /**
2024
+ * Semantic heading or paragraph text with the standard content-item padding.
2025
+ * All ordinary native heading/paragraph attributes pass through to the element.
2026
+ */
2027
+ declare function Text({ variant: Variant, children, class: classValue, className, ...attributes }: TextProps): kerfjs.SafeHtml;
2028
+
2029
+ export { Text, type TextContent, type TextProps, type TextVariant };
2030
+ ```
2031
+
2007
2032
  ## `@kerfjs/ui/row`
2008
2033
 
2009
2034
  ```ts
package/ai/skill.md CHANGED
@@ -129,6 +129,7 @@ Hard rules:
129
129
  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); Dialog maps its body to the 8px surface tier and its footer to the 16px container tier independently of `--spacing`. Override those tiers instead of restyling individual parts. When a dialog provides another dismissal affordance, put `hide-actions` on the `wa-dialog` host to hide its directly exported `header-actions` part; never chain `::part()` selectors through internal 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.
130
130
  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.
131
131
  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`. Use `Row` instead of a hand-written flex-row wrapper and `List` instead of a hand-written flex-column wrapper when children need shared physical-axis alignment and typed spacing. `Row` defaults to left/full with an `xs` gap and no wrapping; `List` retains full/top and zero-gap defaults. Use `List` when rows or sections also need flex growth, one vertical scroll owner, or physical-edge dividers. `dividerSides`, `textInsets`, and `controlInsets` use canonical physical `t`/`r`/`b`/`l` order; text geometry wins where text and control selections overlap. `ListInsetText` and `ListInsetControl` inset all four sides by default and accept the same `sides` grammar for selective edges. A dialog body is generally a `List`: set `DialogSurface bodyInset="none"` when its list children own geometry, and wrap bare dialog prose in `ListInsetText` so it aligns with bordered siblings without a second inset. 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, duplicate item geometry in wrappers, or create nested scroll owners.
132
+ 15a. Use `Text` from `@kerfjs/ui/text` for ordinary headings and paragraphs outside toolbar title zones. Pass the required `h1`–`h6` or `p` variant according to document semantics; ordinary native attributes pass through. Text owns a transparent 1px border and the standard item padding. Keep toolbar identity/title content on `ToolbarText` and list-aligned bare prose on `ListInsetText`.
132
133
  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.
133
134
  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. Put identity/title text directly in the zone as `ToolbarText`; wrap interactive controls and icon tiles in `ToolbarControlGroup`. `SegmentedControl`, `Select`, a collapsible `TokenSearchField`, and Web Awesome controls all live inside a group. 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` group 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`. For a compact mixed group, keep the standard item padding and raised selected chrome; the selected item paints over the outer border without an internal separator. For an avatar control, set `content="avatar"` and `avatarImage` on the group instead of inserting an `img`: a lone control paints the contained image on the outer group and a multi-button group paints it only on the pressed selection highlight. Compose panel/dialog/page headings with a direct extra-large `ToolbarText`, optional grouped icon, grouped trailing controls, and app-owned supporting copy below. 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 by default; set `inline` only when it should shrink-wrap in surrounding content without outer margin, border, or padding. It keeps its label and mutually exclusive semantic count or non-count `badge` together, with an independent logical-end 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 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.
134
135
  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, toolbar title/supporting-copy 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.
@@ -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.39` 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.
3
+ Generated from the emitted `@kerfjs/ui@5.0.0-beta.40` 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';
@@ -2,5 +2,6 @@ import '../styles/foundation.css';
2
2
  import '../styles/lucide-icon.css';
3
3
  import '../styles/disclosure-arrow.css';
4
4
  import '../styles/skeleton.css';
5
+ import '../styles/text.css';
5
6
  import '../styles/list-header.css';
6
7
  export * from '../list-header.js';
@@ -0,0 +1,3 @@
1
+ import '../styles/foundation.css';
2
+ import '../styles/text.css';
3
+ export * from '../text.js';
package/dist/catalog.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { ToolbarControlGroup } from './chunk-B6JYRX3P.js';
2
2
  import { Toolbar } from './chunk-VXFGMDA7.js';
3
3
  import { Pane } from './chunk-I4V3UDSA.js';
4
- import { ListHeader } from './chunk-5FJ53EOF.js';
4
+ import { ListHeader } from './chunk-DEYOGDE7.js';
5
+ import { Text } from './chunk-ZASJJMGV.js';
5
6
  import { ListItem } from './chunk-I45QO2IZ.js';
6
7
  import { List } from './chunk-C34NZOLJ.js';
7
8
 
@@ -95,7 +96,7 @@ function Catalog({
95
96
  className: "kui-catalog__identity",
96
97
  children: [
97
98
  brand.logoUrl ? /* @__PURE__ */ jsx("img", { class: "kui-catalog__mark", src: brand.logoUrl, alt: "" }) : /* @__PURE__ */ jsx(Fragment, {}),
98
- /* @__PURE__ */ jsx("h1", { children: brand.title })
99
+ /* @__PURE__ */ jsx(Text, { variant: "h1", children: brand.title })
99
100
  ]
100
101
  }
101
102
  ),
@@ -110,7 +111,7 @@ function Catalog({
110
111
  ) })
111
112
  }
112
113
  ),
113
- brand.subtitle ? /* @__PURE__ */ jsx("p", { class: "kui-catalog__subtitle", children: brand.subtitle }) : /* @__PURE__ */ jsx(Fragment, {})
114
+ brand.subtitle ? /* @__PURE__ */ jsx(Text, { variant: "p", class: "kui-catalog__subtitle", children: brand.subtitle }) : /* @__PURE__ */ jsx(Fragment, {})
114
115
  ] }),
115
116
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
116
117
  sections.map((section) => /* @__PURE__ */ jsxs("section", { class: "kui-catalog__group", children: [
@@ -139,7 +140,7 @@ function Catalog({
139
140
  }
140
141
  ) : /* @__PURE__ */ jsx(ListHeader, { label: secondarySections.label }),
141
142
  !secondarySections.collapsible || secondarySections.expanded ? /* @__PURE__ */ jsx("div", { class: "kui-catalog__secondary", "data-catalog-secondary": true, children: secondarySections.sections.map((section) => /* @__PURE__ */ jsxs("section", { class: "kui-catalog__secondary-group", children: [
142
- /* @__PURE__ */ jsx("h3", { class: "kui-catalog__secondary-heading", children: section.category }),
143
+ /* @__PURE__ */ jsx(Text, { variant: "h3", class: "kui-catalog__secondary-heading", children: section.category }),
143
144
  /* @__PURE__ */ jsx(List, { className: "kui-catalog__items", children: section.entries.map((entry) => /* @__PURE__ */ jsx(
144
145
  ListItem,
145
146
  {
@@ -194,7 +195,7 @@ function Catalog({
194
195
  {
195
196
  appearance: "borderless",
196
197
  className: "kui-catalog__title",
197
- children: /* @__PURE__ */ jsx("h2", { children: name })
198
+ children: /* @__PURE__ */ jsx(Text, { variant: "h2", children: name })
198
199
  }
199
200
  )
200
201
  ] }),
@@ -223,7 +224,14 @@ function Catalog({
223
224
  ] })
224
225
  }
225
226
  ),
226
- selected?.description ? /* @__PURE__ */ jsx("p", { class: "kui-catalog__description kui-content-item", children: selected.description }) : /* @__PURE__ */ jsx(Fragment, {})
227
+ selected?.description ? /* @__PURE__ */ jsx(
228
+ Text,
229
+ {
230
+ variant: "p",
231
+ class: "kui-catalog__description kui-content-item",
232
+ children: selected.description
233
+ }
234
+ ) : /* @__PURE__ */ jsx(Fragment, {})
227
235
  ] }),
228
236
  footerClassName: "kui-catalog__footer",
229
237
  footer: /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -347,7 +355,15 @@ function CatalogExample({
347
355
  rootAttributes: { "data-catalog-example-label": "" }
348
356
  }
349
357
  ) : /* @__PURE__ */ jsx(Fragment, {}),
350
- note !== void 0 ? /* @__PURE__ */ jsx("p", { class: "kui-catalog-example__note", "data-catalog-example-note": true, children: note }) : /* @__PURE__ */ jsx(Fragment, {}),
358
+ note !== void 0 ? /* @__PURE__ */ jsx(
359
+ Text,
360
+ {
361
+ variant: "p",
362
+ class: "kui-catalog-example__note",
363
+ "data-catalog-example-note": true,
364
+ children: note
365
+ }
366
+ ) : /* @__PURE__ */ jsx(Fragment, {}),
351
367
  children
352
368
  ]
353
369
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/catalog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2GA,SAAS,SAAA,CACP,UACA,EAAA,EAC0B;AAC1B,EAAA,KAAA,MAAW,WAAW,QAAA,EAAU;AAC9B,IAAA,KAAA,MAAW,SAAS,OAAA,CAAQ,OAAA,MAAa,KAAA,CAAM,EAAA,KAAO,IAAI,OAAO,KAAA;AAAA,EACnE;AACA,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,iBACP,IAAA,EACsB;AACtB,EAAA,IAAI,CAAC,IAAA,EAAM,MAAA,EAAQ,OAAO,MAAA;AAC1B,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,mBAAA,EACT,eAAK,GAAA,CAAI,CAAC,GAAA,qBACT,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,kBAAA,EAAoB,QAAA,EAAA,GAAA,EAAI,CACrC,CAAA,EACH,CAAA;AAEJ;AAQA,SAAS,gBAAA,CACP,SACA,YAAA,EACY;AACZ,EAAA,MAAM,SAAmB,EAAC;AAC1B,EAAA,KAAA,MAAW,KAAA,IAAS,OAAA;AAClB,IAAA,IAAI,CAAC,OAAO,QAAA,CAAS,KAAA,CAAM,KAAK,CAAA,EAAG,MAAA,CAAO,IAAA,CAAK,KAAA,CAAM,KAAK,CAAA;AAC5D,EAAA,MAAM,QAAoB,EAAC;AAC3B,EAAA,MAAA,CAAO,OAAA,CAAQ,CAAC,KAAA,EAAO,KAAA,KAAU;AAC/B,IAAA,IAAI,QAAQ,CAAA,EAAG,KAAA,CAAM,IAAA,iBAAK,GAAA,CAAC,gBAAW,CAAa,CAAA;AAC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;AAAA,MACE,GAAG,kBAAA;AAAA,MACJ,KAAA,EAAO,CAAA,oBAAA,EAAuB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC/C,sBAAA,EAAoB,IAAA;AAAA,MACpB,YAAA,EAAY,KAAA;AAAA,MAEX,QAAA,EAAA;AAAA,QAAA,KAAA,KAAU,MAAA,mBACT,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,KAAA;AAAA,YACA,cAAA,EAAgB,EAAE,4BAAA,EAA8B,EAAA;AAAG;AAAA,4BAGrD,GAAA,CAAA,QAAA,EAAA,EAAE,CAAA;AAAA,QAEH,IAAA,KAAS,MAAA,mBACR,GAAA,CAAC,GAAA,EAAA,EAAE,KAAA,EAAM,6BAA4B,2BAAA,EAAyB,IAAA,EAC3D,QAAA,EAAA,IAAA,EACH,CAAA,mBAEA,GAAA,CAAA,QAAA,EAAA,EAAE,CAAA;AAAA,QAEH;AAAA;AAAA;AAAA,GACH;AAEJ;AAgBO,SAAS,mBAAA,CAAoB;AAAA,EAClC,KAAA;AAAA,EACA,iBAAiB,EAAC;AAAA,EAClB,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAA6B;AAC3B,EAAA,MAAM,kBAAA,GAAqB,oBAAA;AAAA,IACzB,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACE,GAAG,kBAAA;AAAA,MACJ,KAAA,EAAO,CAAA,0BAAA,EAA6B,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACrD,4BAAA,EAA0B,IAAA;AAAA,MAC1B,YAAA,EAAY,KAAA;AAAA,MAEX;AAAA;AAAA,GACH;AAEJ","file":"catalog.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n ExternalLink,\n Moon,\n PanelLeftClose,\n PanelLeftOpen,\n Sun,\n Waypoints,\n} from 'lucide';\n\nimport { filterDataAttributes } from './extension-attributes.js';\nimport { List } from './list.js';\nimport { ListHeader } from './list-header.js';\nimport { ListItem } from './list-item.js';\nimport { LucideIcon } from './lucide-icon.js';\nimport { Pane } from './pane.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport { Toolbar } from './toolbar.js';\nimport { ToolbarControlGroup } from './toolbar-control-group.js';\n\n/** A reference link shown in the detail footer for the active entry. */\nexport interface CatalogResource {\n label: string;\n href: string;\n /** Optional monospace detail (e.g. a file path) shown after the label. */\n detail?: string;\n}\n\n/** A related entry offered in the detail footer's \"Related entries\" popup menu. */\nexport interface CatalogRelated {\n id: string;\n name: string;\n /** Group heading in the menu, e.g. \"Uses\" / \"Used by\". */\n group: string;\n}\n\nexport interface CatalogEntry {\n id: string;\n name: string;\n description?: string;\n /** Short metadata tags shown at the trailing edge of the sidebar row. */\n tags?: readonly string[];\n resources?: readonly CatalogResource[];\n related?: readonly CatalogRelated[];\n}\n\nexport interface CatalogSection {\n category: string;\n entries: readonly CatalogEntry[];\n}\n\n/**\n * A secondary group of sections shown below the primary sidebar sections with a\n * quieter \"ecosystem\" treatment (e.g. third-party components). Optionally\n * collapsible — the app owns `expanded` and toggles it from `wireCatalog`'s\n * `onToggleSecondary`.\n */\nexport interface CatalogSecondaryGroup {\n label: string;\n sections: readonly CatalogSection[];\n /** When true, the group's label is a disclosure toggle controlling `expanded`. */\n collapsible?: boolean;\n /** Whether the group is expanded (controlled). Ignored unless `collapsible`. */\n expanded?: boolean;\n}\n\nexport interface CatalogBrand {\n title: string;\n subtitle?: string;\n /** Logo image URL (rendered decorative). Omit for a text-only brand. */\n logoUrl?: string;\n}\n\nexport interface CatalogProps {\n brand: CatalogBrand;\n sections: readonly CatalogSection[];\n /** The controlled active entry id — the app owns this signal. */\n active: string;\n /** The rendered preview for the active entry; the app computes it from `active`. */\n content: KerfUiContent;\n /** Whether the sidebar is collapsed (controlled). */\n collapsed?: boolean;\n /** Current theme; when set, a theme toggle is shown that switches to the opposite. Omit to hide it. */\n theme?: 'light' | 'dark';\n /** Extra header controls placed before the theme toggle (each a `ToolbarControlGroup`). */\n headerActions?: KerfUiContent;\n /** A secondary \"ecosystem\" group of sections below the primary category groups. */\n secondarySections?: CatalogSecondaryGroup;\n /** Extra sidebar content below the category groups (and the secondary group). */\n sidebarFooter?: KerfUiContent;\n /** Status line content shown at the start of the detail footer. */\n status?: KerfUiContent;\n /**\n * Whether to highlight specimens' computed borders (or transparent outer\n * bounds) and non-zero margins. Pass a boolean (rather than omitting the\n * prop) when the active entry can switch between component and composition\n * previews; `wireCatalogGeometryOverlay` keeps the overlay synchronized.\n */\n geometryOverlay?: boolean;\n selectAction?: string;\n toggleSidebarAction?: string;\n toggleThemeAction?: string;\n /** Action fired by the secondary group's disclosure toggle (when collapsible). */\n toggleSecondaryAction?: string;\n className?: string;\n}\n\nfunction findEntry(\n sections: readonly CatalogSection[],\n id: string,\n): CatalogEntry | undefined {\n for (const section of sections) {\n for (const entry of section.entries) if (entry.id === id) return entry;\n }\n return undefined;\n}\n\nfunction catalogEntryTags(\n tags: readonly string[] | undefined,\n): SafeHtml | undefined {\n if (!tags?.length) return undefined;\n return (\n <span class=\"kui-catalog__tags\">\n {tags.map((tag) => (\n <span class=\"kui-catalog__tag\">{tag}</span>\n ))}\n </span>\n );\n}\n\n/**\n * Render the related entries as a `wa-dropdown` popup-menu body: a heading per\n * `group` (first-seen order) followed by that group's entries, each a navigable\n * item carrying the same `selectAction` the sidebar items use, so a chosen entry\n * routes through the one `wireCatalog` select handler.\n */\nfunction relatedMenuItems(\n related: readonly CatalogRelated[],\n selectAction: string,\n): SafeHtml[] {\n const groups: string[] = [];\n for (const entry of related)\n if (!groups.includes(entry.group)) groups.push(entry.group);\n const nodes: SafeHtml[] = [];\n groups.forEach((group, index) => {\n if (index > 0) nodes.push(<wa-divider></wa-divider>);\n nodes.push(<small class=\"kui-catalog__related-heading\">{group}</small>);\n for (const entry of related) {\n if (entry.group === group)\n nodes.push(\n <wa-dropdown-item data-action={selectAction} data-item-id={entry.id}>\n {entry.name}\n </wa-dropdown-item>,\n );\n }\n });\n return nodes;\n}\n\n/**\n * A reusable component-catalog shell: a collapsible category sidebar, a titled\n * detail stage that renders the active entry's preview, and a footer with\n * reference links and a related-entry popup menu. Built entirely from public\n * `@kerfjs/ui` primitives. Controlled and stateless — the app owns the `active`,\n * `collapsed`, and `theme` signals and computes `content` from `active` in its own\n * render; wire the sidebar/collapse/theme actions with `wireCatalog`.\n */\nexport function Catalog({\n brand,\n sections,\n active,\n content,\n collapsed = false,\n theme,\n headerActions,\n secondarySections,\n sidebarFooter,\n status,\n geometryOverlay,\n selectAction = 'catalog-select',\n toggleSidebarAction = 'catalog-toggle-sidebar',\n toggleThemeAction = 'catalog-toggle-theme',\n toggleSecondaryAction = 'catalog-toggle-secondary',\n className = '',\n}: CatalogProps) {\n const selected =\n findEntry(sections, active) ??\n (secondarySections\n ? findEntry(secondarySections.sections, active)\n : undefined);\n const name = selected?.name ?? '';\n const nextTheme = theme === 'dark' ? 'light' : 'dark';\n const resources = selected?.resources ?? [];\n const related = selected?.related ?? [];\n\n return (\n <main\n class={`kui-catalog ${className}`.trim()}\n data-component=\"catalog\"\n data-sidebar-collapsed={String(collapsed)}\n data-geometry-overlay={\n geometryOverlay === undefined ? undefined : String(geometryOverlay)\n }\n >\n <Pane\n element=\"aside\"\n className=\"kui-catalog__sidebar\"\n label={`${brand.title} catalog`}\n contentElement=\"nav\"\n contentLabel={`${brand.title} components`}\n separators={['inline-end']}\n headerClassName=\"kui-catalog__brand\"\n header={\n <>\n <Toolbar\n label={`${brand.title} catalog header`}\n dividerSides=\"\"\n leading={\n <ToolbarControlGroup\n appearance=\"borderless\"\n className=\"kui-catalog__identity\"\n >\n {brand.logoUrl ? (\n <img class=\"kui-catalog__mark\" src={brand.logoUrl} alt=\"\" />\n ) : (\n <></>\n )}\n <h1>{brand.title}</h1>\n </ToolbarControlGroup>\n }\n trailing={\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button\n type=\"button\"\n data-action={toggleSidebarAction}\n aria-label={`Collapse ${brand.title} catalog`}\n >\n <LucideIcon icon={PanelLeftClose} name=\"panel-left-close\" />\n </button>\n </ToolbarControlGroup>\n }\n />\n {brand.subtitle ? (\n <p class=\"kui-catalog__subtitle\">{brand.subtitle}</p>\n ) : (\n <></>\n )}\n </>\n }\n >\n <>\n {sections.map((section) => (\n <section class=\"kui-catalog__group\">\n <ListHeader label={section.category} />\n <List className=\"kui-catalog__items\">\n {section.entries.map((entry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n trailing={catalogEntryTags(entry.tags)}\n selected={active === entry.id}\n title={entry.description}\n multiline\n />\n ))}\n </List>\n </section>\n ))}\n {secondarySections ? (\n <section class=\"kui-catalog__group kui-catalog__group--secondary\">\n {secondarySections.collapsible ? (\n <ListHeader\n label={secondarySections.label}\n toggle\n expanded={Boolean(secondarySections.expanded)}\n action={toggleSecondaryAction}\n />\n ) : (\n <ListHeader label={secondarySections.label} />\n )}\n {!secondarySections.collapsible || secondarySections.expanded ? (\n <div class=\"kui-catalog__secondary\" data-catalog-secondary>\n {secondarySections.sections.map((section) => (\n <section class=\"kui-catalog__secondary-group\">\n <h3 class=\"kui-catalog__secondary-heading\">\n {section.category}\n </h3>\n <List className=\"kui-catalog__items\">\n {section.entries.map((entry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n trailing={catalogEntryTags(entry.tags)}\n selected={active === entry.id}\n title={entry.description}\n multiline\n />\n ))}\n </List>\n </section>\n ))}\n </div>\n ) : (\n <></>\n )}\n </section>\n ) : (\n <></>\n )}\n {sidebarFooter ?? <></>}\n </>\n </Pane>\n <Pane\n element=\"article\"\n className=\"kui-catalog__detail\"\n contentElement=\"section\"\n contentLabel={`${name} preview`}\n contentClassName=\"kui-catalog__stage\"\n headerClassName=\"kui-catalog__header\"\n header={\n <>\n <Toolbar\n label={`${name} header`}\n dividerSides=\"\"\n leading={\n <>\n {collapsed ? (\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button\n type=\"button\"\n data-action={toggleSidebarAction}\n aria-label={`Expand ${brand.title} catalog`}\n >\n <LucideIcon\n icon={PanelLeftOpen}\n name=\"panel-left-open\"\n />\n </button>\n </ToolbarControlGroup>\n ) : (\n <></>\n )}\n <ToolbarControlGroup\n appearance=\"borderless\"\n className=\"kui-catalog__title\"\n >\n <h2>{name}</h2>\n </ToolbarControlGroup>\n </>\n }\n trailing={\n <div class=\"kui-catalog__header-actions\">\n {headerActions}\n {theme ? (\n <ToolbarControlGroup\n className=\"kui-catalog__settings\"\n label=\"Catalog display\"\n >\n <button\n type=\"button\"\n data-action={toggleThemeAction}\n aria-label={`Use ${nextTheme} theme`}\n data-theme-preview={theme}\n >\n {nextTheme === 'dark' ? (\n <LucideIcon icon={Moon} name=\"moon\" />\n ) : (\n <LucideIcon icon={Sun} name=\"sun\" />\n )}\n <span>{nextTheme === 'dark' ? 'Dark' : 'Light'}</span>\n </button>\n </ToolbarControlGroup>\n ) : (\n <></>\n )}\n </div>\n }\n />\n {selected?.description ? (\n <p class=\"kui-catalog__description kui-content-item\">\n {selected.description}\n </p>\n ) : (\n <></>\n )}\n </>\n }\n footerClassName=\"kui-catalog__footer\"\n footer={\n <>\n {status ? <div class=\"kui-catalog__status\">{status}</div> : <></>}\n <Toolbar\n label={`${name} resources`}\n dividerSides=\"\"\n leading={\n resources.length > 0 ? (\n <nav\n class=\"kui-catalog__resources\"\n aria-label={`${name} resources`}\n >\n <ToolbarControlGroup\n className=\"kui-catalog__resource-group\"\n label={`${name} resources`}\n >\n {resources.map((resource) => (\n <a\n class=\"kui-catalog__resource\"\n href={resource.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={`${name}: ${resource.label} (opens in new tab)`}\n >\n <LucideIcon\n icon={ExternalLink}\n name=\"external-link\"\n />\n <span>{resource.label}</span>\n {resource.detail ? (\n <code>{resource.detail}</code>\n ) : (\n <></>\n )}\n </a>\n ))}\n </ToolbarControlGroup>\n </nav>\n ) : (\n <></>\n )\n }\n trailing={\n related.length > 0 ? (\n <div class=\"kui-catalog__related\" data-catalog-related>\n <ToolbarControlGroup\n single\n className=\"kui-catalog__related-group\"\n label=\"Related entries\"\n >\n <wa-dropdown\n class=\"kui-catalog__related-menu\"\n placement=\"top-end\"\n data-key={`kui-catalog-related-${active}`}\n data-morph-skip-children\n >\n <wa-button slot=\"trigger\" appearance=\"plain\" with-caret>\n <span class=\"kui-catalog__related-trigger\">\n <LucideIcon icon={Waypoints} name=\"waypoints\" />\n <span class=\"kui-catalog__related-label\">\n Components\n </span>\n </span>\n </wa-button>\n {relatedMenuItems(related, selectAction)}\n </wa-dropdown>\n </ToolbarControlGroup>\n </div>\n ) : (\n <></>\n )\n }\n />\n </>\n }\n >\n <div class=\"kui-catalog__canvas\">\n {content}\n {geometryOverlay !== undefined ? (\n <div\n class=\"kui-catalog__geometry-overlay\"\n data-catalog-geometry-overlay\n data-morph-skip-children\n aria-hidden=\"true\"\n />\n ) : (\n <></>\n )}\n </div>\n </Pane>\n </main>\n );\n}\n\n/**\n * How a {@link CatalogExample}'s content aligns its visible left edge with the\n * example's `ListHeader` label (which sits 16px in — 8px title + 8px label):\n * - `'glyph'` — a bare glyph/text specimen with no inline geometry insets the full 16px.\n * - `'inline-control'` — a control that already carries ~8px of its own inline padding insets 8px so its content lands on the same line.\n * - `'none'` — a content-item / composition that owns its geometry and already aligns; no inset (default).\n */\nexport type CatalogExampleAlign = 'glyph' | 'inline-control' | 'none';\n\nconst catalogExampleProtectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\ntype CatalogExampleStackRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleProps {\n /** The example's label, shown as a `ListHeader` above the specimen. Omit for a bare specimen. */\n label?: string;\n /** Optional explanatory note between the label and the specimen. */\n note?: SafeHtml | string;\n /** Alignment inset for the specimen — see {@link CatalogExampleAlign}. Default `'none'`. */\n align?: CatalogExampleAlign;\n /** Safe authoring `data-*` metadata for the rendered section. Helper-owned structural attributes remain protected. */\n rootAttributes?: CatalogExampleRootAttributes;\n className?: string;\n children?: KerfUiContent;\n}\n\n/**\n * One labeled example in a catalog preview: a `ListHeader` label, an optional\n * note, and the specimen. `align` insets the specimen so its visible left edge\n * lines up with the label text, encoding the catalog's alignment rules as a\n * first-class prop instead of per-demo CSS. The inset is published as the\n * `--kui-catalog-example-align` custom property so a debug overlay can exclude it\n * from a specimen's measured margin.\n */\nexport function CatalogExample({\n label,\n note,\n align = 'none',\n rootAttributes = {},\n className = '',\n children,\n}: CatalogExampleProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n catalogExampleProtectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example ${className}`.trim()}\n data-catalog-example\n data-align={align}\n >\n {label !== undefined ? (\n <ListHeader\n label={label}\n rootAttributes={{ 'data-catalog-example-label': '' }}\n />\n ) : (\n <></>\n )}\n {note !== undefined ? (\n <p class=\"kui-catalog-example__note\" data-catalog-example-note>\n {note}\n </p>\n ) : (\n <></>\n )}\n {children}\n </section>\n );\n}\n\nexport interface CatalogExampleStackProps {\n /** Accessible label for the stack region. */\n label?: string;\n /** Safe authoring `data-*` metadata for the rendered stack. Helper-owned structural attributes remain protected. */\n rootAttributes?: CatalogExampleStackRootAttributes;\n className?: string;\n children?: KerfUiContent;\n}\n\n/**\n * A vertically-stacked group of {@link CatalogExample}s with the catalog's\n * example rhythm. The semantic `section` becomes a named `region` when `label`\n * is supplied; an unlabeled stack remains an ordinary grouping.\n */\nexport function CatalogExampleStack({\n label,\n rootAttributes = {},\n className = '',\n children,\n}: CatalogExampleStackProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n catalogExampleProtectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example-stack ${className}`.trim()}\n data-catalog-example-stack\n aria-label={label}\n >\n {children}\n </section>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/catalog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA4GA,SAAS,SAAA,CACP,UACA,EAAA,EAC0B;AAC1B,EAAA,KAAA,MAAW,WAAW,QAAA,EAAU;AAC9B,IAAA,KAAA,MAAW,SAAS,OAAA,CAAQ,OAAA,MAAa,KAAA,CAAM,EAAA,KAAO,IAAI,OAAO,KAAA;AAAA,EACnE;AACA,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,iBACP,IAAA,EACsB;AACtB,EAAA,IAAI,CAAC,IAAA,EAAM,MAAA,EAAQ,OAAO,MAAA;AAC1B,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,mBAAA,EACT,eAAK,GAAA,CAAI,CAAC,GAAA,qBACT,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,kBAAA,EAAoB,QAAA,EAAA,GAAA,EAAI,CACrC,CAAA,EACH,CAAA;AAEJ;AAQA,SAAS,gBAAA,CACP,SACA,YAAA,EACY;AACZ,EAAA,MAAM,SAAmB,EAAC;AAC1B,EAAA,KAAA,MAAW,KAAA,IAAS,OAAA;AAClB,IAAA,IAAI,CAAC,OAAO,QAAA,CAAS,KAAA,CAAM,KAAK,CAAA,EAAG,MAAA,CAAO,IAAA,CAAK,KAAA,CAAM,KAAK,CAAA;AAC5D,EAAA,MAAM,QAAoB,EAAC;AAC3B,EAAA,MAAA,CAAO,OAAA,CAAQ,CAAC,KAAA,EA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O,CAAA,0BAAA,EAA6B,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACrD,4BAAA,EAA0B,IAAA;AAAA,MAC1B,YAAA,EAAY,KAAA;AAAA,MAEX;AAAA;AAAA,GACH;AAEJ","file":"catalog.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n ExternalLink,\n Moon,\n PanelLeftClose,\n PanelLeftOpen,\n Sun,\n Waypoints,\n} from 'lucide';\n\nimport { filterDataAttributes } from './extension-attributes.js';\nimport { List } from './list.js';\nimport { ListHeader } from './list-header.js';\nimport { ListItem } from './list-item.js';\nimport { LucideIcon } from './lucide-icon.js';\nimport { Pane } from './pane.js';\nimport type { KerfUiContent } from './semantic-content.js';\nimport { Text } from './text.js';\nimport { Toolbar } from './toolbar.js';\nimport { ToolbarControlGroup } from './toolbar-control-group.js';\n\n/** A reference link shown in the detail footer for the active entry. */\nexport interface CatalogResource {\n label: string;\n href: string;\n /** Optional monospace detail (e.g. a file path) shown after the label. */\n detail?: string;\n}\n\n/** A related entry offered in the detail footer's \"Related entries\" popup menu. */\nexport interface CatalogRelated {\n id: string;\n name: string;\n /** Group heading in the menu, e.g. \"Uses\" / \"Used by\". */\n group: string;\n}\n\nexport interface CatalogEntry {\n id: string;\n name: string;\n description?: string;\n /** Short metadata tags shown at the trailing edge of the sidebar row. */\n tags?: readonly string[];\n resources?: readonly CatalogResource[];\n related?: readonly CatalogRelated[];\n}\n\nexport interface CatalogSection {\n category: string;\n entries: readonly CatalogEntry[];\n}\n\n/**\n * A secondary group of sections shown below the primary sidebar sections with a\n * quieter \"ecosystem\" treatment (e.g. third-party components). Optionally\n * collapsible — the app owns `expanded` and toggles it from `wireCatalog`'s\n * `onToggleSecondary`.\n */\nexport interface CatalogSecondaryGroup {\n label: string;\n sections: readonly CatalogSection[];\n /** When true, the group's label is a disclosure toggle controlling `expanded`. */\n collapsible?: boolean;\n /** Whether the group is expanded (controlled). Ignored unless `collapsible`. */\n expanded?: boolean;\n}\n\nexport interface CatalogBrand {\n title: string;\n subtitle?: string;\n /** Logo image URL (rendered decorative). Omit for a text-only brand. */\n logoUrl?: string;\n}\n\nexport interface CatalogProps {\n brand: CatalogBrand;\n sections: readonly CatalogSection[];\n /** The controlled active entry id — the app owns this signal. */\n active: string;\n /** The rendered preview for the active entry; the app computes it from `active`. */\n content: KerfUiContent;\n /** Whether the sidebar is collapsed (controlled). */\n collapsed?: boolean;\n /** Current theme; when set, a theme toggle is shown that switches to the opposite. Omit to hide it. */\n theme?: 'light' | 'dark';\n /** Extra header controls placed before the theme toggle (each a `ToolbarControlGroup`). */\n headerActions?: KerfUiContent;\n /** A secondary \"ecosystem\" group of sections below the primary category groups. */\n secondarySections?: CatalogSecondaryGroup;\n /** Extra sidebar content below the category groups (and the secondary group). */\n sidebarFooter?: KerfUiContent;\n /** Status line content shown at the start of the detail footer. */\n status?: KerfUiContent;\n /**\n * Whether to highlight specimens' computed borders (or transparent outer\n * bounds) and non-zero margins. Pass a boolean (rather than omitting the\n * prop) when the active entry can switch between component and composition\n * previews; `wireCatalogGeometryOverlay` keeps the overlay synchronized.\n */\n geometryOverlay?: boolean;\n selectAction?: string;\n toggleSidebarAction?: string;\n toggleThemeAction?: string;\n /** Action fired by the secondary group's disclosure toggle (when collapsible). */\n toggleSecondaryAction?: string;\n className?: string;\n}\n\nfunction findEntry(\n sections: readonly CatalogSection[],\n id: string,\n): CatalogEntry | undefined {\n for (const section of sections) {\n for (const entry of section.entries) if (entry.id === id) return entry;\n }\n return undefined;\n}\n\nfunction catalogEntryTags(\n tags: readonly string[] | undefined,\n): SafeHtml | undefined {\n if (!tags?.length) return undefined;\n return (\n <span class=\"kui-catalog__tags\">\n {tags.map((tag) => (\n <span class=\"kui-catalog__tag\">{tag}</span>\n ))}\n </span>\n );\n}\n\n/**\n * Render the related entries as a `wa-dropdown` popup-menu body: a heading per\n * `group` (first-seen order) followed by that group's entries, each a navigable\n * item carrying the same `selectAction` the sidebar items use, so a chosen entry\n * routes through the one `wireCatalog` select handler.\n */\nfunction relatedMenuItems(\n related: readonly CatalogRelated[],\n selectAction: string,\n): SafeHtml[] {\n const groups: string[] = [];\n for (const entry of related)\n if (!groups.includes(entry.group)) groups.push(entry.group);\n const nodes: SafeHtml[] = [];\n groups.forEach((group, index) => {\n if (index > 0) nodes.push(<wa-divider></wa-divider>);\n nodes.push(<small class=\"kui-catalog__related-heading\">{group}</small>);\n for (const entry of related) {\n if (entry.group === group)\n nodes.push(\n <wa-dropdown-item data-action={selectAction} data-item-id={entry.id}>\n {entry.name}\n </wa-dropdown-item>,\n );\n }\n });\n return nodes;\n}\n\n/**\n * A reusable component-catalog shell: a collapsible category sidebar, a titled\n * detail stage that renders the active entry's preview, and a footer with\n * reference links and a related-entry popup menu. Built entirely from public\n * `@kerfjs/ui` primitives. Controlled and stateless — the app owns the `active`,\n * `collapsed`, and `theme` signals and computes `content` from `active` in its own\n * render; wire the sidebar/collapse/theme actions with `wireCatalog`.\n */\nexport function Catalog({\n brand,\n sections,\n active,\n content,\n collapsed = false,\n theme,\n headerActions,\n secondarySections,\n sidebarFooter,\n status,\n geometryOverlay,\n selectAction = 'catalog-select',\n toggleSidebarAction = 'catalog-toggle-sidebar',\n toggleThemeAction = 'catalog-toggle-theme',\n toggleSecondaryAction = 'catalog-toggle-secondary',\n className = '',\n}: CatalogProps) {\n const selected =\n findEntry(sections, active) ??\n (secondarySections\n ? findEntry(secondarySections.sections, active)\n : undefined);\n const name = selected?.name ?? '';\n const nextTheme = theme === 'dark' ? 'light' : 'dark';\n const resources = selected?.resources ?? [];\n const related = selected?.related ?? [];\n\n return (\n <main\n class={`kui-catalog ${className}`.trim()}\n data-component=\"catalog\"\n data-sidebar-collapsed={String(collapsed)}\n data-geometry-overlay={\n geometryOverlay === undefined ? undefined : String(geometryOverlay)\n }\n >\n <Pane\n element=\"aside\"\n className=\"kui-catalog__sidebar\"\n label={`${brand.title} catalog`}\n contentElement=\"nav\"\n contentLabel={`${brand.title} components`}\n separators={['inline-end']}\n headerClassName=\"kui-catalog__brand\"\n header={\n <>\n <Toolbar\n label={`${brand.title} catalog header`}\n dividerSides=\"\"\n leading={\n <ToolbarControlGroup\n appearance=\"borderless\"\n className=\"kui-catalog__identity\"\n >\n {brand.logoUrl ? (\n <img class=\"kui-catalog__mark\" src={brand.logoUrl} alt=\"\" />\n ) : (\n <></>\n )}\n <Text variant=\"h1\">{brand.title}</Text>\n </ToolbarControlGroup>\n }\n trailing={\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button\n type=\"button\"\n data-action={toggleSidebarAction}\n aria-label={`Collapse ${brand.title} catalog`}\n >\n <LucideIcon icon={PanelLeftClose} name=\"panel-left-close\" />\n </button>\n </ToolbarControlGroup>\n }\n />\n {brand.subtitle ? (\n <Text variant=\"p\" class=\"kui-catalog__subtitle\">\n {brand.subtitle}\n </Text>\n ) : (\n <></>\n )}\n </>\n }\n >\n <>\n {sections.map((section) => (\n <section class=\"kui-catalog__group\">\n <ListHeader label={section.category} />\n <List className=\"kui-catalog__items\">\n {section.entries.map((entry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n trailing={catalogEntryTags(entry.tags)}\n selected={active === entry.id}\n title={entry.description}\n multiline\n />\n ))}\n </List>\n </section>\n ))}\n {secondarySections ? (\n <section class=\"kui-catalog__group kui-catalog__group--secondary\">\n {secondarySections.collapsible ? (\n <ListHeader\n label={secondarySections.label}\n toggle\n expanded={Boolean(secondarySections.expanded)}\n action={toggleSecondaryAction}\n />\n ) : (\n <ListHeader label={secondarySections.label} />\n )}\n {!secondarySections.collapsible || secondarySections.expanded ? (\n <div class=\"kui-catalog__secondary\" data-catalog-secondary>\n {secondarySections.sections.map((section) => (\n <section class=\"kui-catalog__secondary-group\">\n <Text variant=\"h3\" class=\"kui-catalog__secondary-heading\">\n {section.category}\n </Text>\n <List className=\"kui-catalog__items\">\n {section.entries.map((entry) => (\n <ListItem\n action={selectAction}\n itemId={entry.id}\n label={entry.name}\n trailing={catalogEntryTags(entry.tags)}\n selected={active === entry.id}\n title={entry.description}\n multiline\n />\n ))}\n </List>\n </section>\n ))}\n </div>\n ) : (\n <></>\n )}\n </section>\n ) : (\n <></>\n )}\n {sidebarFooter ?? <></>}\n </>\n </Pane>\n <Pane\n element=\"article\"\n className=\"kui-catalog__detail\"\n contentElement=\"section\"\n contentLabel={`${name} preview`}\n contentClassName=\"kui-catalog__stage\"\n headerClassName=\"kui-catalog__header\"\n header={\n <>\n <Toolbar\n label={`${name} header`}\n dividerSides=\"\"\n leading={\n <>\n {collapsed ? (\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button\n type=\"button\"\n data-action={toggleSidebarAction}\n aria-label={`Expand ${brand.title} catalog`}\n >\n <LucideIcon\n icon={PanelLeftOpen}\n name=\"panel-left-open\"\n />\n </button>\n </ToolbarControlGroup>\n ) : (\n <></>\n )}\n <ToolbarControlGroup\n appearance=\"borderless\"\n className=\"kui-catalog__title\"\n >\n <Text variant=\"h2\">{name}</Text>\n </ToolbarControlGroup>\n </>\n }\n trailing={\n <div class=\"kui-catalog__header-actions\">\n {headerActions}\n {theme ? (\n <ToolbarControlGroup\n className=\"kui-catalog__settings\"\n label=\"Catalog display\"\n >\n <button\n type=\"button\"\n data-action={toggleThemeAction}\n aria-label={`Use ${nextTheme} theme`}\n data-theme-preview={theme}\n >\n {nextTheme === 'dark' ? (\n <LucideIcon icon={Moon} name=\"moon\" />\n ) : (\n <LucideIcon icon={Sun} name=\"sun\" />\n )}\n <span>{nextTheme === 'dark' ? 'Dark' : 'Light'}</span>\n </button>\n </ToolbarControlGroup>\n ) : (\n <></>\n )}\n </div>\n }\n />\n {selected?.description ? (\n <Text\n variant=\"p\"\n class=\"kui-catalog__description kui-content-item\"\n >\n {selected.description}\n </Text>\n ) : (\n <></>\n )}\n </>\n }\n footerClassName=\"kui-catalog__footer\"\n footer={\n <>\n {status ? <div class=\"kui-catalog__status\">{status}</div> : <></>}\n <Toolbar\n label={`${name} resources`}\n dividerSides=\"\"\n leading={\n resources.length > 0 ? (\n <nav\n class=\"kui-catalog__resources\"\n aria-label={`${name} resources`}\n >\n <ToolbarControlGroup\n className=\"kui-catalog__resource-group\"\n label={`${name} resources`}\n >\n {resources.map((resource) => (\n <a\n class=\"kui-catalog__resource\"\n href={resource.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={`${name}: ${resource.label} (opens in new tab)`}\n >\n <LucideIcon\n icon={ExternalLink}\n name=\"external-link\"\n />\n <span>{resource.label}</span>\n {resource.detail ? (\n <code>{resource.detail}</code>\n ) : (\n <></>\n )}\n </a>\n ))}\n </ToolbarControlGroup>\n </nav>\n ) : (\n <></>\n )\n }\n trailing={\n related.length > 0 ? (\n <div class=\"kui-catalog__related\" data-catalog-related>\n <ToolbarControlGroup\n single\n className=\"kui-catalog__related-group\"\n label=\"Related entries\"\n >\n <wa-dropdown\n class=\"kui-catalog__related-menu\"\n placement=\"top-end\"\n data-key={`kui-catalog-related-${active}`}\n data-morph-skip-children\n >\n <wa-button slot=\"trigger\" appearance=\"plain\" with-caret>\n <span class=\"kui-catalog__related-trigger\">\n <LucideIcon icon={Waypoints} name=\"waypoints\" />\n <span class=\"kui-catalog__related-label\">\n Components\n </span>\n </span>\n </wa-button>\n {relatedMenuItems(related, selectAction)}\n </wa-dropdown>\n </ToolbarControlGroup>\n </div>\n ) : (\n <></>\n )\n }\n />\n </>\n }\n >\n <div class=\"kui-catalog__canvas\">\n {content}\n {geometryOverlay !== undefined ? (\n <div\n class=\"kui-catalog__geometry-overlay\"\n data-catalog-geometry-overlay\n data-morph-skip-children\n aria-hidden=\"true\"\n />\n ) : (\n <></>\n )}\n </div>\n </Pane>\n </main>\n );\n}\n\n/**\n * How a {@link CatalogExample}'s content aligns its visible left edge with the\n * example's `ListHeader` label (which sits 16px in — 8px title + 8px label):\n * - `'glyph'` — a bare glyph/text specimen with no inline geometry insets the full 16px.\n * - `'inline-control'` — a control that already carries ~8px of its own inline padding insets 8px so its content lands on the same line.\n * - `'none'` — a content-item / composition that owns its geometry and already aligns; no inset (default).\n */\nexport type CatalogExampleAlign = 'glyph' | 'inline-control' | 'none';\n\nconst catalogExampleProtectedAttributes = new Set([\n 'data-catalog-example',\n 'data-catalog-example-stack',\n 'data-catalog-example-label',\n 'data-catalog-example-note',\n 'data-align',\n]);\n\ntype CatalogExampleRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\ntype CatalogExampleStackRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-catalog-example'?: never;\n 'data-catalog-example-stack'?: never;\n 'data-catalog-example-label'?: never;\n 'data-catalog-example-note'?: never;\n 'data-align'?: never;\n }\n>;\n\nexport interface CatalogExampleProps {\n /** The example's label, shown as a `ListHeader` above the specimen. Omit for a bare specimen. */\n label?: string;\n /** Optional explanatory note between the label and the specimen. */\n note?: SafeHtml | string;\n /** Alignment inset for the specimen — see {@link CatalogExampleAlign}. Default `'none'`. */\n align?: CatalogExampleAlign;\n /** Safe authoring `data-*` metadata for the rendered section. Helper-owned structural attributes remain protected. */\n rootAttributes?: CatalogExampleRootAttributes;\n className?: string;\n children?: KerfUiContent;\n}\n\n/**\n * One labeled example in a catalog preview: a `ListHeader` label, an optional\n * note, and the specimen. `align` insets the specimen so its visible left edge\n * lines up with the label text, encoding the catalog's alignment rules as a\n * first-class prop instead of per-demo CSS. The inset is published as the\n * `--kui-catalog-example-align` custom property so a debug overlay can exclude it\n * from a specimen's measured margin.\n */\nexport function CatalogExample({\n label,\n note,\n align = 'none',\n rootAttributes = {},\n className = '',\n children,\n}: CatalogExampleProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n catalogExampleProtectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example ${className}`.trim()}\n data-catalog-example\n data-align={align}\n >\n {label !== undefined ? (\n <ListHeader\n label={label}\n rootAttributes={{ 'data-catalog-example-label': '' }}\n />\n ) : (\n <></>\n )}\n {note !== undefined ? (\n <Text\n variant=\"p\"\n class=\"kui-catalog-example__note\"\n data-catalog-example-note\n >\n {note}\n </Text>\n ) : (\n <></>\n )}\n {children}\n </section>\n );\n}\n\nexport interface CatalogExampleStackProps {\n /** Accessible label for the stack region. */\n label?: string;\n /** Safe authoring `data-*` metadata for the rendered stack. Helper-owned structural attributes remain protected. */\n rootAttributes?: CatalogExampleStackRootAttributes;\n className?: string;\n children?: KerfUiContent;\n}\n\n/**\n * A vertically-stacked group of {@link CatalogExample}s with the catalog's\n * example rhythm. The semantic `section` becomes a named `region` when `label`\n * is supplied; an unlabeled stack remains an ordinary grouping.\n */\nexport function CatalogExampleStack({\n label,\n rootAttributes = {},\n className = '',\n children,\n}: CatalogExampleStackProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n catalogExampleProtectedAttributes,\n );\n return (\n <section\n {...safeRootAttributes}\n class={`kui-catalog-example-stack ${className}`.trim()}\n data-catalog-example-stack\n aria-label={label}\n >\n {children}\n </section>\n );\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { Text } from './chunk-ZASJJMGV.js';
1
2
  import { filterDataAttributes, filterControlAttributes } from './chunk-SRSJO5QE.js';
2
3
  import { Skeleton } from './chunk-T7DOWS6T.js';
3
4
  import { em } from './chunk-OL4TC3U2.js';
@@ -106,7 +107,15 @@ function ListHeader({
106
107
  "aria-busy": busy,
107
108
  children: [
108
109
  /* @__PURE__ */ jsxs("div", { class: "kui-list-header__title", children: [
109
- /* @__PURE__ */ jsx("h2", { class: "kui-list-header__label", "aria-label": accessibleLabel, children: label }),
110
+ /* @__PURE__ */ jsx(
111
+ Text,
112
+ {
113
+ variant: "h2",
114
+ class: "kui-list-header__label",
115
+ "aria-label": accessibleLabel,
116
+ children: label
117
+ }
118
+ ),
110
119
  indicator
111
120
  ] }),
112
121
  action && /* @__PURE__ */ jsx(
@@ -129,4 +138,4 @@ function ListHeader({
129
138
 
130
139
  export { ListHeader };
131
140
 
132
- //# sourceMappingURL=chunk-5FJ53EOF.js.map
141
+ //# sourceMappingURL=chunk-DEYOGDE7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/list-header.tsx"],"names":[],"mappings":";;;;;;;AAWA,IAAM,8BAAA,uBAAqC,GAAA,CAAI;AAAA,EAC7C,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAC,CAAA;AACD,IAAM,iCAAA,mBAAoC,IAAI,GAAA,CAAI,CAAC,aAAa,CAAC,CAAA;AAgF1D,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,GAAU,UAAA;AAAA,EACV,OAAA,GAAU,MAAA;AAAA,EACV,MAAA,GAAS,KAAA;AAAA,EACT,aAAA,GAAgB,SAAA;AAAA,EAChB,MAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,cAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA,GAAS,KAAA;AAAA,EACT,WAAA,GAAc,KAAA;AAAA,EACd,iBAAiB,EAAC;AAAA,EAClB,oBAAoB;AACtB,CAAA,EAAoB;AAClB,EAAA,MAAM,uBAAA,GAA0B,oBAAA;AAAA,IAC9B,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,0BAAA,GAA6B,uBAAA;AAAA,IACjC,iBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,eAAA,GACJ,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,cAAc,KAAK,CAAA,IAAK,KAAA,IAAS,CAAA,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aAAa,CAAC,CAAA;AAAA,MAC7C,gBAAA,EAAgB,MAAA,CAAO,eAAA,KAAoB,MAAS,CAAA;AAAA,MACpD,cAAA,EAAc,OAAA;AAAA,MACd,cAAA,EAAc,OAAA;AAAA,MACd,aAAA,EAAa,OAAO,MAAM,CAAA;AAAA,MAC1B,qBAAA,EAAqB,aAAA;AAAA,MACrB,aAAA,EAAY,OAAA;AAAA,MACZ,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,WAAA,EAAW,IAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,OAAM,wBAAA,EACT,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,IAAA;AAAA,cACR,KAAA,EAAM,wBAAA;AAAA,cACN,YAAA,EAAY,eAAA;AAAA,cAEX,QAAA,EAAA;AAAA;AAAA,WACH;AAAA,UACC;AAAA,SAAA,EACH,CAAA;AAAA,QACC,MAAA,oBACC,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACE,GAAG,0BAAA;AAAA,YACJ,IAAA,EAAK,QAAA;AAAA,YACL,KAAA,EAAM,yBAAA;AAAA,YACN,aAAA,EAAa,cAAc,MAAA,GAAY,MAAA;AAAA,YACvC,YAAA,EAAY,WAAA;AAAA,YACZ,KAAA,EAAO,iBAAiB,cAAA,GAAiB,WAAA;AAAA,YACzC,QAAA,EAAU,kBAAkB,WAAA,IAAe,MAAA;AAAA,YAE1C,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-DEYOGDE7.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { em } from './css-values.js';\nimport { DisclosureArrow } from './disclosure-arrow.js';\nimport {\n filterControlAttributes,\n filterDataAttributes,\n} from './extension-attributes.js';\nimport { Skeleton } from './skeleton.js';\nimport { Text } from './text.js';\n\nconst PROTECTED_ROOT_DATA_ATTRIBUTES = new Set([\n 'data-component',\n 'data-action',\n 'data-has-badge',\n 'data-has-count',\n 'data-density',\n 'data-divider',\n 'data-inline',\n 'data-indicator-tone',\n 'data-toggle',\n]);\nconst PROTECTED_TRIGGER_DATA_ATTRIBUTES = new Set(['data-action']);\n\ntype ListHeaderRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-action'?: never;\n 'data-has-badge'?: never;\n 'data-has-count'?: never;\n 'data-density'?: never;\n 'data-divider'?: never;\n 'data-inline'?: never;\n 'data-indicator-tone'?: never;\n 'data-toggle'?: never;\n }\n>;\n\ntype ListHeaderTriggerAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-action'?: never;\n popoverTarget?: string;\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n 'aria-controls'?: string;\n 'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';\n }\n>;\n\ninterface ListHeaderBaseProps {\n label: string;\n density?: 'standard' | 'compact';\n divider?: 'none' | 'before' | 'after' | 'both';\n /** Shrink-wrap the header without its default outer margin, border, or padding. */\n inline?: boolean;\n indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';\n /** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */\n placeholder?: boolean;\n rootAttributes?: ListHeaderRootAttributes;\n triggerAttributes?: ListHeaderTriggerAttributes;\n}\n\ntype ListHeaderModeProps =\n | {\n /** Render the title as a controlled disclosure trigger. */\n toggle: true;\n action: string;\n expanded: boolean;\n actionIcon?: SafeHtml;\n actionLabel?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a separately named trailing action. */\n toggle?: false;\n action: string;\n actionLabel: string;\n actionIcon: SafeHtml;\n expanded?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a passive section heading. */\n toggle?: false;\n action?: never;\n actionLabel?: never;\n actionIcon?: never;\n expanded?: never;\n actionDisabled?: never;\n disabledReason?: never;\n };\n\ntype ListHeaderIndicatorProps =\n | { count: number; countLabel: string; badge?: never; status?: never }\n | { count?: never; countLabel?: never; badge: SafeHtml; status?: never }\n | { count?: never; countLabel?: never; badge?: never; status?: SafeHtml };\n\nexport type ListHeaderProps = ListHeaderBaseProps &\n ListHeaderIndicatorProps &\n ListHeaderModeProps;\n\nexport function ListHeader({\n label,\n count,\n countLabel,\n badge,\n status,\n density = 'standard',\n divider = 'none',\n inline = false,\n indicatorTone = 'neutral',\n action,\n actionLabel,\n actionIcon,\n actionDisabled = false,\n disabledReason,\n expanded,\n toggle = false,\n placeholder = false,\n rootAttributes = {},\n triggerAttributes = {},\n}: ListHeaderProps) {\n const extensionRootAttributes = filterDataAttributes(\n rootAttributes,\n PROTECTED_ROOT_DATA_ATTRIBUTES,\n );\n const extensionTriggerAttributes = filterControlAttributes(\n triggerAttributes,\n PROTECTED_TRIGGER_DATA_ATTRIBUTES,\n );\n const normalizedCount =\n typeof count === 'number' && Number.isSafeInteger(count) && count >= 0\n ? count\n : undefined;\n const normalizedCountLabel =\n normalizedCount === undefined\n ? undefined\n : typeof countLabel === 'string' && countLabel.trim()\n ? countLabel\n : String(normalizedCount);\n const renderedBadge =\n normalizedCount === undefined ? (status ?? badge) : undefined;\n const renderedActionIcon =\n actionIcon ??\n (toggle ? <DisclosureArrow open={Boolean(expanded)} /> : undefined);\n const accessibleLabel =\n normalizedCount === undefined\n ? undefined\n : `${label}, ${normalizedCountLabel}`;\n const indicator = placeholder ? (\n (normalizedCount !== undefined || renderedBadge) && (\n <span class=\"kui-list-header__badge\">\n <Skeleton width={em(1.75)} />\n </span>\n )\n ) : normalizedCount === undefined ? (\n renderedBadge && <span class=\"kui-list-header__badge\">{renderedBadge}</span>\n ) : (\n <span class=\"kui-list-header__count\" aria-hidden=\"true\">\n {normalizedCount}\n </span>\n );\n const busy = placeholder ? ('true' as const) : undefined;\n if (toggle) {\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"true\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__title kui-list-header__toggle\"\n data-action={placeholder ? undefined : action}\n title={actionDisabled ? disabledReason : undefined}\n disabled={actionDisabled || placeholder || undefined}\n aria-label={accessibleLabel}\n aria-expanded={String(Boolean(expanded))}\n >\n <span class=\"kui-list-header__label\">{label}</span>\n {indicator}\n {renderedActionIcon && (\n <span class=\"kui-list-header__action-layer\">\n {renderedActionIcon}\n </span>\n )}\n </button>\n </header>\n );\n }\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"false\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <div class=\"kui-list-header__title\">\n <Text\n variant=\"h2\"\n class=\"kui-list-header__label\"\n aria-label={accessibleLabel}\n >\n {label}\n </Text>\n {indicator}\n </div>\n {action && (\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__action\"\n data-action={placeholder ? undefined : action}\n aria-label={actionLabel}\n title={actionDisabled ? disabledReason : actionLabel}\n disabled={actionDisabled || placeholder || undefined}\n >\n {renderedActionIcon}\n </button>\n )}\n </header>\n );\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { jsx } from 'kerfjs/jsx-runtime';
2
+
3
+ // src/text.tsx
4
+ function Text({
5
+ variant: Variant,
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-ZASJJMGV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/text.tsx"],"names":[],"mappings":";;;AAwBO,SAAS,IAAA,CAAK;AAAA,EACnB,OAAA,EAAS,OAAA;AAAA,EACT,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-ZASJJMGV.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. */\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,\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"]}
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export { StateBanner, StateBannerProps, StateBannerTone, StateBannerUrgency } fr
23
23
  export { SunkenPanel, SunkenPanelProps, SunkenPanelShape } from './sunken-panel.js';
24
24
  export { DialogSurface, DialogSurfacePresentation, DialogSurfaceProps, DialogSurfaceSize, PopupSurface, PopupSurfaceInset, PopupSurfaceProps, SurfaceInset } from './surface-scaffold.js';
25
25
  export { TabActivation, TabBar, TabBarAllocation, TabBarPresentation, TabBarProps, TabBarTrailingPlacement } from './tab-bar.js';
26
+ export { Text, TextContent, TextProps, TextVariant } from './text.js';
26
27
  export { TokenSearchEditorAttributes, TokenSearchField, TokenSearchFieldProps, TokenSearchFieldValue, TokenSearchToken, placeTokenSearchCaret, readTokenSearchField } from './token-search-field.js';
27
28
  export { Toolbar, ToolbarProps } from './toolbar.js';
28
29
  export { ToolbarControlGroup, ToolbarControlGroupAppearance, ToolbarControlGroupButtonAppearance, ToolbarControlGroupContent, ToolbarControlGroupDensity, ToolbarControlGroupProps, ToolbarControlGroupSelectedChrome, ToolbarControlGroupSelectedTone, ToolbarControlGroupShape, ToolbarControlGroupSize, ToolbarControlGroupTone } from './toolbar-control-group.js';
@@ -35,3 +36,4 @@ export { D as DividerSides, S as Sides } from './divider-sides-BzB6rphT.js';
35
36
  export { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-CF8NLj7i.js';
36
37
  import 'kerfjs';
37
38
  import 'lucide';
39
+ import 'kerfjs/jsx-runtime';
package/dist/index.js CHANGED
@@ -21,7 +21,8 @@ export { AppTab } from './chunk-OMSRSL3B.js';
21
21
  export { ToolbarControlGroup } from './chunk-B6JYRX3P.js';
22
22
  export { Toolbar } from './chunk-VXFGMDA7.js';
23
23
  export { Pane } from './chunk-I4V3UDSA.js';
24
- export { ListHeader } from './chunk-5FJ53EOF.js';
24
+ export { ListHeader } from './chunk-DEYOGDE7.js';
25
+ export { Text } from './chunk-ZASJJMGV.js';
25
26
  export { ListItem } from './chunk-I45QO2IZ.js';
26
27
  export { List } from './chunk-C34NZOLJ.js';
27
28
 
@@ -1,4 +1,5 @@
1
- export { ListHeader } from './chunk-5FJ53EOF.js';
1
+ export { ListHeader } from './chunk-DEYOGDE7.js';
2
+
2
3
 
3
4
 
4
5
 
@@ -11,16 +11,11 @@
11
11
  min-width: 0;
12
12
  min-height: 2.75rem;
13
13
  margin-inline: var(--kui-layout-inline-margin, 0.5rem);
14
- padding: calc(var(--kui-layout-item-padding, 0.5rem) + 1px);
15
14
  box-sizing: border-box;
16
15
  color: var(--kui-list-header-color);
17
16
  background: transparent;
18
17
  align-items: stretch;
19
18
  gap: var(--kui-layout-item-gap, 0.5rem);
20
-
21
- &:has(.kui-list-header__action) {
22
- padding-inline-end: 0;
23
- }
24
19
  }
25
20
 
26
21
  .kui-list-header[data-density="compact"],
@@ -183,6 +178,7 @@
183
178
  }
184
179
 
185
180
  .kui-list-header__toggle {
181
+ padding: var(--kui-layout-item-padding, 0.5rem);
186
182
  appearance: none;
187
183
  width: 100%;
188
184
  cursor: pointer;
@@ -6,6 +6,7 @@
6
6
  @import "./toolbar-control-group.css";
7
7
  @import "./surface-scaffold.css";
8
8
  @import "./toolbar-text.css";
9
+ @import "./text.css";
9
10
  @import "./list.css";
10
11
  @import "./row.css";
11
12
  @import "./spacer.css";
@@ -0,0 +1,5 @@
1
+ .kui-text {
2
+ padding: var(--kui-layout-item-padding, 0.5rem);
3
+ box-sizing: border-box;
4
+ border: 1px solid transparent;
5
+ }
package/dist/text.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import * as kerfjs from 'kerfjs';
2
+ import { KerfBaseAttrs } from 'kerfjs/jsx-runtime';
3
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
4
+
5
+ type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
6
+ type TextContent = KerfUiContent | string | number | readonly TextContent[];
7
+ type TextProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> & {
8
+ /** Native heading or paragraph element to render. */
9
+ variant: TextVariant;
10
+ children: TextContent;
11
+ class?: string;
12
+ className?: string;
13
+ };
14
+ /**
15
+ * Semantic heading or paragraph text with the standard content-item padding.
16
+ * All ordinary native heading/paragraph attributes pass through to the element.
17
+ */
18
+ declare function Text({ variant: Variant, children, class: classValue, className, ...attributes }: TextProps): kerfjs.SafeHtml;
19
+
20
+ export { Text, type TextContent, type TextProps, type TextVariant };
package/dist/text.js ADDED
@@ -0,0 +1,3 @@
1
+ export { Text } from './chunk-ZASJJMGV.js';
2
+
3
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"text.js"}
@@ -97,6 +97,11 @@ The application owns persistence and collapsed/expanded policy. Keep the last ex
97
97
 
98
98
  ## Toolbar headings
99
99
 
100
+ For headings and paragraphs outside toolbar identity/title zones, use `Text`.
101
+ It renders the selected native `h1`–`h6` or `p` element, so heading navigation
102
+ follows the variant directly; choose a level that preserves the document
103
+ outline. Native global, `data-*`, and `aria-*` attributes pass through.
104
+
100
105
  Compose panel, dialog, and page headings as a plain `Toolbar`. Its leading zone
101
106
  holds an optional icon `ToolbarControlGroup` and a direct extra-large
102
107
  `ToolbarText`; controls belong in a trailing `ToolbarControlGroup`. By default
@@ -124,6 +124,7 @@ an upstream component or recipe request.
124
124
  | Toolbar control cluster — `ToolbarControlGroup` | Related toolbar controls need contained/borderless chrome, compact/tight geometry, icon/text/mixed/avatar anatomy, selected treatment, or nested dropdown sizing. | Do not use it merely to align unrelated buttons; use Toolbar's named `SafeHtml` prop slots or ordinary layout. Web Awesome `wa-button-group` is only for an exceptional grouped-action contract. | Delegate child actions; declare typed content and appearance instead of overriding descendants or `::part(base)`; use `avatarImage` instead of inserting an `img` (single groups paint the outer group; multi-button groups paint the pressed highlight); use `SegmentedControl` for an exclusive choice. | Actions, pressed/expanded state, content, and policy. | `@kerfjs/ui/toolbar-control-group` | [Component ownership](./component-contract.md#ownership-boundaries) |
125
125
  | Floating controls over content — `FloatingToolbar` | A small cluster of controls (e.g. a drawer restore) must float over scrolling content — distinct and forced-dark — inside a positioned container. | Do not use it for a primary page or panel toolbar (use `Toolbar`), or for anything that must sit above dialogs/overlays — it is not top-layer. | Compose `ToolbarControlGroup`s and delegate their actions; the app owns visibility and position. | Controls, visibility, and position. | `@kerfjs/ui/floating-toolbar` | [Component subpaths](../README.md#component-subpaths) |
126
126
  | Toolbar identity text — `ToolbarText` | A toolbar needs extra-large (page/panel title), large, default, or compact textual identity. | Plain text is not a heading by default; when a title needs heading semantics pass `headingLevel`. | Optional `headingLevel` for `role="heading"` + `aria-level`. Defaults to one line, ellipsized when it does not fit; `wrap` flows onto multiple lines, `ellipsis` toggles the trailing …, and `maxLines` caps a wrap. | Text, heading level, overflow behavior, and responsive priority. | `@kerfjs/ui/toolbar-text` | [Toolbar composition](../README.md#component-subpaths) |
127
+ | Semantic heading or paragraph — `Text` | Ordinary application copy needs native `h1`–`h6` or `p` semantics plus the standard transparent border and content padding. | Do not choose heading levels for appearance alone. Use `ToolbarText` for toolbar identity/title content and `ListInsetText` when list-aligned prose needs full margin/border/padding geometry. | Choose the required `variant`; ordinary native global, `data-*`, and `aria-*` attributes pass through to the rendered element. | Copy, localization, semantic variant, and document heading hierarchy. | `@kerfjs/ui/text` | [Text](./layout.md#text) |
127
128
  | Vertical stack — `List` | Rows, sections, or arbitrary components need a consistent vertical stretch layout, optional standard/custom gap, flex growth, one vertical scroll owner, or edge dividers. | It is layout-only and does not provide `ul`/`ol` semantics. Do not nest scroll owners or use it when a horizontal layout is required. | Choose `gap`, `flex`, `scrollable`, and canonical `dividerSides` (`t`, `r`, `b`, `l` combinations in that order); bound the block size when scrolling. | Child semantics/content, containing height, and which optional layout behaviors apply. | `@kerfjs/ui/list` | [Pane geometry](../README.md#pane-and-content-geometry) |
128
129
  | 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. The rounded root clips overflowing descendants; set `multiline` when the primary label should wrap. | Routing, selection, permissions, copy, action handling, and domain `data-*` values. | `@kerfjs/ui/list-item` | [Pane geometry](../README.md#pane-and-content-geometry) |
129
130
  | 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) |
@@ -1,5 +1,6 @@
1
1
  import '@kerfjs/ui/layout.css';
2
2
 
3
+ import { Text } from '@kerfjs/ui/text';
3
4
  import { delegate, mount, signal } from 'kerfjs';
4
5
  import { delegateActions } from 'kerfjs/actions';
5
6
 
@@ -48,9 +49,9 @@ export function mountCommandPaletteAdapter(
48
49
  data-command-query
49
50
  />
50
51
  </div>
51
- <p class="kui-content-item" aria-live="polite">
52
+ <Text variant="p" class="kui-content-item" aria-live="polite">
52
53
  {matches.length} matching commands
53
- </p>
54
+ </Text>
54
55
  <ul class="kui-content-item" aria-label="Matching commands">
55
56
  {matches.map((command) => (
56
57
  <li>
package/docs/layout.md CHANGED
@@ -118,6 +118,24 @@ Use `rem`, `em`, `px`, `pct`, `lengthVar`, and `calc(plus(...))` only when a
118
118
  named spacing relationship does not express the requirement; do not pass raw
119
119
  CSS strings.
120
120
 
121
+ ## Text
122
+
123
+ Use `Text` from `@kerfjs/ui/text` for ordinary semantic headings and
124
+ paragraphs. Its required `variant` renders the corresponding native `h1`–`h6`
125
+ or `p` element, and ordinary global, `data-*`, and `aria-*` attributes pass
126
+ through. Every variant owns a 1px transparent border and the standard 8px item
127
+ padding; its native margin and typography remain available to the surrounding
128
+ composition. Choose heading levels from the document outline, not for visual
129
+ size. Toolbar identity and page-heading compositions continue to use
130
+ `ToolbarText`.
131
+
132
+ ```tsx
133
+ import { Text } from "@kerfjs/ui/text";
134
+
135
+ <Text variant="h2" id="details-title">Details</Text>;
136
+ <Text variant="p" aria-describedby="details-title">Supporting copy</Text>;
137
+ ```
138
+
121
139
  ## Spacer
122
140
 
123
141
  Use `Spacer` from `@kerfjs/ui/spacer` for one intentional empty dimension that
package/llms.txt CHANGED
@@ -158,6 +158,11 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
158
158
  in the leading zone, and actions in a trailing group. Supporting copy is
159
159
  app-owned content below. Do not create a private heading wrapper or restyle the
160
160
  toolbar.
161
+ - **Use `Text` for ordinary semantic headings and paragraphs outside toolbar
162
+ title zones.** Pass a required `h1`–`h6` or `p` variant based on document
163
+ meaning. It passes native attributes through and owns the standard transparent
164
+ border plus item padding; keep toolbar titles on `ToolbarText` and list-aligned
165
+ bare prose on `ListInsetText`.
161
166
  - **Space by the five-step scale, by relationship not by eye.** `0`
162
167
  `--kui-space-none`, `4px` `--kui-space-2xs`, `8px` `--kui-space-xs` (inside a
163
168
  group), `16px` `--kui-space-m`, `24px` `--kui-space-l` (between major differing
@@ -228,7 +233,7 @@ maintain a central style list. Configure JSX with `"jsxImportSource": "kerfjs"`.
228
233
 
229
234
  ## Public exports
230
235
 
231
- `LucideIcon`, `DisclosureArrow`, `Toolbar`, `ToolbarControlGroup`, `FloatingToolbar`, `ToolbarText`,
236
+ `LucideIcon`, `DisclosureArrow`, `Toolbar`, `ToolbarControlGroup`, `FloatingToolbar`, `ToolbarText`, `Text`,
232
237
  `ListItem`, `ListActionRow`, `ListHeader`, `ListInsetControl`,
233
238
  `ListInsetText`, `SegmentedControl`,
234
239
  `Select`, `TokenSearchField` (+ `readTokenSearchField`, `placeTokenSearchCaret`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerfjs/ui",
3
- "version": "5.0.0-beta.39",
3
+ "version": "5.0.0-beta.40",
4
4
  "description": "Accessible, composable UI primitives for kerf applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -83,6 +83,11 @@
83
83
  "browser": "./dist/browser/toolbar-text.js",
84
84
  "import": "./dist/toolbar-text.js"
85
85
  },
86
+ "./text": {
87
+ "types": "./dist/text.d.ts",
88
+ "browser": "./dist/browser/text.js",
89
+ "import": "./dist/text.js"
90
+ },
86
91
  "./list": {
87
92
  "types": "./dist/list.d.ts",
88
93
  "browser": "./dist/browser/list.js",
@@ -287,6 +292,7 @@
287
292
  "./surface-scaffold.css": "./dist/styles/surface-scaffold.css",
288
293
  "./floating-toolbar.css": "./dist/styles/floating-toolbar.css",
289
294
  "./toolbar-text.css": "./dist/styles/toolbar-text.css",
295
+ "./text.css": "./dist/styles/text.css",
290
296
  "./list.css": "./dist/styles/list.css",
291
297
  "./row.css": "./dist/styles/row.css",
292
298
  "./spacer.css": "./dist/styles/spacer.css",
@@ -5,6 +5,7 @@ import { ListHeader } from '@kerfjs/ui/list-header';
5
5
  import { ListItem } from '@kerfjs/ui/list-item';
6
6
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
7
7
  import { ResizableRegion } from '@kerfjs/ui/resizable-region';
8
+ import { Text } from '@kerfjs/ui/text';
8
9
  import { Toolbar } from '@kerfjs/ui/toolbar';
9
10
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
10
11
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -158,10 +159,10 @@ export const createRecipe: RecipeFactory = (announce) => {
158
159
  }
159
160
  />
160
161
  <div class="recipe-shell__main-body kui-pane__content kui-content">
161
- <p class="kui-recipe__ownership kui-content-item">
162
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
162
163
  Recipe owns pane geometry and one scroll owner per pane. The app
163
164
  owns routing, data, pane visibility, sizes, and persistence.
164
- </p>
165
+ </Text>
165
166
  <div class="recipe-shell__cards">
166
167
  {[
167
168
  'Release accessibility audit',
@@ -171,9 +172,9 @@ export const createRecipe: RecipeFactory = (announce) => {
171
172
  ].map((title) => (
172
173
  <article class="recipe-shell__card kui-content-item">
173
174
  <strong>{title}</strong>
174
- <p class="kui-recipe__muted">
175
+ <Text variant="p" class="kui-recipe__muted">
175
176
  Assigned to the interface systems team · due this week
176
- </p>
177
+ </Text>
177
178
  </article>
178
179
  ))}
179
180
  </div>
@@ -10,6 +10,7 @@ import { deviceClass } from '@kerfjs/ui/device-class';
10
10
  import { ListHeader } from '@kerfjs/ui/list-header';
11
11
  import { ListItem } from '@kerfjs/ui/list-item';
12
12
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
13
+ import { Text } from '@kerfjs/ui/text';
13
14
  import { Toolbar } from '@kerfjs/ui/toolbar';
14
15
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
15
16
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -146,17 +147,17 @@ export const createRecipe: RecipeFactory = (announce) => {
146
147
  }
147
148
  />
148
149
  <div class="recipe-collapsible-sidebar__body kui-pane__content kui-content">
149
- <p class="kui-recipe__ownership kui-content-item">
150
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
150
151
  The app owns each panel's <code>collapsed</code> signal, sizes, and
151
152
  content; <code>wireSidebar</code> owns the toggle, focus
152
153
  move/restore, the compact overlay, and persistence.
153
- </p>
154
+ </Text>
154
155
  <article class="recipe-collapsible-sidebar__card kui-content-item">
155
156
  <strong>Narrow the window to a compact width</strong>
156
- <p class="kui-recipe__muted">
157
+ <Text variant="p" class="kui-recipe__muted">
157
158
  The rail and drawer become a dismissable overlay: a backdrop,
158
159
  Escape, and a trapped Tab ring, all managed by the wire.
159
- </p>
160
+ </Text>
160
161
  </article>
161
162
  </div>
162
163
  </main>
@@ -5,6 +5,7 @@ import './recipes.css';
5
5
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
6
6
  import { SegmentedControl } from '@kerfjs/ui/segmented-control';
7
7
  import { Select } from '@kerfjs/ui/select';
8
+ import { Text } from '@kerfjs/ui/text';
8
9
  import { Toolbar } from '@kerfjs/ui/toolbar';
9
10
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
10
11
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -115,10 +116,10 @@ export const createRecipe: RecipeFactory = (announce) => {
115
116
  <span class="kui-recipe__muted">One independent command.</span>
116
117
  </div>
117
118
  </div>
118
- <p class="kui-recipe__ownership kui-content-item">
119
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
119
120
  The recipe owns control semantics and wrapping. The app owns values,
120
121
  actions, persistence, and responsive priority.
121
- </p>
122
+ </Text>
122
123
  </section>
123
124
  );
124
125
  return {
@@ -9,6 +9,7 @@ import './recipes.css';
9
9
  import { ListInsetText } from '@kerfjs/ui/list-inset-text';
10
10
  import { Select } from '@kerfjs/ui/select';
11
11
  import { StateBanner } from '@kerfjs/ui/state-banner';
12
+ import { Text } from '@kerfjs/ui/text';
12
13
  import { Toolbar } from '@kerfjs/ui/toolbar';
13
14
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
14
15
  import { signal } from 'kerfjs';
@@ -123,10 +124,10 @@ export const createRecipe: RecipeFactory = (announce) => {
123
124
  Publish update
124
125
  </wa-button>
125
126
  </div>
126
- <p class="kui-recipe__ownership">
127
+ <Text variant="p" class="kui-recipe__ownership">
127
128
  The recipe owns field, message, and action rhythm. The app owns
128
129
  validation rules, draft persistence, permissions, and transport.
129
- </p>
130
+ </Text>
130
131
  </footer>
131
132
  </form>
132
133
  );
@@ -7,6 +7,7 @@ import './recipes.css';
7
7
  import { ListHeader } from '@kerfjs/ui/list-header';
8
8
  import { ListItem } from '@kerfjs/ui/list-item';
9
9
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
10
+ import { Text } from '@kerfjs/ui/text';
10
11
  import { Toolbar } from '@kerfjs/ui/toolbar';
11
12
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
12
13
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -58,11 +59,11 @@ export const createRecipe: RecipeFactory = (announce) => {
58
59
  >
59
60
  Open project details
60
61
  </button>
61
- <p class="kui-recipe__ownership kui-content-item">
62
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
62
63
  Web Awesome owns modal focus and dismissal. The recipe owns
63
64
  header/body/list-detail anatomy; the app owns open state, selection, and
64
65
  policy.
65
- </p>
66
+ </Text>
66
67
  <wa-dialog
67
68
  class="recipe-dialog"
68
69
  label="Project details"
@@ -118,16 +119,23 @@ export const createRecipe: RecipeFactory = (announce) => {
118
119
  </ToolbarControlGroup>
119
120
  }
120
121
  />
121
- <p class="kui-recipe__heading-summary" id="recipe-dialog-summary">
122
+ <Text
123
+ variant="p"
124
+ class="kui-recipe__heading-summary"
125
+ id="recipe-dialog-summary"
126
+ >
122
127
  Compare delivery state without leaving the workspace.
123
- </p>
128
+ </Text>
124
129
  <div
125
130
  class="recipe-list-detail__body kui-pane__content kui-content"
126
131
  aria-live="polite"
127
132
  >
128
- <h3 class="recipe-list-detail__title kui-recipe__pane-title kui-content-item">
133
+ <Text
134
+ variant="h3"
135
+ class="recipe-list-detail__title kui-recipe__pane-title kui-content-item"
136
+ >
129
137
  {records[selected.value].name}
130
- </h3>
138
+ </Text>
131
139
  <ValueTable label="Project details">
132
140
  <ValueTableRow
133
141
  label="Owner"
@@ -4,6 +4,7 @@ import './recipes.css';
4
4
  import { EmptyState } from '@kerfjs/ui/empty-state';
5
5
  import { LoadingSpinner } from '@kerfjs/ui/loading-spinner';
6
6
  import { StateBanner } from '@kerfjs/ui/state-banner';
7
+ import { Text } from '@kerfjs/ui/text';
7
8
  import { Toolbar } from '@kerfjs/ui/toolbar';
8
9
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
9
10
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -166,10 +167,10 @@ export const createRecipe: RecipeFactory = (announce) => {
166
167
  />
167
168
  <div class="recipe-list__body kui-pane__content kui-content">
168
169
  {renderBody()}
169
- <p class="kui-recipe__ownership kui-content-item">
170
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
170
171
  The recipe owns feedback placement and stable content. The app owns
171
172
  fetching, cache age, retry policy, and domain rows.
172
- </p>
173
+ </Text>
173
174
  </div>
174
175
  </section>
175
176
  );
@@ -9,6 +9,7 @@ import { SegmentedControl } from '@kerfjs/ui/segmented-control';
9
9
  import { Select } from '@kerfjs/ui/select';
10
10
  import { Skeleton } from '@kerfjs/ui/skeleton';
11
11
  import { StateBanner } from '@kerfjs/ui/state-banner';
12
+ import { Text } from '@kerfjs/ui/text';
12
13
  import { Toolbar } from '@kerfjs/ui/toolbar';
13
14
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
14
15
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -69,13 +70,17 @@ export const createRecipe: RecipeFactory = (announce) => {
69
70
  </ToolbarControlGroup>
70
71
  }
71
72
  />
72
- <p class="kui-recipe__heading-summary" id="recipe-inspector-summary">
73
+ <Text
74
+ variant="p"
75
+ class="kui-recipe__heading-summary"
76
+ id="recipe-inspector-summary"
77
+ >
73
78
  {p ? (
74
79
  <Skeleton width={em(18)} />
75
80
  ) : (
76
81
  'Restore keyboard focus after a dialog closes'
77
82
  )}
78
- </p>
83
+ </Text>
79
84
  <div class="recipe-inspector__body kui-pane__content kui-content">
80
85
  <section>
81
86
  <ValueTable label="Ticket details">
@@ -164,12 +169,12 @@ export const createRecipe: RecipeFactory = (announce) => {
164
169
  icon={icon(FileText, 'file-text')}
165
170
  />
166
171
  )}
167
- <p class="kui-recipe__ownership kui-content-item">
172
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
168
173
  Each value-bearing component's <code>placeholder</code> prop renders
169
174
  skeletons in its value slots while loading, so the recipe composes a
170
175
  faithful loading inspector from real chrome. The app owns the
171
176
  loading lifecycle and which values are still unknown.
172
- </p>
177
+ </Text>
173
178
  </div>
174
179
  </section>
175
180
  );
@@ -4,6 +4,7 @@ import './recipes.css';
4
4
  import { ListHeader } from '@kerfjs/ui/list-header';
5
5
  import { ListItem } from '@kerfjs/ui/list-item';
6
6
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
7
+ import { Text } from '@kerfjs/ui/text';
7
8
  import { Toolbar } from '@kerfjs/ui/toolbar';
8
9
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
9
10
  import { signal } from 'kerfjs';
@@ -77,17 +78,17 @@ export const createRecipe: RecipeFactory = (announce) => {
77
78
  />
78
79
  <div class="kui-content-item">
79
80
  <strong>Quarterly goal</strong>
80
- <p class="kui-recipe__muted">
81
+ <Text variant="p" class="kui-recipe__muted">
81
82
  Ship accessible navigation patterns to every workspace.
82
- </p>
83
+ </Text>
83
84
  </div>
84
85
  </>
85
86
  )}
86
87
  </section>
87
- <p class="kui-recipe__ownership kui-content-item">
88
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
88
89
  The recipe owns pane, content-item, and toolbar geometry. The app owns
89
90
  routes, permissions, labels, and disclosure state.
90
- </p>
91
+ </Text>
91
92
  </div>
92
93
  <footer class="recipe-sidebar__footer kui-pane__footer">
93
94
  <Toolbar
@@ -7,6 +7,7 @@ import { ListHeader } from '@kerfjs/ui/list-header';
7
7
  import { ListItem } from '@kerfjs/ui/list-item';
8
8
  import { LucideIcon } from '@kerfjs/ui/lucide-icon';
9
9
  import { NavStack, type NavStackView } from '@kerfjs/ui/nav-stack';
10
+ import { Text } from '@kerfjs/ui/text';
10
11
  import { signal } from 'kerfjs';
11
12
  import { ChevronRight, FileText, Folder } from 'lucide';
12
13
 
@@ -57,11 +58,11 @@ export const createRecipe: RecipeFactory = (announce) => {
57
58
  />
58
59
  ))}
59
60
  </section>
60
- <p class="kui-recipe__ownership kui-content-item">
61
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
61
62
  The recipe owns the stack as a signal of views and pushes/pops it;
62
63
  `NavStack` renders the stack and `wireNavStack` slides the content and
63
64
  settles the chrome. The app owns selection, data, and routing.
64
- </p>
65
+ </Text>
65
66
  </div>
66
67
  ),
67
68
  });
@@ -74,7 +75,9 @@ export const createRecipe: RecipeFactory = (announce) => {
74
75
  <div class="kui-content-item">
75
76
  <LucideIcon icon={FileText} name="file-text" />
76
77
  <strong>{item.label}</strong>
77
- <p class="kui-recipe__muted">{item.detail}</p>
78
+ <Text variant="p" class="kui-recipe__muted">
79
+ {item.detail}
80
+ </Text>
78
81
  </div>
79
82
  </div>
80
83
  ),
@@ -2,6 +2,7 @@ import '@kerfjs/ui/layout.css';
2
2
  import './recipes.css';
3
3
 
4
4
  import { StateBanner } from '@kerfjs/ui/state-banner';
5
+ import { Text } from '@kerfjs/ui/text';
5
6
  import { Toolbar } from '@kerfjs/ui/toolbar';
6
7
  import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
7
8
  import { ToolbarText } from '@kerfjs/ui/toolbar-text';
@@ -14,11 +15,14 @@ export const createRecipe: RecipeFactory = (announce) => ({
14
15
  class="kui-recipe recipe-header kui-recipe__surface kui-content"
15
16
  data-recipe="recipe-workspace-header"
16
17
  >
17
- <p class="recipe-header__context kui-inline-metadata kui-content-item">
18
+ <Text
19
+ variant="p"
20
+ class="recipe-header__context kui-inline-metadata kui-content-item"
21
+ >
18
22
  <span>Northstar workspace</span>
19
23
  <span>·</span>
20
24
  <span>Product planning</span>
21
- </p>
25
+ </Text>
22
26
  <Toolbar
23
27
  label="Workspace heading"
24
28
  dividerSides=""
@@ -65,10 +69,10 @@ export const createRecipe: RecipeFactory = (announce) => ({
65
69
  detail="All required checks passed 18 minutes ago."
66
70
  tone="success"
67
71
  />
68
- <p class="kui-recipe__ownership kui-content-item">
72
+ <Text variant="p" class="kui-recipe__ownership kui-content-item">
69
73
  The recipe owns page hierarchy and action relocation. The app owns
70
74
  authorization, command behavior, breadcrumbs, and product copy.
71
- </p>
75
+ </Text>
72
76
  </section>
73
77
  ),
74
78
  action(command) {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/list-header.tsx"],"names":[],"mappings":";;;;;;AAUA,IAAM,8BAAA,uBAAqC,GAAA,CAAI;AAAA,EAC7C,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAC,CAAA;AACD,IAAM,iCAAA,mBAAoC,IAAI,GAAA,CAAI,CAAC,aAAa,CAAC,CAAA;AAgF1D,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,GAAU,UAAA;AAAA,EACV,OAAA,GAAU,MAAA;AAAA,EACV,MAAA,GAAS,KAAA;AAAA,EACT,aAAA,GAAgB,SAAA;AAAA,EAChB,MAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,cAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA,GAAS,KAAA;AAAA,EACT,WAAA,GAAc,KAAA;AAAA,EACd,iBAAiB,EAAC;AAAA,EAClB,oBAAoB;AACtB,CAAA,EAAoB;AAClB,EAAA,MAAM,uBAAA,GAA0B,oBAAA;AAAA,IAC9B,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,0BAAA,GAA6B,uBAAA;AAAA,IACjC,iBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,eAAA,GACJ,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,cAAc,KAAK,CAAA,IAAK,KAAA,IAAS,CAAA,GACjE,KAAA,GACA,MAAA;AACN,EAAA,MAAM,oBAAA,GACJ,eAAA,KAAoB,MAAA,GAChB,MAAA,GACA,OAAO,UAAA,KAAe,QAAA,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AAAA,MACd,cAAA,EAAc,OAAA;AAAA,MACd,aAAA,EAAa,OAAO,MAAM,CAAA;AAAA,MAC1B,qBAAA,EAAqB,aAAA;AAAA,MACrB,aAAA,EAAY,OAAA;AAAA,MACZ,kBAAA,EAAkB,cAAc,MAAA,GAAS,MAAA;AAAA,MACzC,WAAA,EAAW,IAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,OAAM,wBAAA,EACT,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAM,wBAAA,EAAyB,YAAA,EAAY,iBAC5C,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,UACC;AAAA,SAAA,EACH,CAAA;AAAA,QACC,MAAA,oBACC,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACE,GAAG,0BAAA;AAAA,YACJ,IAAA,EAAK,QAAA;AAAA,YACL,KAAA,EAAM,yBAAA;AAAA,YACN,aAAA,EAAa,cAAc,MAAA,GAAY,MAAA;AAAA,YACvC,YAAA,EAAY,WAAA;AAAA,YACZ,KAAA,EAAO,iBAAiB,cAAA,GAAiB,WAAA;AAAA,YACzC,QAAA,EAAU,kBAAkB,WAAA,IAAe,MAAA;AAAA,YAE1C,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-5FJ53EOF.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { em } from './css-values.js';\nimport { DisclosureArrow } from './disclosure-arrow.js';\nimport {\n filterControlAttributes,\n filterDataAttributes,\n} from './extension-attributes.js';\nimport { Skeleton } from './skeleton.js';\n\nconst PROTECTED_ROOT_DATA_ATTRIBUTES = new Set([\n 'data-component',\n 'data-action',\n 'data-has-badge',\n 'data-has-count',\n 'data-density',\n 'data-divider',\n 'data-inline',\n 'data-indicator-tone',\n 'data-toggle',\n]);\nconst PROTECTED_TRIGGER_DATA_ATTRIBUTES = new Set(['data-action']);\n\ntype ListHeaderRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-action'?: never;\n 'data-has-badge'?: never;\n 'data-has-count'?: never;\n 'data-density'?: never;\n 'data-divider'?: never;\n 'data-inline'?: never;\n 'data-indicator-tone'?: never;\n 'data-toggle'?: never;\n }\n>;\n\ntype ListHeaderTriggerAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-action'?: never;\n popoverTarget?: string;\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n 'aria-controls'?: string;\n 'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';\n }\n>;\n\ninterface ListHeaderBaseProps {\n label: string;\n density?: 'standard' | 'compact';\n divider?: 'none' | 'before' | 'after' | 'both';\n /** Shrink-wrap the header without its default outer margin, border, or padding. */\n inline?: boolean;\n indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';\n /** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */\n placeholder?: boolean;\n rootAttributes?: ListHeaderRootAttributes;\n triggerAttributes?: ListHeaderTriggerAttributes;\n}\n\ntype ListHeaderModeProps =\n | {\n /** Render the title as a controlled disclosure trigger. */\n toggle: true;\n action: string;\n expanded: boolean;\n actionIcon?: SafeHtml;\n actionLabel?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a separately named trailing action. */\n toggle?: false;\n action: string;\n actionLabel: string;\n actionIcon: SafeHtml;\n expanded?: never;\n actionDisabled?: boolean;\n disabledReason?: string;\n }\n | {\n /** Render a passive section heading. */\n toggle?: false;\n action?: never;\n actionLabel?: never;\n actionIcon?: never;\n expanded?: never;\n actionDisabled?: never;\n disabledReason?: never;\n };\n\ntype ListHeaderIndicatorProps =\n | { count: number; countLabel: string; badge?: never; status?: never }\n | { count?: never; countLabel?: never; badge: SafeHtml; status?: never }\n | { count?: never; countLabel?: never; badge?: never; status?: SafeHtml };\n\nexport type ListHeaderProps = ListHeaderBaseProps &\n ListHeaderIndicatorProps &\n ListHeaderModeProps;\n\nexport function ListHeader({\n label,\n count,\n countLabel,\n badge,\n status,\n density = 'standard',\n divider = 'none',\n inline = false,\n indicatorTone = 'neutral',\n action,\n actionLabel,\n actionIcon,\n actionDisabled = false,\n disabledReason,\n expanded,\n toggle = false,\n placeholder = false,\n rootAttributes = {},\n triggerAttributes = {},\n}: ListHeaderProps) {\n const extensionRootAttributes = filterDataAttributes(\n rootAttributes,\n PROTECTED_ROOT_DATA_ATTRIBUTES,\n );\n const extensionTriggerAttributes = filterControlAttributes(\n triggerAttributes,\n PROTECTED_TRIGGER_DATA_ATTRIBUTES,\n );\n const normalizedCount =\n typeof count === 'number' && Number.isSafeInteger(count) && count >= 0\n ? count\n : undefined;\n const normalizedCountLabel =\n normalizedCount === undefined\n ? undefined\n : typeof countLabel === 'string' && countLabel.trim()\n ? countLabel\n : String(normalizedCount);\n const renderedBadge =\n normalizedCount === undefined ? (status ?? badge) : undefined;\n const renderedActionIcon =\n actionIcon ??\n (toggle ? <DisclosureArrow open={Boolean(expanded)} /> : undefined);\n const accessibleLabel =\n normalizedCount === undefined\n ? undefined\n : `${label}, ${normalizedCountLabel}`;\n const indicator = placeholder ? (\n (normalizedCount !== undefined || renderedBadge) && (\n <span class=\"kui-list-header__badge\">\n <Skeleton width={em(1.75)} />\n </span>\n )\n ) : normalizedCount === undefined ? (\n renderedBadge && <span class=\"kui-list-header__badge\">{renderedBadge}</span>\n ) : (\n <span class=\"kui-list-header__count\" aria-hidden=\"true\">\n {normalizedCount}\n </span>\n );\n const busy = placeholder ? ('true' as const) : undefined;\n if (toggle) {\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"true\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__title kui-list-header__toggle\"\n data-action={placeholder ? undefined : action}\n title={actionDisabled ? disabledReason : undefined}\n disabled={actionDisabled || placeholder || undefined}\n aria-label={accessibleLabel}\n aria-expanded={String(Boolean(expanded))}\n >\n <span class=\"kui-list-header__label\">{label}</span>\n {indicator}\n {renderedActionIcon && (\n <span class=\"kui-list-header__action-layer\">\n {renderedActionIcon}\n </span>\n )}\n </button>\n </header>\n );\n }\n return (\n <header\n {...extensionRootAttributes}\n class=\"kui-list-header\"\n data-component=\"list-header\"\n data-has-badge={String(Boolean(renderedBadge))}\n data-has-count={String(normalizedCount !== undefined)}\n data-density={density}\n data-divider={divider}\n data-inline={String(inline)}\n data-indicator-tone={indicatorTone}\n data-toggle=\"false\"\n data-placeholder={placeholder ? 'true' : undefined}\n aria-busy={busy}\n >\n <div class=\"kui-list-header__title\">\n <h2 class=\"kui-list-header__label\" aria-label={accessibleLabel}>\n {label}\n </h2>\n {indicator}\n </div>\n {action && (\n <button\n {...extensionTriggerAttributes}\n type=\"button\"\n class=\"kui-list-header__action\"\n data-action={placeholder ? undefined : action}\n aria-label={actionLabel}\n title={actionDisabled ? disabledReason : actionLabel}\n disabled={actionDisabled || placeholder || undefined}\n >\n {renderedActionIcon}\n </button>\n )}\n </header>\n );\n}\n"]}