@molecule/app-ui-angular 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +2796 -800
  2. package/dist/components/accordion.component.d.ts +17 -2
  3. package/dist/components/accordion.component.d.ts.map +1 -1
  4. package/dist/components/accordion.component.js +31 -7
  5. package/dist/components/accordion.component.js.map +1 -1
  6. package/dist/components/alert.component.d.ts +15 -2
  7. package/dist/components/alert.component.d.ts.map +1 -1
  8. package/dist/components/alert.component.js +25 -4
  9. package/dist/components/alert.component.js.map +1 -1
  10. package/dist/components/auth-guard.component.d.ts +41 -9
  11. package/dist/components/auth-guard.component.d.ts.map +1 -1
  12. package/dist/components/auth-guard.component.js +58 -23
  13. package/dist/components/auth-guard.component.js.map +1 -1
  14. package/dist/components/avatar.component.d.ts +15 -2
  15. package/dist/components/avatar.component.d.ts.map +1 -1
  16. package/dist/components/avatar.component.js +35 -5
  17. package/dist/components/avatar.component.js.map +1 -1
  18. package/dist/components/badge.component.d.ts +15 -2
  19. package/dist/components/badge.component.d.ts.map +1 -1
  20. package/dist/components/badge.component.js +35 -6
  21. package/dist/components/badge.component.js.map +1 -1
  22. package/dist/components/button.component.d.ts +20 -2
  23. package/dist/components/button.component.d.ts.map +1 -1
  24. package/dist/components/button.component.js +30 -4
  25. package/dist/components/button.component.js.map +1 -1
  26. package/dist/components/card.component.d.ts +67 -9
  27. package/dist/components/card.component.d.ts.map +1 -1
  28. package/dist/components/card.component.js +99 -17
  29. package/dist/components/card.component.js.map +1 -1
  30. package/dist/components/checkbox.component.d.ts +35 -5
  31. package/dist/components/checkbox.component.d.ts.map +1 -1
  32. package/dist/components/checkbox.component.js +59 -9
  33. package/dist/components/checkbox.component.js.map +1 -1
  34. package/dist/components/confirm-button.component.d.ts +85 -17
  35. package/dist/components/confirm-button.component.d.ts.map +1 -1
  36. package/dist/components/confirm-button.component.js +112 -25
  37. package/dist/components/confirm-button.component.js.map +1 -1
  38. package/dist/components/confirm-dialog.component.d.ts +50 -13
  39. package/dist/components/confirm-dialog.component.d.ts.map +1 -1
  40. package/dist/components/confirm-dialog.component.js +118 -31
  41. package/dist/components/confirm-dialog.component.js.map +1 -1
  42. package/dist/components/dropdown.component.d.ts +32 -5
  43. package/dist/components/dropdown.component.d.ts.map +1 -1
  44. package/dist/components/dropdown.component.js +86 -17
  45. package/dist/components/dropdown.component.js.map +1 -1
  46. package/dist/components/empty-state.component.d.ts +5 -1
  47. package/dist/components/empty-state.component.d.ts.map +1 -1
  48. package/dist/components/empty-state.component.js +5 -1
  49. package/dist/components/empty-state.component.js.map +1 -1
  50. package/dist/components/floating-input.component.d.ts +18 -4
  51. package/dist/components/floating-input.component.d.ts.map +1 -1
  52. package/dist/components/floating-input.component.js +38 -8
  53. package/dist/components/floating-input.component.js.map +1 -1
  54. package/dist/components/form-field.component.d.ts +14 -2
  55. package/dist/components/form-field.component.d.ts.map +1 -1
  56. package/dist/components/form-field.component.js +34 -5
  57. package/dist/components/form-field.component.js.map +1 -1
  58. package/dist/components/form.component.d.ts +61 -15
  59. package/dist/components/form.component.d.ts.map +1 -1
  60. package/dist/components/form.component.js +65 -14
  61. package/dist/components/form.component.js.map +1 -1
  62. package/dist/components/icon.component.d.ts +22 -4
  63. package/dist/components/icon.component.d.ts.map +1 -1
  64. package/dist/components/icon.component.js +1 -1
  65. package/dist/components/icon.component.js.map +1 -1
  66. package/dist/components/input.component.d.ts +34 -4
  67. package/dist/components/input.component.d.ts.map +1 -1
  68. package/dist/components/input.component.js +66 -11
  69. package/dist/components/input.component.js.map +1 -1
  70. package/dist/components/label.component.d.ts +5 -1
  71. package/dist/components/label.component.d.ts.map +1 -1
  72. package/dist/components/label.component.js +6 -2
  73. package/dist/components/label.component.js.map +1 -1
  74. package/dist/components/language-picker.component.d.ts +44 -8
  75. package/dist/components/language-picker.component.d.ts.map +1 -1
  76. package/dist/components/language-picker.component.js +29 -17
  77. package/dist/components/language-picker.component.js.map +1 -1
  78. package/dist/components/layout.component.d.ts +57 -8
  79. package/dist/components/layout.component.d.ts.map +1 -1
  80. package/dist/components/layout.component.js +134 -21
  81. package/dist/components/layout.component.js.map +1 -1
  82. package/dist/components/load-error-banner.component.d.ts +39 -7
  83. package/dist/components/load-error-banner.component.d.ts.map +1 -1
  84. package/dist/components/load-error-banner.component.js +68 -21
  85. package/dist/components/load-error-banner.component.js.map +1 -1
  86. package/dist/components/modal.component.d.ts +20 -3
  87. package/dist/components/modal.component.d.ts.map +1 -1
  88. package/dist/components/modal.component.js +40 -6
  89. package/dist/components/modal.component.js.map +1 -1
  90. package/dist/components/optimistic-toggle-button.component.d.ts +80 -19
  91. package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -1
  92. package/dist/components/optimistic-toggle-button.component.js +86 -25
  93. package/dist/components/optimistic-toggle-button.component.js.map +1 -1
  94. package/dist/components/page-header.component.d.ts +5 -1
  95. package/dist/components/page-header.component.d.ts.map +1 -1
  96. package/dist/components/page-header.component.js +5 -1
  97. package/dist/components/page-header.component.js.map +1 -1
  98. package/dist/components/page-shell.component.d.ts +5 -1
  99. package/dist/components/page-shell.component.d.ts.map +1 -1
  100. package/dist/components/page-shell.component.js +5 -1
  101. package/dist/components/page-shell.component.js.map +1 -1
  102. package/dist/components/pagination.component.d.ts +15 -2
  103. package/dist/components/pagination.component.d.ts.map +1 -1
  104. package/dist/components/pagination.component.js +26 -5
  105. package/dist/components/pagination.component.js.map +1 -1
  106. package/dist/components/panel-close.component.d.ts +10 -1
  107. package/dist/components/panel-close.component.d.ts.map +1 -1
  108. package/dist/components/panel-close.component.js +1 -1
  109. package/dist/components/panel-close.component.js.map +1 -1
  110. package/dist/components/progress.component.d.ts +51 -8
  111. package/dist/components/progress.component.d.ts.map +1 -1
  112. package/dist/components/progress.component.js +26 -5
  113. package/dist/components/progress.component.js.map +1 -1
  114. package/dist/components/prompt-dialog.component.d.ts +59 -16
  115. package/dist/components/prompt-dialog.component.d.ts.map +1 -1
  116. package/dist/components/prompt-dialog.component.js +129 -41
  117. package/dist/components/prompt-dialog.component.js.map +1 -1
  118. package/dist/components/radio-group.component.d.ts +16 -2
  119. package/dist/components/radio-group.component.d.ts.map +1 -1
  120. package/dist/components/radio-group.component.js +28 -5
  121. package/dist/components/radio-group.component.js.map +1 -1
  122. package/dist/components/responsive-app-shell.component.d.ts +155 -31
  123. package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
  124. package/dist/components/responsive-app-shell.component.js +163 -54
  125. package/dist/components/responsive-app-shell.component.js.map +1 -1
  126. package/dist/components/select.component.d.ts +29 -4
  127. package/dist/components/select.component.d.ts.map +1 -1
  128. package/dist/components/select.component.js +55 -9
  129. package/dist/components/select.component.js.map +1 -1
  130. package/dist/components/separator.component.d.ts +37 -7
  131. package/dist/components/separator.component.d.ts.map +1 -1
  132. package/dist/components/separator.component.js +33 -6
  133. package/dist/components/separator.component.js.map +1 -1
  134. package/dist/components/sidebar-user-card.component.d.ts +28 -7
  135. package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
  136. package/dist/components/sidebar-user-card.component.js +1 -1
  137. package/dist/components/sidebar-user-card.component.js.map +1 -1
  138. package/dist/components/skeleton.component.d.ts +23 -4
  139. package/dist/components/skeleton.component.d.ts.map +1 -1
  140. package/dist/components/skeleton.component.js +34 -7
  141. package/dist/components/skeleton.component.js.map +1 -1
  142. package/dist/components/spinner.component.d.ts +15 -2
  143. package/dist/components/spinner.component.d.ts.map +1 -1
  144. package/dist/components/spinner.component.js +34 -6
  145. package/dist/components/spinner.component.js.map +1 -1
  146. package/dist/components/switch.component.d.ts +30 -7
  147. package/dist/components/switch.component.d.ts.map +1 -1
  148. package/dist/components/switch.component.js +56 -11
  149. package/dist/components/switch.component.js.map +1 -1
  150. package/dist/components/table.component.d.ts +29 -3
  151. package/dist/components/table.component.d.ts.map +1 -1
  152. package/dist/components/table.component.js +63 -8
  153. package/dist/components/table.component.js.map +1 -1
  154. package/dist/components/tabs.component.d.ts +18 -3
  155. package/dist/components/tabs.component.d.ts.map +1 -1
  156. package/dist/components/tabs.component.js +74 -39
  157. package/dist/components/tabs.component.js.map +1 -1
  158. package/dist/components/textarea.component.d.ts +29 -4
  159. package/dist/components/textarea.component.d.ts.map +1 -1
  160. package/dist/components/textarea.component.js +55 -9
  161. package/dist/components/textarea.component.js.map +1 -1
  162. package/dist/components/theme-toggle.component.d.ts +25 -6
  163. package/dist/components/theme-toggle.component.d.ts.map +1 -1
  164. package/dist/components/theme-toggle.component.js +1 -1
  165. package/dist/components/theme-toggle.component.js.map +1 -1
  166. package/dist/components/toast.component.d.ts +27 -6
  167. package/dist/components/toast.component.d.ts.map +1 -1
  168. package/dist/components/toast.component.js +48 -14
  169. package/dist/components/toast.component.js.map +1 -1
  170. package/dist/components/tooltip.component.d.ts +57 -5
  171. package/dist/components/tooltip.component.d.ts.map +1 -1
  172. package/dist/components/tooltip.component.js +103 -11
  173. package/dist/components/tooltip.component.js.map +1 -1
  174. package/dist/components/user-menu-popover.component.d.ts +68 -14
  175. package/dist/components/user-menu-popover.component.d.ts.map +1 -1
  176. package/dist/components/user-menu-popover.component.js +4 -4
  177. package/dist/components/user-menu-popover.component.js.map +1 -1
  178. package/dist/components/user-menu.component.d.ts +33 -9
  179. package/dist/components/user-menu.component.d.ts.map +1 -1
  180. package/dist/components/user-menu.component.js +1 -1
  181. package/dist/components/user-menu.component.js.map +1 -1
  182. package/dist/index.d.ts +4 -0
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +4 -0
  185. package/dist/index.js.map +1 -1
  186. package/dist/types.d.ts +1 -1
  187. package/dist/types.d.ts.map +1 -1
  188. package/dist/utilities/element-props.d.ts +78 -0
  189. package/dist/utilities/element-props.d.ts.map +1 -0
  190. package/dist/utilities/element-props.js +166 -0
  191. package/dist/utilities/element-props.js.map +1 -0
  192. package/dist/utilities/element.d.ts +34 -0
  193. package/dist/utilities/element.d.ts.map +1 -0
  194. package/dist/utilities/element.js +24 -0
  195. package/dist/utilities/element.js.map +1 -0
  196. package/dist/utilities/index.d.ts +2 -0
  197. package/dist/utilities/index.d.ts.map +1 -1
  198. package/dist/utilities/index.js +2 -0
  199. package/dist/utilities/index.js.map +1 -1
  200. package/dist/utilities/node-value.d.ts +1 -1
  201. package/dist/utilities/node-value.d.ts.map +1 -1
  202. package/dist/utilities/node-value.js +6 -2
  203. package/dist/utilities/node-value.js.map +1 -1
  204. package/dist/utilities/render-icon.d.ts +3 -2
  205. package/dist/utilities/render-icon.d.ts.map +1 -1
  206. package/dist/utilities/render-icon.js +6 -3
  207. package/dist/utilities/render-icon.js.map +1 -1
  208. package/dist/utilities/rest-attrs.d.ts +26 -2
  209. package/dist/utilities/rest-attrs.d.ts.map +1 -1
  210. package/dist/utilities/rest-attrs.js +37 -0
  211. package/dist/utilities/rest-attrs.js.map +1 -1
  212. package/package.json +4 -3
@@ -1,5 +1,6 @@
1
- import { type DoCheck, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
2
- import type { Size, UIClassMap } from '@molecule/app-ui';
1
+ import { type AfterViewChecked, type DoCheck, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
2
+ import type { FocusEventHandler, KeyboardEventHandler, Size, UIClassMap } from '@molecule/app-ui';
3
+ import type { HasElement } from '../utilities/element.js';
3
4
  import type { FormFieldContext } from '../utilities/form-field-context.js';
4
5
  import { type ResolvedIcon } from '../utilities/render-icon.js';
5
6
  import * as i0 from "@angular/core";
@@ -15,7 +16,7 @@ import * as i0 from "@angular/core";
15
16
  * are always-mounted `<ng-content>` capture points that are detached from the
16
17
  * DOM whenever React would render nothing (see {@link SlotWrapper}).
17
18
  */
18
- export declare class Input implements DoCheck {
19
+ export declare class Input implements AfterViewChecked, DoCheck, HasElement<HTMLInputElement> {
19
20
  /** Input type. */
20
21
  type?: string;
21
22
  /** Input size. */
@@ -56,12 +57,27 @@ export declare class Input implements DoCheck {
56
57
  name?: string;
57
58
  /** Explicit input id. */
58
59
  id?: string;
60
+ /** `data-mol-id` automation id (React's `automationId`). */
61
+ automationId?: string;
62
+ /** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
63
+ dataMolId?: string;
64
+ /** React's `onFocus`, which React spreads onto the <input>: its `currentTarget` is that element. */
65
+ onFocus?: FocusEventHandler;
66
+ /** React's `onBlur`, which React spreads onto the <input>: its `currentTarget` is that element. */
67
+ onBlur?: FocusEventHandler;
68
+ /** React's `onKeyDown`, which React spreads onto the <input>: its `currentTarget` is that element. */
69
+ onKeyDown?: KeyboardEventHandler;
59
70
  /** Fires the raw `input` event (React's text-input onChange). */
60
71
  readonly change: EventEmitter<Event>;
61
72
  /** Fires the clear button's click event. */
62
73
  readonly clear: EventEmitter<Event>;
63
74
  /** The native input (React's `...rest` spread target). */
64
75
  inputEl?: ElementRef<HTMLInputElement>;
76
+ /** The native input view query; also feeds the caller's ref element. */
77
+ set inputElQuery(ref: ElementRef<HTMLInputElement> | undefined);
78
+ private readonly inner;
79
+ /** The element a caller's ref receives: the native `<input>`, not the label wrapper. */
80
+ readonly element: import("@angular/core").Signal<HTMLInputElement | null>;
65
81
  /** The left adornment wrapper. */
66
82
  leftSlot?: ElementRef<HTMLDivElement>;
67
83
  /** The right adornment wrapper. */
@@ -69,6 +85,8 @@ export declare class Input implements DoCheck {
69
85
  /** The right adornment inner span (React's ternary else branch). */
70
86
  rightInner?: ElementRef<HTMLSpanElement>;
71
87
  private readonly host;
88
+ /** The per-instance id used when the caller gives no `id` or `name` (React's `useId`). */
89
+ private readonly generatedId;
72
90
  /**
73
91
  * Reactive translation, read in the injection context. Its `t` reads the
74
92
  * locale, so the view re-renders the text on a locale switch (the static `t`
@@ -82,6 +100,8 @@ export declare class Input implements DoCheck {
82
100
  private movedRest;
83
101
  /** The `aria-describedby` the caller spread onto the host (React's rest). */
84
102
  private restDescribedBy;
103
+ /** The `data-mol-id` a caller bound on the host (React spreads it onto the input). */
104
+ private externalMolId;
85
105
  /**
86
106
  * The current class map.
87
107
  * @returns The UIClassMap.
@@ -129,6 +149,11 @@ export declare class Input implements DoCheck {
129
149
  * @returns The style attribute text.
130
150
  */
131
151
  hostStyle(): string | null;
152
+ /**
153
+ * The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
154
+ * @returns The attribute value.
155
+ */
156
+ molId(): string | undefined;
132
157
  /**
133
158
  * React's text-input onChange: the `input` event, with the controlled value
134
159
  * restored afterwards.
@@ -144,6 +169,11 @@ export declare class Input implements DoCheck {
144
169
  * @param event - The native change event.
145
170
  */
146
171
  handleChange(event: Event): void;
172
+ /**
173
+ * Puts a `data-mol-id` bound on the host onto the input in the pass that bound it (the host
174
+ * attribute is written after this component's `ngDoCheck`).
175
+ */
176
+ ngAfterViewChecked(): void;
147
177
  /**
148
178
  * Reconciles the adornment wrappers every check: detects projected slot
149
179
  * content (view queries resolve only at view init, so the very first pass —
@@ -185,6 +215,6 @@ export declare class Input implements DoCheck {
185
215
  */
186
216
  private isGiven;
187
217
  static ɵfac: i0.ɵɵFactoryDeclaration<Input, never>;
188
- static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "change": "change"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, never>;
218
+ static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onFocus": { "alias": "onFocus"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onKeyDown": { "alias": "onKeyDown"; "required": false; }; }, { "change": "change"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, never>;
189
219
  }
190
220
  //# sourceMappingURL=input.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,OAAO,EACZ,UAAU,EACV,YAAY,EAIZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,EAAc,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAA;;AAKxF;;;;;;;;;;;GA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B;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAIhC;;;OAGG;IACH,kBAAkB,IAAI,IAAI;IAW1B;;;;;;;;OAQG;IACH,SAAS,IAAI,IAAI;IA0DjB;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ;IAWhB;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAI9B;;;;;OAKG;IACH,OAAO,CAAC,OAAO;yCA3VJ,KAAK;2CAAL,KAAK;CA8VjB"}
@@ -4,12 +4,13 @@
4
4
  * @module
5
5
  */
6
6
  import { NgTemplateOutlet } from '@angular/common';
7
- import { Component, ElementRef, EventEmitter, inject, Output, Renderer2, TemplateRef, ViewChild, } from '@angular/core';
7
+ import { Component, ElementRef, EventEmitter, inject, Output, Renderer2, signal, TemplateRef, ViewChild, } from '@angular/core';
8
8
  import { useTranslation } from '@molecule/app-angular';
9
9
  import { getClassMap } from '@molecule/app-ui';
10
10
  import { fieldContext } from '../utilities/form-field-context.js';
11
+ import { nextInstanceId } from '../utilities/ids.js';
11
12
  import { MolIconSvg, resolveIcon } from '../utilities/render-icon.js';
12
- import { moveRestAttributes, reapplyRestAttributes } from '../utilities/rest-attrs.js';
13
+ import { adoptHostDataMolId, moveRestAttributes, reapplyRestAttributes, } from '../utilities/rest-attrs.js';
13
14
  import { styleText } from '../utilities/style.js';
14
15
  import { hasNodes, SlotWrapper } from './button.component.js';
15
16
  import * as i0 from "@angular/core";
@@ -142,12 +143,31 @@ export class Input {
142
143
  name;
143
144
  /** Explicit input id. */
144
145
  id;
146
+ /** `data-mol-id` automation id (React's `automationId`). */
147
+ automationId;
148
+ /** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
149
+ dataMolId;
150
+ /** React's `onFocus`, which React spreads onto the <input>: its `currentTarget` is that element. */
151
+ onFocus;
152
+ /** React's `onBlur`, which React spreads onto the <input>: its `currentTarget` is that element. */
153
+ onBlur;
154
+ /** React's `onKeyDown`, which React spreads onto the <input>: its `currentTarget` is that element. */
155
+ onKeyDown;
145
156
  /** Fires the raw `input` event (React's text-input onChange). */
146
157
  change = new EventEmitter();
147
158
  /** Fires the clear button's click event. */
148
159
  clear = new EventEmitter();
149
160
  /** The native input (React's `...rest` spread target). */
150
161
  inputEl;
162
+ /** The native input view query; also feeds the caller's ref element. */
163
+ set inputElQuery(ref) {
164
+ this.inputEl = ref;
165
+ this.inner.set(ref?.nativeElement ?? null);
166
+ }
167
+ inner = signal(null, /* @ts-ignore */
168
+ ...(ngDevMode ? [{ debugName: "inner" }] : /* istanbul ignore next */ []));
169
+ /** The element a caller's ref receives: the native `<input>`, not the label wrapper. */
170
+ element = this.inner.asReadonly();
151
171
  /** The left adornment wrapper. */
152
172
  leftSlot;
153
173
  /** The right adornment wrapper. */
@@ -155,6 +175,8 @@ export class Input {
155
175
  /** The right adornment inner span (React's ternary else branch). */
156
176
  rightInner;
157
177
  host = inject(ElementRef);
178
+ /** The per-instance id used when the caller gives no `id` or `name` (React's `useId`). */
179
+ generatedId = nextInstanceId();
158
180
  /**
159
181
  * Reactive translation, read in the injection context. Its `t` reads the
160
182
  * locale, so the view re-renders the text on a locale switch (the static `t`
@@ -168,6 +190,8 @@ export class Input {
168
190
  movedRest = false;
169
191
  /** The `aria-describedby` the caller spread onto the host (React's rest). */
170
192
  restDescribedBy = null;
193
+ /** The `data-mol-id` a caller bound on the host (React spreads it onto the input). */
194
+ externalMolId;
171
195
  /**
172
196
  * The current class map.
173
197
  * @returns The UIClassMap.
@@ -181,7 +205,7 @@ export class Input {
181
205
  * @returns The id value.
182
206
  */
183
207
  inputId() {
184
- return this.id || this.fieldContext()?.id || this.name || 'r0';
208
+ return this.id || this.fieldContext()?.id || this.name || this.generatedId;
185
209
  }
186
210
  /**
187
211
  * The aria-describedby target (error or hint paragraph).
@@ -244,6 +268,13 @@ export class Input {
244
268
  hostStyle() {
245
269
  return styleText(this.style);
246
270
  }
271
+ /**
272
+ * The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
273
+ * @returns The attribute value.
274
+ */
275
+ molId() {
276
+ return this.automationId ?? this.dataMolId ?? this.externalMolId;
277
+ }
247
278
  /**
248
279
  * React's text-input onChange: the `input` event, with the controlled value
249
280
  * restored afterwards.
@@ -267,6 +298,15 @@ export class Input {
267
298
  handleChange(event) {
268
299
  event.stopPropagation();
269
300
  }
301
+ /**
302
+ * Puts a `data-mol-id` bound on the host onto the input in the pass that bound it (the host
303
+ * attribute is written after this component's `ngDoCheck`).
304
+ */
305
+ ngAfterViewChecked() {
306
+ adoptHostDataMolId(this.host.nativeElement, this.inputEl?.nativeElement ?? this.host.nativeElement.querySelector('input'), (id) => {
307
+ this.externalMolId = id;
308
+ }, () => this.molId());
309
+ }
270
310
  /**
271
311
  * Reconciles the adornment wrappers every check: detects projected slot
272
312
  * content (view queries resolve only at view init, so the very first pass —
@@ -303,10 +343,16 @@ export class Input {
303
343
  if (!this.movedRest && input) {
304
344
  this.restDescribedBy = host.getAttribute('aria-describedby');
305
345
  this.movedRest = true;
346
+ adoptHostDataMolId(host, input, (id) => {
347
+ this.externalMolId = id;
348
+ }, () => this.molId());
306
349
  moveRestAttributes(host, input);
307
350
  }
308
351
  // A caller's re-bound rest attribute (`[attr.aria-label]` following a
309
352
  // locale switch) lands back on the host; move it onto the input again.
353
+ adoptHostDataMolId(host, input, (id) => {
354
+ this.externalMolId = id;
355
+ }, () => this.molId());
310
356
  reapplyRestAttributes(host, input);
311
357
  // React's controlled input: the live value always follows the `value` prop
312
358
  // after a re-render (the binding sets the attribute; the property is only
@@ -366,13 +412,13 @@ export class Input {
366
412
  i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5)(_c3, 5);
367
413
  } if (rf & 2) {
368
414
  let _t;
369
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputEl = _t.first);
415
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputElQuery = _t.first);
370
416
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.leftSlot = _t.first);
371
417
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightSlot = _t.first);
372
418
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightInner = _t.first);
373
419
  } }, hostVars: 2, hostBindings: function Input_HostBindings(rf, ctx) { if (rf & 2) {
374
420
  i0.ɵɵclassMap(ctx.cm().inputWrapper);
375
- } }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id" }, outputs: { change: "change", clear: "clear" }, ngContentSelectors: _c5, decls: 19, vars: 27, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "disabled"], ["type", "button", 3, "class"], ["type", "button", 3, "click"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
421
+ } }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change", clear: "clear" }, ngContentSelectors: _c5, decls: 19, vars: 28, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "focusin", "focusout", "keydown", "disabled"], ["type", "button", 3, "class"], ["type", "button", 3, "click"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
376
422
  i0.ɵɵprojectionDef(_c4);
377
423
  i0.ɵɵconditionalCreate(0, Input_Conditional_0_Template, 2, 6, "label", 4);
378
424
  i0.ɵɵelementStart(1, "div")(2, "div", null, 0);
@@ -380,7 +426,7 @@ export class Input {
380
426
  i0.ɵɵconditionalCreate(5, Input_Conditional_5_Template, 1, 1, "ng-container", 5)(6, Input_Conditional_6_Template, 1, 1);
381
427
  i0.ɵɵelementEnd();
382
428
  i0.ɵɵelementStart(7, "input", 6, 1);
383
- i0.ɵɵlistener("input", function Input_Template_input_input_7_listener($event) { return ctx.handleInput($event); })("change", function Input_Template_input_change_7_listener($event) { return ctx.handleChange($event); });
429
+ i0.ɵɵlistener("input", function Input_Template_input_input_7_listener($event) { return ctx.handleInput($event); })("change", function Input_Template_input_change_7_listener($event) { return ctx.handleChange($event); })("focusin", function Input_Template_input_focusin_7_listener($event) { return ctx.onFocus?.($event); })("focusout", function Input_Template_input_focusout_7_listener($event) { return ctx.onBlur?.($event); })("keydown", function Input_Template_input_keydown_7_listener($event) { return ctx.onKeyDown?.($event); });
384
430
  i0.ɵɵelementEnd();
385
431
  i0.ɵɵelementStart(9, "div", null, 2);
386
432
  i0.ɵɵconditionalCreate(11, Input_Conditional_11_Template, 2, 4, "button", 7);
@@ -392,7 +438,7 @@ export class Input {
392
438
  i0.ɵɵconditionalCreate(18, Input_Conditional_18_Template, 2, 4, "p", 4);
393
439
  } if (rf & 2) {
394
440
  let tmp_7_0;
395
- let tmp_23_0;
441
+ let tmp_24_0;
396
442
  i0.ɵɵconditional(ctx.label ? 0 : -1);
397
443
  i0.ɵɵadvance();
398
444
  i0.ɵɵclassMap(ctx.cm().inputInner);
@@ -403,7 +449,7 @@ export class Input {
403
449
  i0.ɵɵadvance(2);
404
450
  i0.ɵɵclassMap(ctx.classes());
405
451
  i0.ɵɵproperty("disabled", ctx.disabled);
406
- i0.ɵɵattribute("type", ctx.type ?? "text")("id", ctx.inputId())("name", ctx.name)("value", ctx.value ?? ctx.defaultValue)("placeholder", ctx.placeholder)("required", ctx.required ? "" : null)("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ? "true" : "false")("aria-describedby", ctx.mergedDescribedBy())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId);
452
+ i0.ɵɵattribute("type", ctx.type ?? "text")("id", ctx.inputId())("name", ctx.name)("value", ctx.value ?? ctx.defaultValue)("placeholder", ctx.placeholder)("required", ctx.required ? "" : null)("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ? "true" : "false")("aria-describedby", ctx.mergedDescribedBy())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId)("data-mol-id", ctx.molId());
407
453
  i0.ɵɵadvance(2);
408
454
  i0.ɵɵclassMap(ctx.cm().inputRightElement);
409
455
  i0.ɵɵadvance(2);
@@ -411,7 +457,7 @@ export class Input {
411
457
  i0.ɵɵadvance();
412
458
  i0.ɵɵclassMap(ctx.cm().textMuted);
413
459
  i0.ɵɵadvance(3);
414
- i0.ɵɵconditional((tmp_23_0 = ctx.asTemplate(ctx.rightElement)) ? 15 : 16, tmp_23_0);
460
+ i0.ɵɵconditional((tmp_24_0 = ctx.asTemplate(ctx.rightElement)) ? 15 : 16, tmp_24_0);
415
461
  i0.ɵɵadvance(2);
416
462
  i0.ɵɵconditional(ctx.error ? 17 : -1);
417
463
  i0.ɵɵadvance();
@@ -445,6 +491,11 @@ export class Input {
445
491
  'placeholder',
446
492
  'name',
447
493
  'id',
494
+ 'automationId',
495
+ 'dataMolId: data-mol-id',
496
+ 'onFocus',
497
+ 'onBlur',
498
+ 'onKeyDown',
448
499
  ],
449
500
  host: {
450
501
  '[class]': 'cm().inputWrapper',
@@ -478,8 +529,12 @@ export class Input {
478
529
  [class]="classes()"
479
530
  [attr.style]="hostStyle()"
480
531
  [attr.data-testid]="testId"
532
+ [attr.data-mol-id]="molId()"
481
533
  (input)="handleInput($event)"
482
534
  (change)="handleChange($event)"
535
+ (focusin)="onFocus?.($event)"
536
+ (focusout)="onBlur?.($event)"
537
+ (keydown)="onKeyDown?.($event)"
483
538
  #inputEl
484
539
  />
485
540
  <div [class]="cm().inputRightElement" #rightSlot>
@@ -514,7 +569,7 @@ export class Input {
514
569
  type: Output
515
570
  }], clear: [{
516
571
  type: Output
517
- }], inputEl: [{
572
+ }], inputElQuery: [{
518
573
  type: ViewChild,
519
574
  args: ['inputEl']
520
575
  }], leftSlot: [{
@@ -527,5 +582,5 @@ export class Input {
527
582
  type: ViewChild,
528
583
  args: ['rightInner']
529
584
  }] }); })();
530
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber: 133 }); })();
585
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber: 150 }); })();
531
586
  //# sourceMappingURL=input.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,SAAS,EAET,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,UAAU,EAAqB,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EA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AU,EAAE,gBAAgB;;iFAgG3B,KAAK;cAnGjB,SAAS;eAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;gBACvC,MAAM,EAAE;oBACN,MAAM;oBACN,MAAM;oBACN,OAAO;oBACP,OAAO;oBACP,OAAO;oBACP,MAAM;oBACN,aAAa;oBACb,cAAc;oBACd,WAAW;oBACX,YAAY;oBACZ,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,UAAU;oBACV,UAAU;oBACV,OAAO;oBACP,cAAc;oBACd,aAAa;oBACb,MAAM;oBACN,IAAI;oBACJ,cAAc;oBACd,wBAAwB;oBACxB,SAAS;oBACT,QAAQ;oBACR,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,mBAAmB;iBAC/B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+DN;aACL;;kBAuDE,MAAM;;kBAEN,MAAM;;kBAKN,SAAS;mBAAC,SAAS;;kBAUnB,SAAS;mBAAC,UAAU;;kBAEpB,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,YAAY;;kFA3EZ,KAAK"}
@@ -1,4 +1,5 @@
1
1
  import type { UIClassMap } from '@molecule/app-ui';
2
+ import { type HasElement } from '../utilities/element.js';
2
3
  import * as i0 from "@angular/core";
3
4
  /**
4
5
  * Label component.
@@ -6,7 +7,10 @@ import * as i0 from "@angular/core";
6
7
  * A `<label>` with the class map's label styles; `required` switches to the
7
8
  * required variant and `htmlFor` renders the `for` attribute.
8
9
  */
9
- export declare class Label {
10
+ export declare class Label implements HasElement<HTMLLabelElement> {
11
+ private readonly host;
12
+ /** The element a caller's ref receives: the host `<label>`. */
13
+ readonly element: import("@angular/core").Signal<HTMLLabelElement | null>;
10
14
  /** Whether the label renders its required marker. */
11
15
  required?: boolean;
12
16
  /** Extra classes. */
@@ -1 +1 @@
1
- {"version":3,"file":"label.component.d.ts","sourceRoot":"","sources":["../../src/components/label.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGlD;;;;;GAKG;AACH,qBAUa,KAAK;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCApBN,KAAK;2CAAL,KAAK;CAuBjB"}
1
+ {"version":3,"file":"label.component.d.ts","sourceRoot":"","sources":["../../src/components/label.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,yBAAyB,CAAA;;AAEtE;;;;;GAKG;AACH,qBAUa,KAAM,YAAW,UAAU,CAAC,gBAAgB,CAAC;IACxD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmD;IACxE,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,0DAAyB;IAEzC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAxBN,KAAK;2CAAL,KAAK;CA2BjB"}
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { Component } from '@angular/core';
6
+ import { Component, ElementRef, inject } from '@angular/core';
7
7
  import { getClassMap } from '@molecule/app-ui';
8
+ import { hostElement } from '../utilities/element.js';
8
9
  import * as i0 from "@angular/core";
9
10
  const _c0 = ["*"];
10
11
  /**
@@ -14,6 +15,9 @@ const _c0 = ["*"];
14
15
  * required variant and `htmlFor` renders the `for` attribute.
15
16
  */
16
17
  export class Label {
18
+ host = inject(ElementRef);
19
+ /** The element a caller's ref receives: the host `<label>`. */
20
+ element = hostElement(this.host);
17
21
  /** Whether the label renders its required marker. */
18
22
  required;
19
23
  /** Extra classes. */
@@ -56,5 +60,5 @@ export class Label {
56
60
  template: `<ng-content></ng-content>`,
57
61
  }]
58
62
  }], null, null); })();
59
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Label, { className: "Label", filePath: "components/label.component.ts", lineNumber: 28 }); })();
63
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Label, { className: "Label", filePath: "components/label.component.ts", lineNumber: 30 }); })();
60
64
  //# sourceMappingURL=label.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.component.js","sourceRoot":"","sources":["../../src/components/label.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;AAE9C;;;;;GAKG;AAWH,MAAM,OAAO,KAAK;IAChB,qDAAqD;IACrD,QAAQ,CAAU;IAClB,qBAAqB;IACrB,SAAS,CAAS;IAClB,qDAAqD;IACrD,OAAO,CAAS;IAEhB;;;OAGG;IACH,EAAE;QACA,OAAO,WAAW,EAAE,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA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AS,CAAJ;;;YAFL,kBAAyB;;;iFAEzB,KAAK;cAVjB,SAAS;eAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;gBAC5C,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,YAAY,EAAE,SAAS;iBACxB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,KAAK"}
@@ -9,14 +9,15 @@ import type { IconName } from '@molecule/app-icons';
9
9
  import type { UIClassMap } from '@molecule/app-ui';
10
10
  import * as i0 from "@angular/core";
11
11
  /**
12
- * LanguagePicker component.
12
+ * Props for {@link LanguagePicker} (React's `LanguagePickerProps`, in
13
+ * Angular's form).
13
14
  *
14
- * React's root is a FRAGMENT (trigger button + locale modal), so the host is
15
- * unwrapped (`data-parity-unwrap`, `display: contents`). Rest props (`title`,
16
- * `data-*`, `aria-*`, native event handlers) are spread onto the trigger
17
- * button in React; here they land on the host and are moved onto it.
15
+ * React's `renderTrigger` is a render function receiving the open action;
16
+ * here it is a `TemplateRef<unknown>` whose context carries `open` (also as
17
+ * `$implicit`). Extra `<button>` attributes reach the trigger through the
18
+ * host (React's rest spread).
18
19
  */
19
- export declare class LanguagePicker implements AfterViewInit, DoCheck {
20
+ export interface LanguagePickerProps {
20
21
  /** i18n key for the trigger label / aria-label (default `footer.language`). */
21
22
  labelKey?: string;
22
23
  /** Fallback label if the i18n key is missing (default `Language`). */
@@ -30,13 +31,48 @@ export declare class LanguagePicker implements AfterViewInit, DoCheck {
30
31
  /** Pixel size for the rendered icon (default 16). */
31
32
  iconSize?: number;
32
33
  /** What the trigger renders: the locale name, its code, or the icon only. */
33
- display: 'name' | 'code' | 'icon';
34
+ display?: 'name' | 'code' | 'icon';
34
35
  /** Extra classes appended to the trigger button. */
35
36
  className?: string;
36
37
  /** Inline style object for the trigger button (React camelCase). */
37
38
  style?: Record<string, unknown>;
38
39
  /** Optional trigger replacement (a node value rendered as a template). */
39
- renderTrigger?: unknown;
40
+ renderTrigger?: TemplateRef<unknown>;
41
+ }
42
+ /**
43
+ * LanguagePicker component.
44
+ *
45
+ * React's root is a FRAGMENT (trigger button + locale modal), so the host is
46
+ * unwrapped (`data-parity-unwrap`, `display: contents`). Rest props (`title`,
47
+ * `data-*`, `aria-*`, native event handlers) are spread onto the trigger
48
+ * button in React; here they land on the host and are moved onto it.
49
+ */
50
+ export declare class LanguagePicker implements AfterViewInit, DoCheck {
51
+ /** i18n key for the trigger label / aria-label (default `footer.language`). */
52
+ labelKey?: LanguagePickerProps['labelKey'];
53
+ /** Fallback label if the i18n key is missing (default `Language`). */
54
+ labelDefault?: LanguagePickerProps['labelDefault'];
55
+ /** i18n key for the modal title (default `languagePicker.modalTitle`). */
56
+ modalTitleKey?: LanguagePickerProps['modalTitleKey'];
57
+ /** Fallback modal title if the i18n key is missing (default `Choose language`). */
58
+ modalTitleDefault?: LanguagePickerProps['modalTitleDefault'];
59
+ /** Icon glyph before the current locale name (default `globe`). */
60
+ icon?: LanguagePickerProps['icon'];
61
+ /** Pixel size for the rendered icon (default 16). */
62
+ iconSize?: LanguagePickerProps['iconSize'];
63
+ /** What the trigger renders: the locale name, its code, or the icon only. */
64
+ display?: LanguagePickerProps['display'];
65
+ /** Extra classes appended to the trigger button. */
66
+ className?: LanguagePickerProps['className'];
67
+ /** Inline style object for the trigger button (React camelCase). */
68
+ style?: LanguagePickerProps['style'];
69
+ /** Optional trigger replacement (a node value rendered as a template). */
70
+ renderTrigger?: LanguagePickerProps['renderTrigger'];
71
+ /**
72
+ * The context a `renderTrigger` template receives: `open` (also as
73
+ * `$implicit`), React's `renderTrigger(open)` argument.
74
+ */
75
+ readonly triggerContext: Record<string, unknown>;
40
76
  /** The default trigger button. */
41
77
  trigger?: ElementRef<HTMLButtonElement>;
42
78
  /** Whether the locale modal is open. */
@@ -1 +1 @@
1
- {"version":3,"file":"language-picker.component.d.ts","sourceRo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AAU;IAIhB;;;OAGG;IACH,SAAS,IAAI,MAAM;IAUnB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAUpB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvD;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,aAAa,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;IAIjD;;;OAGG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAO7B,8BAA8B;IAC9B,IAAI,IAAI,IAAI;IAIZ;;;OAGG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKvC;;;OAGG;IACH,eAAe,IAAI,IAAI;IAIvB;;OAEG;IACH,SAAS,IAAI,IAAI;IAIjB,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;yCA9JL,cAAc;2CAAd,cAAc;CAoK1B"}
1
+ {"version":3,"file":"language-picker.component.d.ts","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAIV,WAAW,EAEZ,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AASlD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,aAAa,CAAC,E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