@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,18 +1,18 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, computed, input, Directive, DestroyRef, DOCUMENT, ElementRef, contentChild, TemplateRef, signal, viewChild, model, afterNextRender, Component } from '@angular/core';
3
+ import { computed, input, Directive, inject, DestroyRef, DOCUMENT, ElementRef, contentChild, TemplateRef, signal, viewChild, model, afterNextRender, Component } from '@angular/core';
4
4
  import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { toCssValue } from '@nanahoshi/mona-ui/internal';
6
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
7
6
  import { select } from '@mirei/ts-collections';
8
7
  import { startWith, pairwise, map, Subject, timer, interval, takeUntil, asyncScheduler, fromEvent, filter, tap } from 'rxjs';
9
8
  import { twMerge } from 'tailwind-merge';
10
9
  import { cva } from 'class-variance-authority';
11
10
 
12
- const scrollViewBaseVariants = cva(`
13
- block relative w-full h-full outline-none
14
- overflow-hidden
15
- border border-border border-2
11
+ const scrollViewBaseThemeVariants = cva(`
12
+ relative block h-full w-full overflow-hidden
13
+ bg-surface outline-none
14
+ border border-border-subtle
15
+ focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
16
16
  `, {
17
17
  variants: {
18
18
  rounded: {
@@ -23,26 +23,24 @@ const scrollViewBaseVariants = cva(`
23
23
  }
24
24
  }
25
25
  });
26
- const scrollViewContentVariants = cva(`
26
+ const scrollViewContentThemeVariants = cva(`
27
27
  absolute inset-0 overflow-hidden
28
28
  `);
29
- const scrollViewListVariants = cva(`
30
- relative list-none h-full
29
+ const scrollViewListThemeVariants = cva(`
30
+ relative h-full list-none
31
31
  [&_li]:absolute
32
32
  [&_li]:inset-0
33
33
  [&_li]:outline-none
34
34
  `);
35
- const scrollViewArrowVariants = cva(`
36
- absolute top-0 bottom-0 px-1
37
- flex items-center justify-center
35
+ const scrollViewArrowThemeVariants = cva(`
36
+ absolute top-0 bottom-0 flex items-center justify-center
37
+ px-1
38
38
  cursor-pointer select-none
39
-
40
- text-foreground
41
- [&_svg]:stroke-white
42
- [&_svg]:drop-shadow-[0_0_15px_#000]
43
- [&_svg]:opacity-40
44
- hover:[&_svg]:opacity-100
45
- [&_svg]:transition-opacity duration-300 ease-out
39
+ bg-surface-overlay/65 text-foreground
40
+ transition-colors duration-(--mona-motion-standard) ease-out
41
+ hover:bg-hover/90 active:bg-active/90
42
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
43
+ [&_svg]:stroke-current
46
44
  `, {
47
45
  variants: {
48
46
  hidden: {
@@ -59,37 +57,37 @@ const scrollViewArrowVariants = cva(`
59
57
  }
60
58
  }
61
59
  });
62
- const scrollViewPagerVariants = cva(`
63
- absolute left-0 right-0 bottom-0 flex items-center justify-center
60
+ const scrollViewPagerThemeVariants = cva(`
61
+ absolute right-0 bottom-0 left-0 flex items-center justify-center
64
62
  `, {
65
63
  variants: {
66
64
  pagerOverlay: {
67
- dark: "border-0 border-t border-border/20 bg-background-dark/20",
68
- light: "border-0 border-t border-border/20 bg-background/20",
65
+ dark: "bg-canvas/85 border-0 border-t border-border-subtle",
66
+ light: "bg-surface-overlay/85 border-0 border-t border-border-subtle",
69
67
  none: ""
70
68
  }
71
69
  }
72
70
  });
73
- const scrollViewPagerListContainerVariants = cva(`
74
- flex items-center justify-center
75
- flex-1 overflow-hidden
71
+ const scrollViewPagerListContainerThemeVariants = cva(`
72
+ flex flex-1 items-center justify-center overflow-hidden
76
73
  `);
77
- const scrollViewPagerListVariants = cva(`
78
- flex items-center gap-2
79
- list-none overflow-hidden
80
- flex-nowrap px-1 py-3
74
+ const scrollViewPagerListThemeVariants = cva(`
75
+ flex flex-nowrap items-center gap-2
76
+ overflow-hidden list-none
77
+ px-1 py-3
81
78
  `);
82
- const scrollViewPagerListItemVariants = cva(`
83
- w-3 h-3
84
- content-[' ']
85
- flex-grow-0 flex-shrink-0 flex-basis-3
79
+ const scrollViewPagerListItemThemeVariants = cva(`
80
+ h-3 w-3 flex-none basis-3
86
81
  cursor-pointer
87
- border border-border bg-white
88
- not-last:mr-3
82
+ bg-muted-foreground/40 border border-border-subtle
83
+ transition-colors
84
+ not-last:me-3
85
+ hover:bg-muted-foreground/60 active:bg-foreground
86
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-indicator/35
89
87
  `, {
90
88
  variants: {
91
89
  active: {
92
- true: "!bg-primary",
90
+ true: "!bg-foreground hover:!bg-foreground",
93
91
  false: ""
94
92
  },
95
93
  pagerRounded: {
@@ -101,100 +99,23 @@ const scrollViewPagerListItemVariants = cva(`
101
99
  }
102
100
  }
103
101
  });
104
- const scrollViewPagerArrowVariants = cva(`
102
+ const scrollViewPagerArrowThemeVariants = cva(`
105
103
  flex items-center justify-center
106
- p-2 cursor-pointer select-none
107
- transition-opacity duration-300 ease-out
108
- opacity-70 hover:opacity-100
109
- font-medium
110
- [&_svg]:stroke-white
111
- [&_svg]:drop-shadow-[0_0_15px_#000]
112
- [&_svg]:opacity-40
113
- hover:[&_svg]:opacity-100
114
- [&_svg]:transition-opacity duration-300 ease-out
104
+ p-2
105
+ cursor-pointer select-none
106
+ font-medium text-muted-foreground
107
+ transition-colors duration-(--mona-motion-standard) ease-out
108
+ hover:bg-hover hover:text-foreground active:bg-active
109
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
110
+ [&_svg]:stroke-current
115
111
  `);
116
112
 
117
- const scrollViewBaseThemeVariants = (theme) => {
118
- switch (theme) {
119
- case "mona":
120
- return scrollViewBaseVariants;
121
- default:
122
- return scrollViewBaseVariants;
123
- }
124
- };
125
- const scrollViewContentThemeVariants = (theme) => {
126
- switch (theme) {
127
- case "mona":
128
- return scrollViewContentVariants;
129
- default:
130
- return scrollViewContentVariants;
131
- }
132
- };
133
- const scrollViewListThemeVariants = (theme) => {
134
- switch (theme) {
135
- case "mona":
136
- return scrollViewListVariants;
137
- default:
138
- return scrollViewListVariants;
139
- }
140
- };
141
- const scrollViewArrowThemeVariants = (theme) => {
142
- switch (theme) {
143
- case "mona":
144
- return scrollViewArrowVariants;
145
- default:
146
- return scrollViewArrowVariants;
147
- }
148
- };
149
- const scrollViewPagerThemeVariants = (theme) => {
150
- switch (theme) {
151
- case "mona":
152
- return scrollViewPagerVariants;
153
- default:
154
- return scrollViewPagerVariants;
155
- }
156
- };
157
- const scrollViewPagerListContainerThemeVariants = (theme) => {
158
- switch (theme) {
159
- case "mona":
160
- return scrollViewPagerListContainerVariants;
161
- default:
162
- return scrollViewPagerListContainerVariants;
163
- }
164
- };
165
- const scrollViewPagerListThemeVariants = (theme) => {
166
- switch (theme) {
167
- case "mona":
168
- return scrollViewPagerListVariants;
169
- default:
170
- return scrollViewPagerListVariants;
171
- }
172
- };
173
- const scrollViewPagerListItemThemeVariants = (theme) => {
174
- switch (theme) {
175
- case "mona":
176
- return scrollViewPagerListItemVariants;
177
- default:
178
- return scrollViewPagerListItemVariants;
179
- }
180
- };
181
- const scrollViewPagerArrowThemeVariants = (theme) => {
182
- switch (theme) {
183
- case "mona":
184
- return scrollViewPagerArrowVariants;
185
- default:
186
- return scrollViewPagerArrowVariants;
187
- }
188
- };
189
-
190
113
  class ScrollViewActivePageDirective {
191
114
  constructor() {
192
- this.#themeService = inject(ThemeService);
193
115
  this.pageItemClass = computed(() => {
194
- const theme = this.#themeService.theme();
195
116
  const active = this.active();
196
117
  const pagerRounded = this.rounded();
197
- return scrollViewPagerListItemThemeVariants(theme)({ active, pagerRounded });
118
+ return scrollViewPagerListItemThemeVariants({ active, pagerRounded });
198
119
  }, /* @ts-ignore */
199
120
  ...(ngDevMode ? [{ debugName: "pageItemClass" }] : /* istanbul ignore next */ []));
200
121
  this.active = input.required(/* @ts-ignore */
@@ -202,7 +123,6 @@ class ScrollViewActivePageDirective {
202
123
  this.rounded = input.required(/* @ts-ignore */
203
124
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
204
125
  }
205
- #themeService;
206
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ScrollViewActivePageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
207
127
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ScrollViewActivePageDirective, isStandalone: true, selector: "button[monaScrollViewActivePage]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "pageItemClass()" } }, ngImport: i0 }); }
208
128
  }
@@ -222,7 +142,6 @@ class ScrollViewComponent {
222
142
  #viewIndex;
223
143
  #directionFromIndex;
224
144
  #hostElementRef;
225
- #themeService;
226
145
  #resizeObserver;
227
146
  #scroll$;
228
147
  #scrollMouseUpHandler;
@@ -256,7 +175,6 @@ class ScrollViewComponent {
256
175
  initialValue: "right"
257
176
  });
258
177
  this.#hostElementRef = inject(ElementRef);
259
- this.#themeService = inject(ThemeService);
260
178
  this.#resizeObserver = null;
261
179
  this.#scroll$ = new Subject();
262
180
  this.#scrollMouseUpHandler = () => this.onPagerScrollEnd();
@@ -266,16 +184,14 @@ class ScrollViewComponent {
266
184
  }, /* @ts-ignore */
267
185
  ...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
268
186
  this.baseClass = computed(() => {
269
- const theme = this.#themeService.theme();
270
187
  const rounded = this.rounded();
271
- const variantClass = scrollViewBaseThemeVariants(theme)({ rounded });
188
+ const variantClass = scrollViewBaseThemeVariants({ rounded });
272
189
  const userClass = this.userClass();
273
190
  return twMerge(variantClass, userClass);
274
191
  }, /* @ts-ignore */
275
192
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
276
193
  this.contentClass = computed(() => {
277
- const theme = this.#themeService.theme();
278
- return scrollViewContentThemeVariants(theme)();
194
+ return scrollViewContentThemeVariants();
279
195
  }, /* @ts-ignore */
280
196
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
281
197
  this.contentTemplate = contentChild(TemplateRef, /* @ts-ignore */
@@ -291,45 +207,38 @@ class ScrollViewComponent {
291
207
  }, /* @ts-ignore */
292
208
  ...(ngDevMode ? [{ debugName: "leaveAnimation" }] : /* istanbul ignore next */ []));
293
209
  this.leftArrowClass = computed(() => {
294
- const theme = this.#themeService.theme();
295
210
  const hidden = !this.arrows() || !(this.infinite() || this.index() !== 0);
296
- return scrollViewArrowThemeVariants(theme)({ left: true, hidden });
211
+ return scrollViewArrowThemeVariants({ left: true, hidden });
297
212
  }, /* @ts-ignore */
298
213
  ...(ngDevMode ? [{ debugName: "leftArrowClass" }] : /* istanbul ignore next */ []));
299
214
  this.listClass = computed(() => {
300
- const theme = this.#themeService.theme();
301
- return scrollViewListThemeVariants(theme)();
215
+ return scrollViewListThemeVariants();
302
216
  }, /* @ts-ignore */
303
217
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
304
218
  this.pagerArrowClass = computed(() => {
305
- const theme = this.#themeService.theme();
306
- return scrollViewPagerArrowThemeVariants(theme)();
219
+ return scrollViewPagerArrowThemeVariants();
307
220
  }, /* @ts-ignore */
308
221
  ...(ngDevMode ? [{ debugName: "pagerArrowClass" }] : /* istanbul ignore next */ []));
309
222
  this.pagerArrowVisible = signal(true, /* @ts-ignore */
310
223
  ...(ngDevMode ? [{ debugName: "pagerArrowVisible" }] : /* istanbul ignore next */ []));
311
224
  this.pagerClass = computed(() => {
312
- const theme = this.#themeService.theme();
313
225
  const pagerOverlay = this.pagerOverlay();
314
- return scrollViewPagerThemeVariants(theme)({ pagerOverlay });
226
+ return scrollViewPagerThemeVariants({ pagerOverlay });
315
227
  }, /* @ts-ignore */
316
228
  ...(ngDevMode ? [{ debugName: "pagerClass" }] : /* istanbul ignore next */ []));
317
229
  this.pagerListClass = computed(() => {
318
- const theme = this.#themeService.theme();
319
- return scrollViewPagerListThemeVariants(theme)();
230
+ return scrollViewPagerListThemeVariants();
320
231
  }, /* @ts-ignore */
321
232
  ...(ngDevMode ? [{ debugName: "pagerListClass" }] : /* istanbul ignore next */ []));
322
233
  this.pagerListContainerClass = computed(() => {
323
- const theme = this.#themeService.theme();
324
- return scrollViewPagerListContainerThemeVariants(theme)();
234
+ return scrollViewPagerListContainerThemeVariants();
325
235
  }, /* @ts-ignore */
326
236
  ...(ngDevMode ? [{ debugName: "pagerListContainerClass" }] : /* istanbul ignore next */ []));
327
237
  this.pagerListElementRef = viewChild("pagerListElement", /* @ts-ignore */
328
238
  ...(ngDevMode ? [{ debugName: "pagerListElementRef" }] : /* istanbul ignore next */ []));
329
239
  this.rightArrowClass = computed(() => {
330
- const theme = this.#themeService.theme();
331
240
  const hidden = !this.arrows() || !(this.infinite() || this.index() !== this.itemCount() - 1);
332
- return scrollViewArrowThemeVariants(theme)({ right: true, hidden });
241
+ return scrollViewArrowThemeVariants({ right: true, hidden });
333
242
  }, /* @ts-ignore */
334
243
  ...(ngDevMode ? [{ debugName: "rightArrowClass" }] : /* istanbul ignore next */ []));
335
244
  this.scrollViewHeight = computed(() => {
@@ -3,9 +3,9 @@ import * as i0 from '@angular/core';
3
3
  import { inject, ElementRef, Directive, Pipe, DestroyRef, signal, viewChildren, NgZone, computed, contentChild, TemplateRef, input, output, afterNextRender, viewChild, model, Component } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { fromEvent, tap, filter, switchMap, takeUntil } from 'rxjs';
6
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
7
6
  import { twMerge } from 'tailwind-merge';
8
7
  import { cva } from 'class-variance-authority';
8
+ import { themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
9
9
 
10
10
  class SliderTickDirective {
11
11
  constructor() {
@@ -150,26 +150,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
150
150
  }]
151
151
  }] });
152
152
 
153
- const sliderBaseVariants = cva(`
154
- flex relative select-none
153
+ const sliderBaseThemeVariants = cva(`
154
+ relative flex select-none
155
155
 
156
- data-[orientation="horizontal"]:h-6
157
156
  data-[orientation="horizontal"]:w-full
157
+ data-[orientation="horizontal"]:h-6
158
158
  data-[orientation="horizontal"]:min-w-[200px]
159
159
  data-[orientation="horizontal"]:items-center
160
160
 
161
- data-[orientation="vertical"]:w-6
162
161
  data-[orientation="vertical"]:h-[200px]
162
+ data-[orientation="vertical"]:w-6
163
163
  data-[orientation="vertical"]:justify-center
164
164
 
165
165
  data-[disabled="true"]:pointer-events-none
166
- data-[disabled="true"]:opacity-50
167
166
  data-[disabled="true"]:cursor-not-allowed
167
+ data-[disabled="true"]:opacity-50
168
168
  `);
169
- const sliderTrackVariants = cva(`
169
+ const sliderTrackThemeVariants = cva(`
170
170
  relative z-2 cursor-pointer
171
- border border-input-border
172
- bg-background text-foreground
171
+ overflow-hidden
172
+ bg-surface-muted text-foreground
173
173
 
174
174
  data-[orientation="horizontal"]:w-full
175
175
  data-[orientation="horizontal"]:h-1.5
@@ -177,12 +177,22 @@ const sliderTrackVariants = cva(`
177
177
  data-[orientation="vertical"]:h-full
178
178
  data-[orientation="vertical"]:w-1.5
179
179
 
180
- `);
181
- const sliderSelectionVariants = cva(`
180
+ `, {
181
+ variants: {
182
+ rounded: {
183
+ full: "rounded-full",
184
+ large: "rounded-lg",
185
+ medium: "rounded-md",
186
+ none: "rounded-none",
187
+ small: "rounded-sm"
188
+ }
189
+ }
190
+ });
191
+ const sliderSelectionThemeVariants = cva(`
182
192
  absolute
183
- bg-primary border-none
184
-
185
- ease-out duration-200
193
+ bg-primary
194
+ border-none
195
+ transition duration-(--mona-motion-fast) ease-out
186
196
 
187
197
  data-[orientation="horizontal"]:top-0
188
198
  data-[orientation="horizontal"]:bottom-0
@@ -194,7 +204,7 @@ const sliderSelectionVariants = cva(`
194
204
  data-[orientation="vertical"]:transition-[top,bottom]
195
205
  data-[orientation="vertical"]:data-[dragging="true"]:transition-none
196
206
  `);
197
- const sliderTickListVariants = cva(`
207
+ const sliderTickListThemeVariants = cva(`
198
208
  absolute
199
209
 
200
210
  data-[orientation="horizontal"]:w-full
@@ -207,34 +217,29 @@ const sliderTickListVariants = cva(`
207
217
  data-[orientation="vertical"]:top-0
208
218
  data-[orientation="vertical"]:left-0
209
219
  `);
210
- const sliderTickVariants = cva(`
220
+ const sliderTickThemeVariants = cva(`
211
221
  cursor-pointer
212
- bg-input-border
213
- brightness-75
222
+ bg-border-control-hover
214
223
  `);
215
- const sliderTickLabelListVariants = cva(`
216
- absolute
217
- w-full h-full
224
+ const sliderTickLabelListThemeVariants = cva(`
225
+ absolute h-full w-full
218
226
  select-none
219
227
  `);
220
- const sliderTickLabelVariants = cva(`
221
- absolute flex
222
- items-center justify-center
228
+ const sliderTickLabelThemeVariants = cva(`
229
+ absolute flex items-center justify-center
230
+ text-xs/[1.667] text-foreground
223
231
 
224
- text-xs/[1.667]
225
- text-foreground
226
-
227
- data-[orientation="vertical"]:w-4.25
228
232
  data-[orientation="vertical"]:h-auto
233
+ data-[orientation="vertical"]:w-4.25
229
234
  `);
230
- const sliderHandleVariants = cva(`
235
+ const sliderHandleThemeVariants = cva(`
231
236
  absolute z-2 flex items-center justify-center
232
- w-4.25 h-4.25
237
+ h-4.25 w-4.25
233
238
  cursor-pointer
239
+ ${themeRaisedSurfaceClasses}
240
+ border border-(--mona-slider-handle-border-color) shadow-(--shadow-control)
234
241
  outline-none
235
- bg-primary border border-border
236
-
237
- ease-out duration-200
242
+ transition duration-(--mona-motion-fast) ease-out
238
243
 
239
244
  data-[orientation="horizontal"]:translate-x-[-50%]
240
245
  data-[orientation="horizontal"]:transition-[left]
@@ -244,11 +249,14 @@ const sliderHandleVariants = cva(`
244
249
  data-[orientation="vertical"]:transition-[bottom]
245
250
  data-[orientation="vertical"]:data-[dragging="true"]:transition-none
246
251
 
252
+ data-[focused="true"]:border-focus-indicator
247
253
  data-[focused="true"]:ring-2
248
- data-[focused="true"]:ring-primary/40
254
+ data-[focused="true"]:ring-focus-indicator/35
249
255
 
250
256
  data-[invalid="true"]:border-error
251
- data-[invalid="true"]:ring-2 data-[invalid="true"]:ring-error/40
257
+ data-[invalid="true"]:ring-2 data-[invalid="true"]:ring-error/35
258
+ data-[invalid="true"]:data-[focused="true"]:border-error
259
+ data-[invalid="true"]:data-[focused="true"]:ring-error/35
252
260
  `, {
253
261
  variants: {
254
262
  rounded: {
@@ -261,75 +269,8 @@ const sliderHandleVariants = cva(`
261
269
  }
262
270
  });
263
271
 
264
- const sliderBaseThemeVariants = (theme) => {
265
- switch (theme) {
266
- case "mona":
267
- return sliderBaseVariants;
268
- default:
269
- return sliderBaseVariants; // Default to Mona styles
270
- }
271
- };
272
- const sliderTrackThemeVariants = (theme) => {
273
- switch (theme) {
274
- case "mona":
275
- return sliderTrackVariants;
276
- default:
277
- return sliderTrackVariants; // Default to Mona styles
278
- }
279
- };
280
- const sliderSelectionThemeVariants = (theme) => {
281
- switch (theme) {
282
- case "mona":
283
- return sliderSelectionVariants;
284
- default:
285
- return sliderSelectionVariants; // Default to Mona styles
286
- }
287
- };
288
- const sliderTickListThemeVariants = (theme) => {
289
- switch (theme) {
290
- case "mona":
291
- return sliderTickListVariants;
292
- default:
293
- return sliderTickListVariants; // Default to Mona styles
294
- }
295
- };
296
- const sliderTickThemeVariants = (theme) => {
297
- switch (theme) {
298
- case "mona":
299
- return sliderTickVariants;
300
- default:
301
- return sliderTickVariants; // Default to Mona styles
302
- }
303
- };
304
- const sliderTickLabelListThemeVariants = (theme) => {
305
- switch (theme) {
306
- case "mona":
307
- return sliderTickLabelListVariants;
308
- default:
309
- return sliderTickLabelListVariants; // Default to Mona styles
310
- }
311
- };
312
- const sliderTickLabelThemeVariants = (theme) => {
313
- switch (theme) {
314
- case "mona":
315
- return sliderTickLabelVariants;
316
- default:
317
- return sliderTickLabelVariants; // Default to Mona styles
318
- }
319
- };
320
- const sliderHandleThemeVariants = (theme) => {
321
- switch (theme) {
322
- case "mona":
323
- return sliderHandleVariants;
324
- default:
325
- return sliderHandleVariants; // Default to Mona styles
326
- }
327
- };
328
-
329
272
  class SliderBaseComponent {
330
- #themeService;
331
273
  constructor() {
332
- this.#themeService = inject(ThemeService);
333
274
  this.destroyRef = inject(DestroyRef);
334
275
  this.dragging = signal(false, /* @ts-ignore */
335
276
  ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
@@ -337,7 +278,7 @@ class SliderBaseComponent {
337
278
  this.tickElements = viewChildren(SliderTickDirective, /* @ts-ignore */
338
279
  ...(ngDevMode ? [{ debugName: "tickElements" }] : /* istanbul ignore next */ []));
339
280
  this.zone = inject(NgZone);
340
- this.baseClasses = computed(() => sliderBaseThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
281
+ this.baseClasses = computed(() => sliderBaseThemeVariants(), /* @ts-ignore */
341
282
  ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
342
283
  this.effectiveDisabled = computed(() => this.disabled(), /* @ts-ignore */
343
284
  ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
@@ -398,12 +339,12 @@ class SliderBaseComponent {
398
339
  return typeof bg === "string" ? { background: bg } : bg;
399
340
  }, /* @ts-ignore */
400
341
  ...(ngDevMode ? [{ debugName: "selectionBackgroundStyle" }] : /* istanbul ignore next */ []));
401
- this.selectionClasses = computed(() => sliderSelectionThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
342
+ this.selectionClasses = computed(() => sliderSelectionThemeVariants(), /* @ts-ignore */
402
343
  ...(ngDevMode ? [{ debugName: "selectionClasses" }] : /* istanbul ignore next */ []));
403
344
  this.sliderHandleClasses = computed(() => {
404
345
  const rounded = this.rounded();
405
346
  const handleClasses = this.handleClasses();
406
- const variants = sliderHandleThemeVariants(this.#themeService.theme())({ rounded });
347
+ const variants = sliderHandleThemeVariants({ rounded });
407
348
  return twMerge(variants ?? "", Array.isArray(handleClasses) ? handleClasses.join(" ") : handleClasses);
408
349
  }, /* @ts-ignore */
409
350
  ...(ngDevMode ? [{ debugName: "sliderHandleClasses" }] : /* istanbul ignore next */ []));
@@ -422,13 +363,13 @@ class SliderBaseComponent {
422
363
  return `${number}px`;
423
364
  }, /* @ts-ignore */
424
365
  ...(ngDevMode ? [{ debugName: "sliderTrackSize" }] : /* istanbul ignore next */ []));
425
- this.tickClasses = computed(() => sliderTickThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
366
+ this.tickClasses = computed(() => sliderTickThemeVariants(), /* @ts-ignore */
426
367
  ...(ngDevMode ? [{ debugName: "tickClasses" }] : /* istanbul ignore next */ []));
427
- this.tickLabelClasses = computed(() => sliderTickLabelThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
368
+ this.tickLabelClasses = computed(() => sliderTickLabelThemeVariants(), /* @ts-ignore */
428
369
  ...(ngDevMode ? [{ debugName: "tickLabelClasses" }] : /* istanbul ignore next */ []));
429
- this.tickLabelListClasses = computed(() => sliderTickLabelListThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
370
+ this.tickLabelListClasses = computed(() => sliderTickLabelListThemeVariants(), /* @ts-ignore */
430
371
  ...(ngDevMode ? [{ debugName: "tickLabelListClasses" }] : /* istanbul ignore next */ []));
431
- this.tickListClasses = computed(() => sliderTickListThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
372
+ this.tickListClasses = computed(() => sliderTickListThemeVariants(), /* @ts-ignore */
432
373
  ...(ngDevMode ? [{ debugName: "tickListClasses" }] : /* istanbul ignore next */ []));
433
374
  this.tickStyleArgs = computed(() => {
434
375
  const largeTickStep = this.largeTickStep();
@@ -464,7 +405,10 @@ class SliderBaseComponent {
464
405
  return typeof bg === "string" ? { background: bg } : bg;
465
406
  }, /* @ts-ignore */
466
407
  ...(ngDevMode ? [{ debugName: "trackBackgroundStyle" }] : /* istanbul ignore next */ []));
467
- this.trackClasses = computed(() => sliderTrackThemeVariants(this.#themeService.theme())(), /* @ts-ignore */
408
+ this.trackClasses = computed(() => {
409
+ const rounded = this.rounded();
410
+ return sliderTrackThemeVariants({ rounded });
411
+ }, /* @ts-ignore */
468
412
  ...(ngDevMode ? [{ debugName: "trackClasses" }] : /* istanbul ignore next */ []));
469
413
  /**
470
414
  * @description Human-readable override for the `aria-valuenow` announcement. Pass a function that receives the current value and returns the string to announce.