@molecule/app-ui-angular 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +279 -180
  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/checkbox.component.d.ts +0 -5
  7. package/dist/components/checkbox.component.d.ts.map +1 -1
  8. package/dist/components/checkbox.component.js +16 -20
  9. package/dist/components/checkbox.component.js.map +1 -1
  10. package/dist/components/confirm-dialog.component.d.ts +33 -2
  11. package/dist/components/confirm-dialog.component.d.ts.map +1 -1
  12. package/dist/components/confirm-dialog.component.js +81 -24
  13. package/dist/components/confirm-dialog.component.js.map +1 -1
  14. package/dist/components/controlled-checked.directive.d.ts +45 -0
  15. package/dist/components/controlled-checked.directive.d.ts.map +1 -0
  16. package/dist/components/controlled-checked.directive.js +74 -0
  17. package/dist/components/controlled-checked.directive.js.map +1 -0
  18. package/dist/components/dropdown.component.d.ts.map +1 -1
  19. package/dist/components/dropdown.component.js +5 -4
  20. package/dist/components/dropdown.component.js.map +1 -1
  21. package/dist/components/input.component.d.ts.map +1 -1
  22. package/dist/components/input.component.js +11 -2
  23. package/dist/components/input.component.js.map +1 -1
  24. package/dist/components/modal.component.d.ts +16 -9
  25. package/dist/components/modal.component.d.ts.map +1 -1
  26. package/dist/components/modal.component.js +27 -15
  27. package/dist/components/modal.component.js.map +1 -1
  28. package/dist/components/page-header.component.d.ts +11 -0
  29. package/dist/components/page-header.component.d.ts.map +1 -1
  30. package/dist/components/page-header.component.js +25 -10
  31. package/dist/components/page-header.component.js.map +1 -1
  32. package/dist/components/prompt-dialog.component.d.ts +35 -4
  33. package/dist/components/prompt-dialog.component.d.ts.map +1 -1
  34. package/dist/components/prompt-dialog.component.js +63 -9
  35. package/dist/components/prompt-dialog.component.js.map +1 -1
  36. package/dist/components/radio-group.component.d.ts.map +1 -1
  37. package/dist/components/radio-group.component.js +19 -17
  38. package/dist/components/radio-group.component.js.map +1 -1
  39. package/dist/components/responsive-app-shell.component.d.ts +3 -7
  40. package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
  41. package/dist/components/responsive-app-shell.component.js +12 -17
  42. package/dist/components/responsive-app-shell.component.js.map +1 -1
  43. package/dist/components/select.component.d.ts +3 -1
  44. package/dist/components/select.component.d.ts.map +1 -1
  45. package/dist/components/select.component.js +11 -2
  46. package/dist/components/select.component.js.map +1 -1
  47. package/dist/components/sidebar-user-card.component.d.ts +10 -0
  48. package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
  49. package/dist/components/sidebar-user-card.component.js +20 -3
  50. package/dist/components/sidebar-user-card.component.js.map +1 -1
  51. package/dist/components/switch.component.d.ts.map +1 -1
  52. package/dist/components/switch.component.js +17 -16
  53. package/dist/components/switch.component.js.map +1 -1
  54. package/dist/components/tabs.component.d.ts +10 -0
  55. package/dist/components/tabs.component.d.ts.map +1 -1
  56. package/dist/components/tabs.component.js +19 -7
  57. package/dist/components/tabs.component.js.map +1 -1
  58. package/dist/components/textarea.component.d.ts +8 -1
  59. package/dist/components/textarea.component.d.ts.map +1 -1
  60. package/dist/components/textarea.component.js +18 -3
  61. package/dist/components/textarea.component.js.map +1 -1
  62. package/dist/components/tooltip.component.d.ts.map +1 -1
  63. package/dist/components/tooltip.component.js +3 -2
  64. package/dist/components/tooltip.component.js.map +1 -1
  65. package/dist/utilities/rest-attrs.d.ts +35 -2
  66. package/dist/utilities/rest-attrs.d.ts.map +1 -1
  67. package/dist/utilities/rest-attrs.js +38 -2
  68. package/dist/utilities/rest-attrs.js.map +1 -1
  69. package/package.json +5 -4
@@ -34,6 +34,16 @@ export declare class Card {
34
34
  * @returns The style attribute text.
35
35
  */
36
36
  hostStyle(): string | null;
37
+ /**
38
+ * An interactive card is announced as a button and sits in the tab order, so
39
+ * Enter and Space activate it the way they activate a native button: by
40
+ * clicking it, which runs the consumer's click handler with a real click
41
+ * event. Keys pressed in a control inside the card belong to that control,
42
+ * and a card that is not interactive ignores keys.
43
+ *
44
+ * @param event - The key event.
45
+ */
46
+ handleKeyDown(event: KeyboardEvent): void;
37
47
  static ɵfac: i0.ɵɵFactoryDeclaration<Card, never>;
38
48
  static ɵcmp: i0.ɵɵComponentDeclaration<Card, "div[mol-card]", never, { "variant": { "alias": "variant"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, ["*"], true, never>;
39
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../src/components/card.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAYlD;;;;;GAKG;AACH,qBAaa,IAAI;IACf,oBAAoB;IACpB,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAa;IAC9E,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oDAAoD;IACpD,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAO;IAC3C,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAUjB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;yCAxCf,IAAI;2CAAJ,IAAI;CA2ChB;AAED;;GAEG;AACH,qBASa,UAAU;IACrB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,UAAU;2CAAV,UAAU;CAmBtB;AAED;;GAEG;AACH,qBASa,SAAS;IACpB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,SAAS;2CAAT,SAAS;CAmBrB;AAED;;GAEG;AACH,qBASa,eAAe;IAC1B,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,eAAe;2CAAf,eAAe;CAmB3B;AAED;;GAEG;AACH,qBASa,WAAW;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,WAAW;2CAAX,WAAW;CAmBvB;AAED;;GAEG;AACH,qBASa,UAAU;IACrB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,UAAU;2CAAV,UAAU;CAmBtB"}
1
+ {"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../src/components/card.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAYlD;;;;;GAKG;AACH,qBAca,IAAI;IACf,oBAAoB;IACpB,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAa;IAC9E,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oDAA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2CAAX,WAAW;CAmBvB;AAED;;GAEG;AACH,qBASa,UAAU;IACrB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCAhBN,UAAU;2CAAV,UAAU;CAmBtB"}
@@ -56,8 +56,27 @@ export class Card {
56
56
  hostStyle() {
57
57
  return styleText(this.style);
58
58
  }
59
+ /**
60
+ * An interactive card is announced as a button and sits in the tab order, so
61
+ * Enter and Space activate it the way they activate a native button: by
62
+ * clicking it, which runs the consumer's click handler with a real click
63
+ * event. Keys pressed in a control inside the card belong to that control,
64
+ * and a card that is not interactive ignores keys.
65
+ *
66
+ * @param event - The key event.
67
+ */
68
+ handleKeyDown(event) {
69
+ if (!this.interactive || event.target !== event.currentTarget)
70
+ return;
71
+ if (event.key !== 'Enter' && event.key !== ' ')
72
+ return;
73
+ event.preventDefault();
74
+ event.currentTarget.click();
75
+ }
59
76
  static ɵfac = function Card_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Card)(); };
60
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Card, selectors: [["div", "mol-card", ""]], hostVars: 7, hostBindings: function Card_HostBindings(rf, ctx) { if (rf & 2) {
77
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Card, selectors: [["div", "mol-card", ""]], hostVars: 7, hostBindings: function Card_HostBindings(rf, ctx) { if (rf & 1) {
78
+ i0.ɵɵlistener("keydown", function Card_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); });
79
+ } if (rf & 2) {
61
80
  i0.ɵɵattribute("data-testid", ctx.testId)("role", ctx.interactive ? "button" : null)("tabindex", ctx.interactive ? 0 : null);
62
81
  i0.ɵɵstyleMap(ctx.hostStyle());
63
82
  i0.ɵɵclassMap(ctx.classes());
@@ -78,11 +97,12 @@ export class Card {
78
97
  '[attr.data-testid]': 'testId',
79
98
  '[attr.role]': 'interactive ? "button" : null',
80
99
  '[attr.tabindex]': 'interactive ? 0 : null',
100
+ '(keydown)': 'handleKeyDown($event)',
81
101
  },
82
102
  template: `<ng-content></ng-content>`,
83
103
  }]
84
104
  }], null, null); })();
85
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Card, { className: "Card", filePath: "components/card.component.ts", lineNumber: 41 }); })();
105
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Card, { className: "Card", filePath: "components/card.component.ts", lineNumber: 42 }); })();
86
106
  /**
87
107
  * Card header.
88
108
  */
@@ -123,7 +143,7 @@ export class CardHeader {
123
143
  template: `<ng-content></ng-content>`,
124
144
  }]
125
145
  }], null, null); })();
126
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardHeader, { className: "CardHeader", filePath: "components/card.component.ts", lineNumber: 98 }); })();
146
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardHeader, { className: "CardHeader", filePath: "components/card.component.ts", lineNumber: 115 }); })();
127
147
  /**
128
148
  * Card title (an `h3`).
129
149
  */
@@ -164,7 +184,7 @@ export class CardTitle {
164
184
  template: `<ng-content></ng-content>`,
165
185
  }]
166
186
  }], null, null); })();
167
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardTitle, { className: "CardTitle", filePath: "components/card.component.ts", lineNumber: 131 }); })();
187
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardTitle, { className: "CardTitle", filePath: "components/card.component.ts", lineNumber: 148 }); })();
168
188
  /**
169
189
  * Card description (a `p`).
170
190
  */
@@ -205,7 +225,7 @@ export class CardDescription {
205
225
  template: `<ng-content></ng-content>`,
206
226
  }]
207
227
  }], null, null); })();
208
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardDescription, { className: "CardDescription", filePath: "components/card.component.ts", lineNumber: 164 }); })();
228
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardDescription, { className: "CardDescription", filePath: "components/card.component.ts", lineNumber: 181 }); })();
209
229
  /**
210
230
  * Card content.
211
231
  */
@@ -246,7 +266,7 @@ export class CardContent {
246
266
  template: `<ng-content></ng-content>`,
247
267
  }]
248
268
  }], null, null); })();
249
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardContent, { className: "CardContent", filePath: "components/card.component.ts", lineNumber: 197 }); })();
269
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardContent, { className: "CardContent", filePath: "components/card.component.ts", lineNumber: 214 }); })();
250
270
  /**
251
271
  * Card footer.
252
272
  */
@@ -287,5 +307,5 @@ export class CardFooter {
287
307
  template: `<ng-content></ng-content>`,
288
308
  }]
289
309
  }], null, null); })();
290
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardFooter, { className: "CardFooter", filePath: "components/card.component.ts", lineNumber: 230 }); })();
310
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CardFooter, { className: "CardFooter", filePath: "components/card.component.ts", lineNumber: 247 }); })();
291
311
  //# sourceMappingURL=card.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.component.js","sourceRoot":"","sources":["../../src/components/card.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;AAEjD,sDAAsD;AACtD,MAAM,WAAW,GAAiE;IAChF,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;CA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,IAAI;gBAChB,MAAM,EAAE,CAAC,WAAW,CAAC;gBACrB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,WAAW;AAqBxB;;GAEG;AAUH,MAAM,OAAO,UAAU;IACrB,qBAAqB;IACrB,SAAS,CAAS;IAElB;;;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,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC3D,CAAC;oGAlBU,UAAU;6DAAV,UAAU;YAAV,cAAA,aAAS,CAAC;;;YAFV,kBAAyB;;;iFAEzB,UAAU;cATtB,SAAS;eAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,WAAW,CAAC;gBACrB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,UAAU"}
1
+ {"version":3,"file":"card.component.js","sourceRoot":"","sources":["../../src/components/card.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;AAEjD,sDAAsD;AACtD,MAAM,WAAW,GAAiE;IAChF,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED;;;;;GAKG;AAeH,MAAM,OAAO,IAAI;IACf,oBAAoB;IACpB,OAAO,GAA6D,UAAU,CAAA;IAC9E,gDAAgD;IAChD,WAAW,CAAU;IACrB,o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,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC5D,CAAC;qGAlBU,WAAW;6DAAX,WAAW;YAAX,cAAA,aAAS,CAAE;;;YAFX,kBAAyB;;;iFAEzB,WAAW;cATvB,SAAS;eAAC;gBACT,QAAQ,EAAE,uBAAuB;gBACjC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,WAAW,CAAC;gBACrB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,WAAW;AAqBxB;;GAEG;AAUH,MAAM,OAAO,UAAU;IACrB,qBAAqB;IACrB,SAAS,CAAS;IAElB;;;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,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC3D,CAAC;oGAlBU,UAAU;6DAAV,UAAU;YAAV,cAAA,aAAS,CAAC;;;YAFV,kBAAyB;;;iFAEzB,UAAU;cATtB,SAAS;eAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,WAAW,CAAC;gBACrB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,UAAU"}
@@ -40,11 +40,6 @@ export declare class Checkbox implements AfterViewChecked {
40
40
  id?: string;
41
41
  /** Uncontrolled initial checked state (renders as the checked attribute). */
42
42
  defaultChecked?: boolean;
43
- /**
44
- * The controlled-or-default checked state (React: `checked ?? defaultChecked`).
45
- * @returns True when the checked attribute renders.
46
- */
47
- isChecked(): boolean;
48
43
  /** The genuine native `change` event. */
49
44
  readonly change: EventEmitter<Event>;
50
45
  /** The native input (React's `...rest` spread target). */
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.component.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EAErB,UAAU,EACV,YAAY,EAKb,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;;AAM1E;;;;;;;GAOG;AACH,qBA6Ca,QAAS,YAAW,gBAAgB;IAC/C,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACH,SAAS,IAAI,OAAO;IAIpB,yCAAyC;IAC/B,QAAQ,CAAC,MAAM,sBAA4B;IAErD,0DAA0D;IACtC,KAAK,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IACxD,8BAA8B;IACN,SAAS,CA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AAgB,GAAG,IAAI;IAIvC;;;;OAIG;IACH,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAQlC;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAM/B;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMhC,OAAO,CAAC,WAAW,CAAQ;IAE3B;;;OAGG;IACH,kBAAkB,IAAI,IAAI;yCA3If,QAAQ;2CAAR,QAAQ;CA+JpB"}
@@ -9,15 +9,16 @@ import { fieldContext } from '../utilities/form-field-context.js';
9
9
  import { moveRestAttributes } from '../utilities/rest-attrs.js';
10
10
  import { styleText } from '../utilities/style.js';
11
11
  import { hasNodes, SlotWrapper } from './button.component.js';
12
+ import { MolControlledChecked } from './controlled-checked.directive.js';
12
13
  import * as i0 from "@angular/core";
13
14
  const _c0 = ["input"];
14
15
  const _c1 = ["labelSlot"];
15
16
  const _c2 = [[["", "slot", "label"]]];
16
17
  const _c3 = ["[slot=label]"];
17
18
  function Checkbox_Conditional_7_Template(rf, ctx) { if (rf & 1) {
18
- i0.ɵɵdomElementStart(0, "p");
19
+ i0.ɵɵelementStart(0, "p");
19
20
  i0.ɵɵtext(1);
20
- i0.ɵɵdomElementEnd();
21
+ i0.ɵɵelementEnd();
21
22
  } if (rf & 2) {
22
23
  const ctx_r0 = i0.ɵɵnextContext();
23
24
  i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().formError, ctx_r0.cm().sp("mt", 1)));
@@ -58,13 +59,6 @@ export class Checkbox {
58
59
  id;
59
60
  /** Uncontrolled initial checked state (renders as the checked attribute). */
60
61
  defaultChecked;
61
- /**
62
- * The controlled-or-default checked state (React: `checked ?? defaultChecked`).
63
- * @returns True when the checked attribute renders.
64
- */
65
- isChecked() {
66
- return (this.checked ?? this.defaultChecked) === true;
67
- }
68
62
  /** The genuine native `change` event. */
69
63
  change = new EventEmitter();
70
64
  /** The native input (React's `...rest` spread target). */
@@ -190,35 +184,36 @@ export class Checkbox {
190
184
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelSlot = _t.first);
191
185
  } }, hostVars: 2, hostBindings: function Checkbox_HostBindings(rf, ctx) { if (rf & 2) {
192
186
  i0.ɵɵclassMap(ctx.cm().formFieldWrapper);
193
- } }, inputs: { label: "label", checked: "checked", indeterminate: "indeterminate", size: "size", error: "error", className: "className", style: "style", testId: "testId", disabled: "disabled", name: "name", id: "id", defaultChecked: "defaultChecked" }, outputs: { change: "change" }, ngContentSelectors: _c3, decls: 8, vars: 17, consts: [["input", ""], ["labelSlot", ""], ["type", "checkbox", 3, "click", "change", "disabled"], [3, "class"]], template: function Checkbox_Template(rf, ctx) { if (rf & 1) {
187
+ } }, inputs: { label: "label", checked: "checked", indeterminate: "indeterminate", size: "size", error: "error", className: "className", style: "style", testId: "testId", disabled: "disabled", name: "name", id: "id", defaultChecked: "defaultChecked" }, outputs: { change: "change" }, ngContentSelectors: _c3, decls: 8, vars: 18, consts: [["input", ""], ["labelSlot", ""], ["type", "checkbox", 3, "click", "change", "molChecked", "molDefaultChecked", "disabled"], [3, "class"]], template: function Checkbox_Template(rf, ctx) { if (rf & 1) {
194
188
  i0.ɵɵprojectionDef(_c2);
195
- i0.ɵɵdomElementStart(0, "label")(1, "input", 2, 0);
196
- i0.ɵɵdomListener("click", function Checkbox_Template_input_click_1_listener($event) { return ctx.handleClick($event); })("change", function Checkbox_Template_input_change_1_listener($event) { return ctx.handleChange($event); });
197
- i0.ɵɵdomElementEnd();
198
- i0.ɵɵdomElementStart(3, "span", null, 1);
189
+ i0.ɵɵelementStart(0, "label")(1, "input", 2, 0);
190
+ i0.ɵɵlistener("click", function Checkbox_Template_input_click_1_listener($event) { return ctx.handleClick($event); })("change", function Checkbox_Template_input_change_1_listener($event) { return ctx.handleChange($event); });
191
+ i0.ɵɵelementEnd();
192
+ i0.ɵɵelementStart(3, "span", null, 1);
199
193
  i0.ɵɵtext(5);
200
194
  i0.ɵɵprojection(6);
201
- i0.ɵɵdomElementEnd()();
195
+ i0.ɵɵelementEnd()();
202
196
  i0.ɵɵconditionalCreate(7, Checkbox_Conditional_7_Template, 2, 4, "p", 3);
203
197
  } if (rf & 2) {
204
198
  i0.ɵɵclassMap(ctx.cm().controlLabel);
205
199
  i0.ɵɵadvance();
206
200
  i0.ɵɵclassMap(ctx.classes());
207
- i0.ɵɵdomProperty("disabled", ctx.disabled);
208
- i0.ɵɵattribute("id", ctx.checkboxId())("name", ctx.name)("checked", ctx.isChecked() ? "" : null)("data-state", ctx.checked ? "checked" : "unchecked")("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ? "true" : "false")("aria-describedby", ctx.mergedDescribedBy())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId);
201
+ i0.ɵɵproperty("molChecked", ctx.checked)("molDefaultChecked", ctx.defaultChecked)("disabled", ctx.disabled);
202
+ i0.ɵɵattribute("id", ctx.checkboxId())("name", ctx.name)("data-state", ctx.checked ? "checked" : "unchecked")("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ? "true" : "false")("aria-describedby", ctx.mergedDescribedBy())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId);
209
203
  i0.ɵɵadvance(2);
210
204
  i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().controlText, ctx.disabled && ctx.cm().controlDisabled));
211
205
  i0.ɵɵadvance(2);
212
206
  i0.ɵɵtextInterpolate(ctx.label);
213
207
  i0.ɵɵadvance(2);
214
208
  i0.ɵɵconditional(ctx.error ? 7 : -1);
215
- } }, encapsulation: 2 });
209
+ } }, dependencies: [MolControlledChecked], encapsulation: 2 });
216
210
  }
217
211
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Checkbox, [{
218
212
  type: Component,
219
213
  args: [{
220
214
  selector: 'div[mol-checkbox]',
221
215
  standalone: true,
216
+ imports: [MolControlledChecked],
222
217
  inputs: [
223
218
  'label',
224
219
  'checked',
@@ -241,7 +236,8 @@ export class Checkbox {
241
236
  type="checkbox"
242
237
  [attr.id]="checkboxId()"
243
238
  [attr.name]="name"
244
- [attr.checked]="isChecked() ? '' : null"
239
+ [molChecked]="checked"
240
+ [molDefaultChecked]="defaultChecked"
245
241
  [disabled]="disabled"
246
242
  [attr.data-state]="checked ? 'checked' : 'unchecked'"
247
243
  [attr.aria-invalid]="error || fieldContext()?.invalid ? 'true' : 'false'"
@@ -270,5 +266,5 @@ export class Checkbox {
270
266
  type: ViewChild,
271
267
  args: ['labelSlot']
272
268
  }] }); })();
273
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Checkbox, { className: "Checkbox", filePath: "components/checkbox.component.ts", lineNumber: 80 }); })();
269
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Checkbox, { className: "Checkbox", filePath: "components/checkbox.component.ts", lineNumber: 83 }); })();
274
270
  //# sourceMappingURL=checkbox.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../src/components/checkbox.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;;;;;;I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BxC;YAFA,AADA,6FAAS,uBAAmB,IAAC,+EACnB,wBAAoB,IAAC;YAbjC,oBAeE;YACF,wCACG;YAAA,YAAW;YAAA,kBACb;YACH,AADG,oBAAO,EACF;YACR,wEAAa;;YArBG,oCAA2B;YAUvC,cAAmB;YAAnB,4BAAmB;YAJnB,0CAAqB;;YAWjB,eAAqE;YAArE,0FAAqE;YACxE,eAAW;YAAX,+BAAW;YAGhB,eAEC;YAFD,oCAEC;;;iFAEQ,QAAQ;cA7CpB,SAAS;eAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE;oBACN,OAAO;oBACP,SAAS;oBACT,eAAe;oBACf,MAAM;oBACN,OAAO;oBACP,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,UAAU;oBACV,MAAM;oBACN,IAAI;oBACJ,gBAAgB;iBACjB;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,uBAAuB;iBACnC;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;MAuBN;aACL;;kBAoCE,MAAM;;kBAGN,SAAS;mBAAC,OAAO;;kBAEjB,SAAS;mBAAC,WAAW;;kFAxCX,QAAQ"}
1
+ {"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../src/components/checkbox.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA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C;YAdjC,iBAgBE;YACF,qCACG;YAAA,YAAW;YAAA,kBACb;YACH,AADG,iBAAO,EACF;YACR,wEAAa;;YAtBG,oCAA2B;YAWvC,cAAmB;YAAnB,4BAAmB;YAJnB,AADA,AADA,wCAAsB,yCACc,0BACf;;YAWjB,eAAqE;YAArE,0FAAqE;YACxE,eAAW;YAAX,+BAAW;YAGhB,eAEC;YAFD,oCAEC;4BA1CO,oBAAoB;;iFA4CnB,QAAQ;cA/CpB,SAAS;eAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,oBAAoB,CAAC;gBAC/B,MAAM,EAAE;oBACN,OAAO;oBACP,SAAS;oBACT,eAAe;oBACf,MAAM;oBACN,OAAO;oBACP,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,UAAU;oBACV,MAAM;oBACN,IAAI;oBACJ,gBAAgB;iBACjB;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,uBAAuB;iBACnC;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;MAwBN;aACL;;kBA4BE,MAAM;;kBAGN,SAAS;mBAAC,OAAO;;kBAEjB,SAAS;mBAAC,WAAW;;kFAhCX,QAAQ"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { EventEmitter } from '@angular/core';
6
+ import { type DoCheck, type ElementRef, EventEmitter } from '@angular/core';
7
7
  import type { UIClassMap } from '@molecule/app-ui';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
@@ -14,7 +14,25 @@ import * as i0 from "@angular/core";
14
14
  * `[slot=description]`, default). The host is unwrapped (`data-parity-unwrap`,
15
15
  * React's `Modal` root is a fragment/portal).
16
16
  */
17
- export declare class ConfirmDialog {
17
+ export declare class ConfirmDialog implements DoCheck {
18
+ /**
19
+ * Per-instance id of the rendered title heading, wired as the dialog's
20
+ * accessible name: the binding on `<mol-modal>` lands on its host element,
21
+ * which Modal's rest-attribute move copies onto the dialog `<div>` —
22
+ * `aria-labelledby` pointing at the visible `<h2>` (WAI-ARIA dialog
23
+ * pattern; axe `aria-dialog-name`).
24
+ */
25
+ readonly titleId: string;
26
+ /**
27
+ * Per-instance id of the rendered description paragraph, wired as the
28
+ * dialog's accessible description through the same rest-attribute move as
29
+ * the title (only bound when projected description content renders — a
30
+ * reference to an empty paragraph describes nothing, axe
31
+ * `aria-dialog-name`/`aria-valid-attr-value`).
32
+ */
33
+ readonly descriptionId: string;
34
+ /** The rendered description paragraph (its projected nodes decide the wiring). */
35
+ descriptionSlot?: ElementRef<HTMLParagraphElement>;
18
36
  /** Whether the dialog is open. */
19
37
  open: boolean;
20
38
  /** Title (node-valued prop). */
@@ -44,6 +62,19 @@ export declare class ConfirmDialog {
44
62
  * @returns The UIClassMap.
45
63
  */
46
64
  cm(): UIClassMap;
65
+ /**
66
+ * The dialog's accessible description id, or null when no description
67
+ * content renders. A FIELD, not a template method call: Angular memoizes a
68
+ * no-argument method binding, so it would keep the first (pre-view-init)
69
+ * value forever. Re-read each pass from the projected description nodes.
70
+ */
71
+ ariaDescribedBy: string | null;
72
+ /**
73
+ * Recomputes {@link ariaDescribedBy} before each view check. The query is
74
+ * static, so the projected nodes are readable on the first pass already; a
75
+ * later change to what renders is picked up on the next pass.
76
+ */
77
+ ngDoCheck(): void;
47
78
  /**
48
79
  * The cancel button's label.
49
80
  * @returns The label text.
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.component.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAa,YAAY,EAAU,MAAM,eAAe,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAMlD;;;;;;;GAOG;AACH,qBAiCa,aAAa;IACxB,kCAAkC;IAClC,IAAI,UAAQ;IACZ,gCAAgC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8C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,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,WAAW,UAAO;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,qEAAqE;IAC3D,QAAQ,CAAC,KAAK,wBAA8B;IACtD,oCAAoC;IAC1B,QAAQ,CAAC,OAAO,qBAA2B;IAErD;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAErC;;;;OAIG;IACH,SAAS,IAAI,IAAI;IAIjB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,WAAW,IAAI,MAAM;yCA1FV,aAAa;2CAAb,aAAa;CA+FzB"}
@@ -3,15 +3,19 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { Component, EventEmitter, Output } from '@angular/core';
6
+ import { Component, EventEmitter, Output, ViewChild, } from '@angular/core';
7
7
  import { useTranslation } from '@molecule/app-angular';
8
8
  import { getClassMap } from '@molecule/app-ui';
9
- import { Button } from './button.component.js';
9
+ import { nextInstanceId } from '../utilities/ids.js';
10
+ import { Button, hasNodes } from './button.component.js';
10
11
  import { Modal } from './modal.component.js';
11
12
  import * as i0 from "@angular/core";
12
- const _c0 = [[["", "slot", "title"]], [["", "slot", "description"]], "*"];
13
- const _c1 = ["[slot=title]", "[slot=description]", "*"];
14
- const _c2 = () => ({ justify: "end", gap: "sm" });
13
+ const _c0 = ["descriptionSlot"];
14
+ const _c1 = [[["", "slot", "title"]], [["", "slot", "description"]], "*"];
15
+ const _c2 = ["[slot=title]", "[slot=description]", "*"];
16
+ const _c3 = () => ({ justify: "end", gap: "sm" });
17
+ /** Instance counter behind {@link ConfirmDialog.titleId} (Modal's pattern). */
18
+ let confirmDialogInstances = 0;
15
19
  /**
16
20
  * ConfirmDialog component.
17
21
  *
@@ -21,6 +25,27 @@ const _c2 = () => ({ justify: "end", gap: "sm" });
21
25
  * React's `Modal` root is a fragment/portal).
22
26
  */
23
27
  export class ConfirmDialog {
28
+ /**
29
+ * Per-instance id of the rendered title heading, wired as the dialog's
30
+ * accessible name: the binding on `<mol-modal>` lands on its host element,
31
+ * which Modal's rest-attribute move copies onto the dialog `<div>` —
32
+ * `aria-labelledby` pointing at the visible `<h2>` (WAI-ARIA dialog
33
+ * pattern; axe `aria-dialog-name`).
34
+ */
35
+ titleId = `mol-confirm-dialog-title-${++confirmDialogInstances}`;
36
+ /**
37
+ * Per-instance id of the rendered description paragraph, wired as the
38
+ * dialog's accessible description through the same rest-attribute move as
39
+ * the title (only bound when projected description content renders — a
40
+ * reference to an empty paragraph describes nothing, axe
41
+ * `aria-dialog-name`/`aria-valid-attr-value`).
42
+ */
43
+ descriptionId = nextInstanceId();
44
+ /** The rendered description paragraph (its projected nodes decide the wiring). */
45
+ // `static: true` resolves the query during creation, so the projected nodes
46
+ // are readable on the FIRST change-detection pass — a non-static query
47
+ // resolves after view init, one pass too late for the description wiring.
48
+ descriptionSlot;
24
49
  /** Whether the dialog is open. */
25
50
  open = false;
26
51
  /** Title (node-valued prop). */
@@ -52,6 +77,21 @@ export class ConfirmDialog {
52
77
  cm() {
53
78
  return getClassMap();
54
79
  }
80
+ /**
81
+ * The dialog's accessible description id, or null when no description
82
+ * content renders. A FIELD, not a template method call: Angular memoizes a
83
+ * no-argument method binding, so it would keep the first (pre-view-init)
84
+ * value forever. Re-read each pass from the projected description nodes.
85
+ */
86
+ ariaDescribedBy = null;
87
+ /**
88
+ * Recomputes {@link ariaDescribedBy} before each view check. The query is
89
+ * static, so the projected nodes are readable on the first pass already; a
90
+ * later change to what renders is picked up on the next pass.
91
+ */
92
+ ngDoCheck() {
93
+ this.ariaDescribedBy = hasNodes(this.descriptionSlot?.nativeElement) ? this.descriptionId : null;
94
+ }
55
95
  /**
56
96
  * The cancel button's label.
57
97
  * @returns The label text.
@@ -69,35 +109,43 @@ export class ConfirmDialog {
69
109
  : (this.confirmLabel ?? this.i18n.t('confirm.confirm', {}, { defaultValue: 'Confirm' }));
70
110
  }
71
111
  static ɵfac = function ConfirmDialog_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConfirmDialog)(); };
72
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfirmDialog, selectors: [["mol-confirm-dialog"]], hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], inputs: { open: "open", title: "title", description: "description", confirmLabel: "confirmLabel", cancelLabel: "cancelLabel", destructive: "destructive", loading: "loading" }, outputs: { close: "close", confirm: "confirm" }, ngContentSelectors: _c1, decls: 12, vars: 17, consts: [[3, "close", "open"], ["mol-button", "", 3, "click", "variant", "disabled"], ["mol-button", "", 3, "click", "variant", "color", "disabled"]], template: function ConfirmDialog_Template(rf, ctx) { if (rf & 1) {
73
- i0.ɵɵprojectionDef(_c0);
74
- i0.ɵɵelementStart(0, "mol-modal", 0);
112
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfirmDialog, selectors: [["mol-confirm-dialog"]], viewQuery: function ConfirmDialog_Query(rf, ctx) { if (rf & 1) {
113
+ i0.ɵɵviewQuery(_c0, 7);
114
+ } if (rf & 2) {
115
+ let _t;
116
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.descriptionSlot = _t.first);
117
+ } }, hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], inputs: { open: "open", title: "title", description: "description", confirmLabel: "confirmLabel", cancelLabel: "cancelLabel", destructive: "destructive", loading: "loading" }, outputs: { close: "close", confirm: "confirm" }, ngContentSelectors: _c2, decls: 13, vars: 21, consts: [["descriptionSlot", ""], [3, "close", "open"], ["mol-button", "", 3, "click", "variant", "disabled"], ["mol-button", "", 3, "click", "variant", "color", "disabled"]], template: function ConfirmDialog_Template(rf, ctx) { if (rf & 1) {
118
+ i0.ɵɵprojectionDef(_c1);
119
+ i0.ɵɵelementStart(0, "mol-modal", 1);
75
120
  i0.ɵɵlistener("close", function ConfirmDialog_Template_mol_modal_close_0_listener($event) { return ctx.close.emit($event); });
76
121
  i0.ɵɵelementStart(1, "div")(2, "h2");
77
122
  i0.ɵɵprojection(3);
78
123
  i0.ɵɵelementEnd();
79
- i0.ɵɵelementStart(4, "p");
80
- i0.ɵɵprojection(5, 1);
124
+ i0.ɵɵelementStart(4, "p", null, 0);
125
+ i0.ɵɵprojection(6, 1);
81
126
  i0.ɵɵelementEnd();
82
- i0.ɵɵprojection(6, 2);
83
- i0.ɵɵelementStart(7, "div")(8, "button", 1);
84
- i0.ɵɵlistener("click", function ConfirmDialog_Template_button_click_8_listener($event) { return ctx.close.emit($event); });
85
- i0.ɵɵtext(9);
127
+ i0.ɵɵprojection(7, 2);
128
+ i0.ɵɵelementStart(8, "div")(9, "button", 2);
129
+ i0.ɵɵlistener("click", function ConfirmDialog_Template_button_click_9_listener($event) { return ctx.close.emit($event); });
130
+ i0.ɵɵtext(10);
86
131
  i0.ɵɵelementEnd();
87
- i0.ɵɵelementStart(10, "button", 2);
88
- i0.ɵɵlistener("click", function ConfirmDialog_Template_button_click_10_listener() { return ctx.confirm.emit(); });
89
- i0.ɵɵtext(11);
132
+ i0.ɵɵelementStart(11, "button", 3);
133
+ i0.ɵɵlistener("click", function ConfirmDialog_Template_button_click_11_listener() { return ctx.confirm.emit(); });
134
+ i0.ɵɵtext(12);
90
135
  i0.ɵɵelementEnd()()()();
91
136
  } if (rf & 2) {
92
137
  i0.ɵɵproperty("open", ctx.open);
138
+ i0.ɵɵattribute("aria-labelledby", ctx.titleId)("aria-describedby", ctx.ariaDescribedBy);
93
139
  i0.ɵɵadvance();
94
140
  i0.ɵɵclassMap(ctx.cm().stack(3));
95
141
  i0.ɵɵadvance();
96
142
  i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().textSize("lg"), ctx.cm().fontWeight("bold")));
143
+ i0.ɵɵattribute("id", ctx.titleId);
97
144
  i0.ɵɵadvance(2);
98
145
  i0.ɵɵclassMap(ctx.cm().textSize("sm"));
99
- i0.ɵɵadvance(3);
100
- i0.ɵɵclassMap(ctx.cm().flex(i0.ɵɵpureFunction0(16, _c2)));
146
+ i0.ɵɵattribute("id", ctx.descriptionId);
147
+ i0.ɵɵadvance(4);
148
+ i0.ɵɵclassMap(ctx.cm().flex(i0.ɵɵpureFunction0(20, _c3)));
101
149
  i0.ɵɵadvance();
102
150
  i0.ɵɵproperty("variant", "ghost")("disabled", !!ctx.loading);
103
151
  i0.ɵɵadvance();
@@ -120,12 +168,18 @@ export class ConfirmDialog {
120
168
  'data-parity-unwrap': '',
121
169
  style: 'display: contents',
122
170
  },
123
- template: `<mol-modal [open]="open" (close)="close.emit($event)"
171
+ template: `<mol-modal
172
+ [open]="open"
173
+ (close)="close.emit($event)"
174
+ [attr.aria-labelledby]="titleId"
175
+ [attr.aria-describedby]="ariaDescribedBy"
124
176
  ><div [class]="cm().stack(3)">
125
- <h2 [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">
177
+ <h2 [attr.id]="titleId" [class]="cm().cn(cm().textSize('lg'), cm().fontWeight('bold'))">
126
178
  <ng-content select="[slot=title]"></ng-content>
127
179
  </h2>
128
- <p [class]="cm().textSize('sm')"><ng-content select="[slot=description]"></ng-content></p>
180
+ <p #descriptionSlot [attr.id]="descriptionId" [class]="cm().textSize('sm')">
181
+ <ng-content select="[slot=description]"></ng-content>
182
+ </p>
129
183
  <ng-content></ng-content>
130
184
  <div [class]="cm().flex({ justify: 'end', gap: 'sm' })">
131
185
  <button mol-button [variant]="'ghost'" [disabled]="!!loading" (click)="close.emit($event)">
@@ -143,10 +197,13 @@ export class ConfirmDialog {
143
197
  </div></mol-modal
144
198
  >`,
145
199
  }]
146
- }], null, { close: [{
200
+ }], null, { descriptionSlot: [{
201
+ type: ViewChild,
202
+ args: ['descriptionSlot', { static: true }]
203
+ }], close: [{
147
204
  type: Output
148
205
  }], confirm: [{
149
206
  type: Output
150
207
  }] }); })();
151
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmDialog, { className: "ConfirmDialog", filePath: "components/confirm-dialog.component.ts", lineNumber: 57 }); })();
208
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmDialog, { className: "ConfirmDialog", filePath: "components/confirm-dialog.component.ts", lineNumber: 74 }); })();
152
209
  //# sourceMappingURL=confirm-dialog.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.component.js","sourceRoot":"","sources":["../../src/components/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;;;;;AAE5C;;;;;;;GAOG;AAkCH,MAAM,OAAO,aAAa;IACxB,kCAAkC;IAClC,IAAI,GAAG,KAAK,CAAA;IACZ,gCAAgC;IAChC,KAAK,CAAU;IACf,8CAA8C;IAC9C,WAAW,CAAU;IACrB,4BAA4B;IAC5B,YAAY,CAAS;IACrB,2BAA2B;IAC3B,WAAW,CAAS;IACpB,gEAAgE;IAChE,WAAW,GAAG,IAAI,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAU;IAEjB,qEAAqE;IAClD,KAAK,GAAG,IAAI,YAAY,EAAW,CAAA;IACtD,oCAAoC;IACjB,OAAO,GAAG,IAAI,YAAY,EAAQ,CAAA;IAErD;;;;OAIG;IACc,IAAI,GAAG,cAAc,EAAE,CAAA;IAExC;;;OAGG;IACH,EAAE;QACA,OAAO,WAAW,EAAE,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,UA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CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,CAAC;gBACjG,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;gBAC7B,IAAI,EAAE;oBACJ,oBAAoB,EAAE,EAAE;oBACxB,KAAK,EAAE,mBAAmB;iBAC3B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;IAqBR;aACH;;kBAkBE,MAAM;;kBAEN,MAAM;;kFAnBI,aAAa"}
1
+ {"version":3,"file":"confirm-dialog.component.js","sourceRoot":"","sources":["../../src/components/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAGT,YAAY,EACZ,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;;;;;;AAE5C,+EAA+E;AAC/E,IAAI,sBAAsB,GAAG,CAAC,CAAA;AAE9B;;;;;;;GAOG;AAwCH,MAAM,OAAO,aAAa;IACxB;;;;;;OAMG;IACM,OAAO,GAAG,4BAA4B,EAAE,sBAAsB,EAAE,CAAA;IAEzE;;;;;;OAMG;IACM,aAAa,GAAG,cAAc,EAAE,CAAA;IAEzC,kFAAkF;IAClF,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAE1E,eAAe,CAAmC;IAElD,kCAAkC;IAClC,IAAI,GAAG,KAAK,CAAA;IACZ,gCAAgC;IAChC,KAAK,CAAU;IACf,8CAA8C;IAC9C,WAAW,CAAU;IACrB,4BAA4B;IAC5B,YAAY,CAAS;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AAkB,IAAC;YACxF,aAAkB;YAAA,iBACnB;YAAA,kCAMA;YADC,2FAAS,kBAAc,IAAC;YAExB,aACF;YAEE,AAAN,AADE,AADE,iBAAS,EACL,EACF,EACP;;YA1BC,+BAAa;;YAIP,cAAuB;YAAvB,gCAAuB;YACH,cAA+D;YAA/D,gFAA+D;;YAGzC,eAA6B;YAA7B,sCAA6B;;YAItE,eAAkD;YAAlD,yDAAkD;YAClC,cAAmB;YAAC,AAApB,iCAAmB,2BAAuB;YAC3D,cAAkB;YAAlB,4CAAkB;YAGlB,cAAmB;YAEnB,AADA,AADA,iCAAmB,0DACkC,2BAC/B;YAGtB,cACF;YADE,kDACF;4BA/BI,MAAM,EAAE,KAAK;;iFAoCZ,aAAa;cAvCzB,SAAS;eAAC;gBACT,QAAQ,EAAE,oBAAoB;gBAC9B,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;gBACxB,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,CAAC;gBACjG,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;gBAC7B,IAAI,EAAE;oBACJ,oBAAoB,EAAE,EAAE;oBACxB,KAAK,EAAE,mBAAmB;iBAC3B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BR;aACH;;kBAwBE,SAAS;mBAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;kBAmB7C,MAAM;;kBAEN,MAAM;;kFA5CI,aAAa"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Writes a checkbox's or radio's `checked` state the way React writes it.
3
+ *
4
+ * React treats creation and update differently: when it creates the input it
5
+ * sets the reflected `checked` attribute (from `checked ?? defaultChecked`);
6
+ * on every later render it sets only the property. A switch created unchecked
7
+ * and turned on therefore has no `checked` attribute, and one created checked
8
+ * and turned off keeps it. An `[attr.checked]` binding rewrites the attribute
9
+ * on every change, so the UI components bind `checked` through this directive
10
+ * instead.
11
+ *
12
+ * @module
13
+ */
14
+ import { type OnChanges, type SimpleChanges } from '@angular/core';
15
+ import * as i0 from "@angular/core";
16
+ /**
17
+ * `<input type="checkbox" [molChecked]="checked" [molDefaultChecked]="defaultChecked">`:
18
+ * a controlled `molChecked` sets the property on every change and the
19
+ * attribute only at creation; with `molChecked` undefined the input is
20
+ * uncontrolled and its attribute follows `molDefaultChecked`, which the
21
+ * user's own toggles never touch.
22
+ */
23
+ export declare class MolControlledChecked implements OnChanges {
24
+ /** The controlled value, or `undefined` for an uncontrolled input. */
25
+ molChecked?: boolean;
26
+ /** The uncontrolled initial value (React's `defaultChecked`). */
27
+ molDefaultChecked?: boolean;
28
+ private readonly element;
29
+ private created;
30
+ /**
31
+ * Applies the first values as React's creation does, and later ones as its updates do.
32
+ *
33
+ * @param changes - The inputs that changed.
34
+ */
35
+ ngOnChanges(changes: SimpleChanges): void;
36
+ /**
37
+ * Sets or removes the reflected `checked` attribute.
38
+ *
39
+ * @param on - Whether the attribute is present.
40
+ */
41
+ private reflect;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<MolControlledChecked, never>;
43
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MolControlledChecked, "input[molChecked], input[molDefaultChecked]", never, { "molChecked": { "alias": "molChecked"; "required": false; }; "molDefaultChecked": { "alias": "molDefaultChecked"; "required": false; }; }, {}, never, never, true, never>;
44
+ }
45
+ //# sourceMappingURL=controlled-checked.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controlled-checked.directive.d.ts","sourceRoot":"","sources":["../../src/components/controlled-checked.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAiC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;;AAEjG;;;;;;GAMG;AACH,qBAKa,oBAAqB,YAAW,SAAS;IACpD,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAE3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmD;IAC3E,OAAO,CAAC,OAAO,CAAQ;IAEvB;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAczC;;;;OAIG;IACH,OAAO,CAAC,OAAO;yCAjCJ,oBAAoB;2CAApB,oBAAoB;CAsChC"}