@nanahoshi/mona-ui 0.1.1 → 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 (170) 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 +38 -53
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +19 -53
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +15 -26
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +67 -68
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +53 -149
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +48 -95
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +35 -45
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +9 -23
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +26 -77
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +16 -38
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +41 -46
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +32 -52
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +9 -12
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +40 -27
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +51 -51
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -153
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +32 -53
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +7 -12
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +59 -219
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +24 -75
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +11 -44
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +11 -41
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +2 -2
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DZk18LJC.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs → nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs} +9 -16
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +15 -44
  51. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BrYpFMyF.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs} +11 -20
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +109 -393
  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 +26 -56
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +31 -122
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +4 -26
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +5 -18
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +48 -154
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +35 -62
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -108
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +37 -63
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +21 -73
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +8 -30
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +29 -50
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +36 -108
  68. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +19 -60
  69. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +47 -92
  70. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +53 -144
  71. package/fesm2022/nanahoshi-mona-ui-slider.mjs +54 -110
  72. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +7 -20
  73. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +15 -50
  74. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +28 -91
  75. package/fesm2022/nanahoshi-mona-ui-switch.mjs +37 -58
  76. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -107
  77. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +22 -30
  78. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +40 -61
  79. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  80. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +41 -27
  81. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +35 -99
  82. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +13 -41
  83. package/fesm2022/nanahoshi-mona-ui-window.mjs +29 -108
  84. package/fieldset/package.json +4 -0
  85. package/filter/package.json +4 -0
  86. package/grid/package.json +4 -0
  87. package/internal/filter-input/package.json +4 -0
  88. package/internal/indicator-icon/package.json +4 -0
  89. package/internal/list/package.json +4 -0
  90. package/internal/package.json +4 -0
  91. package/internal/tree/package.json +4 -0
  92. package/list/package.json +4 -0
  93. package/list-box/package.json +4 -0
  94. package/list-view/package.json +4 -0
  95. package/menubar/package.json +4 -0
  96. package/multi-select/package.json +4 -0
  97. package/notification/package.json +4 -0
  98. package/numeric-text-box/package.json +4 -0
  99. package/package.json +2 -1
  100. package/pager/package.json +4 -0
  101. package/placeholder/package.json +4 -0
  102. package/popover/package.json +4 -0
  103. package/popup/package.json +4 -0
  104. package/popup-menu/package.json +4 -0
  105. package/progress-bar/package.json +4 -0
  106. package/query/package.json +4 -0
  107. package/radio-button/package.json +4 -0
  108. package/scroll-view/package.json +4 -0
  109. package/slider/package.json +4 -0
  110. package/split-button/package.json +4 -0
  111. package/splitter/package.json +4 -0
  112. package/stepper/package.json +4 -0
  113. package/switch/package.json +4 -0
  114. package/tabs/package.json +4 -0
  115. package/text-area/package.json +4 -0
  116. package/text-box/package.json +4 -0
  117. package/theme/package.json +4 -0
  118. package/time-picker/package.json +4 -0
  119. package/time-selector/package.json +4 -0
  120. package/tooltip/package.json +4 -0
  121. package/tree-view/package.json +4 -0
  122. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  123. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  124. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  125. package/types/nanahoshi-mona-ui-button.d.ts +2 -3
  126. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  127. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  128. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  129. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  130. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  131. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  132. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -5
  133. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  134. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  135. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  136. package/types/nanahoshi-mona-ui-dialog.d.ts +6 -7
  137. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  138. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  139. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  140. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  141. package/types/nanahoshi-mona-ui-filter.d.ts +2 -3
  142. package/types/nanahoshi-mona-ui-grid.d.ts +14 -15
  143. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  144. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  145. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  146. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  147. package/types/nanahoshi-mona-ui-menubar.d.ts +6 -7
  148. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  149. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  150. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  151. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  152. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  154. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  155. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  156. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  157. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  158. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  159. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  160. package/types/nanahoshi-mona-ui-stepper.d.ts +12 -13
  161. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  162. package/types/nanahoshi-mona-ui-tabs.d.ts +14 -16
  163. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  164. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  165. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  166. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  167. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  168. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  169. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  170. package/window/package.json +4 -0
@@ -1,16 +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, Component, contentChild, TemplateRef, ChangeDetectionStrategy, 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
5
  import { firstOrDefault, select } from '@mirei/ts-collections';
6
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
7
6
  import { twMerge } from 'tailwind-merge';
8
7
  import { cva } from 'class-variance-authority';
8
+ import { themeRaisedBackdropClasses, themeRaisedSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
9
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
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 { createElementControlId } from '@nanahoshi/mona-ui/internal';
14
13
 
15
14
  class TabCloseEvent extends PreventableEvent {
16
15
  #index;
@@ -63,11 +62,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
63
62
  }]
64
63
  }] });
65
64
 
66
- const tabListBaseVariants = cva(`
67
- w-fit max-w-full
68
- flex overflow-hidden
69
- bg-accent
70
- 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}
71
69
  `, {
72
70
  variants: {
73
71
  rounded: {
@@ -84,27 +82,24 @@ const tabListBaseVariants = cva(`
84
82
  }
85
83
  }
86
84
  });
87
- const tabListListWrapperVariants = cva(`w-full h-full overflow-hidden`);
88
- const tabListListVariants = cva(`
89
- flex h-full w-full overflow-hidden
90
- list-none cursor-default
91
- select-none whitespace-nowrap
92
- p-[3px]
93
- 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
94
90
  `);
95
- const tabListListItemVariants = cva(`
96
- flex items-center justify-center
97
- cursor-pointer
98
- px-2 outline-none
99
- 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
100
95
  `, {
101
96
  variants: {
102
97
  active: {
103
- 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`,
104
99
  false: ""
105
100
  },
106
101
  disabled: {
107
- true: "pointer-events-none cursor-not-allowed opacity-50 select-none",
102
+ true: "pointer-events-none cursor-not-allowed select-none text-disabled-foreground",
108
103
  false: ""
109
104
  },
110
105
  rounded: {
@@ -119,14 +114,17 @@ const tabListListItemVariants = cva(`
119
114
  rounded: "medium"
120
115
  }
121
116
  });
122
- const tabListScrollButtonVariants = cva(`
123
- flex items-center justify-center
124
- 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
125
122
  `);
126
- const tabContentVariants = cva(`
127
- w-full overflow-auto flex-1
128
- border border-border shadow-sm
129
- bg-background text-foreground
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)
130
128
  `, {
131
129
  variants: {
132
130
  rounded: {
@@ -141,77 +139,17 @@ const tabContentVariants = cva(`
141
139
  rounded: "medium"
142
140
  }
143
141
  });
144
- const tabsBaseVariants = cva(`
145
- max-w-full
146
- flex flex-col gap-2
142
+ const tabsBaseThemeVariants = cva(`
143
+ flex max-w-full flex-col gap-2
147
144
  `);
148
145
 
149
- const tabListBaseThemeVariants = (theme) => {
150
- switch (theme) {
151
- case "mona":
152
- return tabListBaseVariants;
153
- default:
154
- return tabListBaseVariants;
155
- }
156
- };
157
- const tabListListWrapperThemeVariants = (theme) => {
158
- switch (theme) {
159
- case "mona":
160
- return tabListListWrapperVariants;
161
- default:
162
- return tabListListWrapperVariants;
163
- }
164
- };
165
- const tabListListThemeVariants = (theme) => {
166
- switch (theme) {
167
- case "mona":
168
- return tabListListVariants;
169
- default:
170
- return tabListListVariants;
171
- }
172
- };
173
- const tabListListItemThemeVariants = (theme) => {
174
- switch (theme) {
175
- case "mona":
176
- return tabListListItemVariants;
177
- default:
178
- return tabListListItemVariants;
179
- }
180
- };
181
- const tabListScrollButtonThemeVariants = (theme) => {
182
- switch (theme) {
183
- case "mona":
184
- return tabListScrollButtonVariants;
185
- default:
186
- return tabListScrollButtonVariants;
187
- }
188
- };
189
- const tabContentThemeVariants = (theme) => {
190
- switch (theme) {
191
- case "mona":
192
- return tabContentVariants;
193
- default:
194
- return tabContentVariants;
195
- }
196
- };
197
- const tabsBaseThemeVariants = (theme) => {
198
- switch (theme) {
199
- case "mona":
200
- return tabsBaseVariants;
201
- default:
202
- return tabsBaseVariants;
203
- }
204
- };
205
-
206
146
  class TabListItemDirective {
207
147
  constructor() {
208
- this.#themeService = inject(ThemeService);
209
148
  this.listItemClass = computed(() => {
210
- const theme = this.#themeService.theme();
211
149
  const active = this.active();
212
150
  const disabled = this.disabled();
213
151
  const rounded = this.rounded();
214
- return tabListListItemThemeVariants(theme)({ active, disabled, rounded });
152
+ return tabListListItemThemeVariants({ active, disabled, rounded });
215
153
  }, /* @ts-ignore */
216
154
  ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
217
155
  this.active = input.required(/* @ts-ignore */
@@ -221,7 +159,6 @@ class TabListItemDirective {
221
159
  this.rounded = input.required(/* @ts-ignore */
222
160
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
223
161
  }
224
- #themeService;
225
162
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
226
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 }); }
227
164
  }
@@ -237,31 +174,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
237
174
 
238
175
  class TabListComponent {
239
176
  #destroyRef;
240
- #themeService;
241
177
  #keydown$;
242
178
  #resizeObserver;
243
179
  #scrollIntent$;
244
180
  constructor() {
245
181
  this.#destroyRef = inject(DestroyRef);
246
- this.#themeService = inject(ThemeService);
247
182
  this.#keydown$ = new Subject();
248
183
  this.#resizeObserver = null;
249
184
  this.#scrollIntent$ = new Subject();
250
185
  this.baseClass = computed(() => {
251
- const theme = this.#themeService.theme();
252
186
  const rounded = this.rounded();
253
187
  const size = this.size();
254
- return tabListBaseThemeVariants(theme)({ rounded, size });
188
+ return tabListBaseThemeVariants({ rounded, size });
255
189
  }, /* @ts-ignore */
256
190
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
257
191
  this.listClass = computed(() => {
258
- const theme = this.#themeService.theme();
259
- return tabListListThemeVariants(theme)();
192
+ return tabListListThemeVariants();
260
193
  }, /* @ts-ignore */
261
194
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
262
195
  this.scrollButtonClass = computed(() => {
263
- const theme = this.#themeService.theme();
264
- return tabListScrollButtonThemeVariants(theme)();
196
+ return tabListScrollButtonThemeVariants();
265
197
  }, /* @ts-ignore */
266
198
  ...(ngDevMode ? [{ debugName: "scrollButtonClass" }] : /* istanbul ignore next */ []));
267
199
  this.scrollsVisible = signal(false, /* @ts-ignore */
@@ -551,22 +483,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
551
483
 
552
484
  class TabsComponent {
553
485
  constructor() {
554
- this.#themeService = inject(ThemeService);
555
486
  this.tabListComponent = viewChild.required(TabListComponent, /* @ts-ignore */
556
487
  ...(ngDevMode ? [{ debugName: "tabListComponent" }] : /* istanbul ignore next */ []));
557
488
  this.tabs = contentChildren(TabComponent, /* @ts-ignore */
558
489
  ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
559
490
  this.baseClass = computed(() => {
560
- const theme = this.#themeService.theme();
561
- const variantClass = tabsBaseThemeVariants(theme)();
491
+ const variantClass = tabsBaseThemeVariants();
562
492
  const userClass = this.userClass();
563
493
  return twMerge(variantClass, userClass);
564
494
  }, /* @ts-ignore */
565
495
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
566
496
  this.contentClass = computed(() => {
567
- const theme = this.#themeService.theme();
568
497
  const rounded = this.rounded() === "full" ? "large" : this.rounded();
569
- return tabContentThemeVariants(theme)({ rounded });
498
+ return tabContentThemeVariants({ rounded });
570
499
  }, /* @ts-ignore */
571
500
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
572
501
  this.selectedTabId = linkedSignal({ ...(ngDevMode ? { debugName: "selectedTabId" } : /* istanbul ignore next */ {}), source: () => this.tabList(),
@@ -628,7 +557,6 @@ class TabsComponent {
628
557
  */
629
558
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
630
559
  }
631
- #themeService;
632
560
  handlePanelKeyDown(event) {
633
561
  if (event.key === "Tab" && event.shiftKey) {
634
562
  if (event.target !== event.currentTarget) {
@@ -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
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
11
13
  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
-
14
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
17
15
  placeholder:text-muted-foreground
18
16
 
19
- focus-visible:ring-2 focus-visible:ring-primary/40
20
- focus-visible:border-primary
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
21
 
22
- disabled:pointer-events-none disabled:opacity-50
23
- disabled:cursor-not-allowed disabled:select-none
22
+ focus-visible:border-focus-indicator
23
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
24
24
 
25
25
  [&.ng-touched.ng-invalid]:border-error
26
- [&.ng-touched.ng-invalid]:ring-error/40
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
27
29
  data-[invalid='true']:border-error
28
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
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
  }
@@ -5,8 +5,7 @@ import * as i1 from '@angular/forms';
5
5
  import { FormsModule } from '@angular/forms';
6
6
  import { LucideX } from '@lucide/angular';
7
7
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
8
- import { rxTimeout, AttributeBinderDirective } from '@nanahoshi/mona-ui/internal';
9
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
8
+ import { themeControlSurfaceClasses, rxTimeout, AttributeBinderDirective } from '@nanahoshi/mona-ui/internal';
10
9
  import { twMerge } from 'tailwind-merge';
11
10
  import { cva } from 'class-variance-authority';
12
11
 
@@ -32,31 +31,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
32
31
  }]
33
32
  }] });
34
33
 
35
- const textBoxVariants = cva(`
36
- flex items-center w-full min-w-0
34
+ const textBoxThemeVariants = cva(`
35
+ flex w-full min-w-0 items-center
37
36
  overflow-hidden
38
-
39
- bg-input-background text-foreground
40
- border border-input-border outline-none
37
+ ${themeControlSurfaceClasses} text-foreground
38
+ border border-input-border shadow-(--shadow-control)
39
+ outline-none
41
40
  selection:bg-primary selection:text-primary-foreground
42
-
43
- transition-[color,box-shadow,border] ease-in-out duration-300
41
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
44
42
 
45
43
  data-[disabled='true']:pointer-events-none
46
44
  data-[disabled='true']:cursor-not-allowed
47
- data-[disabled='true']:opacity-50
45
+ data-[disabled='true']:border-disabled-border
46
+ data-[disabled='true']:bg-disabled-background
47
+ data-[disabled='true']:text-disabled-foreground
48
+ data-[disabled='true']:shadow-none
49
+ data-[readonly='true']:cursor-default
48
50
 
49
- focus-within:ring-2 focus-within:ring-primary/40
50
- focus-within:border-primary
51
+ focus-within:border-focus-indicator
52
+ focus-within:ring-2 focus-within:ring-focus-indicator/35
53
+
54
+ data-[invalid='true']:border-error
55
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
56
+ data-[invalid='true']:focus-within:border-error
57
+ data-[invalid='true']:focus-within:ring-error/35
51
58
 
52
- [&>input]:w-full [&>input]:h-full
59
+ [&>input]:h-full [&>input]:w-full
60
+ [&>input]:px-2
53
61
  [&>input]:bg-transparent
54
62
  [&>input]:border-0 [&>input]:outline-none
55
63
  [&>input]:placeholder:text-muted-foreground
56
- [&>input]:px-2
57
-
58
- data-[invalid='true']:border-error
59
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
60
64
  `, {
61
65
  variants: {
62
66
  rounded: {
@@ -73,33 +77,31 @@ const textBoxVariants = cva(`
73
77
  }
74
78
  }
75
79
  });
76
- const inputVariants = cva(`
77
- bg-input-background
80
+ const inputThemeVariants = cva(`
78
81
  px-2
79
-
80
- border border-input-border outline-none
82
+ ${themeControlSurfaceClasses} text-foreground
83
+ border border-input-border shadow-(--shadow-control)
84
+ outline-none
81
85
  selection:bg-primary selection:text-primary-foreground
86
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
82
87
 
83
- transition-[color,box-shadow,border] ease-in-out duration-300
84
-
85
- shadow-xs
86
-
87
- file:text-foreground
88
88
  file:inline-flex file:border-0
89
89
  file:bg-transparent file:text-xs
90
- file:font-medium
91
-
90
+ file:font-medium file:text-foreground
92
91
  placeholder:text-muted-foreground
93
92
 
94
- disabled:pointer-events-none
95
- disabled:cursor-not-allowed
96
- disabled:opacity-50
93
+ disabled:pointer-events-none disabled:cursor-not-allowed
94
+ disabled:border-disabled-border disabled:bg-disabled-background disabled:text-disabled-foreground
95
+ disabled:shadow-none
96
+ read-only:cursor-default
97
97
 
98
- focus-visible:ring-2 focus-visible:ring-primary/40
99
- focus-visible:border-primary
98
+ focus-visible:border-focus-indicator
99
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
100
100
 
101
101
  [&.ng-touched.ng-invalid]:border-error
102
- [&.ng-touched.ng-invalid]:ring-error/40
102
+ [&.ng-touched.ng-invalid]:ring-2 [&.ng-touched.ng-invalid]:ring-error/35
103
+ [&.ng-touched.ng-invalid]:focus-visible:border-error
104
+ [&.ng-touched.ng-invalid]:focus-visible:ring-error/35
103
105
  `, {
104
106
  variants: {
105
107
  rounded: {
@@ -134,32 +136,13 @@ const inputVariants = cva(`
134
136
  ]
135
137
  });
136
138
 
137
- const textBoxThemeVariants = (theme) => {
138
- switch (theme) {
139
- case "mona":
140
- return textBoxVariants;
141
- default:
142
- return textBoxVariants; // Default to Mona styles
143
- }
144
- };
145
- const inputThemeVariants = (theme) => {
146
- switch (theme) {
147
- case "mona":
148
- return inputVariants;
149
- default:
150
- return inputVariants; // Default to Mona styles
151
- }
152
- };
153
-
154
139
  class TextBoxComponent {
155
140
  constructor() {
156
141
  this.#destroyRef = inject(DestroyRef);
157
- this.#themeService = inject(ThemeService);
158
142
  this.classes = computed(() => {
159
- const theme = this.#themeService.theme();
160
143
  const rounded = this.rounded();
161
144
  const size = this.size();
162
- const classes = textBoxThemeVariants(theme)({ rounded, size });
145
+ const classes = textBoxThemeVariants({ rounded, size });
163
146
  const userClass = this.userClass();
164
147
  return twMerge(classes, userClass);
165
148
  }, /* @ts-ignore */
@@ -278,7 +261,6 @@ class TextBoxComponent {
278
261
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
279
262
  }
280
263
  #destroyRef;
281
- #themeService;
282
264
  focus() {
283
265
  const el = this.inputRef().nativeElement;
284
266
  el.focus();
@@ -300,7 +282,7 @@ class TextBoxComponent {
300
282
  this.touch.emit();
301
283
  }
302
284
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
303
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TextBoxComponent, isStandalone: true, selector: "mona-text-box", inputs: { clearButton: { classPropertyName: "clearButton", publicName: "clearButton", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputAttributes: { classPropertyName: "inputAttributes", publicName: "inputAttributes", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputBlur: "inputBlur", inputFocus: "inputFocus", touch: "touch", value: "valueChange" }, host: { properties: { "attr.data-disabled": "disabled() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "attr.data-invalid": "invalidInput() || null", "class": "classes()" } }, queries: [{ propertyName: "prefixTemplateList", predicate: TextBoxPrefixTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "suffixTemplateList", predicate: TextBoxSuffixTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex items-center flex-wrap h-full\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@let textBoxValue = value();\n@if (clearButton() && textBoxValue && textBoxValue.length !== 0) {\n <button monaButton look=\"link\" size=\"small\" class=\"p-0 mr-2\" aria-label=\"Clear\" (click)=\"onClearClick()\">\n <svg lucideX class=\"opacity-50 size-4 hover:opacity-90\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex items-center flex-wrap h-full\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: AttributeBinderDirective, selector: "[monaAttributeBinder]", inputs: ["monaAttributeBinder"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TextBoxComponent, isStandalone: true, selector: "mona-text-box", inputs: { clearButton: { classPropertyName: "clearButton", publicName: "clearButton", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputAttributes: { classPropertyName: "inputAttributes", publicName: "inputAttributes", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputBlur: "inputBlur", inputFocus: "inputFocus", touch: "touch", value: "valueChange" }, host: { properties: { "attr.data-disabled": "disabled() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "attr.data-invalid": "invalidInput() || null", "class": "classes()" } }, queries: [{ propertyName: "prefixTemplateList", predicate: TextBoxPrefixTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "suffixTemplateList", predicate: TextBoxSuffixTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@let textBoxValue = value();\n@if (clearButton() && textBoxValue && textBoxValue.length !== 0) {\n <button monaButton look=\"link\" size=\"small\" class=\"me-2 p-0\" aria-label=\"Clear\" (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4 opacity-50 hover:opacity-90\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: AttributeBinderDirective, selector: "[monaAttributeBinder]", inputs: ["monaAttributeBinder"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
304
286
  }
305
287
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxComponent, decorators: [{
306
288
  type: Component,
@@ -310,17 +292,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
310
292
  "[attr.data-required]": "required() || null",
311
293
  "[attr.data-invalid]": "invalidInput() || null",
312
294
  "[class]": "classes()"
313
- }, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex items-center flex-wrap h-full\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@let textBoxValue = value();\n@if (clearButton() && textBoxValue && textBoxValue.length !== 0) {\n <button monaButton look=\"link\" size=\"small\" class=\"p-0 mr-2\" aria-label=\"Clear\" (click)=\"onClearClick()\">\n <svg lucideX class=\"opacity-50 size-4 hover:opacity-90\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex items-center flex-wrap h-full\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n" }]
295
+ }, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@let textBoxValue = value();\n@if (clearButton() && textBoxValue && textBoxValue.length !== 0) {\n <button monaButton look=\"link\" size=\"small\" class=\"me-2 p-0\" aria-label=\"Clear\" (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4 opacity-50 hover:opacity-90\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n" }]
314
296
  }], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ["input", { isSignal: true }] }], prefixTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TextBoxPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], suffixTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TextBoxSuffixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], clearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButton", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAttributes", required: false }] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
315
297
 
316
298
  class TextBoxDirective {
317
299
  constructor() {
318
- this.#themeService = inject(ThemeService);
319
300
  this.classes = computed(() => {
320
301
  const rounded = this.rounded();
321
302
  const size = this.size();
322
- const theme = this.#themeService.theme();
323
- const classes = inputThemeVariants(theme)({ rounded, size });
303
+ const classes = inputThemeVariants({ rounded, size });
324
304
  const userClass = this.userClass();
325
305
  return twMerge(classes, userClass);
326
306
  }, /* @ts-ignore */
@@ -343,7 +323,6 @@ class TextBoxDirective {
343
323
  */
344
324
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
345
325
  }
346
- #themeService;
347
326
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
348
327
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TextBoxDirective, isStandalone: true, selector: "input[monaTextBox]", inputs: { 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 } }, host: { properties: { "class": "classes()" } }, ngImport: i0 }); }
349
328
  }