@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
@@ -1,45 +1,43 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, computed, model, input, output, Component, Directive } from '@angular/core';
3
+ import { computed, model, input, output, Component, Directive } from '@angular/core';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { FormsModule } from '@angular/forms';
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 { themeControlSurfaceClasses } from '@nanahoshi/mona-ui/internal';
9
9
 
10
- const checkboxVariants = cva(`sr-only appearance-none outline-none peer`);
11
- const checkmarkVariants = cva(`
12
- flex items-center justify-center
13
- w-4.5 h-4.5 pl-0.25
14
- overflow-hidden outline-none
15
-
16
- bg-input-background border border-input-border
17
- cursor-pointer
18
-
19
- data-[disabled='true']:pointer-events-none
20
- data-[disabled='true']:cursor-not-allowed
21
- data-[disabled='true']:opacity-50
22
-
23
- peer-focus-visible:ring-2 peer-focus-visible:ring-primary/40
24
- peer-focus-visible:border-primary
25
-
26
- peer-checked:bg-primary
27
- peer-checked:text-primary-foreground
28
-
29
- peer-indeterminate:bg-primary
30
- peer-indeterminate:text-primary-foreground
31
- peer-indeterminate:after:content-['']
32
- peer-indeterminate:after:absolute
33
- peer-indeterminate:after:inset-[3px_0_3px_0]
34
- peer-indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
35
- peer-indeterminate:after:[mask-repeat:no-repeat]
36
- peer-indeterminate:after:[mask-size:contain]
37
- peer-indeterminate:after:bg-current
38
-
39
- [&.ng-touched.ng-invalid]:border-error
40
-
41
- data-[invalid='true']:border-error
42
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
10
+ const checkboxInputThemeVariants = cva(`sr-only appearance-none outline-none peer`);
11
+ const checkmarkThemeVariants = cva(`
12
+ flex items-center justify-center
13
+ h-4.5 w-4.5 pl-0.25
14
+ cursor-pointer overflow-hidden
15
+ ${themeControlSurfaceClasses}
16
+ border border-input-border
17
+ outline-none
18
+
19
+ peer-disabled:pointer-events-none peer-disabled:cursor-not-allowed
20
+ peer-disabled:border-disabled-border peer-disabled:bg-disabled-background peer-disabled:text-disabled-foreground
21
+
22
+ peer-checked:border-(--color-selected-border) peer-checked:bg-primary peer-checked:text-primary-foreground
23
+ peer-indeterminate:border-(--color-selected-border) peer-indeterminate:bg-primary peer-indeterminate:text-primary-foreground
24
+
25
+ peer-focus-visible:border-focus-indicator
26
+ peer-focus-visible:ring-2 peer-focus-visible:ring-focus-indicator/35
27
+
28
+ [&.ng-touched.ng-invalid]:border-error
29
+ data-[invalid='true']:border-error
30
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
31
+ data-[invalid='true']:peer-focus-visible:border-error
32
+ data-[invalid='true']:peer-focus-visible:ring-error/35
33
+
34
+ peer-indeterminate:after:absolute
35
+ peer-indeterminate:after:inset-[3px_0_3px_0]
36
+ peer-indeterminate:after:content-['']
37
+ peer-indeterminate:after:bg-current
38
+ peer-indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
39
+ peer-indeterminate:after:[mask-repeat:no-repeat]
40
+ peer-indeterminate:after:[mask-size:contain]
43
41
  `, {
44
42
  variants: {
45
43
  rounded: {
@@ -51,16 +49,12 @@ const checkmarkVariants = cva(`
51
49
  }
52
50
  }
53
51
  });
54
- const checkboxContainerLabelVariants = cva(`
55
- w-full h-full
56
- inline-flex items-center gap-2
57
- relative
58
-
59
- select-none
60
-
61
- data-[disabled='true']:pointer-events-none
62
- data-[disabled='true']:cursor-not-allowed
63
- data-[disabled='true']:opacity-50
52
+ const checkboxContainerLabelThemeVariants = cva(`
53
+ relative inline-flex h-full w-full items-center gap-2
54
+ select-none
55
+ data-[disabled='true']:pointer-events-none
56
+ data-[disabled='true']:cursor-not-allowed
57
+ data-[disabled='true']:text-disabled-foreground
64
58
  `, {
65
59
  variants: {
66
60
  labelSize: {
@@ -70,42 +64,42 @@ const checkboxContainerLabelVariants = cva(`
70
64
  }
71
65
  }
72
66
  });
73
- const checkboxDirectiveVariants = cva(`
74
- appearance-none outline-none
75
- w-4.5 h-4.5
76
- bg-input-background border border-input-border
77
- cursor-pointer
78
- relative
79
-
80
- disabled:pointer-events-none
81
- disabled:cursor-not-allowed
82
- disabled:opacity-50
83
-
84
- checked:text-primary-foreground
85
- indeterminate:text-primary-foreground
86
- indeterminate:bg-primary
87
- checked:bg-primary
88
-
89
- focus-visible:ring-2 focus-visible:ring-primary/40
90
- focus-visible:border-primary
91
-
92
- checked:after:content-['']
93
- checked:after:absolute
94
- checked:after:inset-[1px_0_0_1px]
95
- checked:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%206%209%2017l-5-5'/%3E%3C/svg%3E")]
96
- checked:after:[mask-repeat:no-repeat]
97
- checked:after:[mask-size:contain]
98
- checked:after:bg-current
99
-
100
- indeterminate:after:content-['']
101
- indeterminate:after:absolute
102
- indeterminate:after:inset-[1px_0_1px_1px]
103
- indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
104
- indeterminate:after:[mask-repeat:no-repeat]
105
- indeterminate:after:[mask-size:contain]
106
- indeterminate:after:bg-current
107
-
108
- [&.ng-touched.ng-invalid]:border-error
67
+ const checkboxDirectiveThemeVariants = cva(`
68
+ relative h-4.5 w-4.5
69
+ cursor-pointer appearance-none
70
+ ${themeControlSurfaceClasses}
71
+ border border-input-border
72
+ outline-none
73
+
74
+ disabled:pointer-events-none disabled:cursor-not-allowed
75
+ disabled:border-disabled-border disabled:bg-disabled-background disabled:text-disabled-foreground
76
+
77
+ checked:border-(--color-selected-border) checked:bg-primary checked:text-primary-foreground
78
+ indeterminate:border-(--color-selected-border) indeterminate:bg-primary indeterminate:text-primary-foreground
79
+
80
+ focus-visible:border-focus-indicator
81
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
82
+
83
+ checked:after:absolute
84
+ checked:after:inset-[1px_0_0_1px]
85
+ checked:after:content-['']
86
+ checked:after:bg-current
87
+ checked:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%206%209%2017l-5-5'/%3E%3C/svg%3E")]
88
+ checked:after:[mask-repeat:no-repeat]
89
+ checked:after:[mask-size:contain]
90
+
91
+ indeterminate:after:absolute
92
+ indeterminate:after:inset-[1px_0_1px_1px]
93
+ indeterminate:after:content-['']
94
+ indeterminate:after:bg-current
95
+ indeterminate:after:[mask-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012h14'%2F%3E%3C%2Fsvg%3E")]
96
+ indeterminate:after:[mask-repeat:no-repeat]
97
+ indeterminate:after:[mask-size:contain]
98
+
99
+ [&.ng-touched.ng-invalid]:border-error
100
+ [&.ng-touched.ng-invalid]:ring-2 [&.ng-touched.ng-invalid]:ring-error/35
101
+ [&.ng-touched.ng-invalid]:focus-visible:border-error
102
+ [&.ng-touched.ng-invalid]:focus-visible:ring-error/35
109
103
  `, {
110
104
  variants: {
111
105
  rounded: {
@@ -118,58 +112,21 @@ const checkboxDirectiveVariants = cva(`
118
112
  }
119
113
  });
120
114
 
121
- const checkboxInputThemeVariants = (theme) => {
122
- switch (theme) {
123
- case "mona":
124
- return checkboxVariants;
125
- default:
126
- return checkboxVariants;
127
- }
128
- };
129
- const checkmarkThemeVariants = (theme) => {
130
- switch (theme) {
131
- case "mona":
132
- return checkmarkVariants;
133
- default:
134
- return checkmarkVariants;
135
- }
136
- };
137
- const checkboxContainerLabelThemeVariants = (theme) => {
138
- switch (theme) {
139
- case "mona":
140
- return checkboxContainerLabelVariants;
141
- default:
142
- return checkboxContainerLabelVariants;
143
- }
144
- };
145
- const checkboxDirectiveThemeVariants = (theme) => {
146
- switch (theme) {
147
- case "mona":
148
- return checkboxDirectiveVariants;
149
- default:
150
- return checkboxDirectiveVariants;
151
- }
152
- };
153
-
154
115
  class CheckBoxComponent {
155
116
  constructor() {
156
- this.#themeService = inject(ThemeService);
157
117
  this.checkBoxClasses = computed(() => {
158
- const theme = this.#themeService.theme();
159
- return checkboxInputThemeVariants(theme)();
118
+ return checkboxInputThemeVariants();
160
119
  }, /* @ts-ignore */
161
120
  ...(ngDevMode ? [{ debugName: "checkBoxClasses" }] : /* istanbul ignore next */ []));
162
121
  this.checkMarkClasses = computed(() => {
163
- const theme = this.#themeService.theme();
164
122
  const rounded = this.rounded();
165
- return checkmarkThemeVariants(theme)({ rounded });
123
+ return checkmarkThemeVariants({ rounded });
166
124
  }, /* @ts-ignore */
167
125
  ...(ngDevMode ? [{ debugName: "checkMarkClasses" }] : /* istanbul ignore next */ []));
168
126
  this.containerLabelClasses = computed(() => {
169
- const theme = this.#themeService.theme();
170
127
  const labelSize = this.labelSize();
171
128
  const classes = this.userClass();
172
- const variantClasses = checkboxContainerLabelThemeVariants(theme)({ labelSize });
129
+ const variantClasses = checkboxContainerLabelThemeVariants({ labelSize });
173
130
  return twMerge(variantClasses, classes);
174
131
  }, /* @ts-ignore */
175
132
  ...(ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []));
@@ -265,7 +222,6 @@ class CheckBoxComponent {
265
222
  */
266
223
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
267
224
  }
268
- #themeService;
269
225
  onCheckedChange(checked) {
270
226
  this.checked.set(checked);
271
227
  }
@@ -278,7 +234,7 @@ class CheckBoxComponent {
278
234
  this.touch.emit();
279
235
  }
280
236
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
281
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CheckBoxComponent, isStandalone: true, selector: "mona-check-box", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", 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 }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", 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 } }, outputs: { checked: "checkedChange", inputBlur: "inputBlur", inputChange: "inputChange", inputFocus: "inputFocus", touch: "touch" }, host: { properties: { "class": "'flex'", "attr.data-checked": "checked()", "attr.data-disabled": "disabled()", "attr.data-indeterminate": "indeterminate()" } }, ngImport: i0, template: "<label [class]=\"containerLabelClasses()\" [attr.data-disabled]=\"disabled()\">\r\n @if (labelPosition() === \"before\") {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n\r\n <input\r\n type=\"checkbox\"\r\n [disabled]=\"disabled()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [required]=\"required()\"\r\n [ngModel]=\"checked()\"\r\n [tabindex]=\"disabled() ? -1 : tabIndex()\"\r\n [class]=\"checkBoxClasses()\"\r\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : null\"\r\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\r\n [attr.aria-label]=\"label() || null\"\r\n (change)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (focus)=\"inputFocus.emit($event)\"\r\n (ngModelChange)=\"onCheckedChange($event)\"\r\n #checkBox />\r\n\r\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\r\n @if (checked()) {\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n class=\"lucide lucide-check stroke-primary-foreground\">\r\n <path d=\"M18 6 9 17l-5-5\" />\r\n </svg>\r\n }\r\n </span>\r\n @if (labelPosition() === \"after\") {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n</label>\r\n\r\n<ng-template #labelTemplate>\r\n @if (label()) {\r\n <span>{{ label() }}</span>\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
237
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CheckBoxComponent, isStandalone: true, selector: "mona-check-box", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", 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 }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", 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 } }, outputs: { checked: "checkedChange", inputBlur: "inputBlur", inputChange: "inputChange", inputFocus: "inputFocus", touch: "touch" }, host: { properties: { "class": "'flex'", "attr.data-checked": "checked()", "attr.data-disabled": "disabled()", "attr.data-indeterminate": "indeterminate()" } }, ngImport: i0, template: "<label [class]=\"containerLabelClasses()\" [attr.data-disabled]=\"disabled()\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [disabled]=\"disabled()\"\n [indeterminate]=\"indeterminate()\"\n [required]=\"required()\"\n [ngModel]=\"checked()\"\n [tabindex]=\"disabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"label() || null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (ngModelChange)=\"onCheckedChange($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
282
238
  }
283
239
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckBoxComponent, decorators: [{
284
240
  type: Component,
@@ -287,16 +243,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
287
243
  "[attr.data-checked]": "checked()",
288
244
  "[attr.data-disabled]": "disabled()",
289
245
  "[attr.data-indeterminate]": "indeterminate()"
290
- }, template: "<label [class]=\"containerLabelClasses()\" [attr.data-disabled]=\"disabled()\">\r\n @if (labelPosition() === \"before\") {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n\r\n <input\r\n type=\"checkbox\"\r\n [disabled]=\"disabled()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [required]=\"required()\"\r\n [ngModel]=\"checked()\"\r\n [tabindex]=\"disabled() ? -1 : tabIndex()\"\r\n [class]=\"checkBoxClasses()\"\r\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : null\"\r\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\r\n [attr.aria-label]=\"label() || null\"\r\n (change)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (focus)=\"inputFocus.emit($event)\"\r\n (ngModelChange)=\"onCheckedChange($event)\"\r\n #checkBox />\r\n\r\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\r\n @if (checked()) {\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n class=\"lucide lucide-check stroke-primary-foreground\">\r\n <path d=\"M18 6 9 17l-5-5\" />\r\n </svg>\r\n }\r\n </span>\r\n @if (labelPosition() === \"after\") {\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\r\n }\r\n</label>\r\n\r\n<ng-template #labelTemplate>\r\n @if (label()) {\r\n <span>{{ label() }}</span>\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n</ng-template>\r\n" }]
246
+ }, template: "<label [class]=\"containerLabelClasses()\" [attr.data-disabled]=\"disabled()\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [disabled]=\"disabled()\"\n [indeterminate]=\"indeterminate()\"\n [required]=\"required()\"\n [ngModel]=\"checked()\"\n [tabindex]=\"disabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"label() || null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (ngModelChange)=\"onCheckedChange($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n" }]
291
247
  }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSize", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", 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 }] }] } });
292
248
 
293
249
  class CheckboxDirective {
294
250
  constructor() {
295
- this.#themeService = inject(ThemeService);
296
251
  this.classes = computed(() => {
297
- const theme = this.#themeService.theme();
298
252
  const rounded = this.rounded();
299
- const variantClasses = checkboxDirectiveThemeVariants(theme)({ rounded });
253
+ const variantClasses = checkboxDirectiveThemeVariants({ rounded });
300
254
  const userClass = this.userClass();
301
255
  return twMerge(variantClasses, userClass);
302
256
  }, /* @ts-ignore */
@@ -313,7 +267,6 @@ class CheckboxDirective {
313
267
  */
314
268
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
315
269
  }
316
- #themeService;
317
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckboxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
318
271
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: CheckboxDirective, isStandalone: true, selector: "input[type='checkbox'][monaCheckbox]", inputs: { 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": "classes()" } }, ngImport: i0 }); }
319
272
  }