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

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