@cngx/common 0.1.0-rc.1 → 0.1.0-rc.3
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/data/README.md +10 -3
- package/fesm2022/cngx-common-data.mjs +379 -57
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +318 -5
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +532 -151
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/package.json +2 -2
- package/stepper/README.md +0 -13
- package/types/cngx-common-data.d.ts +446 -41
- package/types/cngx-common-stepper.d.ts +350 -6
- package/types/cngx-common-tabs.d.ts +586 -191
- package/tabs/README.md +0 -32
package/tabs/README.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# @cngx/common/tabs
|
|
2
|
-
|
|
3
|
-
The headless brain of the cngx tabs system. Presenter directive, host contracts, configuration cascade, slot directives, overflow strategy. Pairs with a rendering skin from `@cngx/ui/tabs` (CDK) or `@cngx/ui/mat-tabs` (Material), or with consumer-authored templates.
|
|
4
|
-
|
|
5
|
-
## When you reach for it
|
|
6
|
-
|
|
7
|
-
Almost never directly. This entry is consumed by the skin packages - you import from `@cngx/ui/tabs` or `@cngx/ui/mat-tabs` for ready-to-use components.
|
|
8
|
-
|
|
9
|
-
You touch this entry when:
|
|
10
|
-
|
|
11
|
-
- You are building a **custom rendering** for tabs (a fully bespoke design system) and want the cngx keyboard, ARIA, commit lifecycle, and overflow behaviour without redoing them.
|
|
12
|
-
- You are wiring **tab-level slot defaults** (busy spinner, error badge, overflow trigger) across the application via the configuration cascade.
|
|
13
|
-
- You need to read the per-tab contract from inside a sub-component - host tokens, not concrete classes.
|
|
14
|
-
|
|
15
|
-
## Mental model
|
|
16
|
-
|
|
17
|
-
Tabs are a presenter applied as a `hostDirective`, a set of declarative `CngxTab` definitions, content projection via `CngxTabContent` / `CngxTabLabel`, and a configurable overflow surface. The skin component is thin - it forwards inputs and renders a `<div role="tablist">` (or a `<mat-tab-group>` in the Material twin). All the state lives in the presenter, and all the wiring between presenter and content runs through `CNGX_TAB_GROUP_HOST` and `CNGX_TAB_PANEL_HOST`.
|
|
18
|
-
|
|
19
|
-
Two things make this layout work:
|
|
20
|
-
|
|
21
|
-
- **Commit lifecycle.** Activating a tab can fire an async action with optimistic or pessimistic semantics. The active state rolls back if the action fails. Per-tab busy and error markers ride the same channel.
|
|
22
|
-
- **Overflow.** When tabs do not fit, the runaway tabs collapse into a "more" trigger. Overflow recompute runs on an `IntersectionObserver` with a debounce, so resize storms do not thrash the layout.
|
|
23
|
-
|
|
24
|
-
## Companion entries
|
|
25
|
-
|
|
26
|
-
- **`@cngx/ui/tabs`** - CDK skin (`<cngx-tab-group>`, `<cngx-tab-overflow>`).
|
|
27
|
-
- **`@cngx/ui/mat-tabs`** - Material twin.
|
|
28
|
-
- **`@cngx/common/stepper`** - sibling brain for ordered flows.
|
|
29
|
-
|
|
30
|
-
## See also
|
|
31
|
-
|
|
32
|
-
- Presenter inputs/outputs, host tokens, slot directives, and `with*` config features in the **API** tab.
|