@molecule/app-leaderboard-row-angular 1.1.1 → 1.1.3

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-16T01:05:59.906Z
6
+ Generated: 2026-11-22T16:18:17.519Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-leaderboard-row-angular
@@ -44,7 +44,11 @@ import { LeaderboardRow } from '@molecule/app-leaderboard-row-angular'
44
44
  ></div>
45
45
  `,
46
46
  })
47
- export class LeaderboardPage {}
47
+ export class LeaderboardPage {
48
+ readonly openProfile = (id: string): void => {
49
+ console.log('open profile', id)
50
+ }
51
+ }
48
52
  ```
49
53
 
50
54
  ## Type
@@ -83,8 +87,8 @@ interface LeaderboardRowProps {
83
87
  subtitle?: unknown
84
88
  /** Whether this row represents the current user (highlighted). */
85
89
  isMe?: boolean
86
- /** Click handler (a native click on the row, with the DOM event). */
87
- onClick?: (event: MouseEvent) => void
90
+ /** Click handler (a native click on the row, with the DOM event; also runs, with no event, on Enter / Space). */
91
+ onClick?: (event?: MouseEvent) => void
88
92
  /** Extra classes. */
89
93
  className?: string
90
94
  }
@@ -99,10 +103,11 @@ LeaderboardRow component.
99
103
  Leaderboard row — rank + avatar + name + score + optional rank-delta
100
104
  arrow. Top 3 ranks render a medal in place of the numeric rank. The host IS
101
105
  the row's root `<div>` (`div[mol-leaderboard-row]`), matching React's root
102
- exactly; `onClick` is a native click on the host with no keyboard handler
103
- or role — a documented gap of the React package the DOM must match. When
104
- `name` is not a plain string the Avatar alt falls back to hardcoded
105
- 'Player'. Same props, same DOM as
106
+ exactly. With `onClick` the row is promoted to a real button in the a11y
107
+ tree — `role="button"`, `tabindex="0"`, the pointer cursor — and Enter /
108
+ Space activate it (the click handler runs with no event), matching native
109
+ button keyboard semantics. When `name` is not a plain string the Avatar alt
110
+ falls back to hardcoded 'Player'. Same props, same DOM as
106
111
  `@molecule/app-leaderboard-row-react`'s `LeaderboardRow`. Node-valued
107
112
  `name`, `score` and `subtitle` content is projected (`[slot=<name>]`); a
108
113
  string or number input renders as text. The optional subtitle span renders
@@ -128,15 +133,17 @@ all for an absent or empty subtitle.
128
133
  ],
129
134
  host: {
130
135
  '[class]': 'classes()',
131
- '[style.background]': "isMe ? 'rgba(96,165,250,0.1)' : ''",
132
136
  '[style.borderRadius]': "isMe ? '8px' : ''",
137
+ '[attr.role]': 'role()',
138
+ '[attr.tabindex]': 'tabindex()',
133
139
  '(click)': 'rowClick($event)',
140
+ '(keydown)': 'handleKeyDown($event)',
134
141
  },
135
142
  // prettier-ignore
136
143
  template: `<span [class]="rankClass()" style="min-width: 32px">{{ rankText() }}</span>
137
144
  <div mol-avatar [src]="avatarSrc" [alt]="displayName()" [name]="displayName()" [size]="'sm'"></div>
138
145
  <div [class]="nameColumnClass()"><span [class]="nameClass()">@if (hasName) {<ng-container>{{ name }}</ng-container>}<ng-content select="[slot=name]" /></span>@if (showSubtitle) {<span #subtitleEl [class]="subtitleClass()">@if (hasSubtitle) {<ng-container>{{ subtitle }}</ng-container>}<ng-content select="[slot=subtitle]" /></span>}</div>
139
- @if (hasDelta) {<span [class]="deltaClass()" [style.color]="deltaColor()">{{ deltaArrow() + ' ' + deltaText() }}</span>}
146
+ @if (hasDelta) {<span [class]="deltaClass()">{{ deltaArrow() + ' ' + deltaText() }}</span>}
140
147
  <span [class]="scoreClass()">@if (hasScore) {<ng-container>{{ score }}</ng-container>}<ng-content select="[slot=score]" /></span>`,
141
148
  })
142
149
  export class LeaderboardRow implements AfterViewInit {
@@ -154,8 +161,8 @@ export class LeaderboardRow implements AfterViewInit {
154
161
  subtitle?: unknown
155
162
  /** Whether this row represents the current user (highlighted). */
156
163
  isMe?: boolean
157
- /** Click handler, called with the native click event. */
158
- onClick?: (event: MouseEvent) => void
164
+ /** Click handler, called with the native click event; also runs, with no event, on Enter / Space. */
165
+ onClick?: (event?: MouseEvent) => void
159
166
  /** Extra classes. */
160
167
  className?: string
161
168
 
@@ -165,12 +172,7 @@ export class LeaderboardRow implements AfterViewInit {
165
172
  /** Whether a `[slot=subtitle]` projection landed (true until proven otherwise). */
166
173
  private readonly subtitleProjected = signal(true)
167
174
 
168
- /**
169
- * Withdraws the optimistic subtitle span when its slot projection did not
170
- * land: when neither a text input nor projected content is present, React
171
- * renders no span at all. View queries resolve at view init, and a
172
- * projected slot's content is in place by then.
173
- */
175
+ /** Withdraws the optimistic subtitle span when its slot projection did not land: when neither a text input nor projected content is present, React renders no span… */
174
176
  ngAfterViewInit(): void {
175
177
  const subtitle = this.subtitleEl?.nativeElement
176
178
  if (subtitle && !this.hasSubtitle && !hasRenderableContent(subtitle)) {
@@ -178,6 +180,31 @@ export class LeaderboardRow implements AfterViewInit {
178
180
  }
179
181
  }
180
182
 
183
+ /**
184
+ * Whether the row is interactive (`onClick` supplied): React renders the
185
+ * button role, tab stop and pointer cursor only then.
186
+ * @returns True when clickable.
187
+ */
188
+ interactive(): boolean {
189
+ return typeof this.onClick === 'function'
190
+ }
191
+
192
+ /**
193
+ * The host element's `role` (a button only when clickable).
194
+ * @returns `'button'` or null for no attribute.
195
+ */
196
+ role(): string | null {
197
+ return this.interactive() ? 'button' : null
198
+ }
199
+
200
+ /**
201
+ * The host element's tab stop (only when clickable).
202
+ * @returns 0 or null for no attribute.
203
+ */
204
+ tabindex(): number | null {
205
+ return this.interactive() ? 0 : null
206
+ }
207
+
181
208
  /**
182
209
  * Forwards a native click on the row to the `onClick` input (React calls
183
210
  * the handler with the event).
@@ -187,6 +214,20 @@ export class LeaderboardRow implements AfterViewInit {
187
214
  this.onClick?.(event)
188
215
  }
189
216
 
217
+ /**
218
+ * Activates the row on Enter / Space (React's `handleKeyDown`):
219
+ * preventDefault, then the click handler with no event.
220
+ * @param event - The keydown.
221
+ */
222
+ handleKeyDown(event: KeyboardEvent): void {
223
+ const onClick = this.onClick
224
+ if (!onClick) return
225
+ if (event.key === 'Enter' || event.key === ' ') {
226
+ event.preventDefault()
227
+ onClick()
228
+ }
229
+ }
230
+
190
231
  /**
191
232
  * The current class map.
192
233
  * @returns The UIClassMap.
@@ -206,6 +247,7 @@ export class LeaderboardRow implements AfterViewInit {
206
247
  this.cm().sp('px', 3),
207
248
  this.cm().sp('py', 2),
208
249
  this.onClick ? this.cm().cursorPointer : undefined,
250
+ this.isMe ? this.cm().bgTone('info', { subtle: true }) : undefined,
209
251
  this.className,
210
252
  )
211
253
  }
@@ -303,19 +345,16 @@ export class LeaderboardRow implements AfterViewInit {
303
345
  }
304
346
 
305
347
  /**
306
- * The delta chip's class.
348
+ * The delta chip's class: the text size and weight, plus the semantic tone
349
+ * (React's `cm.textTone(rankDelta > 0 ? 'success' : 'error')`).
307
350
  * @returns The class string.
308
351
  */
309
352
  deltaClass(): string {
310
- return this.cm().cn(this.cm().textSize('xs'), this.cm().fontWeight('semibold'))
311
- }
312
-
313
- /**
314
- * The delta arrow's color (React's hardcoded green/red hex).
315
- * @returns The CSS color.
316
- */
317
- deltaColor(): string {
318
- return (this.rankDelta as number) > 0 ? '#22c55e' : '#ef4444'
353
+ return this.cm().cn(
354
+ this.cm().textSize('xs'),
355
+ this.cm().fontWeight('semibold'),
356
+ this.cm().textTone((this.rankDelta as number) > 0 ? 'success' : 'error'),
357
+ )
319
358
  }
320
359
 
321
360
  /**
@@ -344,6 +383,8 @@ export class LeaderboardRow implements AfterViewInit {
344
383
  }
345
384
  ```
346
385
 
386
+ _(The longest member comment is shortened to its first sentence to fit; the full declaration is in `node_modules/@molecule/app-leaderboard-row-angular/dist/leaderboard-row.component.d.ts`.)_
387
+
347
388
  ## Injection Notes
348
389
 
349
390
  ### Requirements
@@ -375,10 +416,12 @@ Peer dependencies:
375
416
  - When `name` is not a plain string the avatar's accessible name falls back
376
417
  to the hardcoded English string 'Player' — pass a string `name` in
377
418
  localized apps.
378
- - `onClick` gives the row a pointer cursor but no keyboard/role semantics
379
- (a documented gap of the React package the DOM must match); it is called
380
- with the native click event. The host IS the row's root `<div>`, so a
381
- click anywhere on the row fires it.
419
+ - With `onClick` the row is promoted to a real button in the a11y tree —
420
+ `role="button"`, `tabindex="0"`, the pointer cursor — and Enter / Space
421
+ activate it (the click handler runs with no event), matching native
422
+ button keyboard semantics; on a click it is called with the native click
423
+ event. The host IS the row's root `<div>`, so a click anywhere on the row
424
+ fires it.
382
425
  - Requires a wired ClassMap bond; `<Avatar>` comes from
383
426
  `@molecule/app-ui-angular`. Node props are projected content: `name`,
384
427
  `score` and `subtitle` are selected by `[slot=<name>]`, everything else
package/dist/index.d.ts CHANGED
@@ -29,7 +29,11 @@
29
29
  * </div>
30
30
  * `,
31
31
  * })
32
- * export class LeaderboardPage {}
32
+ * export class LeaderboardPage {
33
+ * readonly openProfile = (id: string): void => {
34
+ * console.log('open profile', id)
35
+ * }
36
+ * }
33
37
  * ```
34
38
  *
35
39
  * @remarks
@@ -42,10 +46,12 @@
42
46
  * - When `name` is not a plain string the avatar's accessible name falls back
43
47
  * to the hardcoded English string 'Player' — pass a string `name` in
44
48
  * localized apps.
45
- * - `onClick` gives the row a pointer cursor but no keyboard/role semantics
46
- * (a documented gap of the React package the DOM must match); it is called
47
- * with the native click event. The host IS the row's root `<div>`, so a
48
- * click anywhere on the row fires it.
49
+ * - With `onClick` the row is promoted to a real button in the a11y tree —
50
+ * `role="button"`, `tabindex="0"`, the pointer cursor — and Enter / Space
51
+ * activate it (the click handler runs with no event), matching native
52
+ * button keyboard semantics; on a click it is called with the native click
53
+ * event. The host IS the row's root `<div>`, so a click anywhere on the row
54
+ * fires it.
49
55
  * - Requires a wired ClassMap bond; `<Avatar>` comes from
50
56
  * `@molecule/app-ui-angular`. Node props are projected content: `name`,
51
57
  * `score` and `subtitle` are selected by `[slot=<name>]`, everything else
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -29,7 +29,11 @@
29
29
  * </div>
30
30
  * `,
31
31
  * })
32
- * export class LeaderboardPage {}
32
+ * export class LeaderboardPage {
33
+ * readonly openProfile = (id: string): void => {
34
+ * console.log('open profile', id)
35
+ * }
36
+ * }
33
37
  * ```
34
38
  *
35
39
  * @remarks
@@ -42,10 +46,12 @@
42
46
  * - When `name` is not a plain string the avatar's accessible name falls back
43
47
  * to the hardcoded English string 'Player' — pass a string `name` in
44
48
  * localized apps.
45
- * - `onClick` gives the row a pointer cursor but no keyboard/role semantics
46
- * (a documented gap of the React package the DOM must match); it is called
47
- * with the native click event. The host IS the row's root `<div>`, so a
48
- * click anywhere on the row fires it.
49
+ * - With `onClick` the row is promoted to a real button in the a11y tree —
50
+ * `role="button"`, `tabindex="0"`, the pointer cursor — and Enter / Space
51
+ * activate it (the click handler runs with no event), matching native
52
+ * button keyboard semantics; on a click it is called with the native click
53
+ * event. The host IS the row's root `<div>`, so a click anywhere on the row
54
+ * fires it.
49
55
  * - Requires a wired ClassMap bond; `<Avatar>` comes from
50
56
  * `@molecule/app-ui-angular`. Node props are projected content: `name`,
51
57
  * `score` and `subtitle` are selected by `[slot=<name>]`, everything else
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,YAAY,CAAA"}
@@ -12,10 +12,11 @@ import * as i0 from "@angular/core";
12
12
  * Leaderboard row — rank + avatar + name + score + optional rank-delta
13
13
  * arrow. Top 3 ranks render a medal in place of the numeric rank. The host IS
14
14
  * the row's root `<div>` (`div[mol-leaderboard-row]`), matching React's root
15
- * exactly; `onClick` is a native click on the host with no keyboard handler
16
- * or role — a documented gap of the React package the DOM must match. When
17
- * `name` is not a plain string the Avatar alt falls back to hardcoded
18
- * 'Player'. Same props, same DOM as
15
+ * exactly. With `onClick` the row is promoted to a real button in the a11y
16
+ * tree — `role="button"`, `tabindex="0"`, the pointer cursor — and Enter /
17
+ * Space activate it (the click handler runs with no event), matching native
18
+ * button keyboard semantics. When `name` is not a plain string the Avatar alt
19
+ * falls back to hardcoded 'Player'. Same props, same DOM as
19
20
  * `@molecule/app-leaderboard-row-react`'s `LeaderboardRow`. Node-valued
20
21
  * `name`, `score` and `subtitle` content is projected (`[slot=<name>]`); a
21
22
  * string or number input renders as text. The optional subtitle span renders
@@ -38,8 +39,8 @@ export declare class LeaderboardRow implements AfterViewInit {
38
39
  subtitle?: unknown;
39
40
  /** Whether this row represents the current user (highlighted). */
40
41
  isMe?: boolean;
41
- /** Click handler, called with the native click event. */
42
- onClick?: (event: MouseEvent) => void;
42
+ /** Click handler, called with the native click event; also runs, with no event, on Enter / Space. */
43
+ onClick?: (event?: MouseEvent) => void;
43
44
  /** Extra classes. */
44
45
  className?: string;
45
46
  /** The optional subtitle span (projected content lands here). */
@@ -53,12 +54,34 @@ export declare class LeaderboardRow implements AfterViewInit {
53
54
  * projected slot's content is in place by then.
54
55
  */
55
56
  ngAfterViewInit(): void;
57
+ /**
58
+ * Whether the row is interactive (`onClick` supplied): React renders the
59
+ * button role, tab stop and pointer cursor only then.
60
+ * @returns True when clickable.
61
+ */
62
+ interactive(): boolean;
63
+ /**
64
+ * The host element's `role` (a button only when clickable).
65
+ * @returns `'button'` or null for no attribute.
66
+ */
67
+ role(): string | null;
68
+ /**
69
+ * The host element's tab stop (only when clickable).
70
+ * @returns 0 or null for no attribute.
71
+ */
72
+ tabindex(): number | null;
56
73
  /**
57
74
  * Forwards a native click on the row to the `onClick` input (React calls
58
75
  * the handler with the event).
59
76
  * @param event - The native click event.
60
77
  */
61
78
  rowClick(event: MouseEvent): void;
79
+ /**
80
+ * Activates the row on Enter / Space (React's `handleKeyDown`):
81
+ * preventDefault, then the click handler with no event.
82
+ * @param event - The keydown.
83
+ */
84
+ handleKeyDown(event: KeyboardEvent): void;
62
85
  /**
63
86
  * The current class map.
64
87
  * @returns The UIClassMap.
@@ -130,15 +153,11 @@ export declare class LeaderboardRow implements AfterViewInit {
130
153
  */
131
154
  get hasDelta(): boolean;
132
155
  /**
133
- * The delta chip's class.
156
+ * The delta chip's class: the text size and weight, plus the semantic tone
157
+ * (React's `cm.textTone(rankDelta > 0 ? 'success' : 'error')`).
134
158
  * @returns The class string.
135
159
  */
136
160
  deltaClass(): string;
137
- /**
138
- * The delta arrow's color (React's hardcoded green/red hex).
139
- * @returns The CSS color.
140
- */
141
- deltaColor(): string;
142
161
  /**
143
162
  * The delta's arrow (React's `rankDelta > 0 ? '▲' : '▼'`).
144
163
  * @returns The arrow character.
@@ -1 +1 @@
1
- {"version":3,"file":"leaderboard-row.component.d.ts","sourceRoot":"","sources":["../src/leaderboard-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,K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AGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,UAAU,IAAI,MAAM;yCAvMT,cAAc;2CAAd,cAAc;CA0M1B"}
1
+ {"version":3,"file":"leaderboard-row.component.d.ts","sourceRoot":"","sources":["../src/leaderboard-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAiD,MAAM,eAAe,CAAA;AAEjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAsBlD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBA8Ba,cAAe,YAAW,aAAa;IAClD,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uDAAuD;IACvD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qGAAqG;IACrG,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IACtC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,iEAAiE;IACxC,OAAO,CAAC,UAAU,CA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0 = i0.ɵɵnextContext();
48
48
  i0.ɵɵclassMap(ctx_r0.deltaClass());
49
- i0.ɵɵstyleProp("color", ctx_r0.deltaColor());
50
49
  i0.ɵɵadvance();
51
50
  i0.ɵɵtextInterpolate(ctx_r0.deltaArrow() + " " + ctx_r0.deltaText());
52
51
  } }
@@ -77,10 +76,11 @@ const MEDAL = { 1: '🥇', 2: '🥈', 3: '🥉' };
77
76
  * Leaderboard row — rank + avatar + name + score + optional rank-delta
78
77
  * arrow. Top 3 ranks render a medal in place of the numeric rank. The host IS
79
78
  * the row's root `<div>` (`div[mol-leaderboard-row]`), matching React's root
80
- * exactly; `onClick` is a native click on the host with no keyboard handler
81
- * or role — a documented gap of the React package the DOM must match. When
82
- * `name` is not a plain string the Avatar alt falls back to hardcoded
83
- * 'Player'. Same props, same DOM as
79
+ * exactly. With `onClick` the row is promoted to a real button in the a11y
80
+ * tree — `role="button"`, `tabindex="0"`, the pointer cursor — and Enter /
81
+ * Space activate it (the click handler runs with no event), matching native
82
+ * button keyboard semantics. When `name` is not a plain string the Avatar alt
83
+ * falls back to hardcoded 'Player'. Same props, same DOM as
84
84
  * `@molecule/app-leaderboard-row-react`'s `LeaderboardRow`. Node-valued
85
85
  * `name`, `score` and `subtitle` content is projected (`[slot=<name>]`); a
86
86
  * string or number input renders as text. The optional subtitle span renders
@@ -103,7 +103,7 @@ export class LeaderboardRow {
103
103
  subtitle;
104
104
  /** Whether this row represents the current user (highlighted). */
105
105
  isMe;
106
- /** Click handler, called with the native click event. */
106
+ /** Click handler, called with the native click event; also runs, with no event, on Enter / Space. */
107
107
  onClick;
108
108
  /** Extra classes. */
109
109
  className;
@@ -124,6 +124,28 @@ export class LeaderboardRow {
124
124
  this.subtitleProjected.set(false);
125
125
  }
126
126
  }
127
+ /**
128
+ * Whether the row is interactive (`onClick` supplied): React renders the
129
+ * button role, tab stop and pointer cursor only then.
130
+ * @returns True when clickable.
131
+ */
132
+ interactive() {
133
+ return typeof this.onClick === 'function';
134
+ }
135
+ /**
136
+ * The host element's `role` (a button only when clickable).
137
+ * @returns `'button'` or null for no attribute.
138
+ */
139
+ role() {
140
+ return this.interactive() ? 'button' : null;
141
+ }
142
+ /**
143
+ * The host element's tab stop (only when clickable).
144
+ * @returns 0 or null for no attribute.
145
+ */
146
+ tabindex() {
147
+ return this.interactive() ? 0 : null;
148
+ }
127
149
  /**
128
150
  * Forwards a native click on the row to the `onClick` input (React calls
129
151
  * the handler with the event).
@@ -132,6 +154,20 @@ export class LeaderboardRow {
132
154
  rowClick(event) {
133
155
  this.onClick?.(event);
134
156
  }
157
+ /**
158
+ * Activates the row on Enter / Space (React's `handleKeyDown`):
159
+ * preventDefault, then the click handler with no event.
160
+ * @param event - The keydown.
161
+ */
162
+ handleKeyDown(event) {
163
+ const onClick = this.onClick;
164
+ if (!onClick)
165
+ return;
166
+ if (event.key === 'Enter' || event.key === ' ') {
167
+ event.preventDefault();
168
+ onClick();
169
+ }
170
+ }
135
171
  /**
136
172
  * The current class map.
137
173
  * @returns The UIClassMap.
@@ -145,7 +181,7 @@ export class LeaderboardRow {
145
181
  * @returns The class string.
146
182
  */
147
183
  classes() {
148
- return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('px', 3), this.cm().sp('py', 2), this.onClick ? this.cm().cursorPointer : undefined, this.className);
184
+ return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('px', 3), this.cm().sp('py', 2), this.onClick ? this.cm().cursorPointer : undefined, this.isMe ? this.cm().bgTone('info', { subtle: true }) : undefined, this.className);
149
185
  }
150
186
  /**
151
187
  * The rank cell's class.
@@ -229,18 +265,12 @@ export class LeaderboardRow {
229
265
  return this.rankDelta !== undefined && this.rankDelta !== 0;
230
266
  }
231
267
  /**
232
- * The delta chip's class.
268
+ * The delta chip's class: the text size and weight, plus the semantic tone
269
+ * (React's `cm.textTone(rankDelta > 0 ? 'success' : 'error')`).
233
270
  * @returns The class string.
234
271
  */
235
272
  deltaClass() {
236
- return this.cm().cn(this.cm().textSize('xs'), this.cm().fontWeight('semibold'));
237
- }
238
- /**
239
- * The delta arrow's color (React's hardcoded green/red hex).
240
- * @returns The CSS color.
241
- */
242
- deltaColor() {
243
- return this.rankDelta > 0 ? '#22c55e' : '#ef4444';
273
+ return this.cm().cn(this.cm().textSize('xs'), this.cm().fontWeight('semibold'), this.cm().textTone(this.rankDelta > 0 ? 'success' : 'error'));
244
274
  }
245
275
  /**
246
276
  * The delta's arrow (React's `rankDelta > 0 ? '▲' : '▼'`).
@@ -270,11 +300,12 @@ export class LeaderboardRow {
270
300
  let _t;
271
301
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subtitleEl = _t.first);
272
302
  } }, hostVars: 6, hostBindings: function LeaderboardRow_HostBindings(rf, ctx) { if (rf & 1) {
273
- i0.ɵɵlistener("click", function LeaderboardRow_click_HostBindingHandler($event) { return ctx.rowClick($event); });
303
+ i0.ɵɵlistener("click", function LeaderboardRow_click_HostBindingHandler($event) { return ctx.rowClick($event); })("keydown", function LeaderboardRow_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); });
274
304
  } if (rf & 2) {
305
+ i0.ɵɵattribute("role", ctx.role())("tabindex", ctx.tabindex());
275
306
  i0.ɵɵclassMap(ctx.classes());
276
- i0.ɵɵstyleProp("background", ctx.isMe ? "rgba(96,165,250,0.1)" : "")("border-radius", ctx.isMe ? "8px" : "");
277
- } }, inputs: { rank: "rank", name: "name", avatarSrc: "avatarSrc", score: "score", rankDelta: "rankDelta", subtitle: "subtitle", isMe: "isMe", onClick: "onClick", className: "className" }, ngContentSelectors: _c2, decls: 12, vars: 17, consts: [["subtitleEl", ""], [2, "min-width", "32px"], ["mol-avatar", "", 3, "src", "alt", "name", "size"], [3, "class"], [3, "class", "color"]], template: function LeaderboardRow_Template(rf, ctx) { if (rf & 1) {
307
+ i0.ɵɵstyleProp("border-radius", ctx.isMe ? "8px" : "");
308
+ } }, inputs: { rank: "rank", name: "name", avatarSrc: "avatarSrc", score: "score", rankDelta: "rankDelta", subtitle: "subtitle", isMe: "isMe", onClick: "onClick", className: "className" }, ngContentSelectors: _c2, decls: 12, vars: 17, consts: [["subtitleEl", ""], [2, "min-width", "32px"], ["mol-avatar", "", 3, "src", "alt", "name", "size"], [3, "class"]], template: function LeaderboardRow_Template(rf, ctx) { if (rf & 1) {
278
309
  i0.ɵɵprojectionDef(_c1);
279
310
  i0.ɵɵelementStart(0, "span", 1);
280
311
  i0.ɵɵtext(1);
@@ -286,7 +317,7 @@ export class LeaderboardRow {
286
317
  i0.ɵɵelementEnd();
287
318
  i0.ɵɵconditionalCreate(7, LeaderboardRow_Conditional_7_Template, 4, 3, "span", 3);
288
319
  i0.ɵɵelementEnd();
289
- i0.ɵɵconditionalCreate(8, LeaderboardRow_Conditional_8_Template, 2, 5, "span", 4);
320
+ i0.ɵɵconditionalCreate(8, LeaderboardRow_Conditional_8_Template, 2, 3, "span", 3);
290
321
  i0.ɵɵelementStart(9, "span");
291
322
  i0.ɵɵconditionalCreate(10, LeaderboardRow_Conditional_10_Template, 2, 1, "ng-container");
292
323
  i0.ɵɵprojection(11, 1);
@@ -332,20 +363,22 @@ export class LeaderboardRow {
332
363
  ],
333
364
  host: {
334
365
  '[class]': 'classes()',
335
- '[style.background]': "isMe ? 'rgba(96,165,250,0.1)' : ''",
336
366
  '[style.borderRadius]': "isMe ? '8px' : ''",
367
+ '[attr.role]': 'role()',
368
+ '[attr.tabindex]': 'tabindex()',
337
369
  '(click)': 'rowClick($event)',
370
+ '(keydown)': 'handleKeyDown($event)',
338
371
  },
339
372
  // prettier-ignore
340
373
  template: `<span [class]="rankClass()" style="min-width: 32px">{{ rankText() }}</span>
341
374
  <div mol-avatar [src]="avatarSrc" [alt]="displayName()" [name]="displayName()" [size]="'sm'"></div>
342
375
  <div [class]="nameColumnClass()"><span [class]="nameClass()">@if (hasName) {<ng-container>{{ name }}</ng-container>}<ng-content select="[slot=name]" /></span>@if (showSubtitle) {<span #subtitleEl [class]="subtitleClass()">@if (hasSubtitle) {<ng-container>{{ subtitle }}</ng-container>}<ng-content select="[slot=subtitle]" /></span>}</div>
343
- @if (hasDelta) {<span [class]="deltaClass()" [style.color]="deltaColor()">{{ deltaArrow() + ' ' + deltaText() }}</span>}
376
+ @if (hasDelta) {<span [class]="deltaClass()">{{ deltaArrow() + ' ' + deltaText() }}</span>}
344
377
  <span [class]="scoreClass()">@if (hasScore) {<ng-container>{{ score }}</ng-container>}<ng-content select="[slot=score]" /></span>`,
345
378
  }]
346
379
  }], null, { subtitleEl: [{
347
380
  type: ViewChild,
348
381
  args: ['subtitleEl']
349
382
  }] }); })();
350
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LeaderboardRow, { className: "LeaderboardRow", filePath: "leaderboard-row.component.ts", lineNumber: 76 }); })();
383
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LeaderboardRow, { className: "LeaderboardRow", filePath: "leaderboard-row.component.ts", lineNumber: 79 }); })();
351
384
  //# sourceMappingURL=leaderboard-row.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"leaderboard-row.component.js","sourceRoot":"","sources":["../src/leaderboard-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsB,SAAS,EAAmB,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGjG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;;;;;;IA6D+B,6BAAc;IAAA,YAAU;;;;IAAV,cAAU;IAAV,iCAAU;;;IAA6I,6BAAc;IAAA,YAAc;;;;IAAd,cAAc;IAAd,qCAAc;;;IAA3F,qCAA4C;IAAA,oGAAmB;IAA4C,qBAAuC;IAAA,iBAAO;;;IAAvI,qCAAyB;IAAC,eAA+D;IAA/D,6CAA+D;;;IAC7Q,4BAA0D;IAAA,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,MAAM;;iFA2BL,cAAc;cA9B1B,SAAS;eAAC;gBACT,QAAQ,EAAE,0BAA0B;gBACpC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,MAAM,CAAC;gBACjB,MAAM,EAAE;oBACN,MAAM;oBACN,MAAM;oBACN,WAAW;oBACX,OAAO;oBACP,WAAW;oBACX,UAAU;oBACV,MAAM;oBACN,SAAS;oBACT,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,sBAAsB,EAAE,mBAAmB;oBAC3C,aAAa,EAAE,QAAQ;oBACvB,iBAAiB,EAAE,YAAY;oBAC/B,SAAS,EAAE,kBAAkB;oBAC7B,WAAW,EAAE,uBAAuB;iBACrC;gBACD,kBAAkB;gBAClB,QAAQ,EAAE;;;;sIAI0H;aACrI;;kBAsBE,SAAS;mBAAC,YAAY;;kFArBZ,cAAc"}
package/dist/types.d.ts CHANGED
@@ -23,8 +23,8 @@ export interface LeaderboardRowProps {
23
23
  subtitle?: unknown;
24
24
  /** Whether this row represents the current user (highlighted). */
25
25
  isMe?: boolean;
26
- /** Click handler (a native click on the row, with the DOM event). */
27
- onClick?: (event: MouseEvent) => void;
26
+ /** Click handler (a native click on the row, with the DOM event; also runs, with no event, on Enter / Space). */
27
+ onClick?: (event?: MouseEvent) => void;
28
28
  /** Extra classes. */
29
29
  className?: string;
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,IAAI,EAAE,OAAO,CAAA;IACb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAA;IACd,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACrC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,IAAI,EAAE,OAAO,CAAA;IACb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAA;IACd,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iHAAiH;IACjH,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IACtC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-leaderboard-row-angular",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Leaderboard row — rank, avatar, name, score, optional change indicator",
5
5
  "homepage": "https://www.molecule.dev/packages/app-leaderboard-row-angular",
6
6
  "type": "module",
@@ -55,12 +55,12 @@
55
55
  "@angular/compiler-cli": "22.2.3",
56
56
  "@angular/core": "22.2.3",
57
57
  "@angular/platform-browser": "22.2.3",
58
- "@molecule/app-angular": "3.7.1",
58
+ "@molecule/app-angular": "3.11.0",
59
59
  "@molecule/app-framework-conformance": "0.0.0",
60
60
  "@molecule/app-i18n": "1.2.2",
61
61
  "@molecule/app-icons": "1.0.4",
62
- "@molecule/app-ui": "1.4.0",
63
- "@molecule/app-ui-angular": "1.2.0",
62
+ "@molecule/app-ui": "1.5.0",
63
+ "@molecule/app-ui-angular": "1.4.0",
64
64
  "@types/node": "26.6.5",
65
65
  "jsdom": "30.1.3",
66
66
  "rxjs": "7.8.2",