@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
@@ -4,10 +4,10 @@ import { Directive, inject, DestroyRef, ElementRef, computed, contentChild, Temp
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { LucideCircleX } from '@lucide/angular';
6
6
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
7
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
8
7
  import { fromEvent, filter } from 'rxjs';
9
8
  import { twMerge } from 'tailwind-merge';
10
9
  import { cva } from 'class-variance-authority';
10
+ import { themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
11
11
 
12
12
  /**
13
13
  * @description Apply to an `<ng-template>` directly inside `<mona-chip>` to render prefix content
@@ -24,11 +24,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
24
24
  }]
25
25
  }] });
26
26
 
27
- const chipVariants = cva(`
28
- inline-flex items-center justify-between gap-1.5
29
- text-xs font-medium cursor-pointer shrink-0
30
- outline-none shadow-xs
31
- transition-colors duration-200 ease-in-out
27
+ const chipThemeVariants = cva(`
28
+ inline-flex shrink-0 items-center justify-between gap-1.5
29
+ cursor-pointer text-xs font-medium
30
+ shadow-(--shadow-control) outline-none
31
+ transition-colors duration-(--mona-motion-fast) ease-in-out
32
32
  `, {
33
33
  variants: {
34
34
  disabled: {
@@ -36,59 +36,61 @@ const chipVariants = cva(`
36
36
  false: ""
37
37
  },
38
38
  look: {
39
- default: `
40
- bg-background text-foreground
41
- border border-border
42
- hover:bg-hover hover:text-accent-foreground
43
- active:bg-active active:text-accent-foreground
44
- focus-visible:ring-2 focus-visible:ring-primary/40
39
+ default: `
40
+ ${themeRaisedSurfaceClasses} text-foreground
41
+ border border-border
42
+ hover:bg-hover hover:text-foreground
43
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
44
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
45
45
  `,
46
- primary: `
47
- bg-primary text-primary-foreground
48
- hover:bg-primary-hover hover:text-primary-foreground
49
- active:bg-primary-active active:text-primary-foreground
50
- focus-visible:ring-2 focus-visible:ring-primary/40
46
+ primary: `
47
+ bg-primary text-primary-foreground
48
+ hover:bg-primary-hover hover:text-primary-foreground
49
+ active:bg-primary-active active:text-primary-foreground
50
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
51
51
  `,
52
- success: `
53
- bg-success text-success-foreground
54
- hover:bg-success-hover hover:text-success-foreground
55
- active:bg-success-active active:text-success-foreground
56
- focus-visible:ring-2 focus-visible:ring-success/40
52
+ success: `
53
+ bg-success text-success-foreground
54
+ hover:bg-success-hover hover:text-success-foreground
55
+ active:bg-success-active active:text-success-foreground
56
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
57
57
  `,
58
- error: `
59
- bg-error text-error-foreground
60
- hover:bg-error-hover hover:text-error-foreground
61
- active:bg-error-active active:text-error-foreground
62
- focus-visible:ring-2 focus-visible:ring-error/40
58
+ error: `
59
+ bg-error text-error-foreground
60
+ hover:bg-error-hover hover:text-error-foreground
61
+ active:bg-error-active active:text-error-foreground
62
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
63
63
  `,
64
- warning: `
65
- bg-warning text-warning-foreground
66
- hover:bg-warning-hover hover:text-warning-foreground
67
- active:bg-warning-active active:text-warning-foreground
68
- focus-visible:ring-2 focus-visible:ring-warning/40
64
+ warning: `
65
+ bg-warning text-warning-foreground
66
+ hover:bg-warning-hover hover:text-warning-foreground
67
+ active:bg-warning-active active:text-warning-foreground
68
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
69
69
  `,
70
- info: `
71
- bg-info text-info-foreground
72
- hover:bg-info-hover hover:text-info-foreground
73
- active:bg-info-active active:text-info-foreground
74
- focus-visible:ring-2 focus-visible:ring-info/40
70
+ info: `
71
+ bg-info text-info-foreground
72
+ hover:bg-info-hover hover:text-info-foreground
73
+ active:bg-info-active active:text-info-foreground
74
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
75
75
  `,
76
- outline: `
77
- border border-border
78
- hover:bg-accent hover:text-accent-foreground
79
- active:bg-accent-dark active:text-accent-foreground
80
- focus-visible:ring-2 focus-visible:ring-primary/40
76
+ outline: `
77
+ bg-transparent text-foreground
78
+ border border-input-border
79
+ hover:bg-hover hover:text-foreground
80
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
81
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
81
82
  `,
82
- secondary: `
83
- bg-secondary text-secondary-foreground
84
- hover:bg-secondary-hover hover:text-secondary-foreground
85
- active:bg-secondary-active active:text-secondary-foreground
86
- focus-visible:ring-2 focus-visible:ring-primary/40
83
+ secondary: `
84
+ bg-secondary text-secondary-foreground
85
+ hover:bg-secondary-hover hover:text-secondary-foreground
86
+ active:bg-secondary-active active:text-secondary-foreground
87
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
87
88
  `,
88
- ghost: `
89
- hover:bg-secondary-hover hover:text-secondary-foreground
90
- active:bg-secondary-active active:text-secondary-foreground
91
- focus-visible:ring-2 focus-visible:ring-primary/40
89
+ ghost: `
90
+ bg-transparent text-foreground shadow-none
91
+ hover:bg-hover hover:text-foreground
92
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
93
+ focus-visible:ring-2 focus-visible:ring-focus-indicator/35
92
94
  `
93
95
  },
94
96
  rounded: {
@@ -99,20 +101,20 @@ const chipVariants = cva(`
99
101
  small: "rounded-sm"
100
102
  },
101
103
  size: {
102
- small: `
103
- ps-1 pe-1 py-0.5
104
- [&_button[data-chip-remove='true']]:w-3
105
- [&_button[data-chip-remove='true']]:h-3
104
+ small: `
105
+ ps-1 pe-1 py-0.5
106
+ [&_button[data-chip-remove='true']]:w-3
107
+ [&_button[data-chip-remove='true']]:h-3
106
108
  `,
107
- medium: `
108
- ps-1.5 pe-1.5 py-1
109
- [&_button[data-chip-remove='true']]:w-4
110
- [&_button[data-chip-remove='true']]:h-4
109
+ medium: `
110
+ ps-1.5 pe-1.5 py-1
111
+ [&_button[data-chip-remove='true']]:w-4
112
+ [&_button[data-chip-remove='true']]:h-4
111
113
  `,
112
- large: `
113
- ps-2 pe-2 py-1.5
114
- [&_button[data-chip-remove='true']]:w-5
115
- [&_button[data-chip-remove='true']]:h-5
114
+ large: `
115
+ ps-2 pe-2 py-1.5
116
+ [&_button[data-chip-remove='true']]:w-5
117
+ [&_button[data-chip-remove='true']]:h-5
116
118
  `
117
119
  },
118
120
  selected: {
@@ -124,82 +126,82 @@ const chipVariants = cva(`
124
126
  {
125
127
  look: "default",
126
128
  selected: true,
127
- class: `
128
- bg-selected text-foreground
129
- hover:bg-selected/95 hover:text-foreground
130
- active:bg-selected/100 active:text-foreground
129
+ class: `
130
+ bg-(--color-selected) text-(--color-selected-foreground)
131
+ hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
132
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
131
133
  `
132
134
  },
133
135
  {
134
136
  look: "primary",
135
137
  selected: true,
136
- class: `
137
- bg-primary-selected text-primary-foreground
138
- hover:bg-primary-selected/95 hover:text-primary-foreground
139
- active:bg-primary-selected/100 active:text-primary-foreground
138
+ class: `
139
+ bg-primary-selected text-primary-foreground
140
+ hover:bg-primary-selected/95 hover:text-primary-foreground
141
+ active:bg-primary-selected/100 active:text-primary-foreground
140
142
  `
141
143
  },
142
144
  {
143
145
  look: "secondary",
144
146
  selected: true,
145
- class: `
146
- bg-secondary-selected text-secondary-foreground
147
- hover:bg-secondary-selected/95 hover:text-secondary-foreground
148
- active:bg-secondary-selected/100 active:text-secondary-foreground
147
+ class: `
148
+ bg-secondary-selected text-secondary-foreground
149
+ hover:bg-secondary-selected/95 hover:text-secondary-foreground
150
+ active:bg-secondary-selected/100 active:text-secondary-foreground
149
151
  `
150
152
  },
151
153
  {
152
154
  look: "success",
153
155
  selected: true,
154
- class: `
155
- bg-success-selected text-success-foreground
156
- hover:bg-success-selected/95 hover:text-success-foreground
157
- active:bg-success-selected/100 active:text-success-foreground
156
+ class: `
157
+ bg-success-selected text-success-foreground
158
+ hover:bg-success-selected/95 hover:text-success-foreground
159
+ active:bg-success-selected/100 active:text-success-foreground
158
160
  `
159
161
  },
160
162
  {
161
163
  look: "error",
162
164
  selected: true,
163
- class: `
164
- bg-error-selected text-error-foreground
165
- hover:bg-error-selected/95 hover:text-error-foreground
166
- active:bg-error-selected/100 active:text-error-foreground
165
+ class: `
166
+ bg-error-selected text-error-foreground
167
+ hover:bg-error-selected/95 hover:text-error-foreground
168
+ active:bg-error-selected/100 active:text-error-foreground
167
169
  `
168
170
  },
169
171
  {
170
172
  look: "warning",
171
173
  selected: true,
172
- class: `
173
- bg-warning-selected text-warning-foreground
174
- hover:bg-warning-selected/95 hover:text-warning-foreground
175
- active:bg-warning-selected/100 active:text-warning-foreground
174
+ class: `
175
+ bg-warning-selected text-warning-foreground
176
+ hover:bg-warning-selected/95 hover:text-warning-foreground
177
+ active:bg-warning-selected/100 active:text-warning-foreground
176
178
  `
177
179
  },
178
180
  {
179
181
  look: "info",
180
182
  selected: true,
181
- class: `
182
- bg-info-selected text-info-foreground
183
- hover:bg-info-selected/95 hover:text-info-foreground
184
- active:bg-info-selected/100 active:text-info-foreground
183
+ class: `
184
+ bg-info-selected text-info-foreground
185
+ hover:bg-info-selected/95 hover:text-info-foreground
186
+ active:bg-info-selected/100 active:text-info-foreground
185
187
  `
186
188
  },
187
189
  {
188
190
  look: "outline",
189
191
  selected: true,
190
- class: `
191
- bg-primary-selected text-primary-foreground
192
- hover:bg-primary-selected/95 hover:text-primary-foreground
193
- active:bg-primary-selected/100 active:text-primary-foreground
192
+ class: `
193
+ bg-(--color-selected) text-(--color-selected-foreground)
194
+ hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
195
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
194
196
  `
195
197
  },
196
198
  {
197
199
  look: "ghost",
198
200
  selected: true,
199
- class: `
200
- bg-secondary-selected text-secondary-foreground
201
- hover:bg-secondary-selected/95 hover:text-secondary-foreground
202
- active:bg-secondary-selected/100 active:text-secondary-foreground
201
+ class: `
202
+ bg-(--color-selected) text-(--color-selected-foreground)
203
+ hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
204
+ active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
203
205
  `
204
206
  }
205
207
  ],
@@ -208,23 +210,12 @@ const chipVariants = cva(`
208
210
  }
209
211
  });
210
212
 
211
- const chipThemeVariants = (theme) => {
212
- switch (theme) {
213
- case "mona":
214
- return chipVariants;
215
- default:
216
- return chipVariants;
217
- }
218
- };
219
-
220
213
  class ChipComponent {
221
214
  #destroyRef;
222
215
  #elementRef;
223
- #themeService;
224
216
  constructor() {
225
217
  this.#destroyRef = inject(DestroyRef);
226
218
  this.#elementRef = inject(ElementRef);
227
- this.#themeService = inject(ThemeService);
228
219
  this.ariaChecked = computed(() => {
229
220
  if (!this.toggleable()) {
230
221
  return undefined;
@@ -233,14 +224,13 @@ class ChipComponent {
233
224
  }, /* @ts-ignore */
234
225
  ...(ngDevMode ? [{ debugName: "ariaChecked" }] : /* istanbul ignore next */ []));
235
226
  this.baseClass = computed(() => {
236
- const theme = this.#themeService.theme();
237
227
  const disabled = this.disabled();
238
228
  const look = this.look();
239
229
  const rounded = this.rounded();
240
230
  const size = this.size();
241
231
  const selected = this.selected();
242
232
  const userClass = this.userClass();
243
- const variantClasses = chipThemeVariants(theme)({ disabled, look, rounded, size, selected });
233
+ const variantClasses = chipThemeVariants({ disabled, look, rounded, size, selected });
244
234
  return twMerge(variantClasses, userClass);
245
235
  }, /* @ts-ignore */
246
236
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
@@ -2,7 +2,6 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, TemplateRef, Directive, computed, contentChild, input, Component } from '@angular/core';
4
4
  import { getPercentage } from '@nanahoshi/mona-ui/common';
5
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
6
5
  import { twMerge } from 'tailwind-merge';
7
6
  import { cva } from 'class-variance-authority';
8
7
 
@@ -20,42 +19,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
20
19
  }]
21
20
  }] });
22
21
 
23
- const circularProgressBarBaseVariants = cva(`
24
- flex items-center justify-center
25
- relative select-none
26
- [&_svg]:w-full [&_svg]:h-full
27
- [&_svg]:absolute [&_svg]:top-1/2
28
- [&_svg]:left-1/2
22
+ const circularProgressBarBaseThemeVariants = cva(`
23
+ relative flex items-center justify-center select-none
24
+ text-foreground
25
+ [&_svg]:absolute [&_svg]:top-1/2 [&_svg]:left-1/2
26
+ [&_svg]:h-full [&_svg]:w-full
29
27
  [&_svg]:-translate-x-1/2 [&_svg]:-translate-y-1/2
30
28
  [&_svg_circle]:origin-center
31
29
  [&_svg_circle]:-rotate-90
32
- [&_svg_circle]:transition-[stroke-dashoffset,stroke] duration-200 ease-in
33
- [&_svg_circle]:data-[stroke-trail='true']:stroke-input-border
30
+ [&_svg_circle]:transition-[stroke-dashoffset,stroke] duration-(--mona-motion-fast) ease-in
31
+ [&_svg_circle]:data-[stroke-trail='true']:stroke-surface-muted
34
32
  `, {
35
33
  variants: {
36
34
  disabled: {
37
- true: "opacity-50 pointer-events-none cursor-not-allowed",
35
+ true: "pointer-events-none cursor-not-allowed opacity-50",
38
36
  false: ""
39
37
  }
40
38
  }
41
39
  });
42
40
 
43
- const circularProgressBarBaseThemeVariants = (theme) => {
44
- switch (theme) {
45
- case "mona":
46
- return circularProgressBarBaseVariants;
47
- default:
48
- return circularProgressBarBaseVariants;
49
- }
50
- };
51
-
52
41
  class CircularProgressBarComponent {
53
42
  constructor() {
54
- this.#themeService = inject(ThemeService);
55
43
  this.baseClasses = computed(() => {
56
- const theme = this.#themeService.theme();
57
44
  const disabled = this.disabled();
58
- const classes = circularProgressBarBaseThemeVariants(theme)({ disabled });
45
+ const classes = circularProgressBarBaseThemeVariants({ disabled });
59
46
  const animateClass = this.animate() ? "" : "[&_svg_circle]:transition-none";
60
47
  return twMerge(classes, this.userClass(), animateClass);
61
48
  }, /* @ts-ignore */
@@ -166,9 +153,8 @@ class CircularProgressBarComponent {
166
153
  this.value = input(0, /* @ts-ignore */
167
154
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
168
155
  }
169
- #themeService;
170
156
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CircularProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
171
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CircularProgressBarComponent, isStandalone: true, selector: "mona-circular-progress-bar", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaValueText: { classPropertyName: "ariaValueText", publicName: "aria-valuetext", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", 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 } }, host: { attributes: { "role": "progressbar" }, properties: { "class": "baseClasses()", "attr.aria-busy": "indeterminate() || null", "attr.aria-label": "ariaLabel() || null", "attr.aria-valuemin": "indeterminate() ? null : min()", "attr.aria-valuemax": "indeterminate() ? null : max()", "attr.aria-valuenow": "indeterminate() ? null : value()", "attr.aria-valuetext": "ariaValueText() || null", "attr.aria-disabled": "disabled() || null", "attr.data-disabled": "disabled() || null", "style.width": "pixelSize()", "style.height": "pixelSize()" } }, queries: [{ propertyName: "labelTemplate", first: true, predicate: CircularProgressBarLabelTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<svg>\r\n <circle\r\n [attr.cx]=\"center().x\"\r\n [attr.cy]=\"center().y\"\r\n [attr.r]=\"radius()\"\r\n [attr.data-stroke-trail]=\"true\"\r\n [attr.stroke-dasharray]=\"circumference()\"\r\n [attr.stroke-width]=\"thickness()\"\r\n fill=\"transparent\" />\r\n <circle\r\n [attr.cx]=\"center().x\"\r\n [attr.cy]=\"center().y\"\r\n [attr.r]=\"radius()\"\r\n [attr.stroke]=\"strokeColor()\"\r\n [attr.stroke-dasharray]=\"circumference()\"\r\n [attr.stroke-dashoffset]=\"strokeDashOffset()\"\r\n [attr.stroke-width]=\"thickness()\"\r\n fill=\"transparent\"\r\n [class.indeterminate]=\"indeterminate()\" />\r\n</svg>\r\n@if (!indeterminate()) {\r\n <div class=\"mona-circular-progress-bar-label\">\r\n @if (labelTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\r\n </ng-container>\r\n } @else {\r\n {{ progress() }}\r\n }\r\n </div>\r\n}\r\n", styles: [".indeterminate{animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
157
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CircularProgressBarComponent, isStandalone: true, selector: "mona-circular-progress-bar", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaValueText: { classPropertyName: "ariaValueText", publicName: "aria-valuetext", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", 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 } }, host: { attributes: { "role": "progressbar" }, properties: { "class": "baseClasses()", "attr.aria-busy": "indeterminate() || null", "attr.aria-label": "ariaLabel() || null", "attr.aria-valuemin": "indeterminate() ? null : min()", "attr.aria-valuemax": "indeterminate() ? null : max()", "attr.aria-valuenow": "indeterminate() ? null : value()", "attr.aria-valuetext": "ariaValueText() || null", "attr.aria-disabled": "disabled() || null", "attr.data-disabled": "disabled() || null", "style.width": "pixelSize()", "style.height": "pixelSize()" } }, queries: [{ propertyName: "labelTemplate", first: true, predicate: CircularProgressBarLabelTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<svg>\n <circle\n [attr.cx]=\"center().x\"\n [attr.cy]=\"center().y\"\n [attr.r]=\"radius()\"\n [attr.data-stroke-trail]=\"true\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-width]=\"thickness()\"\n fill=\"transparent\" />\n <circle\n [attr.cx]=\"center().x\"\n [attr.cy]=\"center().y\"\n [attr.r]=\"radius()\"\n [attr.stroke]=\"strokeColor()\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-dashoffset]=\"strokeDashOffset()\"\n [attr.stroke-width]=\"thickness()\"\n fill=\"transparent\"\n [class.indeterminate]=\"indeterminate()\" />\n</svg>\n@if (!indeterminate()) {\n <div class=\"mona-circular-progress-bar-label\">\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n {{ progress() }}\n }\n </div>\n}\n", styles: [".indeterminate{animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
172
158
  }
173
159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CircularProgressBarComponent, decorators: [{
174
160
  type: Component,
@@ -185,7 +171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
185
171
  role: "progressbar",
186
172
  "[style.width]": "pixelSize()",
187
173
  "[style.height]": "pixelSize()"
188
- }, template: "<svg>\r\n <circle\r\n [attr.cx]=\"center().x\"\r\n [attr.cy]=\"center().y\"\r\n [attr.r]=\"radius()\"\r\n [attr.data-stroke-trail]=\"true\"\r\n [attr.stroke-dasharray]=\"circumference()\"\r\n [attr.stroke-width]=\"thickness()\"\r\n fill=\"transparent\" />\r\n <circle\r\n [attr.cx]=\"center().x\"\r\n [attr.cy]=\"center().y\"\r\n [attr.r]=\"radius()\"\r\n [attr.stroke]=\"strokeColor()\"\r\n [attr.stroke-dasharray]=\"circumference()\"\r\n [attr.stroke-dashoffset]=\"strokeDashOffset()\"\r\n [attr.stroke-width]=\"thickness()\"\r\n fill=\"transparent\"\r\n [class.indeterminate]=\"indeterminate()\" />\r\n</svg>\r\n@if (!indeterminate()) {\r\n <div class=\"mona-circular-progress-bar-label\">\r\n @if (labelTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\r\n </ng-container>\r\n } @else {\r\n {{ progress() }}\r\n }\r\n </div>\r\n}\r\n", styles: [".indeterminate{animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}\n"] }]
174
+ }, template: "<svg>\n <circle\n [attr.cx]=\"center().x\"\n [attr.cy]=\"center().y\"\n [attr.r]=\"radius()\"\n [attr.data-stroke-trail]=\"true\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-width]=\"thickness()\"\n fill=\"transparent\" />\n <circle\n [attr.cx]=\"center().x\"\n [attr.cy]=\"center().y\"\n [attr.r]=\"radius()\"\n [attr.stroke]=\"strokeColor()\"\n [attr.stroke-dasharray]=\"circumference()\"\n [attr.stroke-dashoffset]=\"strokeDashOffset()\"\n [attr.stroke-width]=\"thickness()\"\n fill=\"transparent\"\n [class.indeterminate]=\"indeterminate()\" />\n</svg>\n@if (!indeterminate()) {\n <div class=\"mona-circular-progress-bar-label\">\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n {{ progress() }}\n }\n </div>\n}\n", styles: [".indeterminate{animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}\n"] }]
189
175
  }], propDecorators: { labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CircularProgressBarLabelTemplateDirective), { isSignal: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaValueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-valuetext", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
190
176
 
191
177
  /*