@molecule/app-empty-state-angular 0.0.0-stage → 1.1.0

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.
@@ -0,0 +1,148 @@
1
+ import { type AfterViewInit, type DoCheck, type TemplateRef } from '@angular/core';
2
+ import type { UIClassMap } from '@molecule/app-ui';
3
+ import type { CtaCardProps } from './types.js';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * A "soft sell" card used to promote a next-step action inside a page body
7
+ * (e.g., "Connect your bank", "Invite teammates").
8
+ *
9
+ * Differs from `<EmptyState>` in being positioned in a list of cards rather
10
+ * than filling the void. Supports a horizontal layout with the media slot
11
+ * beside the text.
12
+ *
13
+ * The host IS the outer `<section>` (`section[mol-cta-card]`), matching React's
14
+ * root exactly. Node props are an input (a string, or a `TemplateRef`) or
15
+ * projected content: `[slot=eyebrow]`, `[slot=title]`, `[slot=description]`,
16
+ * `[slot=action]` and `[slot=media]`.
17
+ *
18
+ * This is the Angular counterpart of `@molecule/app-empty-state-react`'s
19
+ * `CtaCard`.
20
+ *
21
+ * @remarks
22
+ * Angular projection needs the `<ng-content>` capture points mounted, so the
23
+ * optional regions render optimistically and {@link CtaCard.ngDoCheck}
24
+ * detaches the ones React would not render.
25
+ */
26
+ export declare class CtaCard implements AfterViewInit, DoCheck {
27
+ /** Optional small eyebrow line above the title — a string, a `TemplateRef`, or `[slot=eyebrow]`. */
28
+ eyebrow?: unknown;
29
+ /** Primary heading — a string, a `TemplateRef`, or `[slot=title]`. */
30
+ title?: unknown;
31
+ /** Supporting copy — a string, a `TemplateRef`, or `[slot=description]`. */
32
+ description?: unknown;
33
+ /** Primary call-to-action — a string, a `TemplateRef`, or `[slot=action]`. */
34
+ action?: unknown;
35
+ /** Optional visual / illustration — a `TemplateRef`, or `[slot=media]`. */
36
+ media?: unknown;
37
+ /** `'horizontal'` renders media beside text; `'vertical'` stacks them. Defaults to `'vertical'`. */
38
+ layout?: CtaCardProps['layout'];
39
+ /** `data-mol-id` for AI-agent selectors. */
40
+ dataMolId?: string;
41
+ /** Override outer wrapper classes. */
42
+ className?: string;
43
+ /** The optional media wrapper (the projected media lands here). */
44
+ private mediaEl?;
45
+ /** The optional eyebrow wrapper (the projected eyebrow lands here). */
46
+ private eyebrowEl?;
47
+ /** The optional description paragraph (the projected description lands here). */
48
+ private descriptionEl?;
49
+ /** The optional action wrapper (the projected action lands here). */
50
+ private actionEl?;
51
+ /** The host element (the outer `<section>`). */
52
+ private readonly host;
53
+ /** The DOM renderer, for the wrapper attach/detach. */
54
+ private readonly renderer;
55
+ /** Reconciles the optional wrappers against React's DOM. */
56
+ private readonly guard;
57
+ /** Whether a `[slot=media]` projection landed. */
58
+ private readonly mediaProjected;
59
+ /** Whether a `[slot=eyebrow]` projection landed. */
60
+ private readonly eyebrowProjected;
61
+ /** Whether a `[slot=description]` projection landed. */
62
+ private readonly descriptionProjected;
63
+ /** Whether a `[slot=action]` projection landed. */
64
+ private readonly actionProjected;
65
+ /**
66
+ * The current class map.
67
+ * @returns The UIClassMap.
68
+ */
69
+ cm(): UIClassMap;
70
+ /**
71
+ * The layout direction (React's `layout === 'horizontal' ? 'row' : 'col'`).
72
+ * @returns True for the horizontal layout.
73
+ */
74
+ horizontal(): boolean;
75
+ /**
76
+ * The host's class list (React's root `<section>` classes).
77
+ * @returns The class string.
78
+ */
79
+ classes(): string;
80
+ /**
81
+ * The media wrapper's class list.
82
+ * @returns The class string.
83
+ */
84
+ mediaClasses(): string;
85
+ /**
86
+ * The text column's class list.
87
+ * @returns The class string.
88
+ */
89
+ bodyClasses(): string;
90
+ /**
91
+ * The eyebrow's class list.
92
+ * @returns The class string.
93
+ */
94
+ eyebrowClasses(): string;
95
+ /**
96
+ * The heading's class list.
97
+ * @returns The class string.
98
+ */
99
+ titleClasses(): string;
100
+ /**
101
+ * The action wrapper's class list.
102
+ * @returns The class string.
103
+ */
104
+ actionClasses(): string;
105
+ /**
106
+ * A node value as a template, when the caller passed one.
107
+ * @param value - The prop value.
108
+ * @returns The template, or null for text.
109
+ */
110
+ templateOf(value: unknown): TemplateRef<unknown> | null;
111
+ /**
112
+ * A node value as text, when the caller passed one.
113
+ * @param value - The prop value.
114
+ * @returns The text, or null for a template.
115
+ */
116
+ textOf(value: unknown): string | null;
117
+ /**
118
+ * Whether the media wrapper renders.
119
+ * @returns True when a media node or a projected media is present.
120
+ */
121
+ showMedia(): boolean;
122
+ /**
123
+ * Whether the eyebrow renders.
124
+ * @returns True when an eyebrow node or a projected eyebrow is present.
125
+ */
126
+ showEyebrow(): boolean;
127
+ /**
128
+ * Whether the description renders.
129
+ * @returns True when a description node or a projected description is present.
130
+ */
131
+ showDescription(): boolean;
132
+ /**
133
+ * Whether the action renders.
134
+ * @returns True when an action node or a projected action is present.
135
+ */
136
+ showAction(): boolean;
137
+ /**
138
+ * Reads the projected capture points and reconciles the optional wrappers.
139
+ */
140
+ reconcile(): void;
141
+ /** Reconciles the wrappers once the view (and its projections) exist. */
142
+ ngAfterViewInit(): void;
143
+ /** Reconciles the wrappers after input writes, as React re-renders on a prop change. */
144
+ ngDoCheck(): void;
145
+ static ɵfac: i0.ɵɵFactoryDeclaration<CtaCard, never>;
146
+ static ɵcmp: i0.ɵɵComponentDeclaration<CtaCard, "section[mol-cta-card]", never, { "eyebrow": { "alias": "eyebrow"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "action": { "alias": "action"; "required": false; }; "media": { "alias": "media"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=media]", "[slot=eyebrow]", "[slot=title]", "[slot=description]", "[slot=action]"], true, never>;
147
+ }
148
+ //# sourceMappingURL=cta-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cta-card.component.d.ts","sourceRoot":"","sources":["../src/cta-card.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAA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,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAgB;IACrD,mDAAmD;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgB;IAEhD;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,UAAU,IAAI,OAAO;IAIrB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAajB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAKrB;;;OAGG;IACH,cAAc,IAAI,MAAM;IAKxB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAKtB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvD;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IAIrC;;;OAGG;IACH,SAAS,IAAI,OAAO;IAIpB;;;OAGG;IACH,WAAW,IAAI,OAAO;IAItB;;;OAGG;IACH,eAAe,IAAI,OAAO;IAI1B;;;OAGG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,SAAS,IAAI,IAAI;IAejB,yEAAyE;IACzE,eAAe,IAAI,IAAI;IAIvB,wFAAwF;IACxF,SAAS,IAAI,IAAI;yCAhMN,OAAO;2CAAP,OAAO;CAmMnB"}
@@ -0,0 +1,384 @@
1
+ /**
2
+ * CtaCard component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { NgTemplateOutlet } from '@angular/common';
7
+ import { Component, ElementRef, inject, RendererFactory2, signal, ViewChild, } from '@angular/core';
8
+ import { getClassMap } from '@molecule/app-ui';
9
+ import { hasNodes, SlotGuard } from './slot-dom.js';
10
+ import * as i0 from "@angular/core";
11
+ const _c0 = ["mediaEl"];
12
+ const _c1 = ["eyebrowEl"];
13
+ const _c2 = ["descriptionEl"];
14
+ const _c3 = ["actionEl"];
15
+ const _c4 = [[["", "slot", "media"]], [["", "slot", "eyebrow"]], [["", "slot", "title"]], [["", "slot", "description"]], [["", "slot", "action"]]];
16
+ const _c5 = ["[slot=media]", "[slot=eyebrow]", "[slot=title]", "[slot=description]", "[slot=action]"];
17
+ function CtaCard_Conditional_2_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelementContainer(0, 4);
19
+ } if (rf & 2) {
20
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
21
+ } }
22
+ function CtaCard_Conditional_3_Template(rf, ctx) { if (rf & 1) {
23
+ i0.ɵɵtext(0);
24
+ } if (rf & 2) {
25
+ i0.ɵɵtextInterpolate(ctx);
26
+ } }
27
+ function CtaCard_Conditional_8_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelementContainer(0, 4);
29
+ } if (rf & 2) {
30
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
31
+ } }
32
+ function CtaCard_Conditional_9_Template(rf, ctx) { if (rf & 1) {
33
+ i0.ɵɵtext(0);
34
+ } if (rf & 2) {
35
+ i0.ɵɵtextInterpolate(ctx);
36
+ } }
37
+ function CtaCard_Conditional_12_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelementContainer(0, 4);
39
+ } if (rf & 2) {
40
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
41
+ } }
42
+ function CtaCard_Conditional_13_Template(rf, ctx) { if (rf & 1) {
43
+ i0.ɵɵtext(0);
44
+ } if (rf & 2) {
45
+ i0.ɵɵtextInterpolate(ctx);
46
+ } }
47
+ function CtaCard_Conditional_17_Template(rf, ctx) { if (rf & 1) {
48
+ i0.ɵɵelementContainer(0, 4);
49
+ } if (rf & 2) {
50
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
51
+ } }
52
+ function CtaCard_Conditional_18_Template(rf, ctx) { if (rf & 1) {
53
+ i0.ɵɵtext(0);
54
+ } if (rf & 2) {
55
+ i0.ɵɵtextInterpolate(ctx);
56
+ } }
57
+ function CtaCard_Conditional_22_Template(rf, ctx) { if (rf & 1) {
58
+ i0.ɵɵelementContainer(0, 4);
59
+ } if (rf & 2) {
60
+ i0.ɵɵproperty("ngTemplateOutlet", ctx);
61
+ } }
62
+ function CtaCard_Conditional_23_Template(rf, ctx) { if (rf & 1) {
63
+ i0.ɵɵtext(0);
64
+ } if (rf & 2) {
65
+ i0.ɵɵtextInterpolate(ctx);
66
+ } }
67
+ /**
68
+ * Whether a node-valued prop is an Angular template (a node) rather than plain
69
+ * text. Checked structurally — `TemplateRef` is a type-only import in the
70
+ * emitted metadata, so `instanceof` is not dependable across bundles.
71
+ *
72
+ * @param value - The prop value.
73
+ * @returns True when it can be rendered with `ngTemplateOutlet`.
74
+ */
75
+ const isTemplate = (value) => typeof value === 'object' &&
76
+ value !== null &&
77
+ typeof value.createEmbeddedView === 'function';
78
+ /**
79
+ * Renders a text value the way React renders a node string.
80
+ *
81
+ * @param value - The prop value.
82
+ * @returns The text to render, or `null` when there is none.
83
+ */
84
+ const textOf = (value) => typeof value === 'string' || typeof value === 'number' ? String(value) : null;
85
+ /**
86
+ * A "soft sell" card used to promote a next-step action inside a page body
87
+ * (e.g., "Connect your bank", "Invite teammates").
88
+ *
89
+ * Differs from `<EmptyState>` in being positioned in a list of cards rather
90
+ * than filling the void. Supports a horizontal layout with the media slot
91
+ * beside the text.
92
+ *
93
+ * The host IS the outer `<section>` (`section[mol-cta-card]`), matching React's
94
+ * root exactly. Node props are an input (a string, or a `TemplateRef`) or
95
+ * projected content: `[slot=eyebrow]`, `[slot=title]`, `[slot=description]`,
96
+ * `[slot=action]` and `[slot=media]`.
97
+ *
98
+ * This is the Angular counterpart of `@molecule/app-empty-state-react`'s
99
+ * `CtaCard`.
100
+ *
101
+ * @remarks
102
+ * Angular projection needs the `<ng-content>` capture points mounted, so the
103
+ * optional regions render optimistically and {@link CtaCard.ngDoCheck}
104
+ * detaches the ones React would not render.
105
+ */
106
+ export class CtaCard {
107
+ /** Optional small eyebrow line above the title — a string, a `TemplateRef`, or `[slot=eyebrow]`. */
108
+ eyebrow;
109
+ /** Primary heading — a string, a `TemplateRef`, or `[slot=title]`. */
110
+ title;
111
+ /** Supporting copy — a string, a `TemplateRef`, or `[slot=description]`. */
112
+ description;
113
+ /** Primary call-to-action — a string, a `TemplateRef`, or `[slot=action]`. */
114
+ action;
115
+ /** Optional visual / illustration — a `TemplateRef`, or `[slot=media]`. */
116
+ media;
117
+ /** `'horizontal'` renders media beside text; `'vertical'` stacks them. Defaults to `'vertical'`. */
118
+ layout;
119
+ /** `data-mol-id` for AI-agent selectors. */
120
+ dataMolId;
121
+ /** Override outer wrapper classes. */
122
+ className;
123
+ /** The optional media wrapper (the projected media lands here). */
124
+ mediaEl;
125
+ /** The optional eyebrow wrapper (the projected eyebrow lands here). */
126
+ eyebrowEl;
127
+ /** The optional description paragraph (the projected description lands here). */
128
+ descriptionEl;
129
+ /** The optional action wrapper (the projected action lands here). */
130
+ actionEl;
131
+ /** The host element (the outer `<section>`). */
132
+ host = inject((ElementRef));
133
+ /** The DOM renderer, for the wrapper attach/detach. */
134
+ renderer = inject(RendererFactory2).createRenderer(null, null);
135
+ /** Reconciles the optional wrappers against React's DOM. */
136
+ guard = new SlotGuard(this.host, this.renderer);
137
+ /** Whether a `[slot=media]` projection landed. */
138
+ mediaProjected = signal(false, /* @ts-ignore */
139
+ ...(ngDevMode ? [{ debugName: "mediaProjected" }] : /* istanbul ignore next */ []));
140
+ /** Whether a `[slot=eyebrow]` projection landed. */
141
+ eyebrowProjected = signal(false, /* @ts-ignore */
142
+ ...(ngDevMode ? [{ debugName: "eyebrowProjected" }] : /* istanbul ignore next */ []));
143
+ /** Whether a `[slot=description]` projection landed. */
144
+ descriptionProjected = signal(false, /* @ts-ignore */
145
+ ...(ngDevMode ? [{ debugName: "descriptionProjected" }] : /* istanbul ignore next */ []));
146
+ /** Whether a `[slot=action]` projection landed. */
147
+ actionProjected = signal(false, /* @ts-ignore */
148
+ ...(ngDevMode ? [{ debugName: "actionProjected" }] : /* istanbul ignore next */ []));
149
+ /**
150
+ * The current class map.
151
+ * @returns The UIClassMap.
152
+ */
153
+ cm() {
154
+ return getClassMap();
155
+ }
156
+ /**
157
+ * The layout direction (React's `layout === 'horizontal' ? 'row' : 'col'`).
158
+ * @returns True for the horizontal layout.
159
+ */
160
+ horizontal() {
161
+ return this.layout === 'horizontal';
162
+ }
163
+ /**
164
+ * The host's class list (React's root `<section>` classes).
165
+ * @returns The class string.
166
+ */
167
+ classes() {
168
+ const cm = this.cm();
169
+ return cm.cn(cm.flex({
170
+ direction: this.horizontal() ? 'row' : 'col',
171
+ align: this.horizontal() ? 'center' : 'stretch',
172
+ gap: 'md',
173
+ }), cm.sp('p', 6), this.className);
174
+ }
175
+ /**
176
+ * The media wrapper's class list.
177
+ * @returns The class string.
178
+ */
179
+ mediaClasses() {
180
+ return this.cm().cn(this.cm().shrink0);
181
+ }
182
+ /**
183
+ * The text column's class list.
184
+ * @returns The class string.
185
+ */
186
+ bodyClasses() {
187
+ const cm = this.cm();
188
+ return cm.cn(cm.flex1, cm.stack(2));
189
+ }
190
+ /**
191
+ * The eyebrow's class list.
192
+ * @returns The class string.
193
+ */
194
+ eyebrowClasses() {
195
+ const cm = this.cm();
196
+ return cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'));
197
+ }
198
+ /**
199
+ * The heading's class list.
200
+ * @returns The class string.
201
+ */
202
+ titleClasses() {
203
+ const cm = this.cm();
204
+ return cm.cn(cm.textSize('xl'), cm.fontWeight('bold'));
205
+ }
206
+ /**
207
+ * The action wrapper's class list.
208
+ * @returns The class string.
209
+ */
210
+ actionClasses() {
211
+ return this.cm().sp('mt', 2);
212
+ }
213
+ /**
214
+ * A node value as a template, when the caller passed one.
215
+ * @param value - The prop value.
216
+ * @returns The template, or null for text.
217
+ */
218
+ templateOf(value) {
219
+ return isTemplate(value) ? value : null;
220
+ }
221
+ /**
222
+ * A node value as text, when the caller passed one.
223
+ * @param value - The prop value.
224
+ * @returns The text, or null for a template.
225
+ */
226
+ textOf(value) {
227
+ return textOf(value);
228
+ }
229
+ /**
230
+ * Whether the media wrapper renders.
231
+ * @returns True when a media node or a projected media is present.
232
+ */
233
+ showMedia() {
234
+ return this.media != null || this.mediaProjected();
235
+ }
236
+ /**
237
+ * Whether the eyebrow renders.
238
+ * @returns True when an eyebrow node or a projected eyebrow is present.
239
+ */
240
+ showEyebrow() {
241
+ return this.eyebrow != null || this.eyebrowProjected();
242
+ }
243
+ /**
244
+ * Whether the description renders.
245
+ * @returns True when a description node or a projected description is present.
246
+ */
247
+ showDescription() {
248
+ return this.description != null || this.descriptionProjected();
249
+ }
250
+ /**
251
+ * Whether the action renders.
252
+ * @returns True when an action node or a projected action is present.
253
+ */
254
+ showAction() {
255
+ return this.action != null || this.actionProjected();
256
+ }
257
+ /**
258
+ * Reads the projected capture points and reconciles the optional wrappers.
259
+ */
260
+ reconcile() {
261
+ const media = this.mediaEl?.nativeElement;
262
+ if (media)
263
+ this.mediaProjected.set(hasNodes(media));
264
+ const eyebrow = this.eyebrowEl?.nativeElement;
265
+ if (eyebrow)
266
+ this.eyebrowProjected.set(hasNodes(eyebrow));
267
+ const description = this.descriptionEl?.nativeElement;
268
+ if (description)
269
+ this.descriptionProjected.set(hasNodes(description));
270
+ const action = this.actionEl?.nativeElement;
271
+ if (action)
272
+ this.actionProjected.set(hasNodes(action));
273
+ this.guard.toggle(media, this.showMedia());
274
+ this.guard.toggle(eyebrow, this.showEyebrow());
275
+ this.guard.toggle(description, this.showDescription());
276
+ this.guard.toggle(action, this.showAction());
277
+ }
278
+ /** Reconciles the wrappers once the view (and its projections) exist. */
279
+ ngAfterViewInit() {
280
+ this.reconcile();
281
+ }
282
+ /** Reconciles the wrappers after input writes, as React re-renders on a prop change. */
283
+ ngDoCheck() {
284
+ this.reconcile();
285
+ }
286
+ static ɵfac = function CtaCard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CtaCard)(); };
287
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CtaCard, selectors: [["section", "mol-cta-card", ""]], viewQuery: function CtaCard_Query(rf, ctx) { if (rf & 1) {
288
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5)(_c3, 5);
289
+ } if (rf & 2) {
290
+ let _t;
291
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.mediaEl = _t.first);
292
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.eyebrowEl = _t.first);
293
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.descriptionEl = _t.first);
294
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.actionEl = _t.first);
295
+ } }, hostVars: 3, hostBindings: function CtaCard_HostBindings(rf, ctx) { if (rf & 2) {
296
+ i0.ɵɵattribute("data-mol-id", ctx.dataMolId ?? null);
297
+ i0.ɵɵclassMap(ctx.classes());
298
+ } }, inputs: { eyebrow: "eyebrow", title: "title", description: "description", action: "action", media: "media", layout: "layout", dataMolId: "dataMolId", className: "className" }, ngContentSelectors: _c5, decls: 25, vars: 15, consts: [["mediaEl", ""], ["eyebrowEl", ""], ["descriptionEl", ""], ["actionEl", ""], [3, "ngTemplateOutlet"]], template: function CtaCard_Template(rf, ctx) { if (rf & 1) {
299
+ i0.ɵɵprojectionDef(_c4);
300
+ i0.ɵɵelementStart(0, "div", null, 0);
301
+ i0.ɵɵconditionalCreate(2, CtaCard_Conditional_2_Template, 1, 1, "ng-container", 4)(3, CtaCard_Conditional_3_Template, 1, 1);
302
+ i0.ɵɵprojection(4);
303
+ i0.ɵɵelementEnd();
304
+ i0.ɵɵelementStart(5, "div")(6, "div", null, 1);
305
+ i0.ɵɵconditionalCreate(8, CtaCard_Conditional_8_Template, 1, 1, "ng-container", 4)(9, CtaCard_Conditional_9_Template, 1, 1);
306
+ i0.ɵɵprojection(10, 1);
307
+ i0.ɵɵelementEnd();
308
+ i0.ɵɵelementStart(11, "h3");
309
+ i0.ɵɵconditionalCreate(12, CtaCard_Conditional_12_Template, 1, 1, "ng-container", 4)(13, CtaCard_Conditional_13_Template, 1, 1);
310
+ i0.ɵɵprojection(14, 2);
311
+ i0.ɵɵelementEnd();
312
+ i0.ɵɵelementStart(15, "p", null, 2);
313
+ i0.ɵɵconditionalCreate(17, CtaCard_Conditional_17_Template, 1, 1, "ng-container", 4)(18, CtaCard_Conditional_18_Template, 1, 1);
314
+ i0.ɵɵprojection(19, 3);
315
+ i0.ɵɵelementEnd();
316
+ i0.ɵɵelementStart(20, "div", null, 3);
317
+ i0.ɵɵconditionalCreate(22, CtaCard_Conditional_22_Template, 1, 1, "ng-container", 4)(23, CtaCard_Conditional_23_Template, 1, 1);
318
+ i0.ɵɵprojection(24, 4);
319
+ i0.ɵɵelementEnd()();
320
+ } if (rf & 2) {
321
+ let tmp_5_0;
322
+ let tmp_8_0;
323
+ let tmp_10_0;
324
+ let tmp_11_0;
325
+ let tmp_13_0;
326
+ i0.ɵɵclassMap(ctx.mediaClasses());
327
+ i0.ɵɵadvance(2);
328
+ i0.ɵɵconditional((tmp_5_0 = ctx.templateOf(ctx.media)) ? 2 : (tmp_5_0 = ctx.textOf(ctx.media)) ? 3 : -1, tmp_5_0);
329
+ i0.ɵɵadvance(3);
330
+ i0.ɵɵclassMap(ctx.bodyClasses());
331
+ i0.ɵɵadvance();
332
+ i0.ɵɵclassMap(ctx.eyebrowClasses());
333
+ i0.ɵɵadvance(2);
334
+ i0.ɵɵconditional((tmp_8_0 = ctx.templateOf(ctx.eyebrow)) ? 8 : (tmp_8_0 = ctx.textOf(ctx.eyebrow)) ? 9 : -1, tmp_8_0);
335
+ i0.ɵɵadvance(3);
336
+ i0.ɵɵclassMap(ctx.titleClasses());
337
+ i0.ɵɵadvance();
338
+ i0.ɵɵconditional((tmp_10_0 = ctx.templateOf(ctx.title)) ? 12 : (tmp_10_0 = ctx.textOf(ctx.title)) ? 13 : -1, tmp_10_0);
339
+ i0.ɵɵadvance(5);
340
+ i0.ɵɵconditional((tmp_11_0 = ctx.templateOf(ctx.description)) ? 17 : (tmp_11_0 = ctx.textOf(ctx.description)) ? 18 : -1, tmp_11_0);
341
+ i0.ɵɵadvance(3);
342
+ i0.ɵɵclassMap(ctx.actionClasses());
343
+ i0.ɵɵadvance(2);
344
+ i0.ɵɵconditional((tmp_13_0 = ctx.templateOf(ctx.action)) ? 22 : (tmp_13_0 = ctx.textOf(ctx.action)) ? 23 : -1, tmp_13_0);
345
+ } }, dependencies: [NgTemplateOutlet], encapsulation: 2 });
346
+ }
347
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CtaCard, [{
348
+ type: Component,
349
+ args: [{
350
+ selector: 'section[mol-cta-card]',
351
+ standalone: true,
352
+ imports: [NgTemplateOutlet],
353
+ inputs: [
354
+ 'eyebrow',
355
+ 'title',
356
+ 'description',
357
+ 'action',
358
+ 'media',
359
+ 'layout',
360
+ 'dataMolId',
361
+ 'className',
362
+ ],
363
+ host: {
364
+ '[class]': 'classes()',
365
+ '[attr.data-mol-id]': 'dataMolId ?? null',
366
+ },
367
+ // prettier-ignore
368
+ template: `<div #mediaEl [class]="mediaClasses()">@if (templateOf(media); as tpl) {<ng-container [ngTemplateOutlet]="tpl" />} @else if (textOf(media); as t) {{{ t }}}<ng-content select="[slot=media]"></ng-content></div><div [class]="bodyClasses()"><div #eyebrowEl [class]="eyebrowClasses()">@if (templateOf(eyebrow); as tpl) {<ng-container [ngTemplateOutlet]="tpl" />} @else if (textOf(eyebrow); as t) {{{ t }}}<ng-content select="[slot=eyebrow]"></ng-content></div><h3 [class]="titleClasses()">@if (templateOf(title); as tpl) {<ng-container [ngTemplateOutlet]="tpl" />} @else if (textOf(title); as t) {{{ t }}}<ng-content select="[slot=title]"></ng-content></h3><p #descriptionEl>@if (templateOf(description); as tpl) {<ng-container [ngTemplateOutlet]="tpl" />} @else if (textOf(description); as t) {{{ t }}}<ng-content select="[slot=description]"></ng-content></p><div #actionEl [class]="actionClasses()">@if (templateOf(action); as tpl) {<ng-container [ngTemplateOutlet]="tpl" />} @else if (textOf(action); as t) {{{ t }}}<ng-content select="[slot=action]"></ng-content></div></div>`,
369
+ }]
370
+ }], null, { mediaEl: [{
371
+ type: ViewChild,
372
+ args: ['mediaEl']
373
+ }], eyebrowEl: [{
374
+ type: ViewChild,
375
+ args: ['eyebrowEl']
376
+ }], descriptionEl: [{
377
+ type: ViewChild,
378
+ args: ['descriptionEl']
379
+ }], actionEl: [{
380
+ type: ViewChild,
381
+ args: ['actionEl']
382
+ }] }); })();
383
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CtaCard, { className: "CtaCard", filePath: "cta-card.component.ts", lineNumber: 91 }); })();
384
+ //# sourceMappingURL=cta-card.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cta-card.component.js","sourceRoot":"","sources":["../src/cta-card.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAEL,SAAS,EAET,UAAU,EACV,MAAM,EAEN,gBAAgB,EAChB,MAAM,EAEN,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;;;;;;;;;IAiEkC,2BAAyC;;IAA3B,sCAAwB;;;IAAqC,YAAO;;IAAP,yBAAO;;;IAAiK,2BAAyC;;IAA3B,sCAAwB;;;IAAuC,YAAO;;IAAP,yBAAO;;;IAAsH,2BAAyC;;IAA3B,sCAAwB;;;IAAqC,YAAO;;IAAP,yBAAO;;;IAA8G,2BAAyC;;IAA3B,sCAAwB;;;IAA2C,YAAO;;IAAP,yBAAO;;;IAAqI,2BAAyC;;IAA3B,sCAAwB;;;IAAsC,YAAO;;IAAP,yBAAO;;AA9DlgC;;;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