@nanahoshi/mona-ui 0.1.0 → 0.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 (176) hide show
  1. package/auto-complete/package.json +4 -0
  2. package/avatar/package.json +4 -0
  3. package/breadcrumb/package.json +4 -0
  4. package/button/package.json +4 -0
  5. package/button-group/package.json +4 -0
  6. package/calendar/package.json +4 -0
  7. package/check-box/package.json +4 -0
  8. package/chip/package.json +4 -0
  9. package/circular-progress-bar/package.json +4 -0
  10. package/color-gradient/package.json +4 -0
  11. package/color-palette/package.json +4 -0
  12. package/color-picker/package.json +4 -0
  13. package/combo-box/package.json +4 -0
  14. package/common/package.json +4 -0
  15. package/contextmenu/package.json +4 -0
  16. package/date-input/package.json +4 -0
  17. package/date-picker/package.json +4 -0
  18. package/datetime-picker/package.json +4 -0
  19. package/dialog/package.json +4 -0
  20. package/dropdown-button/package.json +4 -0
  21. package/dropdown-list/package.json +4 -0
  22. package/dropdowns/package.json +4 -0
  23. package/editor/package.json +4 -0
  24. package/expansion-panel/package.json +4 -0
  25. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
  51. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
  53. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  54. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
  55. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
  68. package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
  69. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
  70. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
  71. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
  73. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
  74. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
  75. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
  76. package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
  77. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
  78. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
  79. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
  80. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  81. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
  82. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
  83. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
  84. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
  86. package/fieldset/package.json +4 -0
  87. package/filter/package.json +4 -0
  88. package/grid/package.json +4 -0
  89. package/internal/filter-input/package.json +4 -0
  90. package/internal/indicator-icon/package.json +4 -0
  91. package/internal/list/package.json +4 -0
  92. package/internal/package.json +4 -0
  93. package/internal/tree/package.json +4 -0
  94. package/list/package.json +4 -0
  95. package/list-box/package.json +4 -0
  96. package/list-view/package.json +4 -0
  97. package/menubar/package.json +4 -0
  98. package/multi-select/package.json +4 -0
  99. package/notification/package.json +4 -0
  100. package/numeric-text-box/package.json +4 -0
  101. package/package.json +31 -5
  102. package/pager/package.json +4 -0
  103. package/placeholder/package.json +4 -0
  104. package/popover/package.json +4 -0
  105. package/popup/package.json +4 -0
  106. package/popup-menu/package.json +4 -0
  107. package/progress-bar/package.json +4 -0
  108. package/query/package.json +4 -0
  109. package/radio-button/package.json +4 -0
  110. package/scroll-view/package.json +4 -0
  111. package/slider/package.json +4 -0
  112. package/split-button/package.json +4 -0
  113. package/splitter/package.json +4 -0
  114. package/stepper/package.json +4 -0
  115. package/switch/package.json +4 -0
  116. package/tabs/package.json +4 -0
  117. package/text-area/package.json +4 -0
  118. package/text-box/package.json +4 -0
  119. package/theme/package.json +4 -0
  120. package/time-picker/package.json +4 -0
  121. package/time-selector/package.json +4 -0
  122. package/tooltip/package.json +4 -0
  123. package/tree-view/package.json +4 -0
  124. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  125. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  126. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  127. package/types/nanahoshi-mona-ui-button.d.ts +6 -6
  128. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  129. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  130. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  131. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  132. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  133. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  134. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
  135. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  136. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  137. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  138. package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
  139. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  140. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  141. package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
  142. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  143. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  144. package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
  145. package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  147. package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
  148. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  149. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  150. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  151. package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
  152. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  154. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  155. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  156. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  157. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  158. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  159. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  160. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  161. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  162. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  163. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  164. package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
  165. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  166. package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
  167. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  168. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  169. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  170. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  171. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  172. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  173. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  174. package/window/package.json +4 -0
  175. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
  176. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
@@ -2,15 +2,13 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Directive, signal, Injectable, inject, DestroyRef, ElementRef, computed, contentChild, TemplateRef, viewChild, input, output, model, afterNextRender, effect, untracked, forwardRef, Component } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
5
+ import { none } from '@mirei/ts-collections';
6
6
  import { ChipComponent } from '@nanahoshi/mona-ui/chip';
7
7
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
8
8
  import { DropdownService, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, dropdownPopupThemeVariants, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownLiveRegionDirective, DropdownDataInputToken, DropdownPopupInputToken, DropdownDataHandlerDirective, DropdownListPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
9
- import { createElementControlId, restoreOverlayScroll, rxFromResize } from '@nanahoshi/mona-ui/internal';
9
+ import { themeControlSurfaceClasses, createElementControlId, restoreOverlayScroll, rxFromResize } from '@nanahoshi/mona-ui/internal';
10
10
  import { IndicatorIconComponent } from '@nanahoshi/mona-ui/internal/indicator-icon';
11
11
  import { ListService, ListComponent, ListGroupHeaderTemplateDirective, ListItemTemplateDirective, ListFooterTemplateDirective, ListHeaderTemplateDirective, ListNoDataTemplateDirective } from '@nanahoshi/mona-ui/internal/list';
12
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
13
- import { none } from '@mirei/ts-collections';
14
12
  import { filter, tap } from 'rxjs';
15
13
  import { twMerge } from 'tailwind-merge';
16
14
  import { cva } from 'class-variance-authority';
@@ -40,23 +38,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
40
38
  type: Injectable
41
39
  }] });
42
40
 
43
- const multiSelectBaseVariants = cva(`
44
- flex items-center justify-between
45
- border border-input-border outline-none
46
- bg-background shadow-xs
47
- cursor-pointer
48
- focus-within:ring-1 focus-within:ring-primary/40
49
- transition-[color,box-shadow,border] ease-in-out duration-300
41
+ const multiSelectBaseThemeVariants = cva(`
42
+ flex items-center justify-between
43
+ cursor-pointer
44
+ ${themeControlSurfaceClasses} text-foreground
45
+ border border-input-border shadow-(--shadow-control) outline-none
46
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
47
+ data-[readonly='true']:cursor-default
48
+ focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
50
49
  `, {
51
50
  variants: {
52
51
  disabled: {
53
- true: "pointer-events-none opacity-50 cursor-not-allowed"
52
+ true: `
53
+ pointer-events-none cursor-not-allowed
54
+ bg-disabled-background text-disabled-foreground
55
+ border-disabled-border shadow-none
56
+ `
54
57
  },
55
58
  focused: {
56
- true: "ring-1 ring-primary/40"
59
+ true: "border-focus-indicator ring-2 ring-focus-indicator/35"
57
60
  },
58
61
  invalid: {
59
- true: "border-error ring-1 ring-error/40",
62
+ true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
60
63
  false: ""
61
64
  },
62
65
  rounded: {
@@ -71,10 +74,17 @@ const multiSelectBaseVariants = cva(`
71
74
  medium: "min-h-9 text-sm",
72
75
  large: "min-h-10 text-md"
73
76
  }
74
- }
77
+ },
78
+ compoundVariants: [
79
+ {
80
+ focused: true,
81
+ invalid: true,
82
+ class: "border-error ring-error/35"
83
+ }
84
+ ]
75
85
  });
76
- const multiSelectItemContainerVariants = cva(`
77
- flex flex-1 items-center gap-1 flex-wrap p-1
86
+ const multiSelectItemContainerThemeVariants = cva(`
87
+ flex flex-1 flex-wrap items-center gap-1 p-1
78
88
  `, {
79
89
  variants: {
80
90
  rounded: {
@@ -86,8 +96,8 @@ const multiSelectItemContainerVariants = cva(`
86
96
  }
87
97
  }
88
98
  });
89
- const multiSelectAffixContainerVariants = cva(`h-full flex flex-none items-center justify-center`);
90
- const multiSelectIndicatorContainerVariants = cva(`self-center`, {
99
+ const multiSelectAffixContainerThemeVariants = cva(`flex h-full flex-none items-center justify-center`);
100
+ const multiSelectIndicatorContainerThemeVariants = cva(`self-center`, {
91
101
  variants: {
92
102
  size: {
93
103
  small: "h-8",
@@ -97,39 +107,6 @@ const multiSelectIndicatorContainerVariants = cva(`self-center`, {
97
107
  }
98
108
  });
99
109
 
100
- const multiSelectBaseThemeVariants = (theme) => {
101
- switch (theme) {
102
- case "mona":
103
- return multiSelectBaseVariants;
104
- default:
105
- return multiSelectBaseVariants;
106
- }
107
- };
108
- const multiSelectItemContainerThemeVariants = (theme) => {
109
- switch (theme) {
110
- case "mona":
111
- return multiSelectItemContainerVariants;
112
- default:
113
- return multiSelectItemContainerVariants;
114
- }
115
- };
116
- const multiSelectAffixContainerThemeVariants = (theme) => {
117
- switch (theme) {
118
- case "mona":
119
- return multiSelectAffixContainerVariants;
120
- default:
121
- return multiSelectAffixContainerVariants;
122
- }
123
- };
124
- const multiSelectIndicatorContainerThemeVariants = (theme) => {
125
- switch (theme) {
126
- case "mona":
127
- return multiSelectIndicatorContainerVariants;
128
- default:
129
- return multiSelectIndicatorContainerVariants;
130
- }
131
- };
132
-
133
110
  class MultiSelectComponent {
134
111
  #destroyRef;
135
112
  #dropdownService;
@@ -137,7 +114,6 @@ class MultiSelectComponent {
137
114
  #listService;
138
115
  #multiSelectService;
139
116
  #popupRef;
140
- #themeService;
141
117
  constructor() {
142
118
  this.#destroyRef = inject(DestroyRef);
143
119
  this.#dropdownService = inject(DropdownService);
@@ -145,25 +121,22 @@ class MultiSelectComponent {
145
121
  this.#listService = inject((ListService));
146
122
  this.#multiSelectService = inject(MultiSelectService);
147
123
  this.#popupRef = this.#dropdownService.popupRef;
148
- this.#themeService = inject(ThemeService);
149
124
  this.activeDescendant = computed(() => {
150
125
  const highlightedItem = this.#listService.highlightedItem();
151
126
  return highlightedItem ? highlightedItem.uid : null;
152
127
  }, /* @ts-ignore */
153
128
  ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
154
129
  this.affixClass = computed(() => {
155
- const theme = this.#themeService.theme();
156
- return multiSelectAffixContainerThemeVariants(theme)();
130
+ return multiSelectAffixContainerThemeVariants();
157
131
  }, /* @ts-ignore */
158
132
  ...(ngDevMode ? [{ debugName: "affixClass" }] : /* istanbul ignore next */ []));
159
133
  this.baseClass = computed(() => {
160
- const theme = this.#themeService.theme();
161
134
  const disabled = this.disabled();
162
135
  const focused = this.#popupRef() != null;
163
136
  const invalid = this.invalidState();
164
137
  const rounded = this.rounded();
165
138
  const size = this.size();
166
- const variantClass = multiSelectBaseThemeVariants(theme)({ disabled, focused, invalid, rounded, size });
139
+ const variantClass = multiSelectBaseThemeVariants({ disabled, focused, invalid, rounded, size });
167
140
  const userClass = this.userClass();
168
141
  return twMerge(variantClass, userClass);
169
142
  }, /* @ts-ignore */
@@ -176,25 +149,22 @@ class MultiSelectComponent {
176
149
  this.invalidState = computed(() => this.invalid() || (this.required() && this.touched() && none(this.value())), /* @ts-ignore */
177
150
  ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
178
151
  this.indicatorClass = computed(() => {
179
- const theme = this.#themeService.theme();
180
152
  const size = this.size();
181
- return multiSelectIndicatorContainerThemeVariants(theme)({ size });
153
+ return multiSelectIndicatorContainerThemeVariants({ size });
182
154
  }, /* @ts-ignore */
183
155
  ...(ngDevMode ? [{ debugName: "indicatorClass" }] : /* istanbul ignore next */ []));
184
156
  this.itemContainerClass = computed(() => {
185
- const theme = this.#themeService.theme();
186
157
  const rounded = this.rounded();
187
- return multiSelectItemContainerThemeVariants(theme)({ rounded });
158
+ return multiSelectItemContainerThemeVariants({ rounded });
188
159
  }, /* @ts-ignore */
189
160
  ...(ngDevMode ? [{ debugName: "itemContainerClass" }] : /* istanbul ignore next */ []));
190
161
  this.itemTemplate = contentChild(DropdownItemTemplateDirective, { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
191
162
  this.listId = createElementControlId();
192
163
  this.listPopupClass = computed(() => {
193
- const theme = this.#themeService.theme();
194
164
  const rounded = this.rounded();
195
165
  const size = this.size();
196
166
  const userClass = this.popupClass();
197
- const variantClass = dropdownPopupThemeVariants(theme)({ rounded, size });
167
+ const variantClass = dropdownPopupThemeVariants({ rounded, size });
198
168
  return twMerge(variantClass, userClass);
199
169
  }, /* @ts-ignore */
200
170
  ...(ngDevMode ? [{ debugName: "listPopupClass" }] : /* istanbul ignore next */ []));
@@ -522,7 +492,7 @@ class MultiSelectComponent {
522
492
  }
523
493
  }
524
494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
525
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "mona-multi-select", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, checkboxes: { classPropertyName: "checkboxes", publicName: "checkboxes", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.aria-activedescendant": "activeDescendant()", "attr.aria-busy": "loading() ? 'true' : undefined", "attr.aria-controls": "listId", "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-expanded": "expanded()", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.role": "'combobox'", "attr.tabindex": "disabled() ? null : 0", "attr.data-invalid": "invalidState() || null", "class": "baseClass()" } }, providers: [
495
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "mona-multi-select", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, checkboxes: { classPropertyName: "checkboxes", publicName: "checkboxes", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.aria-activedescendant": "activeDescendant()", "attr.aria-busy": "loading() ? 'true' : undefined", "attr.aria-controls": "listId", "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-expanded": "expanded()", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.data-disabled": "disabled() || null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.role": "'combobox'", "attr.tabindex": "disabled() ? null : 0", "class": "baseClass()" } }, providers: [
526
496
  ListService,
527
497
  DropdownService,
528
498
  MultiSelectService,
@@ -536,7 +506,7 @@ class MultiSelectComponent {
536
506
  useExisting: forwardRef(() => MultiSelectComponent),
537
507
  multi: false
538
508
  }
539
- ], queries: [{ propertyName: "footerTemplate", first: true, predicate: DropdownFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: DropdownGroupHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: DropdownHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: DropdownItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: DropdownNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DropdownPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "tagTemplate", first: true, predicate: MultiSelectTagTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownDataHandlerDirective }, { directive: i1.DropdownListPopupHandlerDirective }], ngImport: i0, template: "@if (prefixTemplate()) {\r\n <span [class]=\"affixClass()\">\r\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\r\n </span>\r\n}\r\n\r\n<div [class]=\"itemContainerClass()\">\r\n @for (pair of valueTextMap(); track pair.key) {\r\n <mona-chip\r\n look=\"default\"\r\n [tabindex]=\"-1\"\r\n [removable]=\"true\"\r\n [removeTabIndex]=\"-1\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n (remove)=\"onSelectedItemRemove($event, pair.key!)\">\r\n @if (tagTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"tagTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: pair.key!.data }\"></ng-container>\r\n } @else {\r\n {{ pair.value }}\r\n }\r\n </mona-chip>\r\n }\r\n\r\n @if (tagCount() >= 0 && selectedListItems().length > tagCount()) {\r\n <mona-chip\r\n look=\"outline\"\r\n [tabindex]=\"-1\"\r\n [removable]=\"true\"\r\n [removeTabIndex]=\"-1\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n (remove)=\"onSelectedItemGroupRemove($event)\">\r\n @let remainingCount = selectedDataItems().length - tagCount();\r\n @if (summaryTagTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"summaryTagTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItems(), tagCount: tagCount() }\"></ng-container>\r\n } @else {\r\n @let itemLabel = remainingCount === 1 ? \"item\" : \"items\";\r\n + {{ remainingCount }} {{ itemLabel }}\r\n }\r\n </mona-chip>\r\n }\r\n</div>\r\n\r\n@if (showClearButton() && selectedListItems().length !== 0 && !loading()) {\r\n <mona-indicator-icon\r\n preset=\"clear\"\r\n [class]=\"indicatorClass()\"\r\n [interactive]=\"true\"\r\n label=\"Clear\"\r\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\r\n}\r\n\r\n@if (loading()) {\r\n <mona-indicator-icon preset=\"loading\" [class]=\"indicatorClass()\" [size]=\"12\"></mona-indicator-icon>\r\n}\r\n\r\n<mona-indicator-icon preset=\"dropdown\" [class]=\"indicatorClass()\" [size]=\"18\"></mona-indicator-icon>\r\n\r\n<span monaDropdownLiveRegion></span>\r\n\r\n<ng-template #popupTemplate>\r\n <div [class]=\"listPopupClass()\">\r\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"size()\" (itemSelect)=\"onItemSelect()\">\r\n @if (footerTemplate()) {\r\n <ng-template monaListFooterTemplate>\r\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (groupHeaderTemplate()) {\r\n <ng-template monaListGroupHeaderTemplate let-group>\r\n <ng-container\r\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (headerTemplate()) {\r\n <ng-template monaListHeaderTemplate>\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (itemTemplate()) {\r\n <ng-template monaListItemTemplate let-dataItem>\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\r\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (noDataTemplate()) {\r\n <ng-template monaListNoDataTemplate>\r\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n </mona-list>\r\n </div>\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: ListComponent, selector: "mona-list", inputs: ["ariaLabel", "data", "focusOnMount", "height", "listClass", "listId", "listItemClass", "listItemStyle", "listStyle", "maxHeight", "maxWidth", "size", "textField", "width"], outputs: ["itemSelect"] }, { kind: "directive", type: ListGroupHeaderTemplateDirective, selector: "ng-template[monaListGroupHeaderTemplate]" }, { kind: "directive", type: ListItemTemplateDirective, selector: "ng-template[monaListItemTemplate]" }, { kind: "directive", type: ListFooterTemplateDirective, selector: "ng-template[monaListFooterTemplate]" }, { kind: "directive", type: ListHeaderTemplateDirective, selector: "ng-template[monaListHeaderTemplate]" }, { kind: "directive", type: ListNoDataTemplateDirective, selector: "ng-template[monaListNoDataTemplate]" }, { kind: "directive", type: DropdownLiveRegionDirective, selector: "span[monaDropdownLiveRegion]" }, { kind: "component", type: IndicatorIconComponent, selector: "mona-indicator-icon", inputs: ["icon", "interactive", "label", "preset", "size", "class"], outputs: ["activate"] }] }); }
509
+ ], queries: [{ propertyName: "footerTemplate", first: true, predicate: DropdownFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: DropdownGroupHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: DropdownHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: DropdownItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: DropdownNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DropdownPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "tagTemplate", first: true, predicate: MultiSelectTagTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownDataHandlerDirective }, { directive: i1.DropdownListPopupHandlerDirective }], ngImport: i0, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<div [class]=\"itemContainerClass()\">\n @for (pair of valueTextMap(); track pair.key) {\n <mona-chip\n look=\"default\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemRemove($event, pair.key!)\">\n @if (tagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"tagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: pair.key!.data }\"></ng-container>\n } @else {\n {{ pair.value }}\n }\n </mona-chip>\n }\n\n @if (tagCount() >= 0 && selectedListItems().length > tagCount()) {\n <mona-chip\n look=\"outline\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemGroupRemove($event)\">\n @let remainingCount = selectedDataItems().length - tagCount();\n @if (summaryTagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"summaryTagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItems(), tagCount: tagCount() }\"></ng-container>\n } @else {\n @let itemLabel = remainingCount === 1 ? \"item\" : \"items\";\n + {{ remainingCount }} {{ itemLabel }}\n }\n </mona-chip>\n }\n</div>\n\n@if (showClearButton() && selectedListItems().length !== 0 && !loading()) {\n <mona-indicator-icon\n preset=\"clear\"\n [class]=\"indicatorClass()\"\n [interactive]=\"true\"\n label=\"Clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [class]=\"indicatorClass()\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [class]=\"indicatorClass()\" [size]=\"18\"></mona-indicator-icon>\n\n<span monaDropdownLiveRegion></span>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"size()\" (itemSelect)=\"onItemSelect()\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ListComponent, selector: "mona-list", inputs: ["ariaLabel", "data", "focusOnMount", "height", "listClass", "listId", "listItemClass", "listItemStyle", "listStyle", "maxHeight", "maxWidth", "size", "textField", "width"], outputs: ["itemSelect"] }, { kind: "directive", type: ListGroupHeaderTemplateDirective, selector: "ng-template[monaListGroupHeaderTemplate]" }, { kind: "directive", type: ListItemTemplateDirective, selector: "ng-template[monaListItemTemplate]" }, { kind: "directive", type: ListFooterTemplateDirective, selector: "ng-template[monaListFooterTemplate]" }, { kind: "directive", type: ListHeaderTemplateDirective, selector: "ng-template[monaListHeaderTemplate]" }, { kind: "directive", type: ListNoDataTemplateDirective, selector: "ng-template[monaListNoDataTemplate]" }, { kind: "directive", type: DropdownLiveRegionDirective, selector: "span[monaDropdownLiveRegion]" }, { kind: "component", type: IndicatorIconComponent, selector: "mona-indicator-icon", inputs: ["icon", "interactive", "label", "preset", "size", "class"], outputs: ["activate"] }] }); }
540
510
  }
541
511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MultiSelectComponent, decorators: [{
542
512
  type: Component,
@@ -557,7 +527,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
557
527
  ], imports: [
558
528
  ChipComponent,
559
529
  NgTemplateOutlet,
560
- FontAwesomeModule,
561
530
  ListComponent,
562
531
  ListGroupHeaderTemplateDirective,
563
532
  ListItemTemplateDirective,
@@ -578,12 +547,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
578
547
  "[attr.aria-labelledby]": "ariaLabelledBy()",
579
548
  "[attr.aria-readonly]": "readonly() ? true : undefined",
580
549
  "[attr.aria-required]": "required() ? true : undefined",
550
+ "[attr.data-disabled]": "disabled() || null",
551
+ "[attr.data-invalid]": "invalidState() || null",
552
+ "[attr.data-readonly]": "readonly() || null",
581
553
  "[attr.role]": "'combobox'",
582
554
  "[attr.tabindex]": "disabled() ? null : 0",
583
- "[attr.data-invalid]": "invalidState() || null",
584
555
  "[class]": "baseClass()",
585
556
  "(blur)": "onBlur()"
586
- }, template: "@if (prefixTemplate()) {\r\n <span [class]=\"affixClass()\">\r\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\r\n </span>\r\n}\r\n\r\n<div [class]=\"itemContainerClass()\">\r\n @for (pair of valueTextMap(); track pair.key) {\r\n <mona-chip\r\n look=\"default\"\r\n [tabindex]=\"-1\"\r\n [removable]=\"true\"\r\n [removeTabIndex]=\"-1\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n (remove)=\"onSelectedItemRemove($event, pair.key!)\">\r\n @if (tagTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"tagTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: pair.key!.data }\"></ng-container>\r\n } @else {\r\n {{ pair.value }}\r\n }\r\n </mona-chip>\r\n }\r\n\r\n @if (tagCount() >= 0 && selectedListItems().length > tagCount()) {\r\n <mona-chip\r\n look=\"outline\"\r\n [tabindex]=\"-1\"\r\n [removable]=\"true\"\r\n [removeTabIndex]=\"-1\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n (remove)=\"onSelectedItemGroupRemove($event)\">\r\n @let remainingCount = selectedDataItems().length - tagCount();\r\n @if (summaryTagTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"summaryTagTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItems(), tagCount: tagCount() }\"></ng-container>\r\n } @else {\r\n @let itemLabel = remainingCount === 1 ? \"item\" : \"items\";\r\n + {{ remainingCount }} {{ itemLabel }}\r\n }\r\n </mona-chip>\r\n }\r\n</div>\r\n\r\n@if (showClearButton() && selectedListItems().length !== 0 && !loading()) {\r\n <mona-indicator-icon\r\n preset=\"clear\"\r\n [class]=\"indicatorClass()\"\r\n [interactive]=\"true\"\r\n label=\"Clear\"\r\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\r\n}\r\n\r\n@if (loading()) {\r\n <mona-indicator-icon preset=\"loading\" [class]=\"indicatorClass()\" [size]=\"12\"></mona-indicator-icon>\r\n}\r\n\r\n<mona-indicator-icon preset=\"dropdown\" [class]=\"indicatorClass()\" [size]=\"18\"></mona-indicator-icon>\r\n\r\n<span monaDropdownLiveRegion></span>\r\n\r\n<ng-template #popupTemplate>\r\n <div [class]=\"listPopupClass()\">\r\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"size()\" (itemSelect)=\"onItemSelect()\">\r\n @if (footerTemplate()) {\r\n <ng-template monaListFooterTemplate>\r\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (groupHeaderTemplate()) {\r\n <ng-template monaListGroupHeaderTemplate let-group>\r\n <ng-container\r\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (headerTemplate()) {\r\n <ng-template monaListHeaderTemplate>\r\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (itemTemplate()) {\r\n <ng-template monaListItemTemplate let-dataItem>\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\r\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\r\n </ng-template>\r\n }\r\n @if (noDataTemplate()) {\r\n <ng-template monaListNoDataTemplate>\r\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\r\n </ng-template>\r\n }\r\n </mona-list>\r\n </div>\r\n</ng-template>\r\n" }]
557
+ }, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<div [class]=\"itemContainerClass()\">\n @for (pair of valueTextMap(); track pair.key) {\n <mona-chip\n look=\"default\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemRemove($event, pair.key!)\">\n @if (tagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"tagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: pair.key!.data }\"></ng-container>\n } @else {\n {{ pair.value }}\n }\n </mona-chip>\n }\n\n @if (tagCount() >= 0 && selectedListItems().length > tagCount()) {\n <mona-chip\n look=\"outline\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemGroupRemove($event)\">\n @let remainingCount = selectedDataItems().length - tagCount();\n @if (summaryTagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"summaryTagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItems(), tagCount: tagCount() }\"></ng-container>\n } @else {\n @let itemLabel = remainingCount === 1 ? \"item\" : \"items\";\n + {{ remainingCount }} {{ itemLabel }}\n }\n </mona-chip>\n }\n</div>\n\n@if (showClearButton() && selectedListItems().length !== 0 && !loading()) {\n <mona-indicator-icon\n preset=\"clear\"\n [class]=\"indicatorClass()\"\n [interactive]=\"true\"\n label=\"Clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [class]=\"indicatorClass()\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [class]=\"indicatorClass()\" [size]=\"18\"></mona-indicator-icon>\n\n<span monaDropdownLiveRegion></span>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"size()\" (itemSelect)=\"onItemSelect()\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n" }]
587
558
  }], ctorParameters: () => [], propDecorators: { footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], groupHeaderTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownGroupHeaderTemplateDirective), { ...{
588
559
  read: TemplateRef
589
560
  }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownItemTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], popupTemplate: [{ type: i0.ViewChild, args: ["popupTemplate", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], tagTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MultiSelectTagTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], checkboxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxes", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], itemDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDisabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { inject, DestroyRef, computed, signal, TemplateRef, viewChild, ViewContainerRef, input, afterNextRender, Component, ApplicationRef, DOCUMENT as DOCUMENT$1, createComponent, Injectable } from '@angular/core';
3
3
  import { interval, takeWhile, asyncScheduler, Subject, take } from 'rxjs';
4
4
  import { v4 } from 'uuid';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { cva } from 'class-variance-authority';
6
+ import { themeOverlaySurfaceClasses } from '@nanahoshi/mona-ui/internal';
7
7
  import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
8
8
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
9
  import { LucideOctagonX, LucideBadgeInfo, LucideCircleCheckBig, LucideOctagonAlert, LucideX } from '@lucide/angular';
@@ -13,7 +13,7 @@ import { ProgressBarComponent } from '@nanahoshi/mona-ui/progress-bar';
13
13
  //---------------------------------
14
14
  // Notification Container Component
15
15
  //---------------------------------
16
- const notificationContainerBaseVariants = cva(`p-2 z-40000`, {
16
+ const notificationContainerBaseThemeVariants = cva(`p-2 z-40000`, {
17
17
  variants: {
18
18
  position: {
19
19
  bottom: "bottom-0 left-1/2 -translate-x-1/2",
@@ -35,31 +35,29 @@ const notificationContainerBaseVariants = cva(`p-2 z-40000`, {
35
35
  //-----------------------
36
36
  // Notification Component
37
37
  //-----------------------
38
- const notificationActionVariants = cva(`
39
- absolute top-0 right-0
40
- flex items-start h-auto
41
- [&>svg.lucide]:cursor-pointer
42
- [&>svg.lucide]:-mt-1
38
+ const notificationActionThemeVariants = cva(`
39
+ absolute top-0 right-0 flex h-auto items-start
40
+ [&>svg.lucide]:cursor-pointer
41
+ [&>svg.lucide]:-mt-1
43
42
  `);
44
- const notificationBaseVariants = cva(`
45
- w-fit h-fit relative
46
- overflow-hidden flex flex-col
47
- mb-2 bg-background shadow-md
48
- border border-border
43
+ const notificationBaseThemeVariants = cva(`
44
+ relative mb-2 flex h-fit w-fit flex-col overflow-hidden
45
+ ${themeOverlaySurfaceClasses} text-foreground
46
+ border border-border shadow-(--shadow-overlay)
49
47
  `);
50
- const notificationBodyVariants = cva(`
51
- flex flex-1 p-2 ps-0 pe-8
48
+ const notificationBodyThemeVariants = cva(`
49
+ flex flex-1 p-2 ps-0 pe-8
52
50
  `);
53
- const notificationContentVariants = cva(`
54
- flex flex-1 w-full items-center
51
+ const notificationContentThemeVariants = cva(`
52
+ flex w-full flex-1 items-center
55
53
  `);
56
- const notificationHeaderVariants = cva(`
57
- w-full flex flex-row items-center
58
- flex-1 text-sm font-medium
59
- select-none
54
+ const notificationHeaderThemeVariants = cva(`
55
+ flex w-full flex-1 flex-row items-center
56
+ text-sm font-medium
57
+ select-none
60
58
  `);
61
- const notificationIconVariants = cva(`
62
- flex items-center justify-center px-4
59
+ const notificationIconThemeVariants = cva(`
60
+ flex items-center justify-center px-4
63
61
  `, {
64
62
  variants: {
65
63
  type: {
@@ -70,86 +68,15 @@ const notificationIconVariants = cva(`
70
68
  }
71
69
  }
72
70
  });
73
- const notificationTextVariants = cva(`
74
- text-sm text-foreground
71
+ const notificationTextThemeVariants = cva(`
72
+ text-sm text-foreground
75
73
  `);
76
74
 
77
- const notificationContainerBaseThemeVariants = (theme) => {
78
- switch (theme) {
79
- case "mona":
80
- return notificationContainerBaseVariants;
81
- default:
82
- return notificationContainerBaseVariants;
83
- }
84
- };
85
- const notificationActionThemeVariants = (theme) => {
86
- switch (theme) {
87
- case "mona":
88
- return notificationActionVariants;
89
- default:
90
- return notificationActionVariants;
91
- }
92
- };
93
- const notificationBaseThemeVariants = (theme) => {
94
- switch (theme) {
95
- case "mona":
96
- return notificationBaseVariants;
97
- default:
98
- return notificationBaseVariants;
99
- }
100
- };
101
- const notificationBodyThemeVariants = (theme) => {
102
- switch (theme) {
103
- case "mona":
104
- return notificationBodyVariants;
105
- default:
106
- return notificationBodyVariants;
107
- }
108
- };
109
- const notificationContentThemeVariants = (theme) => {
110
- switch (theme) {
111
- case "mona":
112
- return notificationContentVariants;
113
- default:
114
- return notificationContentVariants;
115
- }
116
- };
117
- const notificationHeaderThemeVariants = (theme) => {
118
- switch (theme) {
119
- case "mona":
120
- return notificationHeaderVariants;
121
- default:
122
- return notificationHeaderVariants;
123
- }
124
- };
125
- const notificationIconThemeVariants = (theme) => {
126
- switch (theme) {
127
- case "mona":
128
- return notificationIconVariants;
129
- default:
130
- return notificationIconVariants;
131
- }
132
- };
133
- const notificationTextThemeVariants = (theme) => {
134
- switch (theme) {
135
- case "mona":
136
- return notificationTextVariants;
137
- default:
138
- return notificationTextVariants;
139
- }
140
- };
141
- // type NotificationBaseVariantProps = VariantProps<ReturnType<typeof notificationBaseThemeVariants>>;
142
- // type NotificationBaseVariantInput = VariantInputs<NotificationBaseVariantProps>;
143
- //
144
- // export type NotificationVariantProps = NotificationBaseVariantProps;
145
- // export type NotificationVariantInput = NotificationBaseVariantInput;
146
-
147
75
  class NotificationComponent {
148
76
  #destroyRef;
149
77
  #document;
150
78
  #isUrgent;
151
79
  #paused;
152
- #themeService;
153
80
  constructor() {
154
81
  this.#destroyRef = inject(DestroyRef);
155
82
  this.#document = inject(DOCUMENT);
@@ -157,27 +84,22 @@ class NotificationComponent {
157
84
  ...(ngDevMode ? [{ debugName: "#isUrgent" }] : /* istanbul ignore next */ []));
158
85
  this.#paused = signal(false, /* @ts-ignore */
159
86
  ...(ngDevMode ? [{ debugName: "#paused" }] : /* istanbul ignore next */ []));
160
- this.#themeService = inject(ThemeService);
161
87
  this.actionClass = computed(() => {
162
- const theme = this.#themeService.theme();
163
- return notificationActionThemeVariants(theme)();
88
+ return notificationActionThemeVariants();
164
89
  }, /* @ts-ignore */
165
90
  ...(ngDevMode ? [{ debugName: "actionClass" }] : /* istanbul ignore next */ []));
166
91
  this.ariaLive = computed(() => (this.#isUrgent() ? "assertive" : "polite"), /* @ts-ignore */
167
92
  ...(ngDevMode ? [{ debugName: "ariaLive" }] : /* istanbul ignore next */ []));
168
93
  this.baseClass = computed(() => {
169
- const theme = this.#themeService.theme();
170
- return notificationBaseThemeVariants(theme)();
94
+ return notificationBaseThemeVariants();
171
95
  }, /* @ts-ignore */
172
96
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
173
97
  this.bodyClass = computed(() => {
174
- const theme = this.#themeService.theme();
175
- return notificationBodyThemeVariants(theme)();
98
+ return notificationBodyThemeVariants();
176
99
  }, /* @ts-ignore */
177
100
  ...(ngDevMode ? [{ debugName: "bodyClass" }] : /* istanbul ignore next */ []));
178
101
  this.contentClass = computed(() => {
179
- const theme = this.#themeService.theme();
180
- return notificationContentThemeVariants(theme)();
102
+ return notificationContentThemeVariants();
181
103
  }, /* @ts-ignore */
182
104
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
183
105
  this.contentComponent = computed(() => {
@@ -192,14 +114,12 @@ class NotificationComponent {
192
114
  ...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
193
115
  this.contentHost = viewChild("contentHost", { ...(ngDevMode ? { debugName: "contentHost" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
194
116
  this.headerClass = computed(() => {
195
- const theme = this.#themeService.theme();
196
- return notificationHeaderThemeVariants(theme)();
117
+ return notificationHeaderThemeVariants();
197
118
  }, /* @ts-ignore */
198
119
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
199
120
  this.iconClass = computed(() => {
200
- const theme = this.#themeService.theme();
201
121
  const type = this.type();
202
- return notificationIconThemeVariants(theme)({ type });
122
+ return notificationIconThemeVariants({ type });
203
123
  }, /* @ts-ignore */
204
124
  ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
205
125
  this.isStringContent = computed(() => typeof this.data().options.content === "string", /* @ts-ignore */
@@ -215,8 +135,7 @@ class NotificationComponent {
215
135
  this.role = computed(() => (this.#isUrgent() ? "alert" : "status"), /* @ts-ignore */
216
136
  ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
217
137
  this.textClass = computed(() => {
218
- const theme = this.#themeService.theme();
219
- return notificationTextThemeVariants(theme)();
138
+ return notificationTextThemeVariants();
220
139
  }, /* @ts-ignore */
221
140
  ...(ngDevMode ? [{ debugName: "textClass" }] : /* istanbul ignore next */ []));
222
141
  this.type = computed(() => this.data().options.type ?? "info", /* @ts-ignore */
@@ -270,7 +189,7 @@ class NotificationComponent {
270
189
  });
271
190
  }
272
191
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
273
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NotificationComponent, isStandalone: true, selector: "mona-notification", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "pointerenter": "onInteractionStart()", "pointerleave": "onInteractionEnd()", "focusin": "onInteractionStart()", "focusout": "onInteractionEnd()" } }, viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@let width = typeof data().options.width === \"string\" ? data().options.width : `${data().options.width}px`;\r\n@let height = typeof data().options.height === \"string\" ? data().options.height : `${data().options.height}px`;\r\n\r\n<div\r\n [class]=\"baseClass()\"\r\n [style.width]=\"width\"\r\n [style.height]=\"height\"\r\n [attr.role]=\"role()\"\r\n [attr.aria-live]=\"ariaLive()\">\r\n @if (contentTemplate() || contentComponent()) {\r\n @if (contentTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\"></ng-container>\r\n } @else if (contentComponent()) {\r\n <ng-container #contentHost></ng-container>\r\n }\r\n } @else {\r\n <div [class]=\"bodyClass()\">\r\n <div [class]=\"iconClass()\" aria-hidden=\"true\">\r\n @switch (type()) {\r\n @case (\"error\") {\r\n <svg lucideOctagonX aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"info\") {\r\n <svg lucideBadgeInfo aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"success\") {\r\n <svg lucideCircleCheckBig aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"warning\") {\r\n <svg lucideOctagonAlert aria-hidden=\"true\"></svg>\r\n }\r\n }\r\n </div>\r\n <div class=\"flex flex-col flex-1\">\r\n <div [class]=\"headerClass()\">{{ data().options.title }}</div>\r\n <div [class]=\"contentClass()\">\r\n @if (isStringContent()) {\r\n <span [class]=\"textClass()\" title=\"{{ data().options.content }}\">{{\r\n data().options.content\r\n }}</span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n @if (data().options.progressBar) {\r\n <div class=\"w-full h-1\">\r\n <mona-progress-bar\r\n [value]=\"progressValue()\"\r\n [color]=\"progressColor()\"\r\n [labelVisible]=\"false\"\r\n [animate]=\"false\"\r\n rounded=\"none\"\r\n class=\"h-full\"></mona-progress-bar>\r\n </div>\r\n }\r\n }\r\n @if (data().options.closable) {\r\n <div [class]=\"actionClass()\">\r\n <button\r\n monaButton\r\n size=\"small\"\r\n look=\"link\"\r\n rounded=\"none\"\r\n [iconOnly]=\"true\"\r\n [title]=\"data().options.closeTitle || 'Close'\"\r\n [attr.aria-label]=\"data().options.closeTitle || 'Close'\"\r\n (click)=\"close()\">\r\n <svg lucideX [size]=\"14\" aria-hidden=\"true\"></svg>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}@keyframes notification-slide-in-top{0%{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-top{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}}@keyframes notification-slide-in-bottom{0%{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-bottom{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}}:host.notification-enter-top{animation:notification-slide-in-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-enter-bottom{animation:notification-slide-in-bottom .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-top{animation:notification-slide-out-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-bottom{animation:notification-slide-out-bottom .3s cubic-bezier(.4,0,.2,1) forwards}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ProgressBarComponent, selector: "mona-progress-bar", inputs: ["aria-label", "aria-valuetext", "animate", "color", "disabled", "indeterminate", "labelPosition", "labelStyles", "labelVisible", "max", "min", "rounded", "class", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: LucideOctagonX, selector: "svg[lucideOctagonX], svg[lucideXOctagon]" }, { kind: "component", type: LucideBadgeInfo, selector: "svg[lucideBadgeInfo]" }, { kind: "component", type: LucideCircleCheckBig, selector: "svg[lucideCircleCheckBig], svg[lucideCheckCircle]" }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
192
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NotificationComponent, isStandalone: true, selector: "mona-notification", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "pointerenter": "onInteractionStart()", "pointerleave": "onInteractionEnd()", "focusin": "onInteractionStart()", "focusout": "onInteractionEnd()" } }, viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@let width = typeof data().options.width === \"string\" ? data().options.width : `${data().options.width}px`;\n@let height = typeof data().options.height === \"string\" ? data().options.height : `${data().options.height}px`;\n\n<div\n [class]=\"baseClass()\"\n [style.width]=\"width\"\n [style.height]=\"height\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"ariaLive()\">\n @if (contentTemplate() || contentComponent()) {\n @if (contentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\"></ng-container>\n } @else if (contentComponent()) {\n <ng-container #contentHost></ng-container>\n }\n } @else {\n <div [class]=\"bodyClass()\">\n <div [class]=\"iconClass()\" aria-hidden=\"true\">\n @switch (type()) {\n @case (\"error\") {\n <svg lucideOctagonX aria-hidden=\"true\"></svg>\n }\n @case (\"info\") {\n <svg lucideBadgeInfo aria-hidden=\"true\"></svg>\n }\n @case (\"success\") {\n <svg lucideCircleCheckBig aria-hidden=\"true\"></svg>\n }\n @case (\"warning\") {\n <svg lucideOctagonAlert aria-hidden=\"true\"></svg>\n }\n }\n </div>\n <div class=\"flex flex-col flex-1\">\n <div [class]=\"headerClass()\">{{ data().options.title }}</div>\n <div [class]=\"contentClass()\">\n @if (isStringContent()) {\n <span [class]=\"textClass()\" title=\"{{ data().options.content }}\">{{\n data().options.content\n }}</span>\n }\n </div>\n </div>\n </div>\n @if (data().options.progressBar) {\n <div class=\"w-full h-1\">\n <mona-progress-bar\n [value]=\"progressValue()\"\n [color]=\"progressColor()\"\n [labelVisible]=\"false\"\n [animate]=\"false\"\n rounded=\"none\"\n class=\"h-full\"></mona-progress-bar>\n </div>\n }\n }\n @if (data().options.closable) {\n <div [class]=\"actionClass()\">\n <button\n monaButton\n size=\"small\"\n look=\"link\"\n rounded=\"none\"\n [iconOnly]=\"true\"\n [title]=\"data().options.closeTitle || 'Close'\"\n [attr.aria-label]=\"data().options.closeTitle || 'Close'\"\n (click)=\"close()\">\n <svg lucideX [size]=\"14\" aria-hidden=\"true\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block}@keyframes notification-slide-in-top{0%{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-top{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}}@keyframes notification-slide-in-bottom{0%{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-bottom{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}}:host.notification-enter-top{animation:notification-slide-in-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-enter-bottom{animation:notification-slide-in-bottom .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-top{animation:notification-slide-out-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-bottom{animation:notification-slide-out-bottom .3s cubic-bezier(.4,0,.2,1) forwards}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ProgressBarComponent, selector: "mona-progress-bar", inputs: ["aria-label", "aria-valuetext", "animate", "color", "disabled", "indeterminate", "labelPosition", "labelStyles", "labelVisible", "max", "min", "rounded", "class", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: LucideOctagonX, selector: "svg[lucideOctagonX], svg[lucideXOctagon]" }, { kind: "component", type: LucideBadgeInfo, selector: "svg[lucideBadgeInfo]" }, { kind: "component", type: LucideCircleCheckBig, selector: "svg[lucideCircleCheckBig], svg[lucideCheckCircle]" }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
274
193
  }
275
194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NotificationComponent, decorators: [{
276
195
  type: Component,
@@ -288,17 +207,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
288
207
  "(pointerleave)": "onInteractionEnd()",
289
208
  "(focusin)": "onInteractionStart()",
290
209
  "(focusout)": "onInteractionEnd()"
291
- }, template: "@let width = typeof data().options.width === \"string\" ? data().options.width : `${data().options.width}px`;\r\n@let height = typeof data().options.height === \"string\" ? data().options.height : `${data().options.height}px`;\r\n\r\n<div\r\n [class]=\"baseClass()\"\r\n [style.width]=\"width\"\r\n [style.height]=\"height\"\r\n [attr.role]=\"role()\"\r\n [attr.aria-live]=\"ariaLive()\">\r\n @if (contentTemplate() || contentComponent()) {\r\n @if (contentTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\"></ng-container>\r\n } @else if (contentComponent()) {\r\n <ng-container #contentHost></ng-container>\r\n }\r\n } @else {\r\n <div [class]=\"bodyClass()\">\r\n <div [class]=\"iconClass()\" aria-hidden=\"true\">\r\n @switch (type()) {\r\n @case (\"error\") {\r\n <svg lucideOctagonX aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"info\") {\r\n <svg lucideBadgeInfo aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"success\") {\r\n <svg lucideCircleCheckBig aria-hidden=\"true\"></svg>\r\n }\r\n @case (\"warning\") {\r\n <svg lucideOctagonAlert aria-hidden=\"true\"></svg>\r\n }\r\n }\r\n </div>\r\n <div class=\"flex flex-col flex-1\">\r\n <div [class]=\"headerClass()\">{{ data().options.title }}</div>\r\n <div [class]=\"contentClass()\">\r\n @if (isStringContent()) {\r\n <span [class]=\"textClass()\" title=\"{{ data().options.content }}\">{{\r\n data().options.content\r\n }}</span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n @if (data().options.progressBar) {\r\n <div class=\"w-full h-1\">\r\n <mona-progress-bar\r\n [value]=\"progressValue()\"\r\n [color]=\"progressColor()\"\r\n [labelVisible]=\"false\"\r\n [animate]=\"false\"\r\n rounded=\"none\"\r\n class=\"h-full\"></mona-progress-bar>\r\n </div>\r\n }\r\n }\r\n @if (data().options.closable) {\r\n <div [class]=\"actionClass()\">\r\n <button\r\n monaButton\r\n size=\"small\"\r\n look=\"link\"\r\n rounded=\"none\"\r\n [iconOnly]=\"true\"\r\n [title]=\"data().options.closeTitle || 'Close'\"\r\n [attr.aria-label]=\"data().options.closeTitle || 'Close'\"\r\n (click)=\"close()\">\r\n <svg lucideX [size]=\"14\" aria-hidden=\"true\"></svg>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}@keyframes notification-slide-in-top{0%{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-top{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}}@keyframes notification-slide-in-bottom{0%{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-bottom{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}}:host.notification-enter-top{animation:notification-slide-in-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-enter-bottom{animation:notification-slide-in-bottom .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-top{animation:notification-slide-out-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-bottom{animation:notification-slide-out-bottom .3s cubic-bezier(.4,0,.2,1) forwards}\n"] }]
210
+ }, template: "@let width = typeof data().options.width === \"string\" ? data().options.width : `${data().options.width}px`;\n@let height = typeof data().options.height === \"string\" ? data().options.height : `${data().options.height}px`;\n\n<div\n [class]=\"baseClass()\"\n [style.width]=\"width\"\n [style.height]=\"height\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"ariaLive()\">\n @if (contentTemplate() || contentComponent()) {\n @if (contentTemplate()) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\"></ng-container>\n } @else if (contentComponent()) {\n <ng-container #contentHost></ng-container>\n }\n } @else {\n <div [class]=\"bodyClass()\">\n <div [class]=\"iconClass()\" aria-hidden=\"true\">\n @switch (type()) {\n @case (\"error\") {\n <svg lucideOctagonX aria-hidden=\"true\"></svg>\n }\n @case (\"info\") {\n <svg lucideBadgeInfo aria-hidden=\"true\"></svg>\n }\n @case (\"success\") {\n <svg lucideCircleCheckBig aria-hidden=\"true\"></svg>\n }\n @case (\"warning\") {\n <svg lucideOctagonAlert aria-hidden=\"true\"></svg>\n }\n }\n </div>\n <div class=\"flex flex-col flex-1\">\n <div [class]=\"headerClass()\">{{ data().options.title }}</div>\n <div [class]=\"contentClass()\">\n @if (isStringContent()) {\n <span [class]=\"textClass()\" title=\"{{ data().options.content }}\">{{\n data().options.content\n }}</span>\n }\n </div>\n </div>\n </div>\n @if (data().options.progressBar) {\n <div class=\"w-full h-1\">\n <mona-progress-bar\n [value]=\"progressValue()\"\n [color]=\"progressColor()\"\n [labelVisible]=\"false\"\n [animate]=\"false\"\n rounded=\"none\"\n class=\"h-full\"></mona-progress-bar>\n </div>\n }\n }\n @if (data().options.closable) {\n <div [class]=\"actionClass()\">\n <button\n monaButton\n size=\"small\"\n look=\"link\"\n rounded=\"none\"\n [iconOnly]=\"true\"\n [title]=\"data().options.closeTitle || 'Close'\"\n [attr.aria-label]=\"data().options.closeTitle || 'Close'\"\n (click)=\"close()\">\n <svg lucideX [size]=\"14\" aria-hidden=\"true\"></svg>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block}@keyframes notification-slide-in-top{0%{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-top{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(0 -20px 100% -20px);transform:translateY(-12px);opacity:0}}@keyframes notification-slide-in-bottom{0%{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}to{clip-path:inset(-20px);transform:translateY(0);opacity:1}}@keyframes notification-slide-out-bottom{0%{clip-path:inset(-20px);transform:translateY(0);opacity:1}to{clip-path:inset(100% -20px 0 -20px);transform:translateY(12px);opacity:0}}:host.notification-enter-top{animation:notification-slide-in-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-enter-bottom{animation:notification-slide-in-bottom .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-top{animation:notification-slide-out-top .3s cubic-bezier(.4,0,.2,1) forwards}:host.notification-leave-bottom{animation:notification-slide-out-bottom .3s cubic-bezier(.4,0,.2,1) forwards}\n"] }]
292
211
  }], ctorParameters: () => [], propDecorators: { contentHost: [{ type: i0.ViewChild, args: ["contentHost", { ...{ read: ViewContainerRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }] } });
293
212
 
294
213
  class NotificationContainerComponent {
295
214
  constructor() {
296
- this.#themeService = inject(ThemeService);
297
215
  this.baseClass = computed(() => {
298
- const theme = this.#themeService.theme();
299
216
  const position = this.position();
300
217
  const positionType = this.positionType();
301
- return notificationContainerBaseThemeVariants(theme)({ position, positionType });
218
+ return notificationContainerBaseThemeVariants({ position, positionType });
302
219
  }, /* @ts-ignore */
303
220
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
304
221
  this.enterAnimClass = computed(() => this.position().startsWith("bottom") ? "notification-enter-bottom" : "notification-enter-top", /* @ts-ignore */
@@ -312,7 +229,6 @@ class NotificationContainerComponent {
312
229
  this.positionType = signal("fixed", /* @ts-ignore */
313
230
  ...(ngDevMode ? [{ debugName: "positionType" }] : /* istanbul ignore next */ []));
314
231
  }
315
- #themeService;
316
232
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NotificationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
317
233
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NotificationContainerComponent, isStandalone: true, selector: "mona-notification-container", host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@for (notificationData of notificationDataList(); track notificationData.options.id) {\n <mona-notification [data]=\"notificationData\" [animate.enter]=\"enterAnimClass()\" [animate.leave]=\"leaveAnimClass()\">\n </mona-notification>\n}\n", dependencies: [{ kind: "component", type: NotificationComponent, selector: "mona-notification", inputs: ["data"] }] }); }
318
234
  }