@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
@@ -1,16 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, inject, ElementRef, computed, afterNextRender, ChangeDetectionStrategy, Component, signal, DOCUMENT, Injector, forwardRef, Injectable, DestroyRef, contentChild, TemplateRef, output, input, effect } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { Subject, map, takeUntil, take } from 'rxjs';
5
4
  import { PopupDataInjectionToken, PopupCloseEvent, PopupCloseSource, PopupService } from '@nanahoshi/mona-ui/popup';
5
+ import { Subject, map, takeUntil, take } from 'rxjs';
6
6
  import { PreventableEvent, AnyPipe } from '@nanahoshi/mona-ui/common';
7
- import { createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
7
+ import { themeOverlaySurfaceClasses, createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
8
8
  import * as i1 from '@angular/cdk/a11y';
9
9
  import { CdkTrapFocus } from '@angular/cdk/a11y';
10
10
  import { NgTemplateOutlet } from '@angular/common';
11
11
  import { LucideOctagonAlert, LucideCircleCheckBig, LucideBadgeInfo, LucideOctagonX, LucideBadgeQuestionMark, LucideX, LucideDynamicIcon } from '@lucide/angular';
12
12
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
13
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
14
13
  import { cva } from 'class-variance-authority';
15
14
 
16
15
  class DialogContentTemplateDirective {
@@ -85,12 +84,10 @@ class DialogActionEvent extends PreventableEvent {
85
84
  }
86
85
  }
87
86
 
88
- const dialogBaseVariants = cva(`
89
- flex flex-col gap-0.5
90
- w-full h-full
91
- bg-background
92
- border border-border shadow-sm
93
- outline-none overflow-hidden
87
+ const dialogBaseThemeVariants = cva(`
88
+ flex h-full w-full flex-col gap-0.5 overflow-hidden
89
+ ${themeOverlaySurfaceClasses} text-foreground
90
+ border border-border shadow-(--shadow-overlay) outline-none
94
91
  `, {
95
92
  variants: {
96
93
  rounded: {
@@ -104,12 +101,11 @@ const dialogBaseVariants = cva(`
104
101
  rounded: "medium"
105
102
  }
106
103
  });
107
- const dialogContentContainerVariants = cva(`
108
- flex flex-row gap-1 flex-1
104
+ const dialogContentContainerThemeVariants = cva(`
105
+ flex flex-1 flex-row gap-1
109
106
  `);
110
- const dialogBodyVariants = cva(`
111
- flex flex-col gap-0 pb-2
112
- w-full h-full pr-2
107
+ const dialogBodyThemeVariants = cva(`
108
+ flex h-full w-full flex-col gap-0 pr-2 pb-2
113
109
  `, {
114
110
  variants: {
115
111
  hasIcon: {
@@ -118,18 +114,18 @@ const dialogBodyVariants = cva(`
118
114
  }
119
115
  }
120
116
  });
121
- const dialogHeaderVariants = cva(`
122
- flex flex-row gap-2
123
- pt-4 select-none
117
+ const dialogHeaderThemeVariants = cva(`
118
+ flex flex-row gap-2 pt-4
119
+ select-none
124
120
  `);
125
- const dialogIconContainerVariants = cva(`
126
- flex items-start justify-center pt-8 pr-4 pl-6
121
+ const dialogIconContainerThemeVariants = cva(`
122
+ flex items-start justify-center pt-8 pr-4 pl-6
127
123
  `);
128
- const dialogIconVariants = cva(`
129
- rounded-full w-fit h-fit p-1.5 border relative
130
- [&>span]:absolute [&>span]:flex [&>span]:rounded-full
131
- [&>span]:-top-3 [&>span]:-right-3 [&>span]:-bottom-3 [&>span]:-left-3
132
- [&>span]:border [&>span]:min-w-full [&>span]:min-h-full
124
+ const dialogIconThemeVariants = cva(`
125
+ relative h-fit w-fit rounded-full border p-1.5
126
+ [&>span]:absolute [&>span]:flex [&>span]:rounded-full
127
+ [&>span]:-top-3 [&>span]:-right-3 [&>span]:-bottom-3 [&>span]:-left-3
128
+ [&>span]:min-h-full [&>span]:min-w-full [&>span]:border
133
129
  `, {
134
130
  variants: {
135
131
  type: {
@@ -144,27 +140,29 @@ const dialogIconVariants = cva(`
144
140
  type: "info"
145
141
  }
146
142
  });
147
- const dialogTitleContainerVariants = cva(`
148
- flex flex-1 items-center justify-start select-none p-1
143
+ const dialogTitleContainerThemeVariants = cva(`
144
+ flex flex-1 items-center justify-start p-1
145
+ select-none
149
146
  `);
150
- const dialogCloseButtonContainerVariants = cva(`
151
- flex items-start justify-end
147
+ const dialogCloseButtonContainerThemeVariants = cva(`
148
+ flex items-start justify-end
152
149
  `);
153
- const dialogTitleVariants = cva(`
154
- text-lg font-semibold leading-none tracking-tight
150
+ const dialogTitleThemeVariants = cva(`
151
+ text-lg font-semibold leading-none tracking-tight
155
152
  `);
156
- const dialogDescriptionVariants = cva(`
157
- text-sm text-muted-foreground
158
- select-none
153
+ const dialogDescriptionThemeVariants = cva(`
154
+ text-sm text-muted-foreground
155
+ select-none
159
156
  `);
160
- const dialogContentVariants = cva(`
161
- flex-1 overflow-auto p-1
157
+ const dialogContentThemeVariants = cva(`
158
+ flex-1 overflow-auto p-1
159
+ [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
162
160
  `);
163
- const dialogFooterVariants = cva(`
164
- flex flex-row
165
- gap-2 px-4 py-2
166
- border-t border-border
167
- select-none
161
+ const dialogFooterThemeVariants = cva(`
162
+ flex flex-row gap-2 px-4 py-2
163
+ select-none
164
+ bg-surface-muted
165
+ border-t border-border-subtle
168
166
  `, {
169
167
  variants: {
170
168
  layout: {
@@ -185,108 +183,10 @@ const dialogFooterVariants = cva(`
185
183
  }
186
184
  });
187
185
 
188
- const dialogBaseThemeVariants = (theme) => {
189
- switch (theme) {
190
- case "mona":
191
- return dialogBaseVariants;
192
- default:
193
- return dialogBaseVariants;
194
- }
195
- };
196
- const dialogIconThemeVariants = (theme) => {
197
- switch (theme) {
198
- case "mona":
199
- return dialogIconVariants;
200
- default:
201
- return dialogIconVariants;
202
- }
203
- };
204
- const dialogBodyThemeVariants = (theme) => {
205
- switch (theme) {
206
- case "mona":
207
- return dialogBodyVariants;
208
- default:
209
- return dialogBodyVariants;
210
- }
211
- };
212
- const dialogContentContainerThemeVariants = (theme) => {
213
- switch (theme) {
214
- case "mona":
215
- return dialogContentContainerVariants;
216
- default:
217
- return dialogContentContainerVariants;
218
- }
219
- };
220
- const dialogHeaderThemeVariants = (theme) => {
221
- switch (theme) {
222
- case "mona":
223
- return dialogHeaderVariants;
224
- default:
225
- return dialogHeaderVariants;
226
- }
227
- };
228
- const dialogIconContainerThemeVariants = (theme) => {
229
- switch (theme) {
230
- case "mona":
231
- return dialogIconContainerVariants;
232
- default:
233
- return dialogIconContainerVariants;
234
- }
235
- };
236
- const dialogTitleContainerThemeVariants = (theme) => {
237
- switch (theme) {
238
- case "mona":
239
- return dialogTitleContainerVariants;
240
- default:
241
- return dialogTitleContainerVariants;
242
- }
243
- };
244
- const dialogCloseButtonContainerThemeVariants = (theme) => {
245
- switch (theme) {
246
- case "mona":
247
- return dialogCloseButtonContainerVariants;
248
- default:
249
- return dialogCloseButtonContainerVariants;
250
- }
251
- };
252
- const dialogTitleThemeVariants = (theme) => {
253
- switch (theme) {
254
- case "mona":
255
- return dialogTitleVariants;
256
- default:
257
- return dialogTitleVariants;
258
- }
259
- };
260
- const dialogDescriptionThemeVariants = (theme) => {
261
- switch (theme) {
262
- case "mona":
263
- return dialogDescriptionVariants;
264
- default:
265
- return dialogDescriptionVariants;
266
- }
267
- };
268
- const dialogContentThemeVariants = (theme) => {
269
- switch (theme) {
270
- case "mona":
271
- return dialogContentVariants;
272
- default:
273
- return dialogContentVariants;
274
- }
275
- };
276
- const dialogFooterThemeVariants = (theme) => {
277
- switch (theme) {
278
- case "mona":
279
- return dialogFooterVariants;
280
- default:
281
- return dialogFooterVariants;
282
- }
283
- };
284
-
285
186
  class DialogContentComponent {
286
187
  #hostElementRef;
287
188
  #iconMap;
288
189
  #injectedData;
289
- #themeService;
290
190
  #trapFocus;
291
191
  constructor() {
292
192
  this.#hostElementRef = inject(ElementRef);
@@ -298,33 +198,27 @@ class DialogContentComponent {
298
198
  warning: { color: "var(--color-warning)", icon: LucideOctagonAlert }
299
199
  };
300
200
  this.#injectedData = inject(PopupDataInjectionToken);
301
- this.#themeService = inject(ThemeService);
302
201
  this.#trapFocus = inject(CdkTrapFocus);
303
202
  this.baseClass = computed(() => {
304
- const theme = this.#themeService.theme();
305
203
  const rounded = this.dialogData().rounded;
306
- return dialogBaseThemeVariants(theme)({ rounded });
204
+ return dialogBaseThemeVariants({ rounded });
307
205
  }, /* @ts-ignore */
308
206
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
309
207
  this.bodyClass = computed(() => {
310
- const theme = this.#themeService.theme();
311
208
  const hasIcon = this.dialogData().type != null;
312
- return dialogBodyThemeVariants(theme)({ hasIcon });
209
+ return dialogBodyThemeVariants({ hasIcon });
313
210
  }, /* @ts-ignore */
314
211
  ...(ngDevMode ? [{ debugName: "bodyClass" }] : /* istanbul ignore next */ []));
315
212
  this.closeButtonContainerClass = computed(() => {
316
- const theme = this.#themeService.theme();
317
- return dialogCloseButtonContainerThemeVariants(theme)();
213
+ return dialogCloseButtonContainerThemeVariants();
318
214
  }, /* @ts-ignore */
319
215
  ...(ngDevMode ? [{ debugName: "closeButtonContainerClass" }] : /* istanbul ignore next */ []));
320
216
  this.contentClass = computed(() => {
321
- const theme = this.#themeService.theme();
322
- return dialogContentThemeVariants(theme)();
217
+ return dialogContentThemeVariants();
323
218
  }, /* @ts-ignore */
324
219
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
325
220
  this.contentContainerClass = computed(() => {
326
- const theme = this.#themeService.theme();
327
- return dialogContentContainerThemeVariants(theme)();
221
+ return dialogContentContainerThemeVariants();
328
222
  }, /* @ts-ignore */
329
223
  ...(ngDevMode ? [{ debugName: "contentContainerClass" }] : /* istanbul ignore next */ []));
330
224
  this.describedById = computed(() => {
@@ -333,8 +227,7 @@ class DialogContentComponent {
333
227
  }, /* @ts-ignore */
334
228
  ...(ngDevMode ? [{ debugName: "describedById" }] : /* istanbul ignore next */ []));
335
229
  this.descriptionClass = computed(() => {
336
- const theme = this.#themeService.theme();
337
- return dialogDescriptionThemeVariants(theme)();
230
+ return dialogDescriptionThemeVariants();
338
231
  }, /* @ts-ignore */
339
232
  ...(ngDevMode ? [{ debugName: "descriptionClass" }] : /* istanbul ignore next */ []));
340
233
  this.descriptionId = createElementControlId();
@@ -342,15 +235,13 @@ class DialogContentComponent {
342
235
  ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
343
236
  this.dialogReference = this.#injectedData.dialogReference;
344
237
  this.footerClass = computed(() => {
345
- const theme = this.#themeService.theme();
346
238
  const layout = this.dialogData().actionsLayout;
347
239
  const rounded = this.dialogData().rounded;
348
- return dialogFooterThemeVariants(theme)({ layout, rounded });
240
+ return dialogFooterThemeVariants({ layout, rounded });
349
241
  }, /* @ts-ignore */
350
242
  ...(ngDevMode ? [{ debugName: "footerClass" }] : /* istanbul ignore next */ []));
351
243
  this.headerClass = computed(() => {
352
- const theme = this.#themeService.theme();
353
- return dialogHeaderThemeVariants(theme)();
244
+ return dialogHeaderThemeVariants();
354
245
  }, /* @ts-ignore */
355
246
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
356
247
  this.headerId = createElementControlId();
@@ -360,14 +251,12 @@ class DialogContentComponent {
360
251
  }, /* @ts-ignore */
361
252
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
362
253
  this.iconClass = computed(() => {
363
- const theme = this.#themeService.theme();
364
254
  const type = this.dialogData().type;
365
- return dialogIconThemeVariants(theme)({ type });
255
+ return dialogIconThemeVariants({ type });
366
256
  }, /* @ts-ignore */
367
257
  ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
368
258
  this.iconContainerClass = computed(() => {
369
- const theme = this.#themeService.theme();
370
- return dialogIconContainerThemeVariants(theme)();
259
+ return dialogIconContainerThemeVariants();
371
260
  }, /* @ts-ignore */
372
261
  ...(ngDevMode ? [{ debugName: "iconContainerClass" }] : /* istanbul ignore next */ []));
373
262
  this.role = computed(() => {
@@ -376,13 +265,11 @@ class DialogContentComponent {
376
265
  }, /* @ts-ignore */
377
266
  ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
378
267
  this.titleClass = computed(() => {
379
- const theme = this.#themeService.theme();
380
- return dialogTitleThemeVariants(theme)();
268
+ return dialogTitleThemeVariants();
381
269
  }, /* @ts-ignore */
382
270
  ...(ngDevMode ? [{ debugName: "titleClass" }] : /* istanbul ignore next */ []));
383
271
  this.titleContainerClass = computed(() => {
384
- const theme = this.#themeService.theme();
385
- return dialogTitleContainerThemeVariants(theme)();
272
+ return dialogTitleContainerThemeVariants();
386
273
  }, /* @ts-ignore */
387
274
  ...(ngDevMode ? [{ debugName: "titleContainerClass" }] : /* istanbul ignore next */ []));
388
275
  this.#trapFocus.autoCapture = true;
@@ -412,7 +299,7 @@ class DialogContentComponent {
412
299
  focusElement(dialogElement, element);
413
300
  }
414
301
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
415
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DialogContentComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "baseClass()", "attr.aria-describedby": "describedById()", "attr.aria-labelledby": "headerId", "attr.role": "role()" } }, hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "@let dialogIcon = icon();\r\n@let data = dialogData();\r\n\r\n<div [class]=\"contentContainerClass()\">\r\n @if (dialogIcon) {\r\n <div [class]=\"iconContainerClass()\">\r\n @if (data.iconTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.iconTemplate\"></ng-container>\r\n } @else {\r\n <div [class]=\"iconClass()\">\r\n <span aria-hidden=\"true\"></span>\r\n <svg [lucideIcon]=\"dialogIcon.icon\" [size]=\"24\" [style.color]=\"dialogIcon.color\"></svg>\r\n </div>\r\n }\r\n </div>\r\n }\r\n <div [class]=\"bodyClass()\">\r\n <div [class]=\"headerClass()\">\r\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\r\n @if (data.titleTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.titleTemplate\"></ng-container>\r\n } @else {\r\n <h2 [class]=\"titleClass()\">{{ data.title }}</h2>\r\n }\r\n </div>\r\n @if (data.closable) {\r\n <div [class]=\"closeButtonContainerClass()\">\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n size=\"small\"\r\n [iconOnly]=\"true\"\r\n aria-label=\"Close dialog\"\r\n (click)=\"onCloseClick()\">\r\n <svg lucideX [size]=\"16\"></svg>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n\r\n @let descriptionTemplateId = data.descriptionTemplate ? descriptionId : undefined;\r\n <div class=\"p-1\" [attr.id]=\"descriptionTemplateId\">\r\n @if (data.descriptionTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.descriptionTemplate\"></ng-container>\r\n } @else if (data.description) {\r\n <p [id]=\"descriptionId\" [class]=\"descriptionClass()\">{{ data.description }}</p>\r\n }\r\n </div>\r\n\r\n <div [class]=\"contentClass()\">\r\n @if (data.content) {\r\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\r\n } @else if (data.text) {\r\n <p class=\"select-none\">{{ data.text }}</p>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (data.footerTemplate || (data.actions | monaAny)) {\r\n @if (data.footerTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.footerTemplate\"></ng-container>\r\n } @else {\r\n <div [class]=\"footerClass()\">\r\n @for (action of data.actions; track $index) {\r\n <button\r\n monaButton\r\n type=\"button\"\r\n [class]=\"action.cssClass || ''\"\r\n [iconOnly]=\"action.iconOnly || false\"\r\n [look]=\"action.look\"\r\n [rounded]=\"action.rounded || data.rounded\"\r\n (click)=\"onActionClick(action)\">\r\n {{ action.text }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n}\r\n", dependencies: [{ 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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "pipe", type: AnyPipe, name: "monaAny" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
302
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DialogContentComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "baseClass()", "attr.aria-describedby": "describedById()", "attr.aria-labelledby": "headerId", "attr.role": "role()" } }, hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "@let dialogIcon = icon();\n@let data = dialogData();\n\n<div [class]=\"contentContainerClass()\">\n @if (dialogIcon) {\n <div [class]=\"iconContainerClass()\">\n @if (data.iconTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.iconTemplate\"></ng-container>\n } @else {\n <div [class]=\"iconClass()\">\n <span aria-hidden=\"true\"></span>\n <svg [lucideIcon]=\"dialogIcon.icon\" [size]=\"24\" [style.color]=\"dialogIcon.color\"></svg>\n </div>\n }\n </div>\n }\n <div [class]=\"bodyClass()\">\n <div [class]=\"headerClass()\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (data.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.titleTemplate\"></ng-container>\n } @else {\n <h2 [class]=\"titleClass()\">{{ data.title }}</h2>\n }\n </div>\n @if (data.closable) {\n <div [class]=\"closeButtonContainerClass()\">\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Close dialog\"\n (click)=\"onCloseClick()\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n </div>\n }\n </div>\n\n @let descriptionTemplateId = data.descriptionTemplate ? descriptionId : undefined;\n <div class=\"p-1\" [attr.id]=\"descriptionTemplateId\">\n @if (data.descriptionTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.descriptionTemplate\"></ng-container>\n } @else if (data.description) {\n <p [id]=\"descriptionId\" [class]=\"descriptionClass()\">{{ data.description }}</p>\n }\n </div>\n\n <div [class]=\"contentClass()\">\n @if (data.content) {\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n } @else if (data.text) {\n <p class=\"select-none\">{{ data.text }}</p>\n }\n </div>\n </div>\n</div>\n\n@if (data.footerTemplate || (data.actions | monaAny)) {\n @if (data.footerTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.footerTemplate\"></ng-container>\n } @else {\n <div [class]=\"footerClass()\">\n @for (action of data.actions; track $index) {\n <button\n monaButton\n type=\"button\"\n [class]=\"action.cssClass || ''\"\n [iconOnly]=\"action.iconOnly || false\"\n [look]=\"action.look\"\n [rounded]=\"action.rounded || data.rounded\"\n (click)=\"onActionClick(action)\">\n {{ action.text }}\n </button>\n }\n </div>\n }\n}\n", dependencies: [{ 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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "pipe", type: AnyPipe, name: "monaAny" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
416
303
  }
417
304
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DialogContentComponent, decorators: [{
418
305
  type: Component,
@@ -421,7 +308,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
421
308
  "[attr.aria-describedby]": "describedById()",
422
309
  "[attr.aria-labelledby]": "headerId",
423
310
  "[attr.role]": "role()"
424
- }, hostDirectives: [CdkTrapFocus], template: "@let dialogIcon = icon();\r\n@let data = dialogData();\r\n\r\n<div [class]=\"contentContainerClass()\">\r\n @if (dialogIcon) {\r\n <div [class]=\"iconContainerClass()\">\r\n @if (data.iconTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.iconTemplate\"></ng-container>\r\n } @else {\r\n <div [class]=\"iconClass()\">\r\n <span aria-hidden=\"true\"></span>\r\n <svg [lucideIcon]=\"dialogIcon.icon\" [size]=\"24\" [style.color]=\"dialogIcon.color\"></svg>\r\n </div>\r\n }\r\n </div>\r\n }\r\n <div [class]=\"bodyClass()\">\r\n <div [class]=\"headerClass()\">\r\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\r\n @if (data.titleTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.titleTemplate\"></ng-container>\r\n } @else {\r\n <h2 [class]=\"titleClass()\">{{ data.title }}</h2>\r\n }\r\n </div>\r\n @if (data.closable) {\r\n <div [class]=\"closeButtonContainerClass()\">\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n size=\"small\"\r\n [iconOnly]=\"true\"\r\n aria-label=\"Close dialog\"\r\n (click)=\"onCloseClick()\">\r\n <svg lucideX [size]=\"16\"></svg>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n\r\n @let descriptionTemplateId = data.descriptionTemplate ? descriptionId : undefined;\r\n <div class=\"p-1\" [attr.id]=\"descriptionTemplateId\">\r\n @if (data.descriptionTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.descriptionTemplate\"></ng-container>\r\n } @else if (data.description) {\r\n <p [id]=\"descriptionId\" [class]=\"descriptionClass()\">{{ data.description }}</p>\r\n }\r\n </div>\r\n\r\n <div [class]=\"contentClass()\">\r\n @if (data.content) {\r\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\r\n } @else if (data.text) {\r\n <p class=\"select-none\">{{ data.text }}</p>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (data.footerTemplate || (data.actions | monaAny)) {\r\n @if (data.footerTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"data.footerTemplate\"></ng-container>\r\n } @else {\r\n <div [class]=\"footerClass()\">\r\n @for (action of data.actions; track $index) {\r\n <button\r\n monaButton\r\n type=\"button\"\r\n [class]=\"action.cssClass || ''\"\r\n [iconOnly]=\"action.iconOnly || false\"\r\n [look]=\"action.look\"\r\n [rounded]=\"action.rounded || data.rounded\"\r\n (click)=\"onActionClick(action)\">\r\n {{ action.text }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n}\r\n" }]
311
+ }, hostDirectives: [CdkTrapFocus], template: "@let dialogIcon = icon();\n@let data = dialogData();\n\n<div [class]=\"contentContainerClass()\">\n @if (dialogIcon) {\n <div [class]=\"iconContainerClass()\">\n @if (data.iconTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.iconTemplate\"></ng-container>\n } @else {\n <div [class]=\"iconClass()\">\n <span aria-hidden=\"true\"></span>\n <svg [lucideIcon]=\"dialogIcon.icon\" [size]=\"24\" [style.color]=\"dialogIcon.color\"></svg>\n </div>\n }\n </div>\n }\n <div [class]=\"bodyClass()\">\n <div [class]=\"headerClass()\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (data.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.titleTemplate\"></ng-container>\n } @else {\n <h2 [class]=\"titleClass()\">{{ data.title }}</h2>\n }\n </div>\n @if (data.closable) {\n <div [class]=\"closeButtonContainerClass()\">\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Close dialog\"\n (click)=\"onCloseClick()\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n </div>\n }\n </div>\n\n @let descriptionTemplateId = data.descriptionTemplate ? descriptionId : undefined;\n <div class=\"p-1\" [attr.id]=\"descriptionTemplateId\">\n @if (data.descriptionTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.descriptionTemplate\"></ng-container>\n } @else if (data.description) {\n <p [id]=\"descriptionId\" [class]=\"descriptionClass()\">{{ data.description }}</p>\n }\n </div>\n\n <div [class]=\"contentClass()\">\n @if (data.content) {\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n } @else if (data.text) {\n <p class=\"select-none\">{{ data.text }}</p>\n }\n </div>\n </div>\n</div>\n\n@if (data.footerTemplate || (data.actions | monaAny)) {\n @if (data.footerTemplate) {\n <ng-container [ngTemplateOutlet]=\"data.footerTemplate\"></ng-container>\n } @else {\n <div [class]=\"footerClass()\">\n @for (action of data.actions; track $index) {\n <button\n monaButton\n type=\"button\"\n [class]=\"action.cssClass || ''\"\n [iconOnly]=\"action.iconOnly || false\"\n [look]=\"action.look\"\n [rounded]=\"action.rounded || data.rounded\"\n (click)=\"onActionClick(action)\">\n {{ action.text }}\n </button>\n }\n </div>\n }\n}\n" }]
425
312
  }], ctorParameters: () => [] });
426
313
 
427
314
  class DialogRef {