@kerfjs/ui 5.0.0-beta.56 → 5.0.0-beta.58
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 +81 -37
- package/ai/application-ui-diagnostic-ids-v1.json +9 -1
- package/ai/application-ui-profile-sync.cjs +1 -1
- package/ai/application-ui-profile.defaults.json +63 -8
- package/ai/application-ui-profile.mjs +1 -1
- package/ai/component-catalog.json +211 -33
- package/ai/component-catalog.schema.json +2 -0
- 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-catalog-v2-overrides.json → component-composition-rules.json} +2 -1
- package/ai/{component-catalog-v2.d.ts → component-composition.d.ts} +9 -5
- package/ai/{component-catalog-v2.json → component-composition.json} +155 -24
- package/ai/{component-catalog-v2.schema.json → component-composition.schema.json} +21 -5
- package/ai/components/README.md +170 -0
- package/ai/components/application-tabs.md +65 -0
- package/ai/components/badge.md +72 -0
- package/ai/components/collapsible-panel.md +102 -0
- package/ai/components/content-item.md +90 -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 +80 -0
- package/ai/components/foundation.md +65 -0
- package/ai/components/grid.md +93 -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 +89 -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 +88 -0
- package/ai/components/list.md +103 -0
- package/ai/components/loading-spinner.md +72 -0
- package/ai/components/lucide-icon.md +66 -0
- package/ai/components/nav-stack.md +103 -0
- package/ai/components/pane.md +100 -0
- package/ai/components/popup-menu.md +82 -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 +101 -0
- package/ai/components/row.md +96 -0
- package/ai/components/segmented-control.md +82 -0
- package/ai/components/select.md +107 -0
- package/ai/components/skeleton.md +84 -0
- package/ai/components/spacer.md +86 -0
- package/ai/components/split-view.md +102 -0
- package/ai/components/state-banner.md +92 -0
- package/ai/components/sunken-panel.md +79 -0
- package/ai/components/surface-scaffold.md +78 -0
- package/ai/components/tab-bar.md +112 -0
- package/ai/components/tab-scaffold.md +94 -0
- package/ai/components/tabs.md +90 -0
- package/ai/components/text.md +82 -0
- package/ai/components/token-search-field.md +101 -0
- package/ai/components/toolbar-control-group.md +102 -0
- package/ai/components/toolbar-text.md +76 -0
- package/ai/components/toolbar.md +95 -0
- package/ai/components/value-table.md +72 -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 +114 -0
- package/ai/public-api-signatures-v1.md +174 -43
- package/ai/skill.md +100 -48
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/component-ownership.d.mts +56 -0
- package/analyzer/component-ownership.mjs +184 -0
- package/analyzer/index.d.mts +3 -0
- package/analyzer/index.mjs +274 -20
- package/analyzer/selectors.d.mts +21 -0
- package/analyzer/selectors.mjs +212 -0
- package/dist/browser/catalog.js +25 -0
- package/dist/browser/collapsible-panel.js +7 -0
- package/dist/browser/nav-stack.js +8 -0
- package/dist/browser/split-view.js +10 -0
- package/dist/browser/tab-scaffold.js +4 -0
- package/dist/browser/workbench.js +10 -0
- package/dist/catalog-resources.d.ts +2 -2
- package/dist/catalog.d.ts +3 -3
- package/dist/catalog.js +8 -7
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-QQOTQTDD.js → chunk-2CCMJTVY.js} +13 -10
- package/dist/chunk-2CCMJTVY.js.map +1 -0
- package/dist/{chunk-PK4N5QTO.js → chunk-553ASUK6.js} +2 -3
- package/dist/chunk-553ASUK6.js.map +1 -0
- package/dist/{chunk-G33XC2NB.js → chunk-6YFHCLHG.js} +2 -2
- package/dist/chunk-6YFHCLHG.js.map +1 -0
- package/dist/{chunk-ZIYOJFZD.js → chunk-7JUBXOIV.js} +17 -4
- package/dist/chunk-7JUBXOIV.js.map +1 -0
- package/dist/{chunk-T4UZTNZ4.js → chunk-EVYKTVBQ.js} +2 -11
- package/dist/chunk-EVYKTVBQ.js.map +1 -0
- package/dist/{chunk-AK67F6QN.js → chunk-EZVNC4J6.js} +4 -1
- package/dist/chunk-EZVNC4J6.js.map +1 -0
- package/dist/{chunk-MA6Z6EIM.js → chunk-F4QMLOXJ.js} +3 -2
- package/dist/chunk-F4QMLOXJ.js.map +1 -0
- package/dist/chunk-JCV4GXWB.js +249 -0
- package/dist/chunk-JCV4GXWB.js.map +1 -0
- package/dist/chunk-K47P7QZC.js +17 -0
- package/dist/chunk-K47P7QZC.js.map +1 -0
- package/dist/{chunk-MOBRFZH3.js → chunk-OUK6QRDR.js} +2 -12
- package/dist/chunk-OUK6QRDR.js.map +1 -0
- package/dist/{chunk-VNPQDCQZ.js → chunk-QOWG4ZCL.js} +3 -2
- package/dist/chunk-QOWG4ZCL.js.map +1 -0
- package/dist/{chunk-V65EOWNF.js → chunk-QPUPLNNB.js} +20 -8
- package/dist/chunk-QPUPLNNB.js.map +1 -0
- package/dist/{chunk-O3EXIBEZ.js → chunk-W4XKTST6.js} +8 -7
- package/dist/chunk-W4XKTST6.js.map +1 -0
- package/dist/{chunk-K6UNVKDK.js → chunk-XDKAYSVD.js} +3 -1
- package/dist/chunk-XDKAYSVD.js.map +1 -0
- package/dist/collapsible-panel.d.ts +9 -9
- package/dist/collapsible-panel.js +2 -2
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -9
- package/dist/list-action-row.js +2 -1
- package/dist/list-header.js +1 -1
- package/dist/list-item.js +2 -1
- package/dist/nav-stack.d.ts +13 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +20 -3
- package/dist/pane.js +1 -1
- package/dist/{panel-toolbar-C8sF-YZC.d.ts → panel-toolbar-DqwtBxQL.d.ts} +13 -13
- package/dist/select.js +1 -1
- package/dist/split-view.d.ts +3 -3
- package/dist/split-view.js +3 -2
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/app-tab.css +31 -0
- package/dist/styles/badge.css +19 -11
- package/dist/styles/collapsible-panel.css +13 -9
- package/dist/styles/floating-toolbar.css +25 -6
- package/dist/styles/list-header.css +0 -12
- package/dist/styles/list.css +4 -4
- package/dist/styles/nav-stack.css +46 -19
- package/dist/styles/pane.css +50 -0
- package/dist/styles/popup-menu.css +151 -0
- package/dist/styles/resizable-region.css +22 -10
- package/dist/styles/select.css +28 -14
- package/dist/styles/skeleton.css +30 -3
- package/dist/styles/split-view.css +10 -7
- package/dist/styles/state-banner.css +0 -19
- package/dist/styles/surface-scaffold.css +8 -3
- package/dist/styles/tab-bar.css +79 -28
- package/dist/styles/tab-scaffold.css +25 -1
- package/dist/styles/text.css +16 -0
- package/dist/styles/toolbar-control-group.css +121 -66
- package/dist/styles/toolbar-text.css +21 -0
- package/dist/styles/toolbar.css +8 -32
- package/dist/styles/workbench.css +18 -18
- package/dist/tab-scaffold.d.ts +11 -1
- package/dist/tab-scaffold.js +2 -0
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/toolbar-control-group.d.ts +3 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +7 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +8 -1
- package/dist/toolbar.js +1 -1
- package/dist/{types-DXAGogOS.d.ts → types-BuHELdXR.d.ts} +1 -1
- package/dist/wire-catalog.d.ts +3 -1
- package/dist/wire-catalog.js +2 -0
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-scroll-dividers.d.ts +69 -0
- package/dist/wire-scroll-dividers.js +3 -0
- package/dist/wire-scroll-dividers.js.map +1 -0
- package/dist/workbench.d.ts +17 -16
- package/dist/workbench.js +1 -1
- package/docs/app-layouts.md +9 -1
- package/docs/catalog.md +10 -5
- package/docs/collapsible-panel.md +22 -13
- package/docs/component-contract.md +147 -21
- package/docs/component-selection.md +21 -8
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
- package/docs/design/templates/tab-bar-dark.svg +1 -1
- package/docs/design/templates/tab-bar.svg +1 -1
- package/docs/design-philosophy.md +30 -3
- package/docs/examples/application-ui-profile.json +4 -4
- package/docs/examples/{component-catalog-extension-v2.json → component-composition-extension.json} +3 -3
- package/docs/layout.md +82 -3
- package/docs/nav-stack.md +33 -3
- package/docs/split-view.md +10 -5
- package/docs/tab-scaffold.md +23 -1
- package/docs/type-contracts.md +4 -3
- package/docs/ui-analyzer.md +99 -5
- package/docs/ui-doctor.md +10 -0
- package/docs/workbench.md +31 -20
- package/doctor/index.mjs +6 -1
- package/llms.txt +85 -20
- package/package.json +17 -5
- package/ux-demo/recipes/collapsible-sidebar.tsx +0 -1
- package/ux-demo/recipes/composer-form.tsx +0 -1
- package/ux-demo/recipes/list-detail-dialog.tsx +0 -2
- package/ux-demo/recipes/list-workspace-states.tsx +0 -1
- package/ux-demo/recipes/loading-inspector.tsx +0 -1
- package/ux-demo/recipes/workspace-header.tsx +0 -1
- package/ai/component-catalog-extension-v2.d.ts +0 -7
- package/ai/component-catalog-extension-v2.schema.json +0 -7
- package/dist/chunk-AK67F6QN.js.map +0 -1
- package/dist/chunk-G33XC2NB.js.map +0 -1
- package/dist/chunk-K6UNVKDK.js.map +0 -1
- package/dist/chunk-MA6Z6EIM.js.map +0 -1
- package/dist/chunk-MOBRFZH3.js.map +0 -1
- package/dist/chunk-O3EXIBEZ.js.map +0 -1
- package/dist/chunk-PK4N5QTO.js.map +0 -1
- package/dist/chunk-QQOTQTDD.js.map +0 -1
- package/dist/chunk-T4UZTNZ4.js.map +0 -1
- package/dist/chunk-V65EOWNF.js.map +0 -1
- package/dist/chunk-VNPQDCQZ.js.map +0 -1
- package/dist/chunk-ZIYOJFZD.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# StateBanner
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:state-banner` · Kerf UI · component · Feedback
|
|
6
|
+
|
|
7
|
+
Polite status and assertive alert feedback with semantic tones, plus non-status pop emphasis for featured or novel content.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Present persistent inline feedback or attractive non-status emphasis with a named semantic tone.
|
|
12
|
+
|
|
13
|
+
- Place persistent inline semantic status beside affected work.
|
|
14
|
+
|
|
15
|
+
**Not when:**
|
|
16
|
+
|
|
17
|
+
- Do not use for an absent-content screen or transient confirmation.
|
|
18
|
+
- Do not use pop as a substitute for success, warning, or danger.
|
|
19
|
+
|
|
20
|
+
**Alternatives:**
|
|
21
|
+
|
|
22
|
+
- [EmptyState](./empty-state.md) (nearest)
|
|
23
|
+
- [Callout](./wa-callout.md) (prefer-over)
|
|
24
|
+
- [Toast](./wa-toast.md) (prefer-over)
|
|
25
|
+
|
|
26
|
+
## Imports
|
|
27
|
+
|
|
28
|
+
- JavaScript: `@kerfjs/ui/state-banner` — exports `StateBanner`.
|
|
29
|
+
- CSS: the browser build of `@kerfjs/ui/state-banner` pulls its CSS automatically; import `@kerfjs/ui/state-banner.css` manually only without the `browser` export condition.
|
|
30
|
+
- Declared side effects: browser-condition-css.
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
Exact prop names and types: [`@kerfjs/ui/state-banner`](../public-api-signatures-v1.md#kerfjsuistate-banner) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
35
|
+
|
|
36
|
+
**Variants (configure, do not restyle):**
|
|
37
|
+
|
|
38
|
+
- neutral
|
|
39
|
+
- info
|
|
40
|
+
- pop
|
|
41
|
+
- success
|
|
42
|
+
- warning
|
|
43
|
+
- danger
|
|
44
|
+
- status
|
|
45
|
+
- alert
|
|
46
|
+
- badge
|
|
47
|
+
- placeholder (loading)
|
|
48
|
+
|
|
49
|
+
## Composition
|
|
50
|
+
|
|
51
|
+
- Parents: any.
|
|
52
|
+
- Contexts: `persistent-status`, `recoverable-error`.
|
|
53
|
+
- Children: unrestricted.
|
|
54
|
+
- Built from: [Badge](./badge.md), [LucideIcon](./lucide-icon.md).
|
|
55
|
+
|
|
56
|
+
Zones (a zone is bound to JSX only through its listed prop; never assume the zone id is a prop):
|
|
57
|
+
|
|
58
|
+
- `icon` — JSX prop `icon`; accepts `dormant-decoration`; 0–1.
|
|
59
|
+
- `action` — JSX prop `action`; accepts `control`; 0–1.
|
|
60
|
+
|
|
61
|
+
## State and wiring
|
|
62
|
+
|
|
63
|
+
**The app owns:** badge content; state mapping; message lifetime; retry behavior; copy.
|
|
64
|
+
|
|
65
|
+
No wiring helper.
|
|
66
|
+
|
|
67
|
+
## Geometry
|
|
68
|
+
|
|
69
|
+
Margin: self · border: self · padding: self (layout role: feedback). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
70
|
+
|
|
71
|
+
## Accessibility
|
|
72
|
+
|
|
73
|
+
- Use alert urgency only for an attention-requiring failure.
|
|
74
|
+
- Keep optional badge content terse and do not rely on its tone alone for meaning.
|
|
75
|
+
|
|
76
|
+
## Styling boundary
|
|
77
|
+
|
|
78
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
79
|
+
|
|
80
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-state-banner`, `kui-state-banner__action`, `kui-state-banner__copy`, `kui-state-banner__detail`, `kui-state-banner__icon`.
|
|
81
|
+
|
|
82
|
+
Never put `kui-state-banner`, `kui-state-banner__action`, `kui-state-banner__copy`, `kui-state-banner__detail`, `kui-state-banner__icon` on an element you write; render `StateBanner` instead (`KUI-L103`).
|
|
83
|
+
|
|
84
|
+
Public tokens it reads: `--kui-color-brand-border-quiet`, `--kui-color-brand-fill-quiet`, `--kui-color-brand-on-fill`, `--kui-color-pop-border-normal`, `--kui-color-pop-fill-quiet`, `--kui-color-pop-on-fill`, `--kui-color-danger-border-quiet`, `--kui-color-danger-fill-quiet`, `--kui-color-danger-on-fill`, `--kui-color-neutral-border-normal`, `--kui-color-neutral-fill-quiet`, `--kui-color-neutral-on-normal`, `--kui-color-neutral-on-quiet`, `--kui-color-success-border-normal`, `--kui-color-success-fill-quiet`, `--kui-color-success-on-fill`, `--kui-color-surface`, `--kui-color-text-link`, `--kui-color-warning-border-normal`, `--kui-color-warning-fill-quiet`, `--kui-color-warning-on-fill`, `--kui-font-2xs`, `--kui-font-xs`, `--kui-radius-pill`, `--kui-state-banner-action-background`, `--kui-state-banner-action-hover-background`, `--kui-state-banner-background`, `--kui-state-banner-border`, `--kui-state-banner-danger-background`, `--kui-state-banner-danger-border`, `--kui-state-banner-danger-foreground`, `--kui-state-banner-detail`, `--kui-state-banner-foreground`, `--kui-state-banner-info-background`, `--kui-state-banner-info-border`, `--kui-state-banner-info-foreground`, `--kui-state-banner-pop-background`, `--kui-state-banner-pop-border`, `--kui-state-banner-pop-foreground`, `--kui-state-banner-neutral-background`, `--kui-state-banner-neutral-border`, `--kui-state-banner-neutral-foreground`, `--kui-state-banner-success-background`, `--kui-state-banner-success-border`, `--kui-state-banner-success-foreground`, `--kui-state-banner-warning-background`, `--kui-state-banner-warning-border`, `--kui-state-banner-warning-foreground`. Set a token only where its public contract allows; prefer a prop.
|
|
85
|
+
|
|
86
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
87
|
+
|
|
88
|
+
## Related
|
|
89
|
+
|
|
90
|
+
- Components: [Badge](./badge.md), [LucideIcon](./lucide-icon.md), [EmptyState](./empty-state.md), [Callout](./wa-callout.md), [Toast](./wa-toast.md).
|
|
91
|
+
- Docs: [`docs/component-selection.md`](../../docs/component-selection.md), [`docs/component-selection.md#ambiguous-choices`](../../docs/component-selection.md#ambiguous-choices).
|
|
92
|
+
- UX catalog route: `?component=state-banner`.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# SunkenPanel
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:sunken-panel` · Kerf UI · component · Structure
|
|
6
|
+
|
|
7
|
+
A rounded or square-corner lowered application surface with one compact inset and a vertical content stack.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Group a vertical list of application content on a visually lowered surface with one owned 8px inset and an explicit rounded or square-corner shape.
|
|
12
|
+
|
|
13
|
+
- A main content region or nested work area needs a darker/lowered background and one compact inset around a vertical stack.
|
|
14
|
+
- Use the default rounded shape for an inset surface; choose square for a flush or edge-to-edge application area.
|
|
15
|
+
|
|
16
|
+
**Not when:**
|
|
17
|
+
|
|
18
|
+
- Do not use it merely to add padding, as a substitute for Pane anatomy, or around children that already own the same outer surface.
|
|
19
|
+
|
|
20
|
+
**Alternatives:**
|
|
21
|
+
|
|
22
|
+
- [Application layout](./layout.md) (composes-with) — Use layout roles for pane, toolbar, scroll, and ordinary content-stack ownership.
|
|
23
|
+
|
|
24
|
+
## Imports
|
|
25
|
+
|
|
26
|
+
- JavaScript: `@kerfjs/ui/sunken-panel` — exports `SunkenPanel`.
|
|
27
|
+
- CSS: the browser build of `@kerfjs/ui/sunken-panel` pulls its CSS automatically; import `@kerfjs/ui/sunken-panel.css` manually only without the `browser` export condition.
|
|
28
|
+
- Declared side effects: browser-condition-css.
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
Exact prop names and types: [`@kerfjs/ui/sunken-panel`](../public-api-signatures-v1.md#kerfjsuisunken-panel) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
33
|
+
|
|
34
|
+
**Variants (configure, do not restyle):**
|
|
35
|
+
|
|
36
|
+
- rounded surface
|
|
37
|
+
- square-corner surface
|
|
38
|
+
- unnamed surface
|
|
39
|
+
- named region
|
|
40
|
+
|
|
41
|
+
## Composition
|
|
42
|
+
|
|
43
|
+
- Parents: any.
|
|
44
|
+
- Contexts: `application-ui`.
|
|
45
|
+
- Children: unrestricted.
|
|
46
|
+
|
|
47
|
+
## State and wiring
|
|
48
|
+
|
|
49
|
+
**The app owns:** region semantics and accessible name; corner shape; scroll ownership; child ordering and content.
|
|
50
|
+
|
|
51
|
+
No wiring helper.
|
|
52
|
+
|
|
53
|
+
## Geometry
|
|
54
|
+
|
|
55
|
+
Margin: none · border: none · padding: self (layout role: structure). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
56
|
+
|
|
57
|
+
- The root owns one 8px inset and vertical gap; children own their borders and internal geometry.
|
|
58
|
+
|
|
59
|
+
## Accessibility
|
|
60
|
+
|
|
61
|
+
- Pass ariaLabel only when the surface is a distinct named region; otherwise it remains a non-landmark grouping.
|
|
62
|
+
|
|
63
|
+
## Styling boundary
|
|
64
|
+
|
|
65
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
66
|
+
|
|
67
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-sunken-panel`.
|
|
68
|
+
|
|
69
|
+
Never put `kui-sunken-panel` on an element you write; render `SunkenPanel` instead (`KUI-L103`).
|
|
70
|
+
|
|
71
|
+
Public tokens it reads: `--kui-sunken-panel-background`, `--kui-sunken-panel-foreground`, `--kui-sunken-panel-gap`, `--kui-sunken-panel-padding`, `--kui-sunken-panel-radius`. Set a token only where its public contract allows; prefer a prop.
|
|
72
|
+
|
|
73
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
74
|
+
|
|
75
|
+
## Related
|
|
76
|
+
|
|
77
|
+
- Components: [Application layout](./layout.md).
|
|
78
|
+
- Docs: [`docs/sunken-panel.md`](../../docs/sunken-panel.md), [`docs/sunken-panel.md#ownership`](../../docs/sunken-panel.md#ownership).
|
|
79
|
+
- UX catalog route: `?component=sunken-panel`.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Surface scaffolds
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:surface-scaffold` · Kerf UI · component · Structure
|
|
6
|
+
|
|
7
|
+
Typed Web Awesome dialog and popup surface sizing, presentation, and inset composition.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Configure recurring dialog and popup geometry without consumer ::part() overrides.
|
|
12
|
+
|
|
13
|
+
- A Web Awesome dialog or dropdown needs a standard size, presentation, body/footer inset, or list-compatible menu inset.
|
|
14
|
+
- A dialog body should compose rows, sections, or aligned bare prose through List and ListInsetText.
|
|
15
|
+
|
|
16
|
+
**Not when:**
|
|
17
|
+
|
|
18
|
+
- Do not use it as a generic layout wrapper or to replace application-owned modal state and focus lifecycle.
|
|
19
|
+
- Do not stack a dialog body inset around children that already own List or content-item geometry; use bodyInset none.
|
|
20
|
+
|
|
21
|
+
## Imports
|
|
22
|
+
|
|
23
|
+
- JavaScript: `@kerfjs/ui/surface-scaffold` — exports `DialogSurface`, `PopupSurface`.
|
|
24
|
+
- CSS: the browser build of `@kerfjs/ui/surface-scaffold` pulls its CSS automatically; import `@kerfjs/ui/surface-scaffold.css` manually only without the `browser` export condition.
|
|
25
|
+
- Declared side effects: browser-condition-css.
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
Exact prop names and types: [`@kerfjs/ui/surface-scaffold`](../public-api-signatures-v1.md#kerfjsuisurface-scaffold) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
30
|
+
|
|
31
|
+
**Variants (configure, do not restyle):**
|
|
32
|
+
|
|
33
|
+
- small, medium, or large dialog
|
|
34
|
+
- modal, side-sheet, or fullscreen dialog
|
|
35
|
+
- none, compact, or comfortable body and footer inset
|
|
36
|
+
- standard, compact, or zero-inset popup menu
|
|
37
|
+
|
|
38
|
+
## Composition
|
|
39
|
+
|
|
40
|
+
- Parents: any.
|
|
41
|
+
- Contexts: `application-ui`.
|
|
42
|
+
- Children: unrestricted.
|
|
43
|
+
- Built from: [Dialog](./wa-dialog.md), [Dropdown](./wa-dropdown.md), [Dropdown Item](./wa-dropdown-item.md).
|
|
44
|
+
|
|
45
|
+
## State and wiring
|
|
46
|
+
|
|
47
|
+
**The app owns:** open state; focus lifecycle; dismissal policy; content; outer placement.
|
|
48
|
+
|
|
49
|
+
No wiring helper.
|
|
50
|
+
|
|
51
|
+
## Geometry
|
|
52
|
+
|
|
53
|
+
Margin: parent · border: child · padding: self (layout role: structure). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
54
|
+
|
|
55
|
+
## Accessibility
|
|
56
|
+
|
|
57
|
+
- Supply the wrapped wa-dialog label and retain Web Awesome's native modal and focus behavior.
|
|
58
|
+
- Use popup surfaces only for real dropdown menus with named triggers.
|
|
59
|
+
|
|
60
|
+
## Styling boundary
|
|
61
|
+
|
|
62
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
63
|
+
|
|
64
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-dialog-surface`, `kui-popup-surface`.
|
|
65
|
+
|
|
66
|
+
Never put `kui-dialog-surface` on an element you write; render `DialogSurface` instead (`KUI-L103`).
|
|
67
|
+
|
|
68
|
+
Never put `kui-popup-surface` on an element you write; render `PopupSurface` instead (`KUI-L103`).
|
|
69
|
+
|
|
70
|
+
Public tokens it reads: `--kui-radius-l`, `--kui-wa-container-inset`, `--kui-wa-surface-inset`. Set a token only where its public contract allows; prefer a prop.
|
|
71
|
+
|
|
72
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
73
|
+
|
|
74
|
+
## Related
|
|
75
|
+
|
|
76
|
+
- Components: [Dialog](./wa-dialog.md), [Dropdown](./wa-dropdown.md), [Dropdown Item](./wa-dropdown-item.md).
|
|
77
|
+
- Docs: [`docs/surface-scaffold.md`](../../docs/surface-scaffold.md), [`docs/component-selection.md#problem-to-component-matrix`](../../docs/component-selection.md#problem-to-component-matrix).
|
|
78
|
+
- UX catalog route: `?component=surface-scaffold`.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# TabBar
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:tab-bar` · Kerf UI · component · Navigation
|
|
6
|
+
|
|
7
|
+
Controlled tab strips with typed presentation and allocation, a scroll-owning tab region, an optional adjacent trailing action, and a separately pinned far-edge end action.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Controlled tab strips whose tabs shrink and scroll while fixed leading, trailing, and far-edge end actions remain visible.
|
|
12
|
+
|
|
13
|
+
- Switch application tabpanels with optional overflow, closing, and reordering.
|
|
14
|
+
|
|
15
|
+
**Not when:**
|
|
16
|
+
|
|
17
|
+
- Do not use for a compact local toggle or a long value list.
|
|
18
|
+
|
|
19
|
+
**Alternatives:**
|
|
20
|
+
|
|
21
|
+
- [SegmentedControl](./segmented-control.md) (nearest)
|
|
22
|
+
- [Select](./select.md) (nearest)
|
|
23
|
+
- [Tab Group](./wa-tab-group.md) (prefer-over)
|
|
24
|
+
|
|
25
|
+
## Imports
|
|
26
|
+
|
|
27
|
+
- JavaScript: `@kerfjs/ui/tab-bar` — exports `TabBar`, `wireTabBars`, `reorderTabs`.
|
|
28
|
+
- CSS: the browser build of `@kerfjs/ui/tab-bar` pulls its CSS automatically; import `@kerfjs/ui/tab-bar.css` manually only without the `browser` export condition.
|
|
29
|
+
- Wiring: `wireTabBars` from `@kerfjs/ui/wire-tab-bars` (required).
|
|
30
|
+
- Wiring: `reorderTabs` from `@kerfjs/ui/wire-tab-bars` (optional).
|
|
31
|
+
- Wiring: `wireScrollDividers` from `@kerfjs/ui/wire-scroll-dividers` (optional).
|
|
32
|
+
- Declared side effects: browser-condition-css.
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
Exact prop names and types: [`@kerfjs/ui/tab-bar`](../public-api-signatures-v1.md#kerfjsuitab-bar), [`@kerfjs/ui/wire-tab-bars`](../public-api-signatures-v1.md#kerfjsuiwire-tab-bars), [`@kerfjs/ui/wire-scroll-dividers`](../public-api-signatures-v1.md#kerfjsuiwire-scroll-dividers) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
37
|
+
|
|
38
|
+
**Variants (configure, do not restyle):**
|
|
39
|
+
|
|
40
|
+
- leading
|
|
41
|
+
- trailing
|
|
42
|
+
- overflow
|
|
43
|
+
- reorderable
|
|
44
|
+
- rail, segmented, and inspector presentation
|
|
45
|
+
- intrinsic or fill allocation
|
|
46
|
+
- separate or adjacent trailing action
|
|
47
|
+
- far-edge end action
|
|
48
|
+
- overflow dividers on each side with tabs scrolled out of view (wired by wireScrollDividers)
|
|
49
|
+
|
|
50
|
+
## Composition
|
|
51
|
+
|
|
52
|
+
- Parents: any.
|
|
53
|
+
- Contexts: `tabpanel-navigation`.
|
|
54
|
+
- Children: only `app-tab` (required: `app-tab`).
|
|
55
|
+
- Built from: [AppTab](./tabs.md), [ToolbarControlGroup](./toolbar-control-group.md).
|
|
56
|
+
|
|
57
|
+
Zones (a zone is bound to JSX only through its listed prop; never assume the zone id is a prop):
|
|
58
|
+
|
|
59
|
+
- `tabs` — JSX prop `children`; accepts [AppTab](./tabs.md); at least 1.
|
|
60
|
+
- `leading` — JSX prop `leading`; accepts [ToolbarControlGroup](./toolbar-control-group.md); 0–1.
|
|
61
|
+
- `trailing` — JSX prop `trailing`; accepts [ToolbarControlGroup](./toolbar-control-group.md); 0–1.
|
|
62
|
+
- `end` — JSX prop `end`; accepts [ToolbarControlGroup](./toolbar-control-group.md); 0–1.
|
|
63
|
+
|
|
64
|
+
## State and wiring
|
|
65
|
+
|
|
66
|
+
- selected-tab — controlled (required)
|
|
67
|
+
|
|
68
|
+
**Wiring:** `wireTabBars`, `wireScrollDividers` is required.
|
|
69
|
+
|
|
70
|
+
- Retain and invoke the disposer.
|
|
71
|
+
- Apply onReorder to application-owned order.
|
|
72
|
+
|
|
73
|
+
**Wiring-owned state attributes** — never render, remove, or branch on these as app state:
|
|
74
|
+
|
|
75
|
+
- `data-tab-dragging` on `AppTab (data-component="app-tab")` (`wireTabBars`): "true" on the tab being dragged.
|
|
76
|
+
- `data-tab-drop-position` on `AppTab (data-component="app-tab")` (`wireTabBars`): "before" or "after" on the tab under the pointer: where the dragged tab would land.
|
|
77
|
+
- `data-tab-autoscroll` on `kui-tab-bar__tabs` (`wireTabBars`): "start" or "end" while a drag near that edge auto-scrolls the strip.
|
|
78
|
+
- `data-scroll-overflow` on `kui-tab-bar__tabs` (`wireScrollDividers`): The physical edges, in canonical t/r/b/l order, beyond which content is scrolled out of view; absent when nothing is hidden (content that fits never reports its far edges). Re-applied if a re-render drops it.
|
|
79
|
+
- `data-scroll-divider` on `chrome named in wireScrollDividers targets (a TabBar strip has none)` (`wireScrollDividers`): The sides, in t/r/b/l order, on which that chrome currently draws its scroll divider. Re-applied if a re-render drops it.
|
|
80
|
+
|
|
81
|
+
## Geometry
|
|
82
|
+
|
|
83
|
+
Margin: none · border: self · padding: self (layout role: navigation). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
84
|
+
|
|
85
|
+
- TabBar owns inline flex allocation: tabs shrink and scroll, an adjacent trailing action follows the tab strip, and the end action stays pinned at the far edge; leading, trailing, and end actions do not shrink.
|
|
86
|
+
|
|
87
|
+
## Accessibility
|
|
88
|
+
|
|
89
|
+
- Each tab controls a matching tabpanel.
|
|
90
|
+
- Selection and focus behavior follow the configured activation mode.
|
|
91
|
+
|
|
92
|
+
## Styling boundary
|
|
93
|
+
|
|
94
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
95
|
+
|
|
96
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-tab-bar`, `kui-tab-bar__leading`, `kui-tab-bar__tabs`, `kui-tab-bar__trailing`, `kui-tab-bar__end`.
|
|
97
|
+
|
|
98
|
+
Never put `kui-tab-bar`, `kui-tab-bar__leading`, `kui-tab-bar__tabs`, `kui-tab-bar__trailing`, `kui-tab-bar__end` on an element you write; render `TabBar` instead (`KUI-L103`).
|
|
99
|
+
|
|
100
|
+
Public tokens it reads: `--kui-tab-bar-background`, `--kui-tab-bar-border`, `--kui-tab-bar-divider-color`. Set a token only where its public contract allows; prefer a prop.
|
|
101
|
+
|
|
102
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
103
|
+
|
|
104
|
+
## Diagnostics
|
|
105
|
+
|
|
106
|
+
- `KUI-C104` (error) when wireTabBars is absent: TabBar requires wireTabBars for keyboard and reorder behavior.
|
|
107
|
+
|
|
108
|
+
## Related
|
|
109
|
+
|
|
110
|
+
- Components: [AppTab](./tabs.md), [ToolbarControlGroup](./toolbar-control-group.md), [SegmentedControl](./segmented-control.md), [Select](./select.md), [Tab Group](./wa-tab-group.md).
|
|
111
|
+
- Docs: [`docs/component-selection.md`](../../docs/component-selection.md), [`docs/accessibility.md#tabs`](../../docs/accessibility.md#tabs).
|
|
112
|
+
- UX catalog route: `?component=tab-bar`.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# TabScaffold
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:tab-scaffold` · Kerf UI · component · Structure
|
|
6
|
+
|
|
7
|
+
A controlled compact-device bottom tab scaffold that keeps every tab scene mounted so its navigation and scroll state survive selection changes.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Switch among two to five co-equal top-level destinations on compact devices while preserving each destination's independent content state.
|
|
12
|
+
|
|
13
|
+
- A handset or portrait-tablet app has two to five co-equal top-level destinations.
|
|
14
|
+
- Each destination must stay mounted so its NavStack and scroll position survive tab switches.
|
|
15
|
+
|
|
16
|
+
**Not when:**
|
|
17
|
+
|
|
18
|
+
- Do not use TabScaffold for document tabs or reorderable work items; use TabBar.
|
|
19
|
+
- Do not retain the bottom bar on desktop when the same destinations should be promoted to a Workbench rail or sidebar.
|
|
20
|
+
|
|
21
|
+
**Alternatives:**
|
|
22
|
+
|
|
23
|
+
- [AppTab](./tabs.md) (semantic-alternative) — Use TabBar and AppTab for document-style tabpanels, overflow, closing, or reordering.
|
|
24
|
+
- [Workbench](./workbench.md) (roomy-alternative) — Promote top-level destinations to a rail or sidebar on desktop-class layouts.
|
|
25
|
+
|
|
26
|
+
## Imports
|
|
27
|
+
|
|
28
|
+
- JavaScript: `@kerfjs/ui/tab-scaffold` — exports `TabScaffoldTab`, `TabScaffoldProps`, `TabScaffold`.
|
|
29
|
+
- CSS: the browser build of `@kerfjs/ui/tab-scaffold` pulls its CSS automatically; import `@kerfjs/ui/tab-scaffold.css` manually only without the `browser` export condition.
|
|
30
|
+
- Wiring: `wireTabScaffold` from `@kerfjs/ui/wire-tab-scaffold` (required).
|
|
31
|
+
- Wiring: `wireScrollDividers` from `@kerfjs/ui/wire-scroll-dividers` (optional).
|
|
32
|
+
- Declared side effects: browser-condition-css.
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
Exact prop names and types: [`@kerfjs/ui/tab-scaffold`](../public-api-signatures-v1.md#kerfjsuitab-scaffold), [`@kerfjs/ui/wire-tab-scaffold`](../public-api-signatures-v1.md#kerfjsuiwire-tab-scaffold), [`@kerfjs/ui/wire-scroll-dividers`](../public-api-signatures-v1.md#kerfjsuiwire-scroll-dividers) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
37
|
+
|
|
38
|
+
**Variants (configure, do not restyle):**
|
|
39
|
+
|
|
40
|
+
- text-only tabs
|
|
41
|
+
- icon and text tabs
|
|
42
|
+
- badged tabs (count or text-free dot)
|
|
43
|
+
- one NavStack per tab
|
|
44
|
+
- bar divider only while the active scene continues below it (wired by wireScrollDividers)
|
|
45
|
+
- permanent or no bar divider (chromeDividers always or none)
|
|
46
|
+
|
|
47
|
+
## Composition
|
|
48
|
+
|
|
49
|
+
- Parents: any.
|
|
50
|
+
- Contexts: `application-ui`.
|
|
51
|
+
- Children: unrestricted.
|
|
52
|
+
- Built from: [Badge](./badge.md).
|
|
53
|
+
|
|
54
|
+
## State and wiring
|
|
55
|
+
|
|
56
|
+
**The app owns:** controlled active tab id; tab labels, icons, and content; tab badge counts or dots and their localized badgeLabel phrases; routing and persistence; responsive replacement on larger device classes; whether the bar divider follows the scroll, always shows, or never shows (chromeDividers).
|
|
57
|
+
|
|
58
|
+
**Wiring:** `wireTabScaffold`, `wireScrollDividers` is required.
|
|
59
|
+
|
|
60
|
+
- Use wireTabScaffold as documented.
|
|
61
|
+
|
|
62
|
+
**Wiring-owned state attributes** — never render, remove, or branch on these as app state:
|
|
63
|
+
|
|
64
|
+
- `data-scroll-overflow` on `the active kui-tab-scaffold__scene, or what scrolls inside it (a sole NavStack's active view or a sole Pane's content)` (`wireScrollDividers`): The physical edges, in canonical t/r/b/l order, beyond which content is scrolled out of view; absent when nothing is hidden (content that fits never reports its far edges). Re-applied if a re-render drops it.
|
|
65
|
+
- `data-scroll-divider` on `kui-tab-scaffold__bar` (`wireScrollDividers`): The sides, in t/r/b/l order, on which this chrome currently draws its scroll divider: the side facing the scroller while content is hidden beyond it. Re-applied if a re-render drops it.
|
|
66
|
+
|
|
67
|
+
## Geometry
|
|
68
|
+
|
|
69
|
+
Margin: none · border: conditional · padding: self (layout role: structure). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
70
|
+
|
|
71
|
+
- The scaffold owns the full-height scene region and safe-area-aware bottom bar; scene content owns its internal geometry.
|
|
72
|
+
- The bar's top line is scroll state (wireScrollDividers): it shows only while the active scene's content continues below the bar, by coloring the bar's always-present 1px top border.
|
|
73
|
+
|
|
74
|
+
## Accessibility
|
|
75
|
+
|
|
76
|
+
- Give the tablist an accessible label and keep exactly the active tab in the sequential focus order.
|
|
77
|
+
- Wire selection through the controlled active id while leaving inactive scenes mounted and hidden.
|
|
78
|
+
- A tab badge is aria-hidden; supply badgeLabel so the tab's accessible name becomes "\<label>, \<badgeLabel>" (it defaults to the badge text). The dot form, badge: true, has no text, so its badgeLabel is required.
|
|
79
|
+
|
|
80
|
+
## Styling boundary
|
|
81
|
+
|
|
82
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
83
|
+
|
|
84
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-tab-scaffold`, `kui-tab-scaffold__scenes`, `kui-tab-scaffold__scene`, `kui-tab-scaffold__bar`, `kui-tab-scaffold__tab`, `kui-tab-scaffold__tab-icon`, `kui-tab-scaffold__tab-badge`, `kui-tab-scaffold__tab-label`.
|
|
85
|
+
|
|
86
|
+
Never put `kui-tab-scaffold`, `kui-tab-scaffold__scenes`, `kui-tab-scaffold__scene`, `kui-tab-scaffold__bar`, `kui-tab-scaffold__tab`, `kui-tab-scaffold__tab-icon`, `kui-tab-scaffold__tab-badge`, `kui-tab-scaffold__tab-label` on an element you write; render `TabScaffold` instead (`KUI-L103`).
|
|
87
|
+
|
|
88
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- Components: [Badge](./badge.md), [AppTab](./tabs.md), [Workbench](./workbench.md).
|
|
93
|
+
- Docs: [`docs/tab-scaffold.md`](../../docs/tab-scaffold.md), [`docs/app-layouts.md#decision-matrix`](../../docs/app-layouts.md#decision-matrix).
|
|
94
|
+
- UX catalog route: `?component=tab-scaffold`.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# AppTab
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:tabs` · Kerf UI · component · Navigation
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
Roving-tabindex-ready tabs with typed compact, segmented, icon-only, and truncating-label presentations.
|
|
10
|
+
|
|
11
|
+
- Render one controlled application tab inside TabBar.
|
|
12
|
+
|
|
13
|
+
**Not when:**
|
|
14
|
+
|
|
15
|
+
- Do not render alone or use for a compact settings choice.
|
|
16
|
+
|
|
17
|
+
**Alternatives:**
|
|
18
|
+
|
|
19
|
+
- [SegmentedControl](./segmented-control.md) (nearest)
|
|
20
|
+
|
|
21
|
+
## Imports
|
|
22
|
+
|
|
23
|
+
- JavaScript: `@kerfjs/ui/app-tab` — exports `AppTab`.
|
|
24
|
+
- CSS: the browser build of `@kerfjs/ui/app-tab` pulls its CSS automatically; import `@kerfjs/ui/app-tab.css` manually only without the `browser` export condition.
|
|
25
|
+
- Declared side effects: browser-condition-css.
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
Exact prop names and types: [`@kerfjs/ui/app-tab`](../public-api-signatures-v1.md#kerfjsuiapp-tab) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
30
|
+
|
|
31
|
+
**Variants (configure, do not restyle):**
|
|
32
|
+
|
|
33
|
+
- selected
|
|
34
|
+
- closable
|
|
35
|
+
- draggable
|
|
36
|
+
- leading
|
|
37
|
+
- trailing
|
|
38
|
+
- custom close icon
|
|
39
|
+
- root metadata
|
|
40
|
+
- compact size
|
|
41
|
+
- segmented presentation
|
|
42
|
+
- icon-only accessible presentation
|
|
43
|
+
- label maximum width and truncation
|
|
44
|
+
|
|
45
|
+
## Composition
|
|
46
|
+
|
|
47
|
+
- Parents: only inside [TabBar](./tab-bar.md).
|
|
48
|
+
- Contexts: `tabpanel-navigation`.
|
|
49
|
+
- Children: unrestricted.
|
|
50
|
+
- Built from: [LucideIcon](./lucide-icon.md).
|
|
51
|
+
|
|
52
|
+
Zones (a zone is bound to JSX only through its listed prop; never assume the zone id is a prop):
|
|
53
|
+
|
|
54
|
+
- `leading-decoration` — JSX prop `leading`; accepts `dormant-decoration`; 0–1.
|
|
55
|
+
- `trailing-decoration` — JSX prop `trailing`; accepts `dormant-decoration`; 0–1.
|
|
56
|
+
- `close-icon` — JSX prop `closeIcon`; accepts `dormant-decoration`; 0–1.
|
|
57
|
+
|
|
58
|
+
## State and wiring
|
|
59
|
+
|
|
60
|
+
**The app owns:** tab identity; selection; close policy; content; application data attribute values; outer placement.
|
|
61
|
+
|
|
62
|
+
No wiring helper.
|
|
63
|
+
|
|
64
|
+
## Geometry
|
|
65
|
+
|
|
66
|
+
Margin: none · border: self · padding: self (layout role: navigation). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
67
|
+
|
|
68
|
+
## Accessibility
|
|
69
|
+
|
|
70
|
+
- Compose in a tablist and pair with an application-owned tabpanel.
|
|
71
|
+
- Keep closeIcon decorative and free of interactive descendants; the owning close button supplies its accessible name and interaction.
|
|
72
|
+
- Use rootAttributes only for application data-\* metadata; component-owned identity, state, action, and role semantics are protected at runtime.
|
|
73
|
+
|
|
74
|
+
## Styling boundary
|
|
75
|
+
|
|
76
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
77
|
+
|
|
78
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-app-tab`, `kui-app-tab__close`, `kui-app-tab__close-icon`, `kui-app-tab__name`, `kui-app-tab__select`, `kui-app-tab__trailing`.
|
|
79
|
+
|
|
80
|
+
Never put `kui-app-tab`, `kui-app-tab__close`, `kui-app-tab__close-icon`, `kui-app-tab__name`, `kui-app-tab__select`, `kui-app-tab__trailing` on an element you write; render `AppTab` instead (`KUI-L103`).
|
|
81
|
+
|
|
82
|
+
Public tokens it reads: `--kui-app-tab-color`, `--kui-app-tab-drop-indicator`, `--kui-app-tab-hover-background`, `--kui-app-tab-selected-background`, `--kui-app-tab-selected-border`, `--kui-app-tab-selected-color`, `--kui-color-brand-border-normal`, `--kui-color-brand-on-quiet`, `--kui-color-neutral-border-normal`, `--kui-color-neutral-on-quiet`, `--kui-color-surface`, `--kui-color-text`, `--kui-focus-ring`, `--kui-font-xs`, `--kui-radius-pill`, `--kui-shadow-s`, `--kui-space-2xs`, `--kui-space-xs`. Set a token only where its public contract allows; prefer a prop.
|
|
83
|
+
|
|
84
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
85
|
+
|
|
86
|
+
## Related
|
|
87
|
+
|
|
88
|
+
- Components: [LucideIcon](./lucide-icon.md), [SegmentedControl](./segmented-control.md).
|
|
89
|
+
- Docs: [`docs/component-selection.md`](../../docs/component-selection.md), [`docs/accessibility.md#tabs`](../../docs/accessibility.md#tabs).
|
|
90
|
+
- UX catalog route: `?component=tabs`.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:text` · Kerf UI · component · Structure
|
|
6
|
+
|
|
7
|
+
Semantic native paragraph text by default, with heading and inline-span variants plus composable semantic presentation roles.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Render paragraph semantics by default, h1 through h6 when selected, or geometry-free inline secondary text as a span while independently configuring quiet or danger tone, compact size, or monospace font.
|
|
12
|
+
|
|
13
|
+
- Render ordinary application headings or paragraphs with native document semantics, or inline secondary text inside rows, labels, and table cells.
|
|
14
|
+
|
|
15
|
+
**Not when:**
|
|
16
|
+
|
|
17
|
+
- Do not use Text for toolbar identity or title content; use ToolbarText inside a Toolbar zone.
|
|
18
|
+
- Do not choose a heading variant for visual size alone; preserve the document heading hierarchy.
|
|
19
|
+
|
|
20
|
+
**Alternatives:**
|
|
21
|
+
|
|
22
|
+
- [ToolbarText](./toolbar-text.md) (toolbar-specific)
|
|
23
|
+
- [ListInsetText](./list-inset-text.md) (list-geometry-specific)
|
|
24
|
+
|
|
25
|
+
## Imports
|
|
26
|
+
|
|
27
|
+
- JavaScript: `@kerfjs/ui/text` — exports `Text`.
|
|
28
|
+
- CSS: the browser build of `@kerfjs/ui/text` pulls its CSS automatically; import `@kerfjs/ui/text.css` manually only without the `browser` export condition.
|
|
29
|
+
- Declared side effects: browser-condition-css.
|
|
30
|
+
|
|
31
|
+
## Props
|
|
32
|
+
|
|
33
|
+
Exact prop names and types: [`@kerfjs/ui/text`](../public-api-signatures-v1.md#kerfjsuitext) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
34
|
+
|
|
35
|
+
**Variants (configure, do not restyle):**
|
|
36
|
+
|
|
37
|
+
- p, h1 through h6, or inline span semantic variant
|
|
38
|
+
- default, quiet, or danger tone
|
|
39
|
+
- default or compact size
|
|
40
|
+
- default or monospace font
|
|
41
|
+
|
|
42
|
+
## Composition
|
|
43
|
+
|
|
44
|
+
- Parents: any.
|
|
45
|
+
- Contexts: `application-ui`.
|
|
46
|
+
- Children: unrestricted.
|
|
47
|
+
|
|
48
|
+
## State and wiring
|
|
49
|
+
|
|
50
|
+
**The app owns:** semantic variant; tone; size; font; copy; document heading hierarchy.
|
|
51
|
+
|
|
52
|
+
No wiring helper.
|
|
53
|
+
|
|
54
|
+
## Geometry
|
|
55
|
+
|
|
56
|
+
Margin: none · border: self · padding: self (layout role: structure). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
57
|
+
|
|
58
|
+
- Block Text variants reset native margins and add a 1px transparent border plus the standard 8px item padding; span has no margin, border, or padding.
|
|
59
|
+
|
|
60
|
+
## Accessibility
|
|
61
|
+
|
|
62
|
+
- Text renders a native paragraph by default; choose an h1 through h6 variant by document outline rather than appearance, or span for inline secondary text.
|
|
63
|
+
- Ordinary global, data, and ARIA attributes pass through to the native element.
|
|
64
|
+
- Choose tone, size, and font independently of the heading level so appearance does not distort the document outline.
|
|
65
|
+
|
|
66
|
+
## Styling boundary
|
|
67
|
+
|
|
68
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
69
|
+
|
|
70
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-text`.
|
|
71
|
+
|
|
72
|
+
Never put `kui-text` on an element you write; render `Text` instead (`KUI-L103`).
|
|
73
|
+
|
|
74
|
+
Public tokens it reads: `--kui-color-danger-on-quiet`, `--kui-color-text-quiet`, `--kui-font-mono`, `--kui-font-xs`, `--kui-layout-item-padding`. Set a token only where its public contract allows; prefer a prop.
|
|
75
|
+
|
|
76
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
77
|
+
|
|
78
|
+
## Related
|
|
79
|
+
|
|
80
|
+
- Components: [ToolbarText](./toolbar-text.md), [ListInsetText](./list-inset-text.md).
|
|
81
|
+
- Docs: [`docs/component-selection.md`](../../docs/component-selection.md), [`docs/component-selection.md#problem-to-component-matrix`](../../docs/component-selection.md#problem-to-component-matrix).
|
|
82
|
+
- UX catalog route: `?component=text`.
|