@nanahoshi/mona-ui 0.1.0 → 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 (176) hide show
  1. package/auto-complete/package.json +4 -0
  2. package/avatar/package.json +4 -0
  3. package/breadcrumb/package.json +4 -0
  4. package/button/package.json +4 -0
  5. package/button-group/package.json +4 -0
  6. package/calendar/package.json +4 -0
  7. package/check-box/package.json +4 -0
  8. package/chip/package.json +4 -0
  9. package/circular-progress-bar/package.json +4 -0
  10. package/color-gradient/package.json +4 -0
  11. package/color-palette/package.json +4 -0
  12. package/color-picker/package.json +4 -0
  13. package/combo-box/package.json +4 -0
  14. package/common/package.json +4 -0
  15. package/contextmenu/package.json +4 -0
  16. package/date-input/package.json +4 -0
  17. package/date-picker/package.json +4 -0
  18. package/datetime-picker/package.json +4 -0
  19. package/dialog/package.json +4 -0
  20. package/dropdown-button/package.json +4 -0
  21. package/dropdown-list/package.json +4 -0
  22. package/dropdowns/package.json +4 -0
  23. package/editor/package.json +4 -0
  24. package/expansion-panel/package.json +4 -0
  25. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
  51. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
  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 +57 -87
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
  68. package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
  69. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
  70. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
  71. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
  73. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
  74. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
  75. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
  76. package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
  77. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
  78. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
  79. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
  80. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  81. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
  82. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
  83. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
  84. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
  86. package/fieldset/package.json +4 -0
  87. package/filter/package.json +4 -0
  88. package/grid/package.json +4 -0
  89. package/internal/filter-input/package.json +4 -0
  90. package/internal/indicator-icon/package.json +4 -0
  91. package/internal/list/package.json +4 -0
  92. package/internal/package.json +4 -0
  93. package/internal/tree/package.json +4 -0
  94. package/list/package.json +4 -0
  95. package/list-box/package.json +4 -0
  96. package/list-view/package.json +4 -0
  97. package/menubar/package.json +4 -0
  98. package/multi-select/package.json +4 -0
  99. package/notification/package.json +4 -0
  100. package/numeric-text-box/package.json +4 -0
  101. package/package.json +31 -5
  102. package/pager/package.json +4 -0
  103. package/placeholder/package.json +4 -0
  104. package/popover/package.json +4 -0
  105. package/popup/package.json +4 -0
  106. package/popup-menu/package.json +4 -0
  107. package/progress-bar/package.json +4 -0
  108. package/query/package.json +4 -0
  109. package/radio-button/package.json +4 -0
  110. package/scroll-view/package.json +4 -0
  111. package/slider/package.json +4 -0
  112. package/split-button/package.json +4 -0
  113. package/splitter/package.json +4 -0
  114. package/stepper/package.json +4 -0
  115. package/switch/package.json +4 -0
  116. package/tabs/package.json +4 -0
  117. package/text-area/package.json +4 -0
  118. package/text-box/package.json +4 -0
  119. package/theme/package.json +4 -0
  120. package/time-picker/package.json +4 -0
  121. package/time-selector/package.json +4 -0
  122. package/tooltip/package.json +4 -0
  123. package/tree-view/package.json +4 -0
  124. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  125. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  126. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  127. package/types/nanahoshi-mona-ui-button.d.ts +6 -6
  128. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  129. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  130. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  131. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  132. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  133. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  134. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
  135. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  136. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  137. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  138. package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
  139. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  140. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  141. package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
  142. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  143. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  144. package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
  145. package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  147. package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
  148. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  149. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  150. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  151. package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
  152. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  154. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  155. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  156. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  157. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  158. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  159. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  160. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  161. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  162. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  163. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  164. package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
  165. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  166. package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
  167. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  168. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  169. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  170. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  171. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  172. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  173. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  174. package/window/package.json +4 -0
  175. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
  176. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
@@ -2,31 +2,49 @@ import { CdkTrapFocus } from '@angular/cdk/a11y';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, DestroyRef, ElementRef, computed, linkedSignal, signal, viewChild, output, input, model, afterNextRender, effect, untracked, forwardRef, Component } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
6
5
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
7
6
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
8
7
  import { DropdownService, dropdownPopupThemeVariants, DropdownPopupInputToken, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
9
- import { createElementControlId } from '@nanahoshi/mona-ui/internal';
8
+ import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
10
9
  import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
11
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
12
10
  import { TimeSelectorComponent } from '@nanahoshi/mona-ui/time-selector';
13
11
  import { DateTime } from 'luxon';
14
12
  import { fromEvent } from 'rxjs';
15
13
  import { twMerge } from 'tailwind-merge';
16
14
  import { cva } from 'class-variance-authority';
17
15
 
18
- const timePickerBaseVariants = cva(`
19
- flex items-center w-full
20
- border border-border
21
- focus-within:ring-2 focus-within:ring-primary/40 focus-within:border-primary
22
- data-[invalid='true']:border-error
23
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
24
- [&_mona-text-box]:h-full
25
- [&_mona-text-box]:border-none
16
+ const timePickerBaseThemeVariants = cva(`
17
+ flex w-full items-center
18
+ ${themeControlSurfaceClasses} text-foreground
19
+ border border-input-border shadow-(--shadow-control)
20
+ outline-none
21
+
22
+ data-[disabled='true']:pointer-events-none
23
+ data-[disabled='true']:cursor-not-allowed
24
+ data-[disabled='true']:border-disabled-border
25
+ data-[disabled='true']:bg-disabled-background
26
+ data-[disabled='true']:text-disabled-foreground
27
+ data-[disabled='true']:shadow-none
28
+ data-[readonly='true']:cursor-default
29
+
30
+ focus-within:border-focus-indicator
31
+ focus-within:ring-2 focus-within:ring-focus-indicator/35
32
+
33
+ data-[invalid='true']:border-error
34
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
35
+ data-[invalid='true']:focus-within:border-error
36
+ data-[invalid='true']:focus-within:ring-error/35
37
+
38
+ [&_mona-text-box]:h-full
39
+ [&_mona-text-box]:border-none
40
+ [&_mona-text-box]:shadow-none
41
+ [&_mona-text-box]:focus-within:ring-0
42
+ [&_mona-text-box[data-invalid='true']]:ring-0
26
43
  `, {
27
44
  variants: {
28
45
  focused: {
29
- true: `ring-2 ring-primary/40 border-primary`
46
+ true: "border-focus-indicator ring-2 ring-focus-indicator/35",
47
+ false: ""
30
48
  },
31
49
  rounded: {
32
50
  full: "rounded-full",
@@ -40,36 +58,30 @@ const timePickerBaseVariants = cva(`
40
58
  medium: "h-9 text-sm",
41
59
  small: "h-8 text-xs"
42
60
  }
43
- }
61
+ },
62
+ compoundVariants: [
63
+ {
64
+ focused: true,
65
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
66
+ }
67
+ ]
44
68
  });
45
69
 
46
- const timePickerBaseThemeVariants = (theme) => {
47
- switch (theme) {
48
- case "mona":
49
- return timePickerBaseVariants;
50
- default:
51
- return timePickerBaseVariants;
52
- }
53
- };
54
-
55
70
  class TimePickerComponent {
56
71
  #destroyRef;
57
72
  #dropdownService;
58
73
  #hostElementRef;
59
74
  #id;
60
- #themeService;
61
75
  constructor() {
62
76
  this.#destroyRef = inject(DestroyRef);
63
77
  this.#dropdownService = inject(DropdownService);
64
78
  this.#hostElementRef = inject(ElementRef);
65
79
  this.#id = createElementControlId();
66
- this.#themeService = inject(ThemeService);
67
80
  this.baseClass = computed(() => {
68
- const theme = this.#themeService.theme();
69
81
  const focused = this.#dropdownService.popupRef() != null;
70
82
  const rounded = this.rounded();
71
83
  const size = this.size();
72
- const variantClass = timePickerBaseThemeVariants(theme)({ focused, rounded, size });
84
+ const variantClass = timePickerBaseThemeVariants({ focused, rounded, size });
73
85
  const userClass = this.userClass();
74
86
  return twMerge(variantClass, userClass);
75
87
  }, /* @ts-ignore */
@@ -106,11 +118,10 @@ class TimePickerComponent {
106
118
  this.navigatedDate = signal(new Date(), /* @ts-ignore */
107
119
  ...(ngDevMode ? [{ debugName: "navigatedDate" }] : /* istanbul ignore next */ []));
108
120
  this.pickerPopupClass = computed(() => {
109
- const theme = this.#themeService.theme();
110
121
  const rounded = this.rounded();
111
122
  const size = this.size();
112
123
  const userClass = this.popupClass();
113
- const variantClass = dropdownPopupThemeVariants(theme)({ rounded, size });
124
+ const variantClass = dropdownPopupThemeVariants({ rounded, size });
114
125
  return twMerge(variantClass, userClass);
115
126
  }, /* @ts-ignore */
116
127
  ...(ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []));
@@ -403,14 +414,14 @@ class TimePickerComponent {
403
414
  this.currentDateString.set(dateString);
404
415
  }
405
416
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
406
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TimePickerComponent, isStandalone: true, selector: "mona-time-picker", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onTimeInputBlur()" }, properties: { "attr.tabindex": "disabled() ? null : -1", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-expanded": "expanded()", "attr.data-invalid": "invalidState() || null", "class": "baseClass()" } }, providers: [
417
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TimePickerComponent, isStandalone: true, selector: "mona-time-picker", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onTimeInputBlur()" }, properties: { "attr.tabindex": "disabled() ? null : -1", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-disabled": "disabled() || null", "attr.data-expanded": "expanded()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "class": "baseClass()" } }, providers: [
407
418
  DropdownService,
408
419
  {
409
420
  provide: DropdownPopupInputToken,
410
421
  useExisting: forwardRef(() => TimePickerComponent),
411
422
  multi: false
412
423
  }
413
- ], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\r\n [disabled]=\"disabled()\"\r\n [readonly]=\"readonly() || readonlyInput()\"\r\n [required]=\"required()\"\r\n [value]=\"currentDateString()\"\r\n [inputAttributes]=\"inputAttributes()\"\r\n [invalid]=\"invalid()\"\r\n [placeholder]=\"placeholder()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n [touched]=\"touched()\"\r\n [clearButton]=\"showClearButton()\"\r\n (valueChange)=\"onDateStringEdit($event)\"\r\n (inputBlur)=\"onTimeInputBlur()\">\r\n <ng-template monaTextBoxSuffixTemplate>\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [iconOnly]=\"true\"\r\n [size]=\"size()\"\r\n [rounded]=\"'none'\"\r\n (click)=\"onTimeInputButtonClick()\"\r\n class=\"h-full w-auto aspect-square\"\r\n [attr.aria-label]=\"'Open time picker'\"\r\n [attr.aria-expanded]=\"expanded()\"\r\n [attr.aria-controls]=\"popupId\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [tabindex]=\"-1\">\r\n <i class=\"ri-time-line\"></i>\r\n </button>\r\n </ng-template>\r\n</mona-text-box>\r\n\r\n<ng-template #timePopupTemplate>\r\n <div\r\n [class]=\"pickerPopupClass()\"\r\n [id]=\"popupId\"\r\n aria-modal=\"true\"\r\n role=\"dialog\"\r\n aria-label=\"Time picker\"\r\n cdkTrapFocus>\r\n <mona-time-selector\r\n [value]=\"value()\"\r\n (valueChange)=\"onTimeSelectorValueChange($event)\"\r\n [max]=\"max()\"\r\n [min]=\"min()\"\r\n [disabled]=\"disabled()\"\r\n [readonly]=\"readonly()\"\r\n [hourFormat]=\"hourFormat()\"\r\n [hourStep]=\"hourStep()\"\r\n [minuteStep]=\"minuteStep()\"\r\n [secondStep]=\"secondStep()\"\r\n [size]=\"size()\"\r\n [rounded]=\"rounded()\"\r\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\r\n </div>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["ariaLabel", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
424
+ ], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"'Open time picker'\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n aria-label=\"Time picker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["ariaLabel", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
414
425
  }
415
426
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, decorators: [{
416
427
  type: Component,
@@ -421,21 +432,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
421
432
  useExisting: forwardRef(() => TimePickerComponent),
422
433
  multi: false
423
434
  }
424
- ], imports: [
425
- ButtonDirective,
426
- FontAwesomeModule,
427
- TimeSelectorComponent,
428
- TextBoxComponent,
429
- TextBoxSuffixTemplateDirective,
430
- CdkTrapFocus
431
- ], hostDirectives: [DropdownPopupHandlerDirective], host: {
435
+ ], imports: [ButtonDirective, TimeSelectorComponent, TextBoxComponent, TextBoxSuffixTemplateDirective, CdkTrapFocus], hostDirectives: [DropdownPopupHandlerDirective], host: {
432
436
  "[attr.tabindex]": "disabled() ? null : -1",
433
437
  "[attr.aria-invalid]": "invalidState() ? 'true' : null",
438
+ "[attr.data-disabled]": "disabled() || null",
434
439
  "[attr.data-expanded]": "expanded()",
435
440
  "[attr.data-invalid]": "invalidState() || null",
441
+ "[attr.data-readonly]": "readonly() || null",
436
442
  "[class]": "baseClass()",
437
443
  "(blur)": "onTimeInputBlur()"
438
- }, template: "<mona-text-box\r\n [disabled]=\"disabled()\"\r\n [readonly]=\"readonly() || readonlyInput()\"\r\n [required]=\"required()\"\r\n [value]=\"currentDateString()\"\r\n [inputAttributes]=\"inputAttributes()\"\r\n [invalid]=\"invalid()\"\r\n [placeholder]=\"placeholder()\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"size()\"\r\n [touched]=\"touched()\"\r\n [clearButton]=\"showClearButton()\"\r\n (valueChange)=\"onDateStringEdit($event)\"\r\n (inputBlur)=\"onTimeInputBlur()\">\r\n <ng-template monaTextBoxSuffixTemplate>\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [iconOnly]=\"true\"\r\n [size]=\"size()\"\r\n [rounded]=\"'none'\"\r\n (click)=\"onTimeInputButtonClick()\"\r\n class=\"h-full w-auto aspect-square\"\r\n [attr.aria-label]=\"'Open time picker'\"\r\n [attr.aria-expanded]=\"expanded()\"\r\n [attr.aria-controls]=\"popupId\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [tabindex]=\"-1\">\r\n <i class=\"ri-time-line\"></i>\r\n </button>\r\n </ng-template>\r\n</mona-text-box>\r\n\r\n<ng-template #timePopupTemplate>\r\n <div\r\n [class]=\"pickerPopupClass()\"\r\n [id]=\"popupId\"\r\n aria-modal=\"true\"\r\n role=\"dialog\"\r\n aria-label=\"Time picker\"\r\n cdkTrapFocus>\r\n <mona-time-selector\r\n [value]=\"value()\"\r\n (valueChange)=\"onTimeSelectorValueChange($event)\"\r\n [max]=\"max()\"\r\n [min]=\"min()\"\r\n [disabled]=\"disabled()\"\r\n [readonly]=\"readonly()\"\r\n [hourFormat]=\"hourFormat()\"\r\n [hourStep]=\"hourStep()\"\r\n [minuteStep]=\"minuteStep()\"\r\n [secondStep]=\"secondStep()\"\r\n [size]=\"size()\"\r\n [rounded]=\"rounded()\"\r\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\r\n </div>\r\n</ng-template>\r\n" }]
444
+ }, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"'Open time picker'\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n aria-label=\"Time picker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n" }]
439
445
  }], ctorParameters: () => [], propDecorators: { timePopupTemplateRef: [{ type: i0.ViewChild, args: ["timePopupTemplate", { isSignal: true }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], hourStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStep", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], secondStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondStep", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
440
446
 
441
447
  /*
@@ -6,20 +6,19 @@ import { ButtonDirective } from '@nanahoshi/mona-ui/button';
6
6
  import { PreventableEvent } from '@nanahoshi/mona-ui/common';
7
7
  import { TimeSelectorService, generateMinuteSet, generateSecondSet, generateHourSet, TimeLimiterPipe } from '@nanahoshi/mona-ui/date-input';
8
8
  import { rxTimeout, createElementControlId } from '@nanahoshi/mona-ui/internal';
9
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
10
9
  import { DateTime } from 'luxon';
11
10
  import { tap, fromEvent } from 'rxjs';
12
11
  import { filter } from 'rxjs/operators';
13
12
  import { cva } from 'class-variance-authority';
14
13
 
15
- const timeSelectorBaseVariants = cva(`
16
- flex flex-col w-full h-full overflow-hidden
17
- data-[invalid='true']:border data-[invalid='true']:border-error
18
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
14
+ const timeSelectorBaseThemeVariants = cva(`
15
+ flex h-full w-full flex-col overflow-hidden
16
+ data-[invalid='true']:border data-[invalid='true']:border-error
17
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
19
18
  `, {
20
19
  variants: {
21
20
  disabled: {
22
- true: "opacity-50 cursor-not-allowed pointer-events-none",
21
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
23
22
  false: ""
24
23
  },
25
24
  size: {
@@ -29,32 +28,37 @@ const timeSelectorBaseVariants = cva(`
29
28
  }
30
29
  }
31
30
  });
32
- const timeSelectorFooterVariants = cva(`
33
- w-full flex items-center justify-end px-1 py-1 border-0 border-t border-input-border bg-accent
31
+ const timeSelectorFooterThemeVariants = cva(`
32
+ flex w-full items-center justify-end px-1 py-1
33
+ bg-surface-muted
34
+ border-0 border-t border-border-subtle
34
35
  `);
35
- const timeSelectorHeaderVariants = cva(`
36
- flex bg-accent text-accent-foreground
37
- border-b border-input-border
38
- text-xs font-semibold uppercase
39
- [&>div]:flex-1 [&>div]:py-2 [&>div]:text-center
36
+ const timeSelectorHeaderThemeVariants = cva(`
37
+ flex
38
+ text-xs font-semibold uppercase
39
+ bg-surface-muted text-foreground
40
+ border-b border-border-subtle
41
+ [&>div]:flex-1 [&>div]:py-2 [&>div]:text-center
40
42
  `);
41
- const timeSelectorInfoContainerVariants = cva(`
42
- flex items-center justify-between
43
- px-2 py-1 border-b border-input-border/40
44
- [&>span]:text-xs [&>span]:font-medium [&>span]:select-none
43
+ const timeSelectorInfoContainerThemeVariants = cva(`
44
+ flex items-center justify-between
45
+ px-2 py-1
46
+ border-b border-border-subtle
47
+ [&>span]:text-xs [&>span]:font-medium [&>span]:select-none
45
48
  `);
46
- const timeSelectorListContainerVariants = cva(`
47
- flex flex-row w-full relative overflow-hidden
49
+ const timeSelectorListContainerThemeVariants = cva(`
50
+ relative flex w-full flex-row overflow-hidden
48
51
  `);
49
- const timeSelectorListVariants = cva(`
50
- flex-1 overflow-y-auto h-full
51
- scrollbar-hide scroll-smooth
52
- snap-y snap-mandatory
53
- scrollbar-width:none
54
- select-none outline-none
55
- [&::-webkit-scrollbar]:hidden
56
- focus-visible:bg-accent
57
- focus-within:bg-accent
52
+ const timeSelectorListThemeVariants = cva(`
53
+ h-full flex-1 overflow-y-auto
54
+ [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
55
+ scrollbar-hide scroll-smooth
56
+ snap-y snap-mandatory
57
+ scrollbar-width:none
58
+ select-none outline-none
59
+ [&::-webkit-scrollbar]:hidden
60
+ focus-visible:bg-(--color-focus-surface)
61
+ focus-within:bg-(--color-focus-surface)
58
62
  `, {
59
63
  variants: {
60
64
  size: {
@@ -64,13 +68,14 @@ const timeSelectorListVariants = cva(`
64
68
  }
65
69
  }
66
70
  });
67
- const timeSelectorListItemVariants = cva(`
68
- flex items-center justify-center cursor-pointer
69
- snap-center relative z-10
71
+ const timeSelectorListItemThemeVariants = cva(`
72
+ relative z-10 flex cursor-pointer snap-center items-center justify-center
73
+ text-foreground
74
+ hover:bg-hover active:bg-active
70
75
  `, {
71
76
  variants: {
72
77
  selected: {
73
- true: "bg-primary text-primary-foreground",
78
+ true: "bg-active font-medium text-foreground hover:bg-active",
74
79
  false: ""
75
80
  },
76
81
  size: {
@@ -84,79 +89,19 @@ const timeSelectorListItemVariants = cva(`
84
89
  }
85
90
  });
86
91
 
87
- const timeSelectorBaseThemeVariants = (theme) => {
88
- switch (theme) {
89
- case "mona":
90
- return timeSelectorBaseVariants;
91
- default:
92
- return timeSelectorBaseVariants;
93
- }
94
- };
95
- const timeSelectorFooterThemeVariants = (theme) => {
96
- switch (theme) {
97
- case "mona":
98
- return timeSelectorFooterVariants;
99
- default:
100
- return timeSelectorFooterVariants;
101
- }
102
- };
103
- const timeSelectorHeaderThemeVariants = (theme) => {
104
- switch (theme) {
105
- case "mona":
106
- return timeSelectorHeaderVariants;
107
- default:
108
- return timeSelectorHeaderVariants;
109
- }
110
- };
111
- const timeSelectorInfoContainerThemeVariants = (theme) => {
112
- switch (theme) {
113
- case "mona":
114
- return timeSelectorInfoContainerVariants;
115
- default:
116
- return timeSelectorInfoContainerVariants;
117
- }
118
- };
119
- const timeSelectorListContainerThemeVariants = (theme) => {
120
- switch (theme) {
121
- case "mona":
122
- return timeSelectorListContainerVariants;
123
- default:
124
- return timeSelectorListContainerVariants;
125
- }
126
- };
127
- const timeSelectorListThemeVariants = (theme) => {
128
- switch (theme) {
129
- case "mona":
130
- return timeSelectorListVariants;
131
- default:
132
- return timeSelectorListVariants;
133
- }
134
- };
135
- const timeSelectorListItemThemeVariants = (theme) => {
136
- switch (theme) {
137
- case "mona":
138
- return timeSelectorListItemVariants;
139
- default:
140
- return timeSelectorListItemVariants;
141
- }
142
- };
143
-
144
92
  class TimeSelectorItemDirective {
145
93
  #destroyRef;
146
94
  #host;
147
95
  #scrollBehavior;
148
- #themeService;
149
96
  constructor() {
150
97
  this.#destroyRef = inject(DestroyRef);
151
98
  this.#host = inject((ElementRef));
152
99
  this.#scrollBehavior = signal("instant", /* @ts-ignore */
153
100
  ...(ngDevMode ? [{ debugName: "#scrollBehavior" }] : /* istanbul ignore next */ []));
154
- this.#themeService = inject(ThemeService);
155
101
  this.baseClass = computed(() => {
156
- const theme = this.#themeService.theme();
157
102
  const selected = this.selected();
158
103
  const size = this.size();
159
- return timeSelectorListItemThemeVariants(theme)({ selected, size });
104
+ return timeSelectorListItemThemeVariants({ selected, size });
160
105
  }, /* @ts-ignore */
161
106
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
162
107
  this.selected = input.required(/* @ts-ignore */
@@ -200,10 +145,9 @@ class TimeSelectorListDirective {
200
145
  return size === "small" ? 24 : size === "medium" ? 28 : 32; // TODO: Get rid of magic numbers
201
146
  }, /* @ts-ignore */
202
147
  ...(ngDevMode ? [{ debugName: "#itemHeight" }] : /* istanbul ignore next */ []));
203
- this.#themeService = inject(ThemeService);
204
148
  this.baseClass = computed(() => {
205
- const theme = this.#themeService.theme();
206
- return timeSelectorListThemeVariants(theme)();
149
+ const size = this.size();
150
+ return timeSelectorListThemeVariants({ size });
207
151
  }, /* @ts-ignore */
208
152
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
209
153
  this.listPadding = computed(() => {
@@ -220,7 +164,6 @@ class TimeSelectorListDirective {
220
164
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
221
165
  }
222
166
  #itemHeight;
223
- #themeService;
224
167
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
225
168
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TimeSelectorListDirective, isStandalone: true, selector: "ol[monaTimeSelectorList]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "class": "baseClass()", "style.padding-top.px": "listPadding()", "style.padding-bottom.px": "listPadding()", "attr.tabindex": "active() ? 0 : -1" } }, ngImport: i0 }); }
226
169
  }
@@ -242,14 +185,12 @@ class TimeSelectorComponent {
242
185
  #destroyRef;
243
186
  #height;
244
187
  #hostElementRef;
245
- #themeService;
246
188
  #timeSelectorService;
247
189
  constructor() {
248
190
  this.#destroyRef = inject(DestroyRef);
249
191
  this.#height = signal(0, /* @ts-ignore */
250
192
  ...(ngDevMode ? [{ debugName: "#height" }] : /* istanbul ignore next */ []));
251
193
  this.#hostElementRef = inject((ElementRef));
252
- this.#themeService = inject(ThemeService);
253
194
  this.#timeSelectorService = inject(TimeSelectorService, { optional: true });
254
195
  this.amMeridiemVisible = computed(() => {
255
196
  const min = this.min();
@@ -257,22 +198,19 @@ class TimeSelectorComponent {
257
198
  }, /* @ts-ignore */
258
199
  ...(ngDevMode ? [{ debugName: "amMeridiemVisible" }] : /* istanbul ignore next */ []));
259
200
  this.baseClass = computed(() => {
260
- const theme = this.#themeService.theme();
261
201
  const disabled = this.disabled();
262
- return timeSelectorBaseThemeVariants(theme)({ disabled });
202
+ return timeSelectorBaseThemeVariants({ disabled });
263
203
  }, /* @ts-ignore */
264
204
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
265
205
  this.computedPopupHeight = this.#height.asReadonly();
266
206
  this.focusedList = signal("hours", /* @ts-ignore */
267
207
  ...(ngDevMode ? [{ debugName: "focusedList" }] : /* istanbul ignore next */ []));
268
208
  this.footerClass = computed(() => {
269
- const theme = this.#themeService.theme();
270
- return timeSelectorFooterThemeVariants(theme)();
209
+ return timeSelectorFooterThemeVariants();
271
210
  }, /* @ts-ignore */
272
211
  ...(ngDevMode ? [{ debugName: "footerClass" }] : /* istanbul ignore next */ []));
273
212
  this.headerClass = computed(() => {
274
- const theme = this.#themeService.theme();
275
- return timeSelectorHeaderThemeVariants(theme)();
213
+ return timeSelectorHeaderThemeVariants();
276
214
  }, /* @ts-ignore */
277
215
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
278
216
  this.hour = computed(() => {
@@ -288,13 +226,11 @@ class TimeSelectorComponent {
288
226
  this.hourListRef = viewChild.required("hourList", /* @ts-ignore */
289
227
  ...(ngDevMode ? [{ debugName: "hourListRef" }] : /* istanbul ignore next */ []));
290
228
  this.infoContainerClass = computed(() => {
291
- const theme = this.#themeService.theme();
292
- return timeSelectorInfoContainerThemeVariants(theme)();
229
+ return timeSelectorInfoContainerThemeVariants();
293
230
  }, /* @ts-ignore */
294
231
  ...(ngDevMode ? [{ debugName: "infoContainerClass" }] : /* istanbul ignore next */ []));
295
232
  this.listContainerClass = computed(() => {
296
- const theme = this.#themeService.theme();
297
- return timeSelectorListContainerThemeVariants(theme)();
233
+ return timeSelectorListContainerThemeVariants();
298
234
  }, /* @ts-ignore */
299
235
  ...(ngDevMode ? [{ debugName: "listContainerClass" }] : /* istanbul ignore next */ []));
300
236
  this.maxDate = computed(() => {