@cngx/common 0.1.0-rc.7 → 0.1.0-rc.9

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 (69) hide show
  1. package/card/README.md +2 -1
  2. package/command/README.md +29 -0
  3. package/data/README.md +15 -3
  4. package/dialog/README.md +23 -1
  5. package/fesm2022/cngx-common-a11y.mjs +517 -184
  6. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  7. package/fesm2022/cngx-common-audio.mjs +62 -17
  8. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  9. package/fesm2022/cngx-common-card.mjs +301 -46
  10. package/fesm2022/cngx-common-card.mjs.map +1 -1
  11. package/fesm2022/cngx-common-chart.mjs +1221 -479
  12. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  13. package/fesm2022/cngx-common-command.mjs +97 -16
  14. package/fesm2022/cngx-common-command.mjs.map +1 -1
  15. package/fesm2022/cngx-common-data.mjs +1496 -499
  16. package/fesm2022/cngx-common-data.mjs.map +1 -1
  17. package/fesm2022/cngx-common-dialog.mjs +236 -61
  18. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  19. package/fesm2022/cngx-common-display.mjs +364 -93
  20. package/fesm2022/cngx-common-display.mjs.map +1 -1
  21. package/fesm2022/cngx-common-interactive.mjs +2040 -1046
  22. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  23. package/fesm2022/cngx-common-layout.mjs +955 -125
  24. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  25. package/fesm2022/cngx-common-popover.mjs +1293 -89
  26. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  27. package/fesm2022/cngx-common-stepper.mjs +997 -453
  28. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  29. package/fesm2022/cngx-common-tabs.mjs +1794 -1265
  30. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  31. package/fesm2022/cngx-common-timeline.mjs +151 -61
  32. package/fesm2022/cngx-common-timeline.mjs.map +1 -1
  33. package/fesm2022/cngx-common.mjs +1 -1
  34. package/interactive/README.md +15 -4
  35. package/layout/README.md +37 -1
  36. package/package.json +20 -7
  37. package/popover/README.md +58 -2
  38. package/schematics/collection.json +9 -0
  39. package/schematics/ng-add/index.js +9 -0
  40. package/schematics/ng-add/schema.json +91 -0
  41. package/schematics/package.json +3 -0
  42. package/stepper/README.md +11 -8
  43. package/theming/components/cngx-accordion.css +1 -1
  44. package/theming/components/cngx-backdrop.css +12 -0
  45. package/theming/components/cngx-button-toggle.css +29 -3
  46. package/theming/components/cngx-data-grid.css +168 -1
  47. package/theming/components/cngx-dialog.css +13 -0
  48. package/theming/components/cngx-listbox.css +21 -12
  49. package/theming/components/cngx-menu.css +56 -16
  50. package/theming/components/cngx-popover-sheet.css +402 -0
  51. package/theming/components/cngx-popover.css +28 -0
  52. package/theming/components/cngx-recycler-placeholder.css +196 -0
  53. package/theming/components/cngx-ripple.css +1 -1
  54. package/theming/components/cngx-slider.css +32 -1
  55. package/theming/components/cngx-tooltip.css +12 -0
  56. package/timeline/README.md +155 -0
  57. package/types/cngx-common-a11y.d.ts +205 -28
  58. package/types/cngx-common-card.d.ts +201 -17
  59. package/types/cngx-common-chart.d.ts +345 -48
  60. package/types/cngx-common-command.d.ts +50 -10
  61. package/types/cngx-common-data.d.ts +743 -92
  62. package/types/cngx-common-dialog.d.ts +161 -10
  63. package/types/cngx-common-display.d.ts +356 -142
  64. package/types/cngx-common-interactive.d.ts +910 -226
  65. package/types/cngx-common-layout.d.ts +603 -32
  66. package/types/cngx-common-popover.d.ts +612 -49
  67. package/types/cngx-common-stepper.d.ts +526 -237
  68. package/types/cngx-common-tabs.d.ts +358 -75
  69. package/types/cngx-common-timeline.d.ts +108 -22
@@ -1,9 +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, 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';
9
+ import { cngxDevWarn } from '@cngx/utils';
10
+
11
+ /**
12
+ * The English card section: the single source of the card's English copy.
13
+ * `CNGX_CARD_I18N` defaults to it, and the shipped English pack is built from it.
14
+ *
15
+ * @category common/card/i18n
16
+ * @since 0.1.0
17
+ * @relatedTo CNGX_CARD_I18N
18
+ */
19
+ const CNGX_CARD_LANGUAGE_EN = {
20
+ selected: 'Selected',
21
+ deselected: 'Deselected',
22
+ loading: 'Loading',
23
+ timestamp: '{prefix} {date}',
24
+ };
25
+
26
+ /** @internal The English section with the active pack's card section on top. */
27
+ const cardBundleFromPack = createLanguageSection('card', CNGX_CARD_LANGUAGE_EN);
28
+ /**
29
+ * DI token for the card i18n bundle, a `Signal` so the phrases follow a
30
+ * runtime language switch. `providedIn: 'root'`: the card section of the
31
+ * active language pack over the English defaults.
32
+ *
33
+ * @category common/card/i18n
34
+ * @wcag AA
35
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/card/i18n/card-i18n.ts
36
+ * @since 0.1.0
37
+ * @relatedTo CngxCard
38
+ */
39
+ const CNGX_CARD_I18N = new InjectionToken('CngxCardI18n', {
40
+ providedIn: 'root',
41
+ factory: cardBundleFromPack,
42
+ });
43
+ /** @internal */
44
+ function defineCardI18nFeature(fn) {
45
+ return Object.assign(fn, { _target: 'i18n' });
46
+ }
47
+ /**
48
+ * Override i18n labels via a partial bundle - unset keys keep the language
49
+ * pack's phrase, or the English default. Pass a `Signal` to switch the
50
+ * language at runtime.
51
+ *
52
+ * @category common/card/i18n
53
+ */
54
+ function withCardI18nLabels(overrides) {
55
+ return defineCardI18nFeature((bundle) => createOverrideMerge(bundle, overrides));
56
+ }
57
+ /**
58
+ * Provider for the card i18n bundle. The features apply on top of the active
59
+ * language pack, so a subtree can override single keys of the app's language.
60
+ *
61
+ * ```ts
62
+ * bootstrapApplication(AppComponent, {
63
+ * providers: [
64
+ * provideCardI18n(withCardI18nLabels({ selected: 'Ausgewählt', deselected: 'Abgewählt' })),
65
+ * ],
66
+ * });
67
+ * ```
68
+ *
69
+ * @category common/card/i18n
70
+ */
71
+ function provideCardI18n(...features) {
72
+ return {
73
+ provide: CNGX_CARD_I18N,
74
+ useFactory: () => features.reduce((bundle, feat) => feat(bundle), cardBundleFromPack()),
75
+ };
76
+ }
77
+ /**
78
+ * Inject the resolved card i18n bundle.
79
+ *
80
+ * @category common/card/i18n
81
+ */
82
+ function injectCardI18n() {
83
+ return inject(CNGX_CARD_I18N);
84
+ }
7
85
 
8
86
  /**
9
87
  * Semantic card component that adapts its host element role based on the `as` input.
@@ -50,10 +128,30 @@ class CngxCard {
50
128
  optional: true,
51
129
  skipSelf: true,
52
130
  });
131
+ router = inject(Router, { optional: true });
132
+ i18n = injectCardI18n();
53
133
  /** Semantic archetype: `'article'` (display), `'button'` (action), or `'link'` (navigation). */
54
134
  cardType = input('article', { ...(ngDevMode ? { debugName: "cardType" } : /* istanbul ignore next */ {}), alias: 'as' });
55
- /** Navigation URL when `as="link"`. Applied as `href` on the host. */
135
+ /**
136
+ * Navigation target when `as="link"`. Activation (click / Enter)
137
+ * navigates: internal URLs go through the app `Router` when one is
138
+ * provided, everything else (schemes, protocol-relative, router-less
139
+ * apps) through `window.location.assign`. The value is also mirrored
140
+ * as an `href` attribute on the host as a styling/testing hook - the
141
+ * host is not a native anchor, so browser-native link affordances
142
+ * (modifier-click new tab, context-menu link actions) do not apply.
143
+ */
56
144
  href = input(undefined, ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
145
+ /**
146
+ * Explicit ARIA role override for the host. Wins over the
147
+ * archetype-derived role. The primary use is `role="listitem"` on
148
+ * cards inside `<cngx-card-grid [semanticList]="true">` - the grid's
149
+ * `role="list"` requires listitem children, which the archetype
150
+ * binding would otherwise overwrite. Overriding the role on an
151
+ * interactive card replaces its button/link semantics; pair with an
152
+ * inner interactive element when both are needed.
153
+ */
154
+ role = input(undefined, ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
57
155
  /** Accessible label for the card. Overrides the default screen reader announcement. */
58
156
  ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
59
157
  /** Two-way selection state. Only relevant when `selectable` is `true`. */
@@ -70,8 +168,12 @@ class CngxCard {
70
168
  interactive = computed(() => this.cardType() !== 'article', ...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
71
169
  /** @internal Host href for link cards. */
72
170
  hostHref = computed(() => this.cardType() === 'link' ? (this.href() ?? null) : null, ...(ngDevMode ? [{ debugName: "hostHref" }] : /* istanbul ignore next */ []));
73
- /** @internal Host element ARIA role. */
171
+ /** @internal Host element ARIA role. Explicit `role` input wins over the archetype. */
74
172
  hostRole = computed(() => {
173
+ const override = this.role();
174
+ if (override) {
175
+ return override;
176
+ }
75
177
  switch (this.cardType()) {
76
178
  case 'button':
77
179
  return 'button';
@@ -106,18 +208,44 @@ class CngxCard {
106
208
  * set while `disabled` is false would read as "locked").
107
209
  */
108
210
  describedByIds = computed(() => this.disabled() && this.disabledReason() ? this.disabledReasonId : null, ...(ngDevMode ? [{ debugName: "describedByIds" }] : /* istanbul ignore next */ []));
109
- /** @internal SR live announcement for state changes. */
211
+ /**
212
+ * @internal Selection phrase with loading-start expiry: a real
213
+ * `selected` change (re)arms the phrase; a loading START spends an
214
+ * already-voiced phrase so the loading-clear content change cannot
215
+ * re-announce it (the region is `aria-atomic`). A toggle DURING
216
+ * loading keeps its phrase across the clear, so the change is voiced
217
+ * exactly once when the loading phrase yields.
218
+ */
219
+ selectionPhrase = createAnnouncementPhrase({
220
+ source: () => ({
221
+ selected: this.selected(),
222
+ selectable: this.selectable(),
223
+ loading: this.loading(),
224
+ }),
225
+ arm: (curr, prev) => {
226
+ if (curr.selectable && curr.selected !== prev.selected) {
227
+ return untracked(() => (curr.selected ? this.i18n().selected : this.i18n().deselected));
228
+ }
229
+ return null;
230
+ },
231
+ spend: (curr, prev) => curr.loading && !prev.loading,
232
+ });
233
+ /**
234
+ * @internal SR live announcement, driven by transitions rather than
235
+ * persistent state (Pillar 2: voice the change, not the standing
236
+ * state). Loading owns the region while active; otherwise the armed
237
+ * selection phrase renders (empty between transitions, so AT stays
238
+ * silent on no-op ticks).
239
+ */
110
240
  liveAnnouncement = computed(() => {
111
- if (this.loading()) {
112
- return 'Loading';
113
- }
114
- if (this.selectable() && this.selected()) {
115
- return 'Selected';
116
- }
117
- if (this.selectable() && !this.selected()) {
118
- return 'Deselected';
119
- }
120
- return '';
241
+ // Read the phrase EAGERLY: linkedSignal only observes source
242
+ // snapshots it is actually read under - a lazy read behind the
243
+ // loading arm would skip the loading-start snapshot and never
244
+ // spend the phrase (same trap as tabs' closedPhrase).
245
+ // Copy is read untracked so a language switch never re-voices the
246
+ // region; the next transition speaks the new language.
247
+ const phrase = this.selectionPhrase();
248
+ return this.loading() ? untracked(() => this.i18n().loading) : phrase;
121
249
  }, ...(ngDevMode ? [{ debugName: "liveAnnouncement" }] : /* istanbul ignore next */ []));
122
250
  /** Emits when an interactive card is clicked or activated via keyboard. */
123
251
  clicked = output();
@@ -134,26 +262,59 @@ class CngxCard {
134
262
  this.selected.update((v) => !v);
135
263
  }
136
264
  this.clicked.emit();
265
+ if (e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) {
266
+ // Modified / non-primary click carries new-tab intent. There is no
267
+ // native anchor to honour it, so never convert it into same-tab
268
+ // navigation (RouterLink skips modified clicks the same way).
269
+ return;
270
+ }
271
+ this.navigateToHref();
137
272
  }
138
273
  /** @internal */
139
274
  handleHostKeydown(e) {
140
- if (!this.interactive()) {
275
+ if (!this.interactive() || e.repeat) {
276
+ return;
277
+ }
278
+ const isSpace = e.key === ' ';
279
+ if (isSpace && this.cardType() !== 'button') {
280
+ // APG: links activate on Enter only - Space keeps its scroll default.
141
281
  return;
142
282
  }
143
283
  if (this.disabled()) {
144
284
  e.preventDefault();
145
285
  return;
146
286
  }
147
- if (e.key === ' ') {
287
+ if (isSpace) {
148
288
  e.preventDefault();
149
289
  }
150
290
  if (this.selectable()) {
151
291
  this.selected.update((v) => !v);
152
292
  }
153
293
  this.clicked.emit();
294
+ this.navigateToHref();
295
+ }
296
+ /**
297
+ * Navigation for the link archetype. Internal URLs prefer the app
298
+ * `Router` (SPA navigation, no full reload); external URLs and
299
+ * router-less apps fall back to `window.location.assign`.
300
+ */
301
+ navigateToHref() {
302
+ if (this.cardType() !== 'link') {
303
+ return;
304
+ }
305
+ const href = this.href();
306
+ if (!href) {
307
+ return;
308
+ }
309
+ const external = /^[a-z][a-z0-9+.-]*:|^\/\//i.test(href);
310
+ if (this.router && !external) {
311
+ void this.router.navigateByUrl(href);
312
+ return;
313
+ }
314
+ window.location.assign(href);
154
315
  }
155
316
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
156
- 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: `
317
+ 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: `
157
318
  <ng-content select="[cngxCardMedia]" />
158
319
  <ng-content select="header[cngxCardHeader]" />
159
320
  <ng-content select="[cngxCardBody]" />
@@ -172,7 +333,7 @@ class CngxCard {
172
333
  <span [id]="liveRegionId" aria-live="polite" aria-atomic="true" class="cngx-sr-only">
173
334
  {{ liveAnnouncement() }}
174
335
  </span>
175
- `, 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: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{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}}@media(forced-colors:active){.cngx-card.cngx-card--selected{border-color:Highlight!important}.cngx-card.cngx-card--selected:before{background:Highlight!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
336
+ `, 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 });
176
337
  }
177
338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCard, decorators: [{
178
339
  type: Component,
@@ -212,8 +373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
212
373
  <span [id]="liveRegionId" aria-live="polite" aria-atomic="true" class="cngx-sr-only">
213
374
  {{ liveAnnouncement() }}
214
375
  </span>
215
- `, 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: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{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}}@media(forced-colors:active){.cngx-card.cngx-card--selected{border-color:Highlight!important}.cngx-card.cngx-card--selected:before{background:Highlight!important}}\n"] }]
216
- }], 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"] }] } });
376
+ `, 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"] }]
377
+ }], 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"] }] } });
217
378
 
218
379
  /**
219
380
  * Structural slot directive for the card header region.
@@ -363,8 +524,15 @@ class CngxCardMedia {
363
524
  decorative = input(true, ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
364
525
  /** Aspect ratio applied via CSS `aspect-ratio` property. */
365
526
  aspectRatio = input('auto', ...(ngDevMode ? [{ debugName: "aspectRatio" }] : /* istanbul ignore next */ []));
527
+ /**
528
+ * Native `loading` attribute for `<img>`/`<iframe>` hosts. Defaults to
529
+ * `lazy` - right for below-the-fold card lists; set `eager` on
530
+ * above-the-fold cards where lazy decoding costs LCP. `null` removes
531
+ * the attribute (non-loadable hosts like `<div>` backgrounds).
532
+ */
533
+ loading = input('lazy', ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
366
534
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
367
- 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 });
535
+ 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 });
368
536
  }
369
537
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardMedia, decorators: [{
370
538
  type: Directive,
@@ -375,10 +543,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
375
543
  class: 'cngx-card__media',
376
544
  '[style.aspect-ratio]': 'aspectRatio() !== "auto" ? aspectRatio() : null',
377
545
  '[attr.aria-hidden]': 'decorative() || null',
378
- '[attr.loading]': '"lazy"',
546
+ '[attr.loading]': 'loading()',
379
547
  },
380
548
  }]
381
- }], propDecorators: { decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
549
+ }], 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 }] }] } });
382
550
 
383
551
  /**
384
552
  * Structural slot directive for the card footer region.
@@ -705,7 +873,11 @@ class CngxCardGrid {
705
873
  gap = input('var(--cngx-gap-md, 16px)', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
706
874
  /** Grid density level - controls gap and card padding via CSS custom properties. */
707
875
  density = input('default', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
708
- /** Whether the grid should have `role="list"`. Requires `role="listitem"` on each card. */
876
+ /**
877
+ * Whether the grid should have `role="list"`. Requires
878
+ * `role="listitem"` on each child - on `<cngx-card>` set it via the
879
+ * card's `role` input, which overrides the archetype-derived role.
880
+ */
709
881
  semanticList = input(false, ...(ngDevMode ? [{ debugName: "semanticList" }] : /* istanbul ignore next */ []));
710
882
  /**
711
883
  * Optional data source. When provided and empty, the grid shows the matching
@@ -779,10 +951,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
779
951
  `, 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"] }]
780
952
  }], 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 }] }] } });
781
953
 
954
+ function segmentsEqual(a, b) {
955
+ return (a.length === b.length &&
956
+ a.every((segment, i) => segment.kind === b[i].kind && segment.text === b[i].text));
957
+ }
958
+ const TIMESTAMP_PLACEHOLDER = /\{(prefix|date)\}/;
959
+ const DATE_ONLY = [{ kind: 'date', text: '' }];
960
+ /**
961
+ * @internal Splits the `timestamp` message into its prefix, date and text
962
+ * pieces. Whitespace between them is the host's gap; a message without
963
+ * `{date}` still shows the date last.
964
+ */
965
+ function timestampSegments(message) {
966
+ const segments = [];
967
+ message.split(TIMESTAMP_PLACEHOLDER).forEach((part, index) => {
968
+ if (index % 2 === 1) {
969
+ segments.push({ kind: part, text: '' });
970
+ return;
971
+ }
972
+ const text = part.trim();
973
+ if (text) {
974
+ segments.push({ kind: 'text', text });
975
+ }
976
+ });
977
+ if (!segments.some((segment) => segment.kind === 'date')) {
978
+ segments.push(DATE_ONLY[0]);
979
+ }
980
+ return segments;
981
+ }
782
982
  /**
783
983
  * Displays a formatted date/timestamp, typically in a card footer.
784
984
  *
785
- * Uses `Intl.DateTimeFormat` with the injected `LOCALE_ID`.
985
+ * Uses `Intl.DateTimeFormat` with the app locale (`CNGX_LOCALE`, falling back
986
+ * to the nearest `LOCALE_ID`); a locale flip re-formats. The order of the
987
+ * prefix and the date comes from the `timestamp` message of the card
988
+ * language section (English `'{prefix} {date}'`).
786
989
  *
787
990
  * ```html
788
991
  * <cngx-card>
@@ -798,37 +1001,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
798
1001
  * @relatedTo CngxCard, CngxCardFooter
799
1002
  */
800
1003
  class CngxCardTimestamp {
801
- locale = inject(LOCALE_ID);
1004
+ locale = injectLocale();
1005
+ i18n = injectCardI18n();
802
1006
  /** Date to display. Accepts Date objects or ISO strings. */
803
1007
  date = input.required(...(ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []));
804
- /** Optional prefix text before the date (e.g. "Evaluierung am:"). */
1008
+ /**
1009
+ * Optional prefix text (e.g. "Evaluierung am:"). Placed before or after the
1010
+ * date by the `timestamp` message of the card language section.
1011
+ */
805
1012
  prefix = input(undefined, ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
806
1013
  /** `Intl.DateTimeFormatOptions` for the date. */
807
1014
  format = input(undefined, ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
808
- /** @internal */
1015
+ /** @internal Prefix, date and message text in the language's reading order. */
1016
+ segments = computed(() => (this.prefix() ? timestampSegments(this.i18n().timestamp) : DATE_ONLY), { ...(ngDevMode ? { debugName: "segments" } : /* istanbul ignore next */ {}), equal: segmentsEqual });
1017
+ /**
1018
+ * @internal Coerced instant, deduped by time value so a fresh-ref
1019
+ * `[date]` rebind of the same instant does not cascade the render
1020
+ * graph. NaN pairs compare equal - two Invalid Dates must dedupe too
1021
+ * (NaN !== NaN would defeat the arm). Mirrors `CngxTime.instant`.
1022
+ */
809
1023
  dateObj = computed(() => {
810
1024
  const d = this.date();
811
1025
  return typeof d === 'string' ? new Date(d) : d;
812
- }, ...(ngDevMode ? [{ debugName: "dateObj" }] : /* istanbul ignore next */ []));
813
- /** @internal */
814
- isoDate = computed(() => this.dateObj().toISOString(), ...(ngDevMode ? [{ debugName: "isoDate" }] : /* istanbul ignore next */ []));
815
- /** @internal */
1026
+ }, { ...(ngDevMode ? { debugName: "dateObj" } : /* istanbul ignore next */ {}), equal: (a, b) => {
1027
+ const ta = a.getTime();
1028
+ const tb = b.getTime();
1029
+ return ta === tb || (Number.isNaN(ta) && Number.isNaN(tb));
1030
+ } });
1031
+ /**
1032
+ * @internal Invalid Date guard. `toISOString()` throws and
1033
+ * `Intl.format` renders garbage on an invalid instant - a bad ISO
1034
+ * string must degrade to an empty render, not crash change detection.
1035
+ */
1036
+ isValidDate = computed(() => !Number.isNaN(this.dateObj().getTime()), ...(ngDevMode ? [{ debugName: "isValidDate" }] : /* istanbul ignore next */ []));
1037
+ /** @internal `null` (attribute removed) when the instant is invalid. */
1038
+ isoDate = computed(() => this.isValidDate() ? this.dateObj().toISOString() : null, ...(ngDevMode ? [{ debugName: "isoDate" }] : /* istanbul ignore next */ []));
1039
+ /** @internal Empty string when the instant is invalid. */
816
1040
  formattedDate = computed(() => {
1041
+ if (!this.isValidDate()) {
1042
+ return '';
1043
+ }
817
1044
  const fmt = this.format() ?? {
818
1045
  year: 'numeric',
819
1046
  month: '2-digit',
820
1047
  day: '2-digit',
821
1048
  };
822
- return new Intl.DateTimeFormat(this.locale, fmt).format(this.dateObj());
1049
+ return dateTimeFormatterFor(this.locale(), fmt).format(this.dateObj());
823
1050
  }, ...(ngDevMode ? [{ debugName: "formattedDate" }] : /* istanbul ignore next */ []));
1051
+ constructor() {
1052
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
1053
+ effect(() => {
1054
+ if (!this.isValidDate()) {
1055
+ cngxDevWarn('CNGX1006', '[cngx-card-timestamp] [date] resolved to an Invalid Date - rendering empty. ' +
1056
+ 'Check the bound value (bad ISO string?).');
1057
+ }
1058
+ });
1059
+ }
1060
+ }
824
1061
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardTimestamp, deps: [], target: i0.ɵɵFactoryTarget.Component });
825
1062
  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: `
826
- @if (prefix()) {
827
- <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1063
+ @for (segment of segments(); track $index) {
1064
+ @switch (segment.kind) {
1065
+ @case ('prefix') {
1066
+ <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1067
+ }
1068
+ @case ('date') {
1069
+ <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
1070
+ {{ formattedDate() }}
1071
+ </time>
1072
+ }
1073
+ @default {
1074
+ {{ segment.text }}
1075
+ }
1076
+ }
828
1077
  }
829
- <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
830
- {{ formattedDate() }}
831
- </time>
832
1078
  `, 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 });
833
1079
  }
834
1080
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxCardTimestamp, decorators: [{
@@ -836,14 +1082,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
836
1082
  args: [{ selector: 'cngx-card-timestamp', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
837
1083
  class: 'cngx-card-timestamp',
838
1084
  }, template: `
839
- @if (prefix()) {
840
- <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1085
+ @for (segment of segments(); track $index) {
1086
+ @switch (segment.kind) {
1087
+ @case ('prefix') {
1088
+ <span class="cngx-card-timestamp__prefix">{{ prefix() }}</span>
1089
+ }
1090
+ @case ('date') {
1091
+ <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
1092
+ {{ formattedDate() }}
1093
+ </time>
1094
+ }
1095
+ @default {
1096
+ {{ segment.text }}
1097
+ }
1098
+ }
841
1099
  }
842
- <time [attr.datetime]="isoDate()" class="cngx-card-timestamp__date">
843
- {{ formattedDate() }}
844
- </time>
845
1100
  `, 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"] }]
846
- }], 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 }] }] } });
1101
+ }], 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 }] }] } });
847
1102
 
848
1103
  /**
849
1104
  * @module @cngx/common/card
@@ -853,5 +1108,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
853
1108
  * Generated bundle index. Do not edit.
854
1109
  */
855
1110
 
856
- export { CngxCard, CngxCardAccent, CngxCardActions, CngxCardBadge, CngxCardBody, CngxCardFooter, CngxCardGrid, CngxCardGridEmpty, CngxCardHeader, CngxCardMedia, CngxCardSkeleton, CngxCardSubtitle, CngxCardTimestamp, CngxCardTitle };
1111
+ 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 };
857
1112
  //# sourceMappingURL=cngx-common-card.mjs.map