@molecule/app-progress-bar-angular 1.1.0 → 1.1.1

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-15T09:56:46.607Z
6
+ Generated: 2026-11-21T12:47:01.418Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-progress-bar-angular
@@ -78,6 +78,13 @@ interface ProgressBarProps {
78
78
  label?: unknown
79
79
  /** Optional value display on the right of the label row — a string input, or `[slot=valueLabel]` content. */
80
80
  valueLabel?: unknown
81
+ /**
82
+ * Element id the track is named by (`aria-labelledby`). Wins over `label`
83
+ * and the default accessible name — `ProgressCard` points it at its title.
84
+ */
85
+ labelledBy?: string
86
+ /** Element id the track is described by (`aria-describedby`). */
87
+ describedBy?: string
81
88
  /** Size preset — maps to ClassMap `progressHeight`. */
82
89
  size?: 'sm' | 'md' | 'lg'
83
90
  /** Color variant — maps to ClassMap `progressColor`. */
@@ -130,6 +137,11 @@ progress tokens. The host IS the outer `<div>` (`div[mol-progress-bar]`),
130
137
  matching React's root exactly. Node props (`label`, `valueLabel`) are
131
138
  projected content (`[slot=<name>]`) or plain string inputs.
132
139
 
140
+ The track always carries an accessible name (`aria-progressbar-name`):
141
+ `labelledBy` when given, else the rendered `label`, else
142
+ `t('progressBar.label', undefined, { defaultValue: 'Progress' })`, read
143
+ through `useTranslation()` so it follows a locale switch.
144
+
133
145
  This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
134
146
  same props (React names), the same ClassMap tokens, and the same DOM for the
135
147
  same input.
@@ -138,12 +150,22 @@ same input.
138
150
  @Component({
139
151
  selector: 'div[mol-progress-bar]',
140
152
  standalone: true,
141
- inputs: ['value', 'max', 'label', 'valueLabel', 'size', 'color', 'className'],
153
+ inputs: [
154
+ 'value',
155
+ 'max',
156
+ 'label',
157
+ 'valueLabel',
158
+ 'labelledBy',
159
+ 'describedBy',
160
+ 'size',
161
+ 'color',
162
+ 'className',
163
+ ],
142
164
  host: {
143
165
  '[class]': 'classes()',
144
166
  },
145
167
  // prettier-ignore
146
- template: `@if (showHeader) {<div [class]="headerClasses()">@if (showLabel) {<span #labelEl [class]="labelClasses()">@if (hasLabel) {{{ label }}}<ng-content select="[slot=label]" /></span>}@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]" /></span>}</div>}<div [class]="trackClasses()" role="progressbar" [attr.aria-valuenow]="value" [attr.aria-valuemin]="0" [attr.aria-valuemax]="maxValue()"><div [class]="fillClasses()" [style]="fillStyleText()"></div></div>`,
168
+ template: `@if (showHeader) {<div [class]="headerClasses()">@if (showLabel) {<span #labelEl [attr.id]="nameByLabel ? labelId : null" [class]="labelClasses()">@if (hasLabel) {{{ label }}}<ng-content select="[slot=label]" /></span>}@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]" /></span>}</div>}<div [class]="trackClasses()" role="progressbar" [attr.aria-valuenow]="value" [attr.aria-valuemin]="0" [attr.aria-valuemax]="maxValue()" [attr.aria-labelledby]="trackLabelledBy" [attr.aria-label]="trackAriaLabel" [attr.aria-describedby]="describedBy"><div [class]="fillClasses()" [style]="fillStyleText()"></div></div>`,
147
169
  })
148
170
  export class ProgressBar implements AfterViewInit {
149
171
  /** Current numeric value. */
@@ -154,6 +176,10 @@ export class ProgressBar implements AfterViewInit {
154
176
  label?: ProgressBarProps['label']
155
177
  /** Optional value display on the right of the label row — a string input, or `[slot=valueLabel]` content. */
156
178
  valueLabel?: ProgressBarProps['valueLabel']
179
+ /** Element id the track is named by — wins over `label` and the default name. */
180
+ labelledBy?: string
181
+ /** Element id the track is described by (`aria-describedby`). */
182
+ describedBy?: string
157
183
  /** Size preset — maps to ClassMap `progressHeight` (defaults to `'md'`). */
158
184
  size?: 'sm' | 'md' | 'lg'
159
185
  /** Color variant — maps to ClassMap `progressColor` (defaults to `'primary'`). */
@@ -161,6 +187,13 @@ export class ProgressBar implements AfterViewInit {
161
187
  /** Extra classes on the outer wrapper. */
162
188
  className?: string
163
189
 
190
+ /** Per-instance counter backing {@link ProgressBar.labelId} (React numbers `useId()` ids). */
191
+ private static nextId = 0
192
+ /** The id the track's `aria-labelledby` points at when the rendered label names it. */
193
+ readonly labelId = `mol-progress-bar-name-${ProgressBar.nextId++}`
194
+ /** The i18n handle (locale-reactive), read in an injection context. */
195
+ private readonly i18n = useTranslation()
196
+
164
197
  /** The optional label span (projected content lands here; read once). */
165
198
  @ViewChild('labelEl') private labelEl?: ElementRef<HTMLSpanElement>
166
199
  /** The optional value-label span (projected content lands here; read once). */
@@ -191,18 +224,12 @@ export class ProgressBar implements AfterViewInit {
191
224
  return getClassMap()
192
225
  }
193
226
 
194
- /**
195
- * Whether a text label input renders (React's `label && …`).
196
- * @returns True when the label renders as text.
197
- */
227
+ /** Whether a text label input renders (React's `label && …`). */
198
228
  get hasLabel(): boolean {
199
229
  return this.label !== undefined && this.label !== null && !!this.label
200
230
  }
201
231
 
202
- /**
203
- * Whether a text value-label input renders (React's `valueLabel && …`).
204
- * @returns True when the value label renders as text.
205
- */
232
+ /** Whether a text value-label input renders (React's `valueLabel && …`). */
206
233
  get hasValueLabel(): boolean {
207
234
  return this.valueLabel !== undefined && this.valueLabel !== null && !!this.valueLabel
208
235
  }
@@ -231,6 +258,23 @@ export class ProgressBar implements AfterViewInit {
231
258
  return this.showLabel || this.showValueLabel
232
259
  }
233
260
 
261
+ /** Whether the rendered label is the track's name (React names the track with the `label` unless an explicit `labelledBy` wins). */
262
+ get nameByLabel(): boolean {
263
+ return this.labelledBy === undefined && this.showLabel
264
+ }
265
+
266
+ /** The track's `aria-labelledby`: the `labelledBy` input when given, else the rendered label's id, else `null` (React omits the attribute). */
267
+ get trackLabelledBy(): string | null {
268
+ return this.labelledBy ?? (this.nameByLabel ? this.labelId : null)
269
+ }
270
+
271
+ /** The track's `aria-label`: the `t('progressBar.label')` default when no `labelledBy` input and no rendered label names it, else `null` (React omits the attribut… */
272
+ get trackAriaLabel(): string | null {
273
+ return this.labelledBy === undefined && !this.showLabel
274
+ ? this.i18n.t('progressBar.label', undefined, { defaultValue: 'Progress' })
275
+ : null
276
+ }
277
+
234
278
  /**
235
279
  * The maximum width (React's default parameter: a later-bound write of
236
280
  * `undefined` must not erase the `100` default).
@@ -256,10 +300,7 @@ export class ProgressBar implements AfterViewInit {
256
300
  return this.color ?? 'primary'
257
301
  }
258
302
 
259
- /**
260
- * The fill percentage React computes (`max === 0` renders empty).
261
- * @returns The percentage in the 0–100 range.
262
- */
303
+ /** The fill percentage React computes (`max === 0` renders empty). */
263
304
  fillPercent(): number {
264
305
  const max = this.maxValue()
265
306
  return max === 0 ? 0 : Math.max(0, Math.min(100, (this.value / max) * 100))
@@ -327,6 +368,8 @@ export class ProgressBar implements AfterViewInit {
327
368
  }
328
369
  ```
329
370
 
371
+ _(The 6 longest member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/app-progress-bar-angular/dist/progress-bar.component.d.ts`.)_
372
+
330
373
  #### `ProgressCard`
331
374
 
332
375
  ProgressCard component.
@@ -338,6 +381,9 @@ classes. Node props (`title`, `description`, `icon`, `valueLabel`,
338
381
  `children`) are projected content (`[slot=<name>]`, or the default
339
382
  projection) or plain string inputs.
340
383
 
384
+ The bar is named by the title (`aria-labelledby`) and, when a description
385
+ renders, described by it (`aria-describedby`).
386
+
341
387
  This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
342
388
  same props (React names), the same ClassMap tokens, and the same DOM for the
343
389
  same input.
@@ -352,7 +398,7 @@ same input.
352
398
  '[class]': 'classes()',
353
399
  },
354
400
  // prettier-ignore
355
- template: `<div [class]="stackClasses()"><div [class]="headerClasses()"><div [class]="leftClasses()">@if (hasIcon) {{{ icon }}}<ng-content select="[slot=icon]"></ng-content><div><h3 [class]="titleClasses()">@if (hasTitle) {{{ title }}}<ng-content select="[slot=title]"></ng-content></h3>@if (showDescription) {<p #descriptionEl [class]="descriptionClasses()">@if (hasDescription) {{{ description }}}<ng-content select="[slot=description]"></ng-content></p>}</div></div>@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]"></ng-content></span>}</div><div mol-progress-bar [value]="value" [max]="maxValue()" [color]="colorValue()"></div><ng-content></ng-content></div>`,
401
+ template: `<div [class]="stackClasses()"><div [class]="headerClasses()"><div [class]="leftClasses()">@if (hasIcon) {{{ icon }}}<ng-content select="[slot=icon]"></ng-content><div><h3 [attr.id]="titleId" [class]="titleClasses()">@if (hasTitle) {{{ title }}}<ng-content select="[slot=title]"></ng-content></h3>@if (showDescription) {<p #descriptionEl [attr.id]="descriptionId" [class]="descriptionClasses()">@if (hasDescription) {{{ description }}}<ng-content select="[slot=description]"></ng-content></p>}</div></div>@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]"></ng-content></span>}</div><div mol-progress-bar [value]="value" [max]="maxValue()" [color]="colorValue()" [labelledBy]="titleId" [describedBy]="describedById ?? undefined"></div><ng-content></ng-content></div>`,
356
402
  })
357
403
  export class ProgressCard implements AfterViewInit {
358
404
  /** Card title — a string input, or `[slot=title]` projected content. */
@@ -372,6 +418,13 @@ export class ProgressCard implements AfterViewInit {
372
418
  /** Extra classes on the Card wrapper. */
373
419
  className?: string
374
420
 
421
+ /** Per-instance counter backing the title/description ids (React numbers `useId()` ids). */
422
+ private static nextId = 0
423
+ /** The id the bar's `aria-labelledby` points at (on the title heading). */
424
+ readonly titleId = `mol-progress-card-title-${ProgressCard.nextId++}`
425
+ /** The id the bar's `aria-describedby` points at (on the description paragraph). */
426
+ readonly descriptionId = `mol-progress-card-description-${ProgressCard.nextId++}`
427
+
375
428
  /** The optional description paragraph (projected content lands here; read once). */
376
429
  @ViewChild('descriptionEl') private descriptionEl?: ElementRef<HTMLParagraphElement>
377
430
  /** The optional value-label span (projected content lands here; read once). */
@@ -460,6 +513,15 @@ export class ProgressCard implements AfterViewInit {
460
513
  return this.hasValueLabel || this.valueLabelProjected()
461
514
  }
462
515
 
516
+ /**
517
+ * The bar's `aria-describedby`: the description paragraph's id while the
518
+ * paragraph renders (React passes it only when a description is present).
519
+ * @returns The described-by id, or `null` (React omits the attribute).
520
+ */
521
+ get describedById(): string | null {
522
+ return this.showDescription ? this.descriptionId : null
523
+ }
524
+
463
525
  /**
464
526
  * The maximum (React's default parameter: a later-bound write of `undefined`
465
527
  * must not erase the `100` default).
@@ -560,8 +622,15 @@ Peer dependencies:
560
622
  - `@molecule/app-ui`
561
623
  - `@molecule/app-ui-angular`
562
624
 
563
- All text (`label`, `valueLabel`, `title`, `description`) is pass-through —
564
- supply already-translated strings; the package renders no text of its own.
565
- Requires a wired ClassMap bond: the track/fill styles come from the
625
+ All visible text (`label`, `valueLabel`, `title`, `description`) is
626
+ pass-through — supply already-translated strings. The track's fallback
627
+ accessible name resolves through `t('progressBar.label', undefined,
628
+ { defaultValue: 'Progress' })` (read through `useTranslation()`, so it
629
+ follows a locale switch); a rendered `label` or a `labelledBy` id names it
630
+ instead. Requires a wired ClassMap bond: the track/fill styles come from the
566
631
  `progress*` ClassMap tokens, so colors follow the active theme. Node props
567
632
  are projected content (`[slot=<name>]`) or plain string inputs.
633
+
634
+ ## Translations
635
+
636
+ Translation strings are provided by `@molecule/app-locales-progress-bar`.
package/dist/index.d.ts CHANGED
@@ -31,9 +31,12 @@
31
31
  * ```
32
32
  *
33
33
  * @remarks
34
- * All text (`label`, `valueLabel`, `title`, `description`) is pass-through —
35
- * supply already-translated strings; the package renders no text of its own.
36
- * Requires a wired ClassMap bond: the track/fill styles come from the
34
+ * All visible text (`label`, `valueLabel`, `title`, `description`) is
35
+ * pass-through — supply already-translated strings. The track's fallback
36
+ * accessible name resolves through `t('progressBar.label', undefined,
37
+ * { defaultValue: 'Progress' })` (read through `useTranslation()`, so it
38
+ * follows a locale switch); a rendered `label` or a `labelledBy` id names it
39
+ * instead. Requires a wired ClassMap bond: the track/fill styles come from the
37
40
  * `progress*` ClassMap tokens, so colors follow the active theme. Node props
38
41
  * are projected content (`[slot=<name>]`) or plain string inputs.
39
42
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -31,9 +31,12 @@
31
31
  * ```
32
32
  *
33
33
  * @remarks
34
- * All text (`label`, `valueLabel`, `title`, `description`) is pass-through —
35
- * supply already-translated strings; the package renders no text of its own.
36
- * Requires a wired ClassMap bond: the track/fill styles come from the
34
+ * All visible text (`label`, `valueLabel`, `title`, `description`) is
35
+ * pass-through — supply already-translated strings. The track's fallback
36
+ * accessible name resolves through `t('progressBar.label', undefined,
37
+ * { defaultValue: 'Progress' })` (read through `useTranslation()`, so it
38
+ * follows a locale switch); a rendered `label` or a `labelledBy` id names it
39
+ * instead. Requires a wired ClassMap bond: the track/fill styles come from the
37
40
  * `progress*` ClassMap tokens, so colors follow the active theme. Node props
38
41
  * are projected content (`[slot=<name>]`) or plain string inputs.
39
42
  *
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,YAAY,CAAA"}
@@ -16,6 +16,11 @@ import * as i0 from "@angular/core";
16
16
  * matching React's root exactly. Node props (`label`, `valueLabel`) are
17
17
  * projected content (`[slot=<name>]`) or plain string inputs.
18
18
  *
19
+ * The track always carries an accessible name (`aria-progressbar-name`):
20
+ * `labelledBy` when given, else the rendered `label`, else
21
+ * `t('progressBar.label', undefined, { defaultValue: 'Progress' })`, read
22
+ * through `useTranslation()` so it follows a locale switch.
23
+ *
19
24
  * This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
20
25
  * same props (React names), the same ClassMap tokens, and the same DOM for the
21
26
  * same input.
@@ -35,12 +40,22 @@ export declare class ProgressBar implements AfterViewInit {
35
40
  label?: ProgressBarProps['label'];
36
41
  /** Optional value display on the right of the label row — a string input, or `[slot=valueLabel]` content. */
37
42
  valueLabel?: ProgressBarProps['valueLabel'];
43
+ /** Element id the track is named by — wins over `label` and the default name. */
44
+ labelledBy?: string;
45
+ /** Element id the track is described by (`aria-describedby`). */
46
+ describedBy?: string;
38
47
  /** Size preset — maps to ClassMap `progressHeight` (defaults to `'md'`). */
39
48
  size?: 'sm' | 'md' | 'lg';
40
49
  /** Color variant — maps to ClassMap `progressColor` (defaults to `'primary'`). */
41
50
  color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
42
51
  /** Extra classes on the outer wrapper. */
43
52
  className?: string;
53
+ /** Per-instance counter backing {@link ProgressBar.labelId} (React numbers `useId()` ids). */
54
+ private static nextId;
55
+ /** The id the track's `aria-labelledby` points at when the rendered label names it. */
56
+ readonly labelId: string;
57
+ /** The i18n handle (locale-reactive), read in an injection context. */
58
+ private readonly i18n;
44
59
  /** The optional label span (projected content lands here; read once). */
45
60
  private labelEl?;
46
61
  /** The optional value-label span (projected content lands here; read once). */
@@ -85,6 +100,25 @@ export declare class ProgressBar implements AfterViewInit {
85
100
  * @returns True when the header row shows.
86
101
  */
87
102
  get showHeader(): boolean;
103
+ /**
104
+ * Whether the rendered label is the track's name (React names the track with
105
+ * the `label` unless an explicit `labelledBy` wins).
106
+ * @returns True when the label span carries the track's `aria-labelledby` id.
107
+ */
108
+ get nameByLabel(): boolean;
109
+ /**
110
+ * The track's `aria-labelledby`: the `labelledBy` input when given, else the
111
+ * rendered label's id, else `null` (React omits the attribute).
112
+ * @returns The labelled-by id, or `null`.
113
+ */
114
+ get trackLabelledBy(): string | null;
115
+ /**
116
+ * The track's `aria-label`: the `t('progressBar.label')` default when no
117
+ * `labelledBy` input and no rendered label names it, else `null` (React
118
+ * omits the attribute).
119
+ * @returns The fallback name, or `null`.
120
+ */
121
+ get trackAriaLabel(): string | null;
88
122
  /**
89
123
  * The maximum width (React's default parameter: a later-bound write of
90
124
  * `undefined` must not erase the `100` default).
@@ -142,6 +176,6 @@ export declare class ProgressBar implements AfterViewInit {
142
176
  */
143
177
  fillClasses(): string;
144
178
  static ɵfac: i0.ɵɵFactoryDeclaration<ProgressBar, never>;
145
- static ɵcmp: i0.ɵɵComponentDeclaration<ProgressBar, "div[mol-progress-bar]", never, { "value": { "alias": "value"; "required": false; }; "max": { "alias": "max"; "required": false; }; "label": { "alias": "label"; "required": false; }; "valueLabel": { "alias": "valueLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=label]", "[slot=valueLabel]"], true, never>;
179
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgressBar, "div[mol-progress-bar]", never, { "value": { "alias": "value"; "required": false; }; "max": { "alias": "max"; "required": false; }; "label": { "alias": "label"; "required": false; }; "valueLabel": { "alias": "valueLabel"; "required": false; }; "labelledBy": { "alias": "labelledBy"; "required": false; }; "describedBy": { "alias": "describedBy"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[slot=label]", "[slot=valueLabel]"], true, never>;
146
180
  }
147
181
  //# sourceMappingURL=progress-bar.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.component.d.ts","sourceRoot":"","sources":["../src/progress-bar.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;;AA2BlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAUa,WAAY,YAAW,aAAa;IAC/C,6BAA6B;IAC7B,KAAK,EAAG,MAAM,CAAA;IACd,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACjC,6GAA6G;IAC7G,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC3C,4EAA4E;IAC5E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,kFAAkF;IAClF,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,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H,eAAe,IAAI,IAAI;IAOvB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;OAIG;IACH,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAEnC;IAED;;;;;OAKG;IACH,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,CAIlC;IAED;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,SAAS,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI;IAI/B;;;OAGG;IACH,UAAU,IAAI,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM;IAIlE;;;OAGG;IACH,WAAW,IAAI,MAAM;IAKrB;;;OAGG;IACH,aAAa,IAAI,MAAM,GAAG,IAAI;IAI9B;;;OAGG;IACH,OAAO,IAAI,MAAM;IAKjB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAKtB;;;OAGG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;;OAGG;IACH,YAAY,IAAI,MAAM;IAKtB;;;OAGG;IACH,WAAW,IAAI,MAAM;yCAxNV,WAAW;2CAAX,WAAW;CA4NvB"}
@@ -1,4 +1,5 @@
1
1
  import { Component, signal, ViewChild } from '@angular/core';
2
+ import { useTranslation } from '@molecule/app-angular';
2
3
  import { getClassMap } from '@molecule/app-ui';
3
4
  import { styleText } from '@molecule/app-ui-angular';
4
5
  import * as i0 from "@angular/core";
@@ -20,6 +21,7 @@ function ProgressBar_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1)
20
21
  } if (rf & 2) {
21
22
  const ctx_r0 = i0.ɵɵnextContext(2);
22
23
  i0.ɵɵclassMap(ctx_r0.labelClasses());
24
+ i0.ɵɵattribute("id", ctx_r0.nameByLabel ? ctx_r0.labelId : null);
23
25
  i0.ɵɵadvance(2);
24
26
  i0.ɵɵconditional(ctx_r0.hasLabel ? 2 : -1);
25
27
  } }
@@ -42,7 +44,7 @@ function ProgressBar_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1)
42
44
  } }
43
45
  function ProgressBar_Conditional_0_Template(rf, ctx) { if (rf & 1) {
44
46
  i0.ɵɵdomElementStart(0, "div");
45
- i0.ɵɵconditionalCreate(1, ProgressBar_Conditional_0_Conditional_1_Template, 4, 3, "span", 2);
47
+ i0.ɵɵconditionalCreate(1, ProgressBar_Conditional_0_Conditional_1_Template, 4, 4, "span", 2);
46
48
  i0.ɵɵconditionalCreate(2, ProgressBar_Conditional_0_Conditional_2_Template, 4, 3, "span", 2);
47
49
  i0.ɵɵdomElementEnd();
48
50
  } if (rf & 2) {
@@ -83,6 +85,11 @@ const hasProjection = (el, ownText) => Array.from(el.childNodes)
83
85
  * matching React's root exactly. Node props (`label`, `valueLabel`) are
84
86
  * projected content (`[slot=<name>]`) or plain string inputs.
85
87
  *
88
+ * The track always carries an accessible name (`aria-progressbar-name`):
89
+ * `labelledBy` when given, else the rendered `label`, else
90
+ * `t('progressBar.label', undefined, { defaultValue: 'Progress' })`, read
91
+ * through `useTranslation()` so it follows a locale switch.
92
+ *
86
93
  * This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
87
94
  * same props (React names), the same ClassMap tokens, and the same DOM for the
88
95
  * same input.
@@ -102,12 +109,22 @@ export class ProgressBar {
102
109
  label;
103
110
  /** Optional value display on the right of the label row — a string input, or `[slot=valueLabel]` content. */
104
111
  valueLabel;
112
+ /** Element id the track is named by — wins over `label` and the default name. */
113
+ labelledBy;
114
+ /** Element id the track is described by (`aria-describedby`). */
115
+ describedBy;
105
116
  /** Size preset — maps to ClassMap `progressHeight` (defaults to `'md'`). */
106
117
  size;
107
118
  /** Color variant — maps to ClassMap `progressColor` (defaults to `'primary'`). */
108
119
  color;
109
120
  /** Extra classes on the outer wrapper. */
110
121
  className;
122
+ /** Per-instance counter backing {@link ProgressBar.labelId} (React numbers `useId()` ids). */
123
+ static nextId = 0;
124
+ /** The id the track's `aria-labelledby` points at when the rendered label names it. */
125
+ labelId = `mol-progress-bar-name-${ProgressBar.nextId++}`;
126
+ /** The i18n handle (locale-reactive), read in an injection context. */
127
+ i18n = useTranslation();
111
128
  /** The optional label span (projected content lands here; read once). */
112
129
  labelEl;
113
130
  /** The optional value-label span (projected content lands here; read once). */
@@ -173,6 +190,33 @@ export class ProgressBar {
173
190
  get showHeader() {
174
191
  return this.showLabel || this.showValueLabel;
175
192
  }
193
+ /**
194
+ * Whether the rendered label is the track's name (React names the track with
195
+ * the `label` unless an explicit `labelledBy` wins).
196
+ * @returns True when the label span carries the track's `aria-labelledby` id.
197
+ */
198
+ get nameByLabel() {
199
+ return this.labelledBy === undefined && this.showLabel;
200
+ }
201
+ /**
202
+ * The track's `aria-labelledby`: the `labelledBy` input when given, else the
203
+ * rendered label's id, else `null` (React omits the attribute).
204
+ * @returns The labelled-by id, or `null`.
205
+ */
206
+ get trackLabelledBy() {
207
+ return this.labelledBy ?? (this.nameByLabel ? this.labelId : null);
208
+ }
209
+ /**
210
+ * The track's `aria-label`: the `t('progressBar.label')` default when no
211
+ * `labelledBy` input and no rendered label names it, else `null` (React
212
+ * omits the attribute).
213
+ * @returns The fallback name, or `null`.
214
+ */
215
+ get trackAriaLabel() {
216
+ return this.labelledBy === undefined && !this.showLabel
217
+ ? this.i18n.t('progressBar.label', undefined, { defaultValue: 'Progress' })
218
+ : null;
219
+ }
176
220
  /**
177
221
  * The maximum width (React's default parameter: a later-bound write of
178
222
  * `undefined` must not erase the `100` default).
@@ -265,7 +309,7 @@ export class ProgressBar {
265
309
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.valueLabelEl = _t.first);
266
310
  } }, hostVars: 2, hostBindings: function ProgressBar_HostBindings(rf, ctx) { if (rf & 2) {
267
311
  i0.ɵɵclassMap(ctx.classes());
268
- } }, inputs: { value: "value", max: "max", label: "label", valueLabel: "valueLabel", size: "size", color: "color", className: "className" }, ngContentSelectors: _c3, decls: 3, vars: 10, consts: [["labelEl", ""], ["valueLabelEl", ""], [3, "class"], ["role", "progressbar"]], template: function ProgressBar_Template(rf, ctx) { if (rf & 1) {
312
+ } }, inputs: { value: "value", max: "max", label: "label", valueLabel: "valueLabel", labelledBy: "labelledBy", describedBy: "describedBy", size: "size", color: "color", className: "className" }, ngContentSelectors: _c3, decls: 3, vars: 13, consts: [["labelEl", ""], ["valueLabelEl", ""], [3, "class"], ["role", "progressbar"]], template: function ProgressBar_Template(rf, ctx) { if (rf & 1) {
269
313
  i0.ɵɵprojectionDef(_c2);
270
314
  i0.ɵɵconditionalCreate(0, ProgressBar_Conditional_0_Template, 3, 4, "div", 2);
271
315
  i0.ɵɵdomElementStart(1, "div", 3);
@@ -275,7 +319,7 @@ export class ProgressBar {
275
319
  i0.ɵɵconditional(ctx.showHeader ? 0 : -1);
276
320
  i0.ɵɵadvance();
277
321
  i0.ɵɵclassMap(ctx.trackClasses());
278
- i0.ɵɵattribute("aria-valuenow", ctx.value)("aria-valuemin", 0)("aria-valuemax", ctx.maxValue());
322
+ i0.ɵɵattribute("aria-valuenow", ctx.value)("aria-valuemin", 0)("aria-valuemax", ctx.maxValue())("aria-labelledby", ctx.trackLabelledBy)("aria-label", ctx.trackAriaLabel)("aria-describedby", ctx.describedBy);
279
323
  i0.ɵɵadvance();
280
324
  i0.ɵɵstyleMap(ctx.fillStyleText());
281
325
  i0.ɵɵclassMap(ctx.fillClasses());
@@ -286,12 +330,22 @@ export class ProgressBar {
286
330
  args: [{
287
331
  selector: 'div[mol-progress-bar]',
288
332
  standalone: true,
289
- inputs: ['value', 'max', 'label', 'valueLabel', 'size', 'color', 'className'],
333
+ inputs: [
334
+ 'value',
335
+ 'max',
336
+ 'label',
337
+ 'valueLabel',
338
+ 'labelledBy',
339
+ 'describedBy',
340
+ 'size',
341
+ 'color',
342
+ 'className',
343
+ ],
290
344
  host: {
291
345
  '[class]': 'classes()',
292
346
  },
293
347
  // prettier-ignore
294
- template: `@if (showHeader) {<div [class]="headerClasses()">@if (showLabel) {<span #labelEl [class]="labelClasses()">@if (hasLabel) {{{ label }}}<ng-content select="[slot=label]" /></span>}@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]" /></span>}</div>}<div [class]="trackClasses()" role="progressbar" [attr.aria-valuenow]="value" [attr.aria-valuemin]="0" [attr.aria-valuemax]="maxValue()"><div [class]="fillClasses()" [style]="fillStyleText()"></div></div>`,
348
+ template: `@if (showHeader) {<div [class]="headerClasses()">@if (showLabel) {<span #labelEl [attr.id]="nameByLabel ? labelId : null" [class]="labelClasses()">@if (hasLabel) {{{ label }}}<ng-content select="[slot=label]" /></span>}@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]" /></span>}</div>}<div [class]="trackClasses()" role="progressbar" [attr.aria-valuenow]="value" [attr.aria-valuemin]="0" [attr.aria-valuemax]="maxValue()" [attr.aria-labelledby]="trackLabelledBy" [attr.aria-label]="trackAriaLabel" [attr.aria-describedby]="describedBy"><div [class]="fillClasses()" [style]="fillStyleText()"></div></div>`,
295
349
  }]
296
350
  }], null, { labelEl: [{
297
351
  type: ViewChild,
@@ -300,5 +354,5 @@ export class ProgressBar {
300
354
  type: ViewChild,
301
355
  args: ['valueLabelEl']
302
356
  }] }); })();
303
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressBar, { className: "ProgressBar", filePath: "progress-bar.component.ts", lineNumber: 70 }); })();
357
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressBar, { className: "ProgressBar", filePath: "progress-bar.component.ts", lineNumber: 86 }); })();
304
358
  //# sourceMappingURL=progress-bar.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.component.js","sourceRoot":"","sources":["../src/progress-bar.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;;;;;;;IAwDmF,YAAW;;;IAAX,kCAAW;;;IAAnE,wCAAwC;IAAA,+FAAgB;IAAY,kBAAoC;IAAA,oBAAO;;;IAAhG,oCAAwB;IAAC,eAA4B;IAA5B,0CAA4B;;;IAAyI,YAAgB;;;IAAhB,uCAAgB;;;IAAvF,wCAAkD;IAAA,+FAAqB;IAAiB,qBAAyC;IAAA,oBAAO;;;IAApH,yCAA6B;IAAC,eAAsC;IAAtC,+CAAsC;;;IAA9Q,8BAA+B;IAAA,4FAAiB;IAAgH,4FAAsB;IAAyI,oBAAM;;;IAAhU,qCAAyB;IAAC,cAAiI;IAAjI,2CAAiI;IAAA,cAA+J;IAA/J,gDAA+J;;AApD9V;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,CAAC,IAAU,EAAW,EAAE,CAC5C,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;IACnC,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAElF;;;;;;;;GAQG;AACH,MAAM,aAAa,GAAG,CAAC,EAAe,EAAE,OAAgB,EAAW,EAAE,CACnE,KAA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wB;;YAA2P,cAAyB;YAAzB,kCAAyB;YAAjD,gCAAuB;;;iFAExpB,WAAW;cApBvB,SAAS;eAAC;gBACT,QAAQ,EAAE,uBAAuB;gBACjC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE;oBACN,OAAO;oBACP,KAAK;oBACL,OAAO;oBACP,YAAY;oBACZ,YAAY;oBACZ,aAAa;oBACb,MAAM;oBACN,OAAO;oBACP,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,kBAAkB;gBAClB,QAAQ,EAAE,isBAAisB;aAC5sB;;kBA6BE,SAAS;mBAAC,SAAS;;kBAEnB,SAAS;mBAAC,cAAc;;kFA9Bd,WAAW"}
@@ -17,6 +17,9 @@ import * as i0 from "@angular/core";
17
17
  * `children`) are projected content (`[slot=<name>]`, or the default
18
18
  * projection) or plain string inputs.
19
19
  *
20
+ * The bar is named by the title (`aria-labelledby`) and, when a description
21
+ * renders, described by it (`aria-describedby`).
22
+ *
20
23
  * This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
21
24
  * same props (React names), the same ClassMap tokens, and the same DOM for the
22
25
  * same input.
@@ -44,6 +47,12 @@ export declare class ProgressCard implements AfterViewInit {
44
47
  color?: 'primary' | 'success' | 'warning' | 'error' | 'info';
45
48
  /** Extra classes on the Card wrapper. */
46
49
  className?: string;
50
+ /** Per-instance counter backing the title/description ids (React numbers `useId()` ids). */
51
+ private static nextId;
52
+ /** The id the bar's `aria-labelledby` points at (on the title heading). */
53
+ readonly titleId: string;
54
+ /** The id the bar's `aria-describedby` points at (on the description paragraph). */
55
+ readonly descriptionId: string;
47
56
  /** The optional description paragraph (projected content lands here; read once). */
48
57
  private descriptionEl?;
49
58
  /** The optional value-label span (projected content lands here; read once). */
@@ -93,6 +102,12 @@ export declare class ProgressCard implements AfterViewInit {
93
102
  * @returns True when the value label shows.
94
103
  */
95
104
  get showValueLabel(): boolean;
105
+ /**
106
+ * The bar's `aria-describedby`: the description paragraph's id while the
107
+ * paragraph renders (React passes it only when a description is present).
108
+ * @returns The described-by id, or `null` (React omits the attribute).
109
+ */
110
+ get describedById(): string | null;
96
111
  /**
97
112
  * The maximum (React's default parameter: a later-bound write of `undefined`
98
113
  * must not erase the `100` default).
@@ -1 +1 @@
1
- {"version":3,"file":"progress-card.component.d.ts","sourceRoot":"","sources":["../src/progress-card.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;;AA2BnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAWa,YAAa,YAAW,aAAa;IAChD,wEAAwE;IACxE,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAClC,yGAAyG;IACzG,WAAW,CAAC,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAA;IAC9C,oGAAoG;IACpG,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAChC,qBAAqB;IACrB,KAAK,EAAG,MAAM,CAAA;IACd,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iGAAiG;IACjG,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAA;IAC5C,mDAAmD;IACnD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oFAAoF;IACxD,OAAO,CAAC,aAAa,CAAC,CAAkC;IACpF,+EAA+E;IACpD,OAAO,CAAC,YAAY,CAAC,CAA6B;IAE7E,qGAAqG;IACrG,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAe;IACpD,oGAAoG;IACpG,OA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O,CAE5B;IAED;;;;OAIG;IACH,IAAI,aAAa,IAAI,MAAM,GAAG,IAAI,CAEjC;IAED;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,UAAU,IAAI,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM;IAIlE;;;OAGG;IACH,OAAO,IAAI,MAAM;IAKjB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAIrB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAKtB;;;OAGG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;;OAGG;IACH,iBAAiB,IAAI,MAAM;yCAjMhB,YAAY;2CAAZ,YAAY;CAqMxB"}
@@ -32,6 +32,7 @@ function ProgressCard_Conditional_9_Template(rf, ctx) { if (rf & 1) {
32
32
  } if (rf & 2) {
33
33
  const ctx_r0 = i0.ɵɵnextContext();
34
34
  i0.ɵɵclassMap(ctx_r0.descriptionClasses());
35
+ i0.ɵɵattribute("id", ctx_r0.descriptionId);
35
36
  i0.ɵɵadvance(2);
36
37
  i0.ɵɵconditional(ctx_r0.hasDescription ? 2 : -1);
37
38
  } }
@@ -83,6 +84,9 @@ const hasProjection = (el, ownText) => Array.from(el.childNodes)
83
84
  * `children`) are projected content (`[slot=<name>]`, or the default
84
85
  * projection) or plain string inputs.
85
86
  *
87
+ * The bar is named by the title (`aria-labelledby`) and, when a description
88
+ * renders, described by it (`aria-describedby`).
89
+ *
86
90
  * This is the Angular counterpart of `@molecule/app-progress-bar-react`: the
87
91
  * same props (React names), the same ClassMap tokens, and the same DOM for the
88
92
  * same input.
@@ -110,6 +114,12 @@ export class ProgressCard {
110
114
  color;
111
115
  /** Extra classes on the Card wrapper. */
112
116
  className;
117
+ /** Per-instance counter backing the title/description ids (React numbers `useId()` ids). */
118
+ static nextId = 0;
119
+ /** The id the bar's `aria-labelledby` points at (on the title heading). */
120
+ titleId = `mol-progress-card-title-${ProgressCard.nextId++}`;
121
+ /** The id the bar's `aria-describedby` points at (on the description paragraph). */
122
+ descriptionId = `mol-progress-card-description-${ProgressCard.nextId++}`;
113
123
  /** The optional description paragraph (projected content lands here; read once). */
114
124
  descriptionEl;
115
125
  /** The optional value-label span (projected content lands here; read once). */
@@ -188,6 +198,14 @@ export class ProgressCard {
188
198
  get showValueLabel() {
189
199
  return this.hasValueLabel || this.valueLabelProjected();
190
200
  }
201
+ /**
202
+ * The bar's `aria-describedby`: the description paragraph's id while the
203
+ * paragraph renders (React passes it only when a description is present).
204
+ * @returns The described-by id, or `null` (React omits the attribute).
205
+ */
206
+ get describedById() {
207
+ return this.showDescription ? this.descriptionId : null;
208
+ }
191
209
  /**
192
210
  * The maximum (React's default parameter: a later-bound write of `undefined`
193
211
  * must not erase the `100` default).
@@ -264,7 +282,7 @@ export class ProgressCard {
264
282
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.valueLabelEl = _t.first);
265
283
  } }, hostVars: 2, hostBindings: function ProgressCard_HostBindings(rf, ctx) { if (rf & 2) {
266
284
  i0.ɵɵclassMap(ctx.classes());
267
- } }, inputs: { title: "title", description: "description", icon: "icon", value: "value", max: "max", valueLabel: "valueLabel", color: "color", className: "className" }, ngContentSelectors: _c3, decls: 13, vars: 15, consts: [["descriptionEl", ""], ["valueLabelEl", ""], [3, "class"], ["mol-progress-bar", "", 3, "value", "max", "color"]], template: function ProgressCard_Template(rf, ctx) { if (rf & 1) {
285
+ } }, inputs: { title: "title", description: "description", icon: "icon", value: "value", max: "max", valueLabel: "valueLabel", color: "color", className: "className" }, ngContentSelectors: _c3, decls: 13, vars: 18, consts: [["descriptionEl", ""], ["valueLabelEl", ""], [3, "class"], ["mol-progress-bar", "", 3, "value", "max", "color", "labelledBy", "describedBy"]], template: function ProgressCard_Template(rf, ctx) { if (rf & 1) {
268
286
  i0.ɵɵprojectionDef(_c2);
269
287
  i0.ɵɵelementStart(0, "div")(1, "div")(2, "div");
270
288
  i0.ɵɵconditionalCreate(3, ProgressCard_Conditional_3_Template, 1, 1);
@@ -273,7 +291,7 @@ export class ProgressCard {
273
291
  i0.ɵɵconditionalCreate(7, ProgressCard_Conditional_7_Template, 1, 1);
274
292
  i0.ɵɵprojection(8, 1);
275
293
  i0.ɵɵelementEnd();
276
- i0.ɵɵconditionalCreate(9, ProgressCard_Conditional_9_Template, 4, 3, "p", 2);
294
+ i0.ɵɵconditionalCreate(9, ProgressCard_Conditional_9_Template, 4, 4, "p", 2);
277
295
  i0.ɵɵelementEnd()();
278
296
  i0.ɵɵconditionalCreate(10, ProgressCard_Conditional_10_Template, 4, 3, "span", 2);
279
297
  i0.ɵɵelementEnd();
@@ -290,6 +308,7 @@ export class ProgressCard {
290
308
  i0.ɵɵconditional(ctx.hasIcon ? 3 : -1);
291
309
  i0.ɵɵadvance(3);
292
310
  i0.ɵɵclassMap(ctx.titleClasses());
311
+ i0.ɵɵattribute("id", ctx.titleId);
293
312
  i0.ɵɵadvance();
294
313
  i0.ɵɵconditional(ctx.hasTitle ? 7 : -1);
295
314
  i0.ɵɵadvance(2);
@@ -297,7 +316,7 @@ export class ProgressCard {
297
316
  i0.ɵɵadvance();
298
317
  i0.ɵɵconditional(ctx.showValueLabel ? 10 : -1);
299
318
  i0.ɵɵadvance();
300
- i0.ɵɵproperty("value", ctx.value)("max", ctx.maxValue())("color", ctx.colorValue());
319
+ i0.ɵɵproperty("value", ctx.value)("max", ctx.maxValue())("color", ctx.colorValue())("labelledBy", ctx.titleId)("describedBy", ctx.describedById ?? undefined);
301
320
  } }, dependencies: [ProgressBar], encapsulation: 2 });
302
321
  }
303
322
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProgressCard, [{
@@ -311,7 +330,7 @@ export class ProgressCard {
311
330
  '[class]': 'classes()',
312
331
  },
313
332
  // prettier-ignore
314
- template: `<div [class]="stackClasses()"><div [class]="headerClasses()"><div [class]="leftClasses()">@if (hasIcon) {{{ icon }}}<ng-content select="[slot=icon]"></ng-content><div><h3 [class]="titleClasses()">@if (hasTitle) {{{ title }}}<ng-content select="[slot=title]"></ng-content></h3>@if (showDescription) {<p #descriptionEl [class]="descriptionClasses()">@if (hasDescription) {{{ description }}}<ng-content select="[slot=description]"></ng-content></p>}</div></div>@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]"></ng-content></span>}</div><div mol-progress-bar [value]="value" [max]="maxValue()" [color]="colorValue()"></div><ng-content></ng-content></div>`,
333
+ template: `<div [class]="stackClasses()"><div [class]="headerClasses()"><div [class]="leftClasses()">@if (hasIcon) {{{ icon }}}<ng-content select="[slot=icon]"></ng-content><div><h3 [attr.id]="titleId" [class]="titleClasses()">@if (hasTitle) {{{ title }}}<ng-content select="[slot=title]"></ng-content></h3>@if (showDescription) {<p #descriptionEl [attr.id]="descriptionId" [class]="descriptionClasses()">@if (hasDescription) {{{ description }}}<ng-content select="[slot=description]"></ng-content></p>}</div></div>@if (showValueLabel) {<span #valueLabelEl [class]="valueLabelClasses()">@if (hasValueLabel) {{{ valueLabel }}}<ng-content select="[slot=valueLabel]"></ng-content></span>}</div><div mol-progress-bar [value]="value" [max]="maxValue()" [color]="colorValue()" [labelledBy]="titleId" [describedBy]="describedById ?? undefined"></div><ng-content></ng-content></div>`,
315
334
  }]
316
335
  }], null, { descriptionEl: [{
317
336
  type: ViewChild,
@@ -320,5 +339,5 @@ export class ProgressCard {
320
339
  type: ViewChild,
321
340
  args: ['valueLabelEl']
322
341
  }] }); })();
323
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressCard, { className: "ProgressCard", filePath: "progress-card.component.ts", lineNumber: 72 }); })();
342
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProgressCard, { className: "ProgressCard", filePath: "progress-card.component.ts", lineNumber: 75 }); })();
324
343
  //# sourceMappingURL=progress-card.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-card.component.js","sourceRoot":"","sources":["../src/progress-card.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;;;;;;;IAyD6D,YAAU;;;IAAV,iCAAU;;;IAAiG,YAAW;;;IAAX,kCAAW;;;IAAmJ,YAAiB;;;IAAjB,wCAAiB;;;IAAxF,kCAAiD;IAAA,kFAAsB;IAAkB,qBAAqD;IAAA,iBAAI;;;IAAhI,0CAA8B;IAAC,eAAwC;IAAxC,gDAAwC;;;IAAmK,YAAgB;;;IAAhB,uCAAgB;;;IAAvF,qCAAkD;IAAA,mFAAqB;IAAiB,qBAAoD;IAAA,iBAAO;;;IAA/H,yCAA6B;IAAC,eAAsC;IAAtC,+CAAsC;;AAtDrkB;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,CAAC,IAAU,EAAW,EAAE,CAC5C,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;IACnC,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAElF;;;;;;;;GAQG;AACH,MAAM,aAAa,GAAG,CAAC,EAAe,EAAE,OAAgB,EAAW,EAAE,CACnE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC;KACtB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACtB,IAAI,CAAC,aAAa,CAAC,CAAA;AAExB;;;;;;;;;;;;;;;;;;;GAm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AAAnB,AAAhB,iCAAe,uBAAmB,2BAAuB,2BAAuB,+CAA2C;4BAN1zB,WAAW;;iFAQV,YAAY;cAXxB,SAAS;eAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,WAAW,CAAC;gBACtB,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,CAAC;gBAC5F,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,kBAAkB;gBAClB,QAAQ,EAAE,i2BAAi2B;aAC52B;;kBA2BE,SAAS;mBAAC,eAAe;;kBAEzB,SAAS;mBAAC,cAAc;;kFA5Bd,YAAY"}
package/dist/types.d.ts CHANGED
@@ -19,6 +19,13 @@ export interface ProgressBarProps {
19
19
  label?: unknown;
20
20
  /** Optional value display on the right of the label row — a string input, or `[slot=valueLabel]` content. */
21
21
  valueLabel?: unknown;
22
+ /**
23
+ * Element id the track is named by (`aria-labelledby`). Wins over `label`
24
+ * and the default accessible name — `ProgressCard` points it at its title.
25
+ */
26
+ labelledBy?: string;
27
+ /** Element id the track is described by (`aria-describedby`). */
28
+ describedBy?: string;
22
29
  /** Size preset — maps to ClassMap `progressHeight`. */
23
30
  size?: 'sm' | 'md' | 'lg';
24
31
  /** Color variant — maps to ClassMap `progressColor`. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,6GAA6G;IAC7G,UAAU,CAAC,EAAE,OAAO,CAAA;IACp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AAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,wDAAwD;IACxD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yGAAyG;IACzG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oGAAoG;IACpG,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iGAAiG;IACjG,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,yBAAyB;IACzB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-progress-bar-angular",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Angular labeled progress bar with card wrapper",
5
5
  "homepage": "https://www.molecule.dev/packages/app-progress-bar-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.9.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.3.1",
64
64
  "@types/node": "26.6.5",
65
65
  "jsdom": "30.1.3",
66
66
  "rxjs": "7.8.2",