@nanahoshi/mona-ui 0.1.1 → 0.2.1

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 +40 -55
  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 +54 -150
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +67 -99
  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 +27 -78
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +17 -39
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +39 -48
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +34 -54
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +9 -12
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +42 -29
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +53 -53
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -153
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +33 -54
  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 +27 -57
  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 +36 -63
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -108
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +38 -64
  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 +78 -98
  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 -59
  76. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -107
  77. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +19 -31
  78. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -65
  79. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  80. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +43 -29
  81. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +40 -102
  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 +18 -10
  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 +28 -13
  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 +16 -7
  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 +11 -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
@@ -2,17 +2,16 @@ import { DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, DestroyRef, Renderer2, computed, linkedSignal, viewChild, TemplateRef, input, output, afterRenderEffect, Component, ElementRef, EnvironmentInjector, signal, createComponent, Directive, ChangeDetectionStrategy } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { createElementControlId } from '@nanahoshi/mona-ui/internal';
5
+ import { themeOverlaySurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
6
6
  import { PopupService, fadePopupAnimation } from '@nanahoshi/mona-ui/popup';
7
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
8
7
  import { take, takeUntil, Subscription, fromEvent, tap } from 'rxjs';
9
8
  import { cva } from 'class-variance-authority';
10
9
  import { twMerge } from 'tailwind-merge';
11
10
 
12
- const tooltipBaseVariants = cva(`
13
- flex items-center justify-center relative
14
- bg-background text-foreground border border-border
15
- shadow-[0_2px_8px_rgba(0,0,0,0.12)] z-1
11
+ const tooltipBaseThemeVariants = cva(`
12
+ relative z-1 flex items-center justify-center
13
+ ${themeOverlaySurfaceClasses} text-foreground
14
+ border border-border shadow-(--shadow-overlay)
16
15
  `, {
17
16
  variants: {
18
17
  rounded: {
@@ -24,13 +23,11 @@ const tooltipBaseVariants = cva(`
24
23
  }
25
24
  }
26
25
  });
27
- const tooltipArrowVariants = cva(`
28
- absolute w-3 h-3 box-border
26
+ const tooltipArrowThemeVariants = cva(`
27
+ absolute z-0 h-3 w-3 rotate-45 transform-center box-border
29
28
  pointer-events-none
30
- transform-center rotate-45
31
- z-0 bg-background text-foreground
32
-
33
- border border-border
29
+ ${themeOverlaySurfaceClasses}
30
+ border border-border shadow-(--shadow-overlay)
34
31
 
35
32
  data-[position="top"]:-bottom-1.5
36
33
  data-[position="top"]:border-t-0
@@ -53,23 +50,6 @@ const tooltipArrowVariants = cva(`
53
50
  data-[position="right"]:[clip-path:inset(1px_1px_0_0)]
54
51
  `);
55
52
 
56
- const tooltipBaseThemeVariants = (theme) => {
57
- switch (theme) {
58
- case "mona":
59
- return tooltipBaseVariants;
60
- default:
61
- return tooltipBaseVariants;
62
- }
63
- };
64
- const tooltipArrowThemeVariants = (theme) => {
65
- switch (theme) {
66
- case "mona":
67
- return tooltipArrowVariants;
68
- default:
69
- return tooltipArrowVariants;
70
- }
71
- };
72
-
73
53
  /**
74
54
  * Derives the tooltip arrow position from a ConnectionPositionPair.
75
55
  * This function determines where the arrow should be positioned based on
@@ -143,7 +123,6 @@ class TooltipComponent {
143
123
  #document;
144
124
  #popupService;
145
125
  #renderer;
146
- #themeService;
147
126
  #currentAnchor;
148
127
  #eventSubscription;
149
128
  #hideTimeoutId;
@@ -155,7 +134,6 @@ class TooltipComponent {
155
134
  this.#document = inject(DOCUMENT);
156
135
  this.#popupService = inject(PopupService);
157
136
  this.#renderer = inject(Renderer2);
158
- this.#themeService = inject(ThemeService);
159
137
  this.#currentAnchor = null;
160
138
  this.#eventSubscription = null;
161
139
  this.#hideTimeoutId = null;
@@ -163,14 +141,12 @@ class TooltipComponent {
163
141
  this.#popupRef = null;
164
142
  this.#showTimeoutId = null;
165
143
  this.arrowClasses = computed(() => {
166
- const theme = this.#themeService.theme();
167
- return tooltipArrowThemeVariants(theme)();
144
+ return tooltipArrowThemeVariants();
168
145
  }, /* @ts-ignore */
169
146
  ...(ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []));
170
147
  this.baseClasses = computed(() => {
171
- const theme = this.#themeService.theme();
172
148
  const rounded = this.rounded();
173
- return tooltipBaseThemeVariants(theme)({ rounded });
149
+ return tooltipBaseThemeVariants({ rounded });
174
150
  }, /* @ts-ignore */
175
151
  ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
176
152
  this.currentArrowPosition = linkedSignal(() => this.position(), /* @ts-ignore */
@@ -635,17 +611,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
635
611
  }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideDelay", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipRounded", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDelay", required: false }] }], hidden: [{ type: i0.Output, args: ["hidden"] }], shown: [{ type: i0.Output, args: ["shown"] }] } });
636
612
  class TooltipTemplateComponent {
637
613
  constructor() {
638
- this.#themeService = inject(ThemeService);
639
614
  this.arrowClasses = computed(() => {
640
- const theme = this.#themeService.theme();
641
- return tooltipArrowThemeVariants(theme)();
615
+ return tooltipArrowThemeVariants();
642
616
  }, /* @ts-ignore */
643
617
  ...(ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []));
644
618
  this.baseClasses = computed(() => {
645
- const theme = this.#themeService.theme();
646
619
  const rounded = this.rounded();
647
620
  const userClasses = `p-2`;
648
- const variants = tooltipBaseThemeVariants(theme)({ rounded });
621
+ const variants = tooltipBaseThemeVariants({ rounded });
649
622
  return twMerge(variants, userClasses);
650
623
  }, /* @ts-ignore */
651
624
  ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
@@ -674,7 +647,6 @@ class TooltipTemplateComponent {
674
647
  this.templateRef = viewChild.required(TemplateRef, /* @ts-ignore */
675
648
  ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
676
649
  }
677
- #themeService;
678
650
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TooltipTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
679
651
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TooltipTemplateComponent, isStandalone: true, selector: "ng-component", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, tooltipId: { classPropertyName: "tooltipId", publicName: "tooltipId", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
680
652
  <ng-template>
@@ -2,14 +2,13 @@ import * as i0 from '@angular/core';
2
2
  import { Directive, inject, DestroyRef, DOCUMENT, ElementRef, NgZone, input, afterNextRender, Pipe, ApplicationRef, Injector, signal, ViewContainerRef, computed, viewChild, TemplateRef, createComponent, Component, forwardRef, Injectable, contentChild, output, model, effect, untracked } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { fromEvent, Subject, asapScheduler, map, take } from 'rxjs';
5
- import { createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
5
+ import { themeOverlaySurfaceClasses, createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
6
6
  import { PopupDataInjectionToken, PopupCloseEvent, PopupCloseSource, PopupService } from '@nanahoshi/mona-ui/popup';
7
7
  import * as i1 from '@angular/cdk/a11y';
8
8
  import { CdkTrapFocus } from '@angular/cdk/a11y';
9
9
  import { NgTemplateOutlet } from '@angular/common';
10
10
  import { LucideMinimize, LucideMaximize, LucideMinus, LucideDynamicIcon, LucideX } from '@lucide/angular';
11
11
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
12
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
13
12
  import { cva } from 'class-variance-authority';
14
13
 
15
14
  class WindowActionTemplateDirective {
@@ -432,9 +431,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
432
431
  }]
433
432
  }], ctorParameters: () => [], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: true }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], windowRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowRef", required: true }] }] } });
434
433
 
435
- const windowBaseVariants = cva(`
436
- flex flex-col w-full h-full
437
- bg-background text-foreground
434
+ const windowBaseThemeVariants = cva(`
435
+ flex h-full w-full flex-col
436
+ ${themeOverlaySurfaceClasses} text-foreground
438
437
  `, {
439
438
  variants: {
440
439
  rounded: {
@@ -448,11 +447,10 @@ const windowBaseVariants = cva(`
448
447
  rounded: "medium"
449
448
  }
450
449
  });
451
- const windowContentContainerVariants = cva(`
452
- flex flex-col
453
- relative w-full h-full
450
+ const windowContentContainerThemeVariants = cva(`
451
+ relative flex h-full w-full flex-col
454
452
  border border-border
455
- shadow-sm
453
+ shadow-(--shadow-overlay)
456
454
  `, {
457
455
  variants: {
458
456
  rounded: {
@@ -463,10 +461,11 @@ const windowContentContainerVariants = cva(`
463
461
  }
464
462
  }
465
463
  });
466
- const windowContentVariants = cva(`
464
+ const windowContentThemeVariants = cva(`
467
465
  flex-1 overflow-auto
466
+ [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
468
467
  `);
469
- const windowResizerVariants = cva(`
468
+ const windowResizerThemeVariants = cva(`
470
469
  absolute flex
471
470
  `, {
472
471
  variants: {
@@ -482,17 +481,17 @@ const windowResizerVariants = cva(`
482
481
  }
483
482
  }
484
483
  });
485
- const windowTitleBarActionVariants = cva(`
486
- flex items-center space-evenly
484
+ const windowTitleBarActionThemeVariants = cva(`
485
+ flex items-center justify-evenly
487
486
  `);
488
- const windowTitleBarVariants = cva(`
487
+ const windowTitleBarThemeVariants = cva(`
489
488
  flex items-center justify-start
490
- px-2 py-1 text-sm overflow-hidden
491
- border-b border-border
489
+ overflow-hidden px-2 py-1 text-sm
490
+ border-b border-border-subtle
492
491
  `, {
493
492
  variants: {
494
493
  look: {
495
- default: "bg-secondary text-foreground",
494
+ default: "bg-surface-muted text-foreground",
496
495
  primary: "bg-primary text-primary-foreground"
497
496
  },
498
497
  rounded: {
@@ -503,14 +502,12 @@ const windowTitleBarVariants = cva(`
503
502
  }
504
503
  }
505
504
  });
506
- const windowTitleContainerVariants = cva(`
507
- flex items-center flex-1
508
- h-full cursor-default select-none
509
- overflow-hidden text-ellipsis
505
+ const windowTitleContainerThemeVariants = cva(`
506
+ flex h-full flex-1 items-center overflow-hidden
507
+ cursor-default select-none text-ellipsis
510
508
  `);
511
- const windowTitleVariants = cva(`
512
- font-semibold
513
- overflow-hidden text-ellipsis whitespace-nowrap
509
+ const windowTitleThemeVariants = cva(`
510
+ overflow-hidden text-ellipsis whitespace-nowrap font-semibold
514
511
  `, {
515
512
  variants: {
516
513
  look: {
@@ -520,79 +517,12 @@ const windowTitleVariants = cva(`
520
517
  }
521
518
  });
522
519
 
523
- const windowBaseThemeVariants = (theme) => {
524
- switch (theme) {
525
- case "mona":
526
- return windowBaseVariants;
527
- default:
528
- return windowBaseVariants;
529
- }
530
- };
531
- const windowContentContainerThemeVariants = (theme) => {
532
- switch (theme) {
533
- case "mona":
534
- return windowContentContainerVariants;
535
- default:
536
- return windowContentContainerVariants;
537
- }
538
- };
539
- const windowContentThemeVariants = (theme) => {
540
- switch (theme) {
541
- case "mona":
542
- return windowContentVariants;
543
- default:
544
- return windowContentVariants;
545
- }
546
- };
547
- const windowResizerThemeVariants = (theme) => {
548
- switch (theme) {
549
- case "mona":
550
- return windowResizerVariants;
551
- default:
552
- return windowResizerVariants;
553
- }
554
- };
555
- const windowTitleBarActionThemeVariants = (theme) => {
556
- switch (theme) {
557
- case "mona":
558
- return windowTitleBarActionVariants;
559
- default:
560
- return windowTitleBarActionVariants;
561
- }
562
- };
563
- const windowTitleBarThemeVariants = (theme) => {
564
- switch (theme) {
565
- case "mona":
566
- return windowTitleBarVariants;
567
- default:
568
- return windowTitleBarVariants;
569
- }
570
- };
571
- const windowTitleContainerThemeVariants = (theme) => {
572
- switch (theme) {
573
- case "mona":
574
- return windowTitleContainerVariants;
575
- default:
576
- return windowTitleContainerVariants;
577
- }
578
- };
579
- const windowTitleThemeVariants = (theme) => {
580
- switch (theme) {
581
- case "mona":
582
- return windowTitleVariants;
583
- default:
584
- return windowTitleVariants;
585
- }
586
- };
587
-
588
520
  class ResizePositionPipe {
589
- #themeService = inject(ThemeService);
590
521
  transform(position) {
591
522
  if (!position) {
592
523
  return null;
593
524
  }
594
- const theme = this.#themeService.theme();
595
- return windowResizerThemeVariants(theme)({ position });
525
+ return windowResizerThemeVariants({ position });
596
526
  }
597
527
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ResizePositionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
598
528
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: ResizePositionPipe, isStandalone: true, name: "monaResizePosition" }); }
@@ -611,7 +541,6 @@ class WindowContentComponent {
611
541
  #injector;
612
542
  #sizeBeforeMaximize;
613
543
  #sizeBeforeMinimize;
614
- #themeService;
615
544
  #trapFocus;
616
545
  #viewContainerRef;
617
546
  constructor() {
@@ -623,25 +552,21 @@ class WindowContentComponent {
623
552
  ...(ngDevMode ? [{ debugName: "#sizeBeforeMaximize" }] : /* istanbul ignore next */ []));
624
553
  this.#sizeBeforeMinimize = signal(0, /* @ts-ignore */
625
554
  ...(ngDevMode ? [{ debugName: "#sizeBeforeMinimize" }] : /* istanbul ignore next */ []));
626
- this.#themeService = inject(ThemeService);
627
555
  this.#trapFocus = inject(CdkTrapFocus);
628
556
  this.#viewContainerRef = inject(ViewContainerRef);
629
557
  this.baseClass = computed(() => {
630
- const theme = this.#themeService.theme();
631
558
  const rounded = this.windowData.rounded;
632
- return windowBaseThemeVariants(theme)({ rounded });
559
+ return windowBaseThemeVariants({ rounded });
633
560
  }, /* @ts-ignore */
634
561
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
635
562
  this.componentAnchor = viewChild.required("componentAnchor", { ...(ngDevMode ? { debugName: "componentAnchor" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
636
563
  this.contentClass = computed(() => {
637
- const theme = this.#themeService.theme();
638
- return windowContentThemeVariants(theme)();
564
+ return windowContentThemeVariants();
639
565
  }, /* @ts-ignore */
640
566
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
641
567
  this.contentContainerClass = computed(() => {
642
- const theme = this.#themeService.theme();
643
568
  const rounded = this.windowData.rounded;
644
- return windowContentContainerThemeVariants(theme)({ rounded });
569
+ return windowContentContainerThemeVariants({ rounded });
645
570
  }, /* @ts-ignore */
646
571
  ...(ngDevMode ? [{ debugName: "contentContainerClass" }] : /* istanbul ignore next */ []));
647
572
  this.contentTemplate = computed(() => {
@@ -661,26 +586,22 @@ class WindowContentComponent {
661
586
  this.minimized = signal(false, /* @ts-ignore */
662
587
  ...(ngDevMode ? [{ debugName: "minimized" }] : /* istanbul ignore next */ []));
663
588
  this.titleBarActionClass = computed(() => {
664
- const theme = this.#themeService.theme();
665
- return windowTitleBarActionThemeVariants(theme)();
589
+ return windowTitleBarActionThemeVariants();
666
590
  }, /* @ts-ignore */
667
591
  ...(ngDevMode ? [{ debugName: "titleBarActionClass" }] : /* istanbul ignore next */ []));
668
592
  this.titleBarClass = computed(() => {
669
- const theme = this.#themeService.theme();
670
593
  const look = this.windowData.look;
671
594
  const rounded = this.windowData.rounded;
672
- return windowTitleBarThemeVariants(theme)({ look, rounded });
595
+ return windowTitleBarThemeVariants({ look, rounded });
673
596
  }, /* @ts-ignore */
674
597
  ...(ngDevMode ? [{ debugName: "titleBarClass" }] : /* istanbul ignore next */ []));
675
598
  this.titleClass = computed(() => {
676
- const theme = this.#themeService.theme();
677
599
  const look = this.windowData.look;
678
- return windowTitleThemeVariants(theme)({ look });
600
+ return windowTitleThemeVariants({ look });
679
601
  }, /* @ts-ignore */
680
602
  ...(ngDevMode ? [{ debugName: "titleClass" }] : /* istanbul ignore next */ []));
681
603
  this.titleContainerClass = computed(() => {
682
- const theme = this.#themeService.theme();
683
- return windowTitleContainerThemeVariants(theme)();
604
+ return windowTitleContainerThemeVariants();
684
605
  }, /* @ts-ignore */
685
606
  ...(ngDevMode ? [{ debugName: "titleContainerClass" }] : /* istanbul ignore next */ []));
686
607
  this.windowData = inject(PopupDataInjectionToken);
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-fieldset.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-fieldset.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-filter.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-filter.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-grid.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-grid.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs",
3
+ "typings": "../../types/nanahoshi-mona-ui-internal-filter-input.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs",
3
+ "typings": "../../types/nanahoshi-mona-ui-internal-indicator-icon.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/nanahoshi-mona-ui-internal-list.mjs",
3
+ "typings": "../../types/nanahoshi-mona-ui-internal-list.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-internal.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-internal.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/nanahoshi-mona-ui-internal-tree.mjs",
3
+ "typings": "../../types/nanahoshi-mona-ui-internal-tree.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-list.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-list.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-list-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-list-box.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-list-view.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-list-view.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-menubar.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-menubar.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-multi-select.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-multi-select.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-notification.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-notification.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-numeric-text-box.d.ts"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -44,6 +44,7 @@
44
44
  "@lucide/angular": "^1.21.0",
45
45
  "@mirei/ts-collections": "^17.5.6",
46
46
  "class-variance-authority": "^0.7.1",
47
+ "culori": "^4.0.2",
47
48
  "luxon": "^3.7.2",
48
49
  "remixicon": "^4.9.1",
49
50
  "tailwind-merge": "^3.6.0",
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-pager.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-pager.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-placeholder.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-placeholder.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-popover.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-popover.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-popup.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-popup.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-popup-menu.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-popup-menu.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-progress-bar.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-progress-bar.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-query.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-query.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-radio-button.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-radio-button.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-scroll-view.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-scroll-view.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-slider.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-slider.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-split-button.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-split-button.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-splitter.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-splitter.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-stepper.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-stepper.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-switch.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-switch.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-tabs.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-tabs.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-text-area.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-text-area.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-text-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-text-box.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-theme.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-theme.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-time-picker.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-time-picker.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-time-selector.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-time-selector.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-tooltip.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-tooltip.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-tree-view.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-tree-view.d.ts"
4
+ }