@spartan-ng/cli 0.0.1-alpha.583 → 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
@@ -1,21 +1,16 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnNavigationMenuTrigger } from '@spartan-ng/brain/navigation-menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: 'button[hlmNavigationMenuTrigger]',
8
7
  hostDirectives: [BrnNavigationMenuTrigger],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
8
  })
13
9
  export class HlmNavigationMenuTrigger {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() =>
16
- hlm(
17
- 'bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50',
18
- this.userClass(),
19
- ),
20
- );
10
+ constructor() {
11
+ classes(
12
+ () =>
13
+ 'bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50',
14
+ );
15
+ }
21
16
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnNavigationMenu } from '@spartan-ng/brain/navigation-menu';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import { ClassValue } from 'clsx';
3
+ import { classes } from '<%- importAlias %>/utils';
5
4
 
6
5
  @Directive({
7
6
  selector: 'nav[hlmNavigationMenu]',
@@ -12,13 +11,9 @@ import { ClassValue } from 'clsx';
12
11
  outputs: ['valueChange'],
13
12
  },
14
13
  ],
15
- host: {
16
- '[class]': '_computedClass()',
17
- },
18
14
  })
19
15
  export class HlmNavigationMenu {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected readonly _computedClass = computed(() =>
22
- hlm('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', this.userClass()),
23
- );
16
+ constructor() {
17
+ classes(() => 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center');
18
+ }
24
19
  }
@@ -1,15 +1,14 @@
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: 'ul[hlmPaginationContent]',
7
6
  host: {
8
7
  'data-slot': 'pagination-content',
9
- '[class]': '_computedClass()',
10
8
  },
11
9
  })
12
10
  export class HlmPaginationContent {
13
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
14
- protected readonly _computedClass = computed(() => hlm('flex flex-row items-center gap-1', this.userClass()));
11
+ constructor() {
12
+ classes(() => 'flex flex-row items-center gap-1');
13
+ }
15
14
  }
@@ -1,9 +1,8 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
2
2
  import { provideIcons } from '@ng-icons/core';
3
3
  import { lucideEllipsis } from '@ng-icons/lucide';
4
4
  import { HlmIconImports } 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
  @Component({
9
8
  selector: 'hlm-pagination-ellipsis',
@@ -14,15 +13,16 @@ import type { ClassValue } from 'clsx';
14
13
  'data-slot': 'pagination-ellipsis',
15
14
  },
16
15
  template: `
17
- <span [class]="_computedClass()" aria-hidden="true">
16
+ <span aria-hidden="true">
18
17
  <ng-icon hlm size="sm" name="lucideEllipsis" />
19
18
  <span class="sr-only">{{ srOnlyText() }}</span>
20
19
  </span>
21
20
  `,
22
21
  })
23
22
  export class HlmPaginationEllipsis {
24
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
25
- protected readonly _computedClass = computed(() => hlm('flex size-9 items-center justify-center', this.userClass()));
23
+ constructor() {
24
+ classes(() => 'flex size-9 items-center justify-center');
25
+ }
26
26
 
27
27
  /** Screen reader only text for the ellipsis */
28
28
  public readonly srOnlyText = input<string>('More pages');
@@ -1,15 +1,14 @@
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: 'li[hlmPaginationItem]',
7
6
  host: {
8
7
  'data-slot': 'pagination-item',
9
- '[class]': '_computedClass()',
10
8
  },
11
9
  })
12
10
  export class HlmPaginationItem {
13
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
14
- protected readonly _computedClass = computed(() => hlm('', this.userClass()));
11
+ constructor() {
12
+ classes(() => '');
13
+ }
15
14
  }
@@ -1,9 +1,8 @@
1
1
  import type { BooleanInput } from '@angular/cdk/coercion';
2
- import { Directive, booleanAttribute, computed, input } from '@angular/core';
2
+ import { Directive, booleanAttribute, input } from '@angular/core';
3
3
  import { RouterLink } from '@angular/router';
4
- import { type ButtonVariants, buttonVariants } from '<%- importAlias %>/button';
5
- import { hlm } from '<%- importAlias %>/utils';
6
- import type { ClassValue } from 'clsx';
4
+ import { buttonVariants, type ButtonVariants } from '<%- importAlias %>/button';
5
+ import { classes } from '<%- importAlias %>/utils';
7
6
 
8
7
  @Directive({
9
8
  selector: '[hlmPaginationLink]',
@@ -27,13 +26,11 @@ import type { ClassValue } from 'clsx';
27
26
  ],
28
27
  host: {
29
28
  'data-slot': 'pagination-link',
30
- '[class]': '_computedClass()',
31
29
  '[attr.data-active]': 'isActive() ? "true" : null',
32
30
  '[attr.aria-current]': 'isActive() ? "page" : null',
33
31
  },
34
32
  })
35
33
  export class HlmPaginationLink {
36
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
37
34
  /** Whether the link is active (i.e., the current page). */
38
35
  public readonly isActive = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
39
36
  /** The size of the button. */
@@ -41,15 +38,13 @@ export class HlmPaginationLink {
41
38
  /** The link to navigate to the page. */
42
39
  public readonly link = input<RouterLink['routerLink']>();
43
40
 
44
- protected readonly _computedClass = computed(() =>
45
- hlm(
46
- '',
41
+ constructor() {
42
+ classes(() => [
47
43
  this.link() === undefined ? 'cursor-pointer' : '',
48
44
  buttonVariants({
49
45
  variant: this.isActive() ? 'outline' : 'ghost',
50
46
  size: this.size(),
51
47
  }),
52
- this.userClass(),
53
- ),
54
- );
48
+ ]);
49
+ }
55
50
  }
@@ -5,8 +5,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
5
5
  import { lucideChevronRight } from '@ng-icons/lucide';
6
6
  import type { ButtonVariants } from '<%- importAlias %>/button';
7
7
  import { HlmIcon } from '<%- importAlias %>/icon';
8
- import { hlm } from '<%- importAlias %>/utils';
9
- import type { ClassValue } from 'clsx';
8
+ import { classes } from '<%- importAlias %>/utils';
10
9
  import { HlmPaginationLink } from './hlm-pagination-link';
11
10
 
12
11
  @Component({
@@ -16,7 +15,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
16
15
  changeDetection: ChangeDetectionStrategy.OnPush,
17
16
  template: `
18
17
  <a
19
- [class]="_computedClass()"
20
18
  hlmPaginationLink
21
19
  [link]="link()"
22
20
  [queryParams]="queryParams()"
@@ -30,7 +28,10 @@ import { HlmPaginationLink } from './hlm-pagination-link';
30
28
  `,
31
29
  })
32
30
  export class HlmPaginationNext {
33
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
31
+ constructor() {
32
+ classes(() => ['gap-1 px-2.5', !this.iconOnly() ? 'sm:pr-2.5' : '']);
33
+ }
34
+
34
35
  /** The link to navigate to the next page. */
35
36
  public readonly link = input<RouterLink['routerLink']>();
36
37
  /** The query parameters to pass to the next page. */
@@ -49,8 +50,4 @@ export class HlmPaginationNext {
49
50
  protected readonly _labelClass = computed(() => (this.iconOnly() ? 'sr-only' : 'hidden sm:block'));
50
51
 
51
52
  protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
52
-
53
- protected readonly _computedClass = computed(() =>
54
- hlm('gap-1 px-2.5', !this.iconOnly() ? 'sm:pr-2.5' : '', this.userClass()),
55
- );
56
53
  }
@@ -5,8 +5,7 @@ import { NgIcon, provideIcons } from '@ng-icons/core';
5
5
  import { lucideChevronLeft } from '@ng-icons/lucide';
6
6
  import type { ButtonVariants } from '<%- importAlias %>/button';
7
7
  import { HlmIcon } from '<%- importAlias %>/icon';
8
- import { hlm } from '<%- importAlias %>/utils';
9
- import type { ClassValue } from 'clsx';
8
+ import { classes } from '<%- importAlias %>/utils';
10
9
  import { HlmPaginationLink } from './hlm-pagination-link';
11
10
 
12
11
  @Component({
@@ -16,7 +15,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
16
15
  changeDetection: ChangeDetectionStrategy.OnPush,
17
16
  template: `
18
17
  <a
19
- [class]="_computedClass()"
20
18
  hlmPaginationLink
21
19
  [link]="link()"
22
20
  [queryParams]="queryParams()"
@@ -30,7 +28,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
30
28
  `,
31
29
  })
32
30
  export class HlmPaginationPrevious {
33
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
34
31
  /** The link to navigate to the previous page. */
35
32
  public readonly link = input<RouterLink['routerLink']>();
36
33
  /** The query parameters to pass to the previous page. */
@@ -47,10 +44,9 @@ export class HlmPaginationPrevious {
47
44
  transform: booleanAttribute,
48
45
  });
49
46
  protected readonly _labelClass = computed(() => (this.iconOnly() ? 'sr-only' : 'hidden sm:block'));
50
-
51
47
  protected readonly _size = computed<ButtonVariants['size']>(() => (this.iconOnly() ? 'icon' : 'default'));
52
48
 
53
- protected readonly _computedClass = computed(() =>
54
- hlm('gap-1 px-2.5', !this.iconOnly() ? 'sm:pl-2.5' : '', this.userClass()),
55
- );
49
+ constructor() {
50
+ classes(() => ['gap-1 px-2.5', !this.iconOnly() ? 'sm:pl-2.5' : '']);
51
+ }
56
52
  }
@@ -1,20 +1,19 @@
1
- import { Directive, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { Directive, input } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Directive({
6
5
  selector: '[hlmPagination],hlm-pagination',
7
6
  host: {
8
7
  'data-slot': 'pagination',
9
8
  role: 'navigation',
10
- '[class]': '_computedClass()',
11
9
  '[attr.aria-label]': 'ariaLabel()',
12
10
  },
13
11
  })
14
12
  export class HlmPagination {
15
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
- protected readonly _computedClass = computed(() => hlm('mx-auto flex w-full justify-center', this.userClass()));
17
-
18
13
  /** The aria-label for the pagination component. */
19
14
  public readonly ariaLabel = input<string>('pagination', { alias: 'aria-label' });
15
+
16
+ constructor() {
17
+ classes(() => 'mx-auto flex w-full justify-center');
18
+ }
20
19
  }
@@ -1,13 +1,9 @@
1
- import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
1
+ import { Directive, ElementRef, Renderer2, effect, inject, 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: '[hlmPopoverContent],[brnPopoverContent][hlm]',
8
- host: {
9
- '[class]': '_computedClass()',
10
- },
11
7
  })
12
8
  export class HlmPopoverContent {
13
9
  private readonly _stateProvider = injectExposesStateProvider({ host: true });
@@ -19,13 +15,10 @@ export class HlmPopoverContent {
19
15
  effect(() => {
20
16
  this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
21
17
  });
22
- }
23
18
 
24
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
25
- protected readonly _computedClass = computed(() =>
26
- hlm(
27
- 'border-border bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative w-72 rounded-md border p-4 shadow-md outline-none',
28
- this.userClass(),
29
- ),
30
- );
19
+ classes(
20
+ () =>
21
+ 'border-border bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative w-72 rounded-md border p-4 shadow-md outline-none',
22
+ );
23
+ }
31
24
  }
@@ -1,28 +1,20 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive, computed } from '@angular/core';
2
2
  import { BrnProgressIndicator, injectBrnProgress } from '@spartan-ng/brain/progress';
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: '[hlmProgressIndicator],hlm-progress-indicator',
8
7
  hostDirectives: [BrnProgressIndicator],
9
- host: {
10
- '[class]': '_computedClass()',
11
- '[class.animate-indeterminate]': '_indeterminate()',
12
- '[style.transform]': '_transform()',
13
- },
8
+ host: { '[class.animate-indeterminate]': '_indeterminate()', '[style.transform]': '_transform()' },
14
9
  })
15
10
  export class HlmProgressIndicator {
16
11
  private readonly _progress = injectBrnProgress();
17
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
18
-
19
- protected readonly _computedClass = computed(() =>
20
- hlm('bg-primary h-full w-full flex-1 transition-all', this.userClass()),
21
- );
22
-
23
12
  protected readonly _transform = computed(() => `translateX(-${100 - (this._progress.value() ?? 100)}%)`);
24
-
25
13
  protected readonly _indeterminate = computed(
26
14
  () => this._progress.value() === null || this._progress.value() === undefined,
27
15
  );
16
+
17
+ constructor() {
18
+ classes(() => 'bg-primary h-full w-full flex-1 transition-all');
19
+ }
28
20
  }
@@ -1,18 +1,13 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnProgress } from '@spartan-ng/brain/progress';
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: 'hlm-progress,[hlmProgress]',
8
7
  hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
8
  })
13
9
  export class HlmProgress {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() =>
16
- hlm('bg-primary/20 relative inline-flex h-2 w-full overflow-hidden rounded-full', this.userClass()),
17
- );
10
+ constructor() {
11
+ classes(() => 'bg-primary/20 relative inline-flex h-2 w-full overflow-hidden rounded-full');
12
+ }
18
13
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnRadioGroup } from '@spartan-ng/brain/radio-group';
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: '[hlmRadioGroup],hlm-radio-group',
@@ -14,10 +13,10 @@ import type { ClassValue } from 'clsx';
14
13
  ],
15
14
  host: {
16
15
  'data-slot': 'radio-group',
17
- '[class]': '_computedClass()',
18
16
  },
19
17
  })
20
18
  export class HlmRadioGroup {
21
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
- protected readonly _computedClass = computed(() => hlm('grid gap-3', this.userClass()));
19
+ constructor() {
20
+ classes(() => 'grid gap-3');
21
+ }
23
22
  }
@@ -1,24 +1,21 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
- import { hlm } from '<%- importAlias %>/utils';
3
- import type { ClassValue } from 'clsx';
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { classes } from '<%- importAlias %>/utils';
4
3
 
5
4
  @Component({
6
5
  selector: 'hlm-radio-indicator',
7
6
  changeDetection: ChangeDetectionStrategy.OnPush,
8
7
  host: {
9
8
  'data-slot': 'radio-group-indicator',
10
- '[class]': '_computedClass()',
11
9
  },
12
10
  template: `
13
11
  <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
14
12
  `,
15
13
  })
16
14
  export class HlmRadioIndicator {
17
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
18
- protected readonly _computedClass = computed(() =>
19
- hlm(
20
- 'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]',
21
- this.userClass(),
22
- ),
23
- );
15
+ constructor() {
16
+ classes(
17
+ () =>
18
+ 'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]',
19
+ );
20
+ }
24
21
  }
@@ -1,7 +1,6 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnResizableGroup } from '@spartan-ng/brain/resizable';
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: '[hlmResizableGroup],hlm-resizable-group',
@@ -14,13 +13,10 @@ import type { ClassValue } from 'clsx';
14
13
  ],
15
14
  host: {
16
15
  'data-slot': 'resizable-group',
17
- '[class]': '_computedClass()',
18
16
  },
19
17
  })
20
18
  export class HlmResizableGroup {
21
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
-
23
- protected readonly _computedClass = computed(() =>
24
- hlm('group flex h-full w-full data-[panel-group-direction=vertical]:flex-col', this.userClass()),
25
- );
19
+ constructor() {
20
+ classes(() => 'group flex h-full w-full data-[panel-group-direction=vertical]:flex-col');
21
+ }
26
22
  }
@@ -1,10 +1,9 @@
1
- import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
2
2
  import { NgIcon, provideIcons } from '@ng-icons/core';
3
3
  import { lucideGripVertical } from '@ng-icons/lucide';
4
4
  import { BrnResizableHandle } from '@spartan-ng/brain/resizable';
5
5
  import { HlmIcon } from '<%- importAlias %>/icon';
6
- import { hlm } from '<%- importAlias %>/utils';
7
- import type { ClassValue } from 'clsx';
6
+ import { classes } from '<%- importAlias %>/utils';
8
7
 
9
8
  @Component({
10
9
  selector: 'hlm-resizable-handle',
@@ -15,7 +14,6 @@ import type { ClassValue } from 'clsx';
15
14
  hostDirectives: [{ directive: BrnResizableHandle, inputs: ['withHandle', 'disabled'] }],
16
15
  host: {
17
16
  'data-slot': 'resizable-handle',
18
- '[class]': '_computedClass()',
19
17
  },
20
18
  template: `
21
19
  @if (_brnResizableHandle.withHandle()) {
@@ -28,12 +26,10 @@ import type { ClassValue } from 'clsx';
28
26
  export class HlmResizableHandle {
29
27
  protected readonly _brnResizableHandle = inject(BrnResizableHandle);
30
28
 
31
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
32
-
33
- protected readonly _computedClass = computed(() =>
34
- hlm(
35
- 'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=horizontal]:hover:cursor-ew-resize data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:hover:cursor-ns-resize [&[data-panel-group-direction=vertical]>div]:rotate-90',
36
- this.userClass(),
37
- ),
38
- );
29
+ constructor() {
30
+ classes(
31
+ () =>
32
+ 'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=horizontal]:hover:cursor-ew-resize data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:hover:cursor-ns-resize [&[data-panel-group-direction=vertical]>div]:rotate-90',
33
+ );
34
+ }
39
35
  }
@@ -1,7 +1,5 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnResizablePanel } from '@spartan-ng/brain/resizable';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
3
 
6
4
  @Directive({
7
5
  selector: '[hlmResizablePanel],hlm-resizable-panel',
@@ -13,10 +11,6 @@ import type { ClassValue } from 'clsx';
13
11
  ],
14
12
  host: {
15
13
  'data-slot': 'resizable-panel',
16
- '[class]': '_computedClass()',
17
14
  },
18
15
  })
19
- export class HlmResizablePanel {
20
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected readonly _computedClass = computed(() => hlm(this.userClass()));
22
- }
16
+ export class HlmResizablePanel {}
@@ -1,12 +1,10 @@
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: 'ng-scrollbar[hlm],ng-scrollbar[hlmScrollbar]',
7
6
  host: {
8
7
  'data-slot': 'scroll-area',
9
- '[class]': '_computedClass()',
10
8
  '[style.--scrollbar-border-radius]': '100 + "px"',
11
9
  '[style.--scrollbar-offset]': '3',
12
10
  '[style.--scrollbar-thumb-color]': '"var(--border)"',
@@ -15,6 +13,7 @@ import type { ClassValue } from 'clsx';
15
13
  },
16
14
  })
17
15
  export class HlmScrollArea {
18
- protected readonly _computedClass = computed(() => hlm('block', this.userClass()));
19
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
+ constructor() {
17
+ classes(() => 'block');
18
+ }
20
19
  }
@@ -1,29 +1,26 @@
1
1
  import type { BooleanInput } from '@angular/cdk/coercion';
2
- import { Directive, booleanAttribute, computed, input } from '@angular/core';
2
+ import { Directive, booleanAttribute, input } from '@angular/core';
3
3
  import { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';
4
- import { hlm } from '<%- importAlias %>/utils';
5
- import type { ClassValue } from 'clsx';
4
+ import { classes } from '<%- importAlias %>/utils';
6
5
 
7
6
  @Directive({
8
7
  selector: '[hlmSelectContent], hlm-select-content',
9
8
  host: {
10
- '[class]': '_computedClass()',
11
9
  '[attr.data-state]': '_stateProvider?.state() ?? "open"',
12
10
  '[attr.data-side]': '_sideProvider?.side() ?? "bottom"',
13
11
  },
14
12
  })
15
13
  export class HlmSelectContent {
16
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
17
14
  public readonly stickyLabels = input<boolean, BooleanInput>(false, {
18
15
  transform: booleanAttribute,
19
16
  });
20
17
  protected readonly _stateProvider = injectExposesStateProvider({ optional: true });
21
18
  protected readonly _sideProvider = injectExposedSideProvider({ optional: true });
22
19
 
23
- protected readonly _computedClass = computed(() =>
24
- hlm(
25
- 'border-border bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 w-full min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md data-[side=bottom]:top-[2px] data-[side=top]:bottom-[2px]',
26
- this.userClass(),
27
- ),
28
- );
20
+ constructor() {
21
+ classes(
22
+ () =>
23
+ 'border-border bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 w-full min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md data-[side=bottom]:top-[2px] data-[side=top]:bottom-[2px]',
24
+ );
25
+ }
29
26
  }
@@ -1,16 +1,8 @@
1
- import { Directive, computed, input } from '@angular/core';
1
+ import { Directive } from '@angular/core';
2
2
  import { BrnSelectGroup } from '@spartan-ng/brain/select';
3
- import { hlm } from '<%- importAlias %>/utils';
4
- import type { ClassValue } from 'clsx';
5
3
 
6
4
  @Directive({
7
5
  selector: '[hlmSelectGroup], hlm-select-group',
8
6
  hostDirectives: [BrnSelectGroup],
9
- host: {
10
- '[class]': '_computedClass()',
11
- },
12
7
  })
13
- export class HlmSelectGroup {
14
- public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected readonly _computedClass = computed(() => hlm(this.userClass()));
16
- }
8
+ export class HlmSelectGroup {}