@spartan-ng/cli 0.0.1-alpha.584 → 0.0.1-alpha.585

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 (215) hide show
  1. package/package.json +1 -1
  2. package/src/generators/migrate-brain-imports/import-map.d.ts +0 -1
  3. package/src/generators/migrate-brain-imports/import-map.js +0 -1
  4. package/src/generators/migrate-brain-imports/import-map.js.map +1 -1
  5. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-content.ts.template +6 -13
  6. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-icon.ts.template +8 -13
  7. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-item.ts.template +5 -10
  8. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-trigger.ts.template +8 -11
  9. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion.ts.template +5 -10
  10. package/src/generators/ui/libs/alert/files/lib/hlm-alert-description.ts.template +5 -13
  11. package/src/generators/ui/libs/alert/files/lib/hlm-alert-title.ts.template +5 -10
  12. package/src/generators/ui/libs/alert/files/lib/hlm-alert.ts.template +6 -7
  13. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-content.ts.template +8 -11
  14. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-description.ts.template +5 -6
  15. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-footer.ts.template +5 -8
  16. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-header.ts.template +5 -8
  17. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-title.ts.template +5 -6
  18. package/src/generators/ui/libs/aspect-ratio/files/lib/helm-aspect-ratio.ts.template +9 -15
  19. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-empty.ts.template +5 -8
  20. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +5 -13
  21. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +8 -16
  22. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +5 -13
  23. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +7 -13
  24. package/src/generators/ui/libs/avatar/files/lib/fallback/hlm-avatar-fallback.ts.template +5 -11
  25. package/src/generators/ui/libs/avatar/files/lib/hlm-avatar.ts.template +6 -11
  26. package/src/generators/ui/libs/avatar/files/lib/image/hlm-avatar-image.ts.template +6 -9
  27. package/src/generators/ui/libs/badge/files/lib/hlm-badge.ts.template +6 -7
  28. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-item.ts.template +5 -9
  29. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-link.ts.template +6 -9
  30. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-list.ts.template +5 -11
  31. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-page.ts.template +5 -7
  32. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-separator.ts.template +5 -7
  33. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb.ts.template +1 -7
  34. package/src/generators/ui/libs/button/files/lib/hlm-button.ts.template +6 -9
  35. package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-separator.ts.template +8 -12
  36. package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-text.ts.template +8 -14
  37. package/src/generators/ui/libs/button-group/files/lib/hlm-button-group.ts.template +6 -9
  38. package/src/generators/ui/libs/card/files/lib/hlm-card-action.ts.template +5 -10
  39. package/src/generators/ui/libs/card/files/lib/hlm-card-content.ts.template +5 -8
  40. package/src/generators/ui/libs/card/files/lib/hlm-card-description.ts.template +5 -8
  41. package/src/generators/ui/libs/card/files/lib/hlm-card-footer.ts.template +5 -8
  42. package/src/generators/ui/libs/card/files/lib/hlm-card-header.ts.template +8 -13
  43. package/src/generators/ui/libs/card/files/lib/hlm-card-title.ts.template +5 -8
  44. package/src/generators/ui/libs/card/files/lib/hlm-card.ts.template +5 -8
  45. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-content.ts.template +5 -8
  46. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-item.ts.template +5 -8
  47. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-next.ts.template +1 -4
  48. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-previous.ts.template +1 -6
  49. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-slide-display.ts.template +0 -5
  50. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel.ts.template +5 -6
  51. package/src/generators/ui/libs/collapsible/files/lib/hlm-collapsible-content.ts.template +5 -7
  52. package/src/generators/ui/libs/command/files/lib/hlm-command-dialog-close-button.ts.template +8 -13
  53. package/src/generators/ui/libs/command/files/lib/hlm-command-dialog.ts.template +7 -12
  54. package/src/generators/ui/libs/command/files/lib/hlm-command-empty.ts.template +5 -6
  55. package/src/generators/ui/libs/command/files/lib/hlm-command-group-label.ts.template +5 -11
  56. package/src/generators/ui/libs/command/files/lib/hlm-command-group.ts.template +5 -11
  57. package/src/generators/ui/libs/command/files/lib/hlm-command-icon.ts.template +5 -8
  58. package/src/generators/ui/libs/command/files/lib/hlm-command-item.ts.template +8 -14
  59. package/src/generators/ui/libs/command/files/lib/hlm-command-list.ts.template +5 -11
  60. package/src/generators/ui/libs/command/files/lib/hlm-command-search-input.ts.template +8 -14
  61. package/src/generators/ui/libs/command/files/lib/hlm-command-search.ts.template +5 -11
  62. package/src/generators/ui/libs/command/files/lib/hlm-command-separator.ts.template +5 -9
  63. package/src/generators/ui/libs/command/files/lib/hlm-command-shortcut.ts.template +5 -8
  64. package/src/generators/ui/libs/command/files/lib/hlm-command.ts.template +5 -11
  65. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-close.ts.template +8 -12
  66. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-content.ts.template +6 -10
  67. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-description.ts.template +5 -6
  68. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-footer.ts.template +5 -8
  69. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-header.ts.template +5 -8
  70. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-overlay.ts.template +2 -2
  71. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-title.ts.template +5 -6
  72. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-checkbox-indicator.ts.template +8 -13
  73. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-checkbox.ts.template +9 -13
  74. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-group.ts.template +5 -6
  75. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-item-sub-indicator.ts.template +5 -8
  76. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-item.ts.template +9 -12
  77. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-label.ts.template +5 -8
  78. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-radio-indicator.ts.template +8 -13
  79. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-radio.ts.template +9 -13
  80. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-separator.ts.template +5 -6
  81. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-shortcut.ts.template +5 -8
  82. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu-sub.ts.template +7 -12
  83. package/src/generators/ui/libs/dropdown-menu/files/lib/hlm-dropdown-menu.ts.template +7 -12
  84. package/src/generators/ui/libs/empty/files/lib/hlm-empty-content.ts.template +5 -9
  85. package/src/generators/ui/libs/empty/files/lib/hlm-empty-description.ts.template +7 -12
  86. package/src/generators/ui/libs/empty/files/lib/hlm-empty-header.ts.template +5 -9
  87. package/src/generators/ui/libs/empty/files/lib/hlm-empty-media.ts.template +6 -9
  88. package/src/generators/ui/libs/empty/files/lib/hlm-empty-title.ts.template +5 -7
  89. package/src/generators/ui/libs/empty/files/lib/hlm-empty.ts.template +8 -12
  90. package/src/generators/ui/libs/field/files/lib/hlm-field-content.ts.template +5 -9
  91. package/src/generators/ui/libs/field/files/lib/hlm-field-description.ts.template +6 -11
  92. package/src/generators/ui/libs/field/files/lib/hlm-field-group.ts.template +8 -12
  93. package/src/generators/ui/libs/field/files/lib/hlm-field-label.ts.template +6 -11
  94. package/src/generators/ui/libs/field/files/lib/hlm-field-legend.ts.template +6 -9
  95. package/src/generators/ui/libs/field/files/lib/hlm-field-separator.ts.template +5 -9
  96. package/src/generators/ui/libs/field/files/lib/hlm-field-set.ts.template +6 -11
  97. package/src/generators/ui/libs/field/files/lib/hlm-field-title.ts.template +8 -12
  98. package/src/generators/ui/libs/field/files/lib/hlm-field.ts.template +5 -9
  99. package/src/generators/ui/libs/form-field/files/lib/hlm-error.ts.template +5 -10
  100. package/src/generators/ui/libs/form-field/files/lib/hlm-form-field.ts.template +3 -16
  101. package/src/generators/ui/libs/form-field/files/lib/hlm-hint.ts.template +5 -8
  102. package/src/generators/ui/libs/hover-card/files/lib/hlm-hover-card-content.ts.template +5 -11
  103. package/src/generators/ui/libs/input/files/lib/hlm-input.ts.template +4 -10
  104. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-addon.ts.template +5 -8
  105. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-button.ts.template +3 -12
  106. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-input.ts.template +3 -18
  107. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-text.ts.template +8 -14
  108. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group-textarea.ts.template +6 -18
  109. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group.ts.template +6 -12
  110. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-group.ts.template +5 -7
  111. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-separator.ts.template +5 -7
  112. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-slot.ts.template +6 -11
  113. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp.ts.template +5 -9
  114. package/src/generators/ui/libs/item/files/lib/hlm-item-actions.ts.template +5 -6
  115. package/src/generators/ui/libs/item/files/lib/hlm-item-content.ts.template +5 -8
  116. package/src/generators/ui/libs/item/files/lib/hlm-item-description.ts.template +6 -10
  117. package/src/generators/ui/libs/item/files/lib/hlm-item-footer.ts.template +5 -8
  118. package/src/generators/ui/libs/item/files/lib/hlm-item-group.ts.template +6 -6
  119. package/src/generators/ui/libs/item/files/lib/hlm-item-header.ts.template +5 -8
  120. package/src/generators/ui/libs/item/files/lib/hlm-item-media.ts.template +6 -10
  121. package/src/generators/ui/libs/item/files/lib/hlm-item-separator.ts.template +6 -7
  122. package/src/generators/ui/libs/item/files/lib/hlm-item-title.ts.template +5 -8
  123. package/src/generators/ui/libs/item/files/lib/hlm-item.ts.template +6 -10
  124. package/src/generators/ui/libs/kbd/files/lib/hlm-kbd-group.ts.template +5 -6
  125. package/src/generators/ui/libs/kbd/files/lib/hlm-kbd.ts.template +6 -10
  126. package/src/generators/ui/libs/label/files/lib/hlm-label.ts.template +8 -14
  127. package/src/generators/ui/libs/menubar/files/lib/hlm-menubar-trigger.ts.template +6 -11
  128. package/src/generators/ui/libs/menubar/files/lib/hlm-menubar.ts.template +5 -8
  129. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-content.ts.template +7 -13
  130. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-item.ts.template +5 -8
  131. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-link.ts.template +6 -12
  132. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-list.ts.template +6 -12
  133. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-trigger.ts.template +8 -13
  134. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu.ts.template +5 -10
  135. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-content.ts.template +5 -6
  136. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-ellipsis.ts.template +6 -6
  137. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-item.ts.template +5 -6
  138. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-link.ts.template +7 -12
  139. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-next.ts.template +5 -8
  140. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-previous.ts.template +4 -8
  141. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination.ts.template +6 -7
  142. package/src/generators/ui/libs/popover/files/lib/hlm-popover-content.ts.template +7 -14
  143. package/src/generators/ui/libs/progress/files/lib/hlm-progress-indicator.ts.template +7 -15
  144. package/src/generators/ui/libs/progress/files/lib/hlm-progress.ts.template +5 -10
  145. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +5 -6
  146. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-indicator.ts.template +8 -11
  147. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-group.ts.template +5 -9
  148. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-handle.ts.template +8 -12
  149. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-panel.ts.template +2 -8
  150. package/src/generators/ui/libs/scroll-area/files/lib/hlm-scroll-area.ts.template +5 -6
  151. package/src/generators/ui/libs/select/files/lib/hlm-select-content.ts.template +8 -11
  152. package/src/generators/ui/libs/select/files/lib/hlm-select-group.ts.template +2 -10
  153. package/src/generators/ui/libs/select/files/lib/hlm-select-label.ts.template +7 -12
  154. package/src/generators/ui/libs/select/files/lib/hlm-select-option.ts.template +8 -13
  155. package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-down.ts.template +5 -10
  156. package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-up.ts.template +5 -10
  157. package/src/generators/ui/libs/select/files/lib/hlm-select-value.ts.template +5 -10
  158. package/src/generators/ui/libs/select/files/lib/hlm-select.ts.template +5 -8
  159. package/src/generators/ui/libs/separator/files/lib/hlm-separator.ts.template +5 -8
  160. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-close.ts.template +8 -11
  161. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-content.ts.template +3 -19
  162. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-description.ts.template +5 -6
  163. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-footer.ts.template +5 -6
  164. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-header.ts.template +5 -6
  165. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-title.ts.template +5 -6
  166. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-content.ts.template +5 -11
  167. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-footer.ts.template +5 -6
  168. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-action.ts.template +6 -10
  169. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-content.ts.template +5 -6
  170. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group-label.ts.template +6 -10
  171. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-group.ts.template +5 -8
  172. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-header.ts.template +5 -6
  173. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-input.ts.template +7 -8
  174. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-inset.ts.template +6 -10
  175. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-action.ts.template +7 -10
  176. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-badge.ts.template +6 -10
  177. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-button.ts.template +5 -7
  178. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-item.ts.template +5 -6
  179. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-skeleton.ts.template +6 -8
  180. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub-button.ts.template +6 -10
  181. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub-item.ts.template +5 -6
  182. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub.ts.template +6 -10
  183. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu.ts.template +5 -6
  184. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-rail.ts.template +6 -10
  185. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-separator.ts.template +5 -6
  186. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-wrapper.ts.template +6 -9
  187. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar.ts.template +11 -14
  188. package/src/generators/ui/libs/skeleton/files/lib/hlm-skeleton.ts.template +5 -8
  189. package/src/generators/ui/libs/slider/files/lib/hlm-slider.ts.template +5 -14
  190. package/src/generators/ui/libs/spinner/files/lib/hlm-spinner.ts.template +6 -7
  191. package/src/generators/ui/libs/switch/files/lib/hlm-switch-thumb.ts.template +8 -14
  192. package/src/generators/ui/libs/table/files/lib/hlm-table.ts.template +39 -79
  193. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-content.ts.template +8 -11
  194. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-list.ts.template +5 -8
  195. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-paginated-list.ts.template +6 -7
  196. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-trigger.ts.template +8 -11
  197. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs.ts.template +5 -6
  198. package/src/generators/ui/libs/textarea/files/lib/hlm-textarea.ts.template +4 -8
  199. package/src/generators/ui/libs/toggle/files/lib/hlm-toggle.ts.template +6 -11
  200. package/src/generators/ui/libs/toggle-group/files/lib/hlm-toggle-group-item.ts.template +7 -12
  201. package/src/generators/ui/libs/toggle-group/files/lib/hlm-toggle-group.ts.template +5 -11
  202. package/src/generators/ui/libs/typography/files/lib/hlm-blockquote.ts.template +5 -8
  203. package/src/generators/ui/libs/typography/files/lib/hlm-code.ts.template +5 -8
  204. package/src/generators/ui/libs/typography/files/lib/hlm-h1.ts.template +5 -8
  205. package/src/generators/ui/libs/typography/files/lib/hlm-h2.ts.template +5 -8
  206. package/src/generators/ui/libs/typography/files/lib/hlm-h3.ts.template +5 -8
  207. package/src/generators/ui/libs/typography/files/lib/hlm-h4.ts.template +5 -8
  208. package/src/generators/ui/libs/typography/files/lib/hlm-large.ts.template +5 -8
  209. package/src/generators/ui/libs/typography/files/lib/hlm-lead.ts.template +5 -8
  210. package/src/generators/ui/libs/typography/files/lib/hlm-muted.ts.template +5 -8
  211. package/src/generators/ui/libs/typography/files/lib/hlm-p.ts.template +5 -8
  212. package/src/generators/ui/libs/typography/files/lib/hlm-small.ts.template +5 -8
  213. package/src/generators/ui/libs/typography/files/lib/hlm-ul.ts.template +5 -8
  214. package/src/generators/ui/libs/utils/files/lib/hlm.ts.template +251 -0
  215. package/src/generators/ui/supported-ui-libraries.json +66 -97
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/cli",
3
- "version": "0.0.1-alpha.584",
3
+ "version": "0.0.1-alpha.585",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@angular/core": ">=19.0.0",
@@ -20,7 +20,6 @@ declare const _default: {
20
20
  '@spartan-ng/ui-separator-brain': string;
21
21
  '@spartan-ng/ui-sheet-brain': string;
22
22
  '@spartan-ng/ui-switch-brain': string;
23
- '@spartan-ng/ui-table-brain': string;
24
23
  '@spartan-ng/ui-tabs-brain': string;
25
24
  '@spartan-ng/ui-toggle-brain': string;
26
25
  '@spartan-ng/ui-toggle-group-brain': string;
@@ -22,7 +22,6 @@ exports.default = {
22
22
  '@spartan-ng/ui-separator-brain': '@spartan-ng/brain/separator',
23
23
  '@spartan-ng/ui-sheet-brain': '@spartan-ng/brain/sheet',
24
24
  '@spartan-ng/ui-switch-brain': '@spartan-ng/brain/switch',
25
- '@spartan-ng/ui-table-brain': '@spartan-ng/brain/table',
26
25
  '@spartan-ng/ui-tabs-brain': '@spartan-ng/brain/tabs',
27
26
  '@spartan-ng/ui-toggle-brain': '@spartan-ng/brain/toggle',
28
27
  '@spartan-ng/ui-toggle-group-brain': '@spartan-ng/brain/toggle-group',
@@ -1 +1 @@
1
- {"version":3,"file":"import-map.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brain-imports/import-map.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,+BAA+B,EAAE,4BAA4B;IAC7D,6BAA6B,EAAE,0BAA0B;IACzD,gCAAgC,EAAE,6BAA6B;IAC/D,4BAA4B,EAAE,yBAAyB;IACvD,6BAA6B,EAAE,0BAA0B;IACzD,mCAAmC,EAAE,gCAAgC;IACrE,+BAA+B,EAAE,4BAA4B;IAC7D,kCAAkC,EAAE,+BAA+B;IACnE,8BAA8B,EAAE,2BAA2B;IAC3D,6BAA6B,EAAE,0BAA0B;IACzD,iCAAiC,EAAE,8BAA8B;IACjE,4BAA4B,EAAE,yBAAyB;IACvD,iCAAiC,EAAE,8BAA8B;IACjE,2BAA2B,EAAE,wBAAwB;IACrD,8BAA8B,EAAE,2BAA2B;IAC3D,+BAA+B,EAAE,4BAA4B;IAC7D,kCAAkC,EAAE,+BAA+B;IACnE,6BAA6B,EAAE,0BAA0B;IACzD,gCAAgC,EAAE,6BAA6B;IAC/D,4BAA4B,EAAE,yBAAyB;IACvD,6BAA6B,EAAE,0BAA0B;IACzD,4BAA4B,EAAE,yBAAyB;IACvD,2BAA2B,EAAE,wBAAwB;IACrD,6BAA6B,EAAE,0BAA0B;IACzD,mCAAmC,EAAE,gCAAgC;IACrE,8BAA8B,EAAE,2BAA2B;IAC3D,gCAAgC,EAAE,6BAA6B;IAC/D,sCAAsC,EAAE,mCAAmC;CAC3E,CAAC"}
1
+ {"version":3,"file":"import-map.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brain-imports/import-map.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,+BAA+B,EAAE,4BAA4B;IAC7D,6BAA6B,EAAE,0BAA0B;IACzD,gCAAgC,EAAE,6BAA6B;IAC/D,4BAA4B,EAAE,yBAAyB;IACvD,6BAA6B,EAAE,0BAA0B;IACzD,mCAAmC,EAAE,gCAAgC;IACrE,+BAA+B,EAAE,4BAA4B;IAC7D,kCAAkC,EAAE,+BAA+B;IACnE,8BAA8B,EAAE,2BAA2B;IAC3D,6BAA6B,EAAE,0BAA0B;IACzD,iCAAiC,EAAE,8BAA8B;IACjE,4BAA4B,EAAE,yBAAyB;IACvD,iCAAiC,EAAE,8BAA8B;IACjE,2BAA2B,EAAE,wBAAwB;IACrD,8BAA8B,EAAE,2BAA2B;IAC3D,+BAA+B,EAAE,4BAA4B;IAC7D,kCAAkC,EAAE,+BAA+B;IACnE,6BAA6B,EAAE,0BAA0B;IACzD,gCAAgC,EAAE,6BAA6B;IAC/D,4BAA4B,EAAE,yBAAyB;IACvD,6BAA6B,EAAE,0BAA0B;IACzD,2BAA2B,EAAE,wBAAwB;IACrD,6BAA6B,EAAE,0BAA0B;IACzD,mCAAmC,EAAE,gCAAgC;IACrE,8BAA8B,EAAE,2BAA2B;IAC3D,gCAAgC,EAAE,6BAA6B;IAC/D,sCAAsC,EAAE,mCAAmC;CAC3E,CAAC"}
@@ -1,15 +1,11 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
2
  import { BrnAccordionContent } from '@spartan-ng/brain/accordion';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Component({
7
6
  selector: 'hlm-accordion-content',
8
7
  changeDetection: ChangeDetectionStrategy.OnPush,
9
8
  hostDirectives: [{ directive: BrnAccordionContent, inputs: ['style'] }],
10
- host: {
11
- '[class]': '_computedClass()',
12
- },
13
9
  template: `
14
10
  <div class="flex flex-col gap-4 pt-0 pb-4 text-balance">
15
11
  <ng-content />
@@ -17,12 +13,9 @@ import type { ClassValue } from 'clsx';
17
13
  `,
18
14
  })
19
15
  export class HlmAccordionContent {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
-
22
- protected readonly _computedClass = computed(() => {
23
- return hlm(
24
- 'text-sm transition-all data-[state=closed]:h-0 data-[state=open]:h-[var(--brn-accordion-content-height)]',
25
- this.userClass(),
16
+ constructor() {
17
+ classes(
18
+ () => 'text-sm transition-all data-[state=closed]:h-0 data-[state=open]:h-[var(--brn-accordion-content-height)]',
26
19
  );
27
- });
20
+ }
28
21
  }
@@ -1,23 +1,18 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { provideIcons } from '@ng-icons/core';
3
3
  import { lucideChevronDown } from '@ng-icons/lucide';
4
4
  import { provideHlmIconConfig } from '<%- importAlias %>/icon';
5
- import { hlm } from '<%- importAlias %>/utils';
6
- import type { ClassValue } from 'clsx';
5
+ import { classes } from '<%- importAlias %>/utils';
7
6
 
8
7
  @Directive({
9
8
  selector: 'ng-icon[hlmAccordionIcon], ng-icon[hlmAccIcon]',
10
9
  providers: [provideIcons({ lucideChevronDown }), provideHlmIconConfig({ size: 'sm' })],
11
- host: {
12
- '[class]': '_computedClass()',
13
- },
14
10
  })
15
11
  export class HlmAccordionIcon {
16
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
17
- protected readonly _computedClass = computed(() =>
18
- hlm(
19
- 'text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200',
20
- this.userClass(),
21
- ),
22
- );
12
+ constructor() {
13
+ classes(
14
+ () =>
15
+ 'text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 group-data-[state=open]:rotate-180',
16
+ );
17
+ }
23
18
  }
@@ -1,7 +1,6 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAccordionItem } from '@spartan-ng/brain/accordion';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAccordionItem],brn-accordion-item[hlm],hlm-accordion-item',
@@ -12,13 +11,9 @@ import type { ClassValue } from 'clsx';
12
11
  outputs: ['openedChange'],
13
12
  },
14
13
  ],
15
- host: {
16
- '[class]': '_computedClass()',
17
- },
18
14
  })
19
15
  export class HlmAccordionItem {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected readonly _computedClass = computed(() =>
22
- hlm('border-border flex flex-1 flex-col border-b', this.userClass()),
23
- );
16
+ constructor() {
17
+ classes(() => 'border-border flex flex-1 flex-col border-b');
18
+ }
24
19
  }
@@ -1,22 +1,19 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAccordionTrigger } from '@spartan-ng/brain/accordion';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAccordionTrigger]',
8
7
  hostDirectives: [BrnAccordionTrigger],
9
8
  host: {
10
9
  '[style.--tw-ring-offset-shadow]': '"0 0 #000"',
11
- '[class]': '_computedClass()',
12
10
  },
13
11
  })
14
12
  export class HlmAccordionTrigger {
15
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
- protected readonly _computedClass = computed(() =>
17
- hlm(
18
- 'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>[hlmAccIcon]]:rotate-180',
19
- this.userClass(),
20
- ),
21
- );
13
+ constructor() {
14
+ classes(
15
+ () =>
16
+ 'group flex w-full items-center justify-between py-4 text-left font-medium transition-all hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&[data-state=open]>ng-icon]:rotate-180',
17
+ );
18
+ }
22
19
  }
@@ -1,18 +1,13 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAccordion } from '@spartan-ng/brain/accordion';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAccordion], hlm-accordion',
8
7
  hostDirectives: [{ directive: BrnAccordion, inputs: ['type', 'dir', 'orientation'] }],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
8
  })
13
9
  export class HlmAccordion {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() =>
16
- hlm('flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col', this.userClass()),
17
- );
10
+ constructor() {
11
+ classes(() => 'flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col');
12
+ }
18
13
  }
@@ -1,19 +1,11 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmAlertDesc],[hlmAlertDescription]',
7
- host: {
8
- '[class]': '_computedClass()',
9
- },
10
6
  })
11
7
  export class HlmAlertDescription {
12
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
13
- protected readonly _computedClass = computed(() =>
14
- hlm(
15
- 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',
16
- this.userClass(),
17
- ),
18
- );
8
+ constructor() {
9
+ classes(() => 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed');
10
+ }
19
11
  }
@@ -1,16 +1,11 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmAlertTitle]',
7
- host: {
8
- '[class]': '_computedClass()',
9
- },
10
6
  })
11
7
  export class HlmAlertTitle {
12
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
13
- protected readonly _computedClass = computed(() =>
14
- hlm('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', this.userClass()),
15
- );
8
+ constructor() {
9
+ classes(() => 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight');
10
+ }
16
11
  }
@@ -1,7 +1,6 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
1
+ import { Directive, input } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
3
3
  import { type VariantProps, cva } from 'class-variance-authority';
4
- import type { ClassValue } from 'clsx';
5
4
 
6
5
  const alertVariants = cva(
7
6
  'relative w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>[hlmAlertIcon]]:grid has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] has-[>[hlmAlertIcon]]:gap-x-3 [&>[hlmAlertIcon]]:size-4 [&>[hlmAlertIcon]]:translate-y-0.5 [&>[hlmAlertIcon]]:text-current',
@@ -25,12 +24,12 @@ export type AlertVariants = VariantProps<typeof alertVariants>;
25
24
  selector: '[hlmAlert]',
26
25
  host: {
27
26
  role: 'alert',
28
- '[class]': '_computedClass()',
29
27
  },
30
28
  })
31
29
  export class HlmAlert {
32
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
33
- protected readonly _computedClass = computed(() => hlm(alertVariants({ variant: this.variant() }), this.userClass()));
34
-
35
30
  public readonly variant = input<AlertVariants['variant']>('default');
31
+
32
+ constructor() {
33
+ classes(() => alertVariants({ variant: this.variant() }));
34
+ }
36
35
  }
@@ -1,13 +1,11 @@
1
- import { computed, Directive, input, signal } from '@angular/core';
1
+ import { Directive, signal } from '@angular/core';
2
2
  import { injectExposesStateProvider } from '@spartan-ng/brain/core';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAlertDialogContent],hlm-alert-dialog-content',
8
7
  host: {
9
8
  'data-slot': 'alert-dialog-content',
10
- '[class]': '_computedClass()',
11
9
  '[attr.data-state]': 'state()',
12
10
  },
13
11
  })
@@ -15,11 +13,10 @@ export class HlmAlertDialogContent {
15
13
  private readonly _stateProvider = injectExposesStateProvider({ optional: true, host: true });
16
14
  public readonly state = this._stateProvider?.state ?? signal('closed');
17
15
 
18
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
19
- protected readonly _computedClass = computed(() =>
20
- hlm(
21
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 mx-auto grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg data-[state=closed]:duration-200 data-[state=open]:duration-200 sm:mx-0 sm:max-w-lg',
22
- this.userClass(),
23
- ),
24
- );
16
+ constructor() {
17
+ classes(
18
+ () =>
19
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 mx-auto grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg data-[state=closed]:duration-200 data-[state=open]:duration-200 sm:mx-0 sm:max-w-lg',
20
+ );
21
+ }
25
22
  }
@@ -1,17 +1,16 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAlertDialogDescription } from '@spartan-ng/brain/alert-dialog';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAlertDialogDescription]',
8
7
  hostDirectives: [BrnAlertDialogDescription],
9
8
  host: {
10
9
  'data-slot': 'alert-dialog-description',
11
- '[class]': '_computedClass()',
12
10
  },
13
11
  })
14
12
  export class HlmAlertDialogDescription {
15
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
- protected readonly _computedClass = computed(() => hlm('text-muted-foreground text-sm', this.userClass()));
13
+ constructor() {
14
+ classes(() => 'text-muted-foreground text-sm');
15
+ }
17
16
  }
@@ -1,17 +1,14 @@
1
- import { computed, Directive, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmAlertDialogFooter],hlm-alert-dialog-footer',
7
6
  host: {
8
7
  'data-slot': 'alert-dialog-footer',
9
- '[class]': '_computedClass()',
10
8
  },
11
9
  })
12
10
  export class HlmAlertDialogFooter {
13
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
14
- protected readonly _computedClass = computed(() =>
15
- hlm('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.userClass()),
16
- );
11
+ constructor() {
12
+ classes(() => 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end');
13
+ }
17
14
  }
@@ -1,17 +1,14 @@
1
- import { computed, Directive, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmAlertDialogHeader],hlm-alert-dialog-header',
7
6
  host: {
8
7
  'data-slot': 'alert-dialog-header',
9
- '[class]': '_computedClass()',
10
8
  },
11
9
  })
12
10
  export class HlmAlertDialogHeader {
13
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
14
- protected readonly _computedClass = computed(() =>
15
- hlm('flex flex-col gap-2 text-center sm:text-left', this.userClass()),
16
- );
11
+ constructor() {
12
+ classes(() => 'flex flex-col gap-2 text-center sm:text-left');
13
+ }
17
14
  }
@@ -1,17 +1,16 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAlertDialogTitle } from '@spartan-ng/brain/alert-dialog';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAlertDialogTitle]',
8
7
  hostDirectives: [BrnAlertDialogTitle],
9
8
  host: {
10
9
  'data-slot': 'alert-dialog-title',
11
- '[class]': '_computedClass()',
12
10
  },
13
11
  })
14
12
  export class HlmAlertDialogTitle {
15
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
- protected readonly _computedClass = computed(() => hlm('text-lg font-semibold', this.userClass()));
13
+ constructor() {
14
+ classes(() => 'text-lg font-semibold');
15
+ }
17
16
  }
@@ -1,7 +1,6 @@
1
1
  import { type NumberInput, coerceNumberProperty } from '@angular/cdk/coercion';
2
- import { Directive, computed, input } from '@angular/core';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
2
+ import { Directive, input } from '@angular/core';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  const parseDividedString = (value: NumberInput): NumberInput => {
7
6
  if (typeof value !== 'string' || !value.includes('/')) return value;
@@ -13,10 +12,7 @@ const parseDividedString = (value: NumberInput): NumberInput => {
13
12
 
14
13
  @Directive({
15
14
  selector: '[hlmAspectRatio]',
16
- host: {
17
- '[class]': '_computedClass()',
18
- '[style.padding-bottom.%]': '100 / ratio()',
19
- },
15
+ host: { '[style.padding-bottom.%]': '100 / ratio()' },
20
16
  })
21
17
  export class HlmAspectRatio {
22
18
  /**
@@ -30,12 +26,10 @@ export class HlmAspectRatio {
30
26
  },
31
27
  });
32
28
 
33
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
34
-
35
- protected readonly _computedClass = computed(() =>
36
- hlm(
37
- 'relative w-full [&>*:first-child]:absolute [&>*:first-child]:h-full [&>*:first-child]:w-full [&>*:first-child]:object-cover',
38
- this.userClass(),
39
- ),
40
- );
29
+ constructor() {
30
+ classes(
31
+ () =>
32
+ 'relative w-full [&>*:first-child]:absolute [&>*:first-child]:h-full [&>*:first-child]:w-full [&>*:first-child]:object-cover',
33
+ );
34
+ }
41
35
  }
@@ -1,14 +1,11 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmAutocompleteEmpty]',
7
- host: {
8
- '[class]': '_computedClass()',
9
- },
10
6
  })
11
7
  export class HlmAutocompleteEmpty {
12
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
13
- protected readonly _computedClass = computed(() => hlm('py-6 text-center text-sm', this.userClass()));
8
+ constructor() {
9
+ classes(() => 'py-6 text-center text-sm');
10
+ }
14
11
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAutocompleteGroup } from '@spartan-ng/brain/autocomplete';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAutocompleteGroup],hlm-autocomplete-group',
@@ -11,16 +10,9 @@ import type { ClassValue } from 'clsx';
11
10
  inputs: ['id'],
12
11
  },
13
12
  ],
14
- host: {
15
- '[class]': '_computedClass()',
16
- },
17
13
  })
18
14
  export class HlmAutocompleteGroup {
19
- /** The user defined class */
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
-
22
- /** The styles to apply */
23
- protected readonly _computedClass = computed(() =>
24
- hlm('text-foreground block overflow-hidden p-1', this.userClass()),
25
- );
15
+ constructor() {
16
+ classes(() => 'text-foreground block overflow-hidden p-1');
17
+ }
26
18
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAutocompleteItem } from '@spartan-ng/brain/autocomplete';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: 'button[hlmAutocompleteItem],button[hlm-autocomplete-item]',
@@ -12,19 +11,12 @@ import type { ClassValue } from 'clsx';
12
11
  outputs: ['selected'],
13
12
  },
14
13
  ],
15
- host: {
16
- '[class]': '_computedClass()',
17
- },
18
14
  })
19
15
  export class HlmAutocompleteItem {
20
- /** The user defined class */
21
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
-
23
- /** The styles to apply */
24
- protected readonly _computedClass = computed(() =>
25
- hlm(
26
- `data-[selected]:bg-accent data-[selected=true]:text-accent-foreground [&>ng-icon:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[hidden]:hidden [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon:not([class*='text-'])]:text-base`,
27
- this.userClass(),
28
- ),
29
- );
16
+ constructor() {
17
+ classes(
18
+ () =>
19
+ `data-[selected]:bg-accent data-[selected=true]:text-accent-foreground [&>ng-icon:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[hidden]:hidden [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon:not([class*='text-'])]:text-base`,
20
+ );
21
+ }
30
22
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnAutocompleteList } from '@spartan-ng/brain/autocomplete';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: '[hlmAutocompleteList],hlm-autocomplete-list',
@@ -11,16 +10,9 @@ import type { ClassValue } from 'clsx';
11
10
  inputs: ['id'],
12
11
  },
13
12
  ],
14
- host: {
15
- '[class]': '_computedClass()',
16
- },
17
13
  })
18
14
  export class HlmAutocompleteList {
19
- /** The user defined class */
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
-
22
- /** The styles to apply */
23
- protected readonly _computedClass = computed(() =>
24
- hlm('block max-h-60 overflow-x-hidden overflow-y-auto', this.userClass()),
25
- );
15
+ constructor() {
16
+ classes(() => 'block max-h-60 overflow-x-hidden overflow-y-auto');
17
+ }
26
18
  }
@@ -25,7 +25,7 @@ import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
25
25
  import { BrnPopoverImports } from '@spartan-ng/brain/popover';
26
26
  import { HlmIconImports } from '<%- importAlias %>/icon';
27
27
  import { HlmPopoverImports } from '<%- importAlias %>/popover';
28
- import { hlm } from '<%- importAlias %>/utils';
28
+ import { classes, hlm } from '<%- importAlias %>/utils';
29
29
  import type { ClassValue } from 'clsx';
30
30
  import { HlmAutocompleteEmpty } from './hlm-autocomplete-empty';
31
31
  import { HlmAutocompleteGroup } from './hlm-autocomplete-group';
@@ -59,9 +59,6 @@ export const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
59
59
  ],
60
60
  providers: [HLM_AUTOCOMPLETE_VALUE_ACCESSOR, provideIcons({ lucideSearch, lucideChevronDown, lucideCircleX })],
61
61
  changeDetection: ChangeDetectionStrategy.OnPush,
62
- host: {
63
- '[class]': '_computedClass()',
64
- },
65
62
  template: `
66
63
  @let transformer = transformOptionToValue();
67
64
  <hlm-popover
@@ -175,29 +172,25 @@ export class HlmAutocomplete<T, V = T> implements ControlValueAccessor {
175
172
 
176
173
  protected readonly _elementRef = inject(ElementRef<HTMLElement>);
177
174
 
178
- /** The user defined class */
179
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
180
- protected readonly _computedClass = computed(() => hlm('block w-full', this.userClass()));
181
-
182
175
  /** Custom class for the autocomplete search container. */
183
176
  public readonly autocompleteSearchClass = input<ClassValue>('');
184
- protected readonly _computedAutocompleteSearchClass = computed(() => hlm('', this.autocompleteSearchClass()));
177
+ protected readonly _computedAutocompleteSearchClass = computed(() => hlm(this.autocompleteSearchClass()));
185
178
 
186
179
  /** Custom class for the autocomplete input. */
187
180
  public readonly autocompleteInputClass = input<ClassValue>('');
188
- protected readonly _computedAutocompleteInputClass = computed(() => hlm('', this.autocompleteInputClass()));
181
+ protected readonly _computedAutocompleteInputClass = computed(() => hlm(this.autocompleteInputClass()));
189
182
 
190
183
  /** Custom class for the autocomplete list. */
191
184
  public readonly autocompleteListClass = input<ClassValue>('');
192
- protected readonly _computedAutocompleteListClass = computed(() => hlm('', this.autocompleteListClass()));
185
+ protected readonly _computedAutocompleteListClass = computed(() => hlm(this.autocompleteListClass()));
193
186
 
194
187
  /** Custom class for each autocomplete item. */
195
188
  public readonly autocompleteItemClass = input<ClassValue>('');
196
- protected readonly _computedAutocompleteItemClass = computed(() => hlm('', this.autocompleteItemClass()));
189
+ protected readonly _computedAutocompleteItemClass = computed(() => hlm(this.autocompleteItemClass()));
197
190
 
198
191
  /** Custom class for the empty and loading state container. */
199
192
  public readonly autocompleteEmptyClass = input<ClassValue>('');
200
- protected readonly _computedAutocompleteEmptyClass = computed(() => hlm('', this.autocompleteEmptyClass()));
193
+ protected readonly _computedAutocompleteEmptyClass = computed(() => hlm(this.autocompleteEmptyClass()));
201
194
 
202
195
  /** The list of filtered options to display in the autocomplete. */
203
196
  public readonly filteredOptions = input<T[]>([]);
@@ -282,6 +275,7 @@ export class HlmAutocomplete<T, V = T> implements ControlValueAccessor {
282
275
  protected _onTouched?: TouchFn;
283
276
 
284
277
  constructor() {
278
+ classes(() => 'block w-full');
285
279
  effect(() => {
286
280
  const search = this._search();
287
281
  this.searchChange.emit(search);