@nanahoshi/mona-ui 0.18.5 → 0.19.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 (112) hide show
  1. package/README.md +71 -13
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  3. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  4. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  5. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +122 -48
  6. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  7. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +199 -77
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  15. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +28 -16
  16. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +74 -51
  17. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  18. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  19. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  20. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  21. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  22. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs} +2 -2
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs} +2 -2
  24. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs +145 -0
  25. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs} +21 -17
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs} +5 -5
  27. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs} +90 -42
  28. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  29. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +1168 -0
  30. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  31. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  32. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  33. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  34. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  36. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  37. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  38. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  39. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  40. package/fesm2022/nanahoshi-mona-ui-pager.mjs +46 -19
  41. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  42. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  43. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  44. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  45. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  46. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  47. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  48. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  49. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  50. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  51. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  52. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  53. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +32 -14
  54. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  55. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  56. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  57. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +33 -19
  58. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  59. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  60. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  61. package/i18n/package.json +4 -0
  62. package/package.json +5 -1
  63. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  64. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  65. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  66. package/types/nanahoshi-mona-ui-calendar.d.ts +13 -3
  67. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  68. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  69. package/types/nanahoshi-mona-ui-chip.d.ts +14 -5
  70. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  71. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  72. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  73. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -2
  75. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +33 -8
  76. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  77. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  78. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  79. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  80. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  81. package/types/nanahoshi-mona-ui-grid.d.ts +38 -1
  82. package/types/nanahoshi-mona-ui-i18n.d.ts +633 -0
  83. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  84. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  85. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  86. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  87. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  88. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  89. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  90. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  91. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  92. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  93. package/types/nanahoshi-mona-ui-pager.d.ts +19 -6
  94. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  95. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  96. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  97. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  98. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  99. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  100. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  101. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  102. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  103. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  104. package/types/nanahoshi-mona-ui-stepper.d.ts +9 -3
  105. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  106. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  107. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  108. package/types/nanahoshi-mona-ui-time-picker.d.ts +7 -2
  109. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  110. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  111. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  112. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -9,6 +9,7 @@ import { CdkTrapFocus } from '@angular/cdk/a11y';
9
9
  import { NgTemplateOutlet } from '@angular/common';
10
10
  import { LucideMinimize, LucideMaximize, LucideMinus, LucideDynamicIcon, LucideX } from '@lucide/angular';
11
11
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
12
+ import { MonaI18nService, mergeMessages } from '@nanahoshi/mona-ui/i18n';
12
13
  import { cva } from 'class-variance-authority';
13
14
 
14
15
  class WindowActionTemplateDirective {
@@ -55,13 +56,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
55
56
  }]
56
57
  }] });
57
58
 
58
- const DefaultMaxWindowHeight = 800;
59
- const DefaultMaxWindowWidth = 1200;
60
- const DefaultMinWindowHeight = 50;
61
- const DefaultMinWindowWidth = 50;
59
+ const DEFAULT_MAX_WINDOW_HEIGHT = 800;
60
+ const DEFAULT_MAX_WINDOW_WIDTH = 1200;
61
+ const DEFAULT_MIN_WINDOW_HEIGHT = 50;
62
+ const DEFAULT_MIN_WINDOW_WIDTH = 50;
62
63
 
63
- const KeyboardMoveStep = 10;
64
- const KeyboardMoveStepFine = 1;
64
+ const KEYBOARD_MOVE_STEP = 10;
65
+ const KEYBOARD_MOVE_STEP_FINE = 1;
65
66
  class WindowDragHandlerDirective {
66
67
  #destroyRef;
67
68
  #document;
@@ -86,10 +87,10 @@ class WindowDragHandlerDirective {
86
87
  if (!this.draggable()) {
87
88
  return;
88
89
  }
89
- const step = event.shiftKey ? KeyboardMoveStepFine : KeyboardMoveStep;
90
+ const step = event.shiftKey ? KEYBOARD_MOVE_STEP_FINE : KEYBOARD_MOVE_STEP;
90
91
  const element = this.windowRef().element;
91
- const innerWidth = this.#document.defaultView?.innerWidth || DefaultMaxWindowWidth;
92
- const innerHeight = this.#document.defaultView?.innerHeight || DefaultMaxWindowHeight;
92
+ const innerWidth = this.#document.defaultView?.innerWidth || DEFAULT_MAX_WINDOW_WIDTH;
93
+ const innerHeight = this.#document.defaultView?.innerHeight || DEFAULT_MAX_WINDOW_HEIGHT;
93
94
  const initialTop = element.getBoundingClientRect().top;
94
95
  const initialLeft = element.getBoundingClientRect().left;
95
96
  let top = initialTop;
@@ -126,8 +127,8 @@ class WindowDragHandlerDirective {
126
127
  const initialY = event.clientY;
127
128
  const initialTop = element.getBoundingClientRect().top;
128
129
  const initialLeft = element.getBoundingClientRect().left;
129
- const innerWidth = this.#document.defaultView?.innerWidth || DefaultMaxWindowWidth;
130
- const innerHeight = this.#document.defaultView?.innerHeight || DefaultMaxWindowHeight;
130
+ const innerWidth = this.#document.defaultView?.innerWidth || DEFAULT_MAX_WINDOW_WIDTH;
131
+ const innerHeight = this.#document.defaultView?.innerHeight || DEFAULT_MAX_WINDOW_HEIGHT;
131
132
  let dragInitiated = false;
132
133
  const onPointerMove = (event) => {
133
134
  if (!dragInitiated) {
@@ -181,8 +182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
181
182
  }]
182
183
  }], ctorParameters: () => [], propDecorators: { draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], windowRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowRef", required: true }] }] } });
183
184
 
184
- const KeyboardResizeStep = 10;
185
- const KeyboardResizeStepFine = 1;
185
+ const KEYBOARD_RESIZE_STEP = 10;
186
+ const KEYBOARD_RESIZE_STEP_FINE = 1;
186
187
  class WindowResizeHandlerDirective {
187
188
  #destroyRef;
188
189
  #document;
@@ -212,7 +213,7 @@ class WindowResizeHandlerDirective {
212
213
  this.#destroyRef.onDestroy(() => this.#activeCleanup?.());
213
214
  }
214
215
  onKeydown(event) {
215
- const step = event.shiftKey ? KeyboardResizeStepFine : KeyboardResizeStep;
216
+ const step = event.shiftKey ? KEYBOARD_RESIZE_STEP_FINE : KEYBOARD_RESIZE_STEP;
216
217
  let deltaX = 0;
217
218
  let deltaY = 0;
218
219
  switch (event.key) {
@@ -262,13 +263,13 @@ class WindowResizeHandlerDirective {
262
263
  });
263
264
  }
264
265
  #bounds() {
265
- const innerWidth = this.#document.defaultView?.innerWidth || DefaultMaxWindowWidth;
266
- const innerHeight = this.#document.defaultView?.innerHeight || DefaultMaxWindowHeight;
266
+ const innerWidth = this.#document.defaultView?.innerWidth || DEFAULT_MAX_WINDOW_WIDTH;
267
+ const innerHeight = this.#document.defaultView?.innerHeight || DEFAULT_MAX_WINDOW_HEIGHT;
267
268
  return {
268
269
  innerWidth,
269
270
  innerHeight,
270
- minWidth: this.minWidth() || DefaultMinWindowWidth,
271
- minHeight: this.minHeight() || DefaultMinWindowHeight,
271
+ minWidth: this.minWidth() || DEFAULT_MIN_WINDOW_WIDTH,
272
+ minHeight: this.minHeight() || DEFAULT_MIN_WINDOW_HEIGHT,
272
273
  maxWidth: this.maxWidth() ?? innerWidth,
273
274
  maxHeight: this.maxHeight() ?? innerHeight
274
275
  };
@@ -431,6 +432,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
431
432
  }]
432
433
  }], ctorParameters: () => [], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: true }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], windowRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowRef", required: true }] }] } });
433
434
 
435
+ const WINDOW_DEFAULT_MESSAGES = {
436
+ close: "Close",
437
+ closeWindow: "Close window",
438
+ maximize: "Maximize",
439
+ minimize: "Minimize",
440
+ moveWindow: "Move window. Use arrow keys to move.",
441
+ resizeBottom: "Resize window from the bottom. Use arrow keys to resize.",
442
+ resizeBottomLeft: "Resize window from the bottom-left corner. Use arrow keys to resize.",
443
+ resizeBottomRight: "Resize window from the bottom-right corner. Use arrow keys to resize.",
444
+ resizeLeft: "Resize window from the left. Use arrow keys to resize.",
445
+ resizeRight: "Resize window from the right. Use arrow keys to resize.",
446
+ resizeTop: "Resize window from the top. Use arrow keys to resize.",
447
+ resizeTopLeft: "Resize window from the top-left corner. Use arrow keys to resize.",
448
+ resizeTopRight: "Resize window from the top-right corner. Use arrow keys to resize.",
449
+ restore: "Restore"
450
+ };
451
+
434
452
  const windowBaseThemeVariants = cva(`
435
453
  flex h-full w-full flex-col
436
454
  ${themeOverlaySurfaceClasses} text-foreground
@@ -470,14 +488,14 @@ const windowResizerThemeVariants = cva(`
470
488
  `, {
471
489
  variants: {
472
490
  position: {
473
- east: "top-0 bottom-0 -right-0.5 w-2 cursor-ew-resize",
474
- north: "left-0 right-0 -top-0.5 h-2 cursor-ns-resize",
475
- south: "left-0 right-0 -bottom-0.5 h-2 cursor-ns-resize",
476
- west: "top-0 bottom-0 -left-0.5 w-2 cursor-ew-resize",
477
- northeast: "-top-0.5 -right-0.5 w-2 h-2 cursor-nesw-resize",
478
- northwest: "-top-0.5 -left-0.5 w-2 h-2 cursor-nwse-resize",
479
- southeast: "-bottom-0.5 -right-0.5 w-2 h-2 cursor-nwse-resize",
480
- southwest: "-bottom-0.5 -left-0.5 w-2 h-2 cursor-nesw-resize"
491
+ east: "inset-y-0 -end-0.5 w-2 cursor-ew-resize rtl:-start-0.5 rtl:end-auto",
492
+ north: "inset-x-0 -top-0.5 h-2 cursor-ns-resize",
493
+ south: "inset-x-0 -bottom-0.5 h-2 cursor-ns-resize",
494
+ west: "inset-y-0 -start-0.5 w-2 cursor-ew-resize rtl:-end-0.5 rtl:start-auto",
495
+ northeast: "-top-0.5 -end-0.5 w-2 h-2 cursor-nesw-resize rtl:-start-0.5 rtl:end-auto",
496
+ northwest: "-top-0.5 -start-0.5 w-2 h-2 cursor-nwse-resize rtl:-end-0.5 rtl:start-auto",
497
+ southeast: "-bottom-0.5 -end-0.5 w-2 h-2 cursor-nwse-resize rtl:-start-0.5 rtl:end-auto",
498
+ southwest: "-bottom-0.5 -start-0.5 w-2 h-2 cursor-nesw-resize rtl:-end-0.5 rtl:start-auto"
481
499
  }
482
500
  }
483
501
  });
@@ -538,7 +556,9 @@ class WindowContentComponent {
538
556
  #appRef;
539
557
  #document;
540
558
  #hostElementRef;
559
+ #i18n;
541
560
  #injector;
561
+ #localeMessages;
542
562
  #sizeBeforeMaximize;
543
563
  #sizeBeforeMinimize;
544
564
  #trapFocus;
@@ -547,7 +567,9 @@ class WindowContentComponent {
547
567
  this.#appRef = inject(ApplicationRef);
548
568
  this.#document = inject(DOCUMENT);
549
569
  this.#hostElementRef = inject(ElementRef);
570
+ this.#i18n = inject(MonaI18nService);
550
571
  this.#injector = inject(Injector);
572
+ this.#localeMessages = this.#i18n.componentMessages("window", WINDOW_DEFAULT_MESSAGES);
551
573
  this.#sizeBeforeMaximize = signal({ width: 0, height: 0, top: 0, left: 0 }, /* @ts-ignore */
552
574
  ...(ngDevMode ? [{ debugName: "#sizeBeforeMaximize" }] : /* istanbul ignore next */ []));
553
575
  this.#sizeBeforeMinimize = signal(0, /* @ts-ignore */
@@ -583,6 +605,10 @@ class WindowContentComponent {
583
605
  ...(ngDevMode ? [{ debugName: "maximizeIcon" }] : /* istanbul ignore next */ []));
584
606
  this.maximized = signal(false, /* @ts-ignore */
585
607
  ...(ngDevMode ? [{ debugName: "maximized" }] : /* istanbul ignore next */ []));
608
+ this.messages = computed(() => {
609
+ return mergeMessages(this.#localeMessages(), this.windowData.messages);
610
+ }, /* @ts-ignore */
611
+ ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
586
612
  this.minimized = signal(false, /* @ts-ignore */
587
613
  ...(ngDevMode ? [{ debugName: "minimized" }] : /* istanbul ignore next */ []));
588
614
  this.titleBarActionClass = computed(() => {
@@ -709,7 +735,7 @@ class WindowContentComponent {
709
735
  }
710
736
  }
711
737
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
712
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, properties: { "class": "baseClass()", "attr.aria-labelledby": "headerId", "attr.aria-modal": "windowData.modal ?? false" } }, viewQueries: [{ propertyName: "componentAnchor", first: true, predicate: ["componentAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? 'Move window. Use arrow keys to move.' : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? \"Restore\" : \"Maximize\";\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"'Minimize'\"\n aria-label=\"Minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n title=\"Close\"\n aria-label=\"Close window\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top. Use arrow keys to resize.\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom. Use arrow keys to resize.\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n aria-label=\"Resize window from the right. Use arrow keys to resize.\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n aria-label=\"Resize window from the left. Use arrow keys to resize.\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-right corner. Use arrow keys to resize.\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-left corner. Use arrow keys to resize.\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-right corner. Use arrow keys to resize.\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-left corner. Use arrow keys to resize.\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
738
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, properties: { "class": "baseClass()", "attr.aria-labelledby": "headerId", "attr.aria-modal": "windowData.modal ?? false" } }, viewQueries: [{ propertyName: "componentAnchor", first: true, predicate: ["componentAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? messages().moveWindow : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? messages().restore : messages().maximize;\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().minimize\"\n [attr.aria-label]=\"messages().minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().close\"\n [attr.aria-label]=\"messages().closeWindow\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTop\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottom\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeRight\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeLeft\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTopRight\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTopLeft\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottomRight\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottomLeft\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
713
739
  }
714
740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, decorators: [{
715
741
  type: Component,
@@ -727,7 +753,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
727
753
  "[attr.aria-labelledby]": "headerId",
728
754
  "[attr.aria-modal]": "windowData.modal ?? false",
729
755
  role: "dialog"
730
- }, hostDirectives: [CdkTrapFocus], template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? 'Move window. Use arrow keys to move.' : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? \"Restore\" : \"Maximize\";\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"'Minimize'\"\n aria-label=\"Minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n title=\"Close\"\n aria-label=\"Close window\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top. Use arrow keys to resize.\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom. Use arrow keys to resize.\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n aria-label=\"Resize window from the right. Use arrow keys to resize.\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n aria-label=\"Resize window from the left. Use arrow keys to resize.\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-right corner. Use arrow keys to resize.\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-left corner. Use arrow keys to resize.\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-right corner. Use arrow keys to resize.\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-left corner. Use arrow keys to resize.\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n" }]
756
+ }, hostDirectives: [CdkTrapFocus], template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? messages().moveWindow : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? messages().restore : messages().maximize;\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().minimize\"\n [attr.aria-label]=\"messages().minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"messages().close\"\n [attr.aria-label]=\"messages().closeWindow\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTop\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottom\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeRight\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeLeft\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTopRight\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeTopLeft\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottomRight\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n [attr.aria-label]=\"messages().resizeBottomLeft\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n" }]
731
757
  }], ctorParameters: () => [], propDecorators: { componentAnchor: [{ type: i0.ViewChild, args: ["componentAnchor", { ...{
732
758
  read: ViewContainerRef
733
759
  }, isSignal: true }] }] } });
@@ -805,8 +831,8 @@ class WindowReference {
805
831
  const element = this.#popupRefOrThrow.overlayRef.overlayElement;
806
832
  const width = element.getBoundingClientRect().width;
807
833
  const height = element.getBoundingClientRect().height;
808
- const left = (this.document.defaultView?.innerWidth || DefaultMaxWindowWidth - width) / 2;
809
- const top = (this.document.defaultView?.innerHeight || DefaultMaxWindowHeight - height) / 2;
834
+ const left = (this.document.defaultView?.innerWidth || DEFAULT_MAX_WINDOW_WIDTH - width) / 2;
835
+ const top = (this.document.defaultView?.innerHeight || DEFAULT_MAX_WINDOW_HEIGHT - height) / 2;
810
836
  element.style.left = `${left}px`;
811
837
  element.style.top = `${top}px`;
812
838
  }
@@ -903,6 +929,7 @@ const createWindowInjectorData = (settings) => {
903
929
  maxHeight: settings.maxHeight,
904
930
  maxWidth: settings.maxWidth,
905
931
  maximizable: settings.maximizable ?? true,
932
+ messages: settings.messages,
906
933
  minHeight: settings.minHeight ?? 50,
907
934
  minWidth: settings.minWidth ?? 50,
908
935
  minimizable: settings.minimizable ?? true,
@@ -991,20 +1018,18 @@ class WindowComponent {
991
1018
  */
992
1019
  this.closable = input(true, /* @ts-ignore */
993
1020
  ...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
994
- /**
995
- * @description Emits when the window is about to be closed.
996
- */
1021
+ // eslint-disable-next-line @angular-eslint/no-output-native
997
1022
  this.close = output();
998
- /**
999
- * @description Emitted after the window has fully closed (post-animation). Preventing this event has no effect.
1000
- */
1001
- this.closed = output();
1002
1023
  /**
1003
1024
  * @description Sets whether the window should close when the escape key is pressed.
1004
1025
  * @default true
1005
1026
  */
1006
1027
  this.closeOnEscape = input(true, /* @ts-ignore */
1007
1028
  ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
1029
+ /**
1030
+ * @description Emitted after the window has fully closed (post-animation). Preventing this event has no effect.
1031
+ */
1032
+ this.closed = output();
1008
1033
  /**
1009
1034
  * @description Emits when the window dragging ends.
1010
1035
  */
@@ -1057,6 +1082,11 @@ class WindowComponent {
1057
1082
  */
1058
1083
  this.maximizable = input(/* @ts-ignore */
1059
1084
  ...(ngDevMode ? [undefined, { debugName: "maximizable" }] : /* istanbul ignore next */ []));
1085
+ /**
1086
+ * @description Internationalization message overrides for accessible labels.
1087
+ */
1088
+ this.messages = input(/* @ts-ignore */
1089
+ ...(ngDevMode ? [undefined, { debugName: "messages" }] : /* istanbul ignore next */ []));
1060
1090
  /**
1061
1091
  * @description Sets the minimum height of the window.
1062
1092
  */
@@ -1157,6 +1187,7 @@ class WindowComponent {
1157
1187
  maxHeight: this.maxHeight(),
1158
1188
  maxWidth: this.maxWidth(),
1159
1189
  maximizable: this.maximizable(),
1190
+ messages: this.messages(),
1160
1191
  minHeight: this.minHeight(),
1161
1192
  minWidth: this.minWidth(),
1162
1193
  minimizable: this.minimizable(),
@@ -1224,7 +1255,7 @@ class WindowComponent {
1224
1255
  this.#setResizeSubscription();
1225
1256
  }
1226
1257
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1227
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: WindowComponent, isStandalone: true, selector: "mona-window", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, focusedElement: { classPropertyName: "focusedElement", publicName: "focusedElement", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minimizable: { classPropertyName: "minimizable", publicName: "minimizable", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", dragEnd: "dragEnd", dragStart: "dragStart", height: "heightChange", left: "leftChange", top: "topChange", width: "widthChange" }, host: { classAttribute: "hidden" }, queries: [{ propertyName: "actionTemplate", first: true, predicate: WindowActionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: WindowContentTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: WindowFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "titleTemplate", first: true, predicate: WindowTitleTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: ``, isInline: true }); }
1258
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: WindowComponent, isStandalone: true, selector: "mona-window", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, focusedElement: { classPropertyName: "focusedElement", publicName: "focusedElement", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minimizable: { classPropertyName: "minimizable", publicName: "minimizable", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", dragEnd: "dragEnd", dragStart: "dragStart", height: "heightChange", left: "leftChange", top: "topChange", width: "widthChange" }, host: { classAttribute: "hidden" }, queries: [{ propertyName: "actionTemplate", first: true, predicate: WindowActionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: WindowContentTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: WindowFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "titleTemplate", first: true, predicate: WindowTitleTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: ``, isInline: true }); }
1228
1259
  }
1229
1260
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowComponent, decorators: [{
1230
1261
  type: Component,
@@ -1235,7 +1266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1235
1266
  class: "hidden"
1236
1267
  }
1237
1268
  }]
1238
- }], ctorParameters: () => [], propDecorators: { actionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowActionTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowContentTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], titleTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowTitleTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], dragStart: [{ type: i0.Output, args: ["dragStart"] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], focusedElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedElement", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }, { type: i0.Output, args: ["heightChange"] }], left: [{ type: i0.Input, args: [{ isSignal: true, alias: "left", required: false }] }, { type: i0.Output, args: ["leftChange"] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], maximizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizable", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], minimizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimizable", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], top: [{ type: i0.Input, args: [{ isSignal: true, alias: "top", required: false }] }, { type: i0.Output, args: ["topChange"] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }] } });
1269
+ }], ctorParameters: () => [], propDecorators: { actionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowActionTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowContentTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], titleTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WindowTitleTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], dragStart: [{ type: i0.Output, args: ["dragStart"] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], focusedElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedElement", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }, { type: i0.Output, args: ["heightChange"] }], left: [{ type: i0.Input, args: [{ isSignal: true, alias: "left", required: false }] }, { type: i0.Output, args: ["leftChange"] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], maximizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizable", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], minimizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimizable", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], top: [{ type: i0.Input, args: [{ isSignal: true, alias: "top", required: false }] }, { type: i0.Output, args: ["topChange"] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }] } });
1239
1270
 
1240
1271
  /*
1241
1272
  * Public API Surface of @nanahoshi/mona-ui/window
@@ -1245,5 +1276,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1245
1276
  * Generated bundle index. Do not edit.
1246
1277
  */
1247
1278
 
1248
- export { WindowActionTemplateDirective, WindowComponent, WindowContentTemplateDirective, WindowFooterTemplateDirective, WindowRef, WindowService, WindowTitleTemplateDirective };
1279
+ export { WINDOW_DEFAULT_MESSAGES, WindowActionTemplateDirective, WindowComponent, WindowContentTemplateDirective, WindowFooterTemplateDirective, WindowRef, WindowService, WindowTitleTemplateDirective };
1249
1280
  //# sourceMappingURL=nanahoshi-mona-ui-window.mjs.map
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-i18n.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-i18n.d.ts"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.18.5",
3
+ "version": "0.19.0",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -187,6 +187,10 @@
187
187
  "types": "./types/nanahoshi-mona-ui-grid.d.ts",
188
188
  "default": "./fesm2022/nanahoshi-mona-ui-grid.mjs"
189
189
  },
190
+ "./i18n": {
191
+ "types": "./types/nanahoshi-mona-ui-i18n.d.ts",
192
+ "default": "./fesm2022/nanahoshi-mona-ui-i18n.mjs"
193
+ },
190
194
  "./internal": {
191
195
  "types": "./types/nanahoshi-mona-ui-internal.d.ts",
192
196
  "default": "./fesm2022/nanahoshi-mona-ui-internal.mjs"
@@ -1,3 +1,5 @@
1
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
2
+ import { MonaAutoCompleteMessages } from '@nanahoshi/mona-ui/i18n';
1
3
  import * as _angular_core from '@angular/core';
2
4
  import { TemplateRef } from '@angular/core';
3
5
  import { FormValueControl } from '@angular/forms/signals';
@@ -50,6 +52,7 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
50
52
  protected readonly isEmpty: _angular_core.Signal<boolean>;
51
53
  protected readonly listId: string;
52
54
  protected readonly listPopupClass: _angular_core.Signal<string>;
55
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaAutoCompleteMessages>;
53
56
  protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
54
57
  protected readonly popupTemplate: _angular_core.Signal<TemplateRef<any>>;
55
58
  protected readonly prefixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
@@ -219,4 +222,6 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
219
222
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AutoCompleteComponent<any>, "mona-auto-complete", never, { "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "highlightFirst": { "alias": "highlightFirst"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "suffixTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
220
223
  }
221
224
 
222
- export { AutoCompleteComponent };
225
+ declare const AUTO_COMPLETE_DEFAULT_MESSAGES: MonaAutoCompleteMessages;
226
+
227
+ export { AUTO_COMPLETE_DEFAULT_MESSAGES, AutoCompleteComponent };
@@ -1,3 +1,5 @@
1
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
2
+ import { MonaBreadcrumbMessages } from '@nanahoshi/mona-ui/i18n';
1
3
  import * as _angular_core from '@angular/core';
2
4
  import { TemplateRef } from '@angular/core';
3
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -35,14 +37,16 @@ declare class BreadcrumbItemComponent {
35
37
  }
36
38
 
37
39
  declare class BreadcrumbComponent implements BreadcrumbVariantInput {
38
- protected readonly itemComponents: _angular_core.Signal<readonly BreadcrumbItemComponent[]>;
40
+ #private;
39
41
  protected readonly currentItemClass: _angular_core.Signal<string>;
42
+ protected readonly itemComponents: _angular_core.Signal<readonly BreadcrumbItemComponent[]>;
40
43
  protected readonly listClass: _angular_core.Signal<string>;
44
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaBreadcrumbMessages>;
41
45
  protected readonly separatorTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
42
46
  /**
43
47
  * @description Accessible name for the breadcrumb navigation landmark.
44
48
  * Override when multiple breadcrumb components appear on the same page.
45
- * @default "Breadcrumb"
49
+ * @default ""
46
50
  */
47
51
  readonly ariaLabel: _angular_core.InputSignal<string>;
48
52
  /**
@@ -65,4 +69,6 @@ declare class BreadcrumbSeparatorTemplateDirective {
65
69
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BreadcrumbSeparatorTemplateDirective, "ng-template[monaBreadcrumbSeparatorTemplate]", never, {}, {}, never, never, true, never>;
66
70
  }
67
71
 
68
- export { BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbSeparatorTemplateDirective };
72
+ declare const BREADCRUMB_DEFAULT_MESSAGES: MonaBreadcrumbMessages;
73
+
74
+ export { BREADCRUMB_DEFAULT_MESSAGES, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbSeparatorTemplateDirective };
@@ -1,3 +1,4 @@
1
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
1
2
  import * as _angular_core from '@angular/core';
2
3
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
3
4
  import { SelectionMode } from '@nanahoshi/mona-ui/common';
@@ -17,6 +18,8 @@ declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
17
18
  #private;
18
19
  protected readonly baseClass: _angular_core.Signal<string>;
19
20
  protected readonly buttons: _angular_core.Signal<readonly ButtonDirective[]>;
21
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaButtonGroupMessages>;
22
+ protected readonly effectiveAriaLabel: _angular_core.Signal<string>;
20
23
  /**
21
24
  * @description When `false` and `selection` is `"single"`, at least one button must remain selected;
22
25
  * the active button cannot be deselected. Has no effect in `"multiple"` mode.
@@ -26,9 +29,8 @@ declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
26
29
  /**
27
30
  * @description Accessible name for the host element. Override when multiple button groups appear on the same page
28
31
  * so screen reader users can distinguish them.
29
- * @default "Button group"
30
32
  */
31
- readonly ariaLabel: _angular_core.InputSignal<string>;
33
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
32
34
  /**
33
35
  * @description Emitted when any child button in the group is clicked.
34
36
  * Use `[(selected)]` on child buttons to observe the resulting selection state.
@@ -72,5 +74,9 @@ declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
72
74
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent, "mona-button-group", never, { "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "disabled": "disabledChange"; "selection": "selectionChange"; }, ["buttons"], ["[monaButton]"], true, never>;
73
75
  }
74
76
 
75
- export { ButtonGroupComponent };
77
+ declare const BUTTON_GROUP_DEFAULT_MESSAGES: {
78
+ buttonGroup: string;
79
+ };
80
+
81
+ export { BUTTON_GROUP_DEFAULT_MESSAGES, ButtonGroupComponent };
76
82
  export type { ButtonGroupVariantProps };
@@ -1,6 +1,8 @@
1
1
  import * as _mirei_ts_collections from '@mirei/ts-collections';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { TemplateRef } from '@angular/core';
4
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
5
+ import { MonaCalendarMessages } from '@nanahoshi/mona-ui/i18n';
4
6
  import { FormValueControl } from '@angular/forms/signals';
5
7
  import { CalendarView, DateDisabledType } from '@nanahoshi/mona-ui/date-input';
6
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -106,6 +108,7 @@ type CalendarVariantInput = CalendarBaseVariantInput & CalendarHeaderVariantInpu
106
108
 
107
109
  declare class CalendarComponent implements CalendarVariantInput, FormValueControl<Date | Date[] | null> {
108
110
  #private;
111
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
109
112
  protected readonly ariaLabel: _angular_core.Signal<string>;
110
113
  protected readonly baseClass: _angular_core.Signal<string>;
111
114
  protected readonly calendarView: _angular_core.WritableSignal<CalendarView>;
@@ -125,10 +128,12 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
125
128
  protected readonly monthDictChunked: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableDictionary<Date, number>>>;
126
129
  protected readonly monthGridClass: _angular_core.Signal<string>;
127
130
  protected readonly monthGridHeaderClass: _angular_core.Signal<string>;
131
+ protected readonly headerMonthYear: _angular_core.Signal<string>;
132
+ protected readonly headerYear: _angular_core.Signal<string>;
128
133
  protected readonly months: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableSet<readonly [number, string]>>>;
129
134
  protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
130
- protected readonly nextButtonLabel: _angular_core.Signal<"Next month" | "Next year" | "Next decade">;
131
- protected readonly prevButtonLabel: _angular_core.Signal<"Previous month" | "Previous year" | "Previous decade">;
135
+ protected readonly nextButtonLabel: _angular_core.Signal<string>;
136
+ protected readonly prevButtonLabel: _angular_core.Signal<string>;
132
137
  protected readonly pendingRangeStart: _angular_core.WritableSignal<Date | null>;
133
138
  protected readonly rangePreviewDate: _angular_core.WritableSignal<Date | null>;
134
139
  protected readonly rangePreviewDates: _angular_core.Signal<Date[]>;
@@ -222,6 +227,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
222
227
  protected onMonthClick(month: number): void;
223
228
  protected onMonthGridPointerLeave(): void;
224
229
  protected onNavigationClick(direction: "prev" | "next"): void;
230
+ protected getWeekNumber(date: Date): number;
225
231
  protected onTodayButtonClick(): void;
226
232
  protected onViewChangeClick(view: CalendarView): void;
227
233
  protected onYearClick(year: number): void;
@@ -239,6 +245,8 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
239
245
  private handleSingleSelection;
240
246
  private isDateDisabled;
241
247
  private isEmptyValue;
248
+ private horizontalCellDelta;
249
+ private horizontalPeriodDirection;
242
250
  private navigateByDaysOrCells;
243
251
  private navigateByPeriod;
244
252
  private navigateByWeeksOrRows;
@@ -257,5 +265,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
257
265
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
258
266
  }
259
267
 
260
- export { CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective };
268
+ declare const CALENDAR_DEFAULT_MESSAGES: MonaCalendarMessages;
269
+
270
+ export { CALENDAR_DEFAULT_MESSAGES, CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective };
261
271
  export type { CalendarSelection, CalendarVariantInput, CalendarVariantProps, DecadeCellTemplateContext, FirstDayOfWeek, MonthCellTemplateContext, YearCellTemplateContext };
@@ -1,3 +1,4 @@
1
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
1
2
  import * as _angular_core from '@angular/core';
2
3
  import { TemplateRef } from '@angular/core';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -23,8 +24,8 @@ type CardVariantInput = Omit<CardBaseVariantInput, "hasFooter" | "hasHeader">;
23
24
 
24
25
  declare class CardComponent implements CardVariantInput {
25
26
  #private;
26
- protected readonly actionsCellClass: string;
27
27
  protected readonly actionTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown>[]>;
28
+ protected readonly actionsCellClass: string;
28
29
  protected readonly baseClass: _angular_core.Signal<string>;
29
30
  protected readonly contentDirective: _angular_core.Signal<CardContentDirective | undefined>;
30
31
  protected readonly descriptionCellClass: string;
@@ -34,6 +35,7 @@ declare class CardComponent implements CardVariantInput {
34
35
  protected readonly footerTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
35
36
  protected readonly headerClass: _angular_core.Signal<string>;
36
37
  protected readonly headerTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
38
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCardMessages>;
37
39
  protected readonly titleCellClass: string;
38
40
  protected readonly titleId: _angular_core.Signal<string | null>;
39
41
  protected readonly titleTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
@@ -100,5 +102,9 @@ declare class CardTitleDirective {
100
102
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardTitleDirective, "[monaCardTitle]", never, {}, {}, never, never, true, never>;
101
103
  }
102
104
 
103
- export { CardActionDirective, CardComponent, CardContentDirective, CardDescriptionDirective, CardFooterComponent, CardHeaderComponent, CardTitleDirective };
105
+ declare const CARD_DEFAULT_MESSAGES: {
106
+ actionsLabel: string;
107
+ };
108
+
109
+ export { CARD_DEFAULT_MESSAGES, CardActionDirective, CardComponent, CardContentDirective, CardDescriptionDirective, CardFooterComponent, CardHeaderComponent, CardTitleDirective };
104
110
  export type { CardVariantProps };