@molecule/app-vendor-card-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,480 @@
1
+ /**
2
+ * VendorCard component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { Component, ElementRef, inject, signal, ViewChild } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import { Avatar } from '@molecule/app-ui-angular';
9
+ import * as i0 from "@angular/core";
10
+ const _c0 = ["descriptionEl"];
11
+ const _c1 = ["memberSinceEl"];
12
+ const _c2 = ["actionsEl"];
13
+ const _c3 = [[["", "slot", "name"]], [["", "slot", "badges"]], [["", "slot", "description"]], [["", "slot", "membersince"]], [["", "slot", "actions"]]];
14
+ const _c4 = ["[slot=name]", "[slot=badges]", "[slot=description]", "[slot=memberSince]", "[slot=actions]"];
15
+ const _c5 = () => ({ align: "start", gap: "md" });
16
+ const _c6 = () => ({ align: "center", gap: "sm", wrap: "wrap" });
17
+ const _c7 = () => ({ align: "center", gap: "sm" });
18
+ function VendorCard_Conditional_5_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelementContainerStart(0);
20
+ i0.ɵɵtext(1);
21
+ i0.ɵɵelementContainerEnd();
22
+ } if (rf & 2) {
23
+ const ctx_r0 = i0.ɵɵnextContext();
24
+ i0.ɵɵadvance();
25
+ i0.ɵɵtextInterpolate(ctx_r0.name);
26
+ } }
27
+ function VendorCard_Conditional_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelementContainerStart(0);
29
+ i0.ɵɵtext(1);
30
+ i0.ɵɵelementContainerEnd();
31
+ } if (rf & 2) {
32
+ const ctx_r0 = i0.ɵɵnextContext(2);
33
+ i0.ɵɵadvance();
34
+ i0.ɵɵtextInterpolate(ctx_r0.description);
35
+ } }
36
+ function VendorCard_Conditional_7_Template(rf, ctx) { if (rf & 1) {
37
+ i0.ɵɵelementStart(0, "p", null, 0);
38
+ i0.ɵɵconditionalCreate(2, VendorCard_Conditional_7_Conditional_2_Template, 2, 1, "ng-container");
39
+ i0.ɵɵprojection(3, 2);
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const ctx_r0 = i0.ɵɵnextContext();
43
+ i0.ɵɵclassMap(ctx_r0.cm().textSize("sm"));
44
+ i0.ɵɵadvance(2);
45
+ i0.ɵɵconditional(ctx_r0.hasDescription ? 2 : -1);
46
+ } }
47
+ function VendorCard_Conditional_9_Conditional_5_Template(rf, ctx) { if (rf & 1) {
48
+ i0.ɵɵelementStart(0, "span");
49
+ i0.ɵɵtext(1);
50
+ i0.ɵɵelementEnd();
51
+ } if (rf & 2) {
52
+ const ctx_r0 = i0.ɵɵnextContext(2);
53
+ i0.ɵɵadvance();
54
+ i0.ɵɵtextInterpolate(ctx_r0.reviewText());
55
+ } }
56
+ function VendorCard_Conditional_9_Template(rf, ctx) { if (rf & 1) {
57
+ i0.ɵɵelementStart(0, "span")(1, "span", 5);
58
+ i0.ɵɵtext(2, "\u2605");
59
+ i0.ɵɵelementEnd();
60
+ i0.ɵɵelementStart(3, "span");
61
+ i0.ɵɵtext(4);
62
+ i0.ɵɵelementEnd();
63
+ i0.ɵɵconditionalCreate(5, VendorCard_Conditional_9_Conditional_5_Template, 2, 1, "span");
64
+ i0.ɵɵelementEnd();
65
+ } if (rf & 2) {
66
+ const ctx_r0 = i0.ɵɵnextContext();
67
+ i0.ɵɵclassMap(ctx_r0.ratingClass());
68
+ i0.ɵɵadvance(3);
69
+ i0.ɵɵclassMap(ctx_r0.cm().fontWeight("semibold"));
70
+ i0.ɵɵadvance();
71
+ i0.ɵɵtextInterpolate(ctx_r0.ratingText());
72
+ i0.ɵɵadvance();
73
+ i0.ɵɵconditional(ctx_r0.hasReviewCount ? 5 : -1);
74
+ } }
75
+ function VendorCard_Conditional_10_Conditional_3_Template(rf, ctx) { if (rf & 1) {
76
+ i0.ɵɵelementContainerStart(0);
77
+ i0.ɵɵtext(1);
78
+ i0.ɵɵelementContainerEnd();
79
+ } if (rf & 2) {
80
+ const ctx_r0 = i0.ɵɵnextContext(2);
81
+ i0.ɵɵadvance();
82
+ i0.ɵɵtextInterpolate(ctx_r0.memberSince);
83
+ } }
84
+ function VendorCard_Conditional_10_Template(rf, ctx) { if (rf & 1) {
85
+ i0.ɵɵelementStart(0, "span", null, 1);
86
+ i0.ɵɵtext(2, "\u00B7 ");
87
+ i0.ɵɵconditionalCreate(3, VendorCard_Conditional_10_Conditional_3_Template, 2, 1, "ng-container");
88
+ i0.ɵɵprojection(4, 3);
89
+ i0.ɵɵelementEnd();
90
+ } if (rf & 2) {
91
+ const ctx_r0 = i0.ɵɵnextContext();
92
+ i0.ɵɵclassMap(ctx_r0.cm().textSize("xs"));
93
+ i0.ɵɵadvance(3);
94
+ i0.ɵɵconditional(ctx_r0.hasMemberSince ? 3 : -1);
95
+ } }
96
+ function VendorCard_Conditional_11_Template(rf, ctx) { if (rf & 1) {
97
+ i0.ɵɵelementContainerStart(0);
98
+ i0.ɵɵtext(1);
99
+ i0.ɵɵelementContainerEnd();
100
+ } if (rf & 2) {
101
+ const ctx_r0 = i0.ɵɵnextContext();
102
+ i0.ɵɵadvance();
103
+ i0.ɵɵtextInterpolate(ctx_r0.badges);
104
+ } }
105
+ function VendorCard_Conditional_13_Conditional_2_Template(rf, ctx) { if (rf & 1) {
106
+ i0.ɵɵelementContainerStart(0);
107
+ i0.ɵɵtext(1);
108
+ i0.ɵɵelementContainerEnd();
109
+ } if (rf & 2) {
110
+ const ctx_r0 = i0.ɵɵnextContext(2);
111
+ i0.ɵɵadvance();
112
+ i0.ɵɵtextInterpolate(ctx_r0.actions);
113
+ } }
114
+ function VendorCard_Conditional_13_Template(rf, ctx) { if (rf & 1) {
115
+ i0.ɵɵelementStart(0, "div", null, 2);
116
+ i0.ɵɵconditionalCreate(2, VendorCard_Conditional_13_Conditional_2_Template, 2, 1, "ng-container");
117
+ i0.ɵɵprojection(3, 4);
118
+ i0.ɵɵelementEnd();
119
+ } if (rf & 2) {
120
+ const ctx_r0 = i0.ɵɵnextContext();
121
+ i0.ɵɵclassMap(ctx_r0.cm().flex(i0.ɵɵpureFunction0(3, _c7)));
122
+ i0.ɵɵadvance(2);
123
+ i0.ɵɵconditional(ctx_r0.hasActions ? 2 : -1);
124
+ } }
125
+ /**
126
+ * Whether a wrapper element renders anything besides its static content: an
127
+ * element child (a projected `[slot=<name>]` landed — the projection moves
128
+ * into the view at render time) or text beyond the wrapper's own prefix. The
129
+ * `·` prefix is the member-since span's own static text, never content.
130
+ *
131
+ * @param el - The wrapper element.
132
+ * @returns True when its children render anything.
133
+ */
134
+ const hasRenderableContent = (el) => Array.from(el.childNodes).some((node) => node.nodeType === Node.ELEMENT_NODE ||
135
+ (node.nodeType === Node.TEXT_NODE &&
136
+ (node.textContent ?? '').trim().length > 0 &&
137
+ (node.textContent ?? '').trim() !== '·'));
138
+ /**
139
+ * VendorCard component.
140
+ *
141
+ * Vendor / seller / agent profile card — Avatar/logo + name + tagline +
142
+ * rating/review count + member-since + badges + actions row. Used in
143
+ * marketplaces, agent directories, multi-tenant catalogs. The host IS the
144
+ * Card's root `<div>` (`div[mol-vendor-card]` wearing `cm.card({ variant:
145
+ * 'elevated' })` + `cm.cardPadding('md')`), matching React's root exactly;
146
+ * `onClick` is a native `(click)` on the host, with no keyboard handler or
147
+ * role — put primary navigation in `actions` buttons for accessibility.
148
+ * `rating` renders a single ★ plus the number (`toFixed(1)`), not a
149
+ * five-star row; `reviewCount` renders only when `rating` is also set. When
150
+ * `name` is not a plain string the Avatar alt falls back to hardcoded
151
+ * 'Vendor'. Same props, same DOM as `@molecule/app-vendor-card-react`'s
152
+ * `VendorCard`. Node-valued `name`, `description`, `memberSince`, `badges`
153
+ * and `actions` content is projected (`[slot=<name>]`); a string or number
154
+ * input renders as text. The optional wrappers (`description`, `memberSince`,
155
+ * `actions`) render optimistically so a projection can land, then withdraw at
156
+ * view init when neither a text input nor a projection is present — React
157
+ * renders no wrapper at all for them.
158
+ */
159
+ export class VendorCard {
160
+ /** Vendor / seller display name: text, or `[slot=name]` content. */
161
+ name;
162
+ /** Optional logo URL — falls back to Avatar text initials. */
163
+ logoSrc;
164
+ /** Tagline / one-liner: text, or `[slot=description]` content. */
165
+ description;
166
+ /** 0-5 average rating. */
167
+ rating;
168
+ /** Total review count. */
169
+ reviewCount;
170
+ /** Member-since date display: text, or `[slot=memberSince]` content. */
171
+ memberSince;
172
+ /** Optional badges row: text, or `[slot=badges]` content. */
173
+ badges;
174
+ /** Right-side actions: text, or `[slot=actions]` content. */
175
+ actions;
176
+ /** Extra classes. */
177
+ className;
178
+ /** The optional description paragraph (projected content lands here). */
179
+ descriptionEl;
180
+ /** The optional member-since span (projected content lands here). */
181
+ memberSinceEl;
182
+ /** The optional actions row (projected content lands here). */
183
+ actionsEl;
184
+ /** The host element, scanned for projected `[slot=<name>]` content. */
185
+ elementRef = inject(ElementRef);
186
+ /** Whether a `[slot=description]` projection landed (true until proven otherwise). */
187
+ descriptionProjected = signal(true, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "descriptionProjected" }] : /* istanbul ignore next */ []));
189
+ /** Whether a `[slot=memberSince]` projection landed (true until proven otherwise). */
190
+ memberSinceProjected = signal(true, /* @ts-ignore */
191
+ ...(ngDevMode ? [{ debugName: "memberSinceProjected" }] : /* istanbul ignore next */ []));
192
+ /** Whether a `[slot=actions]` projection landed (true until proven otherwise). */
193
+ actionsProjected = signal(true, /* @ts-ignore */
194
+ ...(ngDevMode ? [{ debugName: "actionsProjected" }] : /* istanbul ignore next */ []));
195
+ /**
196
+ * Withdraws the optimistic optional wrappers whose slot projections did not
197
+ * land: when neither a text input nor projected content is present, React
198
+ * renders no wrapper at all. View queries resolve at view init, and a
199
+ * projected slot's content is in place by then.
200
+ */
201
+ ngAfterViewInit() {
202
+ const description = this.descriptionEl?.nativeElement;
203
+ if (description && !this.hasDescription && !hasRenderableContent(description)) {
204
+ this.descriptionProjected.set(false);
205
+ }
206
+ const memberSince = this.memberSinceEl?.nativeElement;
207
+ if (memberSince && !this.hasMemberSince && !hasRenderableContent(memberSince)) {
208
+ this.memberSinceProjected.set(false);
209
+ }
210
+ const actions = this.actionsEl?.nativeElement;
211
+ if (actions && !this.hasActions && !hasRenderableContent(actions)) {
212
+ this.actionsProjected.set(false);
213
+ }
214
+ }
215
+ /**
216
+ * The current class map.
217
+ * @returns The UIClassMap.
218
+ */
219
+ cm() {
220
+ return getClassMap();
221
+ }
222
+ /**
223
+ * Computes the Card root class list (Card's elevated variant and md
224
+ * padding defaults, plus the extra classes).
225
+ * @returns The class string.
226
+ */
227
+ classes() {
228
+ return this.cm().cn(this.cm().card({ variant: 'elevated' }), this.cm().cardPadding('md'), this.className);
229
+ }
230
+ /**
231
+ * The avatar row's class.
232
+ * @returns The class string.
233
+ */
234
+ avatarRowClass() {
235
+ return this.cm().flex({ align: 'start', gap: 'md' });
236
+ }
237
+ /**
238
+ * The body column's class.
239
+ * @returns The class string.
240
+ */
241
+ bodyClass() {
242
+ return this.cm().cn(this.cm().flex1, this.cm().stack(2));
243
+ }
244
+ /**
245
+ * The name heading's class.
246
+ * @returns The class string.
247
+ */
248
+ headingClass() {
249
+ return this.cm().cn(this.cm().textSize('lg'), this.cm().fontWeight('bold'));
250
+ }
251
+ /**
252
+ * The description paragraph's class.
253
+ * @returns The class string.
254
+ */
255
+ descriptionClass() {
256
+ return this.cm().textSize('sm');
257
+ }
258
+ /**
259
+ * The rating / badges row's class.
260
+ * @returns The class string.
261
+ */
262
+ metaRowClass() {
263
+ return this.cm().flex({ align: 'center', gap: 'sm', wrap: 'wrap' });
264
+ }
265
+ /**
266
+ * The rating chip's class.
267
+ * @returns The class string.
268
+ */
269
+ ratingClass() {
270
+ return this.cm().cn(this.cm().flex({ align: 'center', gap: 'xs' }), this.cm().textSize('sm'));
271
+ }
272
+ /**
273
+ * The member-since text's class.
274
+ * @returns The class string.
275
+ */
276
+ memberSinceClass() {
277
+ return this.cm().textSize('xs');
278
+ }
279
+ /**
280
+ * The actions row's class.
281
+ * @returns The class string.
282
+ */
283
+ actionsClass() {
284
+ return this.cm().flex({ align: 'center', gap: 'sm' });
285
+ }
286
+ /**
287
+ * The Avatar's alt/name (React's `typeof name === 'string' ? name :
288
+ * 'Vendor'`).
289
+ * @returns The display name.
290
+ */
291
+ displayName() {
292
+ return typeof this.name === 'string' ? this.name : 'Vendor';
293
+ }
294
+ /**
295
+ * The formatted rating, one decimal place (React's `rating.toFixed(1)`).
296
+ * @returns The rating text.
297
+ */
298
+ ratingText() {
299
+ return (this.rating ?? 0).toFixed(1);
300
+ }
301
+ /**
302
+ * The review count in parentheses (React's `({reviewCount})`).
303
+ * @returns The review count text.
304
+ */
305
+ reviewText() {
306
+ return `(${this.reviewCount})`;
307
+ }
308
+ /**
309
+ * Whether a text name input is present (a projected name is not).
310
+ * @returns True when the name renders as text.
311
+ */
312
+ get hasName() {
313
+ return this.name !== undefined && this.name !== null;
314
+ }
315
+ /**
316
+ * Whether the description renders as text: React's `description && …`
317
+ * truthiness.
318
+ * @returns True when the tagline text shows.
319
+ */
320
+ get hasDescription() {
321
+ return this.description !== undefined && this.description !== null && this.description !== '';
322
+ }
323
+ /**
324
+ * Whether the description paragraph renders at all: the text input or
325
+ * projected `[slot=description]` content.
326
+ * @returns True when the tagline shows.
327
+ */
328
+ get showDescription() {
329
+ return this.hasDescription || this.descriptionProjected();
330
+ }
331
+ /**
332
+ * Whether a rating renders: React's `rating !== undefined` (a zero rating
333
+ * still renders).
334
+ * @returns True when the ★ chip shows.
335
+ */
336
+ get hasRating() {
337
+ return this.rating !== undefined;
338
+ }
339
+ /**
340
+ * Whether the review count renders: React's `reviewCount !== undefined`,
341
+ * only inside a rating.
342
+ * @returns True when the count shows.
343
+ */
344
+ get hasReviewCount() {
345
+ return this.reviewCount !== undefined;
346
+ }
347
+ /**
348
+ * Whether the member-since text renders: React's `memberSince && …`
349
+ * truthiness.
350
+ * @returns True when the date text shows.
351
+ */
352
+ get hasMemberSince() {
353
+ return this.memberSince !== undefined && this.memberSince !== null && this.memberSince !== '';
354
+ }
355
+ /**
356
+ * Whether the member-since span renders at all: the text input or projected
357
+ * `[slot=memberSince]` content.
358
+ * @returns True when the date shows.
359
+ */
360
+ get showMemberSince() {
361
+ return this.hasMemberSince || this.memberSinceProjected();
362
+ }
363
+ /**
364
+ * Whether the badges text renders: React's `badges && …` truthiness (the
365
+ * `[slot=badges]` projection renders regardless).
366
+ * @returns True when the badges text shows.
367
+ */
368
+ get hasBadges() {
369
+ return this.badges !== undefined && this.badges !== null && this.badges !== '';
370
+ }
371
+ /**
372
+ * Whether the actions text renders: React's `actions && …` truthiness.
373
+ * @returns True when the actions text shows.
374
+ */
375
+ get hasActions() {
376
+ return this.actions !== undefined && this.actions !== null && this.actions !== '';
377
+ }
378
+ /**
379
+ * Whether the actions row renders at all: the text input or projected
380
+ * `[slot=actions]` content.
381
+ * @returns True when the actions row shows.
382
+ */
383
+ get showActions() {
384
+ return this.hasActions || this.actionsProjected();
385
+ }
386
+ static ɵfac = function VendorCard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || VendorCard)(); };
387
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VendorCard, selectors: [["div", "mol-vendor-card", ""]], viewQuery: function VendorCard_Query(rf, ctx) { if (rf & 1) {
388
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
389
+ } if (rf & 2) {
390
+ let _t;
391
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.descriptionEl = _t.first);
392
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.memberSinceEl = _t.first);
393
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.actionsEl = _t.first);
394
+ } }, hostVars: 2, hostBindings: function VendorCard_HostBindings(rf, ctx) { if (rf & 2) {
395
+ i0.ɵɵclassMap(ctx.classes());
396
+ } }, inputs: { name: "name", logoSrc: "logoSrc", description: "description", rating: "rating", reviewCount: "reviewCount", memberSince: "memberSince", badges: "badges", actions: "actions", className: "className" }, ngContentSelectors: _c4, decls: 14, vars: 20, consts: [["descriptionEl", ""], ["memberSinceEl", ""], ["actionsEl", ""], ["mol-avatar", "", 3, "src", "alt", "name", "size"], [3, "class"], ["aria-hidden", "true"]], template: function VendorCard_Template(rf, ctx) { if (rf & 1) {
397
+ i0.ɵɵprojectionDef(_c3);
398
+ i0.ɵɵelementStart(0, "div");
399
+ i0.ɵɵelement(1, "div", 3);
400
+ i0.ɵɵelementStart(2, "div")(3, "header")(4, "h3");
401
+ i0.ɵɵconditionalCreate(5, VendorCard_Conditional_5_Template, 2, 1, "ng-container");
402
+ i0.ɵɵprojection(6);
403
+ i0.ɵɵelementEnd();
404
+ i0.ɵɵconditionalCreate(7, VendorCard_Conditional_7_Template, 4, 3, "p", 4);
405
+ i0.ɵɵelementEnd();
406
+ i0.ɵɵelementStart(8, "div");
407
+ i0.ɵɵconditionalCreate(9, VendorCard_Conditional_9_Template, 6, 6, "span", 4);
408
+ i0.ɵɵconditionalCreate(10, VendorCard_Conditional_10_Template, 5, 3, "span", 4);
409
+ i0.ɵɵconditionalCreate(11, VendorCard_Conditional_11_Template, 2, 1, "ng-container");
410
+ i0.ɵɵprojection(12, 1);
411
+ i0.ɵɵelementEnd();
412
+ i0.ɵɵconditionalCreate(13, VendorCard_Conditional_13_Template, 4, 4, "div", 4);
413
+ i0.ɵɵelementEnd()();
414
+ } if (rf & 2) {
415
+ i0.ɵɵclassMap(ctx.cm().flex(i0.ɵɵpureFunction0(18, _c5)));
416
+ i0.ɵɵadvance();
417
+ i0.ɵɵproperty("src", ctx.logoSrc)("alt", ctx.displayName())("name", ctx.displayName())("size", "lg");
418
+ i0.ɵɵadvance();
419
+ i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().flex1, ctx.cm().stack(2)));
420
+ i0.ɵɵadvance(2);
421
+ i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().textSize("lg"), ctx.cm().fontWeight("bold")));
422
+ i0.ɵɵadvance();
423
+ i0.ɵɵconditional(ctx.hasName ? 5 : -1);
424
+ i0.ɵɵadvance(2);
425
+ i0.ɵɵconditional(ctx.showDescription ? 7 : -1);
426
+ i0.ɵɵadvance();
427
+ i0.ɵɵclassMap(ctx.cm().flex(i0.ɵɵpureFunction0(19, _c6)));
428
+ i0.ɵɵadvance();
429
+ i0.ɵɵconditional(ctx.hasRating ? 9 : -1);
430
+ i0.ɵɵadvance();
431
+ i0.ɵɵconditional(ctx.showMemberSince ? 10 : -1);
432
+ i0.ɵɵadvance();
433
+ i0.ɵɵconditional(ctx.hasBadges ? 11 : -1);
434
+ i0.ɵɵadvance(2);
435
+ i0.ɵɵconditional(ctx.showActions ? 13 : -1);
436
+ } }, dependencies: [Avatar], encapsulation: 2 });
437
+ }
438
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VendorCard, [{
439
+ type: Component,
440
+ args: [{
441
+ selector: 'div[mol-vendor-card]',
442
+ standalone: true,
443
+ imports: [Avatar],
444
+ inputs: [
445
+ 'name',
446
+ 'logoSrc',
447
+ 'description',
448
+ 'rating',
449
+ 'reviewCount',
450
+ 'memberSince',
451
+ 'badges',
452
+ 'actions',
453
+ 'className',
454
+ ],
455
+ host: {
456
+ '[class]': 'classes()',
457
+ },
458
+ // prettier-ignore
459
+ template: `<div [class]="cm().flex({ align: 'start', gap: 'md' })">
460
+ <div mol-avatar [src]="logoSrc" [alt]="displayName()" [name]="displayName()" [size]="'lg'"></div>
461
+ <div [class]="cm().cn(cm().flex1, cm().stack(2))">
462
+ <header>
463
+ <h3 [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">@if (hasName) {<ng-container>{{ name }}</ng-container>}<ng-content select="[slot=name]" /></h3>@if (showDescription) {<p #descriptionEl [class]="cm().textSize('sm')">@if (hasDescription) {<ng-container>{{ description }}</ng-container>}<ng-content select="[slot=description]" /></p>}
464
+ </header>
465
+ <div [class]="cm().flex({ align: 'center', gap: 'sm', wrap: 'wrap' })">@if (hasRating) {<span [class]="ratingClass()"><span aria-hidden="true">★</span><span [class]="cm().fontWeight('semibold')">{{ ratingText() }}</span>@if (hasReviewCount) {<span>{{ reviewText() }}</span>}</span>}@if (showMemberSince) {<span #memberSinceEl [class]="cm().textSize('xs')">· @if (hasMemberSince) {<ng-container>{{ memberSince }}</ng-container>}<ng-content select="[slot=memberSince]" /></span>}@if (hasBadges) {<ng-container>{{ badges }}</ng-container>}<ng-content select="[slot=badges]" /></div>@if (showActions) {<div #actionsEl [class]="cm().flex({ align: 'center', gap: 'sm' })">@if (hasActions) {<ng-container>{{ actions }}</ng-container>}<ng-content select="[slot=actions]" /></div>}
466
+ </div>
467
+ </div>`,
468
+ }]
469
+ }], null, { descriptionEl: [{
470
+ type: ViewChild,
471
+ args: ['descriptionEl']
472
+ }], memberSinceEl: [{
473
+ type: ViewChild,
474
+ args: ['memberSinceEl']
475
+ }], actionsEl: [{
476
+ type: ViewChild,
477
+ args: ['actionsEl']
478
+ }] }); })();
479
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VendorCard, { className: "VendorCard", filePath: "vendor-card.component.ts", lineNumber: 81 }); })();
480
+ //# sourceMappingURL=vendor-card.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor-card.component.js","sourceRoot":"","sources":["../src/vendor-card.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsB,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGpG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;;;;;;;;;;;IAgE0C,6BAAc;IAAA,YAAU;;;;IAAV,cAAU;IAAV,iCAAU;;;IAAqJ,6BAA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@@
1
1
  {
2
2
  "name": "@molecule/app-vendor-card-angular",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "Seller / vendor / agent profile card with logo, description, rating, badges",
5
+ "homepage": "https://www.molecule.dev/packages/app-vendor-card-angular",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "ngc",
21
+ "dev": "ngc --watch",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest"
24
+ },
25
+ "keywords": [
26
+ "molecule",
27
+ "vendor-card",
28
+ "angular"
29
+ ],
30
+ "author": "Molecule Dev, Inc. (https://molecule.dev)",
31
+ "license": "Apache-2.0",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/molecule-dev/molecule.git",
35
+ "directory": "packages/app/features/vendor-card-angular"
36
+ },
37
+ "engines": {
38
+ "node": ">=20"
39
+ },
40
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "peerDependencies": {
45
+ "@angular/common": "^22.0.0",
46
+ "@angular/core": "^22.0.0",
47
+ "@angular/platform-browser": "^22.0.0",
48
+ "@molecule/app-angular": "^3.5.0",
49
+ "@molecule/app-ui": "^1.0.1",
50
+ "@molecule/app-ui-angular": "^1.1.0"
51
+ },
52
+ "devDependencies": {
53
+ "@angular/common": "22.2.3",
54
+ "@angular/compiler": "22.2.3",
55
+ "@angular/compiler-cli": "22.2.3",
56
+ "@angular/core": "22.2.3",
57
+ "@angular/platform-browser": "22.2.3",
58
+ "@molecule/app-angular": "3.7.1",
59
+ "@molecule/app-framework-conformance": "0.0.0",
60
+ "@molecule/app-i18n": "1.2.2",
61
+ "@molecule/app-icons": "1.0.4",
62
+ "@molecule/app-ui": "1.4.0",
63
+ "@molecule/app-ui-angular": "1.2.0",
64
+ "@types/node": "26.6.5",
65
+ "jsdom": "30.1.3",
66
+ "rxjs": "7.8.2",
67
+ "typescript": "6.0.3",
68
+ "vitest": "4.1.12",
69
+ "zone.js": "0.16.3"
70
+ }
71
+ }