@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
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-auto-complete.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-auto-complete.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-avatar.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-avatar.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-breadcrumb.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-breadcrumb.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-button.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-button.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-button-group.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-button-group.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-calendar.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-calendar.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-check-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-check-box.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-chip.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-chip.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-circular-progress-bar.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-color-gradient.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-color-gradient.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-color-palette.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-color-palette.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-color-picker.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-color-picker.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-combo-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-combo-box.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-common.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-common.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-contextmenu.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-contextmenu.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-date-input.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-date-input.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-date-picker.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-date-picker.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-datetime-picker.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-datetime-picker.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-dialog.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-dialog.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-dropdown-button.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-dropdown-button.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-dropdown-list.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-dropdown-list.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-dropdowns.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-dropdowns.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-editor.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-editor.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-expansion-panel.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-expansion-panel.d.ts"
4
+ }
@@ -4,37 +4,41 @@ import { inject, DestroyRef, ElementRef, computed, linkedSignal, contentChild, T
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import * as i2 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
- import { createElementControlId, rxTimeout } from '@nanahoshi/mona-ui/internal';
7
+ import { themeControlSurfaceClasses, createElementControlId, rxTimeout } from '@nanahoshi/mona-ui/internal';
8
8
  import { FilterChangeEvent } from '@nanahoshi/mona-ui/common';
9
9
  import { IndicatorIconComponent } from '@nanahoshi/mona-ui/internal/indicator-icon';
10
10
  import { ListService, ListComponent, ListGroupHeaderTemplateDirective, ListFooterTemplateDirective, ListHeaderTemplateDirective, ListNoDataTemplateDirective, ListItemTemplateDirective } from '@nanahoshi/mona-ui/internal/list';
11
11
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
12
12
  import { DropdownService, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, dropdownPopupThemeVariants, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownSuffixTemplateDirective, DropdownLiveRegionDirective, DropdownDataInputToken, DropdownPopupInputToken, DropdownDataHandlerDirective, DropdownListPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
13
13
  import { TextBoxDirective } from '@nanahoshi/mona-ui/text-box';
14
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
15
14
  import { Subject, filter, debounceTime, identity, take, tap } from 'rxjs';
16
15
  import { twMerge } from 'tailwind-merge';
17
16
  import { cva } from 'class-variance-authority';
18
17
 
19
- const autoCompleteBaseVariants = cva(`
18
+ const autoCompleteBaseThemeVariants = cva(`
20
19
  flex
21
- border border-input-border outline-none
22
- bg-background shadow-xs text-foreground
23
- focus-within:ring-1 focus-within:ring-primary/40
24
- transition-[color,box-shadow,border] ease-in-out duration-300
20
+ ${themeControlSurfaceClasses} text-foreground
21
+ border border-input-border shadow-(--shadow-control) outline-none
22
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
23
+ data-[readonly='true']:cursor-default
24
+ focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
25
25
  `, {
26
26
  variants: {
27
27
  disabled: {
28
- true: "pointer-events-none opacity-50 cursor-not-allowed"
28
+ true: `
29
+ pointer-events-none cursor-not-allowed
30
+ bg-disabled-background text-disabled-foreground
31
+ border-disabled-border shadow-none
32
+ `
29
33
  },
30
34
  expanded: {
31
- true: "ring-1 ring-primary/40"
35
+ true: "border-focus-indicator ring-2 ring-focus-indicator/35"
32
36
  },
33
37
  focused: {
34
- true: "ring-1 ring-primary/40"
38
+ true: "border-focus-indicator ring-2 ring-focus-indicator/35"
35
39
  },
36
40
  invalid: {
37
- true: "border-error ring-1 ring-error/40",
41
+ true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
38
42
  false: ""
39
43
  },
40
44
  rounded: {
@@ -50,6 +54,18 @@ const autoCompleteBaseVariants = cva(`
50
54
  small: "h-8 text-xs"
51
55
  }
52
56
  },
57
+ compoundVariants: [
58
+ {
59
+ expanded: true,
60
+ invalid: true,
61
+ class: "border-error ring-error/35"
62
+ },
63
+ {
64
+ focused: true,
65
+ invalid: true,
66
+ class: "border-error ring-error/35"
67
+ }
68
+ ],
53
69
  defaultVariants: {
54
70
  disabled: false,
55
71
  focused: false,
@@ -58,10 +74,9 @@ const autoCompleteBaseVariants = cva(`
58
74
  size: "medium"
59
75
  }
60
76
  });
61
- const autoCompleteTextInputVariants = cva(`
62
- border-none outline-none
63
- bg-transparent shadow-none
64
- px-2 h-full w-full text-ellipsis
77
+ const autoCompleteTextInputThemeVariants = cva(`
78
+ h-full w-full px-2 text-ellipsis
79
+ bg-transparent border-none shadow-none outline-none
65
80
  focus-within:ring-0 focus-visible:ring-0
66
81
  `, {
67
82
  variants: {
@@ -74,32 +89,7 @@ const autoCompleteTextInputVariants = cva(`
74
89
  }
75
90
  }
76
91
  });
77
- const autoCompleteAffixContainerVariants = cva(`h-full flex flex-none items-center justify-center`);
78
-
79
- const autoCompleteBaseThemeVariants = (theme) => {
80
- switch (theme) {
81
- case "mona":
82
- return autoCompleteBaseVariants;
83
- default:
84
- return autoCompleteBaseVariants;
85
- }
86
- };
87
- const autoCompleteTextInputThemeVariants = (theme) => {
88
- switch (theme) {
89
- case "mona":
90
- return autoCompleteTextInputVariants;
91
- default:
92
- return autoCompleteTextInputVariants;
93
- }
94
- };
95
- const autoCompleteAffixContainerThemeVariants = (theme) => {
96
- switch (theme) {
97
- case "mona":
98
- return autoCompleteAffixContainerVariants;
99
- default:
100
- return autoCompleteAffixContainerVariants;
101
- }
102
- };
92
+ const autoCompleteAffixContainerThemeVariants = cva(`flex h-full flex-none items-center justify-center`);
103
93
 
104
94
  class AutoCompleteComponent {
105
95
  #destroyRef;
@@ -107,36 +97,32 @@ class AutoCompleteComponent {
107
97
  #hostElementRef;
108
98
  #listService;
109
99
  #popupRef;
110
- #themeService;
111
100
  constructor() {
112
101
  this.#destroyRef = inject(DestroyRef);
113
102
  this.#dropdownService = inject(DropdownService);
114
103
  this.#hostElementRef = inject((ElementRef));
115
104
  this.#listService = inject(ListService);
116
105
  this.#popupRef = this.#dropdownService.popupRef;
117
- this.#themeService = inject(ThemeService);
118
106
  this.activeDescendant = computed(() => {
119
107
  const highlightedItem = this.#listService.highlightedItem();
120
108
  return highlightedItem ? highlightedItem.uid : null;
121
109
  }, /* @ts-ignore */
122
110
  ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
123
111
  this.affixClass = computed(() => {
124
- const theme = this.#themeService.theme();
125
- return autoCompleteAffixContainerThemeVariants(theme)();
112
+ return autoCompleteAffixContainerThemeVariants();
126
113
  }, /* @ts-ignore */
127
114
  ...(ngDevMode ? [{ debugName: "affixClass" }] : /* istanbul ignore next */ []));
128
115
  this.autoCompleteValue = linkedSignal(() => this.value() ?? "", /* @ts-ignore */
129
116
  ...(ngDevMode ? [{ debugName: "autoCompleteValue" }] : /* istanbul ignore next */ []));
130
117
  this.autoCompleteValue$ = new Subject();
131
118
  this.baseClass = computed(() => {
132
- const theme = this.#themeService.theme();
133
119
  const disabled = this.disabled();
134
120
  const expanded = this.expanded();
135
121
  const focused = this.#popupRef() !== null;
136
122
  const invalid = this.invalidState();
137
123
  const rounded = this.rounded();
138
124
  const size = this.size();
139
- const variantClass = autoCompleteBaseThemeVariants(theme)({
125
+ const variantClass = autoCompleteBaseThemeVariants({
140
126
  disabled,
141
127
  expanded,
142
128
  focused,
@@ -157,9 +143,8 @@ class AutoCompleteComponent {
157
143
  this.headerTemplate = contentChild(DropdownHeaderTemplateDirective, { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
158
144
  this.id = createElementControlId();
159
145
  this.inputClass = computed(() => {
160
- const theme = this.#themeService.theme();
161
146
  const rounded = this.rounded();
162
- return autoCompleteTextInputThemeVariants(theme)({ rounded });
147
+ return autoCompleteTextInputThemeVariants({ rounded });
163
148
  }, /* @ts-ignore */
164
149
  ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
165
150
  this.itemTemplate = contentChild(DropdownItemTemplateDirective, { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
@@ -169,11 +154,10 @@ class AutoCompleteComponent {
169
154
  ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
170
155
  this.listId = createElementControlId();
171
156
  this.listPopupClass = computed(() => {
172
- const theme = this.#themeService.theme();
173
157
  const rounded = this.rounded();
174
158
  const size = this.size();
175
159
  const userClass = this.popupClass();
176
- const variantClass = dropdownPopupThemeVariants(theme)({ rounded, size });
160
+ const variantClass = dropdownPopupThemeVariants({ rounded, size });
177
161
  return twMerge(variantClass, userClass);
178
162
  }, /* @ts-ignore */
179
163
  ...(ngDevMode ? [{ debugName: "listPopupClass" }] : /* istanbul ignore next */ []));
@@ -521,7 +505,7 @@ class AutoCompleteComponent {
521
505
  this.value.set(value);
522
506
  }
523
507
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AutoCompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
524
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AutoCompleteComponent, isStandalone: true, selector: "mona-auto-complete", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, highlightFirst: { classPropertyName: "highlightFirst", publicName: "highlightFirst", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", 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 }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { properties: { "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.data-disabled": "disabled()", "attr.data-invalid": "invalidState() || null", "attr.tabindex": "-1", "class": "baseClass()" } }, providers: [
508
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AutoCompleteComponent, isStandalone: true, selector: "mona-auto-complete", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, highlightFirst: { classPropertyName: "highlightFirst", publicName: "highlightFirst", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", 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 }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { properties: { "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.data-disabled": "disabled() || null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.tabindex": "-1", "class": "baseClass()" } }, providers: [
525
509
  ListService,
526
510
  DropdownService,
527
511
  {
@@ -569,8 +553,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
569
553
  "[attr.aria-invalid]": "invalidState() ? true : undefined",
570
554
  "[attr.aria-readonly]": "readonly() ? true : undefined",
571
555
  "[attr.aria-required]": "required() ? true : undefined",
572
- "[attr.data-disabled]": "disabled()",
556
+ "[attr.data-disabled]": "disabled() || null",
573
557
  "[attr.data-invalid]": "invalidState() || null",
558
+ "[attr.data-readonly]": "readonly() || null",
574
559
  "[attr.tabindex]": "-1",
575
560
  "[class]": "baseClass()"
576
561
  }, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<input\n monaTextBox\n role=\"combobox\"\n [class]=\"inputClass()\"\n [disabled]=\"disabled()\"\n [id]=\"id\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [ngModel]=\"autoCompleteValue()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-busy]=\"loading()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-describedby]=\"ariaDescribedBy() || undefined\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-invalid]=\"invalidState() || undefined\"\n [attr.aria-label]=\"effectiveAriaLabel() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || undefined\"\n (ngModelChange)=\"autoCompleteValue$.next($event)\"\n (blur)=\"onInputBlur()\" />\n\n@if (showClearButton() && autoCompleteValue() && !loading()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n label=\"Clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n@if (suffixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"suffixTemplate()\"></ng-container>\n </span>\n}\n\n<span monaDropdownLiveRegion></span>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\">\n <mona-list (itemSelect)=\"onItemSelect($event)\" [focusOnMount]=\"false\" [size]=\"size()\" [listId]=\"listId\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n" }]
@@ -1,36 +1,34 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, computed, input, Directive, output, viewChild, TemplateRef, Component, contentChildren, contentChild } from '@angular/core';
3
+ import { computed, input, Directive, output, viewChild, TemplateRef, Component, contentChildren, contentChild } from '@angular/core';
4
4
  import { LucideChevronRight } from '@lucide/angular';
5
5
  import { twMerge } from 'tailwind-merge';
6
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
7
6
  import { cva } from 'class-variance-authority';
8
7
 
9
- const breadcrumbListVariants = cva(`
10
- flex items-center
11
- overflow-hidden gap-1
12
- list-none select-none py-1 px-2
8
+ const breadcrumbListThemeVariants = cva(`
9
+ flex list-none items-center gap-1 overflow-hidden px-2 py-1
10
+ select-none
13
11
  `, {
14
12
  variants: {
15
13
  disabled: {
16
- true: "cursor-not-allowed pointer-events-none opacity-50",
14
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
17
15
  false: ""
18
16
  }
19
17
  }
20
18
  });
21
- const breadcrumbListItemVariants = cva(`
22
- flex items-center
23
- truncate cursor-pointer
24
- h-full text-primary/70
25
- bg-transparent border-0
26
- outline-none rounded-sm px-1
27
- hover:text-primary
28
- focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40
19
+ const breadcrumbListItemThemeVariants = cva(`
20
+ flex h-full items-center truncate px-1
21
+ cursor-pointer
22
+ text-muted-foreground
23
+ bg-transparent border-0 rounded-sm outline-none
29
24
  transition-colors duration-100 ease-in-out
25
+ hover:bg-hover hover:text-foreground
26
+ active:bg-active active:text-foreground
27
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
30
28
  `, {
31
29
  variants: {
32
30
  disabled: {
33
- true: "cursor-not-allowed pointer-events-none",
31
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
34
32
  false: ""
35
33
  },
36
34
  listDisabled: {
@@ -38,48 +36,21 @@ const breadcrumbListItemVariants = cva(`
38
36
  false: ""
39
37
  }
40
38
  },
41
- compoundVariants: [{ disabled: true, listDisabled: false, class: "opacity-50" }],
39
+ compoundVariants: [{ disabled: true, listDisabled: false, class: "text-disabled-foreground" }],
42
40
  defaultVariants: {
43
41
  disabled: false,
44
42
  listDisabled: false
45
43
  }
46
44
  });
47
- const breadcrumbCurrentItemVariants = cva(`flex items-center truncate cursor-default font-medium text-primary`);
48
-
49
- const breadcrumbListThemeVariants = (theme) => {
50
- switch (theme) {
51
- case "mona":
52
- return breadcrumbListVariants;
53
- default:
54
- return breadcrumbListVariants;
55
- }
56
- };
57
- const breadcrumbListItemThemeVariants = (theme) => {
58
- switch (theme) {
59
- case "mona":
60
- return breadcrumbListItemVariants;
61
- default:
62
- return breadcrumbListItemVariants;
63
- }
64
- };
65
- const breadcrumbCurrentItemThemeVariants = (theme) => {
66
- switch (theme) {
67
- case "mona":
68
- return breadcrumbCurrentItemVariants;
69
- default:
70
- return breadcrumbCurrentItemVariants;
71
- }
72
- };
45
+ const breadcrumbCurrentItemThemeVariants = cva(`flex cursor-default items-center truncate font-medium text-foreground`);
73
46
 
74
47
  class BreadcrumbItemDirective {
75
48
  constructor() {
76
- this.#themeService = inject(ThemeService);
77
49
  this.baseClass = computed(() => {
78
- const theme = this.#themeService.theme();
79
50
  const disabled = this.disabled();
80
51
  const listDisabled = this.listDisabled();
81
52
  const userClass = this.userClass();
82
- return twMerge(breadcrumbListItemThemeVariants(theme)({ disabled, listDisabled }), userClass);
53
+ return twMerge(breadcrumbListItemThemeVariants({ disabled, listDisabled }), userClass);
83
54
  }, /* @ts-ignore */
84
55
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
85
56
  /**
@@ -100,7 +71,6 @@ class BreadcrumbItemDirective {
100
71
  */
101
72
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
102
73
  }
103
- #themeService;
104
74
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
105
75
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: BreadcrumbItemDirective, isStandalone: true, selector: "button[monaBreadcrumbItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, listDisabled: { classPropertyName: "listDisabled", publicName: "listDisabled", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "disabled": "disabled()" } }, ngImport: i0 }); }
106
76
  }
@@ -153,19 +123,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
153
123
 
154
124
  class BreadcrumbComponent {
155
125
  constructor() {
156
- this.#themeService = inject(ThemeService);
157
126
  this.itemComponents = contentChildren(BreadcrumbItemComponent, /* @ts-ignore */
158
127
  ...(ngDevMode ? [{ debugName: "itemComponents" }] : /* istanbul ignore next */ []));
159
128
  this.currentItemClass = computed(() => {
160
- const theme = this.#themeService.theme();
161
- return breadcrumbCurrentItemThemeVariants(theme)();
129
+ return breadcrumbCurrentItemThemeVariants();
162
130
  }, /* @ts-ignore */
163
131
  ...(ngDevMode ? [{ debugName: "currentItemClass" }] : /* istanbul ignore next */ []));
164
132
  this.listClass = computed(() => {
165
- const theme = this.#themeService.theme();
166
133
  const disabled = this.disabled();
167
134
  const userClass = this.userClass();
168
- const variantClass = breadcrumbListThemeVariants(theme)({ disabled });
135
+ const variantClass = breadcrumbListThemeVariants({ disabled });
169
136
  return twMerge(variantClass, userClass);
170
137
  }, /* @ts-ignore */
171
138
  ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
@@ -188,7 +155,6 @@ class BreadcrumbComponent {
188
155
  */
189
156
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
190
157
  }
191
- #themeService;
192
158
  onItemClick(item) {
193
159
  if (this.disabled() || item.disabled()) {
194
160
  return;
@@ -2,31 +2,32 @@ import * as i0 from '@angular/core';
2
2
  import { inject, DestroyRef, computed, contentChildren, input, model, effect, untracked, afterNextRender, Component } from '@angular/core';
3
3
  import { outputFromObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
4
4
  import { ButtonService, ButtonDirective } from '@nanahoshi/mona-ui/button';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { map, pairwise } from 'rxjs';
7
6
  import { twMerge } from 'tailwind-merge';
8
7
  import { cva } from 'class-variance-authority';
9
8
 
10
- const buttonGroupVariants = cva(`
9
+ const buttonGroupThemeVariants = cva(`
11
10
  inline-flex items-center justify-center
12
- border border-border shadow-xs
11
+ border border-input-border
13
12
  [&>button]:border-0
13
+ [&>button]:shadow-none
14
+ [&>button:not(:last-child)]:border-r
15
+ [&>button:not(:last-child)]:border-border-subtle
16
+ [&>button]:rounded-none
14
17
  [&>button]:focus-visible:ring-2
15
18
  [&>button]:focus-visible:z-10
16
- [&>button]:rounded-none
17
- [&>button]:shadow-none
18
19
  `, {
19
20
  variants: {
20
21
  look: {
21
22
  default: "",
22
- error: "",
23
- ghost: "border-transparent",
24
- info: "",
25
- outline: "[&>button:not(:last-child)]:border-r",
26
- primary: "",
27
- secondary: "",
28
- success: "",
29
- warning: ""
23
+ error: "border-transparent",
24
+ ghost: "border-transparent [&>button:not(:last-child)]:border-r-0",
25
+ info: "border-transparent",
26
+ outline: "",
27
+ primary: "border-transparent",
28
+ secondary: "border-transparent",
29
+ success: "border-transparent",
30
+ warning: "border-transparent"
30
31
  },
31
32
  rounded: {
32
33
  full: `
@@ -65,29 +66,17 @@ const buttonGroupVariants = cva(`
65
66
  }
66
67
  });
67
68
 
68
- const buttonGroupThemeVariants = (theme) => {
69
- switch (theme) {
70
- case "mona":
71
- return buttonGroupVariants;
72
- default:
73
- return buttonGroupVariants;
74
- }
75
- };
76
-
77
69
  class ButtonGroupComponent {
78
70
  #buttonService;
79
71
  #destroyRef;
80
- #themeService;
81
72
  constructor() {
82
73
  this.#buttonService = inject(ButtonService, { self: true });
83
74
  this.#destroyRef = inject(DestroyRef);
84
- this.#themeService = inject(ThemeService);
85
75
  this.baseClass = computed(() => {
86
- const theme = this.#themeService.theme();
87
76
  const look = this.look();
88
77
  const rounded = this.rounded();
89
78
  const size = this.size();
90
- const variantClasses = buttonGroupThemeVariants(theme)({ look, rounded, size });
79
+ const variantClasses = buttonGroupThemeVariants({ look, rounded, size });
91
80
  const userClass = this.userClass();
92
81
  return twMerge(variantClasses, userClass);
93
82
  }, /* @ts-ignore */