@molecule/app-ui-angular 1.1.2 → 1.2.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.
Files changed (56) hide show
  1. package/README.md +366 -99
  2. package/dist/components/card.component.d.ts +10 -0
  3. package/dist/components/card.component.d.ts.map +1 -1
  4. package/dist/components/card.component.js +27 -7
  5. package/dist/components/card.component.js.map +1 -1
  6. package/dist/components/confirm-dialog.component.d.ts +33 -2
  7. package/dist/components/confirm-dialog.component.d.ts.map +1 -1
  8. package/dist/components/confirm-dialog.component.js +81 -24
  9. package/dist/components/confirm-dialog.component.js.map +1 -1
  10. package/dist/components/dropdown.component.d.ts +2 -1
  11. package/dist/components/dropdown.component.d.ts.map +1 -1
  12. package/dist/components/dropdown.component.js +11 -8
  13. package/dist/components/dropdown.component.js.map +1 -1
  14. package/dist/components/input.component.d.ts.map +1 -1
  15. package/dist/components/input.component.js +11 -2
  16. package/dist/components/input.component.js.map +1 -1
  17. package/dist/components/modal.component.d.ts +16 -9
  18. package/dist/components/modal.component.d.ts.map +1 -1
  19. package/dist/components/modal.component.js +27 -15
  20. package/dist/components/modal.component.js.map +1 -1
  21. package/dist/components/page-header.component.d.ts +11 -0
  22. package/dist/components/page-header.component.d.ts.map +1 -1
  23. package/dist/components/page-header.component.js +25 -10
  24. package/dist/components/page-header.component.js.map +1 -1
  25. package/dist/components/prompt-dialog.component.d.ts +35 -4
  26. package/dist/components/prompt-dialog.component.d.ts.map +1 -1
  27. package/dist/components/prompt-dialog.component.js +63 -9
  28. package/dist/components/prompt-dialog.component.js.map +1 -1
  29. package/dist/components/responsive-app-shell.component.d.ts +3 -7
  30. package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
  31. package/dist/components/responsive-app-shell.component.js +12 -17
  32. package/dist/components/responsive-app-shell.component.js.map +1 -1
  33. package/dist/components/select.component.d.ts +3 -1
  34. package/dist/components/select.component.d.ts.map +1 -1
  35. package/dist/components/select.component.js +11 -2
  36. package/dist/components/select.component.js.map +1 -1
  37. package/dist/components/sidebar-user-card.component.d.ts +10 -0
  38. package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
  39. package/dist/components/sidebar-user-card.component.js +20 -3
  40. package/dist/components/sidebar-user-card.component.js.map +1 -1
  41. package/dist/components/tabs.component.d.ts +10 -0
  42. package/dist/components/tabs.component.d.ts.map +1 -1
  43. package/dist/components/tabs.component.js +19 -7
  44. package/dist/components/tabs.component.js.map +1 -1
  45. package/dist/components/textarea.component.d.ts +8 -1
  46. package/dist/components/textarea.component.d.ts.map +1 -1
  47. package/dist/components/textarea.component.js +18 -3
  48. package/dist/components/textarea.component.js.map +1 -1
  49. package/dist/components/tooltip.component.d.ts.map +1 -1
  50. package/dist/components/tooltip.component.js +3 -2
  51. package/dist/components/tooltip.component.js.map +1 -1
  52. package/dist/utilities/rest-attrs.d.ts +35 -2
  53. package/dist/utilities/rest-attrs.d.ts.map +1 -1
  54. package/dist/utilities/rest-attrs.js +38 -2
  55. package/dist/utilities/rest-attrs.js.map +1 -1
  56. package/package.json +5 -4
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-14T14:59:19.917Z
6
+ Generated: 2026-11-18T09:10:28.567Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-ui-angular
@@ -1696,6 +1696,24 @@ interface ResolvedIcon {
1696
1696
  }
1697
1697
  ```
1698
1698
 
1699
+ #### `ReapplyRestAttributesOptions`
1700
+
1701
+ Options for {@link reapplyRestAttributes}.
1702
+
1703
+ ```typescript
1704
+ interface ReapplyRestAttributesOptions {
1705
+ /**
1706
+ * Move `aria-describedby` too. The default keeps it on the host: a
1707
+ * component that MERGES the host's `aria-describedby` with its own target
1708
+ * (the input/select/textarea family, see below) has already applied it on
1709
+ * an inner binding, and re-moving the re-bound value would erase that
1710
+ * merge. A component that spreads `aria-describedby` straight onto its
1711
+ * `...rest` target (Modal) has no merge to protect, so it opts in.
1712
+ */
1713
+ includeDescribedBy?: boolean
1714
+ }
1715
+ ```
1716
+
1699
1717
  ### Types
1700
1718
 
1701
1719
  #### `Children`
@@ -2862,6 +2880,7 @@ order; rest props (`aria-*`, `data-*`, `id`) land on the host.
2862
2880
  '[attr.data-testid]': 'testId',
2863
2881
  '[attr.role]': 'interactive ? "button" : null',
2864
2882
  '[attr.tabindex]': 'interactive ? 0 : null',
2883
+ '(keydown)': 'handleKeyDown($event)',
2865
2884
  },
2866
2885
  template: `<ng-content></ng-content>`,
2867
2886
  })
@@ -2908,6 +2927,22 @@ export class Card {
2908
2927
  hostStyle(): string | null {
2909
2928
  return styleText(this.style)
2910
2929
  }
2930
+
2931
+ /**
2932
+ * An interactive card is announced as a button and sits in the tab order, so
2933
+ * Enter and Space activate it the way they activate a native button: by
2934
+ * clicking it, which runs the consumer's click handler with a real click
2935
+ * event. Keys pressed in a control inside the card belong to that control,
2936
+ * and a card that is not interactive ignores keys.
2937
+ *
2938
+ * @param event - The key event.
2939
+ */
2940
+ handleKeyDown(event: KeyboardEvent): void {
2941
+ if (!this.interactive || event.target !== event.currentTarget) return
2942
+ if (event.key !== 'Enter' && event.key !== ' ') return
2943
+ event.preventDefault()
2944
+ ;(event.currentTarget as HTMLElement).click()
2945
+ }
2911
2946
  }
2912
2947
  ```
2913
2948
 
@@ -3599,12 +3634,18 @@ React's `Modal` root is a fragment/portal).
3599
3634
  'data-parity-unwrap': '',
3600
3635
  style: 'display: contents',
3601
3636
  },
3602
- template: `<mol-modal [open]="open" (close)="close.emit($event)"
3637
+ template: `<mol-modal
3638
+ [open]="open"
3639
+ (close)="close.emit($event)"
3640
+ [attr.aria-labelledby]="titleId"
3641
+ [attr.aria-describedby]="ariaDescribedBy"
3603
3642
  ><div [class]="cm().stack(3)">
3604
- <h2 [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">
3643
+ <h2 [attr.id]="titleId" [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">
3605
3644
  <ng-content select="[slot=title]"></ng-content>
3606
3645
  </h2>
3607
- <p [class]="cm().textSize('sm')"><ng-content select="[slot=description]"></ng-content></p>
3646
+ <p #descriptionSlot [attr.id]="descriptionId" [class]="cm().textSize('sm')">
3647
+ <ng-content select="[slot=description]"></ng-content>
3648
+ </p>
3608
3649
  <ng-content></ng-content>
3609
3650
  <div [class]="cm().flex({ justify: 'end', gap: 'sm' })">
3610
3651
  <button mol-button [variant]="'ghost'" [disabled]="!!loading" (click)="close.emit($event)">
@@ -3622,7 +3663,32 @@ React's `Modal` root is a fragment/portal).
3622
3663
  </div></mol-modal
3623
3664
  >`,
3624
3665
  })
3625
- export class ConfirmDialog {
3666
+ export class ConfirmDialog implements DoCheck {
3667
+ /**
3668
+ * Per-instance id of the rendered title heading, wired as the dialog's
3669
+ * accessible name: the binding on `<mol-modal>` lands on its host element,
3670
+ * which Modal's rest-attribute move copies onto the dialog `<div>` —
3671
+ * `aria-labelledby` pointing at the visible `<h2>` (WAI-ARIA dialog
3672
+ * pattern; axe `aria-dialog-name`).
3673
+ */
3674
+ readonly titleId = `mol-confirm-dialog-title-${++confirmDialogInstances}`
3675
+
3676
+ /**
3677
+ * Per-instance id of the rendered description paragraph, wired as the
3678
+ * dialog's accessible description through the same rest-attribute move as
3679
+ * the title (only bound when projected description content renders — a
3680
+ * reference to an empty paragraph describes nothing, axe
3681
+ * `aria-dialog-name`/`aria-valid-attr-value`).
3682
+ */
3683
+ readonly descriptionId = nextInstanceId()
3684
+
3685
+ /** The rendered description paragraph (its projected nodes decide the wiring). */
3686
+ // `static: true` resolves the query during creation, so the projected nodes
3687
+ // are readable on the FIRST change-detection pass — a non-static query
3688
+ // resolves after view init, one pass too late for the description wiring.
3689
+ @ViewChild('descriptionSlot', { static: true })
3690
+ descriptionSlot?: ElementRef<HTMLParagraphElement>
3691
+
3626
3692
  /** Whether the dialog is open. */
3627
3693
  open = false
3628
3694
  /** Title (node-valued prop). */
@@ -3658,6 +3724,23 @@ export class ConfirmDialog {
3658
3724
  return getClassMap()
3659
3725
  }
3660
3726
 
3727
+ /**
3728
+ * The dialog's accessible description id, or null when no description
3729
+ * content renders. A FIELD, not a template method call: Angular memoizes a
3730
+ * no-argument method binding, so it would keep the first (pre-view-init)
3731
+ * value forever. Re-read each pass from the projected description nodes.
3732
+ */
3733
+ ariaDescribedBy: string | null = null
3734
+
3735
+ /**
3736
+ * Recomputes {@link ariaDescribedBy} before each view check. The query is
3737
+ * static, so the projected nodes are readable on the first pass already; a
3738
+ * later change to what renders is picked up on the next pass.
3739
+ */
3740
+ ngDoCheck(): void {
3741
+ this.ariaDescribedBy = hasNodes(this.descriptionSlot?.nativeElement) ? this.descriptionId : null
3742
+ }
3743
+
3661
3744
  /**
3662
3745
  * The cancel button's label.
3663
3746
  * @returns The label text.
@@ -3721,6 +3804,7 @@ fragment-like.
3721
3804
  ><div
3722
3805
  [attr.id]="menuId"
3723
3806
  role="menu"
3807
+ tabindex="-1"
3724
3808
  data-state="open"
3725
3809
  [class]="menuClasses()"
3726
3810
  [style]="menuStyleText()"
@@ -3796,7 +3880,7 @@ export class Dropdown implements AfterViewInit, AfterViewChecked, DoCheck, OnDes
3796
3880
  private lastAlign: DropdownAlign = 'start'
3797
3881
  private menuWidth: number | string | undefined
3798
3882
  private removedListeners: (() => void)[] = []
3799
- private lastRoute = ''
3883
+ private lastRoute: string | null = null
3800
3884
  private pendingOpenFocus: 'first' | 'last' = 'first'
3801
3885
  private focusedItemEl: HTMLElement | null = null
3802
3886
  private checkedItems: DropdownItem<string>[] | null = null
@@ -3805,8 +3889,9 @@ export class Dropdown implements AfterViewInit, AfterViewChecked, DoCheck, OnDes
3805
3889
  const location = this.router.location()
3806
3890
  const key = `${location.pathname}${location.search}`
3807
3891
  if (key === this.lastRoute) return
3892
+ const mounting = this.lastRoute === null
3808
3893
  this.lastRoute = key
3809
- this.setOpen(false)
3894
+ if (!mounting) this.setOpen(false)
3810
3895
  })
3811
3896
 
3812
3897
  cm(): UIClassMap {
@@ -4945,32 +5030,48 @@ DOM whenever React would render nothing (see {@link SlotWrapper}).
4945
5030
  }`,
4946
5031
  })
4947
5032
  export class Input implements DoCheck {
5033
+ /** Input type. */
4948
5034
  type?: string
5035
+ /** Input size. */
4949
5036
  size?: Size
5037
+ /** Text alignment. */
4950
5038
  align?: 'left' | 'center' | 'right'
5039
+ /** Field label. */
4951
5040
  label?: string
4952
5041
  error?: string
5042
+ /** Hint text (shown without an error). */
4953
5043
  hint?: string
4954
5044
  leftElement?: unknown
4955
5045
  rightElement?: unknown
4956
5046
  clearable?: boolean
5047
+ /** Accessible label of the clear button. */
4957
5048
  clearLabel?: string
4958
5049
  className?: string
4959
5050
  style?: Record<string, unknown>
5051
+ /** `data-testid` for the input. */
4960
5052
  testId?: string
5053
+ /** Disables the input. */
4961
5054
  disabled?: boolean
4962
5055
  required?: boolean
5056
+ /** Controlled value. */
4963
5057
  value?: string | number
5058
+ /** Uncontrolled initial value. */
4964
5059
  defaultValue?: string | number
5060
+ /** Placeholder text. */
4965
5061
  placeholder?: string
5062
+ /** Form field name. */
4966
5063
  name?: string
5064
+ /** Explicit input id. */
4967
5065
  id?: string
4968
5066
 
4969
5067
  @Output() readonly change = new EventEmitter<Event>()
5068
+ /** Fires the clear button's click event. */
4970
5069
  @Output() readonly clear = new EventEmitter<Event>()
4971
5070
 
4972
5071
  @ViewChild('inputEl') inputEl?: ElementRef<HTMLInputElement>
5072
+ /** The left adornment wrapper. */
4973
5073
  @ViewChild('leftSlot') leftSlot?: ElementRef<HTMLDivElement>
5074
+ /** The right adornment wrapper. */
4974
5075
  @ViewChild('rightSlot') rightSlot?: ElementRef<HTMLDivElement>
4975
5076
  @ViewChild('rightInner') rightInner?: ElementRef<HTMLSpanElement>
4976
5077
 
@@ -4986,6 +5087,7 @@ export class Input implements DoCheck {
4986
5087
  private movedRest = false
4987
5088
  private restDescribedBy: string | null = null
4988
5089
 
5090
+ /** The current class map. */
4989
5091
  cm(): UIClassMap {
4990
5092
  return getClassMap()
4991
5093
  }
@@ -5010,6 +5112,7 @@ export class Input implements DoCheck {
5010
5112
  return this.restDescribedBy ?? this.describedBy()
5011
5113
  }
5012
5114
 
5115
+ /** Computes the input class list. */
5013
5116
  classes(): string {
5014
5117
  return this.cm().cn(
5015
5118
  this.cm().input({
@@ -5023,10 +5126,12 @@ export class Input implements DoCheck {
5023
5126
  )
5024
5127
  }
5025
5128
 
5129
+ /** The clear button's accessible label. */
5026
5130
  clearText(): string {
5027
5131
  return this.clearLabel ?? this.i18n.t('ui.input.clear', undefined, { defaultValue: 'Clear' })
5028
5132
  }
5029
5133
 
5134
+ /** The clear button's X glyph. */
5030
5135
  clearIcon(): ResolvedIcon {
5031
5136
  return resolveIcon('x-mark', this.cm().iconSm)
5032
5137
  }
@@ -5048,6 +5153,7 @@ export class Input implements DoCheck {
5048
5153
  }
5049
5154
 
5050
5155
  ngDoCheck(): void {
5156
+ void this.i18n.locale()
5051
5157
  const host = this.host.nativeElement as HTMLElement
5052
5158
  const input = this.inputEl?.nativeElement ?? host.querySelector('input')
5053
5159
  const left =
@@ -5070,9 +5176,10 @@ export class Input implements DoCheck {
5070
5176
  this.sync.sync(right, this.hasRight || clear, this.parentOf(right))
5071
5177
  if (!this.movedRest && input) {
5072
5178
  this.restDescribedBy = host.getAttribute('aria-describedby')
5073
- moveRestAttributes(host, input)
5074
5179
  this.movedRest = true
5180
+ moveRestAttributes(host, input)
5075
5181
  }
5182
+ reapplyRestAttributes(host, input)
5076
5183
  if (this.value !== undefined && input && input.value !== String(this.value))
5077
5184
  input.value = String(this.value)
5078
5185
  }
@@ -5102,7 +5209,7 @@ export class Input implements DoCheck {
5102
5209
  }
5103
5210
  ```
5104
5211
 
5105
- _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/input.component.d.ts`.)_
5212
+ _(Member comments are shortened to their first sentence, and the 34 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/input.component.d.ts`.)_
5106
5213
 
5107
5214
  #### `Label`
5108
5215
 
@@ -5965,6 +6072,7 @@ the topmost dialog only, reference-counted body scroll lock).
5965
6072
  #wrapper
5966
6073
  [class]="cm().dialogWrapper"
5967
6074
  [style]="wrapperStyle()"
6075
+ role="presentation"
5968
6076
  (click)="handleOverlayClick($event)"
5969
6077
  >
5970
6078
  <div
@@ -5976,7 +6084,6 @@ the topmost dialog only, reference-counted body scroll lock).
5976
6084
  [class]="dialogClasses()"
5977
6085
  [style]="dialogStyle()"
5978
6086
  [attr.data-testid]="testId"
5979
- (click)="stopPropagation($event)"
5980
6087
  >
5981
6088
  @if (title) {
5982
6089
  <div [class]="cm().dialogHeader">
@@ -6013,7 +6120,7 @@ the topmost dialog only, reference-counted body scroll lock).
6013
6120
  </div>
6014
6121
  </div>`,
6015
6122
  })
6016
- export class Modal implements AfterViewInit, DoCheck, OnDestroy {
6123
+ export class Modal implements AfterViewInit, AfterViewChecked, DoCheck, OnDestroy {
6017
6124
  open = false
6018
6125
  title?: string
6019
6126
  size: ModalSize = 'md'
@@ -6075,12 +6182,12 @@ export class Modal implements AfterViewInit, DoCheck, OnDestroy {
6075
6182
  return resolveIcon('x-mark', this.cm().iconMd)
6076
6183
  }
6077
6184
 
6078
- stopPropagation(event: MouseEvent): void {
6079
- event.stopPropagation()
6080
- }
6081
-
6082
6185
  handleOverlayClick(event: MouseEvent): void {
6083
- if (this.closeOnOverlayClick && event.target === event.currentTarget) this.requestClose()
6186
+ if (event.target !== event.currentTarget) {
6187
+ event.stopPropagation()
6188
+ return
6189
+ }
6190
+ if (this.closeOnOverlayClick) this.requestClose()
6084
6191
  }
6085
6192
 
6086
6193
  requestClose(): void {
@@ -6127,6 +6234,12 @@ export class Modal implements AfterViewInit, DoCheck, OnDestroy {
6127
6234
  this.syncScrollLock()
6128
6235
  }
6129
6236
 
6237
+ ngAfterViewChecked(): void {
6238
+ reapplyRestAttributes(this.host.nativeElement, this.dialog?.nativeElement, {
6239
+ includeDescribedBy: true,
6240
+ })
6241
+ }
6242
+
6130
6243
  ngOnDestroy(): void {
6131
6244
  this.removeListeners()
6132
6245
  popModalStack(this.stackId)
@@ -6200,18 +6313,7 @@ export class Modal implements AfterViewInit, DoCheck, OnDestroy {
6200
6313
  this.wrapper?.nativeElement.remove()
6201
6314
  this.moved = false
6202
6315
  }
6203
-
6204
- private syncScrollLock(): void {
6205
- const shouldLock = !!this.open && this.preventScroll
6206
- if (shouldLock && !this.locked) {
6207
- this.sync.lock()
6208
- this.locked = true
6209
- } else if (!shouldLock && this.locked) {
6210
- this.sync.unlock()
6211
- this.locked = false
6212
- }
6213
- }
6214
- // … truncated — 3 more members: addListeners, removeListeners, handleKeyDown; the full declaration is in node_modules/@molecule/app-ui-angular/dist/components/modal.component.d.ts
6316
+ // … truncated — 4 more members: syncScrollLock, addListeners, removeListeners, handleKeyDown; the full declaration is in node_modules/@molecule/app-ui-angular/dist/components/modal.component.d.ts
6215
6317
  ```
6216
6318
 
6217
6319
  _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/modal.component.d.ts`.)_
@@ -8134,7 +8236,7 @@ from the DOM — the projected nodes need an always-mounted capture point.
8134
8236
  '[attr.data-mol-id]': 'automationId',
8135
8237
  },
8136
8238
  template: `@if (breadcrumbs && breadcrumbs.length > 0) {
8137
- <nav [class]="cm().pageHeaderBreadcrumbs" aria-label="Breadcrumb">
8239
+ <nav [class]="cm().pageHeaderBreadcrumbs" [attr.aria-label]="breadcrumbLabel()">
8138
8240
  @for (crumb of breadcrumbs; track $index) {
8139
8241
  @if ($index > 0) {
8140
8242
  <span [class]="cm().pageHeaderBreadcrumbSeparator" aria-hidden="true">/</span>
@@ -8178,6 +8280,13 @@ export class PageHeader implements AfterViewInit, DoCheck {
8178
8280
  /** The actions wrapper (always in the template; detached when unused). */
8179
8281
  @ViewChild('actionsSlot') actionsSlot?: ElementRef<HTMLDivElement>
8180
8282
 
8283
+ /**
8284
+ * Reactive translation, read in the injection context. Its `t` reads the
8285
+ * locale, so the view re-renders the label on a locale switch (the static `t`
8286
+ * does not).
8287
+ */
8288
+ private readonly i18n = useTranslation()
8289
+
8181
8290
  private readonly sync = new SlotWrapper(inject(ElementRef), inject(Renderer2))
8182
8291
  private hasActions = false
8183
8292
  private actionsParent: HTMLElement | null = null
@@ -8198,6 +8307,14 @@ export class PageHeader implements AfterViewInit, DoCheck {
8198
8307
  return this.cm().cn(this.cm().pageHeader, this.className)
8199
8308
  }
8200
8309
 
8310
+ /**
8311
+ * The breadcrumb nav's accessible label.
8312
+ * @returns The label text.
8313
+ */
8314
+ breadcrumbLabel(): string {
8315
+ return this.i18n.t('ui.pageHeader.breadcrumbs', undefined, { defaultValue: 'Breadcrumb' })
8316
+ }
8317
+
8201
8318
  /**
8202
8319
  * Serializes the inline style.
8203
8320
  * @returns The style attribute text.
@@ -8922,14 +9039,22 @@ keeps it open with the value intact. The host is unwrapped
8922
9039
  'data-parity-unwrap': '',
8923
9040
  style: 'display: contents',
8924
9041
  },
8925
- template: `<mol-modal [open]="open" (close)="onModalClose()"
9042
+ template: `<mol-modal
9043
+ [open]="open"
9044
+ (close)="onModalClose()"
9045
+ [attr.aria-labelledby]="titleId"
9046
+ [attr.aria-describedby]="description ? descriptionId : null"
8926
9047
  ><form (submit)="handleSubmit($event)">
8927
9048
  <div [class]="cm().stack(3)">
8928
- <h2 #titleSlot [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">
9049
+ <h2
9050
+ #titleSlot
9051
+ [attr.id]="titleId"
9052
+ [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))"
9053
+ >
8929
9054
  <ng-content select="[slot=title]"></ng-content>
8930
9055
  </h2>
8931
9056
  @if (description) {
8932
- <p [class]="cm().textSize('sm')">{{ description }}</p>
9057
+ <p [attr.id]="descriptionId" [class]="cm().textSize('sm')">{{ description }}</p>
8933
9058
  }
8934
9059
  <div
8935
9060
  mol-input
@@ -8965,7 +9090,7 @@ keeps it open with the value intact. The host is unwrapped
8965
9090
  </form></mol-modal
8966
9091
  >`,
8967
9092
  })
8968
- export class PromptDialog implements AfterViewInit, DoCheck {
9093
+ export class PromptDialog implements AfterViewInit, AfterViewChecked, DoCheck {
8969
9094
  /** Whether the dialog is open. */
8970
9095
  open = false
8971
9096
  /** Dialog heading (node-valued prop). */
@@ -8976,10 +9101,7 @@ export class PromptDialog implements AfterViewInit, DoCheck {
8976
9101
  placeholder?: string
8977
9102
  /** Value the input starts from every time the dialog opens. */
8978
9103
  initialValue = ''
8979
- /**
8980
- * Called with the entered value on confirm. Resolve to close the dialog;
8981
- * reject or throw to keep it open.
8982
- */
9104
+ /** Called with the entered value on confirm. */
8983
9105
  onSubmit?: (value: string) => void | Promise<void>
8984
9106
  /** Confirm-button label. */
8985
9107
  confirmLabel?: string
@@ -9002,20 +9124,24 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9002
9124
  /** The composed input (its native element receives React's aria-label). */
9003
9125
  @ViewChild(Input) inputComponent?: Input
9004
9126
 
9127
+ /** Per-instance id of the rendered title heading, wired as the dialog's accessible name: the binding on `<mol-modal>` lands on its host element, which Modal's res… */
9128
+ readonly titleId = nextInstanceId()
9129
+
9130
+ /** Per-instance id of the rendered description paragraph, wired as the dialog's accessible description (only bound when a description renders — a reference to not… */
9131
+ readonly descriptionId = nextInstanceId()
9132
+
9005
9133
  /** The current input value. */
9006
9134
  readonly value = signal('')
9007
9135
  /** Whether a submit is in flight. */
9008
9136
  readonly pending = signal(false)
9009
9137
 
9010
- /**
9011
- * Reactive translation, read in the injection context. Its `t` reads the
9012
- * locale, so the view re-renders the text on a locale switch (the static `t`
9013
- * does not).
9014
- */
9138
+ /** Reactive translation, read in the injection context. */
9015
9139
  private readonly i18n = useTranslation()
9016
9140
 
9017
9141
  private lastOpen = false
9018
9142
  private lastInitial = ''
9143
+ /** Whether an open transition is waiting for the after-view input focus. */
9144
+ private pendingInputFocus = false
9019
9145
 
9020
9146
  /**
9021
9147
  * The current class map.
@@ -9041,11 +9167,7 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9041
9167
  return this.confirmLabel ?? this.i18n.t('prompt.confirm', {}, { defaultValue: 'Confirm' })
9042
9168
  }
9043
9169
 
9044
- /**
9045
- * The input's accessible label: React uses the title when it is a plain
9046
- * string, otherwise the placeholder.
9047
- * @returns The label, or null when React would render none.
9048
- */
9170
+ /** The input's accessible label: React uses the title when it is a plain string, otherwise the placeholder. */
9049
9171
  inputLabel(): string | null {
9050
9172
  const title = this.titleSlot?.nativeElement
9051
9173
  if (title) {
@@ -9056,10 +9178,7 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9056
9178
  return this.placeholder ?? null
9057
9179
  }
9058
9180
 
9059
- /**
9060
- * Seeds the value when the dialog opens (React's `[open, initialValue]`
9061
- * effect).
9062
- */
9181
+ /** Seeds the value when the dialog opens (React's `[open, initialValue]` effect). */
9063
9182
  ngAfterViewInit(): void {
9064
9183
  this.applyInputLabel()
9065
9184
  this.lastOpen = !!this.open
@@ -9067,12 +9186,13 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9067
9186
  if (this.open) {
9068
9187
  this.value.set(this.initialValue)
9069
9188
  this.pending.set(false)
9189
+ // The dialog exists to take one string, so opening it puts focus in the
9190
+ // input — after the Modal has focused the dialog's first control.
9191
+ this.pendingInputFocus = true
9070
9192
  }
9071
9193
  }
9072
9194
 
9073
- /**
9074
- * Re-seeds the value on a later open transition (React's effect).
9075
- */
9195
+ /** Re-seeds the value on a later open transition (React's effect). */
9076
9196
  ngDoCheck(): void {
9077
9197
  const open = !!this.open
9078
9198
  this.applyInputLabel()
@@ -9082,10 +9202,26 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9082
9202
  if (open) {
9083
9203
  this.value.set(this.initialValue)
9084
9204
  this.pending.set(false)
9205
+ this.pendingInputFocus = true
9085
9206
  }
9086
9207
  }
9087
9208
  }
9088
9209
 
9210
+ /**
9211
+ * Focuses the input after the view — and the composed `Modal`'s focus move —
9212
+ * has settled (React's `[open]` effect running after the Modal's effects).
9213
+ */
9214
+ ngAfterViewChecked(): void {
9215
+ if (!this.pendingInputFocus) return
9216
+ this.pendingInputFocus = false
9217
+ this.focusInput()
9218
+ }
9219
+
9220
+ /** Moves focus into the dialog's input (the input ends up focused, exactly as React's post-Modal focus effect leaves it). */
9221
+ focusInput(): void {
9222
+ this.inputComponent?.inputEl?.nativeElement.focus()
9223
+ }
9224
+
9089
9225
  /**
9090
9226
  * Applies React's `aria-label` to the inner input (it is a rest prop there,
9091
9227
  * and the view queries it needs resolve only after view init).
@@ -9098,11 +9234,7 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9098
9234
  else input.setAttribute('aria-label', label)
9099
9235
  }
9100
9236
 
9101
- /**
9102
- * Tracks the typed value (React's controlled `onChange`).
9103
- *
9104
- * @param event - The native input event.
9105
- */
9237
+ /** Tracks the typed value (React's controlled `onChange`). */
9106
9238
  onInput(event: Event): void {
9107
9239
  this.value.set((event.target as HTMLInputElement).value)
9108
9240
  }
@@ -9116,12 +9248,7 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9116
9248
  this.close.emit()
9117
9249
  }
9118
9250
 
9119
- /**
9120
- * Submits the entered value: resolve closes and resets; reject keeps the
9121
- * dialog open (React's `handleSubmit`).
9122
- *
9123
- * @param event - The form submit event.
9124
- */
9251
+ /** Submits the entered value: resolve closes and resets; reject keeps the dialog open (React's `handleSubmit`). */
9125
9252
  handleSubmit(event: Event): void {
9126
9253
  event.preventDefault()
9127
9254
  if (this.pending()) return
@@ -9140,6 +9267,8 @@ export class PromptDialog implements AfterViewInit, DoCheck {
9140
9267
  }
9141
9268
  ```
9142
9269
 
9270
+ _(The 10 longest member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/prompt-dialog.component.d.ts`.)_
9271
+
9143
9272
  #### `RadioGroup`
9144
9273
 
9145
9274
  RadioGroup component.
@@ -9808,6 +9937,7 @@ backdrop, portaled into `document.body`.
9808
9937
  #wrapper
9809
9938
  [class]="cm().cn(cm().position('fixed'), cm().inset0)"
9810
9939
  [style]="wrapperStyle()"
9940
+ role="presentation"
9811
9941
  (click)="handleBackdropClick($event)"
9812
9942
  >
9813
9943
  <div
@@ -9821,7 +9951,6 @@ backdrop, portaled into `document.body`.
9821
9951
  [style]="panelStyle()"
9822
9952
  [attr.data-mol-id]="dataMolId"
9823
9953
  [attr.data-testid]="testId"
9824
- (click)="stopPropagation($event)"
9825
9954
  >
9826
9955
  <div
9827
9956
  #headerRow
@@ -9958,12 +10087,12 @@ export class ResponsiveAppShellDrawer implements AfterViewInit, DoCheck, OnDestr
9958
10087
  return resolveIcon('x-mark', this.cm().iconMd)
9959
10088
  }
9960
10089
 
9961
- stopPropagation(event: MouseEvent): void {
9962
- event.stopPropagation()
9963
- }
9964
-
9965
10090
  handleBackdropClick(event: MouseEvent): void {
9966
- if (event.target === event.currentTarget) this.shell().closeDrawer()
10091
+ if (event.target !== event.currentTarget) {
10092
+ event.stopPropagation()
10093
+ return
10094
+ }
10095
+ this.shell().closeDrawer()
9967
10096
  }
9968
10097
 
9969
10098
  ngAfterViewInit(): void {
@@ -10208,35 +10337,58 @@ controlled-input state restore.
10208
10337
  }`,
10209
10338
  })
10210
10339
  export class Select implements AfterViewInit, AfterViewChecked {
10340
+ /** The options to render. */
10211
10341
  options?: SelectPropsOption[]
10342
+ /** Controlled value. */
10212
10343
  value?: string
10344
+ /** Uncontrolled initial value. */
10213
10345
  defaultValue?: string
10346
+ /** Select size. */
10214
10347
  size?: Size
10348
+ /** Field label. */
10215
10349
  label?: string
10350
+ /** Placeholder option (disabled, empty value). */
10216
10351
  placeholder?: string
10352
+ /** Error message (associates via aria-describedby). */
10217
10353
  error?: string
10354
+ /** Hint text (shown without an error). */
10218
10355
  hint?: string
10356
+ /** Whether a "no selection" option is added (suppressed by a placeholder). */
10219
10357
  clearable?: boolean
10358
+ /** Extra classes joined onto the select classes. */
10220
10359
  className?: string
10360
+ /** Inline style object (React camelCase). */
10221
10361
  style?: Record<string, unknown>
10362
+ /** `data-testid` for the select. */
10222
10363
  testId?: string
10364
+ /** Disables the select. */
10223
10365
  disabled?: boolean
10366
+ /** Marks the select required (label styling). */
10224
10367
  required?: boolean
10368
+ /** Form field name. */
10225
10369
  name?: string
10370
+ /** Explicit select id. */
10226
10371
  id?: string
10227
10372
 
10373
+ /** Fires the raw `change` event (React's onChange). */
10228
10374
  @Output() readonly change = new EventEmitter<Event>()
10375
+ /** Fires the selected option's value. */
10229
10376
  @Output() readonly valueChange = new EventEmitter<string>()
10230
10377
 
10378
+ /** The native select (React's `...rest` spread target). */
10231
10379
  @ViewChild('selectEl') selectEl?: ElementRef<HTMLSelectElement>
10232
10380
 
10233
10381
  private readonly host = inject(ElementRef)
10234
10382
 
10383
+ /** Reactive translation, read in the injection context. */
10235
10384
  private readonly i18n = useTranslation()
10236
10385
 
10386
+ /** The `aria-describedby` the caller spread onto the host (React's rest). */
10237
10387
  private restDescribedBy: string | null = null
10388
+ /** Whether the rest-describedby value was captured. */
10238
10389
  private restDescribedByCaptured = false
10239
10390
 
10391
+ /** The current class map. */
10240
10392
  cm(): UIClassMap {
10241
10393
  return getClassMap()
10242
10394
  }
@@ -10245,11 +10397,13 @@ export class Select implements AfterViewInit, AfterViewChecked {
10245
10397
  return this.id || this.fieldContext()?.id || this.name || 'r0'
10246
10398
  }
10247
10399
 
10400
+ /** The aria-describedby target (error or hint paragraph). */
10248
10401
  describedBy(): string | null {
10249
10402
  if (this.error) return `${this.selectId()}-error`
10250
10403
  if (this.hint) return `${this.selectId()}-hint`
10251
10404
  return null
10252
10405
  }
10406
+ /** The nearest enclosing `FormField` context (React's cloned props). */
10253
10407
  fieldContext(): FormFieldContext | null {
10254
10408
  return fieldContext(this.host.nativeElement as HTMLElement)
10255
10409
  }
@@ -10260,6 +10414,7 @@ export class Select implements AfterViewInit, AfterViewChecked {
10260
10414
  return this.restDescribedBy ?? this.describedBy()
10261
10415
  }
10262
10416
 
10417
+ /** Computes the select class list. */
10263
10418
  classes(): string {
10264
10419
  return this.cm().cn(
10265
10420
  this.cm().select({ error: !!this.error, size: this.size ?? 'md' }),
@@ -10269,10 +10424,12 @@ export class Select implements AfterViewInit, AfterViewChecked {
10269
10424
  )
10270
10425
  }
10271
10426
 
10427
+ /** The clear option's label. */
10272
10428
  clearText(): string {
10273
10429
  return this.i18n.t('ui.select.clear', undefined, { defaultValue: '--' })
10274
10430
  }
10275
10431
 
10432
+ /** The chevron glyph, classed like React's inline icon. */
10276
10433
  chevron(): ResolvedIcon {
10277
10434
  return resolveIcon('chevron-down', this.cm().cn(this.cm().iconSm, this.cm().textMuted))
10278
10435
  }
@@ -10288,6 +10445,7 @@ export class Select implements AfterViewInit, AfterViewChecked {
10288
10445
  return [...acc.entries()].map(([group, options]) => ({ group, options }))
10289
10446
  }
10290
10447
 
10448
+ /** Serializes the inline style for the select. */
10291
10449
  hostStyle(): string | null {
10292
10450
  return styleText(this.style)
10293
10451
  }
@@ -10309,6 +10467,13 @@ export class Select implements AfterViewInit, AfterViewChecked {
10309
10467
  }
10310
10468
 
10311
10469
  ngAfterViewChecked(): void {
10470
+ // Registering this view against the locale: a switch marks it for check,
10471
+ // so this hook runs and the reapply below moves the caller's re-bound
10472
+ // rest attribute onto the select. Without the read, zoneless change
10473
+ // detection never re-checks this view — the parent's re-bound
10474
+ // `[attr.aria-label]` would land on the host and stay there.
10475
+ void this.i18n.locale()
10476
+ reapplyRestAttributes(this.host.nativeElement, this.selectEl?.nativeElement)
10312
10477
  this.applyValue(false)
10313
10478
  }
10314
10479
 
@@ -10335,7 +10500,7 @@ export class Select implements AfterViewInit, AfterViewChecked {
10335
10500
  }
10336
10501
  ```
10337
10502
 
10338
- _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/select.component.d.ts`.)_
10503
+ _(Member comments are shortened to their first sentence, and the 7 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/select.component.d.ts`.)_
10339
10504
 
10340
10505
  #### `Separator`
10341
10506
 
@@ -10445,7 +10610,11 @@ matching props override it.
10445
10610
  <span [class]="secondaryClasses()">{{ secondary }}</span>
10446
10611
  }
10447
10612
  </span></button
10448
- ><mol-modal [open]="isOpen()" (close)="isOpen.set(false)" [className]="cm().drawer"
10613
+ ><mol-modal
10614
+ [open]="isOpen()"
10615
+ (close)="isOpen.set(false)"
10616
+ [className]="cm().drawer"
10617
+ [attr.aria-label]="drawerLabel()"
10449
10618
  ><mol-panel-close-provider [close]="closePanel"
10450
10619
  ><ng-content></ng-content></mol-panel-close-provider
10451
10620
  ></mol-modal>`,
@@ -10511,6 +10680,19 @@ export class SidebarUserCard implements AfterViewInit, OnDestroy {
10511
10680
  )
10512
10681
  }
10513
10682
 
10683
+ /**
10684
+ * The drawer's accessible label. The drawer is a title-less Modal (its
10685
+ * panel content carries its own headings), so it is named with the
10686
+ * localized `sidebarUserCard.drawer` label: the binding on `<mol-modal>`
10687
+ * lands on its host element, which Modal's rest-attribute move copies onto
10688
+ * the dialog `<div>` — screen readers announce "Account" instead of an
10689
+ * unnamed dialog (axe `aria-dialog-name`).
10690
+ * @returns The label text.
10691
+ */
10692
+ drawerLabel(): string {
10693
+ return this.i18n.t('sidebarUserCard.drawer', {}, { defaultValue: 'Account' })
10694
+ }
10695
+
10514
10696
  /**
10515
10697
  * The resolved display name (React's fallback chain).
10516
10698
  * @returns The name.
@@ -11368,7 +11550,7 @@ node value.
11368
11550
  '[style]': 'hostStyle()',
11369
11551
  '[attr.data-testid]': 'testId',
11370
11552
  },
11371
- template: `<div [class]="listClasses()" role="tablist" (keydown)="handleKeyDown($event)">
11553
+ template: `<div [class]="listClasses()" role="tablist">
11372
11554
  @for (item of items; track item.value) {
11373
11555
  <button
11374
11556
  #tabBtn
@@ -11376,11 +11558,12 @@ node value.
11376
11558
  type="button"
11377
11559
  role="tab"
11378
11560
  [attr.aria-selected]="item.value === activeValue() ? 'true' : 'false'"
11379
- [attr.aria-controls]="panelId(item.value)"
11561
+ [attr.aria-controls]="controlsId(item)"
11380
11562
  [attr.data-state]="item.value === activeValue() ? 'active' : 'inactive'"
11381
11563
  [attr.tabindex]="item.value === activeValue() ? 0 : -1"
11382
11564
  [disabled]="!!item.disabled"
11383
11565
  (click)="selectTab(item.value)"
11566
+ (keydown)="handleKeyDown($event)"
11384
11567
  [class]="triggerClasses()"
11385
11568
  >
11386
11569
  @if (item.icon) {
@@ -11471,11 +11654,7 @@ export class Tabs implements OnInit {
11471
11654
  return this.internalValue()
11472
11655
  }
11473
11656
 
11474
- /**
11475
- * The tab button id for a value.
11476
- * @param value - The tab value.
11477
- * @returns The id.
11478
- */
11657
+ /** The tab button id for a value. */
11479
11658
  tabId(value: string): string {
11480
11659
  return `${this.idBase}-tab-${value}`
11481
11660
  }
@@ -11489,6 +11668,11 @@ export class Tabs implements OnInit {
11489
11668
  return `${this.idBase}-tabpanel-${value}`
11490
11669
  }
11491
11670
 
11671
+ /** The `aria-controls` value for one tab, or null: only the tab whose panel is actually rendered (the active one, when its item has content) may name it — an `ari… */
11672
+ controlsId(item: TabItem<string>): string | null {
11673
+ return item.value === this.activeValue() && !!item.content ? this.panelId(item.value) : null
11674
+ }
11675
+
11492
11676
  /**
11493
11677
  * The tab-list class list.
11494
11678
  * @returns The class string.
@@ -11527,22 +11711,12 @@ export class Tabs implements OnInit {
11527
11711
  return styleText(this.style)
11528
11712
  }
11529
11713
 
11530
- /**
11531
- * Narrows a node-valued prop to a TemplateRef.
11532
- *
11533
- * @param value - The prop value.
11534
- * @returns The template, or null.
11535
- */
11714
+ /** Narrows a node-valued prop to a TemplateRef. */
11536
11715
  asTemplate(value: unknown): TemplateRef<unknown> | null {
11537
11716
  return value instanceof TemplateRef ? value : null
11538
11717
  }
11539
11718
 
11540
- /**
11541
- * A plain-string node value's text.
11542
- *
11543
- * @param value - The prop value.
11544
- * @returns The text, or empty.
11545
- */
11719
+ /** A plain-string node value's text. */
11546
11720
  nodeText(value: unknown): string {
11547
11721
  return typeof value === 'string' ? value : ''
11548
11722
  }
@@ -11626,6 +11800,8 @@ export class Tabs implements OnInit {
11626
11800
  }
11627
11801
  ```
11628
11802
 
11803
+ _(The 4 longest member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/tabs.component.d.ts`.)_
11804
+
11629
11805
  #### `Textarea`
11630
11806
 
11631
11807
  Textarea component.
@@ -11738,6 +11914,10 @@ export class Textarea implements AfterViewInit, AfterViewChecked {
11738
11914
  @ViewChild('textareaEl') textareaEl?: ElementRef<HTMLTextAreaElement>
11739
11915
 
11740
11916
  private readonly host = inject(ElementRef)
11917
+
11918
+ /** Reactive translation, read in the injection context. */
11919
+ private readonly i18n = useTranslation()
11920
+
11741
11921
  /** The `aria-describedby` the caller spread onto the host (React's rest). */
11742
11922
  private restDescribedBy: string | null = null
11743
11923
  /** Whether the rest-describedby value was captured. */
@@ -11753,7 +11933,10 @@ export class Textarea implements AfterViewInit, AfterViewChecked {
11753
11933
  return this.id || this.fieldContext()?.id || this.name || 'r0'
11754
11934
  }
11755
11935
 
11756
- /** The aria-describedby target (error or hint paragraph). */
11936
+ /**
11937
+ * The aria-describedby target (error or hint paragraph).
11938
+ * @returns The id or null.
11939
+ */
11757
11940
  describedBy(): string | null {
11758
11941
  if (this.error) return `${this.textareaId()}-error`
11759
11942
  if (this.hint) return `${this.textareaId()}-hint`
@@ -11824,6 +12007,13 @@ export class Textarea implements AfterViewInit, AfterViewChecked {
11824
12007
 
11825
12008
  /** Re-applies a controlled value and recomputes the autoResize height after every check (React re-runs the value effect whenever `value` changes; running here cov… */
11826
12009
  ngAfterViewChecked(): void {
12010
+ // Registering this view against the locale: a switch marks it for check,
12011
+ // so this hook runs and the reapply below moves the caller's re-bound
12012
+ // rest attribute onto the textarea. Without the read, zoneless change
12013
+ // detection never re-checks this view — the parent's re-bound
12014
+ // `[attr.aria-label]` would land on the host and stay there.
12015
+ void this.i18n.locale()
12016
+ reapplyRestAttributes(this.host.nativeElement, this.textareaEl?.nativeElement)
11827
12017
  this.applyValue(false)
11828
12018
  this.resize()
11829
12019
  }
@@ -11842,7 +12032,7 @@ export class Textarea implements AfterViewInit, AfterViewChecked {
11842
12032
  }
11843
12033
  ```
11844
12034
 
11845
- _(Member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/textarea.component.d.ts`.)_
12035
+ _(The 13 longest member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/textarea.component.d.ts`.)_
11846
12036
 
11847
12037
  #### `ThemeToggle`
11848
12038
 
@@ -12007,26 +12197,37 @@ with the remaining time; the announced role follows `status`
12007
12197
  }`,
12008
12198
  })
12009
12199
  export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12200
+ /** The toast title. */
12010
12201
  title?: string
12011
12202
  description?: unknown
12203
+ /** The toast status. */
12012
12204
  status: ColorVariant = 'info'
12205
+ /** Auto-dismiss delay in ms (`0` keeps it until dismissed). */
12013
12206
  duration = 5000
12207
+ /** Whether the close button renders. */
12014
12208
  dismissible = true
12209
+ /** The close button's accessible label. */
12015
12210
  closeLabel?: string
12211
+ /** Extra classes. */
12016
12212
  className?: string
12213
+ /** Inline style object (React camelCase). */
12017
12214
  style?: Record<string, unknown>
12215
+ /** `data-testid`. */
12018
12216
  testId?: string
12019
12217
  position?: ToastPosition
12020
12218
 
12021
12219
  @Output() readonly dismiss = new EventEmitter<void>()
12022
12220
 
12023
12221
  @ViewChild('descriptionSlot') descriptionSlot?: ElementRef<HTMLDivElement>
12222
+ /** The children capture point. */
12024
12223
  @ViewChild('childrenSlot') childrenSlot?: ElementRef<HTMLSpanElement>
12025
12224
 
12225
+ /** Whether the toast is still rendered (React's `isVisible`). */
12026
12226
  readonly visible = signal(true)
12027
12227
 
12028
12228
  private readonly el = inject(ElementRef)
12029
12229
 
12230
+ /** Reactive translation, read in the injection context. */
12030
12231
  private readonly i18n = useTranslation()
12031
12232
 
12032
12233
  private readonly renderer = inject(Renderer2)
@@ -12048,18 +12249,22 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12048
12249
  this.lastDuration = this.duration
12049
12250
  }
12050
12251
 
12252
+ /** The current class map. */
12051
12253
  cm(): UIClassMap {
12052
12254
  return getClassMap()
12053
12255
  }
12054
12256
 
12257
+ /** The mapped class-map variant. */
12055
12258
  variant(): 'default' | 'success' | 'warning' | 'error' | 'info' {
12056
12259
  return STATUS_VARIANT[this.status] || 'default'
12057
12260
  }
12058
12261
 
12262
+ /** The toast class list. */
12059
12263
  classes(): string {
12060
12264
  return this.cm().cn(this.cm().toast({ variant: this.variant() }), this.className)
12061
12265
  }
12062
12266
 
12267
+ /** Serializes the inline style. */
12063
12268
  hostStyle(): string | null {
12064
12269
  return styleText(this.style)
12065
12270
  }
@@ -12068,23 +12273,28 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12068
12273
  return this.variant() === 'warning' || this.variant() === 'error' ? 'alert' : 'status'
12069
12274
  }
12070
12275
 
12276
+ /** The status glyph, when the variant has one. */
12071
12277
  statusIcon(): ResolvedIcon | null {
12072
12278
  const name = STATUS_ICON[this.variant()]
12073
12279
  return name ? resolveIcon(name, this.cm().iconMd) : null
12074
12280
  }
12075
12281
 
12282
+ /** The close button's X glyph. */
12076
12283
  closeIcon(): ResolvedIcon {
12077
12284
  return resolveIcon('x-mark', this.cm().iconSm)
12078
12285
  }
12079
12286
 
12287
+ /** The string description, when the description is a string. */
12080
12288
  descriptionText(): string | null {
12081
12289
  return typeof this.description === 'string' ? this.description : null
12082
12290
  }
12083
12291
 
12292
+ /** The description as a template, when it is a node value. */
12084
12293
  descriptionTemplate(): TemplateRef<unknown> | null {
12085
12294
  return this.description instanceof TemplateRef ? this.description : null
12086
12295
  }
12087
12296
 
12297
+ /** The close button's accessible label. */
12088
12298
  closeText(): string {
12089
12299
  return this.closeLabel ?? this.i18n.t('ui.toast.close', undefined, { defaultValue: 'Close' })
12090
12300
  }
@@ -12113,6 +12323,7 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12113
12323
  this.restart()
12114
12324
  }
12115
12325
 
12326
+ /** Re-reconciles children visibility on later passes. */
12116
12327
  ngDoCheck(): void {
12117
12328
  if (this.duration !== this.lastDuration) {
12118
12329
  this.lastDuration = this.duration
@@ -12122,6 +12333,7 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12122
12333
  this.syncHostVisibility()
12123
12334
  }
12124
12335
 
12336
+ /** Stops the countdown (React's unmount cleanup). */
12125
12337
  ngOnDestroy(): void {
12126
12338
  this.clearTimer()
12127
12339
  this.adoptedChildren = []
@@ -12137,6 +12349,7 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12137
12349
  this.startTimer(this.duration)
12138
12350
  }
12139
12351
 
12352
+ /** Clears the running timer (React's `clearTimer`). */
12140
12353
  private clearTimer(): void {
12141
12354
  if (this.timer) {
12142
12355
  clearTimeout(this.timer)
@@ -12145,6 +12358,7 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12145
12358
  this.startedAt = null
12146
12359
  }
12147
12360
 
12361
+ /** Starts the countdown (React's `startTimer`). */
12148
12362
  private startTimer(ms: number): void {
12149
12363
  this.clearTimer()
12150
12364
  if (ms <= 0) return
@@ -12192,7 +12406,7 @@ export class Toast implements AfterViewInit, DoCheck, OnDestroy {
12192
12406
  }
12193
12407
  ```
12194
12408
 
12195
- _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/toast.component.d.ts`.)_
12409
+ _(Member comments are shortened to their first sentence, and the 15 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/toast.component.d.ts`.)_
12196
12410
 
12197
12411
  #### `ToastContainer`
12198
12412
 
@@ -12400,6 +12614,7 @@ React's module-level `activeTooltips` map.
12400
12614
  template: `<div
12401
12615
  #triggerWrap
12402
12616
  [class]="cm().tooltipTrigger"
12617
+ role="presentation"
12403
12618
  (mouseover)="show()"
12404
12619
  (mouseout)="scheduleHide()"
12405
12620
  (focusin)="handleFocus($event)"
@@ -12428,21 +12643,33 @@ React's module-level `activeTooltips` map.
12428
12643
  </div>`,
12429
12644
  })
12430
12645
  export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12646
+ /** The tooltip content (node-valued prop). */
12431
12647
  content?: unknown
12648
+ /** The tooltip placement (default `top`). */
12432
12649
  placement: TooltipPlacement = 'top'
12650
+ /** Delay before showing, in ms. */
12433
12651
  delay = 0
12652
+ /** Whether the pointer arrow renders. */
12434
12653
  hasArrow = false
12654
+ /** Extra classes for the visible tooltip box. */
12435
12655
  className?: string
12436
12656
  style?: Record<string, unknown>
12657
+ /** `data-testid` for the visible tooltip box. */
12437
12658
  testId?: string
12438
12659
 
12660
+ /** The generated tooltip id (the normalizer renumbers it). */
12439
12661
  readonly tooltipId = nextInstanceId()
12662
+ /** Whether the tooltip is visible. */
12440
12663
  readonly visible = signal(false)
12664
+ /** The current position (React's `{0,0}` initial state). */
12441
12665
  private readonly position = signal<Position>({ top: 0, left: 0 })
12442
12666
 
12667
+ /** The trigger wrapper (adopted beside the host). */
12443
12668
  @ViewChild('triggerWrap') triggerWrap?: ElementRef<HTMLDivElement>
12669
+ /** The children capture point. */
12444
12670
  @ViewChild('childrenCapture') childrenCapture?: ElementRef<HTMLSpanElement>
12445
12671
  @ViewChild('portalWrap') portalWrap?: ElementRef<HTMLDivElement>
12672
+ /** The visible tooltip box (measured for positioning). */
12446
12673
  @ViewChild('contentEl') contentEl?: ElementRef<HTMLDivElement>
12447
12674
 
12448
12675
  private readonly host: ElementRef<HTMLElement> = inject(ElementRef)
@@ -12459,14 +12686,17 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12459
12686
  private associateEl: HTMLElement | null = null
12460
12687
  private hostParent: Node | null = null
12461
12688
 
12689
+ /** The current class map. */
12462
12690
  cm(): UIClassMap {
12463
12691
  return getClassMap()
12464
12692
  }
12465
12693
 
12694
+ /** The visible tooltip box's class list. */
12466
12695
  contentClasses(): string {
12467
12696
  return this.cm().cn(this.cm().tooltipContent, this.className)
12468
12697
  }
12469
12698
 
12699
+ /** Serializes the visible tooltip box's inline style. */
12470
12700
  contentStyleText(): string | null {
12471
12701
  return styleText(this.style)
12472
12702
  }
@@ -12480,6 +12710,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12480
12710
  })
12481
12711
  }
12482
12712
 
12713
+ /** The arrow's inline style. */
12483
12714
  arrowStyleText(): string | null {
12484
12715
  return styleText(arrowStyle(this.placement))
12485
12716
  }
@@ -12503,6 +12734,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12503
12734
  }
12504
12735
  }
12505
12736
 
12737
+ /** Hides the tooltip immediately (React's `hide`). */
12506
12738
  hide(): void {
12507
12739
  clearTimeout(this.showTimer)
12508
12740
  clearTimeout(this.hideTimer)
@@ -12552,6 +12784,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12552
12784
  this.associateEl = elements.length === 1 && !hasText ? (elements[0] as HTMLElement) : null
12553
12785
  capture.remove()
12554
12786
  }
12787
+ // React renders nothing while hidden.
12555
12788
  this.portalWrap?.nativeElement.remove()
12556
12789
  this.attached = false
12557
12790
  this.lastVisible = false
@@ -12574,6 +12807,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12574
12807
  if (this.escapeBound) document.removeEventListener('keydown', this.escapeListener)
12575
12808
  const host = this.host.nativeElement
12576
12809
  const wrap = this.triggerWrap?.nativeElement
12810
+ // removal to succeed.
12577
12811
  if (wrap && wrap.parentElement !== host) host.appendChild(wrap)
12578
12812
  const portal = this.portalWrap?.nativeElement
12579
12813
  if (portal && portal.parentElement !== host) host.appendChild(portal)
@@ -12593,6 +12827,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12593
12827
  }
12594
12828
  }
12595
12829
 
12830
+ /** Detaches the portal and removes the trigger association. */
12596
12831
  private detachPortal(): void {
12597
12832
  this.portalWrap?.nativeElement.remove()
12598
12833
  this.attached = false
@@ -12619,7 +12854,7 @@ export class Tooltip implements AfterViewInit, DoCheck, OnDestroy {
12619
12854
  }
12620
12855
  ```
12621
12856
 
12622
- _(Member comments are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/tooltip.component.d.ts`.)_
12857
+ _(Member comments are shortened to their first sentence, and the 15 longest are left out to fit; the full declaration is in `node_modules/@molecule/app-ui-angular/dist/components/tooltip.component.d.ts`.)_
12623
12858
 
12624
12859
  #### `UserMenuPopover`
12625
12860
 
@@ -13683,6 +13918,8 @@ function formSubmitErrorMessages(error: unknown, fallback: string): string[]
13683
13918
 
13684
13919
  #### `getIconSvg(name, className)` _(deprecated)_
13685
13920
 
13921
+ > **Deprecated:** Used only by the deprecated `Molecule*` spike components.
13922
+
13686
13923
  Generates SVG markup string from an icon name.
13687
13924
 
13688
13925
  ```typescript
@@ -13801,8 +14038,9 @@ function resolveIcon(name: IconName, className?: string): ResolvedIcon
13801
14038
  Moves every rest attribute (`aria-*`, `data-*`, `id`, …) from the host
13802
14039
  element onto the element React spreads `{...rest}` onto.
13803
14040
 
13804
- Adapter bindings write each attribute once (case props are static), so a
13805
- move at first view init is stable.
14041
+ The first move happens at view init; a caller whose rest attributes follow
14042
+ state (an accessible label that switches with the locale) re-moves the
14043
+ re-bound ones with {@link reapplyRestAttributes}.
13806
14044
 
13807
14045
  ```typescript
13808
14046
  function moveRestAttributes(host: Element, target: Element | undefined | null): string[]
@@ -13813,6 +14051,35 @@ function moveRestAttributes(host: Element, target: Element | undefined | null):
13813
14051
 
13814
14052
  **Returns:** The moved attribute names.
13815
14053
 
14054
+ #### `reapplyRestAttributes(host, target, options)`
14055
+
14056
+ Moves the rest attributes a caller RE-BOUND since the last move.
14057
+
14058
+ Angular writes a changed `[attr.x]` binding back onto the host after
14059
+ {@link moveRestAttributes} took its first value off it, so without this the
14060
+ inner element keeps the first label forever while the host accumulates the
14061
+ new one. `aria-describedby` is left alone by default: the input family
14062
+ captured the host's value once and merges it with the field context's own
14063
+ target on its inner binding, so re-moving a re-bound value would erase that
14064
+ merge. A component that spreads the attribute onto `...rest` with no merge
14065
+ (Modal) passes {@link ReapplyRestAttributesOptions.includeDescribedBy}.
14066
+
14067
+ Idempotent: a host with nothing re-bound moves nothing.
14068
+
14069
+ ```typescript
14070
+ function reapplyRestAttributes(
14071
+ host: Element,
14072
+ target: Element | undefined | null,
14073
+ options?: ReapplyRestAttributesOptions,
14074
+ ): string[]
14075
+ ```
14076
+
14077
+ - `host` — The component host element.
14078
+ - `target` — The element React's `...rest` targets.
14079
+ - `options` — Whether to move `aria-describedby` too.
14080
+
14081
+ **Returns:** The moved attribute names.
14082
+
13816
14083
  #### `kebab(key)`
13817
14084
 
13818
14085
  Converts a camelCase CSS property name to kebab-case.
@@ -13874,7 +14141,7 @@ Peer dependencies:
13874
14141
  - `@molecule/app-angular` ^3.4.0
13875
14142
  - `@molecule/app-i18n` ^1.0.1
13876
14143
  - `@molecule/app-icons` ^1.0.1
13877
- - `@molecule/app-ui` ^1.0.1
14144
+ - `@molecule/app-ui` ^1.3.10
13878
14145
 
13879
14146
  ### Runtime Dependencies
13880
14147