@molecule/app-list-item-row-angular 1.1.0 → 1.2.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.
- package/README.md +152 -40
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -11
- package/dist/index.js.map +1 -1
- package/dist/list-item-row.component.d.ts +53 -24
- package/dist/list-item-row.component.d.ts.map +1 -1
- package/dist/list-item-row.component.js +179 -81
- package/dist/list-item-row.component.js.map +1 -1
- package/dist/types.d.ts +36 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
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-
|
|
6
|
+
Generated: 2026-11-18T19:30:05.953Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-list-item-row-angular
|
|
@@ -12,8 +12,9 @@ Angular generic list-item row.
|
|
|
12
12
|
|
|
13
13
|
Exports `<ListItemRow>` — leading slot (icon/avatar/thumbnail) + up to three
|
|
14
14
|
text lines (title / subtitle / metadata) + right-side actions. Inputs: `title`,
|
|
15
|
-
`subtitle?`, `metadata?`, `leading?`, `actions?`, `
|
|
16
|
-
`disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
15
|
+
`subtitle?`, `metadata?`, `leading?`, `actions?`, `toggle?`, `onClick?`,
|
|
16
|
+
`selected?`, `disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
17
|
+
`className?`.
|
|
17
18
|
Use for nav lists, mobile menus, search results, picker dialogs, inbox threads.
|
|
18
19
|
For table rows use `<RowWithActions>` from `@molecule/app-data-table-ui-angular`
|
|
19
20
|
instead — this component is not a `<tr>`. It is the Angular counterpart of
|
|
@@ -41,13 +42,17 @@ import { ListItemRow } from '@molecule/app-list-item-row-angular'
|
|
|
41
42
|
subtitle="Last edited 2 hours ago"
|
|
42
43
|
metadata="3 collaborators · 12 files"
|
|
43
44
|
[selected]="true"
|
|
44
|
-
|
|
45
|
+
[onClick]="openProject"
|
|
45
46
|
>
|
|
46
47
|
<img slot="leading" src="/icons/folder.svg" alt="" width="32" height="32" />
|
|
47
48
|
</div>
|
|
48
49
|
`,
|
|
49
50
|
})
|
|
50
|
-
export class ProjectList {
|
|
51
|
+
export class ProjectList {
|
|
52
|
+
openProject(): void {
|
|
53
|
+
// navigate('/projects/alpha')
|
|
54
|
+
}
|
|
55
|
+
}
|
|
51
56
|
```
|
|
52
57
|
|
|
53
58
|
## Type
|
|
@@ -80,9 +85,41 @@ interface ListItemRowProps {
|
|
|
80
85
|
leading?: string | number
|
|
81
86
|
/** Optional right-side actions (buttons, action menu; `[slot=actions]` content, or text). */
|
|
82
87
|
actions?: string | number
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
/** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
|
|
89
|
+
toggle?: {
|
|
90
|
+
/** The loaded server value. */
|
|
91
|
+
value: boolean
|
|
92
|
+
/** Saves the desired boolean and resolves with the server-confirmed boolean. */
|
|
93
|
+
commit: (desired: boolean) => Promise<boolean>
|
|
94
|
+
/** Label when the displayed value is true. */
|
|
95
|
+
activeLabel?: string | number
|
|
96
|
+
/** Label when the displayed value is false. */
|
|
97
|
+
inactiveLabel?: string | number
|
|
98
|
+
/** Receives a failed save after the toggle restored the last confirmed value. */
|
|
99
|
+
onError?: (error: unknown) => void
|
|
100
|
+
/** Button variant. */
|
|
101
|
+
variant?: ButtonVariant
|
|
102
|
+
/** Button color. */
|
|
103
|
+
color?: ColorVariant
|
|
104
|
+
/** Button size. */
|
|
105
|
+
size?: Size
|
|
106
|
+
/** Whether the button stretches to fill its container. */
|
|
107
|
+
fullWidth?: boolean
|
|
108
|
+
/** Disables the toggle (permissions, never a pending save). */
|
|
109
|
+
disabled?: boolean
|
|
110
|
+
/** Extra classes. */
|
|
111
|
+
className?: string
|
|
112
|
+
/** `data-testid`. */
|
|
113
|
+
testId?: string
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Called when the row is activated (called bare, the way React forwards the
|
|
117
|
+
* open button's click). The whole row is clickable through a transparent
|
|
118
|
+
* native button over it, named by the title; the inner controls (the
|
|
119
|
+
* `actions` slot) sit above it and keep their own clicks.
|
|
120
|
+
*/
|
|
121
|
+
onClick?: () => void
|
|
122
|
+
/** When true, sets `aria-current="true"` on the row — no built-in visual highlight; style it via `className` or host CSS. */
|
|
86
123
|
selected?: boolean
|
|
87
124
|
/** When true, renders in a disabled visual state. */
|
|
88
125
|
disabled?: boolean
|
|
@@ -105,24 +142,34 @@ bookmark lists, etc. The host IS the root `<div>` (`div[mol-list-item-row]`),
|
|
|
105
142
|
matching React's root exactly; the disabled row's dimmed opacity is applied
|
|
106
143
|
inline through a host style binding (the CSSOM, as react-dom does).
|
|
107
144
|
|
|
145
|
+
The row's open action lives on a native open button — an empty, transparent
|
|
146
|
+
`<button type="button">` stretched over the whole row
|
|
147
|
+
(`data-mol-id="list-item-row-open"`, `aria-labelledby` the title), the way
|
|
148
|
+
React renders it while the row has an `onClick`; Enter / Space on it run the
|
|
149
|
+
same handler mouse clicks run. An `@if` in the template puts it in the DOM
|
|
150
|
+
only while the row has an `onClick` (React renders no button at all
|
|
151
|
+
otherwise), and the actions wrapper sits above it and keeps its own clicks.
|
|
152
|
+
The projected body renders directly in the host, so the wrappers never move.
|
|
153
|
+
|
|
108
154
|
The node props are projected slots: `title` renders inside the title line,
|
|
109
155
|
`subtitle` inside its line, `metadata` inside its line, `leading` inside the
|
|
110
|
-
leading `<div>` and `actions` inside the right-side `<div
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
reconcile against that in {@link ListItemRow.ngAfterViewInit}.
|
|
156
|
+
leading `<div>` and `actions` inside the right-side `<div>`. String inputs
|
|
157
|
+
render as text instead — React's truthiness branch applies: an empty string
|
|
158
|
+
renders nothing. The conditionally-rendered wrappers reconcile against that
|
|
159
|
+
in {@link ListItemRow.ngAfterViewInit}.
|
|
115
160
|
|
|
116
161
|
```typescript
|
|
117
162
|
@Component({
|
|
118
163
|
selector: 'div[mol-list-item-row]',
|
|
119
164
|
standalone: true,
|
|
165
|
+
imports: [OptimisticToggleButton],
|
|
120
166
|
inputs: [
|
|
121
167
|
'title',
|
|
122
168
|
'subtitle',
|
|
123
169
|
'metadata',
|
|
124
170
|
'leading',
|
|
125
171
|
'actions',
|
|
172
|
+
'toggle',
|
|
126
173
|
'onClick',
|
|
127
174
|
'selected',
|
|
128
175
|
'disabled',
|
|
@@ -131,21 +178,29 @@ reconcile against that in {@link ListItemRow.ngAfterViewInit}.
|
|
|
131
178
|
],
|
|
132
179
|
host: {
|
|
133
180
|
'[class]': 'classes()',
|
|
134
|
-
'[attr.
|
|
135
|
-
'[attr.tabindex]': 'this.clickable() ? 0 : null',
|
|
136
|
-
'[attr.aria-selected]': 'this.selected ?? null',
|
|
181
|
+
'[attr.aria-current]': 'this.selected ? "true" : null',
|
|
137
182
|
'[attr.aria-disabled]': 'this.disabled ?? null',
|
|
138
183
|
'[style.opacity]': 'this.disabled ? 0.5 : null',
|
|
139
|
-
'(click)': 'handleClick($event)',
|
|
140
184
|
},
|
|
141
|
-
template:
|
|
185
|
+
template: `@if (onClick) {
|
|
186
|
+
<button
|
|
187
|
+
type="button"
|
|
188
|
+
[attr.aria-labelledby]="nameId"
|
|
189
|
+
[attr.disabled]="disabled ? '' : null"
|
|
190
|
+
data-mol-id="list-item-row-open"
|
|
191
|
+
(click)="handleClick()"
|
|
192
|
+
[class]="openButtonClasses()"
|
|
193
|
+
style="background: transparent; border: medium; padding: 0px"
|
|
194
|
+
></button>
|
|
195
|
+
}
|
|
196
|
+
<div #leadingWrap [class]="leadingClass()">
|
|
142
197
|
@if (leadingText()) {
|
|
143
198
|
{{ leadingText() }}
|
|
144
199
|
}
|
|
145
200
|
<ng-content select="[slot=leading]"></ng-content>
|
|
146
201
|
</div>
|
|
147
202
|
<div [class]="stackClass()">
|
|
148
|
-
<div [class]="titleClass()">
|
|
203
|
+
<div [attr.id]="onClick ? nameId : null" [class]="titleClass()">
|
|
149
204
|
@if (titleText()) {
|
|
150
205
|
{{ titleText() }}
|
|
151
206
|
}
|
|
@@ -164,7 +219,28 @@ reconcile against that in {@link ListItemRow.ngAfterViewInit}.
|
|
|
164
219
|
<ng-content select="[slot=metadata]"></ng-content>
|
|
165
220
|
</div>
|
|
166
221
|
</div>
|
|
167
|
-
<div #actionsWrap [class]="actionsClass()"
|
|
222
|
+
<div #actionsWrap [class]="actionsClass()">
|
|
223
|
+
@if (toggle) {
|
|
224
|
+
<button
|
|
225
|
+
mol-optimistic-toggle-button
|
|
226
|
+
[value]="toggle.value"
|
|
227
|
+
[commit]="toggle.commit"
|
|
228
|
+
[onError]="toggle.onError"
|
|
229
|
+
[variant]="toggle.variant"
|
|
230
|
+
[color]="toggle.color"
|
|
231
|
+
[size]="toggle.size"
|
|
232
|
+
[fullWidth]="toggle.fullWidth ?? false"
|
|
233
|
+
[disabled]="toggle.disabled ?? false"
|
|
234
|
+
[className]="toggle.className"
|
|
235
|
+
[testId]="toggle.testId"
|
|
236
|
+
>
|
|
237
|
+
<span slot="activeLabel">{{ toggle.activeLabel }}</span>
|
|
238
|
+
<span slot="inactiveLabel">{{ toggle.inactiveLabel }}</span>
|
|
239
|
+
</button>
|
|
240
|
+
}
|
|
241
|
+
@if (actionsText()) {
|
|
242
|
+
{{ actionsText() }}
|
|
243
|
+
}
|
|
168
244
|
<ng-content select="[slot=actions]"></ng-content>
|
|
169
245
|
</div>`,
|
|
170
246
|
})
|
|
@@ -173,26 +249,44 @@ export class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
173
249
|
subtitle?: unknown
|
|
174
250
|
metadata?: unknown
|
|
175
251
|
leading?: unknown
|
|
252
|
+
/** Optional right-side actions (`[slot=actions]` content, or text). */
|
|
176
253
|
actions?: unknown
|
|
177
|
-
|
|
254
|
+
toggle?: ListItemRowProps['toggle']
|
|
255
|
+
/** Called when the row is activated (React's `onClick`, called bare). */
|
|
256
|
+
onClick?: () => void
|
|
178
257
|
selected?: boolean
|
|
179
258
|
disabled?: boolean
|
|
259
|
+
/** Dense vs comfortable spacing. */
|
|
180
260
|
density?: 'comfortable' | 'compact'
|
|
261
|
+
/** Extra classes. */
|
|
181
262
|
className?: string
|
|
182
263
|
|
|
264
|
+
private static nextNameId = 0
|
|
265
|
+
|
|
266
|
+
readonly nameId = `list-item-row-title-${ListItemRow.nextNameId++}`
|
|
267
|
+
|
|
268
|
+
/** The leading wrapper (detached when no leading value and the slot is empty). */
|
|
183
269
|
@ViewChild('leadingWrap') leadingWrap?: ElementRef<HTMLElement>
|
|
270
|
+
/** The subtitle line (detached when no subtitle value and the slot is empty). */
|
|
184
271
|
@ViewChild('subtitleWrap') subtitleWrap?: ElementRef<HTMLElement>
|
|
272
|
+
/** The metadata line (detached when no metadata value and the slot is empty). */
|
|
185
273
|
@ViewChild('metadataWrap') metadataWrap?: ElementRef<HTMLElement>
|
|
274
|
+
/** The actions wrapper (detached when no actions value and the slot is empty). */
|
|
186
275
|
@ViewChild('actionsWrap') actionsWrap?: ElementRef<HTMLElement>
|
|
187
276
|
|
|
188
277
|
private slotsRead = false
|
|
278
|
+
/** Whether the leading slot holds content (read once with the slots). */
|
|
189
279
|
private hasLeadingSlot = false
|
|
280
|
+
/** Whether the subtitle slot holds content (read once with the slots). */
|
|
190
281
|
private hasSubtitleSlot = false
|
|
282
|
+
/** Whether the metadata slot holds content (read once with the slots). */
|
|
191
283
|
private hasMetadataSlot = false
|
|
284
|
+
/** Whether the actions slot holds content (read once with the slots). */
|
|
192
285
|
private hasActionsSlot = false
|
|
193
286
|
|
|
194
287
|
private readonly guard = new SlotGuard(inject(ElementRef), inject(Renderer2))
|
|
195
288
|
|
|
289
|
+
/** The current class map. */
|
|
196
290
|
cm(): UIClassMap {
|
|
197
291
|
return getClassMap()
|
|
198
292
|
}
|
|
@@ -202,37 +296,49 @@ export class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
202
296
|
this.cm().flex({ align: 'center', gap: 'sm' }),
|
|
203
297
|
this.cm().sp('px', 3),
|
|
204
298
|
this.cm().sp('py', this.padY()),
|
|
205
|
-
this.
|
|
299
|
+
this.hasOpenAction() ? this.cm().position('relative') : undefined,
|
|
206
300
|
this.className,
|
|
207
301
|
)
|
|
208
302
|
}
|
|
209
303
|
|
|
304
|
+
openButtonClasses(): string {
|
|
305
|
+
return this.cm().cn(
|
|
306
|
+
this.cm().position('absolute'),
|
|
307
|
+
this.cm().inset0,
|
|
308
|
+
this.disabled ? undefined : this.cm().cursorPointer,
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/** Computes the middle stack's class (`cm.flex1` + `cm.stack(0)`). */
|
|
210
313
|
stackClass(): string {
|
|
211
314
|
return this.cm().cn(this.cm().flex1, this.cm().stack(0))
|
|
212
315
|
}
|
|
213
316
|
|
|
317
|
+
/** The leading wrapper's class (`cm.shrink0`). */
|
|
214
318
|
leadingClass(): string {
|
|
215
319
|
return this.cm().cn(this.cm().shrink0)
|
|
216
320
|
}
|
|
217
321
|
|
|
322
|
+
/** The subtitle line's class (`cm.textSize('sm')`). */
|
|
218
323
|
subtitleClass(): string {
|
|
219
324
|
return this.cm().cn(this.cm().textSize('sm'))
|
|
220
325
|
}
|
|
221
326
|
|
|
327
|
+
/** The metadata line's class (`cm.textSize('xs')`). */
|
|
222
328
|
metadataClass(): string {
|
|
223
329
|
return this.cm().cn(this.cm().textSize('xs'))
|
|
224
330
|
}
|
|
225
331
|
|
|
226
332
|
actionsClass(): string {
|
|
227
|
-
return this.cm().cn(this.cm().shrink0)
|
|
333
|
+
return this.cm().cn(this.cm().shrink0, this.cm().position('relative'))
|
|
228
334
|
}
|
|
229
335
|
|
|
230
336
|
titleClass(): string {
|
|
231
337
|
return this.cm().cn(this.cm().textSize('sm'), this.cm().fontWeight('semibold'))
|
|
232
338
|
}
|
|
233
339
|
|
|
234
|
-
|
|
235
|
-
return Boolean(this.onClick)
|
|
340
|
+
hasOpenAction(): boolean {
|
|
341
|
+
return Boolean(this.onClick)
|
|
236
342
|
}
|
|
237
343
|
|
|
238
344
|
padY(): 2 | 3 {
|
|
@@ -245,37 +351,37 @@ export class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
245
351
|
: ''
|
|
246
352
|
}
|
|
247
353
|
|
|
354
|
+
/** The subtitle input's text (React's `{subtitle}` for a text child). */
|
|
248
355
|
subtitleText(): string {
|
|
249
356
|
return typeof this.subtitle === 'string' || typeof this.subtitle === 'number'
|
|
250
357
|
? String(this.subtitle)
|
|
251
358
|
: ''
|
|
252
359
|
}
|
|
253
360
|
|
|
361
|
+
/** The metadata input's text (React's `{metadata}` for a text child). */
|
|
254
362
|
metadataText(): string {
|
|
255
363
|
return typeof this.metadata === 'string' || typeof this.metadata === 'number'
|
|
256
364
|
? String(this.metadata)
|
|
257
365
|
: ''
|
|
258
366
|
}
|
|
259
367
|
|
|
368
|
+
/** The leading input's text (React's `{leading}` for a text child). */
|
|
260
369
|
leadingText(): string {
|
|
261
370
|
return typeof this.leading === 'string' || typeof this.leading === 'number'
|
|
262
371
|
? String(this.leading)
|
|
263
372
|
: ''
|
|
264
373
|
}
|
|
265
374
|
|
|
375
|
+
/** The actions input's text (React's `{actions}` for a text child). */
|
|
266
376
|
actionsText(): string {
|
|
267
377
|
return typeof this.actions === 'string' || typeof this.actions === 'number'
|
|
268
378
|
? String(this.actions)
|
|
269
379
|
: ''
|
|
270
380
|
}
|
|
271
381
|
|
|
272
|
-
handleClick(
|
|
382
|
+
handleClick(): void {
|
|
273
383
|
if (this.disabled) return
|
|
274
|
-
this.onClick?.(
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
stopPropagation(event: Event): void {
|
|
278
|
-
event.stopPropagation()
|
|
384
|
+
this.onClick?.()
|
|
279
385
|
}
|
|
280
386
|
|
|
281
387
|
ngAfterViewInit(): void {
|
|
@@ -302,12 +408,15 @@ export class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
302
408
|
this.guard.toggle(leading, this.leadingText() !== '' || this.hasLeadingSlot)
|
|
303
409
|
this.guard.toggle(subtitle, this.subtitleText() !== '' || this.hasSubtitleSlot)
|
|
304
410
|
this.guard.toggle(metadata, this.metadataText() !== '' || this.hasMetadataSlot)
|
|
305
|
-
this.guard.toggle(
|
|
411
|
+
this.guard.toggle(
|
|
412
|
+
actions,
|
|
413
|
+
this.actionsText() !== '' || this.hasActionsSlot || Boolean(this.toggle),
|
|
414
|
+
)
|
|
306
415
|
}
|
|
307
416
|
}
|
|
308
417
|
```
|
|
309
418
|
|
|
310
|
-
_(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-list-item-row-angular/dist/list-item-row.component.d.ts`.)_
|
|
419
|
+
_(Member comments are shortened to their first sentence, and the 21 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-list-item-row-angular/dist/list-item-row.component.d.ts`.)_
|
|
311
420
|
|
|
312
421
|
## Injection Notes
|
|
313
422
|
|
|
@@ -331,13 +440,16 @@ Peer dependencies:
|
|
|
331
440
|
- `@molecule/app-ui`
|
|
332
441
|
- `@molecule/app-ui-angular`
|
|
333
442
|
|
|
334
|
-
- `selected` only sets the `aria-
|
|
335
|
-
Pass a highlight class via `className` (or target
|
|
336
|
-
host CSS) to make selection visible.
|
|
337
|
-
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
`
|
|
443
|
+
- `selected` only sets the `aria-current="true"` attribute — no built-in
|
|
444
|
+
highlight. Pass a highlight class via `className` (or target
|
|
445
|
+
`[aria-current="true"]` in host CSS) to make selection visible.
|
|
446
|
+
- With `onClick` the whole row is clickable through a transparent native
|
|
447
|
+
button over it, named by the title (`aria-labelledby`); Enter / Space on
|
|
448
|
+
that button run the same handler a click anywhere on the row runs, and the
|
|
449
|
+
inner controls (the `actions` slot) sit above the button and keep their
|
|
450
|
+
own clicks.
|
|
451
|
+
- `disabled` halves the opacity and disables the open button (no pointer
|
|
452
|
+
cursor, no activation); there is no `data-mol-id` input.
|
|
341
453
|
- Styling resolves through `getClassMap()` — wire a ClassMap bond first.
|
|
342
454
|
- The host element IS React's root `<div>` (`div[mol-list-item-row]`); node
|
|
343
455
|
props are projected slots (`[slot=title]`, `[slot=leading]`, …), and string
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports `<ListItemRow>` — leading slot (icon/avatar/thumbnail) + up to three
|
|
5
5
|
* text lines (title / subtitle / metadata) + right-side actions. Inputs: `title`,
|
|
6
|
-
* `subtitle?`, `metadata?`, `leading?`, `actions?`, `
|
|
7
|
-
* `disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
6
|
+
* `subtitle?`, `metadata?`, `leading?`, `actions?`, `toggle?`, `onClick?`,
|
|
7
|
+
* `selected?`, `disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
8
|
+
* `className?`.
|
|
8
9
|
* Use for nav lists, mobile menus, search results, picker dialogs, inbox threads.
|
|
9
10
|
* For table rows use `<RowWithActions>` from `@molecule/app-data-table-ui-angular`
|
|
10
11
|
* instead — this component is not a `<tr>`. It is the Angular counterpart of
|
|
@@ -26,22 +27,29 @@
|
|
|
26
27
|
* subtitle="Last edited 2 hours ago"
|
|
27
28
|
* metadata="3 collaborators · 12 files"
|
|
28
29
|
* [selected]="true"
|
|
29
|
-
*
|
|
30
|
+
* [onClick]="openProject">
|
|
30
31
|
* <img slot="leading" src="/icons/folder.svg" alt="" width="32" height="32" />
|
|
31
32
|
* </div>
|
|
32
33
|
* `,
|
|
33
34
|
* })
|
|
34
|
-
* export class ProjectList {
|
|
35
|
+
* export class ProjectList {
|
|
36
|
+
* openProject(): void {
|
|
37
|
+
* // navigate('/projects/alpha')
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
35
40
|
* ```
|
|
36
41
|
*
|
|
37
42
|
* @remarks
|
|
38
|
-
* - `selected` only sets the `aria-
|
|
39
|
-
* Pass a highlight class via `className` (or target
|
|
40
|
-
* host CSS) to make selection visible.
|
|
41
|
-
* -
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* `
|
|
43
|
+
* - `selected` only sets the `aria-current="true"` attribute — no built-in
|
|
44
|
+
* highlight. Pass a highlight class via `className` (or target
|
|
45
|
+
* `[aria-current="true"]` in host CSS) to make selection visible.
|
|
46
|
+
* - With `onClick` the whole row is clickable through a transparent native
|
|
47
|
+
* button over it, named by the title (`aria-labelledby`); Enter / Space on
|
|
48
|
+
* that button run the same handler a click anywhere on the row runs, and the
|
|
49
|
+
* inner controls (the `actions` slot) sit above the button and keep their
|
|
50
|
+
* own clicks.
|
|
51
|
+
* - `disabled` halves the opacity and disables the open button (no pointer
|
|
52
|
+
* cursor, no activation); there is no `data-mol-id` input.
|
|
45
53
|
* - Styling resolves through `getClassMap()` — wire a ClassMap bond first.
|
|
46
54
|
* - The host element IS React's root `<div>` (`div[mol-list-item-row]`); node
|
|
47
55
|
* props are projected slots (`[slot=title]`, `[slot=leading]`, …), and string
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports `<ListItemRow>` — leading slot (icon/avatar/thumbnail) + up to three
|
|
5
5
|
* text lines (title / subtitle / metadata) + right-side actions. Inputs: `title`,
|
|
6
|
-
* `subtitle?`, `metadata?`, `leading?`, `actions?`, `
|
|
7
|
-
* `disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
6
|
+
* `subtitle?`, `metadata?`, `leading?`, `actions?`, `toggle?`, `onClick?`,
|
|
7
|
+
* `selected?`, `disabled?`, `density?` (`'comfortable'` default | `'compact'`),
|
|
8
|
+
* `className?`.
|
|
8
9
|
* Use for nav lists, mobile menus, search results, picker dialogs, inbox threads.
|
|
9
10
|
* For table rows use `<RowWithActions>` from `@molecule/app-data-table-ui-angular`
|
|
10
11
|
* instead — this component is not a `<tr>`. It is the Angular counterpart of
|
|
@@ -26,22 +27,29 @@
|
|
|
26
27
|
* subtitle="Last edited 2 hours ago"
|
|
27
28
|
* metadata="3 collaborators · 12 files"
|
|
28
29
|
* [selected]="true"
|
|
29
|
-
*
|
|
30
|
+
* [onClick]="openProject">
|
|
30
31
|
* <img slot="leading" src="/icons/folder.svg" alt="" width="32" height="32" />
|
|
31
32
|
* </div>
|
|
32
33
|
* `,
|
|
33
34
|
* })
|
|
34
|
-
* export class ProjectList {
|
|
35
|
+
* export class ProjectList {
|
|
36
|
+
* openProject(): void {
|
|
37
|
+
* // navigate('/projects/alpha')
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
35
40
|
* ```
|
|
36
41
|
*
|
|
37
42
|
* @remarks
|
|
38
|
-
* - `selected` only sets the `aria-
|
|
39
|
-
* Pass a highlight class via `className` (or target
|
|
40
|
-
* host CSS) to make selection visible.
|
|
41
|
-
* -
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* `
|
|
43
|
+
* - `selected` only sets the `aria-current="true"` attribute — no built-in
|
|
44
|
+
* highlight. Pass a highlight class via `className` (or target
|
|
45
|
+
* `[aria-current="true"]` in host CSS) to make selection visible.
|
|
46
|
+
* - With `onClick` the whole row is clickable through a transparent native
|
|
47
|
+
* button over it, named by the title (`aria-labelledby`); Enter / Space on
|
|
48
|
+
* that button run the same handler a click anywhere on the row runs, and the
|
|
49
|
+
* inner controls (the `actions` slot) sit above the button and keep their
|
|
50
|
+
* own clicks.
|
|
51
|
+
* - `disabled` halves the opacity and disables the open button (no pointer
|
|
52
|
+
* cursor, no activation); there is no `data-mol-id` input.
|
|
45
53
|
* - Styling resolves through `getClassMap()` — wire a ClassMap bond first.
|
|
46
54
|
* - The host element IS React's root `<div>` (`div[mol-list-item-row]`); node
|
|
47
55
|
* props are projected slots (`[slot=title]`, `[slot=leading]`, …), and string
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type AfterViewChecked, type AfterViewInit, ElementRef } from '@angular/core';
|
|
7
7
|
import type { UIClassMap } from '@molecule/app-ui';
|
|
8
|
+
import type { ListItemRowProps } from './types.js';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* ListItemRow component.
|
|
@@ -15,13 +16,21 @@ import * as i0 from "@angular/core";
|
|
|
15
16
|
* matching React's root exactly; the disabled row's dimmed opacity is applied
|
|
16
17
|
* inline through a host style binding (the CSSOM, as react-dom does).
|
|
17
18
|
*
|
|
19
|
+
* The row's open action lives on a native open button — an empty, transparent
|
|
20
|
+
* `<button type="button">` stretched over the whole row
|
|
21
|
+
* (`data-mol-id="list-item-row-open"`, `aria-labelledby` the title), the way
|
|
22
|
+
* React renders it while the row has an `onClick`; Enter / Space on it run the
|
|
23
|
+
* same handler mouse clicks run. An `@if` in the template puts it in the DOM
|
|
24
|
+
* only while the row has an `onClick` (React renders no button at all
|
|
25
|
+
* otherwise), and the actions wrapper sits above it and keeps its own clicks.
|
|
26
|
+
* The projected body renders directly in the host, so the wrappers never move.
|
|
27
|
+
*
|
|
18
28
|
* The node props are projected slots: `title` renders inside the title line,
|
|
19
29
|
* `subtitle` inside its line, `metadata` inside its line, `leading` inside the
|
|
20
|
-
* leading `<div>` and `actions` inside the right-side `<div
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* reconcile against that in {@link ListItemRow.ngAfterViewInit}.
|
|
30
|
+
* leading `<div>` and `actions` inside the right-side `<div>`. String inputs
|
|
31
|
+
* render as text instead — React's truthiness branch applies: an empty string
|
|
32
|
+
* renders nothing. The conditionally-rendered wrappers reconcile against that
|
|
33
|
+
* in {@link ListItemRow.ngAfterViewInit}.
|
|
25
34
|
*/
|
|
26
35
|
export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
27
36
|
/** Title — first line (string/number renders as text; nodes are `[slot=title]` content). */
|
|
@@ -34,16 +43,26 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
34
43
|
leading?: unknown;
|
|
35
44
|
/** Optional right-side actions (`[slot=actions]` content, or text). */
|
|
36
45
|
actions?: unknown;
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
/**
|
|
46
|
+
/** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
|
|
47
|
+
toggle?: ListItemRowProps['toggle'];
|
|
48
|
+
/**
|
|
49
|
+
* Called when the row is activated (React's `onClick`, called bare). The
|
|
50
|
+
* whole row is clickable through a transparent native button over it, named
|
|
51
|
+
* by the title; the inner controls sit above it and keep their own clicks.
|
|
52
|
+
*/
|
|
53
|
+
onClick?: () => void;
|
|
54
|
+
/** When true, sets `aria-current="true"` on the row — no built-in visual highlight. */
|
|
40
55
|
selected?: boolean;
|
|
41
|
-
/** When true, renders in a disabled visual state and
|
|
56
|
+
/** When true, renders in a disabled visual state and disables the open button. */
|
|
42
57
|
disabled?: boolean;
|
|
43
58
|
/** Dense vs comfortable spacing. Defaults to `'comfortable'` at read time. */
|
|
44
59
|
density?: 'comfortable' | 'compact';
|
|
45
60
|
/** Extra classes. */
|
|
46
61
|
className?: string;
|
|
62
|
+
/** Next value of the module-wide instance counter (React `useId()`'s counterpart). */
|
|
63
|
+
private static nextNameId;
|
|
64
|
+
/** The title line's id — the open button's `aria-labelledby` (React's `useId`). */
|
|
65
|
+
readonly nameId: string;
|
|
47
66
|
/** The leading wrapper (detached when no leading value and the slot is empty). */
|
|
48
67
|
leadingWrap?: ElementRef<HTMLElement>;
|
|
49
68
|
/** The subtitle line (detached when no subtitle value and the slot is empty). */
|
|
@@ -70,11 +89,19 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
70
89
|
cm(): UIClassMap;
|
|
71
90
|
/**
|
|
72
91
|
* Computes the row's class list (`cm.flex({ align: 'center', gap: 'sm' })` +
|
|
73
|
-
* `cm.sp('px', 3)` + `cm.sp('py', padY)` + `
|
|
74
|
-
*
|
|
92
|
+
* `cm.sp('px', 3)` + `cm.sp('py', padY)` + `className` — plus
|
|
93
|
+
* `cm.position('relative')` while the row has an `onClick`, so the absolute
|
|
94
|
+
* open button anchors to the row like React's).
|
|
75
95
|
* @returns The class string.
|
|
76
96
|
*/
|
|
77
97
|
classes(): string;
|
|
98
|
+
/**
|
|
99
|
+
* Computes the open button's class (`cm.position('absolute')` + `cm.inset0`,
|
|
100
|
+
* plus `cm.cursorPointer` unless the row is disabled — the whole row is the
|
|
101
|
+
* hit area).
|
|
102
|
+
* @returns The class string.
|
|
103
|
+
*/
|
|
104
|
+
openButtonClasses(): string;
|
|
78
105
|
/**
|
|
79
106
|
* Computes the middle stack's class (`cm.flex1` + `cm.stack(0)`).
|
|
80
107
|
* @returns The class string.
|
|
@@ -96,7 +123,8 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
96
123
|
*/
|
|
97
124
|
metadataClass(): string;
|
|
98
125
|
/**
|
|
99
|
-
* The actions wrapper's class (`cm.shrink0`)
|
|
126
|
+
* The actions wrapper's class (`cm.shrink0` + `cm.position('relative')` —
|
|
127
|
+
* the actions sit above the open button and keep their own clicks).
|
|
100
128
|
* @returns The class string.
|
|
101
129
|
*/
|
|
102
130
|
actionsClass(): string;
|
|
@@ -106,11 +134,12 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
106
134
|
*/
|
|
107
135
|
titleClass(): string;
|
|
108
136
|
/**
|
|
109
|
-
* Whether the row
|
|
110
|
-
* `
|
|
111
|
-
*
|
|
137
|
+
* Whether the row has an open action: an `onClick` (React renders the open
|
|
138
|
+
* button and the root's `position: relative` while it does — `disabled`
|
|
139
|
+
* only disables the button, it does not remove it).
|
|
140
|
+
* @returns True when the row renders the open button.
|
|
112
141
|
*/
|
|
113
|
-
|
|
142
|
+
hasOpenAction(): boolean;
|
|
114
143
|
/**
|
|
115
144
|
* The vertical padding token argument (`2` for `'compact'`, else `3` —
|
|
116
145
|
* React's default parameter).
|
|
@@ -143,19 +172,19 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
143
172
|
* @returns The text, or `''` for a node value.
|
|
144
173
|
*/
|
|
145
174
|
actionsText(): string;
|
|
146
|
-
/** Runs the click handler the way React forwards the DOM event, unless disabled. */
|
|
147
|
-
handleClick(event: Event): void;
|
|
148
175
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
176
|
+
* Runs the row's open action, the way React forwards the open button's
|
|
177
|
+
* click (bare, no event). A disabled row never calls it: the button carries
|
|
178
|
+
* `disabled`, so browsers raise no click from it, and the guard holds for a
|
|
179
|
+
* synthetic one.
|
|
151
180
|
*/
|
|
152
|
-
|
|
181
|
+
handleClick(): void;
|
|
153
182
|
/** Reads slot presence (view queries resolve only at view init) and reconciles the wrappers. */
|
|
154
183
|
ngAfterViewInit(): void;
|
|
155
184
|
/**
|
|
156
185
|
* Re-reconciles after every view refresh (a props step may add or remove a
|
|
157
|
-
* value): the wrappers are toggled on the values the template just
|
|
158
|
-
* so a later props step lands in one pass.
|
|
186
|
+
* value): the wrappers are toggled on the values the template just
|
|
187
|
+
* rendered, so a later props step lands in one pass.
|
|
159
188
|
*/
|
|
160
189
|
ngAfterViewChecked(): void;
|
|
161
190
|
/**
|
|
@@ -166,6 +195,6 @@ export declare class ListItemRow implements AfterViewInit, AfterViewChecked {
|
|
|
166
195
|
*/
|
|
167
196
|
private reconcile;
|
|
168
197
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListItemRow, never>;
|
|
169
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ListItemRow, "div[mol-list-item-row]", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "leading": { "alias": "leading"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "density": { "alias": "density"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=leading]", "[slot=title]", "[slot=subtitle]", "[slot=metadata]", "[slot=actions]"], true, never>;
|
|
198
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListItemRow, "div[mol-list-item-row]", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "leading": { "alias": "leading"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "toggle": { "alias": "toggle"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "density": { "alias": "density"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=leading]", "[slot=title]", "[slot=subtitle]", "[slot=metadata]", "[slot=actions]"], true, never>;
|
|
170
199
|
}
|
|
171
200
|
//# sourceMappingURL=list-item-row.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-row.component.d.ts","sourceRoot":"","sources":["../src/list-item-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAElB,UAAU,EAIX,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;
|
|
1
|
+
{"version":3,"file":"list-item-row.component.d.ts","sourceRoot":"","sources":["../src/list-item-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAElB,UAAU,EAIX,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAKlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;;AAElD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAqFa,WAAY,YAAW,aAAa,EAAE,gBAAgB;IACjE,4FAA4F;IAC5F,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yFAAyF;IACzF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oGAAoG;IACpG,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB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AIG;IACH,IAAI,IAAI,CAAC,GAAG,CAAC;IAIb;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAMnB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAMtB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAMtB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAMrB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAMrB;;;;;OAKG;IACH,WAAW,IAAI,IAAI;IAKnB,gGAAgG;IAChG,eAAe,IAAI,IAAI;IAIvB;;;;OAIG;IACH,kBAAkB,IAAI,IAAI;IAI1B;;;;;OAKG;IACH,OAAO,CAAC,SAAS;yCArPN,WAAW;2CAAX,WAAW;CA0QvB"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Component, ElementRef, inject, Renderer2, ViewChild, } from '@angular/core';
|
|
7
7
|
import { getClassMap } from '@molecule/app-ui';
|
|
8
|
+
import { OptimisticToggleButton } from '@molecule/app-ui-angular';
|
|
8
9
|
import { hasNodes, SlotGuard } from './slot-dom.js';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
const _c0 = ["leadingWrap"];
|
|
@@ -13,29 +14,60 @@ const _c2 = ["metadataWrap"];
|
|
|
13
14
|
const _c3 = ["actionsWrap"];
|
|
14
15
|
const _c4 = [[["", "slot", "leading"]], [["", "slot", "title"]], [["", "slot", "subtitle"]], [["", "slot", "metadata"]], [["", "slot", "actions"]]];
|
|
15
16
|
const _c5 = ["[slot=leading]", "[slot=title]", "[slot=subtitle]", "[slot=metadata]", "[slot=actions]"];
|
|
16
|
-
function
|
|
17
|
+
function ListItemRow_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
19
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
20
|
+
i0.ɵɵlistener("click", function ListItemRow_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.handleClick()); });
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
24
|
+
i0.ɵɵclassMap(ctx_r1.openButtonClasses());
|
|
25
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r1.nameId)("disabled", ctx_r1.disabled ? "" : null);
|
|
26
|
+
} }
|
|
27
|
+
function ListItemRow_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
17
28
|
i0.ɵɵtext(0);
|
|
18
29
|
} if (rf & 2) {
|
|
19
|
-
const
|
|
20
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
30
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
31
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.leadingText(), " ");
|
|
21
32
|
} }
|
|
22
|
-
function
|
|
33
|
+
function ListItemRow_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
23
34
|
i0.ɵɵtext(0);
|
|
24
35
|
} if (rf & 2) {
|
|
25
|
-
const
|
|
26
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
36
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
37
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.titleText(), " ");
|
|
27
38
|
} }
|
|
28
|
-
function
|
|
39
|
+
function ListItemRow_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
29
40
|
i0.ɵɵtext(0);
|
|
30
41
|
} if (rf & 2) {
|
|
31
|
-
const
|
|
32
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
42
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
43
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.subtitleText(), " ");
|
|
44
|
+
} }
|
|
45
|
+
function ListItemRow_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵtext(0);
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
49
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.metadataText(), " ");
|
|
50
|
+
} }
|
|
51
|
+
function ListItemRow_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
i0.ɵɵelementStart(0, "button", 5)(1, "span", 7);
|
|
53
|
+
i0.ɵɵtext(2);
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
i0.ɵɵelementStart(3, "span", 8);
|
|
56
|
+
i0.ɵɵtext(4);
|
|
57
|
+
i0.ɵɵelementEnd()();
|
|
58
|
+
} if (rf & 2) {
|
|
59
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
60
|
+
i0.ɵɵproperty("value", ctx_r1.toggle.value)("commit", ctx_r1.toggle.commit)("onError", ctx_r1.toggle.onError)("variant", ctx_r1.toggle.variant)("color", ctx_r1.toggle.color)("size", ctx_r1.toggle.size)("fullWidth", ctx_r1.toggle.fullWidth ?? false)("disabled", ctx_r1.toggle.disabled ?? false)("className", ctx_r1.toggle.className)("testId", ctx_r1.toggle.testId);
|
|
61
|
+
i0.ɵɵadvance(2);
|
|
62
|
+
i0.ɵɵtextInterpolate(ctx_r1.toggle.activeLabel);
|
|
63
|
+
i0.ɵɵadvance(2);
|
|
64
|
+
i0.ɵɵtextInterpolate(ctx_r1.toggle.inactiveLabel);
|
|
33
65
|
} }
|
|
34
|
-
function
|
|
66
|
+
function ListItemRow_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
35
67
|
i0.ɵɵtext(0);
|
|
36
68
|
} if (rf & 2) {
|
|
37
|
-
const
|
|
38
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
69
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
70
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.actionsText(), " ");
|
|
39
71
|
} }
|
|
40
72
|
/**
|
|
41
73
|
* ListItemRow component.
|
|
@@ -46,13 +78,21 @@ function ListItemRow_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
|
46
78
|
* matching React's root exactly; the disabled row's dimmed opacity is applied
|
|
47
79
|
* inline through a host style binding (the CSSOM, as react-dom does).
|
|
48
80
|
*
|
|
81
|
+
* The row's open action lives on a native open button — an empty, transparent
|
|
82
|
+
* `<button type="button">` stretched over the whole row
|
|
83
|
+
* (`data-mol-id="list-item-row-open"`, `aria-labelledby` the title), the way
|
|
84
|
+
* React renders it while the row has an `onClick`; Enter / Space on it run the
|
|
85
|
+
* same handler mouse clicks run. An `@if` in the template puts it in the DOM
|
|
86
|
+
* only while the row has an `onClick` (React renders no button at all
|
|
87
|
+
* otherwise), and the actions wrapper sits above it and keeps its own clicks.
|
|
88
|
+
* The projected body renders directly in the host, so the wrappers never move.
|
|
89
|
+
*
|
|
49
90
|
* The node props are projected slots: `title` renders inside the title line,
|
|
50
91
|
* `subtitle` inside its line, `metadata` inside its line, `leading` inside the
|
|
51
|
-
* leading `<div>` and `actions` inside the right-side `<div
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* reconcile against that in {@link ListItemRow.ngAfterViewInit}.
|
|
92
|
+
* leading `<div>` and `actions` inside the right-side `<div>`. String inputs
|
|
93
|
+
* render as text instead — React's truthiness branch applies: an empty string
|
|
94
|
+
* renders nothing. The conditionally-rendered wrappers reconcile against that
|
|
95
|
+
* in {@link ListItemRow.ngAfterViewInit}.
|
|
56
96
|
*/
|
|
57
97
|
export class ListItemRow {
|
|
58
98
|
/** Title — first line (string/number renders as text; nodes are `[slot=title]` content). */
|
|
@@ -65,16 +105,26 @@ export class ListItemRow {
|
|
|
65
105
|
leading;
|
|
66
106
|
/** Optional right-side actions (`[slot=actions]` content, or text). */
|
|
67
107
|
actions;
|
|
68
|
-
/**
|
|
108
|
+
/** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
|
|
109
|
+
toggle;
|
|
110
|
+
/**
|
|
111
|
+
* Called when the row is activated (React's `onClick`, called bare). The
|
|
112
|
+
* whole row is clickable through a transparent native button over it, named
|
|
113
|
+
* by the title; the inner controls sit above it and keep their own clicks.
|
|
114
|
+
*/
|
|
69
115
|
onClick;
|
|
70
|
-
/** When true, sets `aria-
|
|
116
|
+
/** When true, sets `aria-current="true"` on the row — no built-in visual highlight. */
|
|
71
117
|
selected;
|
|
72
|
-
/** When true, renders in a disabled visual state and
|
|
118
|
+
/** When true, renders in a disabled visual state and disables the open button. */
|
|
73
119
|
disabled;
|
|
74
120
|
/** Dense vs comfortable spacing. Defaults to `'comfortable'` at read time. */
|
|
75
121
|
density;
|
|
76
122
|
/** Extra classes. */
|
|
77
123
|
className;
|
|
124
|
+
/** Next value of the module-wide instance counter (React `useId()`'s counterpart). */
|
|
125
|
+
static nextNameId = 0;
|
|
126
|
+
/** The title line's id — the open button's `aria-labelledby` (React's `useId`). */
|
|
127
|
+
nameId = `list-item-row-title-${ListItemRow.nextNameId++}`;
|
|
78
128
|
/** The leading wrapper (detached when no leading value and the slot is empty). */
|
|
79
129
|
leadingWrap;
|
|
80
130
|
/** The subtitle line (detached when no subtitle value and the slot is empty). */
|
|
@@ -103,12 +153,22 @@ export class ListItemRow {
|
|
|
103
153
|
}
|
|
104
154
|
/**
|
|
105
155
|
* Computes the row's class list (`cm.flex({ align: 'center', gap: 'sm' })` +
|
|
106
|
-
* `cm.sp('px', 3)` + `cm.sp('py', padY)` + `
|
|
107
|
-
*
|
|
156
|
+
* `cm.sp('px', 3)` + `cm.sp('py', padY)` + `className` — plus
|
|
157
|
+
* `cm.position('relative')` while the row has an `onClick`, so the absolute
|
|
158
|
+
* open button anchors to the row like React's).
|
|
108
159
|
* @returns The class string.
|
|
109
160
|
*/
|
|
110
161
|
classes() {
|
|
111
|
-
return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('px', 3), this.cm().sp('py', this.padY()), this.
|
|
162
|
+
return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('px', 3), this.cm().sp('py', this.padY()), this.hasOpenAction() ? this.cm().position('relative') : undefined, this.className);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Computes the open button's class (`cm.position('absolute')` + `cm.inset0`,
|
|
166
|
+
* plus `cm.cursorPointer` unless the row is disabled — the whole row is the
|
|
167
|
+
* hit area).
|
|
168
|
+
* @returns The class string.
|
|
169
|
+
*/
|
|
170
|
+
openButtonClasses() {
|
|
171
|
+
return this.cm().cn(this.cm().position('absolute'), this.cm().inset0, this.disabled ? undefined : this.cm().cursorPointer);
|
|
112
172
|
}
|
|
113
173
|
/**
|
|
114
174
|
* Computes the middle stack's class (`cm.flex1` + `cm.stack(0)`).
|
|
@@ -139,11 +199,12 @@ export class ListItemRow {
|
|
|
139
199
|
return this.cm().cn(this.cm().textSize('xs'));
|
|
140
200
|
}
|
|
141
201
|
/**
|
|
142
|
-
* The actions wrapper's class (`cm.shrink0`)
|
|
202
|
+
* The actions wrapper's class (`cm.shrink0` + `cm.position('relative')` —
|
|
203
|
+
* the actions sit above the open button and keep their own clicks).
|
|
143
204
|
* @returns The class string.
|
|
144
205
|
*/
|
|
145
206
|
actionsClass() {
|
|
146
|
-
return this.cm().cn(this.cm().shrink0);
|
|
207
|
+
return this.cm().cn(this.cm().shrink0, this.cm().position('relative'));
|
|
147
208
|
}
|
|
148
209
|
/**
|
|
149
210
|
* Computes the title line's class (`cm.textSize('sm')` + `cm.fontWeight('semibold')`).
|
|
@@ -153,12 +214,13 @@ export class ListItemRow {
|
|
|
153
214
|
return this.cm().cn(this.cm().textSize('sm'), this.cm().fontWeight('semibold'));
|
|
154
215
|
}
|
|
155
216
|
/**
|
|
156
|
-
* Whether the row
|
|
157
|
-
* `
|
|
158
|
-
*
|
|
217
|
+
* Whether the row has an open action: an `onClick` (React renders the open
|
|
218
|
+
* button and the root's `position: relative` while it does — `disabled`
|
|
219
|
+
* only disables the button, it does not remove it).
|
|
220
|
+
* @returns True when the row renders the open button.
|
|
159
221
|
*/
|
|
160
|
-
|
|
161
|
-
return Boolean(this.onClick)
|
|
222
|
+
hasOpenAction() {
|
|
223
|
+
return Boolean(this.onClick);
|
|
162
224
|
}
|
|
163
225
|
/**
|
|
164
226
|
* The vertical padding token argument (`2` for `'compact'`, else `3` —
|
|
@@ -214,18 +276,16 @@ export class ListItemRow {
|
|
|
214
276
|
? String(this.actions)
|
|
215
277
|
: '';
|
|
216
278
|
}
|
|
217
|
-
/** Runs the click handler the way React forwards the DOM event, unless disabled. */
|
|
218
|
-
handleClick(event) {
|
|
219
|
-
if (this.disabled)
|
|
220
|
-
return;
|
|
221
|
-
this.onClick?.(event);
|
|
222
|
-
}
|
|
223
279
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
280
|
+
* Runs the row's open action, the way React forwards the open button's
|
|
281
|
+
* click (bare, no event). A disabled row never calls it: the button carries
|
|
282
|
+
* `disabled`, so browsers raise no click from it, and the guard holds for a
|
|
283
|
+
* synthetic one.
|
|
226
284
|
*/
|
|
227
|
-
|
|
228
|
-
|
|
285
|
+
handleClick() {
|
|
286
|
+
if (this.disabled)
|
|
287
|
+
return;
|
|
288
|
+
this.onClick?.();
|
|
229
289
|
}
|
|
230
290
|
/** Reads slot presence (view queries resolve only at view init) and reconciles the wrappers. */
|
|
231
291
|
ngAfterViewInit() {
|
|
@@ -233,8 +293,8 @@ export class ListItemRow {
|
|
|
233
293
|
}
|
|
234
294
|
/**
|
|
235
295
|
* Re-reconciles after every view refresh (a props step may add or remove a
|
|
236
|
-
* value): the wrappers are toggled on the values the template just
|
|
237
|
-
* so a later props step lands in one pass.
|
|
296
|
+
* value): the wrappers are toggled on the values the template just
|
|
297
|
+
* rendered, so a later props step lands in one pass.
|
|
238
298
|
*/
|
|
239
299
|
ngAfterViewChecked() {
|
|
240
300
|
this.reconcile();
|
|
@@ -260,7 +320,7 @@ export class ListItemRow {
|
|
|
260
320
|
this.guard.toggle(leading, this.leadingText() !== '' || this.hasLeadingSlot);
|
|
261
321
|
this.guard.toggle(subtitle, this.subtitleText() !== '' || this.hasSubtitleSlot);
|
|
262
322
|
this.guard.toggle(metadata, this.metadataText() !== '' || this.hasMetadataSlot);
|
|
263
|
-
this.guard.toggle(actions, this.actionsText() !== '' || this.hasActionsSlot);
|
|
323
|
+
this.guard.toggle(actions, this.actionsText() !== '' || this.hasActionsSlot || Boolean(this.toggle));
|
|
264
324
|
}
|
|
265
325
|
static ɵfac = function ListItemRow_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ListItemRow)(); };
|
|
266
326
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListItemRow, selectors: [["div", "mol-list-item-row", ""]], viewQuery: function ListItemRow_Query(rf, ctx) { if (rf & 1) {
|
|
@@ -271,67 +331,76 @@ export class ListItemRow {
|
|
|
271
331
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subtitleWrap = _t.first);
|
|
272
332
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.metadataWrap = _t.first);
|
|
273
333
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.actionsWrap = _t.first);
|
|
274
|
-
} }, hostVars:
|
|
275
|
-
i0.ɵɵ
|
|
276
|
-
} if (rf & 2) {
|
|
277
|
-
i0.ɵɵattribute("role", ctx.onClick ? "button" : null)("tabindex", ctx.clickable() ? 0 : null)("aria-selected", ctx.selected ?? null)("aria-disabled", ctx.disabled ?? null);
|
|
334
|
+
} }, hostVars: 6, hostBindings: function ListItemRow_HostBindings(rf, ctx) { if (rf & 2) {
|
|
335
|
+
i0.ɵɵattribute("aria-current", ctx.selected ? "true" : null)("aria-disabled", ctx.disabled ?? null);
|
|
278
336
|
i0.ɵɵclassMap(ctx.classes());
|
|
279
337
|
i0.ɵɵstyleProp("opacity", ctx.disabled ? 0.5 : null);
|
|
280
|
-
} }, inputs: { title: "title", subtitle: "subtitle", metadata: "metadata", leading: "leading", actions: "actions", onClick: "onClick", selected: "selected", disabled: "disabled", density: "density", className: "className" }, ngContentSelectors: _c5, decls:
|
|
338
|
+
} }, inputs: { title: "title", subtitle: "subtitle", metadata: "metadata", leading: "leading", actions: "actions", toggle: "toggle", onClick: "onClick", selected: "selected", disabled: "disabled", density: "density", className: "className" }, ngContentSelectors: _c5, decls: 22, vars: 20, consts: [["leadingWrap", ""], ["subtitleWrap", ""], ["metadataWrap", ""], ["actionsWrap", ""], ["type", "button", "data-mol-id", "list-item-row-open", 2, "background", "transparent", "border", "medium", "padding", "0px", 3, "class"], ["mol-optimistic-toggle-button", "", 3, "value", "commit", "onError", "variant", "color", "size", "fullWidth", "disabled", "className", "testId"], ["type", "button", "data-mol-id", "list-item-row-open", 2, "background", "transparent", "border", "medium", "padding", "0px", 3, "click"], ["slot", "activeLabel"], ["slot", "inactiveLabel"]], template: function ListItemRow_Template(rf, ctx) { if (rf & 1) {
|
|
281
339
|
i0.ɵɵprojectionDef(_c4);
|
|
282
|
-
i0.ɵɵ
|
|
283
|
-
i0.ɵɵ
|
|
284
|
-
i0.ɵɵ
|
|
285
|
-
i0.ɵɵ
|
|
286
|
-
i0.ɵɵ
|
|
287
|
-
i0.ɵɵ
|
|
288
|
-
i0.ɵɵ
|
|
289
|
-
i0.ɵɵ
|
|
290
|
-
i0.ɵɵ
|
|
291
|
-
i0.ɵɵ
|
|
292
|
-
i0.ɵɵ
|
|
293
|
-
i0.ɵɵ
|
|
294
|
-
i0.ɵɵ
|
|
295
|
-
i0.ɵɵ
|
|
296
|
-
i0.ɵɵ
|
|
297
|
-
i0.ɵɵ
|
|
298
|
-
i0.ɵɵ
|
|
299
|
-
i0.ɵɵ
|
|
300
|
-
i0.ɵɵ
|
|
301
|
-
i0.ɵɵ
|
|
340
|
+
i0.ɵɵconditionalCreate(0, ListItemRow_Conditional_0_Template, 1, 4, "button", 4);
|
|
341
|
+
i0.ɵɵelementStart(1, "div", null, 0);
|
|
342
|
+
i0.ɵɵconditionalCreate(3, ListItemRow_Conditional_3_Template, 1, 1);
|
|
343
|
+
i0.ɵɵprojection(4);
|
|
344
|
+
i0.ɵɵelementEnd();
|
|
345
|
+
i0.ɵɵelementStart(5, "div")(6, "div");
|
|
346
|
+
i0.ɵɵconditionalCreate(7, ListItemRow_Conditional_7_Template, 1, 1);
|
|
347
|
+
i0.ɵɵprojection(8, 1);
|
|
348
|
+
i0.ɵɵelementEnd();
|
|
349
|
+
i0.ɵɵelementStart(9, "div", null, 1);
|
|
350
|
+
i0.ɵɵconditionalCreate(11, ListItemRow_Conditional_11_Template, 1, 1);
|
|
351
|
+
i0.ɵɵprojection(12, 2);
|
|
352
|
+
i0.ɵɵelementEnd();
|
|
353
|
+
i0.ɵɵelementStart(13, "div", null, 2);
|
|
354
|
+
i0.ɵɵconditionalCreate(15, ListItemRow_Conditional_15_Template, 1, 1);
|
|
355
|
+
i0.ɵɵprojection(16, 3);
|
|
356
|
+
i0.ɵɵelementEnd()();
|
|
357
|
+
i0.ɵɵelementStart(17, "div", null, 3);
|
|
358
|
+
i0.ɵɵconditionalCreate(19, ListItemRow_Conditional_19_Template, 5, 12, "button", 5);
|
|
359
|
+
i0.ɵɵconditionalCreate(20, ListItemRow_Conditional_20_Template, 1, 1);
|
|
360
|
+
i0.ɵɵprojection(21, 4);
|
|
361
|
+
i0.ɵɵelementEnd();
|
|
302
362
|
} if (rf & 2) {
|
|
363
|
+
i0.ɵɵconditional(ctx.onClick ? 0 : -1);
|
|
364
|
+
i0.ɵɵadvance();
|
|
303
365
|
i0.ɵɵclassMap(ctx.leadingClass());
|
|
304
366
|
i0.ɵɵadvance(2);
|
|
305
|
-
i0.ɵɵconditional(ctx.leadingText() ?
|
|
367
|
+
i0.ɵɵconditional(ctx.leadingText() ? 3 : -1);
|
|
306
368
|
i0.ɵɵadvance(2);
|
|
307
369
|
i0.ɵɵclassMap(ctx.stackClass());
|
|
308
370
|
i0.ɵɵadvance();
|
|
309
371
|
i0.ɵɵclassMap(ctx.titleClass());
|
|
372
|
+
i0.ɵɵattribute("id", ctx.onClick ? ctx.nameId : null);
|
|
310
373
|
i0.ɵɵadvance();
|
|
311
|
-
i0.ɵɵconditional(ctx.titleText() ?
|
|
374
|
+
i0.ɵɵconditional(ctx.titleText() ? 7 : -1);
|
|
312
375
|
i0.ɵɵadvance(2);
|
|
313
376
|
i0.ɵɵclassMap(ctx.subtitleClass());
|
|
314
377
|
i0.ɵɵadvance(2);
|
|
315
|
-
i0.ɵɵconditional(ctx.subtitleText() ?
|
|
378
|
+
i0.ɵɵconditional(ctx.subtitleText() ? 11 : -1);
|
|
316
379
|
i0.ɵɵadvance(2);
|
|
317
380
|
i0.ɵɵclassMap(ctx.metadataClass());
|
|
318
381
|
i0.ɵɵadvance(2);
|
|
319
|
-
i0.ɵɵconditional(ctx.metadataText() ?
|
|
382
|
+
i0.ɵɵconditional(ctx.metadataText() ? 15 : -1);
|
|
320
383
|
i0.ɵɵadvance(2);
|
|
321
384
|
i0.ɵɵclassMap(ctx.actionsClass());
|
|
322
|
-
|
|
385
|
+
i0.ɵɵadvance(2);
|
|
386
|
+
i0.ɵɵconditional(ctx.toggle ? 19 : -1);
|
|
387
|
+
i0.ɵɵadvance();
|
|
388
|
+
i0.ɵɵconditional(ctx.actionsText() ? 20 : -1);
|
|
389
|
+
} }, dependencies: [OptimisticToggleButton], encapsulation: 2 });
|
|
323
390
|
}
|
|
324
391
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListItemRow, [{
|
|
325
392
|
type: Component,
|
|
326
393
|
args: [{
|
|
327
394
|
selector: 'div[mol-list-item-row]',
|
|
328
395
|
standalone: true,
|
|
396
|
+
imports: [OptimisticToggleButton],
|
|
329
397
|
inputs: [
|
|
330
398
|
'title',
|
|
331
399
|
'subtitle',
|
|
332
400
|
'metadata',
|
|
333
401
|
'leading',
|
|
334
402
|
'actions',
|
|
403
|
+
'toggle',
|
|
335
404
|
'onClick',
|
|
336
405
|
'selected',
|
|
337
406
|
'disabled',
|
|
@@ -340,21 +409,29 @@ export class ListItemRow {
|
|
|
340
409
|
],
|
|
341
410
|
host: {
|
|
342
411
|
'[class]': 'classes()',
|
|
343
|
-
'[attr.
|
|
344
|
-
'[attr.tabindex]': 'this.clickable() ? 0 : null',
|
|
345
|
-
'[attr.aria-selected]': 'this.selected ?? null',
|
|
412
|
+
'[attr.aria-current]': 'this.selected ? "true" : null',
|
|
346
413
|
'[attr.aria-disabled]': 'this.disabled ?? null',
|
|
347
414
|
'[style.opacity]': 'this.disabled ? 0.5 : null',
|
|
348
|
-
'(click)': 'handleClick($event)',
|
|
349
415
|
},
|
|
350
|
-
template:
|
|
416
|
+
template: `@if (onClick) {
|
|
417
|
+
<button
|
|
418
|
+
type="button"
|
|
419
|
+
[attr.aria-labelledby]="nameId"
|
|
420
|
+
[attr.disabled]="disabled ? '' : null"
|
|
421
|
+
data-mol-id="list-item-row-open"
|
|
422
|
+
(click)="handleClick()"
|
|
423
|
+
[class]="openButtonClasses()"
|
|
424
|
+
style="background: transparent; border: medium; padding: 0px"
|
|
425
|
+
></button>
|
|
426
|
+
}
|
|
427
|
+
<div #leadingWrap [class]="leadingClass()">
|
|
351
428
|
@if (leadingText()) {
|
|
352
429
|
{{ leadingText() }}
|
|
353
430
|
}
|
|
354
431
|
<ng-content select="[slot=leading]"></ng-content>
|
|
355
432
|
</div>
|
|
356
433
|
<div [class]="stackClass()">
|
|
357
|
-
<div [class]="titleClass()">
|
|
434
|
+
<div [attr.id]="onClick ? nameId : null" [class]="titleClass()">
|
|
358
435
|
@if (titleText()) {
|
|
359
436
|
{{ titleText() }}
|
|
360
437
|
}
|
|
@@ -373,7 +450,28 @@ export class ListItemRow {
|
|
|
373
450
|
<ng-content select="[slot=metadata]"></ng-content>
|
|
374
451
|
</div>
|
|
375
452
|
</div>
|
|
376
|
-
<div #actionsWrap [class]="actionsClass()"
|
|
453
|
+
<div #actionsWrap [class]="actionsClass()">
|
|
454
|
+
@if (toggle) {
|
|
455
|
+
<button
|
|
456
|
+
mol-optimistic-toggle-button
|
|
457
|
+
[value]="toggle.value"
|
|
458
|
+
[commit]="toggle.commit"
|
|
459
|
+
[onError]="toggle.onError"
|
|
460
|
+
[variant]="toggle.variant"
|
|
461
|
+
[color]="toggle.color"
|
|
462
|
+
[size]="toggle.size"
|
|
463
|
+
[fullWidth]="toggle.fullWidth ?? false"
|
|
464
|
+
[disabled]="toggle.disabled ?? false"
|
|
465
|
+
[className]="toggle.className"
|
|
466
|
+
[testId]="toggle.testId"
|
|
467
|
+
>
|
|
468
|
+
<span slot="activeLabel">{{ toggle.activeLabel }}</span>
|
|
469
|
+
<span slot="inactiveLabel">{{ toggle.inactiveLabel }}</span>
|
|
470
|
+
</button>
|
|
471
|
+
}
|
|
472
|
+
@if (actionsText()) {
|
|
473
|
+
{{ actionsText() }}
|
|
474
|
+
}
|
|
377
475
|
<ng-content select="[slot=actions]"></ng-content>
|
|
378
476
|
</div>`,
|
|
379
477
|
}]
|
|
@@ -390,5 +488,5 @@ export class ListItemRow {
|
|
|
390
488
|
type: ViewChild,
|
|
391
489
|
args: ['actionsWrap']
|
|
392
490
|
}] }); })();
|
|
393
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ListItemRow, { className: "ListItemRow", filePath: "list-item-row.component.ts", lineNumber:
|
|
491
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ListItemRow, { className: "ListItemRow", filePath: "list-item-row.component.ts", lineNumber: 134 }); })();
|
|
394
492
|
//# sourceMappingURL=list-item-row.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-row.component.js","sourceRoot":"","sources":["../src/list-item-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,SAAS,EACT,UAAU,EACV,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"list-item-row.component.js","sourceRoot":"","sources":["../src/list-item-row.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,SAAS,EACT,UAAU,EACV,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;;;;;;;;;;IAoD7C,iCAQC;IAHC,+KAAS,oBAAa,KAAC;IAGxB,iBAAS;;;IAFR,yCAA6B;;;;IAM7B,YACF;;;IADE,qDACF;;;IAMI,YACF;;;IADE,mDACF;;;IAKE,YACF;;;IADE,sDACF;;;IAKE,YACF;;;IADE,sDACF;;;IAmBE,AAbF,iCAYC,cAC0B;IAAA,YAAwB;IAAA,iBAAO;IACxD,+BAA2B;IAAA,YAA0B;IACvD,AADuD,iBAAO,EACrD;;;IAJP,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,2CAAsB,gCACE,kCACE,kCACA,8BACJ,4BACF,+CACmB,6CACF,sCACP,gCACN;IAEC,eAAwB;IAAxB,+CAAwB;IACtB,eAA0B;IAA1B,iDAA0B;;;IAIvD,YACF;;;IADE,qDACF;;AA1GN;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAsFH,MAAM,OAAO,WAAW;IACtB,4FAA4F;IAC5F,KAAK,CAAU;IACf,yFAAyF;IACzF,QAAQ,CAAU;IAClB,wFAAwF;IACxF,QAAQ,CAAU;IAClB,2FAA2F;IAC3F,OAAO,CAAU;IACjB,uEAAuE;IACvE,OAAO,CAAU;IACjB,oGAAoG;IACpG,MAAM,CAA6B;IACnC;;;;OAIG;IACH,OAAO,CAAa;IACpB,uFAAuF;IACvF,QAAQ,CAAU;IAClB,kFAAkF;IAClF,QAAQ,CAAU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,eAEC;YAFD,8CAEC;YAIa,eAAwB;YAAxB,iCAAwB;YACxC,eAiBC;YAjBD,sCAiBC;YACD,cAEC;YAFD,6CAEC;4BA9EK,sBAAsB;;iFAkFrB,WAAW;cArFvB,SAAS;eAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,sBAAsB,CAAC;gBACjC,MAAM,EAAE;oBACN,OAAO;oBACP,UAAU;oBACV,UAAU;oBACV,SAAS;oBACT,SAAS;oBACT,QAAQ;oBACR,SAAS;oBACT,UAAU;oBACV,UAAU;oBACV,SAAS;oBACT,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,qBAAqB,EAAE,+BAA+B;oBACtD,sBAAsB,EAAE,uBAAuB;oBAC/C,iBAAiB,EAAE,4BAA4B;iBAChD;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA4DD;aACV;;kBAoCE,SAAS;mBAAC,aAAa;;kBAEvB,SAAS;mBAAC,cAAc;;kBAExB,SAAS;mBAAC,cAAc;;kBAExB,SAAS;mBAAC,aAAa;;kFAzCb,WAAW"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
+
import type { ButtonVariant, ColorVariant, Size } from '@molecule/app-ui';
|
|
6
7
|
/** Props accepted by the {@link ListItemRow} component (its inputs). */
|
|
7
8
|
export interface ListItemRowProps {
|
|
8
9
|
/** Title — first line. A string/number renders as text; nodes are `[slot=title]` projected content. */
|
|
@@ -15,9 +16,41 @@ export interface ListItemRowProps {
|
|
|
15
16
|
leading?: string | number;
|
|
16
17
|
/** Optional right-side actions (buttons, action menu; `[slot=actions]` content, or text). */
|
|
17
18
|
actions?: string | number;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
|
|
20
|
+
toggle?: {
|
|
21
|
+
/** The loaded server value. */
|
|
22
|
+
value: boolean;
|
|
23
|
+
/** Saves the desired boolean and resolves with the server-confirmed boolean. */
|
|
24
|
+
commit: (desired: boolean) => Promise<boolean>;
|
|
25
|
+
/** Label when the displayed value is true. */
|
|
26
|
+
activeLabel?: string | number;
|
|
27
|
+
/** Label when the displayed value is false. */
|
|
28
|
+
inactiveLabel?: string | number;
|
|
29
|
+
/** Receives a failed save after the toggle restored the last confirmed value. */
|
|
30
|
+
onError?: (error: unknown) => void;
|
|
31
|
+
/** Button variant. */
|
|
32
|
+
variant?: ButtonVariant;
|
|
33
|
+
/** Button color. */
|
|
34
|
+
color?: ColorVariant;
|
|
35
|
+
/** Button size. */
|
|
36
|
+
size?: Size;
|
|
37
|
+
/** Whether the button stretches to fill its container. */
|
|
38
|
+
fullWidth?: boolean;
|
|
39
|
+
/** Disables the toggle (permissions, never a pending save). */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/** Extra classes. */
|
|
42
|
+
className?: string;
|
|
43
|
+
/** `data-testid`. */
|
|
44
|
+
testId?: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Called when the row is activated (called bare, the way React forwards the
|
|
48
|
+
* open button's click). The whole row is clickable through a transparent
|
|
49
|
+
* native button over it, named by the title; the inner controls (the
|
|
50
|
+
* `actions` slot) sit above it and keep their own clicks.
|
|
51
|
+
*/
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
/** When true, sets `aria-current="true"` on the row — no built-in visual highlight; style it via `className` or host CSS. */
|
|
21
54
|
selected?: boolean;
|
|
22
55
|
/** When true, renders in a disabled visual state. */
|
|
23
56
|
disabled?: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"A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,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;QAClC,sBAAsB;QACtB,OAAO,CAAC,EAAE,aAAa,CAAA;QACvB,oBAAoB;QACpB,KAAK,CAAC,EAAE,YAAY,CAAA;QACpB,mBAAmB;QACnB,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,0DAA0D;QAC1D,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,+DAA+D;QAC/D,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,qBAAqB;QACrB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,qBAAqB;QACrB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACD;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACnC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-list-item-row-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Thumbnail + title + subtitle + metadata + actions row (nav lists, mobile menus)",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-list-item-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.
|
|
58
|
+
"@molecule/app-angular": "3.7.2",
|
|
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
62
|
"@molecule/app-ui": "1.4.0",
|
|
63
|
-
"@molecule/app-ui-angular": "1.2.
|
|
63
|
+
"@molecule/app-ui-angular": "1.2.1",
|
|
64
64
|
"@types/node": "26.6.5",
|
|
65
65
|
"jsdom": "30.1.3",
|
|
66
66
|
"rxjs": "7.8.2",
|