@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,8 +1,7 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, inject, contentChildren, TemplateRef, computed, contentChild, input, model, Component } from '@angular/core';
3
+ import { Directive, contentChildren, TemplateRef, computed, contentChild, input, model, Component } from '@angular/core';
4
4
  import { LucideMinus, LucidePlus } from '@lucide/angular';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { createElementControlId } from '@nanahoshi/mona-ui/internal';
7
6
  import { twMerge } from 'tailwind-merge';
8
7
  import { cva } from 'class-variance-authority';
@@ -40,11 +39,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
40
39
  }]
41
40
  }] });
42
41
 
43
- const expansionPanelBaseVariants = cva(`
44
- block w-full bg-background overflow-hidden
45
- border border-border text-foreground
46
- not-last:border-b-transparent not-last:rounded-b-none
47
- not-first:rounded-t-none relative
42
+ const expansionPanelBaseThemeVariants = cva(`
43
+ relative block w-full overflow-hidden
44
+ bg-surface text-foreground border border-border
45
+ not-last:border-b-transparent not-last:rounded-b-none not-first:rounded-t-none
48
46
  `, {
49
47
  variants: {
50
48
  rounded: {
@@ -55,34 +53,33 @@ const expansionPanelBaseVariants = cva(`
55
53
  }
56
54
  }
57
55
  });
58
- const expansionPanelHeaderVariants = cva(`
59
- w-full flex items-center justify-between
56
+ const expansionPanelHeaderThemeVariants = cva(`
57
+ relative flex w-full items-center justify-between
60
58
  px-2 py-1
61
- bg-background-dark
62
59
  cursor-pointer
63
- font-medium
64
- text-foreground
65
60
  select-none
66
- transition-border-b duration-200
67
- focus-visible:outline-primary/40 focus-visible:border-b-transparent
68
- focus-visible:ring-1 focus-visible:ring-primary/40
69
- focus-visible:z-10 focus-visible:relative
61
+ font-medium text-foreground
62
+ bg-surface-muted
63
+ transition-colors duration-(--mona-motion-fast)
64
+ hover:bg-hover active:bg-active
65
+ focus-visible:z-10 focus-visible:outline-none
66
+ focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
70
67
  `, {
71
68
  variants: {
72
69
  collapsed: {
73
70
  true: "border-b-transparent",
74
- false: "border-0 border-b border-border border-solid"
71
+ false: "border-0 border-b border-border-subtle"
75
72
  },
76
73
  disabled: {
77
- true: "pointer-events-none opacity-50 cursor-not-allowed select-none",
74
+ true: "pointer-events-none cursor-not-allowed select-none bg-disabled-background text-disabled-foreground",
78
75
  false: ""
79
76
  }
80
77
  }
81
78
  });
82
- const expansionPanelHeaderTitleVariants = cva(`
79
+ const expansionPanelHeaderTitleThemeVariants = cva(`
83
80
  p-1 flex-1
84
81
  `);
85
- const expansionPanelIconContainerVariants = cva(``, {
82
+ const expansionPanelIconContainerThemeVariants = cva(``, {
86
83
  variants: {
87
84
  hasTemplate: {
88
85
  true: "",
@@ -90,10 +87,10 @@ const expansionPanelIconContainerVariants = cva(``, {
90
87
  }
91
88
  }
92
89
  });
93
- const expansionPanelContentVariants = cva(`
90
+ const expansionPanelContentThemeVariants = cva(`
94
91
  text-foreground
95
92
  grid
96
- transition-[grid-template-rows] duration-300 ease-out
93
+ transition-[grid-template-rows] duration-(--mona-motion-standard) ease-out
97
94
  [&>div]:overflow-hidden
98
95
  `, {
99
96
  variants: {
@@ -104,81 +101,34 @@ const expansionPanelContentVariants = cva(`
104
101
  }
105
102
  });
106
103
 
107
- const expansionPanelBaseThemeVariants = (theme) => {
108
- switch (theme) {
109
- case "mona":
110
- return expansionPanelBaseVariants;
111
- default:
112
- return expansionPanelBaseVariants;
113
- }
114
- };
115
- const expansionPanelHeaderThemeVariants = (theme) => {
116
- switch (theme) {
117
- case "mona":
118
- return expansionPanelHeaderVariants;
119
- default:
120
- return expansionPanelHeaderVariants;
121
- }
122
- };
123
- const expansionPanelHeaderTitleThemeVariants = (theme) => {
124
- switch (theme) {
125
- case "mona":
126
- return expansionPanelHeaderTitleVariants;
127
- default:
128
- return expansionPanelHeaderTitleVariants;
129
- }
130
- };
131
- const expansionPanelIconContainerThemeVariants = (theme) => {
132
- switch (theme) {
133
- case "mona":
134
- return expansionPanelIconContainerVariants;
135
- default:
136
- return expansionPanelIconContainerVariants;
137
- }
138
- };
139
- const expansionPanelContentThemeVariants = (theme) => {
140
- switch (theme) {
141
- case "mona":
142
- return expansionPanelContentVariants;
143
- default:
144
- return expansionPanelContentVariants;
145
- }
146
- };
147
-
148
104
  class ExpansionPanelComponent {
149
105
  constructor() {
150
- this.#themeService = inject(ThemeService);
151
106
  this.actionsTemplateList = contentChildren(ExpansionPanelActionsTemplateDirective, { ...(ngDevMode ? { debugName: "actionsTemplateList" } : /* istanbul ignore next */ {}), read: TemplateRef });
152
107
  this.baseClass = computed(() => {
153
- const theme = this.#themeService.theme();
154
108
  const rounded = this.rounded();
155
- const variantClass = expansionPanelBaseThemeVariants(theme)({ rounded });
109
+ const variantClass = expansionPanelBaseThemeVariants({ rounded });
156
110
  return twMerge(variantClass, this.userClass());
157
111
  }, /* @ts-ignore */
158
112
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
159
113
  this.contentClass = computed(() => {
160
- const theme = this.#themeService.theme();
161
114
  const expanded = this.expanded();
162
- return expansionPanelContentThemeVariants(theme)({ expanded });
115
+ return expansionPanelContentThemeVariants({ expanded });
163
116
  }, /* @ts-ignore */
164
117
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
165
118
  this.contentId = createElementControlId();
166
119
  this.headerClass = computed(() => {
167
- const theme = this.#themeService.theme();
168
120
  const collapsed = !this.expanded();
169
121
  const disabled = this.disabled();
170
- return expansionPanelHeaderThemeVariants(theme)({ collapsed, disabled });
122
+ return expansionPanelHeaderThemeVariants({ collapsed, disabled });
171
123
  }, /* @ts-ignore */
172
124
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
173
125
  this.headerTitleClass = computed(() => {
174
- const theme = this.#themeService.theme();
175
- return expansionPanelHeaderTitleThemeVariants(theme)();
126
+ return expansionPanelHeaderTitleThemeVariants();
176
127
  }, /* @ts-ignore */
177
128
  ...(ngDevMode ? [{ debugName: "headerTitleClass" }] : /* istanbul ignore next */ []));
178
129
  this.iconContainerClass = computed(() => {
179
- const theme = this.#themeService.theme();
180
130
  const hasTemplate = !!this.iconTemplate();
181
- return expansionPanelIconContainerThemeVariants(theme)({ hasTemplate });
131
+ return expansionPanelIconContainerThemeVariants({ hasTemplate });
182
132
  }, /* @ts-ignore */
183
133
  ...(ngDevMode ? [{ debugName: "iconContainerClass" }] : /* istanbul ignore next */ []));
184
134
  this.iconTemplate = contentChild(ExpansionPanelIconTemplateDirective, { ...(ngDevMode ? { debugName: "iconTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
@@ -214,7 +164,6 @@ class ExpansionPanelComponent {
214
164
  this.userClass = input("", /* @ts-ignore */
215
165
  ...(ngDevMode ? [{ debugName: "userClass" }] : /* istanbul ignore next */ []));
216
166
  }
217
- #themeService;
218
167
  toggle() {
219
168
  if (this.disabled()) {
220
169
  return;
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, inject, computed, contentChild, TemplateRef, input, Component } from '@angular/core';
2
+ import { Directive, computed, contentChild, TemplateRef, input, Component } from '@angular/core';
3
3
  import { NgTemplateOutlet } from '@angular/common';
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
 
@@ -16,13 +15,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
16
15
  }]
17
16
  }] });
18
17
 
19
- const fieldsetBaseVariants = cva(`
18
+ const fieldsetBaseThemeVariants = cva(`
20
19
  block
21
20
  `);
22
- const fieldsetVariants = cva(`
23
- bg-background
24
- border border-border
25
- text-foreground
21
+ const fieldsetThemeVariants = cva(`
22
+ bg-surface text-foreground border border-border
26
23
  `, {
27
24
  variants: {
28
25
  rounded: {
@@ -33,7 +30,7 @@ const fieldsetVariants = cva(`
33
30
  none: "rounded-none"
34
31
  },
35
32
  disabled: {
36
- true: "pointer-events-none opacity-50 cursor-not-allowed select-none",
33
+ true: "pointer-events-none cursor-not-allowed select-none bg-disabled-background text-disabled-foreground border-disabled-border",
37
34
  false: ""
38
35
  }
39
36
  },
@@ -41,13 +38,13 @@ const fieldsetVariants = cva(`
41
38
  disabled: false
42
39
  }
43
40
  });
44
- const fieldsetLegendVariants = cva(`
45
- ml-2
41
+ const fieldsetLegendThemeVariants = cva(`
42
+ ms-2
46
43
  `, {
47
44
  variants: {
48
45
  hasTemplate: {
49
46
  true: "",
50
- false: "bg-background-dark text-foreground border border-border px-2"
47
+ false: "px-2 bg-surface-raised text-foreground border border-border-subtle"
51
48
  },
52
49
  rounded: {
53
50
  small: "rounded-sm",
@@ -62,52 +59,23 @@ const fieldsetLegendVariants = cva(`
62
59
  }
63
60
  });
64
61
 
65
- const fieldsetBaseThemeVariants = (theme) => {
66
- switch (theme) {
67
- case "mona":
68
- return fieldsetBaseVariants;
69
- default:
70
- return fieldsetBaseVariants;
71
- }
72
- };
73
- const fieldsetThemeVariants = (theme) => {
74
- switch (theme) {
75
- case "mona":
76
- return fieldsetVariants;
77
- default:
78
- return fieldsetVariants;
79
- }
80
- };
81
- const fieldsetLegendThemeVariants = (theme) => {
82
- switch (theme) {
83
- case "mona":
84
- return fieldsetLegendVariants;
85
- default:
86
- return fieldsetLegendVariants;
87
- }
88
- };
89
-
90
62
  class FieldsetComponent {
91
63
  constructor() {
92
- this.#themeService = inject(ThemeService);
93
64
  this.baseClass = computed(() => {
94
- const theme = this.#themeService.theme();
95
- return fieldsetBaseThemeVariants(theme)();
65
+ return fieldsetBaseThemeVariants();
96
66
  }, /* @ts-ignore */
97
67
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
98
68
  this.fieldsetClass = computed(() => {
99
- const theme = this.#themeService.theme();
100
69
  const rounded = this.rounded();
101
70
  const disabled = this.disabled();
102
71
  const userClass = this.userClass();
103
- return twMerge(fieldsetThemeVariants(theme)({ rounded, disabled }), userClass);
72
+ return twMerge(fieldsetThemeVariants({ rounded, disabled }), userClass);
104
73
  }, /* @ts-ignore */
105
74
  ...(ngDevMode ? [{ debugName: "fieldsetClass" }] : /* istanbul ignore next */ []));
106
75
  this.legendClass = computed(() => {
107
- const theme = this.#themeService.theme();
108
76
  const rounded = this.rounded();
109
77
  const hasTemplate = !!this.legendTemplate();
110
- return fieldsetLegendThemeVariants(theme)({ hasTemplate, rounded });
78
+ return fieldsetLegendThemeVariants({ hasTemplate, rounded });
111
79
  }, /* @ts-ignore */
112
80
  ...(ngDevMode ? [{ debugName: "legendClass" }] : /* istanbul ignore next */ []));
113
81
  this.legendTemplate = contentChild(FieldsetLegendTemplateDirective, { ...(ngDevMode ? { debugName: "legendTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
@@ -147,7 +115,6 @@ class FieldsetComponent {
147
115
  */
148
116
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
149
117
  }
150
- #themeService;
151
118
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
152
119
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: FieldsetComponent, isStandalone: true, selector: "mona-fieldset", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "legendTemplate", first: true, predicate: FieldsetLegendTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<fieldset [class]=\"fieldsetClass()\" [disabled]=\"disabled()\" [attr.name]=\"name()\">\n @if (legendVisible()) {\n <legend [class]=\"legendClass()\">\n @if (legendTemplate()) {\n <ng-container [ngTemplateOutlet]=\"legendTemplate()\"></ng-container>\n } @else {\n <span>{{ legend() }}</span>\n }\n </legend>\n }\n <ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
153
120
  }
@@ -8,8 +8,8 @@ import { DatePickerComponent } from '@nanahoshi/mona-ui/date-picker';
8
8
  import { DropdownListComponent } from '@nanahoshi/mona-ui/dropdown-list';
9
9
  import { NumericTextBoxComponent } from '@nanahoshi/mona-ui/numeric-text-box';
10
10
  import { TextBoxComponent } from '@nanahoshi/mona-ui/text-box';
11
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
12
11
  import { cva } from 'class-variance-authority';
12
+ import { themeOverlaySurfaceClasses } from '@nanahoshi/mona-ui/internal';
13
13
 
14
14
  class OperatorFilterPipe {
15
15
  transform(value, visibleOperators) {
@@ -219,11 +219,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
219
219
  type: Injectable
220
220
  }] });
221
221
 
222
- const filterMenuBaseVariants = cva(`
223
- w-full flex flex-col
224
- p-1 gap-2
225
- bg-background-dark text-foreground border border-border
226
- shadow-lg
222
+ const filterMenuBaseThemeVariants = cva(`
223
+ flex w-full flex-col
224
+ gap-2 p-1
225
+ ${themeOverlaySurfaceClasses} text-foreground
226
+ border border-border shadow-(--shadow-overlay)
227
227
  `, {
228
228
  variants: {
229
229
  rounded: {
@@ -239,49 +239,22 @@ const filterMenuBaseVariants = cva(`
239
239
  }
240
240
  }
241
241
  });
242
- const filterMenuItemVariants = cva(`
242
+ const filterMenuItemThemeVariants = cva(`
243
243
  flex flex-col gap-1
244
244
  [&>mona-button-group>button]:flex-1
245
245
  `);
246
- const filterMenuActionVariants = cva(`
246
+ const filterMenuActionsThemeVariants = cva(`
247
247
  flex flex-row
248
248
  items-center justify-center
249
249
  gap-1 [&>button]:flex-1
250
250
  `);
251
251
 
252
- const filterMenuBaseThemeVariants = (theme) => {
253
- switch (theme) {
254
- case "mona":
255
- return filterMenuBaseVariants;
256
- default:
257
- return filterMenuBaseVariants;
258
- }
259
- };
260
- const filterMenuActionsThemeVariants = (theme) => {
261
- switch (theme) {
262
- case "mona":
263
- return filterMenuActionVariants;
264
- default:
265
- return filterMenuActionVariants;
266
- }
267
- };
268
- const filterMenuItemThemeVariants = (theme) => {
269
- switch (theme) {
270
- case "mona":
271
- return filterMenuItemVariants;
272
- default:
273
- return filterMenuItemVariants;
274
- }
275
- };
276
-
277
252
  class FilterMenuComponent {
278
253
  #booleanFilterValues;
279
254
  #filterService;
280
- #themeService;
281
255
  constructor() {
282
256
  this.#booleanFilterValues = [null, null];
283
257
  this.#filterService = inject(FilterService);
284
- this.#themeService = inject(ThemeService);
285
258
  this.applyDisabled = computed(() => {
286
259
  if (!this.firstFilterValid()) {
287
260
  return true;
@@ -290,8 +263,7 @@ class FilterMenuComponent {
290
263
  }, /* @ts-ignore */
291
264
  ...(ngDevMode ? [{ debugName: "applyDisabled" }] : /* istanbul ignore next */ []));
292
265
  this.baseClass = computed(() => {
293
- const theme = this.#themeService.theme();
294
- return filterMenuBaseThemeVariants(theme)();
266
+ return filterMenuBaseThemeVariants();
295
267
  }, /* @ts-ignore */
296
268
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
297
269
  this.booleanFilterMenuDataItems = this.#filterService.booleanFilterMenuItems;
@@ -318,13 +290,11 @@ class FilterMenuComponent {
318
290
  }, /* @ts-ignore */
319
291
  ...(ngDevMode ? [{ debugName: "effectiveDateOptions" }] : /* istanbul ignore next */ []));
320
292
  this.filterMenuActionsClass = computed(() => {
321
- const theme = this.#themeService.theme();
322
- return filterMenuActionsThemeVariants(theme)();
293
+ return filterMenuActionsThemeVariants();
323
294
  }, /* @ts-ignore */
324
295
  ...(ngDevMode ? [{ debugName: "filterMenuActionsClass" }] : /* istanbul ignore next */ []));
325
296
  this.filterMenuItemClass = computed(() => {
326
- const theme = this.#themeService.theme();
327
- return filterMenuItemThemeVariants(theme)();
297
+ return filterMenuItemThemeVariants();
328
298
  }, /* @ts-ignore */
329
299
  ...(ngDevMode ? [{ debugName: "filterMenuItemClass" }] : /* istanbul ignore next */ []));
330
300
  this.firstFilterValid = computed(() => {
@@ -2,7 +2,7 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { ImmutableDictionary } from '@mirei/ts-collections';
5
- import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs';
5
+ import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
6
6
 
7
7
  class GridFooterCellComponent {
8
8
  constructor() {
@@ -102,4 +102,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
102
102
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnIndex", required: true }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
103
103
 
104
104
  export { GridFooterCellComponent };
105
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.mjs.map
105
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs.map
@@ -1,14 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, computed, input, Directive } from '@angular/core';
3
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
4
- import { v as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs';
2
+ import { computed, input, Directive } from '@angular/core';
3
+ import { v as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
5
4
 
6
5
  class GridFooterTableCellDirective {
7
6
  constructor() {
8
- this.#themeService = inject(ThemeService);
9
7
  this.className = computed(() => {
10
- const theme = this.#themeService.theme();
11
- return gridFooterTableCellThemeVariants(theme)();
8
+ return gridFooterTableCellThemeVariants();
12
9
  }, /* @ts-ignore */
13
10
  ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
14
11
  this.minWidth = computed(() => this.footerColumn()?.minWidth ?? this.footerCellMinWidth(), /* @ts-ignore */
@@ -22,7 +19,6 @@ class GridFooterTableCellDirective {
22
19
  this.footerColumn = input(null, /* @ts-ignore */
23
20
  ...(ngDevMode ? [{ debugName: "footerColumn" }] : /* istanbul ignore next */ []));
24
21
  }
25
- #themeService;
26
22
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
27
23
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridFooterTableCellDirective, isStandalone: true, selector: "td[monaGridFooterTableCell]", inputs: { footerCellMinWidth: { classPropertyName: "footerCellMinWidth", publicName: "footerCellMinWidth", isSignal: true, isRequired: false, transformFunction: null }, footerCellWidth: { classPropertyName: "footerCellWidth", publicName: "footerCellWidth", isSignal: true, isRequired: false, transformFunction: null }, footerColumn: { classPropertyName: "footerColumn", publicName: "footerColumn", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()", "style.width.px": "width()", "style.min-width.px": "minWidth()" } }, ngImport: i0 }); }
28
24
  }
@@ -39,4 +35,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
39
35
  }], propDecorators: { footerCellMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellMinWidth", required: false }] }], footerCellWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellWidth", required: false }] }], footerColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerColumn", required: false }] }] } });
40
36
 
41
37
  export { GridFooterTableCellDirective };
42
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DZk18LJC.mjs.map
38
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs.map
@@ -5,30 +5,26 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { ImmutableList, ImmutableSet, span } from '@mirei/ts-collections';
6
6
  import { SlicePipe } from '@nanahoshi/mona-ui/common';
7
7
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
8
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
9
8
  import { fromEvent } from 'rxjs';
10
- import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs';
11
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DZk18LJC.mjs';
12
- import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs';
13
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.mjs';
9
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs';
10
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs';
11
+ import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
12
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs';
14
13
 
15
14
  class GridListComponent {
16
15
  #destroyRef;
17
16
  #gridNavigationService;
18
17
  #hostElementRef;
19
18
  #rowFlattener;
20
- #themeService;
21
19
  constructor() {
22
20
  this.#destroyRef = inject(DestroyRef);
23
21
  this.#gridNavigationService = inject(GridNavigationService);
24
22
  this.#hostElementRef = inject((ElementRef));
25
23
  this.#rowFlattener = inject(GridRowFlattenerService);
26
- this.#themeService = inject(ThemeService);
27
24
  this.bodyTableElementRef = viewChild.required("bodyTable", /* @ts-ignore */
28
25
  ...(ngDevMode ? [{ debugName: "bodyTableElementRef" }] : /* istanbul ignore next */ []));
29
26
  this.baseClass = computed(() => {
30
- const theme = this.#themeService.theme();
31
- return gridListBaseThemeVariants(theme)({ virtual: false });
27
+ return gridListBaseThemeVariants({ virtual: false });
32
28
  }, /* @ts-ignore */
33
29
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
34
30
  this.flattenedGroupedRows = computed(() => {
@@ -43,19 +39,16 @@ class GridListComponent {
43
39
  }, /* @ts-ignore */
44
40
  ...(ngDevMode ? [{ debugName: "flattenedGroupedRows" }] : /* istanbul ignore next */ []));
45
41
  this.footerTableRowClass = computed(() => {
46
- const theme = this.#themeService.theme();
47
- return gridFooterTableRowThemeVariants(theme)();
42
+ return gridFooterTableRowThemeVariants();
48
43
  }, /* @ts-ignore */
49
44
  ...(ngDevMode ? [{ debugName: "footerTableRowClass" }] : /* istanbul ignore next */ []));
50
45
  this.gridService = inject(GridService);
51
46
  this.groupRowClass = computed(() => {
52
- const theme = this.#themeService.theme();
53
- return gridGroupRowThemeVariants(theme)();
47
+ return gridGroupRowThemeVariants();
54
48
  }, /* @ts-ignore */
55
49
  ...(ngDevMode ? [{ debugName: "groupRowClass" }] : /* istanbul ignore next */ []));
56
50
  this.tableClass = computed(() => {
57
- const theme = this.#themeService.theme();
58
- return gridListTableThemeVariants(theme)();
51
+ return gridListTableThemeVariants();
59
52
  }, /* @ts-ignore */
60
53
  ...(ngDevMode ? [{ debugName: "tableClass" }] : /* istanbul ignore next */ []));
61
54
  this.columns = input(ImmutableList.create(), /* @ts-ignore */
@@ -125,4 +118,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
125
118
  }], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
126
119
 
127
120
  export { GridListComponent };
128
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs.map
121
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs.map