@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,17 +1,15 @@
1
1
  import { PreventableEvent } from '@nanahoshi/mona-ui/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, inject, computed, input, DestroyRef, signal, viewChild, viewChildren, ElementRef, model, output, afterRenderEffect, untracked, afterNextRender, ChangeDetectionStrategy, Component, contentChild, TemplateRef, contentChildren, linkedSignal } from '@angular/core';
3
+ import { Directive, computed, input, inject, DestroyRef, signal, viewChild, viewChildren, ElementRef, model, output, afterRenderEffect, untracked, afterNextRender, Component, contentChild, TemplateRef, ChangeDetectionStrategy, contentChildren, linkedSignal } from '@angular/core';
4
4
  import { NgTemplateOutlet } from '@angular/common';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { firstOrDefault, select } from '@mirei/ts-collections';
6
+ import { twMerge } from 'tailwind-merge';
7
7
  import { cva } from 'class-variance-authority';
8
+ import { themeRaisedBackdropClasses, themeRaisedSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
8
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
- import { FaIconComponent } from '@fortawesome/angular-fontawesome';
10
- import { faChevronLeft, faChevronRight, faXmark } from '@fortawesome/free-solid-svg-icons';
10
+ import { LucideChevronLeft, LucideChevronRight, LucideX } from '@lucide/angular';
11
11
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
12
12
  import { Subject, switchMap, EMPTY, timer, interval, tap, asapScheduler } from 'rxjs';
13
- import { twMerge } from 'tailwind-merge';
14
- import { createElementControlId } from '@nanahoshi/mona-ui/internal';
15
13
 
16
14
  class TabCloseEvent extends PreventableEvent {
17
15
  #index;
@@ -64,11 +62,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
64
62
  }]
65
63
  }] });
66
64
 
67
- const tabListBaseVariants = cva(`
68
- w-fit max-w-full
69
- flex overflow-hidden
70
- bg-accent
71
- font-medium text-sm
65
+ const tabListBaseThemeVariants = cva(`
66
+ flex w-fit max-w-full overflow-hidden
67
+ text-sm font-medium
68
+ bg-(--mona-tab-list-background) ${themeRaisedBackdropClasses}
72
69
  `, {
73
70
  variants: {
74
71
  rounded: {
@@ -85,27 +82,24 @@ const tabListBaseVariants = cva(`
85
82
  }
86
83
  }
87
84
  });
88
- const tabListListWrapperVariants = cva(`w-full h-full overflow-hidden`);
89
- const tabListListVariants = cva(`
90
- flex h-full w-full overflow-hidden
91
- list-none cursor-default
92
- select-none whitespace-nowrap
93
- p-[3px]
94
- transition-colors duration-300 ease-out
85
+ const tabListListWrapperThemeVariants = cva(`h-full w-full overflow-hidden`);
86
+ const tabListListThemeVariants = cva(`
87
+ flex h-full w-full list-none overflow-hidden p-[3px]
88
+ cursor-default select-none whitespace-nowrap
89
+ transition-colors duration-(--mona-motion-standard) ease-out
95
90
  `);
96
- const tabListListItemVariants = cva(`
97
- flex items-center justify-center
98
- cursor-pointer
99
- px-2 outline-none
100
- focus-visible:ring-2 focus-visible:ring-primary/40
91
+ const tabListListItemThemeVariants = cva(`
92
+ flex items-center justify-center px-2
93
+ cursor-pointer outline-none
94
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
101
95
  `, {
102
96
  variants: {
103
97
  active: {
104
- true: "bg-background-dark text-foreground shadow-sm",
98
+ true: `${themeRaisedSurfaceClasses} font-semibold text-foreground shadow-(--shadow-control) inset-ring-1 inset-ring-border-subtle`,
105
99
  false: ""
106
100
  },
107
101
  disabled: {
108
- true: "pointer-events-none cursor-not-allowed opacity-50 select-none",
102
+ true: "pointer-events-none cursor-not-allowed select-none text-disabled-foreground",
109
103
  false: ""
110
104
  },
111
105
  rounded: {
@@ -120,14 +114,17 @@ const tabListListItemVariants = cva(`
120
114
  rounded: "medium"
121
115
  }
122
116
  });
123
- const tabListScrollButtonVariants = cva(`
124
- flex items-center justify-center
125
- h-full px-2
117
+ const tabListScrollButtonThemeVariants = cva(`
118
+ flex h-full items-center justify-center px-2
119
+ text-muted-foreground
120
+ hover:bg-hover hover:text-foreground
121
+ active:bg-active
126
122
  `);
127
- const tabContentVariants = cva(`
128
- w-full overflow-auto flex-1
129
- border border-border shadow-sm
130
- bg-background
123
+ const tabContentThemeVariants = cva(`
124
+ flex-1 w-full overflow-auto
125
+ [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
126
+ bg-(--mona-tab-content-background) ${themeRaisedBackdropClasses} text-foreground
127
+ border border-border shadow-(--shadow-raised)
131
128
  `, {
132
129
  variants: {
133
130
  rounded: {
@@ -142,77 +139,17 @@ const tabContentVariants = cva(`
142
139
  rounded: "medium"
143
140
  }
144
141
  });
145
- const tabsBaseVariants = cva(`
146
- max-w-full
147
- flex flex-col gap-2
142
+ const tabsBaseThemeVariants = cva(`
143
+ flex max-w-full flex-col gap-2
148
144
  `);
149
145
 
150
- const tabListBaseThemeVariants = (theme) => {
151
- switch (theme) {
152
- case "mona":
153
- return tabListBaseVariants;
154
- default:
155
- return tabListBaseVariants;
156
- }
157
- };
158
- const tabListListWrapperThemeVariants = (theme) => {
159
- switch (theme) {
160
- case "mona":
161
- return tabListListWrapperVariants;
162
- default:
163
- return tabListListWrapperVariants;
164
- }
165
- };
166
- const tabListListThemeVariants = (theme) => {
167
- switch (theme) {
168
- case "mona":
169
- return tabListListVariants;
170
- default:
171
- return tabListListVariants;
172
- }
173
- };
174
- const tabListListItemThemeVariants = (theme) => {
175
- switch (theme) {
176
- case "mona":
177
- return tabListListItemVariants;
178
- default:
179
- return tabListListItemVariants;
180
- }
181
- };
182
- const tabListScrollButtonThemeVariants = (theme) => {
183
- switch (theme) {
184
- case "mona":
185
- return tabListScrollButtonVariants;
186
- default:
187
- return tabListScrollButtonVariants;
188
- }
189
- };
190
- const tabContentThemeVariants = (theme) => {
191
- switch (theme) {
192
- case "mona":
193
- return tabContentVariants;
194
- default:
195
- return tabContentVariants;
196
- }
197
- };
198
- const tabsBaseThemeVariants = (theme) => {
199
- switch (theme) {
200
- case "mona":
201
- return tabsBaseVariants;
202
- default:
203
- return tabsBaseVariants;
204
- }
205
- };
206
-
207
146
  class TabListItemDirective {
208
147
  constructor() {
209
- this.#themeService = inject(ThemeService);
210
148
  this.listItemClass = computed(() => {
211
- const theme = this.#themeService.theme();
212
149
  const active = this.active();
213
150
  const disabled = this.disabled();
214
151
  const rounded = this.rounded();
215
- return tabListListItemThemeVariants(theme)({ active, disabled, rounded });
152
+ return tabListListItemThemeVariants({ active, disabled, rounded });
216
153
  }, /* @ts-ignore */
217
154
  ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
218
155
  this.active = input.required(/* @ts-ignore */
@@ -222,7 +159,6 @@ class TabListItemDirective {
222
159
  this.rounded = input.required(/* @ts-ignore */
223
160
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
224
161
  }
225
- #themeService;
226
162
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
227
163
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TabListItemDirective, isStandalone: true, selector: "li[monaTabListItem]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "listItemClass()" } }, ngImport: i0 }); }
228
164
  }
@@ -238,38 +174,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
238
174
 
239
175
  class TabListComponent {
240
176
  #destroyRef;
241
- #themeService;
242
177
  #keydown$;
243
178
  #resizeObserver;
244
179
  #scrollIntent$;
245
180
  constructor() {
246
181
  this.#destroyRef = inject(DestroyRef);
247
- this.#themeService = inject(ThemeService);
248
182
  this.#keydown$ = new Subject();
249
183
  this.#resizeObserver = null;
250
184
  this.#scrollIntent$ = new Subject();
251
185
  this.baseClass = computed(() => {
252
- const theme = this.#themeService.theme();
253
186
  const rounded = this.rounded();
254
187
  const size = this.size();
255
- return tabListBaseThemeVariants(theme)({ rounded, size });
188
+ return tabListBaseThemeVariants({ rounded, size });
256
189
  }, /* @ts-ignore */
257
190
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
258
191
  this.listClass = computed(() => {
259
- const theme = this.#themeService.theme();
260
- return tabListListThemeVariants(theme)();
192
+ return tabListListThemeVariants();
261
193
  }, /* @ts-ignore */
262
194
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
263
195
  this.scrollButtonClass = computed(() => {
264
- const theme = this.#themeService.theme();
265
- return tabListScrollButtonThemeVariants(theme)();
196
+ return tabListScrollButtonThemeVariants();
266
197
  }, /* @ts-ignore */
267
198
  ...(ngDevMode ? [{ debugName: "scrollButtonClass" }] : /* istanbul ignore next */ []));
268
- this.scrollLeftIcon = faChevronLeft;
269
- this.scrollRightIcon = faChevronRight;
270
199
  this.scrollsVisible = signal(false, /* @ts-ignore */
271
200
  ...(ngDevMode ? [{ debugName: "scrollsVisible" }] : /* istanbul ignore next */ []));
272
- this.tabCloseIcon = faXmark;
273
201
  this.tabListElement = viewChild.required("tabListElement", /* @ts-ignore */
274
202
  ...(ngDevMode ? [{ debugName: "tabListElement" }] : /* istanbul ignore next */ []));
275
203
  this.tabListItems = viewChildren(TabListItemDirective, { ...(ngDevMode ? { debugName: "tabListItems" } : /* istanbul ignore next */ {}), read: ElementRef });
@@ -474,14 +402,14 @@ class TabListComponent {
474
402
  });
475
403
  }
476
404
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
477
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabListComponent, isStandalone: true, selector: "mona-tab-list", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, selectedTabId: { classPropertyName: "selectedTabId", publicName: "selectedTabId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, tabList: { classPropertyName: "tabList", publicName: "tabList", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedTabId: "selectedTabIdChange", tabClose: "tabClose", tabSelect: "tabSelect" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "tabListElement", first: true, predicate: ["tabListElement"], descendants: true, isSignal: true }, { propertyName: "tabListItems", predicate: TabListItemDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (scrollsVisible()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n size=\"small\"\r\n [class]=\"scrollButtonClass()\"\r\n (click)=\"startScrolling(tabListElement, 'left', 'single')\"\r\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'left')\"\r\n (pointerup)=\"stopScrolling()\"\r\n [attr.aria-hidden]=\"true\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"scrollLeftIcon\"></fa-icon>\r\n </button>\r\n}\r\n<div class=\"w-full h-full overflow-hidden\">\r\n <ul [class]=\"listClass()\" #tabListElement role=\"tablist\">\r\n @for (tab of tabList(); track tab) {\r\n @let selected = tab.id === selectedTabId();\r\n @let itemDisabled = tab.disabled || disabled();\r\n <li\r\n monaTabListItem\r\n [id]=\"tab.id + '-tab'\"\r\n [active]=\"selected\"\r\n [disabled]=\"itemDisabled\"\r\n [rounded]=\"rounded()\"\r\n role=\"tab\"\r\n [tabindex]=\"selected ? 0 : -1\"\r\n [attr.aria-selected]=\"selected\"\r\n [attr.aria-disabled]=\"itemDisabled\"\r\n [attr.aria-controls]=\"tab.id + '-panel'\"\r\n [attr.data-selected]=\"selected\"\r\n [attr.data-tab-id]=\"tab.id\"\r\n (click)=\"onTabClick(tab, tabListElement, $event)\">\r\n <div>\r\n @if (tab.titleTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\r\n } @else {\r\n <span>{{ tab.title }}</span>\r\n }\r\n </div>\r\n @if (tab.closable || closable()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n [disabled]=\"itemDisabled\"\r\n (click)=\"onTabClose(tab, $event)\"\r\n class=\"px-0 h-fit ml-1 w-min\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"tabCloseIcon\" class=\"text-xs flex\"></fa-icon>\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n@if (scrollsVisible()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n size=\"small\"\r\n [class]=\"scrollButtonClass()\"\r\n (click)=\"startScrolling(tabListElement, 'right', 'single')\"\r\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'right')\"\r\n (pointerup)=\"stopScrolling()\"\r\n [attr.aria-hidden]=\"true\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"scrollRightIcon\"></fa-icon>\r\n </button>\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: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabListItemDirective, selector: "li[monaTabListItem]", inputs: ["active", "disabled", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
405
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabListComponent, isStandalone: true, selector: "mona-tab-list", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, selectedTabId: { classPropertyName: "selectedTabId", publicName: "selectedTabId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, tabList: { classPropertyName: "tabList", publicName: "tabList", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedTabId: "selectedTabIdChange", tabClose: "tabClose", tabSelect: "tabSelect" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "tabListElement", first: true, predicate: ["tabListElement"], descendants: true, isSignal: true }, { propertyName: "tabListItems", predicate: TabListItemDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (scrollsVisible()) {\n <button\n monaButton\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n (click)=\"startScrolling(tabListElement, 'left', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'left')\"\n (pointerup)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n <svg lucideChevronLeft [size]=\"16\"></svg>\n </button>\n}\n<div class=\"w-full h-full overflow-hidden\">\n <ul [class]=\"listClass()\" #tabListElement role=\"tablist\">\n @for (tab of tabList(); track tab) {\n @let selected = tab.id === selectedTabId();\n @let itemDisabled = tab.disabled || disabled();\n <li\n monaTabListItem\n [id]=\"tab.id + '-tab'\"\n [active]=\"selected\"\n [disabled]=\"itemDisabled\"\n [rounded]=\"rounded()\"\n role=\"tab\"\n [tabindex]=\"selected ? 0 : -1\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"itemDisabled\"\n [attr.aria-controls]=\"tab.id + '-panel'\"\n [attr.data-selected]=\"selected\"\n [attr.data-tab-id]=\"tab.id\"\n (click)=\"onTabClick(tab, tabListElement, $event)\">\n <div>\n @if (tab.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\n } @else {\n <span>{{ tab.title }}</span>\n }\n </div>\n @if (tab.closable || closable()) {\n <button\n monaButton\n look=\"link\"\n [disabled]=\"itemDisabled\"\n (click)=\"onTabClose(tab, $event)\"\n class=\"px-0 h-fit ml-1 w-min\"\n tabindex=\"-1\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n }\n </li>\n }\n </ul>\n</div>\n@if (scrollsVisible()) {\n <button\n monaButton\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n (click)=\"startScrolling(tabListElement, 'right', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'right')\"\n (pointerup)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n <svg lucideChevronRight [size]=\"16\"></svg>\n </button>\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: "directive", type: TabListItemDirective, selector: "li[monaTabListItem]", inputs: ["active", "disabled", "rounded"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
478
406
  }
479
407
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListComponent, decorators: [{
480
408
  type: Component,
481
- args: [{ selector: "mona-tab-list", imports: [ButtonDirective, FaIconComponent, NgTemplateOutlet, TabListItemDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
409
+ args: [{ selector: "mona-tab-list", imports: [ButtonDirective, NgTemplateOutlet, TabListItemDirective, LucideChevronLeft, LucideChevronRight, LucideX], host: {
482
410
  "[class]": "baseClass()",
483
411
  "(keydown)": "onKeydown($event)"
484
- }, template: "@if (scrollsVisible()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n size=\"small\"\r\n [class]=\"scrollButtonClass()\"\r\n (click)=\"startScrolling(tabListElement, 'left', 'single')\"\r\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'left')\"\r\n (pointerup)=\"stopScrolling()\"\r\n [attr.aria-hidden]=\"true\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"scrollLeftIcon\"></fa-icon>\r\n </button>\r\n}\r\n<div class=\"w-full h-full overflow-hidden\">\r\n <ul [class]=\"listClass()\" #tabListElement role=\"tablist\">\r\n @for (tab of tabList(); track tab) {\r\n @let selected = tab.id === selectedTabId();\r\n @let itemDisabled = tab.disabled || disabled();\r\n <li\r\n monaTabListItem\r\n [id]=\"tab.id + '-tab'\"\r\n [active]=\"selected\"\r\n [disabled]=\"itemDisabled\"\r\n [rounded]=\"rounded()\"\r\n role=\"tab\"\r\n [tabindex]=\"selected ? 0 : -1\"\r\n [attr.aria-selected]=\"selected\"\r\n [attr.aria-disabled]=\"itemDisabled\"\r\n [attr.aria-controls]=\"tab.id + '-panel'\"\r\n [attr.data-selected]=\"selected\"\r\n [attr.data-tab-id]=\"tab.id\"\r\n (click)=\"onTabClick(tab, tabListElement, $event)\">\r\n <div>\r\n @if (tab.titleTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\r\n } @else {\r\n <span>{{ tab.title }}</span>\r\n }\r\n </div>\r\n @if (tab.closable || closable()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n [disabled]=\"itemDisabled\"\r\n (click)=\"onTabClose(tab, $event)\"\r\n class=\"px-0 h-fit ml-1 w-min\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"tabCloseIcon\" class=\"text-xs flex\"></fa-icon>\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n@if (scrollsVisible()) {\r\n <button\r\n monaButton\r\n look=\"link\"\r\n size=\"small\"\r\n [class]=\"scrollButtonClass()\"\r\n (click)=\"startScrolling(tabListElement, 'right', 'single')\"\r\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'right')\"\r\n (pointerup)=\"stopScrolling()\"\r\n [attr.aria-hidden]=\"true\"\r\n tabindex=\"-1\">\r\n <fa-icon [icon]=\"scrollRightIcon\"></fa-icon>\r\n </button>\r\n}\r\n" }]
412
+ }, template: "@if (scrollsVisible()) {\n <button\n monaButton\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n (click)=\"startScrolling(tabListElement, 'left', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'left')\"\n (pointerup)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n <svg lucideChevronLeft [size]=\"16\"></svg>\n </button>\n}\n<div class=\"w-full h-full overflow-hidden\">\n <ul [class]=\"listClass()\" #tabListElement role=\"tablist\">\n @for (tab of tabList(); track tab) {\n @let selected = tab.id === selectedTabId();\n @let itemDisabled = tab.disabled || disabled();\n <li\n monaTabListItem\n [id]=\"tab.id + '-tab'\"\n [active]=\"selected\"\n [disabled]=\"itemDisabled\"\n [rounded]=\"rounded()\"\n role=\"tab\"\n [tabindex]=\"selected ? 0 : -1\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"itemDisabled\"\n [attr.aria-controls]=\"tab.id + '-panel'\"\n [attr.data-selected]=\"selected\"\n [attr.data-tab-id]=\"tab.id\"\n (click)=\"onTabClick(tab, tabListElement, $event)\">\n <div>\n @if (tab.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\n } @else {\n <span>{{ tab.title }}</span>\n }\n </div>\n @if (tab.closable || closable()) {\n <button\n monaButton\n look=\"link\"\n [disabled]=\"itemDisabled\"\n (click)=\"onTabClose(tab, $event)\"\n class=\"px-0 h-fit ml-1 w-min\"\n tabindex=\"-1\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n }\n </li>\n }\n </ul>\n</div>\n@if (scrollsVisible()) {\n <button\n monaButton\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n (click)=\"startScrolling(tabListElement, 'right', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'right')\"\n (pointerup)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n <svg lucideChevronRight [size]=\"16\"></svg>\n </button>\n}\n" }]
485
413
  }], ctorParameters: () => [], propDecorators: { tabListElement: [{ type: i0.ViewChild, args: ["tabListElement", { isSignal: true }] }], tabListItems: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => TabListItemDirective), { ...{ read: ElementRef }, isSignal: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: true }] }], selectedTabId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTabId", required: false }] }, { type: i0.Output, args: ["selectedTabIdChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], tabClose: [{ type: i0.Output, args: ["tabClose"] }], tabSelect: [{ type: i0.Output, args: ["tabSelect"] }], tabList: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabList", required: true }] }] } });
486
414
 
487
415
  class TabComponent {
@@ -555,22 +483,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
555
483
 
556
484
  class TabsComponent {
557
485
  constructor() {
558
- this.#themeService = inject(ThemeService);
559
486
  this.tabListComponent = viewChild.required(TabListComponent, /* @ts-ignore */
560
487
  ...(ngDevMode ? [{ debugName: "tabListComponent" }] : /* istanbul ignore next */ []));
561
488
  this.tabs = contentChildren(TabComponent, /* @ts-ignore */
562
489
  ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
563
490
  this.baseClass = computed(() => {
564
- const theme = this.#themeService.theme();
565
- const variantClass = tabsBaseThemeVariants(theme)();
491
+ const variantClass = tabsBaseThemeVariants();
566
492
  const userClass = this.userClass();
567
493
  return twMerge(variantClass, userClass);
568
494
  }, /* @ts-ignore */
569
495
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
570
496
  this.contentClass = computed(() => {
571
- const theme = this.#themeService.theme();
572
497
  const rounded = this.rounded() === "full" ? "large" : this.rounded();
573
- return tabContentThemeVariants(theme)({ rounded });
498
+ return tabContentThemeVariants({ rounded });
574
499
  }, /* @ts-ignore */
575
500
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
576
501
  this.selectedTabId = linkedSignal({ ...(ngDevMode ? { debugName: "selectedTabId" } : /* istanbul ignore next */ {}), source: () => this.tabList(),
@@ -632,7 +557,6 @@ class TabsComponent {
632
557
  */
633
558
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
634
559
  }
635
- #themeService;
636
560
  handlePanelKeyDown(event) {
637
561
  if (event.key === "Tab" && event.shiftKey) {
638
562
  if (event.target !== event.currentTarget) {
@@ -643,13 +567,13 @@ class TabsComponent {
643
567
  }
644
568
  }
645
569
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
646
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabsComponent, isStandalone: true, selector: "mona-tabs", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, keepTabContent: { classPropertyName: "keepTabContent", publicName: "keepTabContent", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabClose: "tabClose", tabSelect: "tabSelect" }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabListComponent", first: true, predicate: TabListComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mona-tab-list\r\n [closable]=\"closable()\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n [tabList]=\"tabList()\"\r\n [selectedTabId]=\"selectedTabId()\"\r\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\r\n (tabClose)=\"tabClose.emit($event)\"\r\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\r\n<div [class]=\"contentClass()\">\r\n @for (tab of tabList(); track tab) {\r\n @let selected = tab.id === selectedTabId();\r\n @let tabLoaded = keepTabContent() || selected;\r\n @let tabHidden = keepTabContent() && !selected;\r\n @if (tabLoaded) {\r\n <div\r\n class=\"w-full h-full outline-none\"\r\n [class.hidden]=\"tabHidden\"\r\n role=\"tabpanel\"\r\n [id]=\"tab.id + '-panel'\"\r\n tabindex=\"0\"\r\n (keydown)=\"handlePanelKeyDown($event)\"\r\n [attr.aria-hidden]=\"tabHidden\"\r\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\r\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TabListComponent, selector: "mona-tab-list", inputs: ["closable", "disabled", "rounded", "selectedTabId", "size", "tabList"], outputs: ["selectedTabIdChange", "tabClose", "tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
570
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabsComponent, isStandalone: true, selector: "mona-tabs", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, keepTabContent: { classPropertyName: "keepTabContent", publicName: "keepTabContent", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabClose: "tabClose", tabSelect: "tabSelect" }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabListComponent", first: true, predicate: TabListComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mona-tab-list\n [closable]=\"closable()\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [tabList]=\"tabList()\"\n [selectedTabId]=\"selectedTabId()\"\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\n (tabClose)=\"tabClose.emit($event)\"\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\n<div [class]=\"contentClass()\">\n @for (tab of tabList(); track tab) {\n @let selected = tab.id === selectedTabId();\n @let tabLoaded = keepTabContent() || selected;\n @let tabHidden = keepTabContent() && !selected;\n @if (tabLoaded) {\n <div\n class=\"w-full h-full outline-none\"\n [class.hidden]=\"tabHidden\"\n role=\"tabpanel\"\n [id]=\"tab.id + '-panel'\"\n tabindex=\"0\"\n (keydown)=\"handlePanelKeyDown($event)\"\n [attr.aria-hidden]=\"tabHidden\"\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\n </div>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TabListComponent, selector: "mona-tab-list", inputs: ["closable", "disabled", "rounded", "selectedTabId", "size", "tabList"], outputs: ["selectedTabIdChange", "tabClose", "tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
647
571
  }
648
572
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabsComponent, decorators: [{
649
573
  type: Component,
650
574
  args: [{ selector: "mona-tabs", changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, TabListComponent], host: {
651
575
  "[class]": "baseClass()"
652
- }, template: "<mona-tab-list\r\n [closable]=\"closable()\"\r\n [disabled]=\"disabled()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n [tabList]=\"tabList()\"\r\n [selectedTabId]=\"selectedTabId()\"\r\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\r\n (tabClose)=\"tabClose.emit($event)\"\r\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\r\n<div [class]=\"contentClass()\">\r\n @for (tab of tabList(); track tab) {\r\n @let selected = tab.id === selectedTabId();\r\n @let tabLoaded = keepTabContent() || selected;\r\n @let tabHidden = keepTabContent() && !selected;\r\n @if (tabLoaded) {\r\n <div\r\n class=\"w-full h-full outline-none\"\r\n [class.hidden]=\"tabHidden\"\r\n role=\"tabpanel\"\r\n [id]=\"tab.id + '-panel'\"\r\n tabindex=\"0\"\r\n (keydown)=\"handlePanelKeyDown($event)\"\r\n [attr.aria-hidden]=\"tabHidden\"\r\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\r\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\r\n </div>\r\n }\r\n }\r\n</div>\r\n" }]
576
+ }, template: "<mona-tab-list\n [closable]=\"closable()\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [tabList]=\"tabList()\"\n [selectedTabId]=\"selectedTabId()\"\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\n (tabClose)=\"tabClose.emit($event)\"\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\n<div [class]=\"contentClass()\">\n @for (tab of tabList(); track tab) {\n @let selected = tab.id === selectedTabId();\n @let tabLoaded = keepTabContent() || selected;\n @let tabHidden = keepTabContent() && !selected;\n @if (tabLoaded) {\n <div\n class=\"w-full h-full outline-none\"\n [class.hidden]=\"tabHidden\"\n role=\"tabpanel\"\n [id]=\"tab.id + '-panel'\"\n tabindex=\"0\"\n (keydown)=\"handlePanelKeyDown($event)\"\n [attr.aria-hidden]=\"tabHidden\"\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\n </div>\n }\n }\n</div>\n" }]
653
577
  }], propDecorators: { tabListComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TabListComponent), { isSignal: true }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], keepTabContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepTabContent", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tabClose: [{ type: i0.Output, args: ["tabClose"] }], tabSelect: [{ type: i0.Output, args: ["tabSelect"] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
654
578
 
655
579
  /*
@@ -1,31 +1,35 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, computed, input, Directive } from '@angular/core';
2
+ import { computed, input, Directive } from '@angular/core';
3
3
  import { twMerge } from 'tailwind-merge';
4
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
5
4
  import { cva } from 'class-variance-authority';
5
+ import { themeControlSurfaceClasses } from '@nanahoshi/mona-ui/internal';
6
6
 
7
- const textAreaVariants = cva(`
8
- bg-input-background
9
-
10
- border border-input-border outline-none
11
- selection:bg-primary selection:text-primary-foreground
12
- transition-[color,box-shadow,border] ease-in-out duration-300
13
-
14
- shadow-xs
15
- px-2 py-1 text-sm
16
-
17
- placeholder:text-muted-foreground
18
-
19
- focus-visible:ring-2 focus-visible:ring-primary/40
20
- focus-visible:border-primary
21
-
22
- disabled:pointer-events-none disabled:opacity-50
23
- disabled:cursor-not-allowed disabled:select-none
24
-
25
- [&.ng-touched.ng-invalid]:border-error
26
- [&.ng-touched.ng-invalid]:ring-error/40
27
- data-[invalid='true']:border-error
28
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
7
+ const textAreaThemeVariants = cva(`
8
+ px-2 py-1
9
+ text-sm text-foreground
10
+ ${themeControlSurfaceClasses}
11
+ border border-input-border shadow-(--shadow-control)
12
+ outline-none
13
+ selection:bg-primary selection:text-primary-foreground
14
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
15
+ placeholder:text-muted-foreground
16
+
17
+ disabled:pointer-events-none disabled:cursor-not-allowed disabled:select-none
18
+ disabled:border-disabled-border disabled:bg-disabled-background disabled:text-disabled-foreground
19
+ disabled:shadow-none
20
+ read-only:cursor-default
21
+
22
+ focus-visible:border-focus-indicator
23
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
24
+
25
+ [&.ng-touched.ng-invalid]:border-error
26
+ [&.ng-touched.ng-invalid]:ring-2 [&.ng-touched.ng-invalid]:ring-error/35
27
+ [&.ng-touched.ng-invalid]:focus-visible:border-error
28
+ [&.ng-touched.ng-invalid]:focus-visible:ring-error/35
29
+ data-[invalid='true']:border-error
30
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
31
+ data-[invalid='true']:focus-visible:border-error
32
+ data-[invalid='true']:focus-visible:ring-error/35
29
33
  `, {
30
34
  variants: {
31
35
  rounded: {
@@ -37,22 +41,11 @@ const textAreaVariants = cva(`
37
41
  }
38
42
  });
39
43
 
40
- const textAreaThemeVariants = (theme) => {
41
- switch (theme) {
42
- case "mona":
43
- return textAreaVariants;
44
- default:
45
- return textAreaVariants;
46
- }
47
- };
48
-
49
44
  class TextAreaDirective {
50
45
  constructor() {
51
- this.#themeService = inject(ThemeService);
52
46
  this.baseClass = computed(() => {
53
- const theme = this.#themeService.theme();
54
47
  const rounded = this.rounded();
55
- const classes = textAreaThemeVariants(theme)({ rounded });
48
+ const classes = textAreaThemeVariants({ rounded });
56
49
  const userClass = this.userClass();
57
50
  return twMerge(classes, userClass);
58
51
  }, /* @ts-ignore */
@@ -83,7 +76,6 @@ class TextAreaDirective {
83
76
  */
84
77
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
85
78
  }
86
- #themeService;
87
79
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextAreaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
88
80
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TextAreaDirective, isStandalone: true, selector: "textarea[monaTextArea]", inputs: { rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", 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 } }, host: { properties: { "attr.aria-invalid": "inputInvalid() || null", "attr.data-invalid": "inputInvalid() || null", "class": "baseClass()" } }, ngImport: i0 }); }
89
81
  }