@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,2 +1,2 @@
1
- export { C as CellEditEvent, w as GridAddCommandDirective, x as GridAddEvent, y as GridCancelCommandDirective, z as GridCancelEvent, A as GridCellTemplateDirective, B as GridColumnComponent, D as GridColumnTitleTemplateDirective, E as GridCommandColumnComponent, F as GridComponent, H as GridContextMenuDirective, I as GridDetailTemplateDirective, J as GridEditCommandDirective, K as GridEditEvent, L as GridEditTemplateDirective, M as GridEditableDirective, N as GridExportDirective, O as GridFilterableDirective, P as GridFooterTemplateDirective, Q as GridGroupFooterTemplateDirective, R as GridGroupableDirective, S as GridHeaderTemplateDirective, T as GridNoDataTemplateDirective, U as GridRemoveCommandDirective, V as GridRemoveEvent, W as GridReorderableDirective, X as GridResizableDirective, Y as GridSaveCommandDirective, Z as GridSaveEvent, _ as GridSelectableDirective, $ as GridSortableDirective, a0 as GridStatePersistenceDirective, a1 as GridToolbarTemplateDirective, a2 as GridVirtualScrollDirective, a3 as RowEditEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs';
1
+ export { C as CellEditEvent, w as GridAddCommandDirective, x as GridAddEvent, y as GridCancelCommandDirective, z as GridCancelEvent, A as GridCellTemplateDirective, B as GridColumnComponent, D as GridColumnTitleTemplateDirective, E as GridCommandColumnComponent, F as GridComponent, H as GridContextMenuDirective, I as GridDetailTemplateDirective, J as GridEditCommandDirective, K as GridEditEvent, L as GridEditTemplateDirective, M as GridEditableDirective, N as GridExportDirective, O as GridFilterableDirective, P as GridFooterTemplateDirective, Q as GridGroupFooterTemplateDirective, R as GridGroupableDirective, S as GridHeaderTemplateDirective, T as GridNoDataTemplateDirective, U as GridRemoveCommandDirective, V as GridRemoveEvent, W as GridReorderableDirective, X as GridResizableDirective, Y as GridSaveCommandDirective, Z as GridSaveEvent, _ as GridSelectableDirective, $ as GridSortableDirective, a0 as GridStatePersistenceDirective, a1 as GridToolbarTemplateDirective, a2 as GridVirtualScrollDirective, a3 as RowEditEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
2
2
  //# sourceMappingURL=nanahoshi-mona-ui-grid.mjs.map
@@ -1,14 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, computed, signal, viewChild, output, input, afterRenderEffect, untracked, Component } from '@angular/core';
2
+ import { computed, signal, viewChild, output, input, afterRenderEffect, untracked, Component } from '@angular/core';
3
3
  import { LucideLoader, LucideChevronDown, LucideX, LucideDynamicIcon } from '@lucide/angular';
4
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
5
4
  import { twMerge } from 'tailwind-merge';
6
5
  import { cva } from 'class-variance-authority';
7
6
 
8
- const indicatorIconHostVariants = cva(`h-full aspect-square flex-none inline-flex items-center justify-center self-stretch`, {
7
+ const indicatorIconHostThemeVariants = cva(`h-full aspect-square flex-none inline-flex items-center justify-center self-stretch`, {
9
8
  variants: {
10
9
  interactive: {
11
- true: "opacity-50 hover:opacity-90 focus:ring-1 focus:ring-primary/40 focus:outline-none",
10
+ true: `
11
+ opacity-50
12
+ hover:opacity-90
13
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35 focus-visible:outline-none
14
+ `,
12
15
  false: ""
13
16
  },
14
17
  preset: {
@@ -21,7 +24,7 @@ const indicatorIconHostVariants = cva(`h-full aspect-square flex-none inline-fle
21
24
  interactive: false
22
25
  }
23
26
  });
24
- const indicatorIconSvgVariants = cva(``, {
27
+ const indicatorIconSvgThemeVariants = cva(``, {
25
28
  variants: {
26
29
  loading: {
27
30
  true: "animate-[spin_2s_linear_infinite]",
@@ -33,40 +36,19 @@ const indicatorIconSvgVariants = cva(``, {
33
36
  }
34
37
  });
35
38
 
36
- const indicatorIconHostThemeVariants = (theme) => {
37
- switch (theme) {
38
- case "mona":
39
- return indicatorIconHostVariants;
40
- default:
41
- return indicatorIconHostVariants;
42
- }
43
- };
44
- const indicatorIconSvgThemeVariants = (theme) => {
45
- switch (theme) {
46
- case "mona":
47
- return indicatorIconSvgVariants;
48
- default:
49
- return indicatorIconSvgVariants;
50
- }
51
- };
52
-
53
39
  class IndicatorIconComponent {
54
- #themeService;
55
40
  constructor() {
56
- this.#themeService = inject(ThemeService);
57
41
  this.baseClass = computed(() => {
58
- const theme = this.#themeService.theme();
59
42
  const interactive = this.interactive();
60
43
  const preset = this.preset();
61
- return twMerge(indicatorIconHostThemeVariants(theme)({ interactive, preset }), this.userClass());
44
+ return twMerge(indicatorIconHostThemeVariants({ interactive, preset }), this.userClass());
62
45
  }, /* @ts-ignore */
63
46
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
64
47
  this.hasProjectedContent = signal(false, /* @ts-ignore */
65
48
  ...(ngDevMode ? [{ debugName: "hasProjectedContent" }] : /* istanbul ignore next */ []));
66
49
  this.iconClass = computed(() => {
67
- const theme = this.#themeService.theme();
68
50
  const loading = this.preset() === "loading";
69
- return indicatorIconSvgThemeVariants(theme)({ loading });
51
+ return indicatorIconSvgThemeVariants({ loading });
70
52
  }, /* @ts-ignore */
71
53
  ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
72
54
  this.iconToRender = computed(() => {
@@ -714,53 +714,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
714
714
  type: Injectable
715
715
  }] });
716
716
 
717
- const listVariants = cva(`
718
- h-full flex flex-col overflow-hidden outline-none
719
- `);
720
- const listInnerListVariants = cva(`
721
- list-none p-0 m-0 overflow-x-hidden overflow-y-auto
722
- h-full outline-none
723
- `);
724
- const listGroupHeaderVariants = cva(``, {
717
+ const listThemeVariants = cva(`flex h-full flex-col overflow-hidden bg-(--mona-list-background) outline-none`);
718
+ const listInnerListThemeVariants = cva(`m-0 h-full list-none overflow-x-hidden overflow-y-auto p-0 outline-none [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]`);
719
+ const listGroupHeaderThemeVariants = cva(``, {
725
720
  variants: {
726
721
  hasTemplate: {
727
722
  true: "",
728
- false: "py-1 font-bold"
723
+ false: "border-y-[length:var(--mona-list-group-border-width)] border-border-subtle bg-(--mona-list-group-background) py-1 font-[var(--mona-list-group-font-weight)]"
729
724
  }
730
725
  }
731
726
  });
732
- const listGroupHeaderTextVariants = cva(`select-none`, {
727
+ const listGroupHeaderTextThemeVariants = cva(`select-none text-muted-foreground`, {
733
728
  variants: {
734
- hasTemplate: {
735
- true: "",
736
- false: "font-bold w-full px-3 py-1"
737
- }
729
+ hasTemplate: { true: "", false: "w-full px-3 py-1 font-[var(--mona-list-group-font-weight)]" }
738
730
  }
739
731
  });
740
- const listItemBaseVariants = cva(`
741
- w-full h-full flex gap-2 items-center
742
- `);
743
- const listItemContentVariants = cva(`
744
- relative flex cursor-default select-none items-center
745
- outline-none px-3 py-1
746
- hover:bg-accent hover:text-accent-foreground
747
- focus:bg-accent focus:text-accent-foreground
748
- `, {
732
+ const listItemBaseThemeVariants = cva(`flex h-full w-full items-center gap-2`);
733
+ const listItemContentThemeVariants = cva(`relative flex cursor-default select-none items-center px-3 py-1 text-foreground outline-none hover:bg-hover focus:bg-hover`, {
749
734
  variants: {
750
- checkboxes: {
751
- true: "gap-2",
752
- false: ""
753
- },
735
+ checkboxes: { true: "gap-2", false: "" },
754
736
  highlighted: {
755
- true: "bg-accent text-accent-foreground rounded-none inset-ring-1 inset-ring-gray-400/70",
756
- false: ""
757
- },
758
- selected: {
759
- true: "bg-primary text-primary-foreground inset-ring-1 inset-ring-primary-foreground/40",
737
+ true: "bg-hover text-foreground inset-ring-1 inset-ring-focus-indicator/35",
760
738
  false: ""
761
739
  },
740
+ selected: { true: "bg-(--color-selected) text-(--color-selected-foreground)", false: "" },
762
741
  disabled: {
763
- true: "pointer-events-none opacity-50 cursor-default",
742
+ true: "pointer-events-none cursor-default bg-(--mona-list-disabled-background) text-disabled-foreground",
764
743
  false: "cursor-pointer"
765
744
  }
766
745
  },
@@ -768,29 +747,15 @@ const listItemContentVariants = cva(`
768
747
  {
769
748
  selected: true,
770
749
  checkboxes: false,
771
- class: `
772
- bg-primary text-primary-foreground rounded-none
773
- inset-ring-1 inset-ring-primary-foreground/40
774
- hover:bg-primary hover:text-primary-foreground
775
- focus:bg-primary focus:text-primary-foreground
776
- `
750
+ class: "bg-(--color-selected) text-(--color-selected-foreground) hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground) focus:bg-(--color-selected-focus) focus:text-(--color-selected-focus-foreground)"
777
751
  },
778
752
  {
779
753
  highlighted: true,
780
754
  selected: true,
781
755
  checkboxes: false,
782
- class: `
783
- bg-primary text-primary-foreground rounded-none
784
- inset-ring-1 inset-ring-primary-foreground/40
785
- hover:bg-primary hover:text-primary-foreground
786
- focus:bg-primary focus:text-primary-foreground
787
- `
756
+ class: "bg-(--color-selected) text-(--color-selected-foreground) inset-ring-1 inset-ring-focus-indicator/35 hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground) focus:bg-(--color-selected-focus) focus:text-(--color-selected-focus-foreground)"
788
757
  },
789
- {
790
- selected: true,
791
- checkboxes: true,
792
- class: `bg-transparent text-foreground`
793
- }
758
+ { selected: true, checkboxes: true, class: "bg-transparent text-foreground" }
794
759
  ]
795
760
  });
796
761
 
@@ -821,7 +786,12 @@ class ListItemDirective {
821
786
  const highlighted = this.highlighted();
822
787
  const selected = this.selected();
823
788
  const checkboxes = this.#listService.selectableOptions().checkboxes;
824
- const classes = listItemContentVariants({ disabled, highlighted, selected, checkboxes });
789
+ const classes = listItemContentThemeVariants({
790
+ disabled,
791
+ highlighted,
792
+ selected,
793
+ checkboxes
794
+ });
825
795
  return twMerge(classes);
826
796
  }, /* @ts-ignore */
827
797
  ...(ngDevMode ? [{ debugName: "textClasses" }] : /* istanbul ignore next */ []));
@@ -895,7 +865,7 @@ class ListItemComponent {
895
865
  if (isHeader) {
896
866
  return ``;
897
867
  }
898
- return listItemBaseVariants();
868
+ return listItemBaseThemeVariants();
899
869
  }, /* @ts-ignore */
900
870
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
901
871
  this.checkboxes = computed(() => {
@@ -924,7 +894,7 @@ class ListItemComponent {
924
894
  const isHeader = this.isHeader();
925
895
  if (isHeader) {
926
896
  const hasTemplate = this.template() != null;
927
- const classes = listGroupHeaderTextVariants({ hasTemplate });
897
+ const classes = listGroupHeaderTextThemeVariants({ hasTemplate });
928
898
  return twMerge(classes);
929
899
  }
930
900
  return ``; // TODO
@@ -960,7 +930,7 @@ class ListComponent {
960
930
  this.filterInput = viewChild(FilterInputComponent, /* @ts-ignore */
961
931
  ...(ngDevMode ? [{ debugName: "filterInput" }] : /* istanbul ignore next */ []));
962
932
  this.classes = computed(() => {
963
- const classes = listVariants();
933
+ const classes = listThemeVariants();
964
934
  return twMerge(classes);
965
935
  }, /* @ts-ignore */
966
936
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
@@ -968,7 +938,7 @@ class ListComponent {
968
938
  this.groupHeaderClasses = computed(() => {
969
939
  const listItemClass = this.listItemClass();
970
940
  const hasTemplate = this.groupHeaderTemplate() != null;
971
- const classes = listGroupHeaderVariants({ hasTemplate });
941
+ const classes = listGroupHeaderThemeVariants({ hasTemplate });
972
942
  return twMerge(classes, listItemClass);
973
943
  }, /* @ts-ignore */
974
944
  ...(ngDevMode ? [{ debugName: "groupHeaderClasses" }] : /* istanbul ignore next */ []));
@@ -978,7 +948,7 @@ class ListComponent {
978
948
  ...(ngDevMode ? [{ debugName: "hostTabIndex" }] : /* istanbul ignore next */ []));
979
949
  this.itemTemplate = contentChild(ListItemTemplateDirective, { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
980
950
  this.innerListClasses = computed(() => {
981
- const classes = listInnerListVariants();
951
+ const classes = listInnerListThemeVariants();
982
952
  const listClass = this.listClass();
983
953
  return twMerge(classes, listClass);
984
954
  }, /* @ts-ignore */
@@ -2,12 +2,12 @@ import { FocusMonitor } from '@angular/cdk/a11y';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Directive, signal, computed, untracked, effect, Injectable, Pipe, inject, DestroyRef, input, ChangeDetectionStrategy, Component, DOCUMENT, NgZone, ElementRef, afterRenderEffect, contentChild, TemplateRef, afterNextRender } from '@angular/core';
4
4
  import { toObservable, toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { Subject, BehaviorSubject, ReplaySubject, switchMap, debounceTime, distinctUntilChanged, Observable, take, filter, tap, map, asapScheduler, fromEvent, takeWhile } from 'rxjs';
7
6
  import { PreventableEvent } from '@nanahoshi/mona-ui/common';
8
7
  import { ImmutableSet, List, from, sequenceEqual, contains, EnumerableSet, forEach } from '@mirei/ts-collections';
9
8
  import { v4 } from 'uuid';
10
9
  import { cva } from 'class-variance-authority';
10
+ import { themeOverlaySurfaceClasses } from '@nanahoshi/mona-ui/internal';
11
11
  import { CdkDropList, CdkDrag, CdkDragPreview } from '@angular/cdk/drag-drop';
12
12
  import * as i1 from '@angular/forms';
13
13
  import { FormsModule } from '@angular/forms';
@@ -1180,40 +1180,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1180
1180
  type: Injectable
1181
1181
  }], ctorParameters: () => [] });
1182
1182
 
1183
- const subTreeListVariants = cva(`
1184
- list-none flex flex-col
1183
+ const subTreeListThemeVariants = cva(`
1184
+ flex list-none flex-col
1185
1185
  `);
1186
- const subTreeListItemVariants = cva(`
1186
+ const subTreeListItemThemeVariants = cva(`
1187
1187
  relative overflow-hidden outline-none
1188
1188
  ps-6
1189
1189
  `);
1190
- const treeBaseVariants = cva(`
1190
+ const treeBaseThemeVariants = cva(`
1191
1191
  relative outline-none select-none
1192
1192
  text-md
1193
1193
  `);
1194
- const treeDropHintBaseVariants = cva(`
1195
- fixed z-1 w-10 h-0.5
1196
- bg-primary opacity-80
1194
+ const treeDropHintBaseThemeVariants = cva(`
1195
+ fixed z-1 h-0.5 w-10
1197
1196
  pointer-events-none
1197
+ bg-primary opacity-80
1198
1198
  `);
1199
- const treeDropHintIconVariants = cva(`
1199
+ const treeDropHintIconThemeVariants = cva(`
1200
1200
  absolute flex items-center justify-center
1201
1201
  -top-3.25 -left-3.5 text-xl
1202
1202
  `);
1203
- const treeNodeBaseVariants = cva(`
1204
- px-2 py-1 cursor-default
1203
+ const treeNodeBaseThemeVariants = cva(`
1204
+ cursor-default px-2 py-1 text-foreground
1205
1205
  `, {
1206
1206
  variants: {
1207
1207
  disabled: {
1208
- true: "pointer-events-none opacity-50 cursor-default",
1208
+ true: "pointer-events-none cursor-default text-disabled-foreground",
1209
1209
  false: ""
1210
1210
  },
1211
1211
  highlighted: {
1212
- true: "inset-ring-1 inset-ring-gray-400/70",
1212
+ true: "inset-ring-1 inset-ring-focus-indicator/35",
1213
1213
  false: ""
1214
1214
  },
1215
1215
  selected: {
1216
- true: "bg-primary text-primary-foreground",
1216
+ true: "bg-active text-foreground",
1217
1217
  false: ""
1218
1218
  }
1219
1219
  },
@@ -1226,99 +1226,25 @@ const treeNodeBaseVariants = cva(`
1226
1226
  {
1227
1227
  disabled: false,
1228
1228
  selected: true,
1229
- class: "hover:bg-primary-hover"
1229
+ class: "hover:bg-active"
1230
1230
  }
1231
1231
  ]
1232
1232
  });
1233
- const treeNodeContainerVariants = cva(`
1233
+ const treeNodeContainerThemeVariants = cva(`
1234
1234
  flex items-center
1235
1235
  `);
1236
- const treeNodeDraggingVariants = cva(`
1236
+ const treeNodeDraggingThemeVariants = cva(`
1237
1237
  flex items-center justify-center
1238
- px-2! py-1! top-3!
1239
- bg-background! text-foreground!
1238
+ top-3! px-2! py-1!
1239
+ ${themeOverlaySurfaceClasses} text-foreground!
1240
1240
  border! border-border!
1241
- shadow-md
1241
+ shadow-(--shadow-overlay)
1242
1242
  `);
1243
- const treeNodeExpanderVariants = cva(`
1244
- min-w-6 h-full -ms-6
1245
- flex items-center justify-center
1243
+ const treeNodeExpanderThemeVariants = cva(`
1244
+ -ms-6 flex h-full min-w-6 items-center justify-center
1246
1245
  cursor-pointer text-sm text-foreground
1247
1246
  `);
1248
1247
 
1249
- const subTreeListThemeVariants = (theme) => {
1250
- switch (theme) {
1251
- case "mona":
1252
- return subTreeListVariants;
1253
- default:
1254
- return subTreeListVariants;
1255
- }
1256
- };
1257
- const subTreeListItemThemeVariants = (theme) => {
1258
- switch (theme) {
1259
- case "mona":
1260
- return subTreeListItemVariants;
1261
- default:
1262
- return subTreeListItemVariants;
1263
- }
1264
- };
1265
- const treeBaseThemeVariants = (theme) => {
1266
- switch (theme) {
1267
- case "mona":
1268
- return treeBaseVariants;
1269
- default:
1270
- return treeBaseVariants;
1271
- }
1272
- };
1273
- const treeDropHintBaseThemeVariants = (theme) => {
1274
- switch (theme) {
1275
- case "mona":
1276
- return treeDropHintBaseVariants;
1277
- default:
1278
- return treeDropHintBaseVariants;
1279
- }
1280
- };
1281
- const treeDropHintIconThemeVariants = (theme) => {
1282
- switch (theme) {
1283
- case "mona":
1284
- return treeDropHintIconVariants;
1285
- default:
1286
- return treeDropHintIconVariants;
1287
- }
1288
- };
1289
- const treeNodeBaseThemeVariants = (theme) => {
1290
- switch (theme) {
1291
- case "mona":
1292
- return treeNodeBaseVariants;
1293
- default:
1294
- return treeNodeBaseVariants;
1295
- }
1296
- };
1297
- const treeNodeContainerThemeVariants = (theme) => {
1298
- switch (theme) {
1299
- case "mona":
1300
- return treeNodeContainerVariants;
1301
- default:
1302
- return treeNodeContainerVariants;
1303
- }
1304
- };
1305
- const treeNodeDraggingThemeVariants = (theme) => {
1306
- switch (theme) {
1307
- case "mona":
1308
- return treeNodeDraggingVariants;
1309
- default:
1310
- return treeNodeDraggingVariants;
1311
- }
1312
- };
1313
- const treeNodeExpanderThemeVariants = (theme) => {
1314
- switch (theme) {
1315
- case "mona":
1316
- return treeNodeExpanderVariants;
1317
- default:
1318
- return treeNodeExpanderVariants;
1319
- }
1320
- };
1321
-
1322
1248
  class NodeEvent extends PreventableEvent {
1323
1249
  #node;
1324
1250
  constructor(type, node, event) {
@@ -1454,21 +1380,18 @@ class NodeClickEvent extends PreventableEvent {
1454
1380
 
1455
1381
  class TreeNodeComponent {
1456
1382
  #destroyRef;
1457
- #themeService;
1458
1383
  #dragging;
1459
1384
  constructor() {
1460
1385
  this.#destroyRef = inject(DestroyRef);
1461
- this.#themeService = inject(ThemeService);
1462
1386
  this.treeService = inject((TreeService));
1463
1387
  this.#dragging = toSignal(this.treeService.dragging$, {
1464
1388
  initialValue: false
1465
1389
  });
1466
1390
  this.baseClass = computed(() => {
1467
- const theme = this.#themeService.theme();
1468
1391
  const disabled = this.disabled();
1469
1392
  const highlighted = this.navigated();
1470
1393
  const selected = this.selected();
1471
- return treeNodeBaseThemeVariants(theme)({ disabled, highlighted, selected });
1394
+ return treeNodeBaseThemeVariants({ disabled, highlighted, selected });
1472
1395
  }, /* @ts-ignore */
1473
1396
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
1474
1397
  this.checkable = computed(() => {
@@ -1645,26 +1568,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1645
1568
  class SubTreeComponent {
1646
1569
  constructor() {
1647
1570
  this.#document = inject(DOCUMENT);
1648
- this.#themeService = inject(ThemeService);
1649
1571
  this.#zone = inject(NgZone);
1650
1572
  this.listClass = computed(() => {
1651
- const theme = this.#themeService.theme();
1652
- return subTreeListThemeVariants(theme)();
1573
+ return subTreeListThemeVariants();
1653
1574
  }, /* @ts-ignore */
1654
1575
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
1655
1576
  this.listItemClass = computed(() => {
1656
- const theme = this.#themeService.theme();
1657
- return subTreeListItemThemeVariants(theme)();
1577
+ return subTreeListItemThemeVariants();
1658
1578
  }, /* @ts-ignore */
1659
1579
  ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
1660
1580
  this.nodeContainerClass = computed(() => {
1661
- const theme = this.#themeService.theme();
1662
- return treeNodeContainerThemeVariants(theme)();
1581
+ return treeNodeContainerThemeVariants();
1663
1582
  }, /* @ts-ignore */
1664
1583
  ...(ngDevMode ? [{ debugName: "nodeContainerClass" }] : /* istanbul ignore next */ []));
1665
1584
  this.nodeDraggingClass = computed(() => {
1666
- const theme = this.#themeService.theme();
1667
- return treeNodeDraggingThemeVariants(theme)();
1585
+ return treeNodeDraggingThemeVariants();
1668
1586
  }, /* @ts-ignore */
1669
1587
  ...(ngDevMode ? [{ debugName: "nodeDraggingClass" }] : /* istanbul ignore next */ []));
1670
1588
  this.nodeExpandEnterClass = computed(() => this.nodeAnimationDisabled() ? "" : "mona-tree-node-expand-enter", /* @ts-ignore */
@@ -1672,8 +1590,7 @@ class SubTreeComponent {
1672
1590
  this.nodeExpandLeaveClass = computed(() => this.nodeAnimationDisabled() ? "" : "mona-tree-node-expand-leave", /* @ts-ignore */
1673
1591
  ...(ngDevMode ? [{ debugName: "nodeExpandLeaveClass" }] : /* istanbul ignore next */ []));
1674
1592
  this.nodeExpanderClass = computed(() => {
1675
- const theme = this.#themeService.theme();
1676
- return treeNodeExpanderThemeVariants(theme)();
1593
+ return treeNodeExpanderThemeVariants();
1677
1594
  }, /* @ts-ignore */
1678
1595
  ...(ngDevMode ? [{ debugName: "nodeExpanderClass" }] : /* istanbul ignore next */ []));
1679
1596
  this.treeService = inject(TreeService);
@@ -1690,7 +1607,6 @@ class SubTreeComponent {
1690
1607
  ...(ngDevMode ? [{ debugName: "parent" }] : /* istanbul ignore next */ []));
1691
1608
  }
1692
1609
  #document;
1693
- #themeService;
1694
1610
  #zone;
1695
1611
  nodeAnimationDisabled() {
1696
1612
  return (!this.treeService.animationEnabled() ||
@@ -1801,16 +1717,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1801
1717
  class TreeDropHintComponent {
1802
1718
  #dropPositionChange;
1803
1719
  #hostElementRef;
1804
- #themeService;
1805
1720
  constructor() {
1806
1721
  this.#dropPositionChange = toSignal(inject(TreeService).dropPositionChange$, {
1807
1722
  initialValue: null
1808
1723
  });
1809
1724
  this.#hostElementRef = inject(ElementRef);
1810
- this.#themeService = inject(ThemeService);
1811
1725
  this.baseClass = computed(() => {
1812
- const theme = this.#themeService.theme();
1813
- return treeDropHintBaseThemeVariants(theme)();
1726
+ return treeDropHintBaseThemeVariants();
1814
1727
  }, /* @ts-ignore */
1815
1728
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
1816
1729
  this.dropHintStyles = computed(() => {
@@ -1849,9 +1762,8 @@ class TreeDropHintComponent {
1849
1762
  }, /* @ts-ignore */
1850
1763
  ...(ngDevMode ? [{ debugName: "dropHintStyles" }] : /* istanbul ignore next */ []));
1851
1764
  this.iconClass = computed(() => {
1852
- const theme = this.#themeService.theme();
1853
1765
  const icon = "ri-arrow-right-s-fill";
1854
- const variantClass = treeDropHintIconThemeVariants(theme)();
1766
+ const variantClass = treeDropHintIconThemeVariants();
1855
1767
  return twMerge(icon, variantClass);
1856
1768
  }, /* @ts-ignore */
1857
1769
  ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
@@ -1876,14 +1788,12 @@ class TreeComponent {
1876
1788
  #destroyRef;
1877
1789
  #focusMonitor;
1878
1790
  #hostElementRef;
1879
- #themeService;
1880
1791
  #zone;
1881
1792
  #lastNavigatedNode;
1882
1793
  constructor() {
1883
1794
  this.#destroyRef = inject(DestroyRef);
1884
1795
  this.#focusMonitor = inject(FocusMonitor);
1885
1796
  this.#hostElementRef = inject(ElementRef);
1886
- this.#themeService = inject(ThemeService);
1887
1797
  this.#zone = inject(NgZone);
1888
1798
  this.#lastNavigatedNode = null;
1889
1799
  this.activeDescendantId = computed(() => {
@@ -1892,8 +1802,7 @@ class TreeComponent {
1892
1802
  }, /* @ts-ignore */
1893
1803
  ...(ngDevMode ? [{ debugName: "activeDescendantId" }] : /* istanbul ignore next */ []));
1894
1804
  this.baseClass = computed(() => {
1895
- const theme = this.#themeService.theme();
1896
- return treeBaseThemeVariants(theme)();
1805
+ return treeBaseThemeVariants();
1897
1806
  }, /* @ts-ignore */
1898
1807
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
1899
1808
  this.ariaLabel = input("", /* @ts-ignore */
@@ -279,6 +279,34 @@ const rxTimeout = (destroyRef, fn, delay = 0) => {
279
279
  .subscribe(() => fn());
280
280
  };
281
281
 
282
+ const themeControlBackdropClasses = `
283
+ [background-image:var(--mona-effect-control-background-image,none)]
284
+ [backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]
285
+ [-webkit-backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]
286
+ `;
287
+ const themeControlSurfaceClasses = `
288
+ [background-color:var(--mona-effect-control-background-color,var(--color-input-background))]
289
+ ${themeControlBackdropClasses}
290
+ `;
291
+ const themeRaisedBackdropClasses = `
292
+ [background-image:var(--mona-effect-raised-background-image,none)]
293
+ [backdrop-filter:var(--mona-effect-raised-backdrop-filter,none)]
294
+ [-webkit-backdrop-filter:var(--mona-effect-raised-backdrop-filter,none)]
295
+ `;
296
+ const themeRaisedSurfaceClasses = `
297
+ [background-color:var(--mona-effect-raised-background-color,var(--color-surface-raised))]
298
+ ${themeRaisedBackdropClasses}
299
+ `;
300
+ const themeOverlayBackdropClasses = `
301
+ [background-image:var(--mona-effect-overlay-background-image,none)]
302
+ [backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]
303
+ [-webkit-backdrop-filter:var(--mona-effect-overlay-backdrop-filter,none)]
304
+ `;
305
+ const themeOverlaySurfaceClasses = `
306
+ [background-color:var(--mona-effect-overlay-background-color,var(--color-surface-overlay))]
307
+ ${themeOverlayBackdropClasses}
308
+ `;
309
+
282
310
  const restoreOverlayScroll = (overlayRef, element) => {
283
311
  requestAnimationFrame(() => {
284
312
  const scrollableContent = findScrollableElement(overlayRef.overlayElement);
@@ -375,5 +403,5 @@ const setupTypeahead = (typeaheadKey$) => {
375
403
  * Generated bundle index. Do not edit.
376
404
  */
377
405
 
378
- export { AttributeBinderDirective, NavigationKeys, NavigationKeysList, createElementControlId, focusElement, hex2rgba, hsla2hsva, hsva2rgba, isNavigationKey, isTypeaheadKey, isValidHex, isValidHsla, isValidRgb, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setWindowStyles, setupTypeahead, string2Hsla, string2rgba, toCssValue };
406
+ export { AttributeBinderDirective, NavigationKeys, NavigationKeysList, createElementControlId, focusElement, hex2rgba, hsla2hsva, hsva2rgba, isNavigationKey, isTypeaheadKey, isValidHex, isValidHsla, isValidRgb, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setWindowStyles, setupTypeahead, string2Hsla, string2rgba, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, toCssValue };
379
407
  //# sourceMappingURL=nanahoshi-mona-ui-internal.mjs.map