@cngx/common 0.1.0-rc.6 → 0.1.0-rc.8

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 (72) hide show
  1. package/card/README.md +2 -1
  2. package/chart/README.md +85 -0
  3. package/command/README.md +157 -0
  4. package/data/README.md +33 -1
  5. package/dialog/README.md +23 -1
  6. package/fesm2022/cngx-common-a11y.mjs +356 -180
  7. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  8. package/fesm2022/cngx-common-audio.mjs +84 -42
  9. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  10. package/fesm2022/cngx-common-card.mjs +311 -53
  11. package/fesm2022/cngx-common-card.mjs.map +1 -1
  12. package/fesm2022/cngx-common-chart.mjs +4360 -1625
  13. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  14. package/fesm2022/cngx-common-command.mjs +171 -0
  15. package/fesm2022/cngx-common-command.mjs.map +1 -0
  16. package/fesm2022/cngx-common-data.mjs +1556 -616
  17. package/fesm2022/cngx-common-data.mjs.map +1 -1
  18. package/fesm2022/cngx-common-dialog.mjs +518 -112
  19. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  20. package/fesm2022/cngx-common-display.mjs +468 -87
  21. package/fesm2022/cngx-common-display.mjs.map +1 -1
  22. package/fesm2022/cngx-common-interactive.mjs +2725 -1303
  23. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  24. package/fesm2022/cngx-common-layout.mjs +943 -164
  25. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  26. package/fesm2022/cngx-common-popover.mjs +769 -103
  27. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  28. package/fesm2022/cngx-common-stepper.mjs +816 -348
  29. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  30. package/fesm2022/cngx-common-tabs.mjs +2330 -1554
  31. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  32. package/fesm2022/cngx-common-timeline.mjs +1170 -0
  33. package/fesm2022/cngx-common-timeline.mjs.map +1 -0
  34. package/fesm2022/cngx-common.mjs +2 -2
  35. package/fesm2022/cngx-common.mjs.map +1 -1
  36. package/interactive/README.md +15 -4
  37. package/layout/README.md +21 -1
  38. package/package.json +11 -1
  39. package/popover/README.md +18 -2
  40. package/stepper/README.md +7 -5
  41. package/theming/components/cngx-accordion.css +4 -1
  42. package/theming/components/cngx-backdrop.css +12 -0
  43. package/theming/components/cngx-badge.css +22 -0
  44. package/theming/components/cngx-bottom-sheet.css +14 -2
  45. package/theming/components/cngx-breadcrumb.css +8 -0
  46. package/theming/components/cngx-button-toggle.css +73 -5
  47. package/theming/components/cngx-data-grid.css +234 -1
  48. package/theming/components/cngx-dialog.css +25 -0
  49. package/theming/components/cngx-divider.css +12 -0
  50. package/theming/components/cngx-listbox.css +48 -12
  51. package/theming/components/cngx-menu.css +91 -15
  52. package/theming/components/cngx-popover.css +24 -0
  53. package/theming/components/cngx-recycler-placeholder.css +196 -0
  54. package/theming/components/cngx-ripple.css +2 -2
  55. package/theming/components/cngx-slider.css +32 -1
  56. package/theming/components/cngx-tooltip.css +23 -0
  57. package/timeline/README.md +155 -0
  58. package/types/cngx-common-a11y.d.ts +101 -31
  59. package/types/cngx-common-audio.d.ts +32 -32
  60. package/types/cngx-common-card.d.ts +211 -20
  61. package/types/cngx-common-chart.d.ts +1605 -169
  62. package/types/cngx-common-command.d.ts +190 -0
  63. package/types/cngx-common-data.d.ts +842 -163
  64. package/types/cngx-common-dialog.d.ts +372 -28
  65. package/types/cngx-common-display.d.ts +432 -148
  66. package/types/cngx-common-interactive.d.ts +1553 -370
  67. package/types/cngx-common-layout.d.ts +613 -27
  68. package/types/cngx-common-popover.d.ts +376 -36
  69. package/types/cngx-common-stepper.d.ts +414 -114
  70. package/types/cngx-common-tabs.d.ts +597 -72
  71. package/types/cngx-common-timeline.d.ts +1125 -0
  72. package/types/cngx-common.d.ts +1 -1
@@ -1,10 +1,87 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, model, computed, output, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, TemplateRef, contentChildren, LOCALE_ID } from '@angular/core';
3
- import { nextUid } from '@cngx/core/utils';
2
+ import { InjectionToken, inject, input, model, computed, untracked, output, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, TemplateRef, contentChildren, isDevMode, effect } from '@angular/core';
3
+ import { Router } from '@angular/router';
4
+ import { createOverrideMerge, nextUid, createAnnouncementPhrase, injectLocale, dateTimeFormatterFor } from '@cngx/core/utils';
4
5
  import * as i1 from '@cngx/common/a11y';
5
6
  import { CngxRovingTabindex, CngxRovingItem } from '@cngx/common/a11y';
7
+ import { createLanguageSection } from '@cngx/core/i18n';
6
8
  import { NgTemplateOutlet } from '@angular/common';
7
9
 
10
+ /**
11
+ * The English card section: the single source of the card's English copy.
12
+ * `CNGX_CARD_I18N` defaults to it, and the shipped English pack is built from it.
13
+ *
14
+ * @category common/card/i18n
15
+ * @since 0.1.0
16
+ * @relatedTo CNGX_CARD_I18N
17
+ */
18
+ const CNGX_CARD_LANGUAGE_EN = {
19
+ selected: 'Selected',
20
+ deselected: 'Deselected',
21
+ loading: 'Loading',
22
+ timestamp: '{prefix} {date}',
23
+ };
24
+
25
+ /** @internal The English section with the active pack's card section on top. */
26
+ const cardBundleFromPack = createLanguageSection('card', CNGX_CARD_LANGUAGE_EN);
27
+ /**
28
+ * DI token for the card i18n bundle, a `Signal` so the phrases follow a
29
+ * runtime language switch. `providedIn: 'root'`: the card section of the
30
+ * active language pack over the English defaults.
31
+ *
32
+ * @category common/card/i18n
33
+ * @wcag AA
34
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/card/i18n/card-i18n.ts
35
+ * @since 0.1.0
36
+ * @relatedTo CngxCard
37
+ */
38
+ const CNGX_CARD_I18N = new InjectionToken('CngxCardI18n', {
39
+ providedIn: 'root',
40
+ factory: cardBundleFromPack,
41
+ });
42
+ /** @internal */
43
+ function defineCardI18nFeature(fn) {
44
+ return Object.assign(fn, { _target: 'i18n' });
45
+ }
46
+ /**
47
+ * Override i18n labels via a partial bundle - unset keys keep the language
48
+ * pack's phrase, or the English default. Pass a `Signal` to switch the
49
+ * language at runtime.
50
+ *
51
+ * @category common/card/i18n
52
+ */
53
+ function withCardI18nLabels(overrides) {
54
+ return defineCardI18nFeature((bundle) => createOverrideMerge(bundle, overrides));
55
+ }
56
+ /**
57
+ * Provider for the card i18n bundle. The features apply on top of the active
58
+ * language pack, so a subtree can override single keys of the app's language.
59
+ *
60
+ * ```ts
61
+ * bootstrapApplication(AppComponent, {
62
+ * providers: [
63
+ * provideCardI18n(withCardI18nLabels({ selected: 'Ausgewählt', deselected: 'Abgewählt' })),
64
+ * ],
65
+ * });
66
+ * ```
67
+ *
68
+ * @category common/card/i18n
69
+ */
70
+ function provideCardI18n(...features) {
71
+ return {
72
+ provide: CNGX_CARD_I18N,
73
+ useFactory: () => features.reduce((bundle, feat) => feat(bundle), cardBundleFromPack()),
74
+ };
75
+ }
76
+ /**
77
+ * Inject the resolved card i18n bundle.
78
+ *
79
+ * @category common/card/i18n
80
+ */
81
+ function injectCardI18n() {
82
+ return inject(CNGX_CARD_I18N);
83
+ }
84
+
8
85
  /**
9
86
  * Semantic card component that adapts its host element role based on the `as` input.
10
87
  *
@@ -50,10 +127,30 @@ class CngxCard {
50
127
  optional: true,
51
128
  skipSelf: true,
52
129
  });
130
+ router = inject(Router, { optional: true });
131
+ i18n = injectCardI18n();
53
132
  /** Semantic archetype: `'article'` (display), `'button'` (action), or `'link'` (navigation). */
54
133
  cardType = input('article', { ...(ngDevMode ? { debugName: "cardType" } : /* istanbul ignore next */ {}), alias: 'as' });
55
- /** Navigation URL when `as="link"`. Applied as `href` on the host. */
134
+ /**
135
+ * Navigation target when `as="link"`. Activation (click / Enter)
136
+ * navigates: internal URLs go through the app `Router` when one is
137
+ * provided, everything else (schemes, protocol-relative, router-less
138
+ * apps) through `window.location.assign`. The value is also mirrored
139
+ * as an `href` attribute on the host as a styling/testing hook - the
140
+ * host is not a native anchor, so browser-native link affordances
141
+ * (modifier-click new tab, context-menu link actions) do not apply.
142
+ */
56
143
  href = input(undefined, ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
144
+ /**
145
+ * Explicit ARIA role override for the host. Wins over the
146
+ * archetype-derived role. The primary use is `role="listitem"` on
147
+ * cards inside `<cngx-card-grid [semanticList]="true">` - the grid's
148
+ * `role="list"` requires listitem children, which the archetype
149
+ * binding would otherwise overwrite. Overriding the role on an
150
+ * interactive card replaces its button/link semantics; pair with an
151
+ * inner interactive element when both are needed.
152
+ */
153
+ role = input(undefined, ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
57
154
  /** Accessible label for the card. Overrides the default screen reader announcement. */
58
155
  ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
59
156
  /** Two-way selection state. Only relevant when `selectable` is `true`. */
@@ -70,8 +167,12 @@ class CngxCard {
70
167
  interactive = computed(() => this.cardType() !== 'article', ...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
71
168
  /** @internal Host href for link cards. */
72
169
  hostHref = computed(() => this.cardType() === 'link' ? (this.href() ?? null) : null, ...(ngDevMode ? [{ debugName: "hostHref" }] : /* istanbul ignore next */ []));
73
- /** @internal Host element ARIA role. */
170
+ /** @internal Host element ARIA role. Explicit `role` input wins over the archetype. */
74
171
  hostRole = computed(() => {
172
+ const override = this.role();
173
+ if (override) {
174
+ return override;
175
+ }
75
176
  switch (this.cardType()) {
76
177
  case 'button':
77
178
  return 'button';
@@ -97,23 +198,53 @@ class CngxCard {
97
198
  disabledReasonId = `${this.uid}-disabled-reason`;
98
199
  /** @internal */
99
200
  liveRegionId = `${this.uid}-live`;
100
- /** @internal IDs for `aria-describedby` - always present, aria-hidden controls what SR reads. */
101
- describedByIds = computed(() => {
102
- const ids = [this.disabledReasonId];
103
- return ids.join(' ');
104
- }, ...(ngDevMode ? [{ debugName: "describedByIds" }] : /* istanbul ignore next */ []));
105
- /** @internal SR live announcement for state changes. */
201
+ /**
202
+ * @internal `aria-describedby` reference, gated on the disabled state it
203
+ * describes. The reason span stays in the DOM, but its id is emitted only
204
+ * while the card is disabled *with* a reason - accname 1.2 §2A traverses a
205
+ * directly-referenced hidden node, so referencing it unconditionally would
206
+ * announce the reason for a state the card is not in (a `disabledReason`
207
+ * set while `disabled` is false would read as "locked").
208
+ */
209
+ describedByIds = computed(() => this.disabled() && this.disabledReason() ? this.disabledReasonId : null, ...(ngDevMode ? [{ debugName: "describedByIds" }] : /* istanbul ignore next */ []));
210
+ /**
211
+ * @internal Selection phrase with loading-start expiry: a real
212
+ * `selected` change (re)arms the phrase; a loading START spends an
213
+ * already-voiced phrase so the loading-clear content change cannot
214
+ * re-announce it (the region is `aria-atomic`). A toggle DURING
215
+ * loading keeps its phrase across the clear, so the change is voiced
216
+ * exactly once when the loading phrase yields.
217
+ */
218
+ selectionPhrase = createAnnouncementPhrase({
219
+ source: () => ({
220
+ selected: this.selected(),
221
+ selectable: this.selectable(),
222
+ loading: this.loading(),
223
+ }),
224
+ arm: (curr, prev) => {
225
+ if (curr.selectable && curr.selected !== prev.selected) {
226
+ return untracked(() => (curr.selected ? this.i18n().selected : this.i18n().deselected));
227
+ }
228
+ return null;
229
+ },
230
+ spend: (curr, prev) => curr.loading && !prev.loading,
231
+ });
232
+ /**
233
+ * @internal SR live announcement, driven by transitions rather than
234
+ * persistent state (Pillar 2: voice the change, not the standing
235
+ * state). Loading owns the region while active; otherwise the armed
236
+ * selection phrase renders (empty between transitions, so AT stays
237
+ * silent on no-op ticks).
238
+ */
106
239
  liveAnnouncement = computed(() => {
107
- if (this.loading()) {
108
- return 'Loading';
109
- }
110
- if (this.selectable() && this.selected()) {
111
- return 'Selected';
112
- }
113
- if (this.selectable() && !this.selected()) {
114
- return 'Deselected';
115
- }
116
- return '';
240
+ // Read the phrase EAGERLY: linkedSignal only observes source
241
+ // snapshots it is actually read under - a lazy read behind the
242
+ // loading arm would skip the loading-start snapshot and never
243
+ // spend the phrase (same trap as tabs' closedPhrase).
244
+ // Copy is read untracked so a language switch never re-voices the
245
+ // region; the next transition speaks the new language.
246
+ const phrase = this.selectionPhrase();
247
+ return this.loading() ? untracked(() => this.i18n().loading) : phrase;
117
248
  }, ...(ngDevMode ? [{ debugName: "liveAnnouncement" }] : /* istanbul ignore next */ []));
118
249
  /** Emits when an interactive card is clicked or activated via keyboard. */
119
250
  clicked = output();
@@ -130,26 +261,59 @@ class CngxCard {
130
261
  this.selected.update((v) => !v);
131
262
  }
132
263
  this.clicked.emit();
264
+ if (e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) {
265
+ // Modified / non-primary click carries new-tab intent. There is no
266
+ // native anchor to honour it, so never convert it into same-tab
267
+ // navigation (RouterLink skips modified clicks the same way).
268
+ return;
269
+ }
270
+ this.navigateToHref();
133
271
  }
134
272
  /** @internal */
135
273
  handleHostKeydown(e) {
136
- if (!this.interactive()) {
274
+ if (!this.interactive() || e.repeat) {
275
+ return;
276
+ }
277
+ const isSpace = e.key === ' ';
278
+ if (isSpace && this.cardType() !== 'button') {
279
+ // APG: links activate on Enter only - Space keeps its scroll default.
137
280
  return;
138
281
  }
139
282
  if (this.disabled()) {
140
283
  e.preventDefault();
141
284
  return;
142
285
  }
143
- if (e.key === ' ') {
286
+ if (isSpace) {
144
287
  e.preventDefault();
145
288
  }
146
289
  if (this.selectable()) {
147
290
  this.selected.update((v) => !v);
148
291
  }
149
292
  this.clicked.emit();
293
+ this.navigateToHref();
294
+ }
295
+ /**
296
+ * Navigation for the link archetype. Internal URLs prefer the app
297
+ * `Router` (SPA navigation, no full reload); external URLs and
298
+ * router-less apps fall back to `window.location.assign`.
299
+ */
300
+ navigateToHref() {
301
+ if (this.cardType() !== 'link') {
302
+ return;
303
+ }
304
+ const href = this.href();
305
+ if (!href) {
306
+ return;
307
+ }
308
+ const external = /^[a-z][a-z0-9+.-]*:|^\/\//i.test(href);
309
+ if (this.router && !external) {
310
+ void this.router.navigateByUrl(href);
311
+ return;
312
+ }
313
+ window.location.assign(href);
150
314
  }
151
315
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
152
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxCard, isStandalone: true, selector: "cngx-card", inputs: { cardType: { classPropertyName: "cardType", publicName: "as", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", clicked: "clicked" }, host: { listeners: { "click": "handleHostClick($event)", "keydown.enter": "handleHostKeydown($event)", "keydown.space": "handleHostKeydown($event)" }, properties: { "attr.role": "hostRole()", "attr.tabindex": "hostTabindex()", "attr.href": "hostHref()", "attr.aria-label": "ariaLabel() || null", "attr.aria-busy": "loading() || null", "attr.aria-selected": "interactive() && selectable() ? selected() : null", "attr.aria-disabled": "disabled() || null", "attr.aria-describedby": "describedByIds()", "class.cngx-card--interactive": "interactive()", "class.cngx-card--selected": "selected()", "class.cngx-card--loading": "loading()", "class.cngx-card--disabled": "disabled()" }, classAttribute: "cngx-card" }, hostDirectives: [{ directive: i1.CngxRovingItem }], ngImport: i0, template: `
316
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxCard, isStandalone: true, selector: "cngx-card", inputs: { cardType: { classPropertyName: "cardType", publicName: "as", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", clicked: "clicked" }, host: { listeners: { "click": "handleHostClick($event)", "keydown.enter": "handleHostKeydown($event)", "keydown.space": "handleHostKeydown($event)" }, properties: { "attr.role": "hostRole()", "attr.tabindex": "hostTabindex()", "attr.href": "hostHref()", "attr.aria-label": "ariaLabel() || null", "attr.aria-busy": "loading() || null", "attr.aria-selected": "interactive() && selectable() ? selected() : null", "attr.aria-disabled": "disabled() || null", "attr.aria-describedby": "describedByIds()", "class.cngx-card--interactive": "interactive()", "class.cngx-card--selected": "selected()", "class.cngx-card--loading": "loading()", "class.cngx-card--disabled": "disabled()" }, classAttribute: "cngx-card" }, hostDirectives: [{ directive: i1.CngxRovingItem }], ngImport: i0, template: `
153
317
  <ng-content select="[cngxCardMedia]" />
154
318
  <ng-content select="header[cngxCardHeader]" />
155
319
  <ng-content select="[cngxCardBody]" />
@@ -168,7 +332,7 @@ class CngxCard {
168
332
  <span [id]="liveRegionId" aria-live="polite" aria-atomic="true" class="cngx-sr-only">
169
333
  {{ liveAnnouncement() }}
170
334
  </span>
171
- `, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-card-radius{syntax: \"<length>\"; inherits: false; initial-value: 12px;}@property --cngx-card-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.81 .005 250);}@property --cngx-card-min-width{syntax: \"<length>\"; inherits: false; initial-value: 120px;}@property --cngx-card-hover-shadow{syntax: \"*\"; inherits: false; initial-value: 0 2px 8px 0 oklch(0 0 0 / .12);}@property --cngx-card-active-opacity{syntax: \"<number>\"; inherits: false; initial-value: .88;}@property --cngx-card-focus-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-border{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 .04 50);}@property --cngx-card-selected-bar-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .5;}@property --cngx-card-loading-shimmer{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .4);}@property --cngx-card-loading-overlay{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .3);}@property --cngx-card-title-size{syntax: \"*\"; inherits: true; initial-value: 1rem;}@property --cngx-card-title-weight{syntax: \"<number>\"; inherits: true; initial-value: 600;}@property --cngx-card-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-subtitle-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-card-subtitle-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@property --cngx-card-subtitle-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-divider{syntax: \"<color>\"; inherits: true; initial-value: oklch(.81 .005 250);}@property --cngx-card-accent-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-accent-color{syntax: \"<color>\"; inherits: true; initial-value: transparent;}@property --cngx-card-accent-info-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 250);}@property --cngx-card-accent-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 145);}@property --cngx-card-accent-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 75);}@property --cngx-card-accent-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 25);}@property --cngx-card-badge-offset{syntax: \"<length>\"; inherits: false; initial-value: -6px;}@property --cngx-card-badge-size-sm{syntax: \"<length>\"; inherits: false; initial-value: 10px;}@property --cngx-card-badge-size-md{syntax: \"<length>\"; inherits: false; initial-value: 22px;}@property --cngx-card-badge-size-lg{syntax: \"<length>\"; inherits: false; initial-value: 28px;}@property --cngx-card-badge-padding-inline{syntax: \"<length>\"; inherits: false; initial-value: 5px;}@property --cngx-card-badge-font-size-sm{syntax: \"*\"; inherits: false; initial-value: .625rem;}@property --cngx-card-badge-font-size-md{syntax: \"*\"; inherits: false; initial-value: .7rem;}@property --cngx-card-badge-font-size-lg{syntax: \"*\"; inherits: false; initial-value: .8125rem;}@property --cngx-card-badge-radius{syntax: \"<length>\"; inherits: false; initial-value: 999px;}@property --cngx-card-badge-border{syntax: \"*\"; inherits: true; initial-value: 2px solid oklch(1 0 0);}@property --cngx-card-badge-primary-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-badge-primary-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.62 .22 25);}@property --cngx-card-badge-danger-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.72 .18 70);}@property --cngx-card-badge-warning-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-card-badge-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-card-badge-success-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-neutral-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.68 .01 240);}@property --cngx-card-badge-neutral-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}:root{--cngx-card-bg: var(--cngx-color-surface);--cngx-card-color: var(--cngx-color-text);--cngx-card-border: 1px solid var(--cngx-color-border);--cngx-card-divider: var(--cngx-color-border);--cngx-card-title-color: var(--cngx-color-text)}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}}[data-color-scheme=dark],.dark{--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}[data-color-scheme=light],.light{--cngx-card-subtitle-color: oklch(.36 .02 290);--cngx-card-selected-bg: oklch(.96 .04 50);--cngx-card-accent-info-bg: oklch(.97 .03 250);--cngx-card-accent-success-bg: oklch(.97 .04 145);--cngx-card-accent-warning-bg: oklch(.97 .04 75);--cngx-card-accent-danger-bg: oklch(.97 .03 25);--cngx-card-badge-border: 2px solid oklch(1 0 0)}}@layer cngx.components{@scope(.cngx-card){:scope{display:block;position:relative;padding:var(--cngx-card-padding, var(--cngx-space-md, 16px));border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px));background:var(--cngx-card-bg, var(--cngx-color-surface, oklch(1 0 0)));border:var(--cngx-card-border, 1px solid var(--cngx-color-border, oklch(.81 .005 250)));color:var(--cngx-card-color, var(--cngx-color-text, oklch(.2 .01 290)));transition:box-shadow var(--cngx-duration-fast, .15s) ease,border-color var(--cngx-duration-fast, .15s) ease,background var(--cngx-duration-fast, .15s) ease;min-height:44px;min-width:var(--cngx-card-min-width, 120px);touch-action:manipulation}:scope.cngx-card--interactive{cursor:pointer;-webkit-tap-highlight-color:transparent}:scope.cngx-card--interactive:hover{box-shadow:var(--cngx-card-hover-shadow, 0 2px 8px 0 oklch(0 0 0 / .12))}@media(hover:none){:scope.cngx-card--interactive:active{opacity:var(--cngx-card-active-opacity, .88)}}:scope:focus-visible{outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope:has(:focus-visible):not(:focus-visible){outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope.cngx-card--selected{border-color:var( --cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)) );background:var( --cngx-card-selected-bg, color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--selected:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:var(--cngx-card-radius, 12px);width:var(--cngx-card-selected-bar-width, 3px);background:var(--cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)));border-radius:999px}:scope.cngx-card--disabled{opacity:var(--cngx-card-disabled-opacity, .5);pointer-events:none}:scope.cngx-card--loading{pointer-events:none;cursor:wait}:scope.cngx-card--loading:after{content:\"\";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent 25%,var(--cngx-card-loading-shimmer, oklch(1 0 0 / .4)) 50%,transparent 75%);background-size:200% 100%;animation:cngx-card-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:scope.cngx-card--loading:after{animation:none;background:var(--cngx-card-loading-overlay, oklch(1 0 0 / .3))}}.cngx-card__media{margin:calc(-1 * var(--cngx-card-padding, var(--cngx-space-md, 16px)));margin-bottom:0;overflow:hidden;border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) 0 0}.cngx-card__media img,.cngx-card__media video{display:block;width:100%;height:100%;object-fit:cover}.cngx-card__header{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--cngx-space-sm, 8px);padding-block:var(--cngx-space-xs, 4px)}.cngx-card__title{margin:0;font-size:var(--cngx-card-title-size, 1rem);font-weight:var(--cngx-card-title-weight, 600);color:var(--cngx-card-title-color, var(--cngx-color-text, oklch(.2 .01 290)));line-height:1.3}.cngx-card__subtitle{width:100%;margin:0;font-size:var(--cngx-card-subtitle-size, .8125rem);font-weight:var(--cngx-card-subtitle-weight, 400);color:var(--cngx-card-subtitle-color, oklch(.36 .02 290));line-height:1.4}.cngx-card__body{padding-block:var(--cngx-space-xs, 4px)}.cngx-card__footer{margin-top:auto;padding-block-start:var(--cngx-space-sm, 8px)}.cngx-card__actions{display:flex;align-items:center;gap:var(--cngx-space-sm, 8px);padding-block-start:var(--cngx-space-sm, 8px);border-top:1px solid var(--cngx-card-divider, var(--cngx-color-border, oklch(.81 .005 250)))}.cngx-card__actions--end{justify-content:flex-end}:scope.cngx-card--accent{border-top:var(--cngx-card-accent-width, 3px) solid var(--cngx-card-accent-color, transparent)}:scope.cngx-card--accent-info{--cngx-card-accent-color: var(--cngx-color-info, oklch(.65 .12 240));background:var( --cngx-card-accent-info-bg, color-mix( in oklch, var(--cngx-color-info, oklch(.65 .12 240)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-success{--cngx-card-accent-color: var(--cngx-color-success, oklch(.6 .15 145));background:var( --cngx-card-accent-success-bg, color-mix( in oklch, var(--cngx-color-success, oklch(.6 .15 145)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-warning{--cngx-card-accent-color: var(--cngx-color-warning, oklch(.72 .15 75));background:var( --cngx-card-accent-warning-bg, color-mix( in oklch, var(--cngx-color-warning, oklch(.72 .15 75)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-danger{--cngx-card-accent-color: var(--cngx-color-danger, oklch(.6 .18 25));background:var( --cngx-card-accent-danger-bg, color-mix( in oklch, var(--cngx-color-danger, oklch(.6 .18 25)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-neutral{--cngx-card-accent-color: var(--cngx-color-border, oklch(.81 .005 250))}.cngx-card__badge{--cngx-card-badge-padding-inline: var(--cngx-space-xs);position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);border-radius:var(--cngx-card-badge-radius, var(--cngx-radius-pill, 999px));border:var(--cngx-card-badge-border, 2px solid oklch(1 0 0));font-size:var(--cngx-card-badge-font-size-md, .7rem);font-weight:700;line-height:1;-webkit-user-select:none;user-select:none}.cngx-card__badge--top-end{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--top-start{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-end{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-start{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--size-sm{min-width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-sm, .625rem)}.cngx-card__badge--size-md{min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-md, .7rem)}.cngx-card__badge--size-lg{min-width:var(--cngx-card-badge-size-lg, 28px);height:var(--cngx-card-badge-size-lg, 28px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-lg, .8125rem)}.cngx-card__badge--intent-primary{background:var( --cngx-card-badge-primary-bg, var(--cngx-badge-primary-bg, var(--cngx-color-primary, oklch(.66 .19 50))) );color:var(--cngx-card-badge-primary-color, oklch(1 0 0))}.cngx-card__badge--intent-danger{background:var( --cngx-card-badge-danger-bg, var(--cngx-badge-error-bg, var(--cngx-color-danger, oklch(.62 .22 25))) );color:var(--cngx-card-badge-danger-color, oklch(1 0 0))}.cngx-card__badge--intent-warning{background:var( --cngx-card-badge-warning-bg, var(--cngx-badge-warning-bg, var(--cngx-color-warning, oklch(.72 .18 70))) );color:var(--cngx-card-badge-warning-color, oklch(.2 .01 250))}.cngx-card__badge--intent-success{background:var(--cngx-card-badge-success-bg, var(--cngx-color-success, oklch(.6 .15 145)));color:var(--cngx-card-badge-success-color, oklch(1 0 0))}.cngx-card__badge--intent-neutral{background:var( --cngx-card-badge-neutral-bg, var(--cngx-badge-neutral-bg, var(--cngx-color-text-muted, oklch(.68 .01 240))) );color:var(--cngx-card-badge-neutral-color, oklch(1 0 0))}.cngx-card__badge:empty{min-width:var(--cngx-card-badge-size-sm, 10px);width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0}}@keyframes cngx-card-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
335
+ `, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-card-radius{syntax: \"<length>\"; inherits: false; initial-value: 12px;}@property --cngx-card-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.81 .005 250);}@property --cngx-card-min-width{syntax: \"<length>\"; inherits: false; initial-value: 120px;}@property --cngx-card-hover-shadow{syntax: \"*\"; inherits: false; initial-value: 0 2px 8px 0 oklch(0 0 0 / .12);}@property --cngx-card-active-opacity{syntax: \"<number>\"; inherits: false; initial-value: .88;}@property --cngx-card-focus-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-border{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 .04 50);}@property --cngx-card-selected-bar-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-loading-shimmer{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .4);}@property --cngx-card-loading-overlay{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .3);}@property --cngx-card-title-size{syntax: \"*\"; inherits: true; initial-value: 1rem;}@property --cngx-card-title-weight{syntax: \"<number>\"; inherits: true; initial-value: 600;}@property --cngx-card-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-subtitle-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-card-subtitle-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@property --cngx-card-subtitle-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-divider{syntax: \"<color>\"; inherits: true; initial-value: oklch(.81 .005 250);}@property --cngx-card-accent-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-accent-color{syntax: \"<color>\"; inherits: true; initial-value: transparent;}@property --cngx-card-accent-info-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 250);}@property --cngx-card-accent-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 145);}@property --cngx-card-accent-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 75);}@property --cngx-card-accent-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 25);}@property --cngx-card-badge-offset{syntax: \"<length>\"; inherits: false; initial-value: -6px;}@property --cngx-card-badge-size-sm{syntax: \"<length>\"; inherits: false; initial-value: 10px;}@property --cngx-card-badge-size-md{syntax: \"<length>\"; inherits: false; initial-value: 22px;}@property --cngx-card-badge-size-lg{syntax: \"<length>\"; inherits: false; initial-value: 28px;}@property --cngx-card-badge-padding-inline{syntax: \"<length>\"; inherits: false; initial-value: 5px;}@property --cngx-card-badge-font-size-sm{syntax: \"*\"; inherits: false; initial-value: .625rem;}@property --cngx-card-badge-font-size-md{syntax: \"*\"; inherits: false; initial-value: .7rem;}@property --cngx-card-badge-font-size-lg{syntax: \"*\"; inherits: false; initial-value: .8125rem;}@property --cngx-card-badge-radius{syntax: \"<length>\"; inherits: false; initial-value: 999px;}@property --cngx-card-badge-border{syntax: \"*\"; inherits: true; initial-value: 2px solid oklch(1 0 0);}@property --cngx-card-badge-primary-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-badge-primary-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.62 .22 25);}@property --cngx-card-badge-danger-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.72 .18 70);}@property --cngx-card-badge-warning-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-card-badge-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-card-badge-success-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-neutral-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.68 .01 240);}@property --cngx-card-badge-neutral-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}:root{--cngx-card-bg: var(--cngx-color-surface);--cngx-card-color: var(--cngx-color-text);--cngx-card-border: 1px solid var(--cngx-color-border);--cngx-card-divider: var(--cngx-color-border);--cngx-card-title-color: var(--cngx-color-text)}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}}[data-color-scheme=dark],.dark{--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}[data-color-scheme=light],.light{--cngx-card-subtitle-color: oklch(.36 .02 290);--cngx-card-selected-bg: oklch(.96 .04 50);--cngx-card-accent-info-bg: oklch(.97 .03 250);--cngx-card-accent-success-bg: oklch(.97 .04 145);--cngx-card-accent-warning-bg: oklch(.97 .04 75);--cngx-card-accent-danger-bg: oklch(.97 .03 25);--cngx-card-badge-border: 2px solid oklch(1 0 0)}}@layer cngx.components{@scope(.cngx-card){:scope{display:block;position:relative;padding:var(--cngx-card-padding, var(--cngx-space-md, 16px));border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px));background:var(--cngx-card-bg, var(--cngx-color-surface, oklch(1 0 0)));border:var(--cngx-card-border, 1px solid var(--cngx-color-border, oklch(.81 .005 250)));color:var(--cngx-card-color, var(--cngx-color-text, oklch(.2 .01 290)));transition:box-shadow var(--cngx-duration-fast, .15s) ease,border-color var(--cngx-duration-fast, .15s) ease,background var(--cngx-duration-fast, .15s) ease;min-height:max(44px,var(--cngx-target-min, 0px));min-width:var(--cngx-card-min-width, 120px);touch-action:manipulation}:scope.cngx-card--interactive{cursor:pointer;-webkit-tap-highlight-color:transparent}:scope.cngx-card--interactive:hover{box-shadow:var(--cngx-card-hover-shadow, 0 2px 8px 0 oklch(0 0 0 / .12))}@media(hover:none){:scope.cngx-card--interactive:active{opacity:var(--cngx-card-active-opacity, .88)}}:scope:focus-visible{outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope:has(:focus-visible):not(:focus-visible){outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope.cngx-card--selected{border-color:var( --cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)) );background:var( --cngx-card-selected-bg, color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--selected:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:var(--cngx-card-radius, 12px);width:var(--cngx-card-selected-bar-width, 3px);background:var(--cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)));border-radius:999px}:scope.cngx-card--disabled{--cngx-card-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);--cngx-card-title-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);--cngx-card-subtitle-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);border-style:dashed;pointer-events:none}:scope.cngx-card--loading{pointer-events:none;cursor:wait}:scope.cngx-card--loading:after{content:\"\";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent 25%,var(--cngx-card-loading-shimmer, oklch(1 0 0 / .4)) 50%,transparent 75%);background-size:200% 100%;animation:cngx-card-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:scope.cngx-card--loading:after{animation:none;background:var(--cngx-card-loading-overlay, oklch(1 0 0 / .3))}}.cngx-card__media{margin:calc(-1 * var(--cngx-card-padding, var(--cngx-space-md, 16px)));margin-bottom:0;overflow:hidden;border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) 0 0}.cngx-card__media img,.cngx-card__media video{display:block;width:100%;height:100%;object-fit:cover}.cngx-card__header{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--cngx-space-sm, 8px);padding-block:var(--cngx-space-xs, 4px)}.cngx-card__title{margin:0;font-size:var(--cngx-card-title-size, 1rem);font-weight:var(--cngx-card-title-weight, 600);color:var(--cngx-card-title-color, var(--cngx-color-text, oklch(.2 .01 290)));line-height:1.3}.cngx-card__subtitle{width:100%;margin:0;font-size:var(--cngx-card-subtitle-size, .8125rem);font-weight:var(--cngx-card-subtitle-weight, 400);color:var(--cngx-card-subtitle-color, oklch(.36 .02 290));line-height:1.4}.cngx-card__body{padding-block:var(--cngx-space-xs, 4px)}.cngx-card__footer{margin-top:auto;padding-block-start:var(--cngx-space-sm, 8px)}.cngx-card__actions{display:flex;align-items:center;gap:var(--cngx-space-sm, 8px);padding-block-start:var(--cngx-space-sm, 8px);border-top:1px solid var(--cngx-card-divider, var(--cngx-color-border, oklch(.81 .005 250)))}.cngx-card__actions--end{justify-content:flex-end}:scope.cngx-card--accent{border-top:var(--cngx-card-accent-width, 3px) solid var(--cngx-card-accent-color, transparent)}:scope.cngx-card--accent-info{--cngx-card-accent-color: var(--cngx-color-info, oklch(.65 .12 240));background:var( --cngx-card-accent-info-bg, color-mix( in oklch, var(--cngx-color-info, oklch(.65 .12 240)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-success{--cngx-card-accent-color: var(--cngx-color-success, oklch(.6 .15 145));background:var( --cngx-card-accent-success-bg, color-mix( in oklch, var(--cngx-color-success, oklch(.6 .15 145)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-warning{--cngx-card-accent-color: var(--cngx-color-warning, oklch(.72 .15 75));background:var( --cngx-card-accent-warning-bg, color-mix( in oklch, var(--cngx-color-warning, oklch(.72 .15 75)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-danger{--cngx-card-accent-color: var(--cngx-color-danger, oklch(.6 .18 25));background:var( --cngx-card-accent-danger-bg, color-mix( in oklch, var(--cngx-color-danger, oklch(.6 .18 25)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-neutral{--cngx-card-accent-color: var(--cngx-color-border, oklch(.81 .005 250))}.cngx-card__badge{--cngx-card-badge-padding-inline: var(--cngx-space-xs);position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);border-radius:var(--cngx-card-badge-radius, var(--cngx-radius-pill, 999px));border:var(--cngx-card-badge-border, 2px solid oklch(1 0 0));font-size:var(--cngx-card-badge-font-size-md, .7rem);font-weight:700;line-height:1;-webkit-user-select:none;user-select:none}.cngx-card__badge--top-end{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--top-start{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-end{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-start{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--size-sm{min-width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-sm, .625rem)}.cngx-card__badge--size-md{min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-md, .7rem)}.cngx-card__badge--size-lg{min-width:var(--cngx-card-badge-size-lg, 28px);height:var(--cngx-card-badge-size-lg, 28px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-lg, .8125rem)}.cngx-card__badge--intent-primary{background:var( --cngx-card-badge-primary-bg, var(--cngx-badge-primary-bg, var(--cngx-color-primary, oklch(.66 .19 50))) );color:var(--cngx-card-badge-primary-color, oklch(1 0 0))}.cngx-card__badge--intent-danger{background:var( --cngx-card-badge-danger-bg, var(--cngx-badge-error-bg, var(--cngx-color-danger, oklch(.62 .22 25))) );color:var(--cngx-card-badge-danger-color, oklch(1 0 0))}.cngx-card__badge--intent-warning{background:var( --cngx-card-badge-warning-bg, var(--cngx-badge-warning-bg, var(--cngx-color-warning, oklch(.72 .18 70))) );color:var(--cngx-card-badge-warning-color, oklch(.2 .01 250))}.cngx-card__badge--intent-success{background:var(--cngx-card-badge-success-bg, var(--cngx-color-success, oklch(.6 .15 145)));color:var(--cngx-card-badge-success-color, oklch(1 0 0))}.cngx-card__badge--intent-neutral{background:var( --cngx-card-badge-neutral-bg, var(--cngx-badge-neutral-bg, var(--cngx-color-text-muted, oklch(.68 .01 240))) );color:var(--cngx-card-badge-neutral-color, oklch(1 0 0))}.cngx-card__badge:empty{min-width:var(--cngx-card-badge-size-sm, 10px);width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0}}@keyframes cngx-card-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}}@media(forced-colors:active){.cngx-card.cngx-card--selected{border-color:Highlight!important}.cngx-card.cngx-card--selected:before{background:Highlight!important}.cngx-card.cngx-card--disabled,.cngx-card.cngx-card--disabled :is(.cngx-card__title,.cngx-card__subtitle){color:GrayText;border-color:GrayText}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
172
336
  }
173
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCard, decorators: [{
174
338
  type: Component,
@@ -208,8 +372,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
208
372
  <span [id]="liveRegionId" aria-live="polite" aria-atomic="true" class="cngx-sr-only">
209
373
  {{ liveAnnouncement() }}
210
374
  </span>
211
- `, styles: ["@layer cngx.tokens{@property --cngx-card-radius{syntax: \"<length>\"; inherits: false; initial-value: 12px;}@property --cngx-card-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.81 .005 250);}@property --cngx-card-min-width{syntax: \"<length>\"; inherits: false; initial-value: 120px;}@property --cngx-card-hover-shadow{syntax: \"*\"; inherits: false; initial-value: 0 2px 8px 0 oklch(0 0 0 / .12);}@property --cngx-card-active-opacity{syntax: \"<number>\"; inherits: false; initial-value: .88;}@property --cngx-card-focus-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-border{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 .04 50);}@property --cngx-card-selected-bar-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .5;}@property --cngx-card-loading-shimmer{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .4);}@property --cngx-card-loading-overlay{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .3);}@property --cngx-card-title-size{syntax: \"*\"; inherits: true; initial-value: 1rem;}@property --cngx-card-title-weight{syntax: \"<number>\"; inherits: true; initial-value: 600;}@property --cngx-card-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-subtitle-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-card-subtitle-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@property --cngx-card-subtitle-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-divider{syntax: \"<color>\"; inherits: true; initial-value: oklch(.81 .005 250);}@property --cngx-card-accent-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-accent-color{syntax: \"<color>\"; inherits: true; initial-value: transparent;}@property --cngx-card-accent-info-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 250);}@property --cngx-card-accent-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 145);}@property --cngx-card-accent-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 75);}@property --cngx-card-accent-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 25);}@property --cngx-card-badge-offset{syntax: \"<length>\"; inherits: false; initial-value: -6px;}@property --cngx-card-badge-size-sm{syntax: \"<length>\"; inherits: false; initial-value: 10px;}@property --cngx-card-badge-size-md{syntax: \"<length>\"; inherits: false; initial-value: 22px;}@property --cngx-card-badge-size-lg{syntax: \"<length>\"; inherits: false; initial-value: 28px;}@property --cngx-card-badge-padding-inline{syntax: \"<length>\"; inherits: false; initial-value: 5px;}@property --cngx-card-badge-font-size-sm{syntax: \"*\"; inherits: false; initial-value: .625rem;}@property --cngx-card-badge-font-size-md{syntax: \"*\"; inherits: false; initial-value: .7rem;}@property --cngx-card-badge-font-size-lg{syntax: \"*\"; inherits: false; initial-value: .8125rem;}@property --cngx-card-badge-radius{syntax: \"<length>\"; inherits: false; initial-value: 999px;}@property --cngx-card-badge-border{syntax: \"*\"; inherits: true; initial-value: 2px solid oklch(1 0 0);}@property --cngx-card-badge-primary-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-badge-primary-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.62 .22 25);}@property --cngx-card-badge-danger-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.72 .18 70);}@property --cngx-card-badge-warning-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-card-badge-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-card-badge-success-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-neutral-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.68 .01 240);}@property --cngx-card-badge-neutral-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}:root{--cngx-card-bg: var(--cngx-color-surface);--cngx-card-color: var(--cngx-color-text);--cngx-card-border: 1px solid var(--cngx-color-border);--cngx-card-divider: var(--cngx-color-border);--cngx-card-title-color: var(--cngx-color-text)}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}}[data-color-scheme=dark],.dark{--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}[data-color-scheme=light],.light{--cngx-card-subtitle-color: oklch(.36 .02 290);--cngx-card-selected-bg: oklch(.96 .04 50);--cngx-card-accent-info-bg: oklch(.97 .03 250);--cngx-card-accent-success-bg: oklch(.97 .04 145);--cngx-card-accent-warning-bg: oklch(.97 .04 75);--cngx-card-accent-danger-bg: oklch(.97 .03 25);--cngx-card-badge-border: 2px solid oklch(1 0 0)}}@layer cngx.components{@scope(.cngx-card){:scope{display:block;position:relative;padding:var(--cngx-card-padding, var(--cngx-space-md, 16px));border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px));background:var(--cngx-card-bg, var(--cngx-color-surface, oklch(1 0 0)));border:var(--cngx-card-border, 1px solid var(--cngx-color-border, oklch(.81 .005 250)));color:var(--cngx-card-color, var(--cngx-color-text, oklch(.2 .01 290)));transition:box-shadow var(--cngx-duration-fast, .15s) ease,border-color var(--cngx-duration-fast, .15s) ease,background var(--cngx-duration-fast, .15s) ease;min-height:44px;min-width:var(--cngx-card-min-width, 120px);touch-action:manipulation}:scope.cngx-card--interactive{cursor:pointer;-webkit-tap-highlight-color:transparent}:scope.cngx-card--interactive:hover{box-shadow:var(--cngx-card-hover-shadow, 0 2px 8px 0 oklch(0 0 0 / .12))}@media(hover:none){:scope.cngx-card--interactive:active{opacity:var(--cngx-card-active-opacity, .88)}}:scope:focus-visible{outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope:has(:focus-visible):not(:focus-visible){outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope.cngx-card--selected{border-color:var( --cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)) );background:var( --cngx-card-selected-bg, color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--selected:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:var(--cngx-card-radius, 12px);width:var(--cngx-card-selected-bar-width, 3px);background:var(--cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)));border-radius:999px}:scope.cngx-card--disabled{opacity:var(--cngx-card-disabled-opacity, .5);pointer-events:none}:scope.cngx-card--loading{pointer-events:none;cursor:wait}:scope.cngx-card--loading:after{content:\"\";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent 25%,var(--cngx-card-loading-shimmer, oklch(1 0 0 / .4)) 50%,transparent 75%);background-size:200% 100%;animation:cngx-card-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:scope.cngx-card--loading:after{animation:none;background:var(--cngx-card-loading-overlay, oklch(1 0 0 / .3))}}.cngx-card__media{margin:calc(-1 * var(--cngx-card-padding, var(--cngx-space-md, 16px)));margin-bottom:0;overflow:hidden;border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) 0 0}.cngx-card__media img,.cngx-card__media video{display:block;width:100%;height:100%;object-fit:cover}.cngx-card__header{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--cngx-space-sm, 8px);padding-block:var(--cngx-space-xs, 4px)}.cngx-card__title{margin:0;font-size:var(--cngx-card-title-size, 1rem);font-weight:var(--cngx-card-title-weight, 600);color:var(--cngx-card-title-color, var(--cngx-color-text, oklch(.2 .01 290)));line-height:1.3}.cngx-card__subtitle{width:100%;margin:0;font-size:var(--cngx-card-subtitle-size, .8125rem);font-weight:var(--cngx-card-subtitle-weight, 400);color:var(--cngx-card-subtitle-color, oklch(.36 .02 290));line-height:1.4}.cngx-card__body{padding-block:var(--cngx-space-xs, 4px)}.cngx-card__footer{margin-top:auto;padding-block-start:var(--cngx-space-sm, 8px)}.cngx-card__actions{display:flex;align-items:center;gap:var(--cngx-space-sm, 8px);padding-block-start:var(--cngx-space-sm, 8px);border-top:1px solid var(--cngx-card-divider, var(--cngx-color-border, oklch(.81 .005 250)))}.cngx-card__actions--end{justify-content:flex-end}:scope.cngx-card--accent{border-top:var(--cngx-card-accent-width, 3px) solid var(--cngx-card-accent-color, transparent)}:scope.cngx-card--accent-info{--cngx-card-accent-color: var(--cngx-color-info, oklch(.65 .12 240));background:var( --cngx-card-accent-info-bg, color-mix( in oklch, var(--cngx-color-info, oklch(.65 .12 240)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-success{--cngx-card-accent-color: var(--cngx-color-success, oklch(.6 .15 145));background:var( --cngx-card-accent-success-bg, color-mix( in oklch, var(--cngx-color-success, oklch(.6 .15 145)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-warning{--cngx-card-accent-color: var(--cngx-color-warning, oklch(.72 .15 75));background:var( --cngx-card-accent-warning-bg, color-mix( in oklch, var(--cngx-color-warning, oklch(.72 .15 75)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-danger{--cngx-card-accent-color: var(--cngx-color-danger, oklch(.6 .18 25));background:var( --cngx-card-accent-danger-bg, color-mix( in oklch, var(--cngx-color-danger, oklch(.6 .18 25)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-neutral{--cngx-card-accent-color: var(--cngx-color-border, oklch(.81 .005 250))}.cngx-card__badge{--cngx-card-badge-padding-inline: var(--cngx-space-xs);position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);border-radius:var(--cngx-card-badge-radius, var(--cngx-radius-pill, 999px));border:var(--cngx-card-badge-border, 2px solid oklch(1 0 0));font-size:var(--cngx-card-badge-font-size-md, .7rem);font-weight:700;line-height:1;-webkit-user-select:none;user-select:none}.cngx-card__badge--top-end{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--top-start{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-end{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-start{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--size-sm{min-width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-sm, .625rem)}.cngx-card__badge--size-md{min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-md, .7rem)}.cngx-card__badge--size-lg{min-width:var(--cngx-card-badge-size-lg, 28px);height:var(--cngx-card-badge-size-lg, 28px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-lg, .8125rem)}.cngx-card__badge--intent-primary{background:var( --cngx-card-badge-primary-bg, var(--cngx-badge-primary-bg, var(--cngx-color-primary, oklch(.66 .19 50))) );color:var(--cngx-card-badge-primary-color, oklch(1 0 0))}.cngx-card__badge--intent-danger{background:var( --cngx-card-badge-danger-bg, var(--cngx-badge-error-bg, var(--cngx-color-danger, oklch(.62 .22 25))) );color:var(--cngx-card-badge-danger-color, oklch(1 0 0))}.cngx-card__badge--intent-warning{background:var( --cngx-card-badge-warning-bg, var(--cngx-badge-warning-bg, var(--cngx-color-warning, oklch(.72 .18 70))) );color:var(--cngx-card-badge-warning-color, oklch(.2 .01 250))}.cngx-card__badge--intent-success{background:var(--cngx-card-badge-success-bg, var(--cngx-color-success, oklch(.6 .15 145)));color:var(--cngx-card-badge-success-color, oklch(1 0 0))}.cngx-card__badge--intent-neutral{background:var( --cngx-card-badge-neutral-bg, var(--cngx-badge-neutral-bg, var(--cngx-color-text-muted, oklch(.68 .01 240))) );color:var(--cngx-card-badge-neutral-color, oklch(1 0 0))}.cngx-card__badge:empty{min-width:var(--cngx-card-badge-size-sm, 10px);width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0}}@keyframes cngx-card-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}}\n"] }]
212
- }], propDecorators: { cardType: [{ type: i0.Input, args: [{ isSignal: true, alias: "as", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
375
+ `, styles: ["@layer cngx.tokens{@property --cngx-card-radius{syntax: \"<length>\"; inherits: false; initial-value: 12px;}@property --cngx-card-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.81 .005 250);}@property --cngx-card-min-width{syntax: \"<length>\"; inherits: false; initial-value: 120px;}@property --cngx-card-hover-shadow{syntax: \"*\"; inherits: false; initial-value: 0 2px 8px 0 oklch(0 0 0 / .12);}@property --cngx-card-active-opacity{syntax: \"<number>\"; inherits: false; initial-value: .88;}@property --cngx-card-focus-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-card-focus-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-border{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-selected-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 .04 50);}@property --cngx-card-selected-bar-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-loading-shimmer{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .4);}@property --cngx-card-loading-overlay{syntax: \"<color>\"; inherits: false; initial-value: oklch(1 0 0 / .3);}@property --cngx-card-title-size{syntax: \"*\"; inherits: true; initial-value: 1rem;}@property --cngx-card-title-weight{syntax: \"<number>\"; inherits: true; initial-value: 600;}@property --cngx-card-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 290);}@property --cngx-card-subtitle-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-card-subtitle-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@property --cngx-card-subtitle-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-divider{syntax: \"<color>\"; inherits: true; initial-value: oklch(.81 .005 250);}@property --cngx-card-accent-width{syntax: \"<length>\"; inherits: false; initial-value: 3px;}@property --cngx-card-accent-color{syntax: \"<color>\"; inherits: true; initial-value: transparent;}@property --cngx-card-accent-info-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 250);}@property --cngx-card-accent-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 145);}@property --cngx-card-accent-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .04 75);}@property --cngx-card-accent-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 .03 25);}@property --cngx-card-badge-offset{syntax: \"<length>\"; inherits: false; initial-value: -6px;}@property --cngx-card-badge-size-sm{syntax: \"<length>\"; inherits: false; initial-value: 10px;}@property --cngx-card-badge-size-md{syntax: \"<length>\"; inherits: false; initial-value: 22px;}@property --cngx-card-badge-size-lg{syntax: \"<length>\"; inherits: false; initial-value: 28px;}@property --cngx-card-badge-padding-inline{syntax: \"<length>\"; inherits: false; initial-value: 5px;}@property --cngx-card-badge-font-size-sm{syntax: \"*\"; inherits: false; initial-value: .625rem;}@property --cngx-card-badge-font-size-md{syntax: \"*\"; inherits: false; initial-value: .7rem;}@property --cngx-card-badge-font-size-lg{syntax: \"*\"; inherits: false; initial-value: .8125rem;}@property --cngx-card-badge-radius{syntax: \"<length>\"; inherits: false; initial-value: 999px;}@property --cngx-card-badge-border{syntax: \"*\"; inherits: true; initial-value: 2px solid oklch(1 0 0);}@property --cngx-card-badge-primary-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-card-badge-primary-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-danger-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.62 .22 25);}@property --cngx-card-badge-danger-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-warning-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.72 .18 70);}@property --cngx-card-badge-warning-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-card-badge-success-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-card-badge-success-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-card-badge-neutral-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.68 .01 240);}@property --cngx-card-badge-neutral-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}:root{--cngx-card-bg: var(--cngx-color-surface);--cngx-card-color: var(--cngx-color-text);--cngx-card-border: 1px solid var(--cngx-color-border);--cngx-card-divider: var(--cngx-color-border);--cngx-card-title-color: var(--cngx-color-text)}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}}[data-color-scheme=dark],.dark{--cngx-card-subtitle-color: oklch(.72 .02 290);--cngx-card-selected-bg: oklch(.36 .06 50);--cngx-card-accent-info-bg: oklch(.32 .05 250);--cngx-card-accent-success-bg: oklch(.32 .06 145);--cngx-card-accent-warning-bg: oklch(.32 .06 75);--cngx-card-accent-danger-bg: oklch(.32 .05 25);--cngx-card-badge-border: 2px solid oklch(.2 .01 250)}[data-color-scheme=light],.light{--cngx-card-subtitle-color: oklch(.36 .02 290);--cngx-card-selected-bg: oklch(.96 .04 50);--cngx-card-accent-info-bg: oklch(.97 .03 250);--cngx-card-accent-success-bg: oklch(.97 .04 145);--cngx-card-accent-warning-bg: oklch(.97 .04 75);--cngx-card-accent-danger-bg: oklch(.97 .03 25);--cngx-card-badge-border: 2px solid oklch(1 0 0)}}@layer cngx.components{@scope(.cngx-card){:scope{display:block;position:relative;padding:var(--cngx-card-padding, var(--cngx-space-md, 16px));border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px));background:var(--cngx-card-bg, var(--cngx-color-surface, oklch(1 0 0)));border:var(--cngx-card-border, 1px solid var(--cngx-color-border, oklch(.81 .005 250)));color:var(--cngx-card-color, var(--cngx-color-text, oklch(.2 .01 290)));transition:box-shadow var(--cngx-duration-fast, .15s) ease,border-color var(--cngx-duration-fast, .15s) ease,background var(--cngx-duration-fast, .15s) ease;min-height:max(44px,var(--cngx-target-min, 0px));min-width:var(--cngx-card-min-width, 120px);touch-action:manipulation}:scope.cngx-card--interactive{cursor:pointer;-webkit-tap-highlight-color:transparent}:scope.cngx-card--interactive:hover{box-shadow:var(--cngx-card-hover-shadow, 0 2px 8px 0 oklch(0 0 0 / .12))}@media(hover:none){:scope.cngx-card--interactive:active{opacity:var(--cngx-card-active-opacity, .88)}}:scope:focus-visible{outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope:has(:focus-visible):not(:focus-visible){outline:var(--cngx-card-focus-width, 2px) solid var(--cngx-card-focus-color, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:var(--cngx-card-focus-offset, 2px)}:scope.cngx-card--selected{border-color:var( --cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)) );background:var( --cngx-card-selected-bg, color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--selected:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:var(--cngx-card-radius, 12px);width:var(--cngx-card-selected-bar-width, 3px);background:var(--cngx-card-selected-border, var(--cngx-color-primary, oklch(.66 .19 50)));border-radius:999px}:scope.cngx-card--disabled{--cngx-card-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);--cngx-card-title-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);--cngx-card-subtitle-color: color-mix(in oklab, var(--cngx-color-text, oklch(.2 .01 250)) 38%, transparent);border-style:dashed;pointer-events:none}:scope.cngx-card--loading{pointer-events:none;cursor:wait}:scope.cngx-card--loading:after{content:\"\";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent 25%,var(--cngx-card-loading-shimmer, oklch(1 0 0 / .4)) 50%,transparent 75%);background-size:200% 100%;animation:cngx-card-shimmer 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:scope.cngx-card--loading:after{animation:none;background:var(--cngx-card-loading-overlay, oklch(1 0 0 / .3))}}.cngx-card__media{margin:calc(-1 * var(--cngx-card-padding, var(--cngx-space-md, 16px)));margin-bottom:0;overflow:hidden;border-radius:var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) var(--cngx-card-radius, var(--cngx-radius-lg, 12px)) 0 0}.cngx-card__media img,.cngx-card__media video{display:block;width:100%;height:100%;object-fit:cover}.cngx-card__header{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--cngx-space-sm, 8px);padding-block:var(--cngx-space-xs, 4px)}.cngx-card__title{margin:0;font-size:var(--cngx-card-title-size, 1rem);font-weight:var(--cngx-card-title-weight, 600);color:var(--cngx-card-title-color, var(--cngx-color-text, oklch(.2 .01 290)));line-height:1.3}.cngx-card__subtitle{width:100%;margin:0;font-size:var(--cngx-card-subtitle-size, .8125rem);font-weight:var(--cngx-card-subtitle-weight, 400);color:var(--cngx-card-subtitle-color, oklch(.36 .02 290));line-height:1.4}.cngx-card__body{padding-block:var(--cngx-space-xs, 4px)}.cngx-card__footer{margin-top:auto;padding-block-start:var(--cngx-space-sm, 8px)}.cngx-card__actions{display:flex;align-items:center;gap:var(--cngx-space-sm, 8px);padding-block-start:var(--cngx-space-sm, 8px);border-top:1px solid var(--cngx-card-divider, var(--cngx-color-border, oklch(.81 .005 250)))}.cngx-card__actions--end{justify-content:flex-end}:scope.cngx-card--accent{border-top:var(--cngx-card-accent-width, 3px) solid var(--cngx-card-accent-color, transparent)}:scope.cngx-card--accent-info{--cngx-card-accent-color: var(--cngx-color-info, oklch(.65 .12 240));background:var( --cngx-card-accent-info-bg, color-mix( in oklch, var(--cngx-color-info, oklch(.65 .12 240)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-success{--cngx-card-accent-color: var(--cngx-color-success, oklch(.6 .15 145));background:var( --cngx-card-accent-success-bg, color-mix( in oklch, var(--cngx-color-success, oklch(.6 .15 145)) 6%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-warning{--cngx-card-accent-color: var(--cngx-color-warning, oklch(.72 .15 75));background:var( --cngx-card-accent-warning-bg, color-mix( in oklch, var(--cngx-color-warning, oklch(.72 .15 75)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-danger{--cngx-card-accent-color: var(--cngx-color-danger, oklch(.6 .18 25));background:var( --cngx-card-accent-danger-bg, color-mix( in oklch, var(--cngx-color-danger, oklch(.6 .18 25)) 8%, var(--cngx-card-bg, oklch(1 0 0)) ) )}:scope.cngx-card--accent-neutral{--cngx-card-accent-color: var(--cngx-color-border, oklch(.81 .005 250))}.cngx-card__badge{--cngx-card-badge-padding-inline: var(--cngx-space-xs);position:absolute;z-index:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);border-radius:var(--cngx-card-badge-radius, var(--cngx-radius-pill, 999px));border:var(--cngx-card-badge-border, 2px solid oklch(1 0 0));font-size:var(--cngx-card-badge-font-size-md, .7rem);font-weight:700;line-height:1;-webkit-user-select:none;user-select:none}.cngx-card__badge--top-end{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--top-start{inset-block-start:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-end{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-end:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--bottom-start{inset-block-end:var(--cngx-card-badge-offset, -6px);inset-inline-start:var(--cngx-card-badge-offset, -6px)}.cngx-card__badge--size-sm{min-width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-sm, .625rem)}.cngx-card__badge--size-md{min-width:var(--cngx-card-badge-size-md, 22px);height:var(--cngx-card-badge-size-md, 22px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-md, .7rem)}.cngx-card__badge--size-lg{min-width:var(--cngx-card-badge-size-lg, 28px);height:var(--cngx-card-badge-size-lg, 28px);padding:0 var(--cngx-card-badge-padding-inline, 5px);font-size:var(--cngx-card-badge-font-size-lg, .8125rem)}.cngx-card__badge--intent-primary{background:var( --cngx-card-badge-primary-bg, var(--cngx-badge-primary-bg, var(--cngx-color-primary, oklch(.66 .19 50))) );color:var(--cngx-card-badge-primary-color, oklch(1 0 0))}.cngx-card__badge--intent-danger{background:var( --cngx-card-badge-danger-bg, var(--cngx-badge-error-bg, var(--cngx-color-danger, oklch(.62 .22 25))) );color:var(--cngx-card-badge-danger-color, oklch(1 0 0))}.cngx-card__badge--intent-warning{background:var( --cngx-card-badge-warning-bg, var(--cngx-badge-warning-bg, var(--cngx-color-warning, oklch(.72 .18 70))) );color:var(--cngx-card-badge-warning-color, oklch(.2 .01 250))}.cngx-card__badge--intent-success{background:var(--cngx-card-badge-success-bg, var(--cngx-color-success, oklch(.6 .15 145)));color:var(--cngx-card-badge-success-color, oklch(1 0 0))}.cngx-card__badge--intent-neutral{background:var( --cngx-card-badge-neutral-bg, var(--cngx-badge-neutral-bg, var(--cngx-color-text-muted, oklch(.68 .01 240))) );color:var(--cngx-card-badge-neutral-color, oklch(1 0 0))}.cngx-card__badge:empty{min-width:var(--cngx-card-badge-size-sm, 10px);width:var(--cngx-card-badge-size-sm, 10px);height:var(--cngx-card-badge-size-sm, 10px);padding:0}}@keyframes cngx-card-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}}@media(forced-colors:active){.cngx-card.cngx-card--selected{border-color:Highlight!important}.cngx-card.cngx-card--selected:before{background:Highlight!important}.cngx-card.cngx-card--disabled,.cngx-card.cngx-card--disabled :is(.cngx-card__title,.cngx-card__subtitle){color:GrayText;border-color:GrayText}}\n"] }]
376
+ }], propDecorators: { cardType: [{ type: i0.Input, args: [{ isSignal: true, alias: "as", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
213
377
 
214
378
  /**
215
379
  * Structural slot directive for the card header region.
@@ -359,8 +523,15 @@ class CngxCardMedia {
359
523
  decorative = input(true, ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
360
524
  /** Aspect ratio applied via CSS `aspect-ratio` property. */
361
525
  aspectRatio = input('auto', ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
526
+ /**
527
+ * Native `loading` attribute for `<img>`/`<iframe>` hosts. Defaults to
528
+ * `lazy` - right for below-the-fold card lists; set `eager` on
529
+ * above-the-fold cards where lazy decoding costs LCP. `null` removes
530
+ * the attribute (non-loadable hosts like `<div>` backgrounds).
531
+ */
532
+ loading = input('lazy', ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
362
533
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
363
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: CngxCardMedia, isStandalone: true, selector: "[cngxCardMedia]", inputs: { decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.aspect-ratio": "aspectRatio() !== \"auto\" ? aspectRatio() : null", "attr.aria-hidden": "decorative() || null", "attr.loading": "\"lazy\"" }, classAttribute: "cngx-card__media" }, ngImport: i0 });
534
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: CngxCardMedia, isStandalone: true, selector: "[cngxCardMedia]", inputs: { decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.aspect-ratio": "aspectRatio() !== \"auto\" ? aspectRatio() : null", "attr.aria-hidden": "decorative() || null", "attr.loading": "loading()" }, classAttribute: "cngx-card__media" }, ngImport: i0 });
364
535
  }
365
536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardMedia, decorators: [{
366
537
  type: Directive,
@@ -371,10 +542,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
371
542
  class: 'cngx-card__media',
372
543
  '[style.aspect-ratio]': 'aspectRatio() !== "auto" ? aspectRatio() : null',
373
544
  '[attr.aria-hidden]': 'decorative() || null',
374
- '[attr.loading]': '"lazy"',
545
+ '[attr.loading]': 'loading()',
375
546
  },
376
547
  }]
377
- }], propDecorators: { decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
548
+ }], propDecorators: { decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }] } });
378
549
 
379
550
  /**
380
551
  * Structural slot directive for the card footer region.
@@ -701,7 +872,11 @@ class CngxCardGrid {
701
872
  gap = input('var(--cngx-gap-md, 16px)', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
702
873
  /** Grid density level - controls gap and card padding via CSS custom properties. */
703
874
  density = input('default', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
704
- /** Whether the grid should have `role="list"`. Requires `role="listitem"` on each card. */
875
+ /**
876
+ * Whether the grid should have `role="list"`. Requires
877
+ * `role="listitem"` on each child - on `<cngx-card>` set it via the
878
+ * card's `role` input, which overrides the archetype-derived role.
879
+ */
705
880
  semanticList = input(false, ...(ngDevMode ? [{ debugName: "semanticList" }] : /* istanbul ignore next */ []));
706
881
  /**
707
882
  * Optional data source. When provided and empty, the grid shows the matching
@@ -775,10 +950,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
775
950
  `, styles: ["@layer cngx.tokens{@property --cngx-card-grid-min{syntax: \"<length>\"; inherits: false; initial-value: 280px;}@property --cngx-card-grid-gap{syntax: \"<length>\"; inherits: false; initial-value: 16px;}}@layer cngx.components{@scope(.cngx-card-grid){:scope{--cngx-card-grid-gap: var(--cngx-space-md);display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--cngx-card-grid-min, 280px),1fr));gap:var(--cngx-card-grid-gap, var(--cngx-space-md, 16px))}:scope.cngx-card-grid--compact{--cngx-card-grid-gap: var(--cngx-space-sm, 8px);--cngx-card-padding: var(--cngx-space-sm, 8px)}:scope.cngx-card-grid--comfortable{--cngx-card-grid-gap: var(--cngx-space-lg, 24px);--cngx-card-padding: var(--cngx-space-lg, 24px)}}}\n"] }]
776
951
  }], propDecorators: { minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], semanticList: [{ type: i0.Input, args: [{ isSignal: true, alias: "semanticList", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], emptyReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyReason", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], emptyTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CngxCardGridEmpty), { isSignal: true }] }] } });
777
952
 
953
+ function segmentsEqual(a, b) {
954
+ return (a.length === b.length &&
955
+ a.every((segment, i) => segment.kind === b[i].kind && segment.text === b[i].text));
956
+ }
957
+ const TIMESTAMP_PLACEHOLDER = /\{(prefix|date)\}/;
958
+ const DATE_ONLY = [{ kind: 'date', text: '' }];
959
+ /**
960
+ * @internal Splits the `timestamp` message into its prefix, date and text
961
+ * pieces. Whitespace between them is the host's gap; a message without
962
+ * `{date}` still shows the date last.
963
+ */
964
+ function timestampSegments(message) {
965
+ const segments = [];
966
+ message.split(TIMESTAMP_PLACEHOLDER).forEach((part, index) => {
967
+ if (index % 2 === 1) {
968
+ segments.push({ kind: part, text: '' });
969
+ return;
970
+ }
971
+ const text = part.trim();
972
+ if (text) {
973
+ segments.push({ kind: 'text', text });
974
+ }
975
+ });
976
+ if (!segments.some((segment) => segment.kind === 'date')) {
977
+ segments.push(DATE_ONLY[0]);
978
+ }
979
+ return segments;
980
+ }
778
981
  /**
779
982
  * Displays a formatted date/timestamp, typically in a card footer.
780
983
  *
781
- * Uses `Intl.DateTimeFormat` with the injected `LOCALE_ID`.
984
+ * Uses `Intl.DateTimeFormat` with the app locale (`CNGX_LOCALE`, falling back
985
+ * to the nearest `LOCALE_ID`); a locale flip re-formats. The order of the
986
+ * prefix and the date comes from the `timestamp` message of the card
987
+ * language section (English `'{prefix} {date}'`).
782
988
  *
783
989
  * ```html
784
990
  * <cngx-card>
@@ -794,52 +1000,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
794
1000
  * @relatedTo CngxCard, CngxCardFooter
795
1001
  */
796
1002
  class CngxCardTimestamp {
797
- locale = inject(LOCALE_ID);
1003
+ locale = injectLocale();
1004
+ i18n = injectCardI18n();
798
1005
  /** Date to display. Accepts Date objects or ISO strings. */
799
1006
  date = input.required(...(ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []));
800
- /** Optional prefix text before the date (e.g. "Evaluierung am:"). */
1007
+ /**
1008
+ * Optional prefix text (e.g. "Evaluierung am:"). Placed before or after the
1009
+ * date by the `timestamp` message of the card language section.
1010
+ */
801
1011
  prefix = input(undefined, ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
802
1012
  /** `Intl.DateTimeFormatOptions` for the date. */
803
1013
  format = input(undefined, ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
804
- /** @internal */
1014
+ /** @internal Prefix, date and message text in the language's reading order. */
1015
+ segments = computed(() => (this.prefix() ? timestampSegments(this.i18n().timestamp) : DATE_ONLY), { ...(ngDevMode ? { debugName: "segments" } : /* istanbul ignore next */ {}), equal: segmentsEqual });
1016
+ /**
1017
+ * @internal Coerced instant, deduped by time value so a fresh-ref
1018
+ * `[date]` rebind of the same instant does not cascade the render
1019
+ * graph. NaN pairs compare equal - two Invalid Dates must dedupe too
1020
+ * (NaN !== NaN would defeat the arm). Mirrors `CngxTime.instant`.
1021
+ */
805
1022
  dateObj = computed(() => {
806
1023
  const d = this.date();
807
1024
  return typeof d === 'string' ? new Date(d) : d;
808
- }, ...(ngDevMode ? [{ debugName: "dateObj" }] : /* istanbul ignore next */ []));
809
- /** @internal */
810
- isoDate = computed(() => this.dateObj().toISOString(), ...(ngDevMode ? [{ debugName: "isoDate" }] : /* istanbul ignore next */ []));
811
- /** @internal */
1025
+ }, { ...(ngDevMode ? { debugName: "dateObj" } : /* istanbul ignore next */ {}), equal: (a, b) => {
1026
+ const ta = a.getTime();
1027
+ const tb = b.getTime();
1028
+ return ta === tb || (Number.isNaN(ta) && Number.isNaN(tb));
1029
+ } });
1030
+ /**
1031
+ * @internal Invalid Date guard. `toISOString()` throws and
1032
+ * `Intl.format` renders garbage on an invalid instant - a bad ISO
1033
+ * string must degrade to an empty render, not crash change detection.
1034
+ */
1035
+ isValidDate = computed(() => !Number.isNaN(this.dateObj().getTime()), ...(ngDevMode ? [{ debugName: "isValidDate" }] : /* istanbul ignore next */ []));
1036
+ /** @internal `null` (attribute removed) when the instant is invalid. */
1037
+ isoDate = computed(() => this.isValidDate() ? this.dateObj().toISOString() : null, ...(ngDevMode ? [{ debugName: "isoDate" }] : /* istanbul ignore next */ []));
1038
+ /** @internal Empty string when the instant is invalid. */
812
1039
  formattedDate = computed(() => {
1040
+ if (!this.isValidDate()) {
1041
+ return '';
1042
+ }
813
1043
  const fmt = this.format() ?? {
814
1044
  year: 'numeric',
815
1045
  month: '2-digit',
816
1046
  day: '2-digit',
817
1047
  };
818
- return new Intl.DateTimeFormat(this.locale, fmt).format(this.dateObj());
1048
+ return dateTimeFormatterFor(this.locale(), fmt).format(this.dateObj());
819
1049
  }, ...(ngDevMode ? [{ debugName: "formattedDate" }] : /* istanbul ignore next */ []));
1050
+ constructor() {
1051
+ if (isDevMode()) {
1052
+ effect(() => {
1053
+ if (!this.isValidDate()) {
1054
+ console.warn('[CngxCardTimestamp] [date] resolved to an Invalid Date - rendering empty. ' +
1055
+ 'Check the bound value (bad ISO string?).');
1056
+ }
1057
+ });
1058
+ }
1059
+ }
820
1060
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardTimestamp, deps: [], target: i0.ɵɵFactoryTarget.Component });
821
1061
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CngxCardTimestamp, isStandalone: true, selector: "cngx-card-timestamp", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: true, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cngx-card-timestamp" }, ngImport: i0, template: `
822
- @if (prefix()) {
823
- <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1062
+ @for (segment of segments(); track $index) {
1063
+ @switch (segment.kind) {
1064
+ @case ('prefix') {
1065
+ <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1066
+ }
1067
+ @case ('date') {
1068
+ <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
1069
+ {{ formattedDate() }}
1070
+ </time>
1071
+ }
1072
+ @default {
1073
+ {{ segment.text }}
1074
+ }
1075
+ }
824
1076
  }
825
- <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
826
- {{ formattedDate() }}
827
- </time>
828
- `, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-card-timestamp-gap{syntax: \"<length>\"; inherits: false; initial-value: 4px;}@property --cngx-card-timestamp-size{syntax: \"*\"; inherits: true; initial-value: .75rem;}@property --cngx-card-timestamp-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-timestamp-prefix-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-timestamp-color: oklch(.72 .02 290)}}[data-color-scheme=dark],.dark{--cngx-card-timestamp-color: oklch(.72 .02 290)}[data-color-scheme=light],.light{--cngx-card-timestamp-color: oklch(.36 .02 290)}}@layer cngx.components{@scope(.cngx-card-timestamp){:scope{--cngx-card-timestamp-gap: var(--cngx-space-xs);display:inline-flex;gap:var(--cngx-card-timestamp-gap, var(--cngx-space-xs, 4px));font-size:var(--cngx-card-timestamp-size, .75rem);color:var(--cngx-card-timestamp-color, oklch(.36 .02 290));line-height:1.4}.cngx-card-timestamp__prefix{font-weight:var(--cngx-card-timestamp-prefix-weight, 400)}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1077
+ `, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-card-timestamp-gap{syntax: \"<length>\"; inherits: false; initial-value: 4px;}@property --cngx-card-timestamp-size{syntax: \"*\"; inherits: true; initial-value: .75rem;}@property --cngx-card-timestamp-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-timestamp-prefix-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-timestamp-color: oklch(.72 .02 290)}}[data-color-scheme=dark],.dark{--cngx-card-timestamp-color: oklch(.72 .02 290)}[data-color-scheme=light],.light{--cngx-card-timestamp-color: oklch(.36 .02 290)}}@layer cngx.components{@scope(.cngx-card-timestamp){:scope{--cngx-card-timestamp-gap: var(--cngx-space-xs);display:inline-flex;gap:var(--cngx-card-timestamp-gap, var(--cngx-space-xs, 4px));font-size:var(--cngx-card-timestamp-size, .75rem);color:var(--cngx-card-timestamp-color, oklch(.36 .02 290));line-height:1.4}.cngx-card-timestamp__prefix{font-weight:var(--cngx-card-timestamp-prefix-weight, 400)}.cngx-card-timestamp__date{unicode-bidi:var(--cngx-card-timestamp-bidi, isolate)}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
829
1078
  }
830
1079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardTimestamp, decorators: [{
831
1080
  type: Component,
832
1081
  args: [{ selector: 'cngx-card-timestamp', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
833
1082
  class: 'cngx-card-timestamp',
834
1083
  }, template: `
835
- @if (prefix()) {
836
- <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1084
+ @for (segment of segments(); track $index) {
1085
+ @switch (segment.kind) {
1086
+ @case ('prefix') {
1087
+ <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1088
+ }
1089
+ @case ('date') {
1090
+ <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
1091
+ {{ formattedDate() }}
1092
+ </time>
1093
+ }
1094
+ @default {
1095
+ {{ segment.text }}
1096
+ }
1097
+ }
837
1098
  }
838
- <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
839
- {{ formattedDate() }}
840
- </time>
841
- `, styles: ["@layer cngx.tokens{@property --cngx-card-timestamp-gap{syntax: \"<length>\"; inherits: false; initial-value: 4px;}@property --cngx-card-timestamp-size{syntax: \"*\"; inherits: true; initial-value: .75rem;}@property --cngx-card-timestamp-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-timestamp-prefix-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-timestamp-color: oklch(.72 .02 290)}}[data-color-scheme=dark],.dark{--cngx-card-timestamp-color: oklch(.72 .02 290)}[data-color-scheme=light],.light{--cngx-card-timestamp-color: oklch(.36 .02 290)}}@layer cngx.components{@scope(.cngx-card-timestamp){:scope{--cngx-card-timestamp-gap: var(--cngx-space-xs);display:inline-flex;gap:var(--cngx-card-timestamp-gap, var(--cngx-space-xs, 4px));font-size:var(--cngx-card-timestamp-size, .75rem);color:var(--cngx-card-timestamp-color, oklch(.36 .02 290));line-height:1.4}.cngx-card-timestamp__prefix{font-weight:var(--cngx-card-timestamp-prefix-weight, 400)}}}\n"] }]
842
- }], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: true }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }] } });
1099
+ `, styles: ["@layer cngx.tokens{@property --cngx-card-timestamp-gap{syntax: \"<length>\"; inherits: false; initial-value: 4px;}@property --cngx-card-timestamp-size{syntax: \"*\"; inherits: true; initial-value: .75rem;}@property --cngx-card-timestamp-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.36 .02 290);}@property --cngx-card-timestamp-prefix-weight{syntax: \"<number>\"; inherits: true; initial-value: 400;}@media(prefers-color-scheme:dark){:root:not([data-color-scheme=light]):not(.light){--cngx-card-timestamp-color: oklch(.72 .02 290)}}[data-color-scheme=dark],.dark{--cngx-card-timestamp-color: oklch(.72 .02 290)}[data-color-scheme=light],.light{--cngx-card-timestamp-color: oklch(.36 .02 290)}}@layer cngx.components{@scope(.cngx-card-timestamp){:scope{--cngx-card-timestamp-gap: var(--cngx-space-xs);display:inline-flex;gap:var(--cngx-card-timestamp-gap, var(--cngx-space-xs, 4px));font-size:var(--cngx-card-timestamp-size, .75rem);color:var(--cngx-card-timestamp-color, oklch(.36 .02 290));line-height:1.4}.cngx-card-timestamp__prefix{font-weight:var(--cngx-card-timestamp-prefix-weight, 400)}.cngx-card-timestamp__date{unicode-bidi:var(--cngx-card-timestamp-bidi, isolate)}}}\n"] }]
1100
+ }], ctorParameters: () => [], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: true }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }] } });
843
1101
 
844
1102
  /**
845
1103
  * @module @cngx/common/card
@@ -849,5 +1107,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
849
1107
  * Generated bundle index. Do not edit.
850
1108
  */
851
1109
 
852
- export { CngxCard, CngxCardAccent, CngxCardActions, CngxCardBadge, CngxCardBody, CngxCardFooter, CngxCardGrid, CngxCardGridEmpty, CngxCardHeader, CngxCardMedia, CngxCardSkeleton, CngxCardSubtitle, CngxCardTimestamp, CngxCardTitle };
1110
+ export { CNGX_CARD_I18N, CNGX_CARD_LANGUAGE_EN, CngxCard, CngxCardAccent, CngxCardActions, CngxCardBadge, CngxCardBody, CngxCardFooter, CngxCardGrid, CngxCardGridEmpty, CngxCardHeader, CngxCardMedia, CngxCardSkeleton, CngxCardSubtitle, CngxCardTimestamp, CngxCardTitle, injectCardI18n, provideCardI18n, withCardI18nLabels };
853
1111
  //# sourceMappingURL=cngx-common-card.mjs.map