@kerfjs/ui 5.0.0-beta.8 → 5.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +546 -139
- package/ai/application-ui-diagnostic-ids-v1.json +113 -0
- package/ai/application-ui-profile-sync.cjs +548 -0
- package/ai/application-ui-profile.d.mts +1 -0
- package/ai/application-ui-profile.d.ts +106 -0
- package/ai/application-ui-profile.defaults.json +96 -0
- package/ai/application-ui-profile.mjs +653 -0
- package/ai/application-ui-profile.schema.json +140 -0
- package/ai/catalog-authoring.json +36 -0
- package/ai/catalog-authoring.schema.json +109 -0
- package/ai/compile-time-contracts-v1.json +149 -0
- package/ai/compile-time-contracts-v1.schema.json +52 -0
- package/ai/component-catalog-extension.schema.json +104 -0
- package/ai/component-catalog.json +4280 -457
- package/ai/component-catalog.schema.json +94 -1
- package/ai/component-class-owners.cjs +83 -0
- package/ai/component-composition-extension.d.ts +7 -0
- package/ai/component-composition-extension.schema.json +7 -0
- package/ai/component-composition-rules.json +516 -0
- package/ai/component-composition.d.ts +129 -0
- package/ai/component-composition.json +7397 -0
- package/ai/component-composition.schema.json +408 -0
- package/ai/components/README.md +171 -0
- package/ai/components/application-tabs.md +65 -0
- package/ai/components/badge.md +72 -0
- package/ai/components/chip.md +72 -0
- package/ai/components/collapsible-panel.md +102 -0
- package/ai/components/content-item.md +96 -0
- package/ai/components/disclosure-arrow.md +77 -0
- package/ai/components/document-baseline.md +75 -0
- package/ai/components/empty-state.md +80 -0
- package/ai/components/feedback.md +71 -0
- package/ai/components/floating-toolbar.md +82 -0
- package/ai/components/foundation.md +65 -0
- package/ai/components/grid.md +100 -0
- package/ai/components/headers.md +63 -0
- package/ai/components/layout.md +75 -0
- package/ai/components/list-action-row.md +91 -0
- package/ai/components/list-header.md +91 -0
- package/ai/components/list-inset-control.md +74 -0
- package/ai/components/list-inset-text.md +72 -0
- package/ai/components/list-item.md +94 -0
- package/ai/components/list.md +106 -0
- package/ai/components/loading-spinner.md +73 -0
- package/ai/components/lucide-icon.md +97 -0
- package/ai/components/nav-stack.md +105 -0
- package/ai/components/pane.md +104 -0
- package/ai/components/popup-menu.md +171 -0
- package/ai/components/recipe-app-shell.md +57 -0
- package/ai/components/recipe-collapsible-sidebar.md +57 -0
- package/ai/components/recipe-compact-toolbar.md +57 -0
- package/ai/components/recipe-composer-form.md +57 -0
- package/ai/components/recipe-list-detail-dialog.md +57 -0
- package/ai/components/recipe-list-workspace-states.md +57 -0
- package/ai/components/recipe-loading-inspector.md +57 -0
- package/ai/components/recipe-navigation-sidebar.md +57 -0
- package/ai/components/recipe-navigation-stack.md +57 -0
- package/ai/components/recipe-workspace-header.md +57 -0
- package/ai/components/resize.md +106 -0
- package/ai/components/row.md +96 -0
- package/ai/components/segmented-control.md +82 -0
- package/ai/components/select.md +115 -0
- package/ai/components/skeleton.md +84 -0
- package/ai/components/spacer.md +86 -0
- package/ai/components/split-view.md +103 -0
- package/ai/components/state-banner.md +94 -0
- package/ai/components/sunken-panel.md +79 -0
- package/ai/components/surface-scaffold.md +87 -0
- package/ai/components/tab-bar.md +113 -0
- package/ai/components/tab-navigator.md +95 -0
- package/ai/components/tabs.md +95 -0
- package/ai/components/text.md +87 -0
- package/ai/components/token-search-field.md +107 -0
- package/ai/components/toolbar-control-group.md +121 -0
- package/ai/components/toolbar-text.md +98 -0
- package/ai/components/toolbar.md +101 -0
- package/ai/components/value-table.md +73 -0
- package/ai/components/wa-accordion-item.md +55 -0
- package/ai/components/wa-accordion.md +65 -0
- package/ai/components/wa-animated-image.md +55 -0
- package/ai/components/wa-animation.md +55 -0
- package/ai/components/wa-avatar.md +55 -0
- package/ai/components/wa-badge.md +55 -0
- package/ai/components/wa-breadcrumb-item.md +53 -0
- package/ai/components/wa-breadcrumb.md +55 -0
- package/ai/components/wa-button-group.md +59 -0
- package/ai/components/wa-button.md +55 -0
- package/ai/components/wa-callout.md +58 -0
- package/ai/components/wa-card.md +59 -0
- package/ai/components/wa-carousel-item.md +53 -0
- package/ai/components/wa-carousel.md +55 -0
- package/ai/components/wa-checkbox-group.md +55 -0
- package/ai/components/wa-checkbox.md +55 -0
- package/ai/components/wa-color-picker.md +55 -0
- package/ai/components/wa-comparison.md +55 -0
- package/ai/components/wa-copy-button.md +55 -0
- package/ai/components/wa-details.md +61 -0
- package/ai/components/wa-dialog.md +59 -0
- package/ai/components/wa-divider.md +53 -0
- package/ai/components/wa-drawer.md +55 -0
- package/ai/components/wa-dropdown-item.md +60 -0
- package/ai/components/wa-dropdown.md +60 -0
- package/ai/components/wa-format-bytes.md +53 -0
- package/ai/components/wa-format-date.md +53 -0
- package/ai/components/wa-format-number.md +53 -0
- package/ai/components/wa-icon.md +58 -0
- package/ai/components/wa-include.md +53 -0
- package/ai/components/wa-input.md +59 -0
- package/ai/components/wa-intersection-observer.md +53 -0
- package/ai/components/wa-known-date.md +53 -0
- package/ai/components/wa-markdown.md +53 -0
- package/ai/components/wa-mutation-observer.md +53 -0
- package/ai/components/wa-number-input.md +55 -0
- package/ai/components/wa-option.md +59 -0
- package/ai/components/wa-otp-input.md +53 -0
- package/ai/components/wa-page.md +53 -0
- package/ai/components/wa-pagination.md +55 -0
- package/ai/components/wa-popover.md +55 -0
- package/ai/components/wa-popup.md +53 -0
- package/ai/components/wa-progress-bar.md +53 -0
- package/ai/components/wa-progress-ring.md +53 -0
- package/ai/components/wa-qr-code.md +53 -0
- package/ai/components/wa-radio-group.md +59 -0
- package/ai/components/wa-radio.md +55 -0
- package/ai/components/wa-random-content.md +53 -0
- package/ai/components/wa-rating.md +55 -0
- package/ai/components/wa-relative-time.md +53 -0
- package/ai/components/wa-resize-observer.md +53 -0
- package/ai/components/wa-scroller.md +53 -0
- package/ai/components/wa-select.md +63 -0
- package/ai/components/wa-skeleton.md +53 -0
- package/ai/components/wa-slider.md +55 -0
- package/ai/components/wa-spinner.md +58 -0
- package/ai/components/wa-split-panel.md +58 -0
- package/ai/components/wa-switch.md +53 -0
- package/ai/components/wa-tab-group.md +69 -0
- package/ai/components/wa-tab-panel.md +60 -0
- package/ai/components/wa-tab.md +59 -0
- package/ai/components/wa-tag.md +59 -0
- package/ai/components/wa-textarea.md +53 -0
- package/ai/components/wa-time-input.md +55 -0
- package/ai/components/wa-toast-item.md +60 -0
- package/ai/components/wa-toast.md +60 -0
- package/ai/components/wa-tooltip.md +55 -0
- package/ai/components/wa-tree-item.md +55 -0
- package/ai/components/wa-tree.md +55 -0
- package/ai/components/wa-zoomable-frame.md +55 -0
- package/ai/components/workbench.md +119 -0
- package/ai/public-api-signatures-v1.md +2821 -250
- package/ai/skill.md +354 -66
- package/ai/webawesome-jsx-signatures-v1.md +9 -2
- package/analyzer/cli.mjs +49 -0
- package/analyzer/component-ownership.d.mts +72 -0
- package/analyzer/component-ownership.mjs +429 -0
- package/analyzer/index.d.mts +53 -0
- package/analyzer/index.mjs +2346 -0
- package/analyzer/loud-pairs.d.mts +49 -0
- package/analyzer/loud-pairs.mjs +357 -0
- package/analyzer/report.schema.json +66 -0
- package/analyzer/selectors.d.mts +21 -0
- package/analyzer/selectors.mjs +212 -0
- package/catalog-projection-cli.mjs +96 -0
- package/catalog-projection.d.mts +55 -0
- package/catalog-projection.mjs +62 -0
- package/dist/app-tab.d.ts +39 -4
- package/dist/app-tab.js +2 -1
- package/dist/badge.d.ts +54 -0
- package/dist/badge.js +3 -0
- package/dist/badge.js.map +1 -0
- package/dist/browser/badge.js +3 -0
- package/dist/browser/catalog.js +26 -0
- package/dist/browser/chip.js +3 -0
- package/dist/browser/collapsible-panel.js +9 -0
- package/dist/browser/content-item.js +3 -0
- package/dist/browser/floating-toolbar.js +3 -0
- package/dist/browser/grid.js +3 -0
- package/dist/browser/list-action-row.js +5 -0
- package/dist/browser/{menu-header.js → list-header.js} +5 -3
- package/dist/browser/list-inset-control.js +3 -0
- package/dist/browser/list-inset-text.js +3 -0
- package/dist/browser/list-item.js +5 -0
- package/dist/browser/list.js +3 -0
- package/dist/browser/nav-stack.js +11 -0
- package/dist/browser/pane.js +3 -0
- package/dist/browser/popup-menu.js +3 -0
- package/dist/browser/row.js +3 -0
- package/dist/browser/segmented-control.js +0 -1
- package/dist/browser/select.js +2 -1
- package/dist/browser/spacer.js +3 -0
- package/dist/browser/split-view.js +13 -0
- package/dist/browser/state-banner.js +1 -0
- package/dist/browser/sunken-panel.js +3 -0
- package/dist/browser/surface-scaffold.js +3 -0
- package/dist/browser/tab-navigator.js +4 -0
- package/dist/browser/text.js +3 -0
- package/dist/browser/toolbar-control-group.js +1 -0
- package/dist/browser/workbench.js +14 -0
- package/dist/catalog-resources.d.ts +48 -0
- package/dist/catalog-resources.js +22 -0
- package/dist/catalog-resources.js.map +1 -0
- package/dist/catalog.d.ts +92 -0
- package/dist/catalog.js +541 -0
- package/dist/catalog.js.map +1 -0
- package/dist/chip.d.ts +36 -0
- package/dist/chip.js +3 -0
- package/dist/chip.js.map +1 -0
- package/dist/chunk-2GOCOLQL.js +270 -0
- package/dist/chunk-2GOCOLQL.js.map +1 -0
- package/dist/chunk-3CXRQAYT.js +288 -0
- package/dist/chunk-3CXRQAYT.js.map +1 -0
- package/dist/chunk-3RE2JMZU.js +48 -0
- package/dist/chunk-3RE2JMZU.js.map +1 -0
- package/dist/chunk-3SXWV2IR.js +295 -0
- package/dist/chunk-3SXWV2IR.js.map +1 -0
- package/dist/chunk-3XPGJUUQ.js +37 -0
- package/dist/chunk-3XPGJUUQ.js.map +1 -0
- package/dist/chunk-4Y4L5YEI.js +66 -0
- package/dist/chunk-4Y4L5YEI.js.map +1 -0
- package/dist/chunk-5BZBIRQG.js +452 -0
- package/dist/chunk-5BZBIRQG.js.map +1 -0
- package/dist/chunk-5D3WDMIK.js +71 -0
- package/dist/chunk-5D3WDMIK.js.map +1 -0
- package/dist/chunk-62VMNBV2.js +779 -0
- package/dist/chunk-62VMNBV2.js.map +1 -0
- package/dist/chunk-75I3SNUJ.js +44 -0
- package/dist/chunk-75I3SNUJ.js.map +1 -0
- package/dist/chunk-7QQ3HE47.js +17 -0
- package/dist/chunk-7QQ3HE47.js.map +1 -0
- package/dist/chunk-7TE6XDFI.js +91 -0
- package/dist/chunk-7TE6XDFI.js.map +1 -0
- package/dist/chunk-A7DYEERU.js +59 -0
- package/dist/chunk-A7DYEERU.js.map +1 -0
- package/dist/chunk-AN5IWMTM.js +24 -0
- package/dist/chunk-AN5IWMTM.js.map +1 -0
- package/dist/chunk-ARZ4RSQO.js +48 -0
- package/dist/chunk-ARZ4RSQO.js.map +1 -0
- package/dist/chunk-BJLXE56E.js +135 -0
- package/dist/chunk-BJLXE56E.js.map +1 -0
- package/dist/chunk-BYHGRKC3.js +44 -0
- package/dist/chunk-BYHGRKC3.js.map +1 -0
- package/dist/chunk-CEJ5FK6G.js +288 -0
- package/dist/chunk-CEJ5FK6G.js.map +1 -0
- package/dist/chunk-CVKIADIS.js +172 -0
- package/dist/chunk-CVKIADIS.js.map +1 -0
- package/dist/chunk-DQDTZE4W.js +70 -0
- package/dist/chunk-DQDTZE4W.js.map +1 -0
- package/dist/chunk-EFDCALR3.js +66 -0
- package/dist/chunk-EFDCALR3.js.map +1 -0
- package/dist/chunk-FL6J644M.js +116 -0
- package/dist/chunk-FL6J644M.js.map +1 -0
- package/dist/chunk-GS2QD3N7.js +14 -0
- package/dist/chunk-GS2QD3N7.js.map +1 -0
- package/dist/chunk-H45DAZBL.js +491 -0
- package/dist/chunk-H45DAZBL.js.map +1 -0
- package/dist/chunk-H7ZJEI3H.js +52 -0
- package/dist/chunk-H7ZJEI3H.js.map +1 -0
- package/dist/chunk-HFLGWMG3.js +138 -0
- package/dist/chunk-HFLGWMG3.js.map +1 -0
- package/dist/chunk-HFQDSSED.js +188 -0
- package/dist/chunk-HFQDSSED.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-I4SDIMFA.js} +7 -4
- package/dist/chunk-I4SDIMFA.js.map +1 -0
- package/dist/chunk-IM3GKYOG.js +202 -0
- package/dist/chunk-IM3GKYOG.js.map +1 -0
- package/dist/chunk-J3AWE5I4.js +50 -0
- package/dist/chunk-J3AWE5I4.js.map +1 -0
- package/dist/chunk-JOR5LGYE.js +55 -0
- package/dist/chunk-JOR5LGYE.js.map +1 -0
- package/dist/chunk-JZM3G6RT.js +149 -0
- package/dist/chunk-JZM3G6RT.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-LAZLBC2Q.js} +14 -5
- package/dist/chunk-LAZLBC2Q.js.map +1 -0
- package/dist/chunk-LQKY5S4F.js +506 -0
- package/dist/chunk-LQKY5S4F.js.map +1 -0
- package/dist/chunk-LRAIS3YB.js +158 -0
- package/dist/chunk-LRAIS3YB.js.map +1 -0
- package/dist/chunk-MXNIVEVL.js +48 -0
- package/dist/chunk-MXNIVEVL.js.map +1 -0
- package/dist/chunk-NJZMR7HM.js +135 -0
- package/dist/chunk-NJZMR7HM.js.map +1 -0
- package/dist/chunk-NMWDHZVM.js +35 -0
- package/dist/chunk-NMWDHZVM.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-NS2TBYM4.js} +8 -5
- package/dist/chunk-NS2TBYM4.js.map +1 -0
- package/dist/chunk-NVKRZ5DI.js +222 -0
- package/dist/chunk-NVKRZ5DI.js.map +1 -0
- package/dist/chunk-NVRJ7C3W.js +83 -0
- package/dist/chunk-NVRJ7C3W.js.map +1 -0
- package/dist/chunk-O27D24CA.js +250 -0
- package/dist/chunk-O27D24CA.js.map +1 -0
- package/dist/chunk-PQQQXJGV.js +58 -0
- package/dist/chunk-PQQQXJGV.js.map +1 -0
- package/dist/chunk-RRCD3A6G.js +139 -0
- package/dist/chunk-RRCD3A6G.js.map +1 -0
- package/dist/chunk-S3ECMF23.js +33 -0
- package/dist/chunk-S3ECMF23.js.map +1 -0
- package/dist/chunk-S4ZGTDSG.js +18 -0
- package/dist/chunk-S4ZGTDSG.js.map +1 -0
- package/dist/chunk-VHXHLZ6R.js +69 -0
- package/dist/chunk-VHXHLZ6R.js.map +1 -0
- package/dist/chunk-VIGVNDXZ.js +165 -0
- package/dist/chunk-VIGVNDXZ.js.map +1 -0
- package/dist/chunk-VR7MWD2X.js +91 -0
- package/dist/chunk-VR7MWD2X.js.map +1 -0
- package/dist/chunk-Y6KT7ZTR.js +109 -0
- package/dist/chunk-Y6KT7ZTR.js.map +1 -0
- package/dist/chunk-YLJ6X3AC.js +34 -0
- package/dist/chunk-YLJ6X3AC.js.map +1 -0
- package/dist/collapsible-panel.d.ts +137 -0
- package/dist/collapsible-panel.js +135 -0
- package/dist/collapsible-panel.js.map +1 -0
- package/dist/content-item.d.ts +99 -0
- package/dist/content-item.js +4 -0
- package/dist/content-item.js.map +1 -0
- package/dist/css-values.d.ts +112 -0
- package/dist/css-values.js +3 -0
- package/dist/css-values.js.map +1 -0
- package/dist/device-class.js +34 -6
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.d.ts +6 -1
- package/dist/disclosure-arrow.js +2 -1
- package/dist/empty-state.d.ts +5 -2
- package/dist/empty-state.js +2 -1
- package/dist/flex-alignment-4ms8ZbV8.d.ts +5 -0
- package/dist/floating-toolbar.d.ts +51 -0
- package/dist/floating-toolbar.js +3 -0
- package/dist/floating-toolbar.js.map +1 -0
- package/dist/grid.d.ts +57 -0
- package/dist/grid.js +5 -0
- package/dist/grid.js.map +1 -0
- package/dist/help-tags-register.d.ts +13 -0
- package/dist/help-tags-register.js +9 -0
- package/dist/help-tags-register.js.map +1 -0
- package/dist/index.d.ts +40 -18
- package/dist/index.js +44 -23
- package/dist/{menu-action-row.d.ts → list-action-row.d.ts} +21 -9
- package/dist/list-action-row.js +8 -0
- package/dist/list-action-row.js.map +1 -0
- package/dist/list-header.d.ts +98 -0
- package/dist/list-header.js +10 -0
- package/dist/list-header.js.map +1 -0
- package/dist/list-inset-control.d.ts +22 -0
- package/dist/list-inset-control.js +3 -0
- package/dist/list-inset-control.js.map +1 -0
- package/dist/list-inset-text.d.ts +30 -0
- package/dist/list-inset-text.js +4 -0
- package/dist/list-inset-text.js.map +1 -0
- package/dist/list-item.d.ts +62 -0
- package/dist/list-item.js +8 -0
- package/dist/list-item.js.map +1 -0
- package/dist/list.d.ts +63 -0
- package/dist/list.js +6 -0
- package/dist/list.js.map +1 -0
- package/dist/loading-spinner.d.ts +12 -2
- package/dist/loading-spinner.js +2 -1
- package/dist/lucide-icon.d.ts +14 -2
- package/dist/lucide-icon.js +2 -1
- package/dist/nav-stack-B1Qc2e5q.d.ts +101 -0
- package/dist/nav-stack.d.ts +13 -38
- package/dist/nav-stack.js +10 -1
- package/dist/pane.d.ts +116 -0
- package/dist/pane.js +4 -0
- package/dist/pane.js.map +1 -0
- package/dist/panel-toolbar-CL9tYOkh.d.ts +72 -0
- package/dist/popup-menu-register.d.ts +9 -0
- package/dist/popup-menu-register.js +244 -0
- package/dist/popup-menu-register.js.map +1 -0
- package/dist/popup-menu.d.ts +100 -0
- package/dist/popup-menu.js +3 -0
- package/dist/popup-menu.js.map +1 -0
- package/dist/resizable-region.d.ts +32 -3
- package/dist/resizable-region.js +1 -1
- package/dist/row.d.ts +48 -0
- package/dist/row.js +6 -0
- package/dist/row.js.map +1 -0
- package/dist/segmented-control.d.ts +12 -9
- package/dist/segmented-control.js +1 -2
- package/dist/select-register.d.ts +5 -1
- package/dist/select-register.js +247 -3
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +103 -8
- package/dist/select.js +3 -1
- package/dist/semantic-content-BbzjvSu9.d.ts +14 -0
- package/dist/semantic-tone-CdW013KF.d.ts +4 -0
- package/dist/sides-BPSWde0A.d.ts +4 -0
- package/dist/skeleton.d.ts +14 -7
- package/dist/skeleton.js +2 -1
- package/dist/spacer.d.ts +18 -0
- package/dist/spacer.js +4 -0
- package/dist/spacer.js.map +1 -0
- package/dist/split-view.d.ts +44 -7
- package/dist/split-view.js +124 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +21 -7
- package/dist/state-banner.js +3 -1
- package/dist/styles/app-tab.css +224 -0
- package/dist/styles/badge.css +118 -0
- package/dist/styles/catalog/components/catalog-example-stack.css +9 -0
- package/dist/styles/catalog/components/catalog-example.css +168 -0
- package/dist/styles/catalog/components/catalog-stage.css +55 -0
- package/dist/styles/catalog/components/catalog.css +50 -0
- package/dist/styles/catalog.css +5 -0
- package/dist/styles/chip.css +138 -0
- package/dist/styles/collapsible-panel.css +580 -0
- package/dist/styles/components/actions/floating-toolbar/floating-toolbar.css +119 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +285 -0
- package/dist/styles/components/actions/toolbar/toolbar.css +417 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +891 -0
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +171 -0
- package/dist/styles/components/collections/list/list.css +133 -0
- package/dist/styles/components/collections/list-action-row/list-action-row.css +258 -0
- package/dist/styles/components/collections/list-header/list-header.css +229 -0
- package/dist/styles/components/collections/list-inset-control/list-inset-control.css +30 -0
- package/dist/styles/components/collections/list-inset-text/list-inset-text.css +29 -0
- package/dist/styles/components/collections/list-item/list-item.css +255 -0
- package/dist/styles/components/data-display/value-table/value-table.css +105 -0
- package/dist/styles/components/feedback/badge/badge.css +118 -0
- package/dist/styles/components/feedback/chip/chip.css +138 -0
- package/dist/styles/components/feedback/empty-state/empty-state.css +47 -0
- package/dist/styles/components/feedback/loading-spinner/loading-spinner.css +25 -0
- package/dist/styles/components/feedback/skeleton/skeleton.css +92 -0
- package/dist/styles/components/feedback/state-banner/state-banner.css +248 -0
- package/dist/styles/components/forms/segmented-control/segmented-control.css +196 -0
- package/dist/styles/components/forms/select/select.css +454 -0
- package/dist/styles/components/forms/token-search-field/token-search-field.css +392 -0
- package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +580 -0
- package/dist/styles/components/layout/grid/grid.css +85 -0
- package/dist/styles/components/layout/pane/pane.css +294 -0
- package/dist/styles/components/layout/resizable-region/resizable-region.css +545 -0
- package/dist/styles/components/layout/row/row.css +111 -0
- package/dist/styles/components/layout/spacer/spacer.css +11 -0
- package/dist/styles/components/layout/split-view/split-view.css +146 -0
- package/dist/styles/components/layout/workbench/workbench.css +1075 -0
- package/dist/styles/components/media/lucide-icon/lucide-icon.css +15 -0
- package/dist/styles/components/navigation/app-tab/app-tab.css +376 -0
- package/dist/styles/components/navigation/disclosure-arrow/disclosure-arrow.css +23 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +242 -0
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +183 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +237 -0
- package/dist/styles/components/surfaces/content-item/content-item.css +120 -0
- package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +34 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +111 -0
- package/dist/styles/components/typography/text/text.css +158 -0
- package/dist/styles/content-item.css +120 -0
- package/dist/styles/document.css +33 -0
- package/dist/styles/floating-toolbar.css +119 -0
- package/dist/styles/foundation.css +187 -45
- package/dist/styles/grid.css +85 -0
- package/dist/styles/layout.css +3 -41
- package/dist/styles/list-action-row.css +258 -0
- package/dist/styles/list-header.css +229 -0
- package/dist/styles/list-inset-control.css +30 -0
- package/dist/styles/list-inset-text.css +29 -0
- package/dist/styles/list-item.css +255 -0
- package/dist/styles/list.css +133 -0
- package/dist/styles/loading-spinner.css +4 -0
- package/dist/styles/lucide-icon.css +9 -0
- package/dist/styles/nav-stack.css +180 -50
- package/dist/styles/pane.css +294 -0
- package/dist/styles/popup-menu.css +285 -0
- package/dist/styles/resizable-region.css +438 -4
- package/dist/styles/row.css +111 -0
- package/dist/styles/segmented-control.css +36 -9
- package/dist/styles/select.css +337 -21
- package/dist/styles/skeleton.css +64 -3
- package/dist/styles/spacer.css +11 -0
- package/dist/styles/split-view.css +114 -3
- package/dist/styles/state-banner.css +94 -19
- package/dist/styles/styles.css +13 -4
- package/dist/styles/sunken-panel.css +34 -0
- package/dist/styles/surface-scaffold.css +111 -0
- package/dist/styles/tab-bar.css +147 -9
- package/dist/styles/tab-navigator.css +237 -0
- package/dist/styles/text.css +158 -0
- package/dist/styles/token-search-field.css +167 -56
- package/dist/styles/toolbar-control-group.css +710 -30
- package/dist/styles/toolbar-text.css +139 -8
- package/dist/styles/toolbar.css +367 -11
- package/dist/styles/value-table.css +34 -4
- package/dist/styles/webawesome.css +388 -16
- package/dist/styles/workbench.css +988 -7
- package/dist/sunken-panel.d.ts +31 -0
- package/dist/sunken-panel.js +3 -0
- package/dist/sunken-panel.js.map +1 -0
- package/dist/surface-scaffold-register.d.ts +4 -0
- package/dist/surface-scaffold-register.js +59 -0
- package/dist/surface-scaffold-register.js.map +1 -0
- package/dist/surface-scaffold.d.ts +38 -0
- package/dist/surface-scaffold.js +3 -0
- package/dist/surface-scaffold.js.map +1 -0
- package/dist/tab-bar.d.ts +39 -6
- package/dist/tab-bar.js +1 -1
- package/dist/tab-navigator.d.ts +86 -0
- package/dist/tab-navigator.js +95 -0
- package/dist/tab-navigator.js.map +1 -0
- package/dist/text.d.ts +63 -0
- package/dist/text.js +3 -0
- package/dist/text.js.map +1 -0
- package/dist/token-search-field.d.ts +3 -43
- package/dist/token-search-field.js +2 -1
- package/dist/token-search-model-DTcTXWMS.d.ts +154 -0
- package/dist/token-search-model.d.ts +3 -0
- package/dist/token-search-model.js +3 -0
- package/dist/token-search-model.js.map +1 -0
- package/dist/toolbar-control-group.d.ts +89 -7
- package/dist/toolbar-control-group.js +3 -1
- package/dist/toolbar-text.d.ts +45 -9
- package/dist/toolbar-text.js +2 -1
- package/dist/toolbar.d.ts +59 -7
- package/dist/toolbar.js +1 -1
- package/dist/types-C9BubXfz.d.ts +117 -0
- package/dist/value-table.d.ts +11 -3
- package/dist/value-table.js +2 -1
- package/dist/webawesome.d.ts +8 -1
- package/dist/wire-catalog.d.ts +82 -0
- package/dist/wire-catalog.js +407 -0
- package/dist/wire-catalog.js.map +1 -0
- package/dist/wire-content-items.d.ts +11 -0
- package/dist/wire-content-items.js +114 -0
- package/dist/wire-content-items.js.map +1 -0
- package/dist/wire-nav-stack.d.ts +4 -1
- package/dist/wire-nav-stack.js +191 -15
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +2 -1
- package/dist/wire-resizable-regions.js +2 -1
- package/dist/wire-scroll-dividers.d.ts +72 -0
- package/dist/wire-scroll-dividers.js +3 -0
- package/dist/wire-scroll-dividers.js.map +1 -0
- package/dist/wire-sidebar.d.ts +63 -0
- package/dist/wire-sidebar.js +231 -0
- package/dist/wire-sidebar.js.map +1 -0
- package/dist/wire-tab-bars.d.ts +19 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-navigator.d.ts +11 -0
- package/dist/wire-tab-navigator.js +21 -0
- package/dist/wire-tab-navigator.js.map +1 -0
- package/dist/wire-token-search-fields.d.ts +65 -3
- package/dist/wire-token-search-fields.js +2 -1
- package/dist/wire-toolbar-visibility.d.ts +13 -0
- package/dist/wire-toolbar-visibility.js +3 -0
- package/dist/wire-toolbar-visibility.js.map +1 -0
- package/dist/wire-workbench.d.ts +116 -0
- package/dist/wire-workbench.js +6 -0
- package/dist/wire-workbench.js.map +1 -0
- package/dist/workbench.d.ts +246 -9
- package/dist/workbench.js +17 -15
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +497 -26
- package/docs/app-layouts.md +141 -10
- package/docs/apple-hig.md +1 -0
- package/docs/catalog.md +493 -0
- package/docs/collapsible-panel.md +382 -0
- package/docs/component-contract.md +736 -61
- package/docs/component-integration.md +75 -0
- package/docs/component-selection.md +617 -97
- package/docs/design/templates/empty-state/filtered-dark.svg +1 -0
- package/docs/design/templates/empty-state/filtered.svg +1 -0
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -0
- package/docs/design/templates/empty-state/with-action.svg +1 -0
- package/docs/design/templates/empty-state-dark.svg +1 -0
- package/docs/design/templates/empty-state.svg +1 -0
- package/docs/design/templates/list/compact-dark.svg +1 -0
- package/docs/design/templates/list/compact.svg +1 -0
- package/docs/design/templates/list/stack-dark.svg +1 -0
- package/docs/design/templates/list/stack.svg +1 -0
- package/docs/design/templates/list-action-row/default-dark.svg +1 -0
- package/docs/design/templates/list-action-row/default.svg +1 -0
- package/docs/design/templates/list-action-row/selected-dark.svg +1 -0
- package/docs/design/templates/list-action-row/selected.svg +1 -0
- package/docs/design/templates/list-action-row-dark.svg +1 -0
- package/docs/design/templates/list-action-row.svg +1 -0
- package/docs/design/templates/list-dark.svg +1 -0
- package/docs/design/templates/list-header/action-dark.svg +1 -0
- package/docs/design/templates/list-header/action.svg +1 -0
- package/docs/design/templates/list-header/count-dark.svg +1 -0
- package/docs/design/templates/list-header/count.svg +1 -0
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -0
- package/docs/design/templates/list-header/inline-action.svg +1 -0
- package/docs/design/templates/list-header/size-l-dark.svg +1 -0
- package/docs/design/templates/list-header/size-l.svg +1 -0
- package/docs/design/templates/list-header/size-m-dark.svg +1 -0
- package/docs/design/templates/list-header/size-m.svg +1 -0
- package/docs/design/templates/list-header/size-xl-dark.svg +1 -0
- package/docs/design/templates/list-header/size-xl.svg +1 -0
- package/docs/design/templates/list-header/size-xs-dark.svg +1 -0
- package/docs/design/templates/list-header/size-xs.svg +1 -0
- package/docs/design/templates/list-header/toggle-collapsed-dark.svg +1 -0
- package/docs/design/templates/list-header/toggle-collapsed.svg +1 -0
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -0
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -0
- package/docs/design/templates/list-header-dark.svg +1 -0
- package/docs/design/templates/list-header.svg +1 -0
- package/docs/design/templates/list-item/default-dark.svg +1 -0
- package/docs/design/templates/list-item/default.svg +1 -0
- package/docs/design/templates/list-item/multiline-dark.svg +1 -0
- package/docs/design/templates/list-item/multiline.svg +1 -0
- package/docs/design/templates/list-item/selected-dark.svg +1 -0
- package/docs/design/templates/list-item/selected.svg +1 -0
- package/docs/design/templates/list-item/trailing-dark.svg +1 -0
- package/docs/design/templates/list-item/trailing.svg +1 -0
- package/docs/design/templates/list-item-dark.svg +1 -0
- package/docs/design/templates/list-item.svg +1 -0
- package/docs/design/templates/list.svg +1 -0
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -0
- package/docs/design/templates/segmented-control/equal.svg +1 -0
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -0
- package/docs/design/templates/segmented-control/pill-small.svg +1 -0
- package/docs/design/templates/segmented-control-dark.svg +1 -0
- package/docs/design/templates/segmented-control.svg +1 -0
- package/docs/design/templates/skeleton/avatar-dark.svg +1 -0
- package/docs/design/templates/skeleton/avatar.svg +1 -0
- package/docs/design/templates/skeleton/block-dark.svg +1 -0
- package/docs/design/templates/skeleton/block.svg +1 -0
- package/docs/design/templates/skeleton/lines-dark.svg +1 -0
- package/docs/design/templates/skeleton/lines.svg +1 -0
- package/docs/design/templates/skeleton-dark.svg +1 -0
- package/docs/design/templates/skeleton.svg +1 -0
- package/docs/design/templates/state-banner/danger-dark.svg +1 -0
- package/docs/design/templates/state-banner/danger.svg +1 -0
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -0
- package/docs/design/templates/state-banner/info-badge.svg +1 -0
- package/docs/design/templates/state-banner/info-dark.svg +1 -0
- package/docs/design/templates/state-banner/info.svg +1 -0
- package/docs/design/templates/state-banner/success-dark.svg +1 -0
- package/docs/design/templates/state-banner/success.svg +1 -0
- package/docs/design/templates/state-banner/warning-dark.svg +1 -0
- package/docs/design/templates/state-banner/warning.svg +1 -0
- package/docs/design/templates/state-banner-dark.svg +1 -0
- package/docs/design/templates/state-banner.svg +1 -0
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -0
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -0
- package/docs/design/templates/tab-bar-dark.svg +1 -0
- package/docs/design/templates/tab-bar.svg +1 -0
- package/docs/design/templates/token-search-field/empty-dark.svg +1 -0
- package/docs/design/templates/token-search-field/empty.svg +1 -0
- package/docs/design/templates/token-search-field/tokens-dark.svg +1 -0
- package/docs/design/templates/token-search-field/tokens.svg +1 -0
- package/docs/design/templates/token-search-field-dark.svg +1 -0
- package/docs/design/templates/token-search-field.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-320-dark.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-320.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-600-dark.svg +1 -0
- package/docs/design/templates/toolbar/width-visibility-600.svg +1 -0
- package/docs/design/templates/toolbar-control-group/borderless-single-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/borderless-single.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-buttons-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-buttons.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-brand-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-brand.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-danger.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-success-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-success.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-warning-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/icon-tile-warning.svg +1 -0
- package/docs/design/templates/toolbar-control-group/push-buttons-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/push-buttons.svg +1 -0
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -0
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -0
- package/docs/design/templates/toolbar-control-group.svg +1 -0
- package/docs/design/templates/toolbar-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/dark-tone-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/dark-tone.svg +1 -0
- package/docs/design/templates/toolbar-text/default-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/default.svg +1 -0
- package/docs/design/templates/toolbar-text/large-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/large.svg +1 -0
- package/docs/design/templates/toolbar-text/small-dark.svg +1 -0
- package/docs/design/templates/toolbar-text/small.svg +1 -0
- package/docs/design/templates/toolbar-text-dark.svg +1 -0
- package/docs/design/templates/toolbar-text.svg +1 -0
- package/docs/design/templates/toolbar.svg +1 -0
- package/docs/design/templates/value-table/details-dark.svg +1 -0
- package/docs/design/templates/value-table/details.svg +1 -0
- package/docs/design/templates/value-table-dark.svg +1 -0
- package/docs/design/templates/value-table.svg +1 -0
- package/docs/design/templates.md +140 -0
- package/docs/design-philosophy.md +48 -20
- package/docs/device-class.md +10 -9
- package/docs/document-baseline.md +42 -0
- package/docs/examples/application-ui-profile.json +60 -0
- package/docs/examples/command-palette-adapter.tsx +69 -17
- package/docs/examples/component-catalog-extension.json +52 -0
- package/docs/examples/component-composition-extension.json +80 -0
- package/docs/layout.md +601 -59
- package/docs/nav-stack.md +154 -14
- package/docs/recipes.md +142 -55
- package/docs/split-view.md +77 -6
- package/docs/sunken-panel.md +93 -0
- package/docs/surface-scaffold.md +74 -0
- package/docs/tab-navigator.md +210 -0
- package/docs/type-contracts.md +135 -0
- package/docs/ui-analyzer.md +404 -0
- package/docs/ui-doctor.md +202 -0
- package/docs/ui-evaluator.md +139 -0
- package/docs/ux-demo.md +46 -16
- package/docs/webawesome-theme.md +188 -16
- package/docs/workbench.md +621 -12
- package/doctor/cli.mjs +120 -0
- package/doctor/component-style-checks.mjs +457 -0
- package/doctor/config.schema.json +94 -0
- package/doctor/eslint-diagnostics.d.mts +24 -0
- package/doctor/eslint-diagnostics.mjs +24 -0
- package/doctor/index.d.mts +122 -0
- package/doctor/index.mjs +1403 -0
- package/doctor/report.schema.json +118 -0
- package/evaluator/cli.mjs +89 -0
- package/evaluator/index.d.mts +90 -0
- package/evaluator/index.mjs +1203 -0
- package/evaluator/report.schema.json +152 -0
- package/llms.txt +510 -49
- package/package.json +266 -44
- package/scripts/component-catalog-extension-validation.mjs +28 -0
- package/traversal-exclusions.mjs +27 -0
- package/ux-demo/recipes/app-shell.tsx +205 -17
- package/ux-demo/recipes/collapsible-sidebar.tsx +260 -0
- package/ux-demo/recipes/compact-toolbar.tsx +135 -14
- package/ux-demo/recipes/composer-form.tsx +133 -21
- package/ux-demo/recipes/list-detail-dialog.tsx +286 -0
- package/ux-demo/recipes/list-workspace-states.tsx +183 -11
- package/ux-demo/recipes/loaders.ts +15 -5
- package/ux-demo/recipes/loading-inspector.tsx +204 -0
- package/ux-demo/recipes/mount-recipe.ts +28 -10
- package/ux-demo/recipes/navigation-sidebar.tsx +139 -13
- package/ux-demo/recipes/navigation-stack.tsx +81 -26
- package/ux-demo/recipes/types.ts +23 -2
- package/ux-demo/recipes/workspace-header.tsx +86 -5
- package/dist/browser/menu-action-row.js +0 -4
- package/dist/browser/menu-item.js +0 -4
- package/dist/browser/panel-header.js +0 -7
- package/dist/chunk-2RJBFNB6.js +0 -172
- package/dist/chunk-2RJBFNB6.js.map +0 -1
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-3YD6ZNRA.js +0 -34
- package/dist/chunk-3YD6ZNRA.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-56RJXPHG.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-BLK3UEEI.js +0 -23
- package/dist/chunk-BLK3UEEI.js.map +0 -1
- package/dist/chunk-BNQ2YDV4.js +0 -20
- package/dist/chunk-BNQ2YDV4.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-H6URQGJI.js +0 -42
- package/dist/chunk-H6URQGJI.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-LC3YSAZC.js +0 -39
- package/dist/chunk-LC3YSAZC.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-MBR3TYNL.js +0 -14
- package/dist/chunk-MBR3TYNL.js.map +0 -1
- package/dist/chunk-MFKMHK5W.js +0 -10
- package/dist/chunk-MFKMHK5W.js.map +0 -1
- package/dist/chunk-MQIZAD4A.js +0 -227
- package/dist/chunk-MQIZAD4A.js.map +0 -1
- package/dist/chunk-PONXLV5U.js +0 -19
- package/dist/chunk-PONXLV5U.js.map +0 -1
- package/dist/chunk-RUNWEPR4.js +0 -10
- package/dist/chunk-RUNWEPR4.js.map +0 -1
- package/dist/chunk-W2FK7ZNY.js +0 -26
- package/dist/chunk-W2FK7ZNY.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
- package/dist/chunk-YKUUZPED.js +0 -24
- package/dist/chunk-YKUUZPED.js.map +0 -1
- package/dist/menu-action-row.js +0 -5
- package/dist/menu-action-row.js.map +0 -1
- package/dist/menu-header.d.ts +0 -43
- package/dist/menu-header.js +0 -7
- package/dist/menu-header.js.map +0 -1
- package/dist/menu-item.d.ts +0 -33
- package/dist/menu-item.js +0 -5
- package/dist/menu-item.js.map +0 -1
- package/dist/panel-header.d.ts +0 -36
- package/dist/panel-header.js +0 -7
- package/dist/panel-header.js.map +0 -1
- package/dist/styles/menu-action-row.css +0 -160
- package/dist/styles/menu-header.css +0 -160
- package/dist/styles/menu-item.css +0 -123
- package/dist/styles/panel-header.css +0 -64
- package/dist/styles/tab-scaffold.css +0 -84
- package/dist/tab-scaffold.d.ts +0 -30
- package/dist/tab-scaffold.js +0 -16
- package/dist/tab-scaffold.js.map +0 -1
- package/dist/wire-tab-scaffold.d.ts +0 -11
- package/dist/wire-tab-scaffold.js +0 -16
- package/dist/wire-tab-scaffold.js.map +0 -1
- package/docs/tab-scaffold.md +0 -41
- package/ux-demo/recipes/master-detail-dialog.tsx +0 -45
- package/ux-demo/recipes/recipes.css +0 -355
|
@@ -5,9 +5,9 @@ Use the shipped [`component-catalog.json`](../ai/component-catalog.json) when a
|
|
|
5
5
|
tool needs exhaustive structured facts; this page remains the concise human
|
|
6
6
|
decision procedure.
|
|
7
7
|
|
|
8
|
-
1. Search the [Kerf UX catalog](./ux-demo.md) and the supported Web Awesome set.
|
|
8
|
+
1. Search the [Kerf UX catalog](./ux-demo.md) and the supported Web Awesome set. Prefer a Kerf UI component over a Web Awesome component over a raw HTML tag, using each naturally for what it is good at.
|
|
9
9
|
2. Reuse a primitive when its purpose, anatomy, state, and interaction match.
|
|
10
|
-
3. Compose primitives for recurring layout
|
|
10
|
+
3. Compose primitives for recurring layout through public props and tokens. Do not select one component from another component's stylesheet.
|
|
11
11
|
4. Add a thin application adapter for product copy, domain mapping, actions, routing, persistence, permissions, and transport.
|
|
12
12
|
5. Use custom markup only when the semantic contract differs. If the pattern recurs across products, open an upstream component or recipe request.
|
|
13
13
|
|
|
@@ -15,34 +15,124 @@ The application adapter is usually a plain function that maps domain state to
|
|
|
15
15
|
component props plus stable `data-action` values. It is not a fork of package
|
|
16
16
|
markup or CSS.
|
|
17
17
|
|
|
18
|
-
**Don't fight the components.** The package is built to look right
|
|
19
|
-
|
|
20
|
-
`border`, `background`, a wrapper card, or a decoration, check whether
|
|
21
|
-
component, the pane, or the content-item already owns it — it almost always
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
**Don't fight the components.** The package is built to look right without an
|
|
19
|
+
application customization layer. Before adding `padding`, `margin`, `width`,
|
|
20
|
+
`height`, `border`, `background`, a wrapper card, or a decoration, check whether
|
|
21
|
+
the component, the pane, or the content-item already owns it — it almost always
|
|
22
|
+
does. Express presentation through props and tokens. Encapsulate genuinely new
|
|
23
|
+
structure in a self-styled application component, and never reach into a nested
|
|
24
|
+
Kerf or Web Awesome component from that stylesheet. See
|
|
24
25
|
[`design-philosophy.md`](./design-philosophy.md) "Reach for the primitive, not for
|
|
25
26
|
CSS".
|
|
26
27
|
|
|
28
|
+
### Shared semantic tones
|
|
29
|
+
|
|
30
|
+
`SemanticTone` is the shared color-role type for `Badge`, `Chip`, `StateBanner`,
|
|
31
|
+
and semantic `ContentItem` appearances: `neutral`, `info`, `pop`, `success`,
|
|
32
|
+
`warning`, and `danger`. Import it as a type from `@kerfjs/ui`,
|
|
33
|
+
`@kerfjs/ui/badge`, `@kerfjs/ui/state-banner`, or `@kerfjs/ui/content-item`.
|
|
34
|
+
Use `info` for the role backed by the existing `--kui-color-brand-*` tokens.
|
|
35
|
+
Migrate Badge/Chip `tone="brand"` to `tone="info"`; `BadgeTone` and
|
|
36
|
+
`StateBannerTone` remain deprecated aliases of `SemanticTone`.
|
|
37
|
+
|
|
38
|
+
## Foundation tokens
|
|
39
|
+
|
|
40
|
+
Import the opt-in `@kerfjs/ui/document.css` baseline when the application wants
|
|
41
|
+
Kerf UI to own global box sizing, body typography/colors, plain-link color, and
|
|
42
|
+
the definite full-height chain. It also lets native table cells and form controls
|
|
43
|
+
inherit the surrounding font metrics without removing table-header emphasis.
|
|
44
|
+
Put `.kui-app-root` on the one direct mount
|
|
45
|
+
container only for a full-height shell; ordinary flowing pages can omit it. See
|
|
46
|
+
[Document baseline](document-baseline.md).
|
|
47
|
+
|
|
48
|
+
Import `@kerfjs/ui/foundation.css` when application-owned composition CSS needs
|
|
49
|
+
the same semantic typography, spacing, device breakpoints, geometry, radii,
|
|
50
|
+
colors, focus ring, or shadows as Kerf components. Its complete supported
|
|
51
|
+
`--kui-*` surface is cataloged by the `foundation` entry; tools may treat that
|
|
52
|
+
entry as the public allowlist rather than inferring stability from CSS text.
|
|
53
|
+
Override these tokens globally for an application theme or on the narrowest
|
|
54
|
+
useful subtree. Prefer a component prop or component-specific token when the
|
|
55
|
+
change belongs to one component or instance, and preserve the documented
|
|
56
|
+
foreground/background contrast relationships and visible focus ring.
|
|
57
|
+
|
|
58
|
+
### Typed runtime dimensions
|
|
59
|
+
|
|
60
|
+
Use `Row`, `Grid`, or `List` spacing shorthands for repeated sibling spacing: `gap="xs"`,
|
|
61
|
+
`gap="m"`, and the other `UiSpaceName` values resolve to their matching
|
|
62
|
+
`--kui-space-*` token. Use `Spacer` for one deliberate empty width or height, or
|
|
63
|
+
pass `flex` to consume the remaining space along a flex parent's main axis.
|
|
64
|
+
The canonical rhythm is `none`, `2xs`, `xs`, `m`, and `l`; use `s` and `xl`
|
|
65
|
+
only as deliberate exceptions.
|
|
66
|
+
|
|
67
|
+
When a value cannot be expressed by one spacing step, import the CSS-free
|
|
68
|
+
`@kerfjs/ui/css-values` subpath. `px`, `rem`, `em`, and `pct` create typed
|
|
69
|
+
`CssLength` values; `space` and `lengthVar` reference spacing or
|
|
70
|
+
application-owned length tokens. `plus` creates a non-standalone
|
|
71
|
+
`CssLengthExpression`, so wrap it with `calc` before passing it to a gap prop:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { calc, pct, plus, rem, space } from "@kerfjs/ui/css-values";
|
|
75
|
+
import { Grid } from "@kerfjs/ui/grid";
|
|
76
|
+
import { List } from "@kerfjs/ui/list";
|
|
77
|
+
import { Row } from "@kerfjs/ui/row";
|
|
78
|
+
|
|
79
|
+
<List gap="xs">...</List>;
|
|
80
|
+
<Grid columns={3} gap="m">...</Grid>;
|
|
81
|
+
<Row hAlign="full" vAlign="middle" gap="m">...</Row>;
|
|
82
|
+
<List gap={space("m")}>...</List>;
|
|
83
|
+
<List gap={calc(plus(rem(0.25), pct(10)))}>...</List>;
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`CssValue` is the common branded base, not an arbitrary-string constructor.
|
|
87
|
+
For a responsive equal-width form, pass `Grid minColumnWidth={px(376)}` instead
|
|
88
|
+
of `columns`; the Grid's container width decides when the tracks collapse.
|
|
89
|
+
Raw strings such as `"0.25rem"` do not satisfy `Row.gap`, `Grid.gap`, or `List.gap`; this
|
|
90
|
+
contract lands before the 5.0 stable release so misspelled tokens and incomplete
|
|
91
|
+
expressions fail during typechecking rather than in the browser.
|
|
92
|
+
|
|
93
|
+
Other CSS-valued props use distinct contracts: `Spacer.width` and
|
|
94
|
+
`Spacer.height` take `UiSpaceName | CssLength`; `flex()` creates `CssFlex` for
|
|
95
|
+
`Row.flex`, `Grid.flex`, and `List.flex`; `Skeleton` dimensions take typed lengths (plus finite intrinsic
|
|
96
|
+
keywords for width/height); and `SelectChoice.color` takes a
|
|
97
|
+
`CssForegroundColor` from `uiColor()` with a foreground token (`*-on-*`, a text
|
|
98
|
+
role, or a `*-text` alias), from `foregroundColorVar()`, or from `foregroundColor()` via the `foregroundColor` helper for an application-chosen CSS color. `LucideIcon.color` accepts the same foreground type and otherwise inherits surrounding text color. The bare `success`,
|
|
99
|
+
`warning`, `danger`, `pop`, and `accent` tokens are quiet fills, not
|
|
100
|
+
foregrounds, and are rejected there; `colorVar()` returns a plain `CssColor`.
|
|
101
|
+
`LucideIcon` is block-level by default; set `inline` to let it flow inside
|
|
102
|
+
`Text` or other prose without changing its size or accessibility semantics.
|
|
103
|
+
Do not substitute one brand for another. Row components
|
|
104
|
+
have no declaration-string `style` prop; use `className`, documented public
|
|
105
|
+
tokens, and semantic component props. Catalog media queries remain strings and
|
|
106
|
+
semantic pixel measurements remain numbers because those are different APIs.
|
|
107
|
+
The corresponding public builders are `flex`, `uiColor`, `colorVar`, and
|
|
108
|
+
`foregroundColorVar`.
|
|
109
|
+
|
|
27
110
|
## Production recipes
|
|
28
111
|
|
|
29
112
|
Use the [complete recipe guide](./recipes.md) when several primitives form one
|
|
30
113
|
application boundary:
|
|
31
114
|
|
|
32
|
-
| Task
|
|
33
|
-
|
|
|
34
|
-
| Desktop application shell
|
|
35
|
-
| Navigation sidebar
|
|
36
|
-
| Workspace header
|
|
37
|
-
|
|
|
38
|
-
| Composer form
|
|
39
|
-
| List workspace states
|
|
40
|
-
| Compact toolbar choices and actions | [Catalog](../ux-demo/) · `?component=recipe-compact-toolbar`
|
|
41
|
-
| Navigation stack
|
|
115
|
+
| Task | Stable catalog route |
|
|
116
|
+
| ----------------------------------- | ------------------------------------------------------------------ |
|
|
117
|
+
| Desktop application shell | [Catalog](../ux-demo/) · `?component=recipe-app-shell` |
|
|
118
|
+
| Navigation sidebar | [Catalog](../ux-demo/) · `?component=recipe-navigation-sidebar` |
|
|
119
|
+
| Workspace header | [Catalog](../ux-demo/) · `?component=recipe-workspace-header` |
|
|
120
|
+
| List-detail dialog | [Catalog](../ux-demo/) · `?component=recipe-list-detail-dialog` |
|
|
121
|
+
| Composer form | [Catalog](../ux-demo/) · `?component=recipe-composer-form` |
|
|
122
|
+
| List workspace states | [Catalog](../ux-demo/) · `?component=recipe-list-workspace-states` |
|
|
123
|
+
| Compact toolbar choices and actions | [Catalog](../ux-demo/) · `?component=recipe-compact-toolbar` |
|
|
124
|
+
| Navigation stack | [Catalog](../ux-demo/) · `?component=recipe-navigation-stack` |
|
|
125
|
+
| Loading inspector | [Catalog](../ux-demo/) · `?component=recipe-loading-inspector` |
|
|
126
|
+
| Collapsible sidebar | [Catalog](../ux-demo/) · `?component=recipe-collapsible-sidebar` |
|
|
42
127
|
|
|
43
128
|
Recipes use public production exports and show ownership boundaries; they are
|
|
44
129
|
copyable reference compositions, not new monolithic components.
|
|
45
130
|
|
|
131
|
+
When presenting a component or recipe in a Catalog, use the authoritative
|
|
132
|
+
[Catalog demo authoring contract](./catalog.md#catalog-demo-authoring-contract)
|
|
133
|
+
rather than deriving preview structure or geometry-overlay behavior from these
|
|
134
|
+
selection entries.
|
|
135
|
+
|
|
46
136
|
## Missing recurring concepts
|
|
47
137
|
|
|
48
138
|
Kerf UI does not export a command-palette component. Do not invent a package
|
|
@@ -56,128 +146,558 @@ an upstream component or recipe request.
|
|
|
56
146
|
|
|
57
147
|
## Problem-to-component matrix
|
|
58
148
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
149
|
+
For a read-only or click-to-edit field preview, use `FieldLabel` from
|
|
150
|
+
`@kerfjs/ui/text` above the preview instead of a `ListHeader`. It matches the
|
|
151
|
+
themed Web Awesome form-control label. Put it in `ListInsetControl sides="trl"`
|
|
152
|
+
beside a `ContentItem` value, and connect its id to the preview group's
|
|
153
|
+
`aria-labelledby`; see [Field labels](./layout.md#text).
|
|
154
|
+
|
|
155
|
+
| Interface need | Use when | Do not use when; nearest alternative | Required wiring | Application owns | Import | Recipe |
|
|
156
|
+
| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
157
|
+
| Icon — `LucideIcon` | A decorative or explicitly labeled Lucide-compatible icon belongs in app UI. | Do not use an icon as the only name of an unfamiliar action; add visible or accessible text. Prefer it over Web Awesome `wa-icon`. | None. | Icon choice and meaningful label. | `@kerfjs/ui/lucide-icon` | [Accessibility](./accessibility.md#shared-rules) |
|
|
158
|
+
| Compact metadata — `Badge` | A short status, count, category, or metadata label needs self-owned visual treatment configured by semantic props. | Do not use it as a button, link, or removable chip. Do not restyle consuming-component descendants to create a badge. | Choose `tone`, `appearance`, `shape`, and `size`; supply `label` for abbreviated content or `ariaHidden` when a surrounding component already owns the same accessible text. For new content without a count use the text-free `size="dot"`, which requires `label` or `ariaHidden`. | Metadata text, semantic tone mapping, and abbreviated-content labeling. | `@kerfjs/ui/badge` | [Component ownership](./component-contract.md#ownership-boundaries) |
|
|
159
|
+
| Disclosure indicator — `DisclosureArrow` | A control needs one animated 18px root-scaled visual for open and closed state, including configurable directions or a replacement icon. | Do not use it as the interactive control or accessible name; place it inside the button or control that exposes expanded state. | Pass the controlled `open` state, render it inside the owning control, author replacement icon content facing right before transforms, and override `--kui-disclosure-arrow-size` only when another visual size is required. Direction changes use the shortest rotation path, with counterclockwise chosen for a 180-degree closed-to-open tie. | Open state, interaction, accessible name, size override, replacement glyph, direction choices, and shortest-path rotation. | `@kerfjs/ui/disclosure-arrow` | [Component ownership](./component-contract.md#ownership-boundaries) |
|
|
160
|
+
| Application toolbar or heading — `Toolbar` | Leading identity, optional centered content, and trailing controls form one horizontal app bar or a page/panel/dialog heading. | Do not add bespoke heading geometry or a private wrapper; use the same zone contract everywhere. | Put identity/title text directly in a zone as `ToolbarText`; group controls and icon tiles in `ToolbarControlGroup`. | Actions, command availability, responsive relocation, state, and supporting copy below a heading. | `@kerfjs/ui/toolbar` | [Toolbar composition](../README.md#component-subpaths) |
|
|
161
|
+
| Toolbar control cluster — `ToolbarControlGroup`, `ToolbarActionLink` | Related toolbar buttons, semantic links, compact/tight controls, avatar actions, or a dropdown trigger/menu surface need one configured chrome contract. | Do not use it merely to align unrelated controls. Do not restyle anchors or dropdown parts in application CSS; use `ToolbarActionLink`, `overflow`, and `menuInset`. Web Awesome `wa-button-group` is only for an exceptional grouped-action contract. | Delegate child actions; use `ToolbarActionLink` for native navigation, `overflow="scroll"` for bounded action rows, and `menuInset` for dropdown surface padding. Use `avatarImage` instead of inserting an `img`; use `SegmentedControl` for an exclusive choice. | Actions, destinations, pressed/expanded state, content, and policy. | `@kerfjs/ui/toolbar-control-group` | [Component ownership](./component-contract.md#ownership-boundaries) |
|
|
162
|
+
| 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) |
|
|
163
|
+
| 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`. Sizes below `xlarge` are intentionally quiet identity text in default tone — do not use them as a normal-color subsection title; use `Text` with an `h2`–`h6` variant, or `ListHeader` for a list section. | 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) |
|
|
164
|
+
| Semantic block or inline text — `Text` | Ordinary application copy needs native `h1`–`h6` or `p` semantics plus standard geometry, or inline secondary copy needs a native `span` without box geometry. | Do not choose heading levels for appearance alone or recreate muted, error, small, or code utility classes. Use `ToolbarText` for toolbar identity/title content and `ListInsetText` when list-aligned prose needs full margin/border/padding geometry. | Omit `variant` for the default `p`, choose `h1`–`h6` from the document outline, or choose `span` inside a row, label, or table cell. Independently compose `tone="quiet | danger"`, `size="compact"`, and `font="monospace"`; ordinary native global, `data-_`, and `aria-_` attributes pass through. | Copy, localization, semantic variant, presentation roles, and document heading hierarchy. | `@kerfjs/ui/text` | [Text](./layout.md#text) |
|
|
165
|
+
| 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) |
|
|
166
|
+
| Equal-width columns — `Grid` | Equal-width sibling columns need a fixed count or should collapse as their container narrows, while preserving equal tracks despite intrinsic child widths. | Do not use it for intrinsic, asymmetric, spanning, or masonry tracks; use application-owned CSS grid. Do not use it for a user-operable separator; use `ResizableRegion`. | Choose fixed `columns` or typed `minColumnWidth`, plus typed `gap`, optional `flex`, and physical-side `textInsets` / `controlInsets` when the track group needs a standard text or control inset; text wins on overlap. | Child semantics/content, outer width, fixed count or minimum width, and typed gap/flex/inset choices. | `@kerfjs/ui/grid` | [Grid](./layout.md#grid) |
|
|
167
|
+
| 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) |
|
|
168
|
+
| 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) |
|
|
169
|
+
| Navigation section heading — `ListHeader` | A menu section needs a full-width label, semantic count, non-count badge, logical-end action, or real disclosure state. | Do not concatenate counts into `label` or put numeric content in `badge`; use `count` with the localized full phrase in `countLabel`. Do not add a disclosure arrow to navigation that reveals nothing. Keep its 44px hit target; do not resize its 36px square. Do not use it as a page, panel, or dialog title; use a heading `Toolbar`. | Delegate its optional action; the app controls expanded state and revealed content. Toggle mode supplies `DisclosureArrow` unless `actionIcon` replaces it. Use `triggerAttributes` only for domain `data-*` or a native popover relationship. | Section organization, valid count and localized count label, disclosure state and content, non-count badge content, popover target behavior, and policy. | `@kerfjs/ui/list-header` | [Pane geometry](../README.md#pane-and-content-geometry) |
|
|
170
|
+
| Inset self-bordered control — `ListInsetControl` | A control that owns its own border and padding but no outer margin (a search input, a `SegmentedControl`) must line up inside a `.kui-content` list with the standard 8px inline margins and stretch to fill the row. | Do not wrap a `.kui-content-item` or a `ListItem`/`ListHeader` that already owns its inline margin — that double-insets it. Do not add ad-hoc `margin`/`padding` around a bare control to align it; use this instead. | Place the self-bordered control(s) as children; they stretch to fill. It applies only the inline margin, flex stretch, and 8px gap — the child owns its own border and padding. | The control(s), their state, and action wiring. | `@kerfjs/ui/list-inset-control` | [Pane geometry](../README.md#component-subpaths) |
|
|
171
|
+
| Inset bare text — `ListInsetText` | A plain string or inline content with no margin, border, or padding of its own must sit in a `.kui-content` list with its text edge aligned to the bordered items around it. | Do not use it to wrap a component that already owns content-item geometry (`ListItem`, `StateBanner`, a `.kui-content-item`) — that double-insets it. Do not hand-roll the 8px margin / 1px border / 8px padding. | Pass the text or inline `SafeHtml` as children; it supplies the 8px inline margin, 1px transparent border, and 8px padding so the text edge lands at the standard 17px inset. Pass `sides="rl"` to keep that horizontal inset but drop the vertical margin, border, and padding for tight text layout. | The text, copy, and localization. | `@kerfjs/ui/list-inset-text` | [Pane geometry](../README.md#component-subpaths) |
|
|
172
|
+
| Self-contained content child — `ContentItem` | An ordinary surface-like child of a `Pane` or `.kui-content` stack needs the shared 8px margin / 1px border / 8px padding geometry; pass `frame="framed"` only when it marks a real distinction, `appearance="surface"` or a semantic appearance for coordinated surface colors, and `shape="pill"` for the 22px radius. | Do not wrap a component that already owns content-item geometry (`ListItem`, `ListHeader`, `StateBanner`, `Toolbar`, `ValueTable`) or pad around it — that double-insets. Do not frame an item only to make it look contained. Use `SunkenPanel` for a lowered inset stack and `ListInsetText` for bare text that only needs to align. | Pass the item content as children; choose `appearance` (`transparent` default, `surface`, or a semantic status), `frame`, and `shape` instead of writing CSS. Put safe `data-*` metadata in `rootAttributes`; `ariaLabel` names a distinct region and `focusTarget` makes it a programmatic focus target. | The content, surface or status appearance, and whether it marks a distinction worth a visible frame. | `@kerfjs/ui/content-item` | [Content items](./layout.md#content-items) |
|
|
173
|
+
| Application column — `Pane` | A sidebar, main area, inspector, or dialog needs shared vertical header/content/footer organization, one scroll owner, and optional edge separators. | Do not pad the pane shell, wrap child-owned geometry in competing insets, invent unrelated centered measures, or leave an icon-only rail for a hidden pane. | Import `Pane`, use `children` for its homogeneous primary content and the named `SafeHtml` prop slots `header`/`footer` for optional fixed chrome, then opt into only the needed logical-edge separators; add `ContentItem` children as needed. A visible pane owns collapse in its toolbar; move a hidden inline-start pane's restore control to the main toolbar leading edge and an inline-end pane's restore control to its trailing edge. | Layout hierarchy, reading width, responsive relocation, pane visibility state, slot semantics, labels, and separator placement. | `@kerfjs/ui/pane` | [Pane anatomy](./layout.md#anatomy) |
|
|
174
|
+
| Scroll dividers — `wireScrollDividers` | Pinned chrome (a `Pane` header or footer, a `NavStack` top chrome or bottom toolbar, a `TabNavigator` bar, the sides of a `TabBar` strip, or app-owned chrome around a scroller) needs a divider only while content is scrolled away beneath it. | Do not keep a static toolbar divider to fake it or write a border onto another component; each component draws its own line from the wiring's state. | Call `wireScrollDividers` once at the app root and retain the disposer; it covers every `Pane`, `NavStack`, `TabNavigator`, and `TabBar` below it. Name app-owned arrangements in `targets` by id; a `Toolbar` or `List` named as chrome draws its facing side. Configure a pane with `chromeDividers` (`scroll` default, `always`, `none`). | Which panes follow the scroll, app-owned targets, and the disposer. | `@kerfjs/ui/wire-scroll-dividers` | [Scroll dividers](./layout.md#scroll-dividers) |
|
|
175
|
+
| One-pane navigation — `NavStack` | A compact flow pushes into details while keeping earlier views mounted, or a single-pane screen needs the same stable layout contract. | Do not use it when list and detail should remain visible together; use `SplitView`. Do not use it alone for co-equal top-level destinations; use one stack per `TabNavigator` tab. | Keep the ordered view array controlled, put view-specific bottom chrome on each view (or use the component fallback), import its CSS explicitly, and call `wireNavStack` for back delegation, content-slide/chrome-cross-fade transitions, and focus move/restore. Mark a preferred initial target with `data-nav-focus` when DOM order is insufficient. | View keys/content/titles, push and pop actions, preferred initial focus targets, and per-view or persistent bottom toolbar content. | `@kerfjs/ui/nav-stack` | [App-layout decision matrix](./app-layouts.md#decision-matrix) |
|
|
176
|
+
| Responsive list-detail — `SplitView` | A primary list and related detail belong together on roomy devices but become a one-pane drill-down on compact devices. | Do not use it for a single linear flow or a multi-panel editor shell. | Provide controlled selection/detail state and device class; opt into resize wiring only when the separator is user adjustable. | Selection, detail content, compact back action, device policy, and optional persisted width. | `@kerfjs/ui/split-view` | [App-layout decision matrix](./app-layouts.md#decision-matrix) |
|
|
177
|
+
| Compact top-level destinations — `TabNavigator` | A handset or portrait-tablet app has two to five co-equal destinations whose scenes and nested navigation must remain mounted across switches. | Do not use it for document tabs, reorderable work items, or a desktop navigation rail. | Keep the active id controlled, import its CSS explicitly, and call `wireTabNavigator`; commonly place one `NavStack` in each tab scene. | Destination definitions, active id, routing, persistence, and roomy-device replacement. | `@kerfjs/ui/tab-navigator` | [App-layout decision matrix](./app-layouts.md#decision-matrix) |
|
|
178
|
+
| Desktop multi-panel workspace — `Workbench` | A desktop-class tool needs a central work area plus independently collapsible navigator, inspector, or console regions. | Do not shrink the full shell onto compact devices or use it for one standalone panel. | Render only the required rails/drawer, keep collapse state controlled, and replace peripheral regions with stacks or overlays below desktop sizes. Opt a panel into drag/keyboard resizing with `resizable` and call `wireWorkbench` with its size signal. | Panel presence/content, collapsed states, sizes, persistence, responsive replacement, and controls. | `@kerfjs/ui/workbench` | [Workbench](./workbench.md) |
|
|
179
|
+
| Standalone rail or drawer — `CollapsiblePanel` | One left/right rail or bottom drawer needs controlled collapse without adopting the complete `Workbench` shell. | Do not use it for several coordinated workspace panels or retain an empty icon-only rail while collapsed. | Pair it with `CollapsiblePanelToggle`; call `wireSidebar` for focus transfer, Escape/backdrop dismissal, compact overlay trapping, and persistence integration. | Panel content/size, collapsed state, toggle placement, persistence, and compact policy. | `@kerfjs/ui/collapsible-panel` | [App-layout decision matrix](./app-layouts.md#decision-matrix) |
|
|
180
|
+
| Lowered content surface — `SunkenPanel` | A main work area or nested content group needs one visually lowered surface with a compact inset and vertical stack. | Do not use it merely to add padding, as a replacement for `Pane` anatomy, or around children that already own the same outer surface. | Compose the application-owned content as children, choose the default `rounded` shape or `square` for a flush edge-to-edge area, and pass `ariaLabel` only when the surface is a distinct named region. | Region semantics, accessible name, shape, scroll ownership, child ordering, and content. | `@kerfjs/ui/sunken-panel` | [SunkenPanel](./sunken-panel.md) |
|
|
181
|
+
| Menu composition | Navigation sections need full-size rows and the same content-item geometry as every other pane. | Do not add sidebar-specific wrapper padding, shrink targets to icon size, nest an interactive trailing control in `ListItem`, or use a chevron on a row that does not disclose content. Use ordinary links for a different navigation contract. | Compose `ListHeader`, `ListItem`, and `ListActionRow` in `.kui-content`; use `ListHeader` toggle mode with real controlled content, and use `ContentItem` for other surfaces plus a pane footer for toolbar actions. | Information architecture, disclosure content and state, responsive drawer/shell behavior, and token overrides. | `@kerfjs/ui/layout.css` | [Pane geometry](../README.md#pane-and-content-geometry) |
|
|
182
|
+
| Resizable application pane — `ResizableRegion`, `clampRegionSize`, `resizeRegionFromPointer` | A controlled split pane needs the Kerf separator, collapse state, pointer plus keyboard resizing, or a product-specific decorative grip. | Do not use it for static equal columns; use `Grid`. Use application CSS grid for static asymmetric or intrinsic tracks. Prefer it over Web Awesome `wa-split-panel` unless that component's distinct API is required. Keep `handleIcon` noninteractive. | Call `wireResizableRegions` from `@kerfjs/ui/wire-resizable-regions` once and retain its disposer. | Size signal, min/max policy, collapse policy, persistence, and optional decorative handle icon. | `@kerfjs/ui/resizable-region` | [ResizableRegion contract](./accessibility.md#resizableregion) |
|
|
183
|
+
| One application tab — `AppTab` | A controlled app tab needs selection, close, drag, leading/trailing anatomy, compact/segmented/icon-only presentation, label truncation, safe domain metadata, or a product-specific close glyph. | Do not render it alone or use it for a small settings choice; compose in `TabBar`, or use `SegmentedControl`. Keep `closeIcon` noninteractive. | Compose in `TabBar`; let `wireTabBars` manage interaction. Put only domain `data-*` values in `rootAttributes`; use typed appearance props instead of descendant CSS. | Tab identity, order, selection, close policy, content, domain metadata values, and outer placement. | `@kerfjs/ui/app-tab` | [Tabs contract](./accessibility.md#tabs) |
|
|
184
|
+
| Application tab strip — `TabBar`, `wireTabBars`, `reorderTabs` | Tabs switch page regions and may overflow, close, reorder, fill a segmented inspector strip, sit beside a trailing action, or keep that adjacent action distinct from a far-edge end action. | Do not use it for a compact local view toggle; use `SegmentedControl`. Do not use it for a long choice list; use `Select`. Prefer it over Web Awesome `wa-tab-group`, `wa-tab`, and `wa-tab-panel` for Kerf app tabs. | Call `wireTabBars` once, retain the disposer, and apply `onReorder` synchronously; `reorderTabs` is the default array helper. Combine `trailingPlacement="adjacent"` with `end` for split actions; TabBar owns the shrinking/scrolling tab geometry and keeps both actions visible. Choose typed presentation/allocation props while the parent owns outer placement. | Ordered tabs, selection, panels, routing, closing, persistence, action content, and outer placement. | `@kerfjs/ui/tab-bar` plus `@kerfjs/ui/wire-tab-bars` | [Tabs contract](./accessibility.md#tabs) |
|
|
185
|
+
| Panel, dialog, or page heading — `Toolbar` + `ToolbarText` | A panel, dialog, or page needs an extra-large title, optional icon, grouped trailing actions, and optional supporting copy. | Do not add a private heading wrapper or bespoke layout. The toolbar supplies structure, not modal behavior; use an application overlay or Web Awesome `wa-dialog` for that behavior. In a narrow peripheral rail or drawer, where xlarge would truncate at the panel's minimum size, use the default `ToolbarText` size as pane identity. | Connect title/supporting-copy ids to the host, group controls, and delegate actions. **For a page or view title set `headingLevel` (usually `1`)** on `ToolbarText`; omit it for a dialog title referenced by `aria-labelledby`. | Open state, focus lifecycle, dismissal, controls, ids, copy, and heading level. | `@kerfjs/ui/toolbar` + `@kerfjs/ui/toolbar-text` | [Toolbar headings](./accessibility.md#toolbar-headings) |
|
|
186
|
+
| Dialog or popup geometry — `DialogSurface`, `PopupSurface` | Recurring Web Awesome dialogs need standard sizes/presentations/body/footer insets and typed modal viewport bounds, or dropdown menus need list-compatible inset ownership. | Do not use these wrappers as generic layout or to replace native dialog/dropdown behavior. Avoid consumer `::part()` overrides and do not stack a dialog body inset around list-owned child geometry. | Wrap one `wa-dialog` or `wa-dropdown`; choose the typed geometry while retaining native labeling, open state, focus, dismissal, and menu semantics. Compose a dialog body as a `List` by default, use `bodyInset="none"` when its children own list geometry, and wrap bare prose in `ListInsetText`. | State, focus lifecycle, dismissal, labels, content, and outer placement. | `@kerfjs/ui/surface-scaffold` | [Surface scaffolds](./surface-scaffold.md) |
|
|
187
|
+
| Key/value facts — `ValueTable`, `ValueTableRow` | Read-only labels and values form a semantic definition list, optionally with a leading icon. | Do not use it for editable form fields or a row/column data grid; use native form or table semantics. | Compose typed `ValueTableRow` entries; pass `icon` when a 24px leading icon adds useful context. | Values, formatting, icon meaning, and empty/loading policy. | `@kerfjs/ui/value-table` | [Component ownership](./component-contract.md#ownership-boundaries) |
|
|
188
|
+
| Indeterminate activity — `LoadingSpinner` | A Kerf surface needs compact, labeled or decorative indeterminate progress. | Do not use it for known progress; use Web Awesome `wa-progress-bar` or `wa-progress-ring`. Direct Web Awesome UI may use `wa-spinner`; do not mix spinner systems within one surface. | Pass a label when the spinner conveys status; use size for a named icon step or positive pixel size. | Loading lifecycle and adjacent status copy. | `@kerfjs/ui/loading-spinner` | [Accessibility](./accessibility.md#shared-rules) |
|
|
189
|
+
| Loading placeholder — `Skeleton` + a component's `placeholder` prop | A value or a whole component is still loading and should hold its space as a subtle, unanimated block, keeping the layout stable — an inspector or detail view rendering its real chrome with per-record values absent. | Do not use it for known progress (use `LoadingSpinner`), do not animate it, and do not hand-rebuild a component's empty state — set `placeholder` on the component instead. Prefer it over `wa-skeleton`, which the pure-Kerf primitives avoid to stay Web-Awesome-free. | Set `placeholder` on a value-bearing component (`Select`, `ListHeader`, `ListItem`, `ValueTableRow`, `SegmentedControl`, `StateBanner`, `AppTab`, `ToolbarText`, `ListActionRow`) to render skeletons in its value slots with interactivity disabled; use the standalone `Skeleton` for a custom slot. | Loading lifecycle, which slots are unknown, and announcing the loading region. | `@kerfjs/ui/skeleton` | [Accessibility](./accessibility.md#shared-rules) |
|
|
190
|
+
| Command menu — `PopupMenu` | A short list of commands sits behind one trigger, such as a toolbar sort or More menu, optionally grouped under headings and dividers with item icons. | Do not use it to choose a persistent value; use `Select`. Do not hand-write `wa-dropdown`/`wa-dropdown-item` markup for an action menu. | Import `@kerfjs/ui/popup-menu/register` once. Place it in a `single` `ToolbarControlGroup` with `nestedDropdown` and a `menuInset`, or wrap it in `PopupSurface` outside a toolbar. Handle item `action`s by delegation. | Commands, enabled state, and reactions to opening or closing. | `@kerfjs/ui/popup-menu` | [Toolbar composition](#toolbar-composition) |
|
|
191
|
+
| Value selection — `Select` | A controlled form, toolbar, or compact navigation value comes from a moderate or long choice list, possibly grouped, icon-bearing, icon-only when closed, or truncating. Set `multiple` with an array `value` when the person may choose any number of them; add `selectedPresentation="icon-only"` and a fixed `triggerIcon` for a toolbar filter menu. | Do not use it for commands; use `PopupMenu`. Do not use it for a small visible choice set; use `SegmentedControl`. Prefer it over direct `wa-select`, `wa-option`, or value-like `wa-dropdown`/`wa-dropdown-item` composition. | Import `@kerfjs/ui/select/register` once for registration and current-request animation ownership; listen for standard input/change events. Do not add consumer popup timing or positioning repairs. Use typed presentation props rather than consumer `::part()` overrides; let the parent own placement. | Controlled value, validation, choices, domain mapping, and outer placement. | `@kerfjs/ui/select` | [Web Awesome integration](../README.md#web-awesome-theme) |
|
|
192
|
+
| Small exclusive choice — `SegmentedControl` | A few visible choices switch a compact view or setting, with toolbar, rounded, or pill presentation. | Do not use it for tabpanel semantics; use `TabBar`. Do not use it for many choices; use `Select`. Prefer it over `wa-button-group` when the controls select one value. | Delegate its action, read `data-segment-value`, update `value`, and rerender. | Controlled value, labels, action, and persistence. | `@kerfjs/ui/segmented-control` | [SegmentedControl contract](./accessibility.md#segmentedcontrol) |
|
|
193
|
+
| Structured search editor — `TokenSearchField`, `readTokenSearchField`, `placeTokenSearchCaret`, `wireTokenSearchFields` | Free text and ordered, editable, removable filter tokens share one searchbox; enable `collapsible` when an empty, unfocused field should reduce to one iconic action, standalone or in a toolbar group. | Do not use it for ordinary text entry; use a native input or Web Awesome `wa-input`. Do not use it when filters belong in separate form controls. | Read DOM-owned text on input, empty `textContent` on clear, and use `placeTokenSearchCaret` after explicit controlled focus changes. Call `wireTokenSearchFields` from `@kerfjs/ui/wire-token-search-fields` once so Enter submits without adding a line break and keyboard chip deletion restores focus plus the text-relative caret after controlled replacement. In `collapsible` mode it also manages the transient expand/collapse/focus by default (activate to reveal + focus, Escape or empty blur to collapse); bind the field's `expanded` to the signal on the returned handle (`handle.expanded(id)`) or adopt your own via `collapsible.signals`, and opt out per behavior only when the app must own it. | Parsing, suggestions, tokens, query execution, results, announcements, and — only if overriding the default — the collapsible `expanded` signal. | `@kerfjs/ui/token-search-field` | [TokenSearchField contract](./accessibility.md#tokensearchfield) |
|
|
194
|
+
| Persistent inline status — `StateBanner` | A neutral, info, pop, success, warning, or danger message belongs next to the affected work; pop highlights featured or novel content without implying status. | Do not use pop as a success, warning, or danger substitute. Do not use StateBanner for a no-content screen; use `EmptyState`. Do not use it for transient confirmation; use a toast. Web Awesome `wa-callout` is the ecosystem alternative for Web Awesome-owned content. | Delegate an optional action; choose alert urgency only for attention-requiring failure. Use the optional tone-tinted `badge` for a terse count or status beside the title, not as the only expression of meaning. | State mapping, message lifetime, retry/action behavior, badge content, and copy. | `@kerfjs/ui/state-banner` | [Feedback accessibility](./accessibility.md#shared-rules) |
|
|
195
|
+
| Empty or busy content area — `EmptyState` | A content region has no items, cannot proceed, or is loading and needs explanation plus an optional action. | Do not use it for an inline status update; use `StateBanner`. Do not use it for transient success; use `wa-toast`/`wa-toast-item` or the application's toast system. | Delegate its optional action; it composes `LoadingSpinner` when busy. | Empty/busy policy, recovery action, illustration, and copy. | `@kerfjs/ui/empty-state` | [Feedback ownership](./component-contract.md#extracted-versus-application-specific) |
|
|
83
196
|
|
|
84
197
|
## Ambiguous choices
|
|
85
198
|
|
|
86
|
-
|
|
199
|
+
For a lowered background behind an entire scrolling work area, choose
|
|
200
|
+
`Pane appearance="sunken"` or the appearance option on the layout that owns
|
|
201
|
+
the scroll viewport. Use `SunkenPanel` for a padded content group that does
|
|
202
|
+
not introduce scrolling. See [Lowered work surfaces](./layout.md#lowered-work-surfaces).
|
|
203
|
+
|
|
204
|
+
Set `ResizableRegion`'s `--kui-resizable-region-background` for an inline
|
|
205
|
+
surface. An open descendant `PopupMenu` or Web Awesome dropdown automatically
|
|
206
|
+
releases clipping and raises the region on its public popup layer. Set
|
|
207
|
+
`contentOverflow="visible"` for other anchored content that must escape the
|
|
208
|
+
region. A collapsed region can place `restoreControl` in a top or bottom corner with
|
|
209
|
+
`restorePosition`, set its typed `restoreInset`, or use
|
|
210
|
+
`restorePlacement="inline"` for a control in normal flow.
|
|
211
|
+
|
|
212
|
+
Use `FloatingToolbar placement="inline"` when a restore owner supplies the
|
|
213
|
+
position. Floating placement supports per-edge `--kui-floating-toolbar-inset-*`
|
|
214
|
+
tokens; `safeAreaInsets` adds the layout-routed or device safe-area inset to
|
|
215
|
+
the positioned edges.
|
|
216
|
+
|
|
217
|
+
For a larger option row, use `ListItem density="spacious"`; `compact` and
|
|
218
|
+
`standard` remain available. `multiline` wraps its label and aligns its icon
|
|
219
|
+
to the first line; `multilineIconAlign="center"` centers the icon against the
|
|
220
|
+
whole label. `divider` owns a before or after separator. Set
|
|
221
|
+
`state="drag-target"` for the component's drop outline and background. Public
|
|
222
|
+
`--kui-list-item-*` tokens control its row, icon, label, and trailing geometry
|
|
223
|
+
and color. `ListHeader` exposes `--kui-list-header-min-height`, title padding,
|
|
224
|
+
title minimum height, and border-width tokens for section density.
|
|
225
|
+
Set `--kui-list-group-divider-color` on a containing `List` to give
|
|
226
|
+
`ListHeader`, `ListItem`, and `ListActionRow` the same before/after divider
|
|
227
|
+
color; each row otherwise uses the quiet neutral border tone.
|
|
228
|
+
For a filled command list, set `--kui-list-item-background` and
|
|
229
|
+
`--kui-list-item-border` on the list or row. Scope `--kui-list-item-color`,
|
|
230
|
+
`--kui-list-item-hover-background`, `--kui-list-item-selected-color`, and
|
|
231
|
+
`--kui-list-item-selected-background` at the same boundary for text and state
|
|
232
|
+
fills. The matching `--kui-list-item-hover-border` and
|
|
233
|
+
`--kui-list-item-selected-border` tokens set state outlines without replacing
|
|
234
|
+
ListItem CSS or neutralizing global semantic border colors.
|
|
235
|
+
|
|
236
|
+
Use `ListItemLink` from `@kerfjs/ui/list-item` for a navigation row with a
|
|
237
|
+
real `href`. It shares `ListItem` content slots, density, selection, and row
|
|
238
|
+
geometry while rendering a native anchor. `external` opens a new tab with
|
|
239
|
+
`noopener noreferrer` and announces that behavior in the default accessible
|
|
240
|
+
name. Disabled and loading links omit `href` and leave the tab order. Use
|
|
241
|
+
`ListItem` for an application action dispatched through `action`.
|
|
242
|
+
|
|
243
|
+
Use `Toolbar responsive="trailing-priority"` for a collapsible search in the
|
|
244
|
+
trailing zone that should take a full second row when expanded. `responsiveAt`
|
|
245
|
+
chooses the compact or narrow container breakpoint. The leading identity stays
|
|
246
|
+
in the first row. Set `centerAlign="balanced"` when the center zone must sit on
|
|
247
|
+
the toolbar's midpoint despite unequal or empty side content; it gives the
|
|
248
|
+
leading and trailing zones equal tracks. `--kui-toolbar-leading-min-width`,
|
|
249
|
+
`--kui-toolbar-trailing-gap`, `--kui-toolbar-trailing-justify`, and the
|
|
250
|
+
`--kui-toolbar-*-padding-inline` zone tokens adjust local geometry without
|
|
251
|
+
selecting toolbar anatomy from application CSS.
|
|
252
|
+
Set `--kui-toolbar-inset: 0px` on an embedded Toolbar that should have no outer
|
|
253
|
+
padding while keeping its `--kui-toolbar-gap` between control zones. The token
|
|
254
|
+
also reduces its minimum height by the removed inset; safe-area compensation
|
|
255
|
+
still adds to the chosen inset on claimed edges.
|
|
256
|
+
|
|
257
|
+
For compact dialog copy, use `Text flush lineHeight="tight"`; block Text still
|
|
258
|
+
resets native margins. `ValueTable density="compact"` reduces row padding and
|
|
259
|
+
gap. Its `--kui-value-table-row-columns`, `--kui-value-table-row-padding-block`,
|
|
260
|
+
and `--kui-value-table-row-gap` tokens support a specific metadata layout.
|
|
261
|
+
Use `ToolbarText size="xsmall"` for a dense rail heading. Use
|
|
262
|
+
`size="xlarge-fixed"` for a toolbar heading at the fixed 20px step; `xlarge`
|
|
263
|
+
retains the responsive page-title clamp. Pass `headingLevel` when the text is
|
|
264
|
+
a section landmark. A `TokenSearchField` editor can shrink to zero minimum width inside a narrow
|
|
265
|
+
group; set `--kui-token-search-editor-min-width` only when a wider editor is
|
|
266
|
+
required.
|
|
267
|
+
|
|
268
|
+
- `Toolbar` serves persistent app chrome and headings; the zone contents and accessible naming distinguish the purpose.
|
|
87
269
|
- `TabBar` changes tabpanels and supports overflow/reorder; `SegmentedControl` chooses among a few compact views; `Select` handles a longer value list.
|
|
270
|
+
|
|
271
|
+
Use `AppTab presentation="icon-only"` with its `name` kept as the accessible
|
|
272
|
+
tab name. For segmented tabs that should show names in a wide reader and icons
|
|
273
|
+
in a narrower container, set `TabBar iconOnlyAt="wide"` (832px), `"narrow"`
|
|
274
|
+
(704px), or `"compact"` (448px), and give each segmented `AppTab` a leading
|
|
275
|
+
icon. The tablist's own width controls the switch; the visually hidden name
|
|
276
|
+
remains its accessible name. Use `labelMaxWidth` for an ellipsized visible name. Set `attention`
|
|
277
|
+
to color a tab's name with `--kui-app-tab-attention-color`. Set `dropTarget`
|
|
278
|
+
while an app drag is over a tab's content; the tab keeps its selection semantics
|
|
279
|
+
and uses the `--kui-app-tab-drop-target-*` tokens for its highlight. Set
|
|
280
|
+
`nameOverflow="visible"` when an inline loading treatment needs the full name
|
|
281
|
+
instead of the default ellipsis. A `TabBar` owns its
|
|
282
|
+
scrolling strip; its public `--kui-tab-bar-strip-*` tokens configure strip
|
|
283
|
+
height, spacing, border, radius, background, and scroll inset without styling
|
|
284
|
+
its internal classes. `--kui-tab-bar-trailing-flex` controls the trailing zone.
|
|
285
|
+
For a distinct application action, use `end` to pin it at the far edge; use
|
|
286
|
+
`trailingPlacement="adjacent"` to keep a tab-local `trailing` action beside the
|
|
287
|
+
strip. Each zone accepts one `ToolbarControlGroup` or one standalone
|
|
288
|
+
`wa-button` for a primary action with its own chrome. Avoid wrappers and
|
|
289
|
+
application flex overrides.
|
|
290
|
+
Set `pinned` on the first `AppTab` when that tab must remain visible as peers
|
|
291
|
+
scroll. It stays inside the tablist and keyboard order. Set the `TabBar`
|
|
292
|
+
`snapTabs` prop when scrolling peers should settle at whole-tab starts
|
|
293
|
+
beside that pinned tab. `wireTabBars` measures the pinned inset and provides
|
|
294
|
+
enough end scroll room for the last peer to align there; a partial peer can
|
|
295
|
+
still appear at the trailing edge as an overflow cue. This mode also aligns a
|
|
296
|
+
newly selected tab at the pinned edge in LTR and RTL. Set the prop on the bar,
|
|
297
|
+
without styling its strip or tab internals.
|
|
298
|
+
Set the public
|
|
299
|
+
`--kui-app-tab-pinned-background` token if the surrounding surface differs from
|
|
300
|
+
the default; the pinned tab must cover peers as they scroll beneath it. Its
|
|
301
|
+
background also covers the strip's inline padding and border so scrolled labels
|
|
302
|
+
cannot paint beside the pinned edge, including in right-to-left strips. The
|
|
303
|
+
backing follows the tab's pill radius, keeping a selected pinned tab's corners
|
|
304
|
+
and shadow whole beside the overflow divider. Call
|
|
305
|
+
`wireTabBars` for keyboard selection and reorder behavior and its WebKit RTL
|
|
306
|
+
scroll correction.
|
|
307
|
+
|
|
88
308
|
- `StateBanner` persists beside affected work; `EmptyState` replaces absent content; `wa-callout` is contextual ecosystem content; `wa-toast` and `wa-toast-item` are transient and must not carry the only copy of important state.
|
|
89
|
-
|
|
309
|
+
|
|
310
|
+
For a banner with multi-line supporting copy, use `copyLayout="stacked"` to put
|
|
311
|
+
the detail below the title and badge. Use `actionPlacement="below"` when its
|
|
312
|
+
action needs a separate trailing row. The default values keep both inline;
|
|
313
|
+
`--kui-state-banner-copy-gap` and `--kui-state-banner-copy-row-gap` adjust the
|
|
314
|
+
stacked copy's spacing at an instance boundary.
|
|
315
|
+
|
|
316
|
+
For a compact `Select`, set `triggerWidth` to `"fit-content"`, `"max-content"`,
|
|
317
|
+
or `"fill"` and cap it with `--kui-select-trigger-max-width` when needed.
|
|
318
|
+
For a round icon-only toolbar trigger, set `selectedPresentation="icon-only"`
|
|
319
|
+
and `caret={false}`. The control keeps its accessible name, current choice help
|
|
320
|
+
tag, and keyboard-operated listbox; the selected icon stays centered even when
|
|
321
|
+
`renderSelected` supplies it. The default keeps the visible caret.
|
|
322
|
+
Custom `renderSelected` text inherits the control color by default; the
|
|
323
|
+
`--kui-select-selected-color`, `--kui-select-selected-font-size`, and
|
|
324
|
+
`--kui-select-selected-font-weight` tokens configure its typography. Plain
|
|
325
|
+
selected text stays on one ellipsized line when the trigger narrows.
|
|
326
|
+
|
|
327
|
+
For an unavailable entry, set `SelectChoice.disabled` and optionally
|
|
328
|
+
`disabledReason`; the option stays visible but cannot be chosen. A multiple
|
|
329
|
+
`Select` can opt in to `selectAllLabel` and `clearLabel` footer buttons.
|
|
330
|
+
Select all includes only enabled choices, Clear removes the selection, and
|
|
331
|
+
both report changes through the normal `input` and `change` events. The app
|
|
332
|
+
still owns the controlled `value` and localized action labels.
|
|
333
|
+
|
|
334
|
+
- `ResizableRegion` is an interactive controlled pane. `Grid` is the right answer for static equal-width columns; application CSS grid remains the answer for asymmetric or intrinsic tracks.
|
|
335
|
+
- A `ResizableRegion`'s content spans the whole region, like its separator. Give
|
|
336
|
+
it one child — normally a `Pane` — and that child fills the region, so the
|
|
337
|
+
pane reaches the region's far edge and owns scrolling for long content.
|
|
338
|
+
Several children stack at their natural height. Do not size the child with
|
|
339
|
+
application `height` rules. While expanded, slide-motion content follows the
|
|
340
|
+
region's actual track, so a region its parent clamps (a `max-width`, a narrow
|
|
341
|
+
container) never shows content past its separator; the fixed expanded size
|
|
342
|
+
applies only while the collapsed content slides out.
|
|
343
|
+
- A `ResizableRegion` overlay automatically clamps both its track and fixed-size
|
|
344
|
+
animated content to the responsive overlay maximum. Set the policy and maximum
|
|
345
|
+
on the component instead of adding application descendant width/height fixes.
|
|
346
|
+
It paints `--kui-color-surface` itself (an inline region stays transparent),
|
|
347
|
+
so do not add a background to make an overlay opaque.
|
|
348
|
+
- Give `Workbench` panels a `toolbar` (title, `leading` / `center` / `trailing`
|
|
349
|
+
groups, and a standard `toggle`) and the work area a `mainToolbar` /
|
|
350
|
+
`mainBottomToolbar`: the Workbench moves a closed panel's groups marked
|
|
351
|
+
`relocateOnCollapse`
|
|
352
|
+
and toggle into the work area's toolbar, so never hand-place or duplicate
|
|
353
|
+
panel toggles. See [Workbench panel toolbars](workbench.md#panel-toolbars).
|
|
354
|
+
- Configure application panels through the shared `separator`, `collapseMotion`,
|
|
355
|
+
`contentOverflow`, `presentation`, `restoreControl`, and `restorePosition`
|
|
356
|
+
props on `ResizableRegion`, `Workbench` panels, and `CollapsiblePanel`. These
|
|
357
|
+
cover separator suppression, one-reflow collapse with composited motion,
|
|
358
|
+
bottom-drawer popups, compact overlays or replacements, and safe-area restore
|
|
359
|
+
placement without descendant `.kui-*` overrides. A `Workbench` rail's
|
|
360
|
+
or bottom drawer's `responsiveOverlayAt` (like `ResizableRegion`'s
|
|
361
|
+
`responsiveFillAt`) switches it to an overlay below a container breakpoint
|
|
362
|
+
without a device-class check.
|
|
363
|
+
`wireSidebar` also accepts a
|
|
364
|
+
hidden compact replacement and keeps compact overlays exclusive by default.
|
|
90
365
|
- `TokenSearchField` is a structured editor. A native input or `wa-input` is the right answer for ordinary text.
|
|
91
366
|
|
|
367
|
+
For common structured search, use `createTokenSearchModel` from `@kerfjs/ui/token-search-model`, pass the model to `TokenSearchField`, and register it under the field id in `wireTokenSearchFields(root, { models })`. Rules parse `name:value` expressions and provide suggestions; the model owns chips, selection, removal, clear, and an optional evaluation result. Omit `model` and `models` for full manual control.
|
|
368
|
+
|
|
369
|
+
In a form, use `TokenSearchField presentation="form-field"` with its `label`,
|
|
370
|
+
optional `hint`, and `required` state. It renders a full-width control beside
|
|
371
|
+
`wa-input` without a Toolbar or extra inline inset. The app validates required
|
|
372
|
+
search content before saving.
|
|
373
|
+
The form-field corners and required marker use the same Web Awesome
|
|
374
|
+
form-control radius, marker color, and offset tokens as a neighboring
|
|
375
|
+
`wa-input`.
|
|
376
|
+
The four public color tokens (`--kui-token-search-background`,
|
|
377
|
+
`--kui-token-search-border`, `--kui-token-search-token-background`, and
|
|
378
|
+
`--kui-token-search-token-foreground`) inherit from an app ancestor or the
|
|
379
|
+
field's root. `className` marks that root, including the outer wrapper in
|
|
380
|
+
`form-field` presentation, so one app class can configure either form.
|
|
381
|
+
`TokenSearchRule.suggest(input, state)` receives the unfinished value and current committed tokens, so a rule can omit values already selected. Existing one-argument suggestion callbacks continue to work.
|
|
382
|
+
For a sibling date picker or other app helper, call `model.commit(value)` while a `name:` prefix is active. It parses and commits that value for the active rule even when it is absent from suggestions, replacing the unfinished prefix text. Invalid values and calls without an active prefix leave the query unchanged; `choose(value)` remains restricted to suggested tokens.
|
|
383
|
+
To apply a saved search or restore a query programmatically, call `model.replace({ query, tokens })`. It publishes parsed state and rebuilds the DOM-owned editor text even when no chip changed. For a field without a model, change the field's `revision` prop when setting `query` yourself.
|
|
384
|
+
When one root contains both kinds of field, a registered model enables chip keyboard behavior only for its own field. Other fields keep native editing unless the root opts into `keyboard` with an application removal callback.
|
|
385
|
+
For an icon action at the end of the field, pass `trailingAction` with `icon`,
|
|
386
|
+
accessible `label`, and delegated `action` (plus optional `id`). The component
|
|
387
|
+
renders a button that fills the trailing hit target. Reserve `trailing` for
|
|
388
|
+
passive content such as a shortcut hint.
|
|
389
|
+
Set `fill` on a collapsible `TokenSearchField` in a stretched Toolbar center to
|
|
390
|
+
use the available width when expanded; the field and its search group retain
|
|
391
|
+
their compact widths when collapsed.
|
|
392
|
+
When the expanded toolbar field has focus, its inset surface uses
|
|
393
|
+
`--kui-token-search-background` or the default surface color if that token is
|
|
394
|
+
unset.
|
|
395
|
+
|
|
396
|
+
`ToolbarControlGroup.tileTone` selects `neutral`, `brand`, `success`, `warning`, or `danger` quiet fill, matching quiet border, and on-quiet foreground for a non-interactive icon tile. Compose a contained `single` group whose only child is a direct decorative LucideIcon (`aria-hidden="true"`). Omission preserves the normal group palette. The prop does not recolor interactive, mixed, multi-control, or borderless groups; keep real actions in controls with their existing focus/hover/pressed treatments.
|
|
397
|
+
|
|
92
398
|
## Toolbar composition
|
|
93
399
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
400
|
+
Use `ToolbarText tone="dark"` on a loud or photo-backed toolbar surface to
|
|
401
|
+
match dark control groups. It applies to read-only headings and actionable
|
|
402
|
+
titles at every size; default tone retains existing identity and heading colors.
|
|
403
|
+
|
|
404
|
+
A `FloatingToolbar` accepts `ToolbarControlGroup` directly as its children in
|
|
405
|
+
both floating and inline placement. Name the toolbar with `label`; group its
|
|
406
|
+
controls as you would in a `Toolbar` zone.
|
|
407
|
+
|
|
408
|
+
A `Toolbar` has three zones — `leading`, `center`, and `trailing`. Each accepts
|
|
409
|
+
`KerfUiContent` directly, including a status `Chip`, a native control, or
|
|
410
|
+
application markup. `ToolbarText` is the standard identity/title; use
|
|
411
|
+
`ToolbarControlGroup` when related controls should share its chrome, sizing,
|
|
412
|
+
hover treatment, or overflow behavior. A standalone primary `wa-button` keeps
|
|
413
|
+
its own Web Awesome chrome and fits naturally in the trailing zone. Bare
|
|
414
|
+
controls retain their own styling and accessibility responsibilities; the
|
|
415
|
+
toolbar only positions them within the zone.
|
|
416
|
+
For a title that opens an editor, set `action` on a direct `ToolbarText`: it
|
|
417
|
+
renders a native button that keeps its content width when possible and
|
|
418
|
+
ellipsizes before an adjacent status chip when the leading zone narrows. The
|
|
419
|
+
application handles the delegated action and replaces it with its own input
|
|
420
|
+
while editing. Use a separate heading landmark if the view needs one.
|
|
421
|
+
For a search or cluster that needs shared toolbar geometry, place
|
|
422
|
+
`SegmentedControl`, `Select`, or `TokenSearchField` inside a
|
|
423
|
+
`ToolbarControlGroup`. The ToolbarText catalog's actionable-title example
|
|
424
|
+
places its status `Chip` directly beside the title while the search uses a
|
|
425
|
+
group. For a page, panel, or
|
|
426
|
+
dialog heading, put an extra-large `ToolbarText` directly in the leading zone,
|
|
427
|
+
optionally preceded by a grouped icon, and group trailing actions. Keep supporting
|
|
428
|
+
copy below as app-owned content. Size the title to its track: a narrow
|
|
429
|
+
peripheral rail or drawer (a navigator, inspector, or console beside a work
|
|
430
|
+
area that carries the extra-large title, often with its own close control in
|
|
431
|
+
the header) labels itself with the default size, because extra-large truncates
|
|
432
|
+
there — "Inspector" becomes "Ins…" in a 160px rail. By default, nothing wraps
|
|
433
|
+
inside a `ToolbarControlGroup`: an icon sits beside its label on one row and the
|
|
434
|
+
group sizes to its content, so a row that does not fit relocates whole groups
|
|
435
|
+
through the toolbar's `responsive` policy. For independent action links that
|
|
436
|
+
must all remain visible, set `overflow="wrap"`: whole links move to another
|
|
437
|
+
row inside the group without breaking an icon from its label. Use
|
|
438
|
+
`overflow="scroll"` when a single-row action strip is intentional. A
|
|
439
|
+
toolbar draws no divider by default: pinned over or under scrolling content,
|
|
440
|
+
it gets one from the scroll state instead — the `Pane` it heads draws the line
|
|
441
|
+
only while content is scrolled beneath it, once `wireScrollDividers` is wired
|
|
442
|
+
(see [Scroll dividers](./layout.md#scroll-dividers)). Set `dividerSides` to the
|
|
443
|
+
canonical physical-edge combinations (`t`, `r`, `b`, `l`, in that order—for
|
|
444
|
+
example `b`, `tr`, or `trbl`) only when the toolbar owns a permanent separator
|
|
445
|
+
edge. Dividers earn their place: never fake one with a border or pad below one
|
|
446
|
+
to make it look right.
|
|
447
|
+
|
|
448
|
+
`Toolbar` renders a semantic `header` by default. Set `position="footer"`
|
|
449
|
+
for a toolbar at the bottom of a pane or page; Workbench's
|
|
450
|
+
`mainBottomToolbar` and the catalog resource bar apply this automatically.
|
|
451
|
+
The position changes the HTML element without changing zones or geometry.
|
|
103
452
|
|
|
104
453
|
Common toolbar patterns:
|
|
105
454
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
|
455
|
+
For a long-running icon action, set `busy` on its single-control
|
|
456
|
+
`ToolbarControlGroup` and supply a descriptive `busyLabel`. The group preserves
|
|
457
|
+
the control's dimensions, shows `LoadingSpinner` in its icon slot, sets
|
|
458
|
+
`aria-busy`, and makes the control inert until the app clears `busy`.
|
|
459
|
+
|
|
460
|
+
| Want | Put in the zone | Notes |
|
|
461
|
+
| ------------------------------ | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
462
|
+
| Identity or title text | `<ToolbarText text="…" size="large" />` (or `xlarge` for a page/panel title that fits) | Wrap in a `single` borderless group only when it must align with adjacent control pills |
|
|
463
|
+
| One or more icon/text buttons | `<ToolbarControlGroup>{buttons}</ToolbarControlGroup>` | Use `buttonAppearance="push"` for toggle buttons with `aria-pressed`; `single` for a lone control |
|
|
464
|
+
| One primary application action | `trailing={<wa-button variant="brand">New ticket…</wa-button>}` | The standalone button keeps its Web Awesome chrome; use `variant="danger"` when the action is destructive |
|
|
465
|
+
| An exclusive view switch | `<ToolbarControlGroup><SegmentedControl … /></ToolbarControlGroup>` | Not `TabBar`, which switches tabpanels |
|
|
466
|
+
| A value list | `<ToolbarControlGroup><Select … /></ToolbarControlGroup>` | Register `@kerfjs/ui/select/register` once; use `focusRingOwner="group"` so focus follows the group's geometry |
|
|
467
|
+
| A command menu | `<ToolbarControlGroup single nestedDropdown><PopupMenu … /></ToolbarControlGroup>` | Register `@kerfjs/ui/popup-menu/register` once; set `menuInset` on the group |
|
|
468
|
+
| A collapsible search box | `<ToolbarControlGroup single><TokenSearchField collapsible … /></ToolbarControlGroup>` | The group animates the iconic ↔ expanded states; `wireTokenSearchFields` manages expand/collapse/focus by default |
|
|
469
|
+
|
|
470
|
+
### Application surfaces below search
|
|
471
|
+
|
|
472
|
+
Pass `expandedOverflow="visible"` to `ToolbarControlGroup content="search"`
|
|
473
|
+
when an application-owned suggestion list, date picker, or help surface extends
|
|
474
|
+
below it. The group is the positioning containing block, retains auto height,
|
|
475
|
+
and permits overflow only while `expanded` is true. Omission or `"clip"` keeps
|
|
476
|
+
existing behavior, including Kerf's built-in suggestions. Other content modes
|
|
477
|
+
and collapsed searches keep their existing overflow rules.
|
|
478
|
+
|
|
479
|
+
```tsx
|
|
480
|
+
<ToolbarControlGroup content="search" expanded={open} expandedOverflow="visible">
|
|
481
|
+
<TokenSearchField id="ticket-search" label="Search tickets" presentation="toolbar-group" collapsible expanded={open} />
|
|
482
|
+
{open ? <AppDatePicker data-token-search-keep-open /> : null}
|
|
483
|
+
</ToolbarControlGroup>
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
The application owns placement (for example absolute positioning below the
|
|
487
|
+
group), stacking, dismissal, and hiding/removing its surface on collapse. Mark
|
|
488
|
+
focusable floating content `data-token-search-keep-open`, or configure
|
|
489
|
+
`collapsible.keepOpenOn`, to keep an empty field open when focus enters it.
|
|
490
|
+
This prop does not escape clipping imposed by an ancestor or create a top-layer
|
|
491
|
+
popover. Do not override the group's position, height, or overflow in app CSS.
|
|
113
492
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
493
|
+
### Popup menu migration
|
|
494
|
+
|
|
495
|
+
A **popup menu in a toolbar** is a `PopupMenu` (`@kerfjs/ui/popup-menu`) in a
|
|
496
|
+
`single` `ToolbarControlGroup` with `nestedDropdown`; the group sizes the trigger
|
|
497
|
+
as a toolbar button and `menuInset` sets the menu's inset. `PopupMenu` renders the
|
|
498
|
+
Web Awesome dropdown, its trigger, and its typed items (commands, headings, and
|
|
499
|
+
dividers), and keeps Web Awesome's managed children out of the morph. Register
|
|
500
|
+
`@kerfjs/ui/popup-menu/register` once. Do not hand-write `wa-dropdown` markup for a
|
|
501
|
+
menu.
|
|
119
502
|
|
|
120
503
|
```tsx
|
|
121
|
-
<ToolbarControlGroup single>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
504
|
+
<ToolbarControlGroup single nestedDropdown menuInset="compact">
|
|
505
|
+
<PopupMenu
|
|
506
|
+
label="Sort"
|
|
507
|
+
icon={<LucideIcon icon={ArrowDownAZ} name="arrow-down-a-z" />}
|
|
508
|
+
items={[
|
|
509
|
+
{ label: "Recently updated", action: "sort-recent" },
|
|
510
|
+
{ label: "Priority", action: "sort-priority" },
|
|
511
|
+
]}
|
|
512
|
+
/>
|
|
129
513
|
</ToolbarControlGroup>
|
|
130
514
|
```
|
|
131
515
|
|
|
516
|
+
Nested decisions use an item with `submenu`. Children keep their own actions,
|
|
517
|
+
`attributes` metadata, icons, `checked` state, disabled state and
|
|
518
|
+
`disabledReason` tooltip. Nested `heading` and `divider` entries group those
|
|
519
|
+
commands without entering keyboard navigation. `tone: 'danger'` maps to the Web Awesome destructive
|
|
520
|
+
variant. A parent can sit among ordinary commands and dividers, so the same
|
|
521
|
+
items shape covers single-line and batch actions; compute each batch child's
|
|
522
|
+
`disabled` state from the current selection.
|
|
523
|
+
|
|
524
|
+
```tsx
|
|
525
|
+
<PopupMenu
|
|
526
|
+
label="Line actions"
|
|
527
|
+
items={[
|
|
528
|
+
{ label: 'Copy reference', action: 'copy-reference', attributes: { 'data-item-id': lineId } },
|
|
529
|
+
{ label: 'Decide', submenu: [
|
|
530
|
+
{ kind: 'heading', label: 'Review' },
|
|
531
|
+
{ label: 'Approve', action: 'decide', checked: current === 'approve', attributes: { 'data-item-id': lineId, 'data-decision': 'approve' } },
|
|
532
|
+
{ label: 'Reject', action: 'decide', tone: 'danger', disabled: needsPrice, disabledReason: needsPrice ? 'Add a price first' : undefined, attributes: { 'data-item-id': lineId, 'data-decision': 'reject' } },
|
|
533
|
+
{ kind: 'divider' },
|
|
534
|
+
{ label: 'Other…', action: 'choose-other' },
|
|
535
|
+
] },
|
|
536
|
+
{ kind: 'divider' },
|
|
537
|
+
{ label: 'Remove', action: 'remove', tone: 'danger' },
|
|
538
|
+
]}
|
|
539
|
+
/>
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
For a flat command menu with persistent sort choices, group commands under
|
|
543
|
+
`heading` entries and set `checked` explicitly on each choice. Checked rows
|
|
544
|
+
show a checkmark; the background marks the current keyboard row, as in `Select`.
|
|
545
|
+
Only items with `checked: true` or `checked: false` reserve checkmark space.
|
|
546
|
+
Omit `checked` for a plain command, including one beside checkbox items.
|
|
547
|
+
Commands still dispatch their own `data-action` once on pointer and keyboard
|
|
548
|
+
selection.
|
|
549
|
+
|
|
550
|
+
For a row opened by right-click, render `PopupMenu` with `context`, `label`,
|
|
551
|
+
and a stable root `data-*` marker. Its trigger is an invisible anchor removed
|
|
552
|
+
from the accessibility tree; a separate visible button may stay disabled. In
|
|
553
|
+
the app's `contextmenu` handler, find that root, call `openPopupMenuAt` with
|
|
554
|
+
the menu and `event.clientX` / `event.clientY`, and prevent the browser
|
|
555
|
+
menu. Call `closePopupMenu` for programmatic dismissal. The pointer anchor
|
|
556
|
+
retains Web Awesome's collision placement, focus management, submenu keyboard
|
|
557
|
+
navigation, and outside/Escape dismissal.
|
|
558
|
+
|
|
559
|
+
## Configuring recurring list rows
|
|
560
|
+
|
|
561
|
+
Configure the List family instead of selecting its descendant classes. Use
|
|
562
|
+
`density="compact"` for result-heavy panes, `description` for the secondary
|
|
563
|
+
label line, `status` for dormant state text, and `busy` for known progress that
|
|
564
|
+
keeps current content visible. `divider` marks group boundaries without an
|
|
565
|
+
app-owned separator rule. `ListHeader.indicatorTone` gives count, badge, or
|
|
566
|
+
status content neutral, accent, pop, or danger attention. Pop marks featured or
|
|
567
|
+
novel content without claiming a status transition.
|
|
568
|
+
|
|
569
|
+
When a row needs a context action, use `ListActionRow`; its two native buttons
|
|
570
|
+
remain siblings. `trailingActionVisibility="interaction"` keeps the action
|
|
571
|
+
available on hover and keyboard focus and automatically leaves it visible on
|
|
572
|
+
non-hover devices. These props own presentation only—the application still
|
|
573
|
+
owns labels, status meaning, action policy, selection, and domain metadata.
|
|
574
|
+
|
|
132
575
|
## Correct composition and duplicated-markup trap
|
|
133
576
|
|
|
134
577
|
Correct: let the pane stay unpadded while its children own the shared 8/1/8
|
|
135
578
|
geometry and 44px targets.
|
|
136
579
|
|
|
137
580
|
```tsx
|
|
138
|
-
<aside
|
|
139
|
-
<nav class="kui-pane__content kui-content">
|
|
581
|
+
<Pane element="aside" contentElement="nav" label="Workspace" contentLabel="Workspace pages">
|
|
140
582
|
<section>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
583
|
+
<ListHeader label="Workspace" />
|
|
584
|
+
<ListItem action="open" label="Inbox" icon={inboxIcon} />
|
|
585
|
+
<ListActionRow
|
|
586
|
+
action="open-file"
|
|
587
|
+
label="main.ts"
|
|
588
|
+
trailingAction="file-actions"
|
|
589
|
+
trailingActionLabel="Actions for main.ts"
|
|
590
|
+
trailingActionIcon={moreIcon}
|
|
591
|
+
/>
|
|
144
592
|
</section>
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
</aside>
|
|
593
|
+
<ContentItem>Workspace details</ContentItem>
|
|
594
|
+
</Pane>
|
|
148
595
|
```
|
|
149
596
|
|
|
597
|
+
When that child is a selectable card, configure `ContentItem` with
|
|
598
|
+
`interactive`, `action`, `itemId`, and a `selectionMode`; wire
|
|
599
|
+
`wireContentItems` once for Enter and Space. The component owns selection,
|
|
600
|
+
hover, focus, and disabled paint in its reserved 1px frame (see
|
|
601
|
+
[Content items](./layout.md#content-items)).
|
|
602
|
+
For a multi-select card containing its own controls, place
|
|
603
|
+
`selectionMode="multiple"` ContentItems inside a labeled
|
|
604
|
+
`List selectionMode="multiple"`; the app supplies each card's `selected`
|
|
605
|
+
state and handles range gestures.
|
|
606
|
+
For wrapped document tiles, use `Grid minColumnWidth={px(160)}` with
|
|
607
|
+
`selectionMode="multiple"` and `ariaLabel`. The same ContentItem row/gridcell
|
|
608
|
+
contract applies, while `wireContentItems` follows the rendered tile layout
|
|
609
|
+
with all four arrow keys.
|
|
610
|
+
|
|
150
611
|
Incorrect: duplicating component-like rows and compensating for nested padding
|
|
151
612
|
forks the package anatomy and spacing contract.
|
|
152
613
|
|
|
153
614
|
```tsx
|
|
154
615
|
<aside class="sidebar padded">
|
|
155
|
-
<h2 class="
|
|
616
|
+
<h2 class="list-header-copy">Workspace</h2>
|
|
156
617
|
<button class="menu-row-copy padded">Inbox</button>
|
|
157
618
|
<div class="panel indented-with-negative-margin">Workspace details</div>
|
|
158
619
|
</aside>
|
|
159
620
|
```
|
|
160
621
|
|
|
622
|
+
## Removable tags
|
|
623
|
+
|
|
624
|
+
Use `Chip` when a short tag has a remove action. `removeAction` becomes the
|
|
625
|
+
native button's `data-action`; `removeLabel` must name the specific tag for
|
|
626
|
+
assistive technology. Use `itemId` for the application's delegated handler.
|
|
627
|
+
The application updates its tag list after the action. `size="compact"` uses a
|
|
628
|
+
20px chip with a 16px remove button, and `disabled` disables removal. Tone,
|
|
629
|
+
appearance, and shape use the same semantic choices as `Badge`; use `Badge`
|
|
630
|
+
when no removal is needed and the content is status or count metadata.
|
|
631
|
+
Pass an unsized, decorative `LucideIcon` through `icon` for a leading glyph;
|
|
632
|
+
Chip sizes it to its own type scale and aligns it beside the label. For a long
|
|
633
|
+
plain-text label, set `truncate`: the chip can shrink within a `Row`, its label
|
|
634
|
+
gets a one-line ellipsis, and the full string is the label's native `title`.
|
|
635
|
+
Keep a price or other unbreakable sibling in `Text wrap="nowrap"`. `truncate`
|
|
636
|
+
requires a string label so the title cannot lose text hidden inside markup.
|
|
637
|
+
|
|
638
|
+
```tsx
|
|
639
|
+
<Chip
|
|
640
|
+
size="compact"
|
|
641
|
+
tone="info"
|
|
642
|
+
itemId={tag.id}
|
|
643
|
+
removeAction="remove-tag"
|
|
644
|
+
removeLabel={`Remove ${tag.name} tag`}
|
|
645
|
+
>
|
|
646
|
+
{tag.name}
|
|
647
|
+
</Chip>
|
|
648
|
+
```
|
|
649
|
+
|
|
161
650
|
## Web Awesome overlap policy
|
|
162
651
|
|
|
163
652
|
Web Awesome catalog coverage means supported and themed, not preferred. Import
|
|
164
653
|
`@kerfjs/ui/webawesome` for Kerf JSX types, individual component modules for
|
|
165
|
-
registration, and the CSS-only `@kerfjs/ui/webawesome.css` theme.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
| `wa-
|
|
654
|
+
registration, and the CSS-only `@kerfjs/ui/webawesome.css` theme. The UX catalog
|
|
655
|
+
marks the superseded or exceptional choices below with a visible `Discouraged`
|
|
656
|
+
tag; Popup remains untagged because low-level anchored positioning can be the
|
|
657
|
+
right primitive. Never render a `Discouraged` element directly in application,
|
|
658
|
+
demo, or recipe markup: reach it only through the Kerf component that wraps or
|
|
659
|
+
replaces it (`PopupMenu` renders `wa-dropdown`; `Select` renders `wa-select` /
|
|
660
|
+
`wa-option`), and file a component gap rather than dropping to the raw tag.
|
|
661
|
+
|
|
662
|
+
| Web Awesome choice | Kerf decision |
|
|
663
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
664
|
+
| `wa-button`, `wa-dropdown`, `wa-dropdown-item` | Use buttons for actions and `PopupMenu` for a command menu, never raw dropdown markup. Use `ListItem` for a navigation row and `Select` for a value. |
|
|
665
|
+
| `wa-button-group` | Use only for exceptional grouped actions; use `SegmentedControl` for one-of-many selection. |
|
|
666
|
+
| `wa-input`, `wa-tag` | Use `Chip` for removable or disabled tags; use `TokenSearchField` only when text and ordered filter tokens form one editor. |
|
|
667
|
+
| `wa-select`, `wa-option` | Use `Select`, which owns Kerf spacing, controlled rendering, icon stability, and explicit registration. |
|
|
668
|
+
| `wa-tab-group`, `wa-tab`, `wa-tab-panel` | Use `TabBar`/`AppTab` for application tabs or `SegmentedControl` for compact local views. |
|
|
669
|
+
| `wa-icon` | Use `LucideIcon` in application UI. |
|
|
670
|
+
| `wa-split-panel` | Use `ResizableRegion` for Kerf application panes; retain Split Panel only when its distinct API is required. |
|
|
176
671
|
| `wa-spinner`, `wa-progress-bar`, `wa-progress-ring`, `wa-skeleton` | Use `LoadingSpinner` for compact Kerf indeterminate activity; choose the ecosystem component when its distinct progress or placeholder semantics fit. |
|
|
177
|
-
| `wa-callout`, `wa-toast`, `wa-toast-item`
|
|
178
|
-
| `wa-popup`, `wa-tooltip`, `wa-popover`
|
|
179
|
-
| `wa-tree`, `wa-tree-item`, `wa-animated-image`, `wa-comparison`
|
|
180
|
-
| `wa-zoomable-frame`
|
|
672
|
+
| `wa-callout`, `wa-toast`, `wa-toast-item` | Use `StateBanner` for persistent inline app status, `EmptyState` for absent content, and toasts only for transient feedback. |
|
|
673
|
+
| `wa-popup`, `wa-tooltip`, `wa-popover` | Prefer the high-level interaction whose semantics fit. Use Popup only when its low-level anchored positioning removes custom placement code. |
|
|
674
|
+
| `wa-tree`, `wa-tree-item`, `wa-animated-image`, `wa-comparison` | Use only for the specialized behavior named by the component. |
|
|
675
|
+
| `wa-zoomable-frame` | Avoid for application UI; keep embedded-media behavior application-owned. |
|
|
181
676
|
|
|
182
677
|
All other entries in the [Web Awesome theme contract](./webawesome-theme.md#coverage)
|
|
183
678
|
remain supported when their native semantic contract matches the product need.
|
|
679
|
+
|
|
680
|
+
### Toolbar width visibility
|
|
681
|
+
|
|
682
|
+
`ToolbarText` and `ToolbarControlGroup` accept typed `hideBelow` and
|
|
683
|
+
`showBelow` CSS lengths. Call `wireToolbarVisibility` with the application root from
|
|
684
|
+
`@kerfjs/ui/wire-toolbar-visibility` after mounting, and call its disposer when
|
|
685
|
+
the application unmounts. The nearest Toolbar's **content-box width**, excluding
|
|
686
|
+
padding, borders, and safe-area insets, determines visibility. `hideBelow={px(416)}`
|
|
687
|
+
hides strictly below 416px; `showBelow={px(416)}` shows strictly below 416px. At
|
|
688
|
+
416px the first is visible and the second hidden. Together they define the visible
|
|
689
|
+
interval `[hideBelow, showBelow)`. Width rules intersect existing visibility and
|
|
690
|
+
expanded-state rules; they never force a CSS-hidden group visible.
|
|
691
|
+
|
|
692
|
+
Use `px`, `rem`, `em`, `pct`, `space`, `lengthVar`, or `calc`/`plus` to construct
|
|
693
|
+
lengths. Percentages resolve against that content box, `em` uses the child item's
|
|
694
|
+
font size, and custom properties use its inherited and own token context. The
|
|
695
|
+
helper follows resizes, theme/token/font changes, inserted items, nested toolbars,
|
|
696
|
+
and relocated groups. Invalid, unresolved, negative, or contradictory thresholds
|
|
697
|
+
leave the item visible under this width policy. Server-rendered content is visible
|
|
698
|
+
until wiring runs; without browser observers, initial wiring and window resize
|
|
699
|
+
still update it. Dispose to remove measurement probes and restore prior markers.
|
|
700
|
+
|
|
701
|
+
Hidden controls leave layout and keyboard navigation. A hidden busy group also
|
|
702
|
+
hides only its own adjacent busy status. Keep primary actions always available;
|
|
703
|
+
show a complementary overflow group for secondary actions at narrow widths.
|