@cngx/common 0.0.1-rc.0 → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/a11y/README.md +13 -16
  2. package/card/README.md +2 -21
  3. package/chart/README.md +5 -8
  4. package/data/README.md +45 -47
  5. package/dialog/README.md +12 -15
  6. package/display/README.md +5 -9
  7. package/fesm2022/cngx-common-a11y.mjs +164 -51
  8. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  9. package/fesm2022/cngx-common-card.mjs +157 -69
  10. package/fesm2022/cngx-common-card.mjs.map +1 -1
  11. package/fesm2022/cngx-common-chart.mjs +389 -92
  12. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  13. package/fesm2022/cngx-common-data.mjs +311 -151
  14. package/fesm2022/cngx-common-data.mjs.map +1 -1
  15. package/fesm2022/cngx-common-dialog.mjs +167 -29
  16. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  17. package/fesm2022/cngx-common-display.mjs +445 -110
  18. package/fesm2022/cngx-common-display.mjs.map +1 -1
  19. package/fesm2022/cngx-common-interactive.mjs +2059 -435
  20. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  21. package/fesm2022/cngx-common-layout.mjs +188 -31
  22. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  23. package/fesm2022/cngx-common-popover.mjs +711 -90
  24. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  25. package/fesm2022/cngx-common-stepper.mjs +1479 -73
  26. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  27. package/fesm2022/cngx-common-tabs.mjs +1144 -85
  28. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  29. package/fesm2022/cngx-common.mjs +2 -2
  30. package/fesm2022/cngx-common.mjs.map +1 -1
  31. package/interactive/README.md +5 -5
  32. package/layout/README.md +2 -2
  33. package/package.json +7 -6
  34. package/popover/README.md +8 -34
  35. package/stepper/README.md +69 -8
  36. package/tabs/README.md +6 -6
  37. package/theming/components/cngx-async.css +74 -0
  38. package/theming/components/cngx-backdrop.css +73 -0
  39. package/theming/components/cngx-badge.css +340 -0
  40. package/theming/components/cngx-bottom-sheet.css +201 -0
  41. package/theming/components/cngx-button-toggle.css +99 -0
  42. package/theming/components/cngx-dialog.css +358 -0
  43. package/theming/components/cngx-divider.css +145 -0
  44. package/theming/components/cngx-listbox.css +220 -0
  45. package/theming/components/cngx-menu.css +371 -0
  46. package/theming/components/cngx-ripple.css +116 -0
  47. package/theming/components/cngx-tooltip.css +265 -0
  48. package/theming/system-tokens.css +24 -0
  49. package/types/cngx-common-a11y.d.ts +159 -38
  50. package/types/cngx-common-card.d.ts +137 -22
  51. package/types/cngx-common-chart.d.ts +337 -40
  52. package/types/cngx-common-data.d.ts +277 -45
  53. package/types/cngx-common-dialog.d.ts +162 -22
  54. package/types/cngx-common-display.d.ts +422 -78
  55. package/types/cngx-common-interactive.d.ts +1880 -305
  56. package/types/cngx-common-layout.d.ts +191 -28
  57. package/types/cngx-common-popover.d.ts +632 -87
  58. package/types/cngx-common-stepper.d.ts +1360 -45
  59. package/types/cngx-common-tabs.d.ts +1139 -56
  60. package/types/cngx-common.d.ts +1 -1
  61. package/README.md +0 -18
@@ -7,8 +7,8 @@ export * from '@cngx/common/dialog';
7
7
  export * from '@cngx/common/popover';
8
8
  import { makeVersion } from '@cngx/utils';
9
9
 
10
- /** Build-time version of `@cngx/common`. The placeholder is replaced at publish. */
11
- const VERSION = makeVersion('0.0.1-rc.0');
10
+ /** @internal — replaced at publish time, not part of consumer API. */
11
+ const VERSION = makeVersion('0.1.0-rc.1');
12
12
 
13
13
  /**
14
14
  * Public API Surface of @cngx/common
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-common.mjs","sources":["../../../projects/common/version.ts","../../../projects/common/public-api.ts","../../../projects/common/cngx-common.ts"],"sourcesContent":["import { makeVersion } from '@cngx/utils';\n\n/** Build-time version of `@cngx/common`. The placeholder is replaced at publish. */\nexport const VERSION = makeVersion('0.0.0-PLACEHOLDER');\n","/**\n * Public API Surface of @cngx/common\n *\n * Re-exports all secondary entry points for backwards compatibility.\n * Prefer importing from specific entry points:\n * @cngx/common/a11y\n * @cngx/common/display\n * @cngx/common/interactive\n * @cngx/common/layout\n * @cngx/common/data\n * @cngx/common/dialog\n * @cngx/common/popover\n *\n * @module @cngx/common\n */\n\nexport * from '@cngx/common/a11y';\nexport * from '@cngx/common/display';\nexport * from '@cngx/common/interactive';\nexport * from '@cngx/common/layout';\nexport * from '@cngx/common/data';\nexport * from '@cngx/common/dialog';\nexport * from '@cngx/common/popover';\n\nexport { VERSION } from './version';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAEA;MACa,OAAO,GAAG,WAAW,CAAC,mBAAmB;;ACHtD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-common.mjs","sources":["../../../projects/common/version.ts","../../../projects/common/public-api.ts","../../../projects/common/cngx-common.ts"],"sourcesContent":["import { makeVersion } from '@cngx/utils';\n\n/** @internal — replaced at publish time, not part of consumer API. */\nexport const VERSION = makeVersion('0.0.0-PLACEHOLDER');\n","/**\n * Public API Surface of @cngx/common\n *\n * Re-exports all secondary entry points for backwards compatibility.\n * Prefer importing from specific entry points:\n * @cngx/common/a11y\n * @cngx/common/display\n * @cngx/common/interactive\n * @cngx/common/layout\n * @cngx/common/data\n * @cngx/common/dialog\n * @cngx/common/popover\n *\n * @module @cngx/common\n */\n\nexport * from '@cngx/common/a11y';\nexport * from '@cngx/common/display';\nexport * from '@cngx/common/interactive';\nexport * from '@cngx/common/layout';\nexport * from '@cngx/common/data';\nexport * from '@cngx/common/dialog';\nexport * from '@cngx/common/popover';\n\nexport { VERSION } from './version';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAEA;MACa,OAAO,GAAG,WAAW,CAAC,mBAAmB;;ACHtD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
@@ -54,7 +54,7 @@ type AsyncStatus = 'idle' | 'loading' | 'pending' | 'refreshing' | 'success' | '
54
54
 
55
55
  ## CngxPressable
56
56
 
57
- Instant press feedback via CSS class on `pointerdown`. Click feedback fires too late — press feedback is immediate (0ms latency). The class is removed on `pointerup` with an optional delay to prevent a visual flash on quick taps.
57
+ Instant press feedback via CSS class on `pointerdown`. Click feedback fires too late - press feedback is immediate (0ms latency). The class is removed on `pointerup` with an optional delay to prevent a visual flash on quick taps.
58
58
 
59
59
  The directive only toggles the `cngx-pressed` class. All visual treatment (scale, opacity, color) is the consumer's CSS.
60
60
 
@@ -79,13 +79,13 @@ Detects long-press gestures via Pointer Events. Fires after the pointer is held
79
79
 
80
80
  ### Notes
81
81
 
82
- - Pointer events on `document` for up/move — captures gestures that drift outside the element.
82
+ - Pointer events on `document` for up/move - captures gestures that drift outside the element.
83
83
  - Cancels on: `pointerup`, `pointercancel`, `pointerleave`, or movement > `moveThreshold` px.
84
84
  - Uses `Math.hypot` for Euclidean distance (diagonal movement measured correctly).
85
85
 
86
86
  ## CngxKeyboardShortcut
87
87
 
88
- Declarative keyboard shortcut handler. No global event listener service — each directive manages its own subscription, cleaned up via `takeUntilDestroyed`.
88
+ Declarative keyboard shortcut handler. No global event listener service - each directive manages its own subscription, cleaned up via `takeUntilDestroyed`.
89
89
 
90
90
  Supports `mod` as a platform-aware modifier (`Meta` on macOS, `Ctrl` elsewhere). Uses `parseKeyCombo` and `matchesKeyCombo` from `@cngx/core/utils`.
91
91
 
@@ -100,7 +100,7 @@ Supports `mod` as a platform-aware modifier (`Meta` on macOS, `Ctrl` elsewhere).
100
100
  - `global` scope ignores events from `<input>`, `<textarea>`, `<select>`, and `contenteditable` elements.
101
101
  - `self` scope only fires when the host element (or a descendant) has focus.
102
102
  - `preventDefault()` is called on matching events.
103
- - Combo string is memoised — re-parsed only when the input changes.
103
+ - Combo string is memoised - re-parsed only when the input changes.
104
104
 
105
105
  ## withRetry
106
106
 
@@ -201,7 +201,7 @@ readonly [updateName, nameState] = optimistic(
201
201
 
202
202
  - Rapid successive calls cancel the previous in-flight Observable. Rollback always
203
203
  returns to the last server-confirmed value, not a stale optimistic value.
204
- - No `DestroyRef` cleanup — the subscription is unmanaged. If the component is
204
+ - No `DestroyRef` cleanup - the subscription is unmanaged. If the component is
205
205
  destroyed mid-flight, the subscription completes silently.
206
206
 
207
207
  ## Other Exports
package/layout/README.md CHANGED
@@ -47,7 +47,7 @@ bottom of a list. Fires `loadMore` when the sentinel enters the viewport.
47
47
 
48
48
  ## CngxStickyHeader
49
49
 
50
- Communicates when a `position: sticky` element becomes stuck. Does NOT apply sticky positioning — CSS handles that. Inserts a sentinel element before the host and uses `IntersectionObserver` to detect when the sentinel scrolls out.
50
+ Communicates when a `position: sticky` element becomes stuck. Does NOT apply sticky positioning - CSS handles that. Inserts a sentinel element before the host and uses `IntersectionObserver` to detect when the sentinel scrolls out.
51
51
 
52
52
  ```html
53
53
  <header cngxStickyHeader style="position: sticky; top: 0;">
@@ -108,7 +108,7 @@ Manages text truncation with expand/collapse state detection. Applies `-webkit-l
108
108
  - Host styles applied automatically: `-webkit-line-clamp`, `display: -webkit-box`, `-webkit-box-orient: vertical`, `overflow: hidden`.
109
109
  - All styles removed when expanded.
110
110
  - `ResizeObserver` re-checks on container resize.
111
- - `isClamped` is only updated when collapsed — expanded state preserves the last known value.
111
+ - `isClamped` is only updated when collapsed - expanded state preserves the last known value.
112
112
  - Consumer is responsible for the toggle button and `aria-expanded` attribute.
113
113
 
114
114
  ## Other Exports
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cngx/common",
3
- "version": "0.0.1-rc.0",
4
- "description": "Atoms and molecules (a11y, interactive, layout, dialog, popover, display) for the cngx Angular component library. CDK-only, no Material.",
3
+ "version": "0.1.0-rc.1",
4
+ "description": "Atoms and molecules (a11y, interactive, layout, dialog, popover, display) for the CNGX Angular component library. CDK-only, no Material.",
5
5
  "keywords": [
6
6
  "cngx",
7
7
  "angular",
@@ -11,7 +11,7 @@
11
11
  "directives",
12
12
  "components"
13
13
  ],
14
- "author": "Christian Weiss <c.weiss@sobit.at>",
14
+ "author": "Christian Weiss <info@cngx.dev>",
15
15
  "license": "MIT",
16
16
  "homepage": "https://github.com/cngxjs/cngx#readme",
17
17
  "bugs": {
@@ -42,9 +42,8 @@
42
42
  "tslib": "^2.3.0"
43
43
  },
44
44
  "sideEffects": false,
45
- "module": "fesm2022/cngx-common.mjs",
46
- "typings": "types/cngx-common.d.ts",
47
45
  "exports": {
46
+ "./theming/*.css": "./theming/*.css",
48
47
  "./package.json": {
49
48
  "default": "./package.json"
50
49
  },
@@ -96,5 +95,7 @@
96
95
  "types": "./types/cngx-common-tabs.d.ts",
97
96
  "default": "./fesm2022/cngx-common-tabs.mjs"
98
97
  }
99
- }
98
+ },
99
+ "module": "fesm2022/cngx-common.mjs",
100
+ "typings": "types/cngx-common.d.ts"
100
101
  }
package/popover/README.md CHANGED
@@ -77,10 +77,16 @@ import { CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive
77
77
  <button [cngxPopoverTrigger]="panel.popover" (click)="panel.popover.toggle()">
78
78
  Delete
79
79
  </button>
80
- <cngx-popover-panel #panel variant="danger" [showClose]="true" [showArrow]="true"
81
- [hasFooter]="true" placement="bottom">
80
+ <cngx-popover-panel
81
+ #panel variant="danger"
82
+ [showClose]="true"
83
+ [showArrow]="true"
84
+ [hasFooter]="true"
85
+ placement="bottom">
86
+
82
87
  <span cngxPopoverHeader>Delete Item?</span>
83
88
  <p cngxPopoverBody>This action cannot be undone.</p>
89
+
84
90
  <div cngxPopoverFooter>
85
91
  <cngx-popover-action role="dismiss">Cancel</cngx-popover-action>
86
92
  <cngx-popover-action role="confirm" [action]="deleteItem" variant="danger">
@@ -144,38 +150,6 @@ The `variant` input is a free-form string mapped to CSS class `cngx-popover-pane
144
150
  }
145
151
  ```
146
152
 
147
- ## Theming
148
-
149
- ### Material Theme
150
-
151
- ```scss
152
- @use '@angular/material' as mat;
153
- @use '@cngx/common/popover/tooltip-theme' as tooltip;
154
- @use '@cngx/common/popover/popover-panel-theme' as panel;
155
-
156
- $theme: mat.define-theme((...));
157
-
158
- html {
159
- @include mat.all-component-themes($theme);
160
- @include tooltip.theme($theme);
161
- @include panel.theme($theme);
162
- }
163
- ```
164
-
165
- ### Tooltip Indicator (opt-in)
166
-
167
- ```scss
168
- @use '@cngx/common/popover/tooltip-indicator' as indicator;
169
-
170
- // Touch devices only (recommended)
171
- @include indicator.touch-only();
172
-
173
- // Or always visible
174
- @include indicator.always();
175
- ```
176
-
177
- Customizable via CSS custom properties: `--cngx-tooltip-indicator-size`, `--cngx-tooltip-indicator-gap`, `--cngx-tooltip-indicator-color`, `--cngx-tooltip-indicator-opacity`, `--cngx-tooltip-indicator-icon`.
178
-
179
153
  ## Browser Support
180
154
 
181
155
  ### Native Support (zero polyfills needed)
package/stepper/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @cngx/common/stepper
2
2
 
3
- Level-2 directive-only logic for stepper / wizard flows. Zero `@Component`, zero `.html`, zero `.css` — those live in `@cngx/ui/stepper` (CNGX-standard skin) and `@cngx/ui/mat-stepper` (Material twin).
3
+ Level-2 directive-only logic for stepper / wizard flows. Zero `@Component`, zero `.html`, zero `.css` - those live in `@cngx/ui/stepper` (CNGX-standard skin) and `@cngx/ui/mat-stepper` (Material twin).
4
4
 
5
5
  ## What it does
6
6
 
7
7
  Ships the **brain** that both stepper organisms compose: the presenter directive that owns active-step state, linear/non-linear navigation, async commit lifecycle, and a register/unregister contract for content-projected step atoms. Plus a router-sync directive for URL deep-linking, a config cascade for app-wide defaults, an i18n bundle, and a commit-handler factory for swappable async-commit semantics.
8
8
 
9
- The presenter is a pure-derivation host directive — every visible piece of state (step tree, flat projection, active id, orientation, linear flag) is a `Signal<T>` derived from inputs and the registered atom set. Group nodes nest; flat-projection indices are computed once via `flattenStepTree` and cached.
9
+ The presenter is a pure-derivation host directive - every visible piece of state (step tree, flat projection, active id, orientation, linear flag) is a `Signal<T>` derived from inputs and the registered atom set. Group nodes nest; flat-projection indices are computed once via `flattenStepTree` and cached.
10
10
 
11
11
  ## Exports
12
12
 
@@ -14,9 +14,9 @@ The presenter is a pure-derivation host directive — every visible piece of sta
14
14
 
15
15
  | Export | Selector | Description |
16
16
  |-|-|-|
17
- | `CngxStepperPresenter` | `[cngxStepper]` | The brain. Owns active step, linear, orientation, commit lifecycle. Composed via `hostDirectives` by `<cngx-stepper>` and `<cngx-mat-stepper>` — never instantiated directly by consumers. |
18
- | `CngxStep` | `[cngxStep]` | Step atom — registers itself with the enclosing presenter (or `CngxStepGroup`) at construction time, unregisters on destroy. Carries `id`, `label`, `disabled`, `state`, optional `errorAggregator`. |
19
- | `CngxStepGroup` | `[cngxStepGroup]` | Group atom — nests child `cngxStep`s under a labelled cluster. Aggregates child status (`success` / `error` / `pending`) for the strip's group-header rendering. |
17
+ | `CngxStepperPresenter` | `[cngxStepper]` | The brain. Owns active step, linear, orientation, commit lifecycle. Composed via `hostDirectives` by `<cngx-stepper>` and `<cngx-mat-stepper>` - never instantiated directly by consumers. |
18
+ | `CngxStep` | `[cngxStep]` | Step atom - registers itself with the enclosing presenter (or `CngxStepGroup`) at construction time, unregisters on destroy. Carries `id`, `label`, `disabled`, `state`, optional `errorAggregator`. |
19
+ | `CngxStepGroup` | `[cngxStepGroup]` | Group atom - nests child `cngxStep`s under a labelled cluster. Aggregates child status (`success` / `error` / `pending`) for the strip's group-header rendering. |
20
20
  | `CngxStepLabel` | `ng-template[cngxStepLabel]` | Per-step label override (replaces the default `node.label()` text rendering). |
21
21
  | `CngxStepContent` | `ng-template[cngxStepContent]` | Per-step panel body. The cngx-side organisms render this template inside the step's panel region. |
22
22
  | `CngxStepperRouterSync` | `[cngxStepperRouterSync]` | Bidirectional URL deep-linking. Toggleable between `'fragment'` (default, `#step=<id>`) and `'queryParam'` (`?step=<id>`) via the `[mode]` Input or the `withStepperRouterSync` config feature. Optional `(syncError)` Output for router-rejection observers. |
@@ -88,6 +88,67 @@ class WizardCmp {
88
88
  }
89
89
  ```
90
90
 
91
+ ## Config features (`with*`)
92
+
93
+ | Feature | Purpose |
94
+ |-|-|
95
+ | `withStepperSkin(name)` | Select the visual skin for `<cngx-stepper>`: `'classic'` (default) / `'linear-minimal'` / `'stripe-status-rich'` / `'path-chevron'` / `'pill-segment'`. Thematic only - structure, slots, ARIA, and keyboard behaviour are identical across skins. The Material twin `<cngx-mat-stepper>` ignores this setting. |
96
+ | `withStepperMobileCollapse(mode)` | Choose the auto-collapse target for narrow viewports (`max-width: 480px`): `'text'` (default, renders `<cngx-text-stepper>`) / `'dots'` (renders `<cngx-dot-stepper>`) / `'off'` (keep the classic strip on every viewport). The Material twin ignores this setting. |
97
+ | `withStepperHeaderNavigation(mode)` | Set the header-navigation policy: `'none'` (inert label headers, footer-only navigation) / `'visited'` (default - focusable header buttons gated by `linear`). Per-instance `[headerNavigation]` wins. |
98
+ | `withStepErrorTemplate(tpl)` | App-wide default for the `*cngxStepError` slot - the per-step validation message rendered in a row below the strip. Per-instance `*cngxStepError` directive wins. |
99
+ | `withStepperI18nLabels({ statusLabels })` | Override the per-state pill labels surfaced by the `stripe-status-rich` skin: `{ done, inProgress, upNext, errored }`. Partial overrides keep unset keys at the English default. |
100
+ | `withStepperI18nLabels({ textStepperFormat })` | Override the short format used by `CngxProgressBarStepper`'s caption and by `CngxTextStepper`. Signature: `(current: number, total: number) => string`; default `(c, t) => 'Step ' + c + ' of ' + t`. |
101
+
102
+ ```ts
103
+ import { bootstrapApplication } from '@angular/platform-browser';
104
+ import {
105
+ provideStepperConfig,
106
+ provideStepperI18n,
107
+ withStepperSkin,
108
+ withStepperMobileCollapse,
109
+ withStepperI18nLabels,
110
+ } from '@cngx/common/stepper';
111
+
112
+ bootstrapApplication(AppComponent, {
113
+ providers: [
114
+ provideStepperConfig(
115
+ withStepperSkin('path-chevron'),
116
+ withStepperMobileCollapse('dots'),
117
+ ),
118
+ provideStepperI18n(
119
+ withStepperI18nLabels({
120
+ statusLabels: {
121
+ done: 'Erledigt',
122
+ inProgress: 'Laufend',
123
+ upNext: 'Anstehend',
124
+ errored: 'Fehler',
125
+ },
126
+ }),
127
+ ),
128
+ ],
129
+ });
130
+ ```
131
+
132
+ `CngxStepperPresenter` also emits a dev-mode warning when a stepper has more than 6 leaf steps at the same depth with no `<cngx-step-group>` wrapper, guiding consumers toward logical grouping for better UX. The warning is one-shot per presenter instance (via `afterNextRender`) and no-ops in production builds.
133
+
134
+ ## Header navigation
135
+
136
+ `headerNavigation` is a two-value policy - `'none'` or `'visited'` - that decides whether step headers are controls or pure indicators. It folds into the existing `linear` axis instead of adding a third value:
137
+
138
+ - `'none'`: headers render as inert labels (no `<button>`, no roving, no click); the footer is the sole navigation control.
139
+ - `'visited'` (default): headers are focusable buttons. `linear="false"` allows free click-through; `linear="true"` reaches only visited steps and marks forward-incomplete headers `aria-disabled` (focusable, so the gate is announced).
140
+
141
+ "Free navigation" is `'visited'` + `linear="false"` - there is no discrete `'free'` value. Resolve via the cascade: per-instance `[headerNavigation]` input ?? `withStepperHeaderNavigation(...)` config ?? `'visited'`. See `@cngx/ui/stepper` for the full table and migration note.
142
+
143
+ ## Error channels
144
+
145
+ A step carries an error through two independent channels:
146
+
147
+ - **Validation** - a direct `[error]` input on `cngxStep` (`true` or a message string), or an `[errorAggregator]` for genuine multi-source forms. Both fold into the step's `state` (`'error'`) with no async machine. The state shows on every skin via the indicator / badge; the reason text surfaces in a row below the strip via the `*cngxStepError` slot (or the aggregate line on the text / dot / progress variants), but only for a real message - a bare `[error]="true"` shows state only. `[error]="'message'"` wins over the first aggregator label, which wins over the i18n `errored` word.
148
+ - **Commit / async** - a `commitAction` that rejects sets `lastFailedIndex`; the rolled-back step decorates via `*cngxStepRejection` and announces through the `CngxToastOn` / `CngxBannerOn` bridges.
149
+
150
+ The two never collide: validation owns `*cngxStepError`, commit owns `*cngxStepRejection`. The `[error]` input replaces the old `<fieldset cngxErrorAggregator><input cngxErrorSource>` boilerplate for the common "this step is invalid" case; the aggregator stays the power path. See `@cngx/ui/stepper` for the per-skin text-surface table.
151
+
91
152
  ## Architecture notes
92
153
 
93
154
  - **Pillar 1** (`Ableitung statt Verwaltung`): every derived value is a `computed()`; the only writable slot is the active-step model + a registry `WritableSignal<readonly CngxStepRegistration[]>` mutated only by `register`/`unregister`.
@@ -97,6 +158,6 @@ class WizardCmp {
97
158
 
98
159
  ## See also
99
160
 
100
- - `@cngx/ui/stepper` — `<cngx-stepper>` CNGX-standard organism
101
- - `@cngx/ui/mat-stepper` — `<cngx-mat-stepper>` Material-twin organism
102
- - `.internal/architektur/stepper-accepted-debt.md` — tracked architectural debt (single §1: native `<mat-step>` adoption is structurally impossible via Angular content projection)
161
+ - `@cngx/ui/stepper` - `<cngx-stepper>` CNGX-standard organism
162
+ - `@cngx/ui/mat-stepper` - `<cngx-mat-stepper>` Material-twin organism
163
+ - `.internal/architektur/stepper-accepted-debt.md` - tracked architectural debt (single §1: native `<mat-step>` adoption is structurally impossible via Angular content projection)
package/tabs/README.md CHANGED
@@ -4,17 +4,17 @@ The headless brain of the cngx tabs system. Presenter directive, host contracts,
4
4
 
5
5
  ## When you reach for it
6
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.
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
8
 
9
9
  You touch this entry when:
10
10
 
11
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
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.
13
+ - You need to read the per-tab contract from inside a sub-component - host tokens, not concrete classes.
14
14
 
15
15
  ## Mental model
16
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`.
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
18
 
19
19
  Two things make this layout work:
20
20
 
@@ -23,9 +23,9 @@ Two things make this layout work:
23
23
 
24
24
  ## Companion entries
25
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.
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
29
 
30
30
  ## See also
31
31
 
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @overview
3
+ * Theming bridge for the `cngxAsyncClick` directive
4
+ * (`@cngx/common/interactive`). The directive toggles
5
+ * `cngx-async--pending`, `cngx-async--success`, `cngx-async--error`
6
+ * on its host as the async action progresses; this stylesheet
7
+ * paints the three phases.
8
+ *
9
+ * **State modifiers**
10
+ *
11
+ * - `--pending` - dimmed opacity + `cursor: wait`
12
+ * - `--succeeded` - success-tinted surface, border, text
13
+ * - `--failed` - danger-tinted surface, border, text
14
+ *
15
+ * **Inheritance**
16
+ *
17
+ * Tokens reuse the action-button namespace so the standalone
18
+ * `cngxAsyncClick` variant inherits the same visual contract as
19
+ * `CngxActionButton`:
20
+ *
21
+ * - `--cngx-action-btn-succeeded-bg` -> `--cngx-color-success`
22
+ * - `--cngx-action-btn-succeeded-color` -> `--cngx-color-success`
23
+ * - `--cngx-action-btn-failed-bg` -> `--cngx-color-danger`
24
+ * - `--cngx-action-btn-failed-color` -> `--cngx-color-danger`
25
+ *
26
+ * **Notes**
27
+ *
28
+ * - Lives under `theming/components` because `styleUrl` is
29
+ * `@Component`-only; the directive's state classes must remain
30
+ * globally available.
31
+ * - Known class-name mismatch: the directive emits `--success` /
32
+ * `--error` but the rules below target `--succeeded` / `--failed`.
33
+ * Tracked as a separate fix.
34
+ */
35
+
36
+ @layer cngx.components {
37
+ .cngx-async--pending {
38
+ opacity: var(--cngx-action-btn-pending-opacity, 0.7);
39
+ cursor: wait;
40
+ transition: opacity var(--cngx-action-btn-transition, 0.2s ease);
41
+ }
42
+
43
+ .cngx-async--succeeded {
44
+ background-color: var(
45
+ --cngx-action-btn-succeeded-bg,
46
+ var(--cngx-color-success, oklch(0.95 0.04 145))
47
+ );
48
+ color: var(--cngx-action-btn-succeeded-color, var(--cngx-color-success, oklch(0.5 0.15 145)));
49
+ border-color: var(
50
+ --cngx-action-btn-succeeded-border,
51
+ var(--cngx-color-success, oklch(0.5 0.15 145))
52
+ );
53
+ transition:
54
+ background-color var(--cngx-action-btn-transition, 0.2s ease),
55
+ color var(--cngx-action-btn-transition, 0.2s ease),
56
+ border-color var(--cngx-action-btn-transition, 0.2s ease);
57
+ }
58
+
59
+ .cngx-async--failed {
60
+ background-color: var(
61
+ --cngx-action-btn-failed-bg,
62
+ var(--cngx-color-danger, oklch(0.95 0.025 25))
63
+ );
64
+ color: var(--cngx-action-btn-failed-color, var(--cngx-color-danger, oklch(0.45 0.15 25)));
65
+ border-color: var(
66
+ --cngx-action-btn-failed-border,
67
+ var(--cngx-color-danger, oklch(0.45 0.15 25))
68
+ );
69
+ transition:
70
+ background-color var(--cngx-action-btn-transition, 0.2s ease),
71
+ color var(--cngx-action-btn-transition, 0.2s ease),
72
+ border-color var(--cngx-action-btn-transition, 0.2s ease);
73
+ }
74
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @overview
3
+ * Theming bridge for the `CngxBackdrop` directive. Opt-in: add the
4
+ * `.cngx-backdrop` class alongside `[cngxBackdrop]` to consume the
5
+ * default fixed-overlay scrim. The directive toggles
6
+ * `.cngx-backdrop--visible` and `aria-hidden` from its `cngxBackdrop`
7
+ * input; this stylesheet only paints.
8
+ *
9
+ * **State modifiers**
10
+ *
11
+ * - `--visible` - opacity 1, pointer-events enabled (default is
12
+ * transparent and click-through)
13
+ *
14
+ * **Inheritance**
15
+ *
16
+ * - `--cngx-backdrop-bg` defaults to a 50% black wash; no foundation
17
+ * delegation by design (the scrim is the same on light and dark)
18
+ * - `--cngx-backdrop-transition-duration` -> `--cngx-duration-base`
19
+ *
20
+ * **Pair with**
21
+ *
22
+ * - `@cngx/themes/material/backdrop-theme` - Material 3 scrim surface
23
+ */
24
+
25
+ @layer cngx.tokens {
26
+ /**
27
+ * Background of the overlay scrim. Defaults to a 50% black wash
28
+ * so content beneath stays legible but visually muted.
29
+ * @group Surface
30
+ */
31
+ @property --cngx-backdrop-bg {
32
+ syntax: '<color>';
33
+ inherits: true;
34
+ initial-value: oklch(0 0 0 / 0.5);
35
+ }
36
+
37
+ /**
38
+ * Duration of the opacity fade between hidden and visible states.
39
+ * Falls back to `--cngx-duration-base`.
40
+ * @group Motion
41
+ */
42
+ @property --cngx-backdrop-transition-duration {
43
+ syntax: '<time>';
44
+ inherits: false;
45
+ initial-value: 200ms;
46
+ }
47
+ }
48
+
49
+ @layer cngx.components {
50
+ @scope (.cngx-backdrop) {
51
+ :scope {
52
+ /* Functional - hardcoded, not part of theming surface */
53
+ position: fixed;
54
+ inset: 0;
55
+ box-sizing: border-box;
56
+ opacity: 0;
57
+ pointer-events: none;
58
+
59
+ /* Themable - token-driven, three-tier overridable */
60
+ background: var(--cngx-backdrop-bg, oklch(0 0 0 / 0.5));
61
+ transition: opacity var(--cngx-backdrop-transition-duration, var(--cngx-duration-base, 200ms));
62
+ }
63
+
64
+ /* Visible state - class is toggled by the directive. `:scope` form
65
+ * instead of `&` so the build's CSS optimiser doesn't choke on the
66
+ * `&`-to-class chain inside `@scope` (NG8000 / esbuild "empty
67
+ * sub-selector" warning otherwise). */
68
+ :scope.cngx-backdrop--visible {
69
+ opacity: 1;
70
+ pointer-events: auto;
71
+ }
72
+ }
73
+ }