@spartan-ng/cli 0.0.1-alpha.335 → 0.0.1-alpha.337

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 (148) hide show
  1. package/package.json +1 -1
  2. package/src/generators/base/versions.d.ts +20 -20
  3. package/src/generators/base/versions.js +20 -20
  4. package/src/generators/ui/generator.js +2 -2
  5. package/src/generators/ui/generator.js.map +1 -1
  6. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.directive.ts.template +3 -8
  7. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +6 -11
  8. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template +9 -9
  9. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +3 -8
  10. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +4 -9
  11. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +3 -8
  12. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.component.ts.template +3 -8
  13. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.directive.ts.template +3 -8
  14. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.component.ts.template +3 -7
  15. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.component.ts.template +3 -7
  16. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.directive.ts.template +3 -7
  17. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.directive.ts.template +3 -7
  18. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +3 -11
  19. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +3 -11
  20. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +3 -11
  21. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +3 -8
  22. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template +10 -6
  23. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +5 -11
  24. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template +3 -11
  25. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +5 -14
  26. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +11 -11
  27. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +3 -11
  28. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +3 -11
  29. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +6 -16
  30. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +6 -15
  31. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +3 -11
  32. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +3 -11
  33. package/src/generators/ui/libs/ui-carousel-helm/files/index.ts.template +26 -0
  34. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +25 -0
  35. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +26 -0
  36. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +62 -0
  37. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +62 -0
  38. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +93 -0
  39. package/src/generators/ui/libs/ui-carousel-helm/generator.d.ts +3 -0
  40. package/src/generators/ui/libs/ui-carousel-helm/generator.js +12 -0
  41. package/src/generators/ui/libs/ui-carousel-helm/generator.js.map +1 -0
  42. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +14 -15
  43. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +29 -17
  44. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +3 -11
  45. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +8 -14
  46. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.directive.ts.template +3 -11
  47. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.directive.ts.template +7 -13
  48. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input-wrapper.component.ts.template +5 -14
  49. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input.directive.ts.template +7 -12
  50. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -10
  51. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.directive.ts.template +7 -12
  52. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.directive.ts.template +3 -11
  53. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.component.ts.template +5 -11
  54. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.directive.ts.template +7 -13
  55. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.directive.ts.template +7 -13
  56. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +6 -11
  57. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +3 -11
  58. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.component.ts.template +5 -11
  59. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.component.ts.template +5 -11
  60. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.directive.ts.template +3 -7
  61. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +5 -11
  62. package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.component.ts.template +2 -7
  63. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +3 -3
  64. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +3 -11
  65. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +5 -10
  66. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +4 -10
  67. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +7 -13
  68. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.component.ts.template +5 -11
  69. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.component.ts.template +12 -14
  70. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +8 -21
  71. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -10
  72. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.component.ts.template +12 -14
  73. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +8 -21
  74. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +6 -14
  75. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +5 -15
  76. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.component.ts.template +5 -11
  77. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +3 -11
  78. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.component.ts.template +5 -11
  79. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +4 -12
  80. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +7 -13
  81. package/src/generators/ui/libs/ui-pagination-helm/files/index.ts.template +33 -0
  82. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +21 -0
  83. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.componet.ts.template +23 -0
  84. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +22 -0
  85. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +56 -0
  86. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.componet.ts.template +31 -0
  87. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.componet.ts.template +31 -0
  88. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +25 -0
  89. package/src/generators/ui/libs/ui-pagination-helm/generator.d.ts +3 -0
  90. package/src/generators/ui/libs/ui-pagination-helm/generator.js +12 -0
  91. package/src/generators/ui/libs/ui-pagination-helm/generator.js.map +1 -0
  92. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +7 -13
  93. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +7 -13
  94. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +5 -11
  95. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +5 -11
  96. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.directive.ts.template +3 -11
  97. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +3 -11
  98. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.directive.ts.template +5 -11
  99. package/src/generators/ui/libs/ui-select-helm/files/index.ts.template +38 -0
  100. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +34 -0
  101. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.directive.ts.template +22 -0
  102. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +38 -0
  103. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +54 -0
  104. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +17 -0
  105. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +17 -0
  106. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +44 -0
  107. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +26 -0
  108. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +21 -0
  109. package/src/generators/ui/libs/ui-select-helm/generator.d.ts +3 -0
  110. package/src/generators/ui/libs/ui-select-helm/generator.js +12 -0
  111. package/src/generators/ui/libs/ui-select-helm/generator.js.map +1 -0
  112. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.directive.ts.template +7 -13
  113. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +7 -13
  114. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +6 -14
  115. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +3 -11
  116. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.component.ts.template +5 -11
  117. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.component.ts.template +3 -11
  118. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +11 -17
  119. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +3 -11
  120. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +3 -11
  121. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +5 -11
  122. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +7 -13
  123. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +19 -14
  124. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-caption.component.ts.template +10 -28
  125. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.component.ts.template +11 -27
  126. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-td.component.ts.template +8 -12
  127. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-th.component.ts.template +22 -23
  128. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-trow.component.ts.template +7 -24
  129. package/src/generators/ui/libs/ui-tabs-helm/files/index.ts.template +8 -1
  130. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +9 -21
  131. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +5 -17
  132. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template +9 -21
  133. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.component.ts.template +17 -0
  134. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template +7 -13
  135. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +5 -11
  136. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template +3 -11
  137. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.directive.ts.template +3 -11
  138. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.directive.ts.template +3 -11
  139. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.directive.ts.template +3 -11
  140. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.directive.ts.template +3 -11
  141. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +3 -11
  142. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.directive.ts.template +3 -11
  143. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.directive.ts.template +3 -11
  144. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.directive.ts.template +3 -11
  145. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.directive.ts.template +3 -11
  146. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.directive.ts.template +3 -11
  147. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.directive.ts.template +3 -11
  148. package/src/generators/ui/supported-ui-libraries.json +115 -82
@@ -1,4 +1,14 @@
1
- import { booleanAttribute, Component, computed, EventEmitter, forwardRef, Input, Output, signal } from '@angular/core';
1
+ import {
2
+ Component,
3
+ EventEmitter,
4
+ Input,
5
+ Output,
6
+ booleanAttribute,
7
+ computed,
8
+ forwardRef,
9
+ input,
10
+ signal,
11
+ } from '@angular/core';
2
12
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
13
  import { BrnCheckboxComponent, indeterminateBooleanAttribute } from '@spartan-ng/ui-checkbox-brain';
4
14
  import { hlm } from '@spartan-ng/ui-core';
@@ -24,7 +34,7 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
24
34
  [disabled]="_disabled()"
25
35
  [id]="id"
26
36
  >
27
- <hlm-checkbox-checkicon [iconName]="_checkIconName()" />
37
+ <hlm-checkbox-checkicon [class]="_checkIconClass()" [iconName]="_checkIconName()" />
28
38
  </brn-checkbox>
29
39
  `,
30
40
  host: {
@@ -37,17 +47,28 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
37
47
  providers: [HLM_CHECKBOX_VALUE_ACCESSOR],
38
48
  })
39
49
  export class HlmCheckboxComponent {
40
- private readonly _userCls = signal<ClassValue>('');
41
- @Input()
42
- set class(userCls: ClassValue) {
43
- this._userCls.set(userCls);
44
- }
45
- protected readonly _checkIconName = signal<string>('radixCheck');
50
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
51
+ protected _computedClass = computed(() =>
52
+ hlm(
53
+ 'group inline-flex border border-foreground shrink-0 cursor-pointer items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring' +
54
+ ' focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:text-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-background',
55
+ this._disabled() ? 'cursor-not-allowed opacity-50' : '',
56
+ this._userClass(),
57
+ ),
58
+ );
59
+
60
+ protected readonly _checkIconName = signal<string>('lucideCheck');
46
61
  @Input()
47
62
  set checkIconName(checkIconName: string) {
48
63
  this._checkIconName.set(checkIconName);
49
64
  }
50
65
 
66
+ protected readonly _checkIconClass = signal<string>('');
67
+ @Input()
68
+ set checkIconClass(checkIconName: string) {
69
+ this._checkIconClass.set(checkIconName);
70
+ }
71
+
51
72
  @Output()
52
73
  public changed = new EventEmitter<boolean>();
53
74
 
@@ -88,15 +109,6 @@ export class HlmCheckboxComponent {
88
109
  @Input('aria-describedby')
89
110
  ariaDescribedby: string | null = null;
90
111
 
91
- protected _computedClass = computed(() =>
92
- hlm(
93
- 'group inline-flex border border-foreground shrink-0 cursor-pointer items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring' +
94
- ' focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:text-background data-[state=unchecked]:bg-foreground data-[state=checked]:bg-primary data-[state=unchecked]:bg-background',
95
- this._disabled() ? 'cursor-not-allowed opacity-50' : '',
96
- this._userCls(),
97
- ),
98
- );
99
-
100
112
  /** CONROL VALUE ACCESSOR */
101
113
 
102
114
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1,4 +1,4 @@
1
- import { computed, Directive, inject, Input, signal } from '@angular/core';
1
+ import { Directive, computed, inject, input } from '@angular/core';
2
2
  import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
3
3
  import { hlm } from '@spartan-ng/ui-core';
4
4
  import { ClassValue } from 'clsx';
@@ -17,14 +17,6 @@ export class HlmCommandDialogCloseButtonDirective {
17
17
  this._hlmBtn.variant = 'ghost';
18
18
  }
19
19
 
20
- private readonly _userCls = signal<ClassValue>('');
21
- @Input()
22
- set class(userCls: ClassValue) {
23
- this._userCls.set(userCls);
24
- }
25
-
26
- protected _computedClass = computed(() => this._generateClass());
27
- private _generateClass() {
28
- return hlm('!p-1 !h-5 !w-5', this._userCls());
29
- }
20
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
21
+ protected _computedClass = computed(() => hlm('!p-1 !h-5 !w-5', this._userClass()));
30
22
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, effect, ElementRef, inject, Input, Renderer2, signal } from '@angular/core';
1
+ import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
2
2
  import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
  import { HlmCommandDirective } from './hlm-command.directive';
@@ -17,23 +17,17 @@ export class HlmCommandDialogDirective {
17
17
  private _renderer = inject(Renderer2);
18
18
  private _element = inject(ElementRef);
19
19
 
20
- private readonly _userCls = signal<ClassValue>('');
21
- @Input()
22
- set class(userCls: ClassValue) {
23
- this._userCls.set(userCls);
24
- }
20
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
21
+ protected _computedClass = computed(() =>
22
+ hlm(
23
+ '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-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%]',
24
+ this._userClass(),
25
+ ),
26
+ );
25
27
 
26
28
  constructor() {
27
29
  effect(() => {
28
30
  this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
29
31
  });
30
32
  }
31
-
32
- protected _computedClass = computed(() => this._generateClass());
33
- private _generateClass() {
34
- return hlm(
35
- '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-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%]',
36
- this._userCls(),
37
- );
38
- }
39
33
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,14 +10,6 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmCommandEmptyDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm('py-6 text-center text-sm', this._userCls());
22
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() => hlm('py-6 text-center text-sm', this._userClass()));
23
15
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,19 +10,13 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmCommandGroupDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm(
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm(
22
16
  'block [&[cmdk-hidden="true"]]:hidden\n' +
23
17
  '[&_.cmdk-group-label]:px-2 [&_.cmdk-group-label]:py-1.5 [&_.cmdk-group-label]:text-xs [&_.cmdk-group-label]:font-medium [&_.cmdk-group-label]:text-muted-foreground\n' +
24
18
  '[&_.cmdk-group-content]:flex [&_.cmdk-group-content]:flex-col [&_.cmdk-group-content]:flex-col overflow-hidden p-1 text-foreground',
25
- this._userCls(),
26
- );
27
- }
19
+ this._userClass(),
20
+ ),
21
+ );
28
22
  }
@@ -1,4 +1,4 @@
1
- import { Component, Input, computed, signal } from '@angular/core';
1
+ import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -11,17 +11,8 @@ import { ClassValue } from 'clsx';
11
11
  },
12
12
  })
13
13
  export class HlmCommandInputWrapperComponent {
14
- private readonly _userCls = signal<ClassValue>('');
15
- @Input()
16
- set class(userCls: ClassValue) {
17
- this._userCls.set(userCls);
18
- }
19
-
20
- protected _computedClass = computed(() => this._generateClass());
21
- private _generateClass() {
22
- return hlm(
23
- 'flex space-x-2 items-center border-b border-border px-3 [&_hlm-icon]:h-5 [&_hlm-icon]:w-5',
24
- this._userCls(),
25
- );
26
- }
14
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
15
+ protected _computedClass = computed(() =>
16
+ hlm('flex space-x-2 items-center border-b border-border px-3 [&_hlm-icon]:h-5 [&_hlm-icon]:w-5', this._userClass()),
17
+ );
27
18
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,17 +10,12 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmCommandInputDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
18
14
 
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm(
15
+ protected _computedClass = computed(() =>
16
+ hlm(
22
17
  'h-11 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
23
- this._userCls(),
24
- );
25
- }
18
+ this._userClass(),
19
+ ),
20
+ );
26
21
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, inject, Input, signal } from '@angular/core';
1
+ import { computed, Directive, inject, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
4
4
  import { ClassValue } from 'clsx';
@@ -17,14 +17,7 @@ export class HlmCommandItemIconDirective {
17
17
  if (!this._menuIcon) return;
18
18
  this._menuIcon.size = 'none';
19
19
  }
20
- private readonly _userCls = signal<ClassValue>('');
21
- @Input()
22
- set class(userCls: ClassValue) {
23
- this._userCls.set(userCls);
24
- }
25
20
 
26
- protected _computedClass = computed(() => this._generateClass());
27
- private _generateClass() {
28
- return hlm('mr-2 h-4 w-4', this._userCls());
29
- }
21
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
22
+ protected _computedClass = computed(() => hlm('mr-2 h-4 w-4', this._userClass()));
30
23
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, Input, signal } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -14,20 +14,15 @@ import { ClassValue } from 'clsx';
14
14
  },
15
15
  })
16
16
  export class HlmCommandItemDirective {
17
- private readonly _userCls = signal<ClassValue>('');
18
- @Input()
19
- set class(userCls: ClassValue) {
20
- this._userCls.set(userCls);
21
- }
17
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
22
18
 
23
- protected _computedClass = computed(() => this._generateClass());
24
- private _generateClass() {
25
- return hlm(
19
+ protected _computedClass = computed(() =>
20
+ hlm(
26
21
  'items-center relative cursor-default select-none rounded-sm px-2 py-1.5 text-sm outline-none\n' +
27
22
  'aria-selected:bg-accent aria-selected:text-accent-foreground\n' +
28
23
  'hover:bg-accent/50\n' +
29
24
  'disabled:pointer-events-none disabled:opacity-50',
30
- this._userCls(),
31
- );
32
- }
25
+ this._userClass(),
26
+ ),
27
+ );
33
28
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,14 +10,6 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmCommandListDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm('max-h-[300px] overflow-y-auto overflow-x-hidden', this._userCls());
22
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() => hlm('max-h-[300px] overflow-y-auto overflow-x-hidden', this._userClass()));
23
15
  }
@@ -1,4 +1,4 @@
1
- import { Component, Input, computed, signal } from '@angular/core';
1
+ import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -13,14 +13,8 @@ import { ClassValue } from 'clsx';
13
13
  },
14
14
  })
15
15
  export class HlmCommandShortcutComponent {
16
- private readonly _userCls = signal<ClassValue>('');
17
- @Input()
18
- set class(userCls: ClassValue) {
19
- this._userCls.set(userCls);
20
- }
21
-
22
- protected _computedClass = computed(() => this._generateClass());
23
- private _generateClass() {
24
- return hlm('ml-auto font-light text-xs tracking-widest opacity-60', this._userCls());
25
- }
16
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
17
+ protected _computedClass = computed(() =>
18
+ hlm('ml-auto font-light text-xs tracking-widest opacity-60', this._userClass()),
19
+ );
26
20
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,17 +10,11 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmCommandDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm(
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm(
22
16
  'flex h-full w-full flex-col overflow-hidden rounded-md border border-border bg-popover text-popover-foreground',
23
- this._userCls(),
24
- );
25
- }
17
+ this._userClass(),
18
+ ),
19
+ );
26
20
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,17 +10,11 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmDialogCloseDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm(
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm(
22
16
  'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',
23
- this._userCls,
24
- );
25
- }
17
+ this._userClass(),
18
+ ),
19
+ );
26
20
  }
@@ -1,5 +1,5 @@
1
- import { ChangeDetectionStrategy, Component, computed, Input, signal, ViewEncapsulation } from '@angular/core';
2
- import { radixCross1 } from '@ng-icons/radix-icons';
1
+ import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input, signal } from '@angular/core';
2
+ import { lucideX } from '@ng-icons/lucide';
3
3
  import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
4
4
  import { BrnDialogCloseDirective } from '@spartan-ng/ui-dialog-brain';
5
5
  import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
@@ -10,7 +10,7 @@ import { HlmDialogCloseDirective } from './hlm-dialog-close.directive';
10
10
  selector: 'hlm-dialog-content',
11
11
  standalone: true,
12
12
  imports: [BrnDialogCloseDirective, HlmDialogCloseDirective, HlmIconComponent],
13
- providers: [provideIcons({ radixCross1 })],
13
+ providers: [provideIcons({ lucideX })],
14
14
  host: {
15
15
  '[class]': '_computedClass()',
16
16
  '[attr.data-state]': 'state()',
@@ -19,7 +19,7 @@ import { HlmDialogCloseDirective } from './hlm-dialog-close.directive';
19
19
  <ng-content />
20
20
  <button brnDialogClose hlm>
21
21
  <span class="sr-only">Close</span>
22
- <hlm-icon class="flex h-4 w-4" size="100%" name="radixCross1" />
22
+ <hlm-icon class="flex h-4 w-4" size="100%" name="lucideX" />
23
23
  </button>
24
24
  `,
25
25
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -29,16 +29,11 @@ export class HlmDialogContentComponent {
29
29
  private readonly _statusProvider = injectExposesStateProvider({ host: true });
30
30
  public readonly state = this._statusProvider.state ?? signal('closed').asReadonly();
31
31
 
32
- private readonly _userCls = signal<ClassValue>('');
32
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
33
33
  protected readonly _computedClass = computed(() =>
34
34
  hlm(
35
35
  'border-border grid w-full max-w-lg relative gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] sm:rounded-lg md:w-full',
36
- this._userCls(),
36
+ this._userClass(),
37
37
  ),
38
38
  );
39
-
40
- @Input()
41
- set class(userCls: ClassValue) {
42
- this._userCls.set(userCls);
43
- }
44
39
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, Input, signal } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnDialogDescriptionDirective } from '@spartan-ng/ui-dialog-brain';
4
4
  import { ClassValue } from 'clsx';
@@ -12,14 +12,6 @@ import { ClassValue } from 'clsx';
12
12
  hostDirectives: [BrnDialogDescriptionDirective],
13
13
  })
14
14
  export class HlmDialogDescriptionDirective {
15
- private readonly _userCls = signal<ClassValue>('');
16
- @Input()
17
- set class(userCls: ClassValue) {
18
- this._userCls.set(userCls);
19
- }
20
-
21
- protected _computedClass = computed(() => this._generateClass());
22
- private _generateClass() {
23
- return hlm('text-sm text-muted-foreground', this._userCls());
24
- }
15
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected _computedClass = computed(() => hlm('text-sm text-muted-foreground', this._userClass()));
25
17
  }
@@ -1,4 +1,4 @@
1
- import { Component, Input, computed, signal } from '@angular/core';
1
+ import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -13,14 +13,8 @@ import { ClassValue } from 'clsx';
13
13
  },
14
14
  })
15
15
  export class HlmDialogFooterComponent {
16
- private readonly _userCls = signal<ClassValue>('');
17
- @Input()
18
- set class(userCls: ClassValue) {
19
- this._userCls.set(userCls);
20
- }
21
-
22
- protected _computedClass = computed(() => this._generateClass());
23
- private _generateClass() {
24
- return hlm('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this._userCls());
25
- }
16
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
17
+ protected _computedClass = computed(() =>
18
+ hlm('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this._userClass()),
19
+ );
26
20
  }
@@ -1,4 +1,4 @@
1
- import { Component, Input, computed, signal } from '@angular/core';
1
+ import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -13,14 +13,8 @@ import { ClassValue } from 'clsx';
13
13
  },
14
14
  })
15
15
  export class HlmDialogHeaderComponent {
16
- private readonly _userCls = signal<ClassValue>('');
17
- @Input()
18
- set class(userCls: ClassValue) {
19
- this._userCls.set(userCls);
20
- }
21
-
22
- protected _computedClass = computed(() => this._generateClass());
23
- private _generateClass() {
24
- return hlm('flex flex-col space-y-1.5 text-center sm:text-left', this._userCls());
25
- }
16
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
17
+ protected _computedClass = computed(() =>
18
+ hlm('flex flex-col space-y-1.5 text-center sm:text-left', this._userClass()),
19
+ );
26
20
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, effect, Input, signal } from '@angular/core';
1
+ import { computed, Directive, effect, input } from '@angular/core';
2
2
  import { hlm, injectCustomClassSettable } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -9,17 +9,13 @@ import { ClassValue } from 'clsx';
9
9
  export class HlmDialogOverlayDirective {
10
10
  private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });
11
11
 
12
- private readonly _userCls = signal<ClassValue>('');
12
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
13
13
  protected readonly _computedClass = computed(() =>
14
14
  hlm(
15
15
  'bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
16
- this._userCls(),
16
+ this._userClass(),
17
17
  ),
18
18
  );
19
- @Input()
20
- set class(userCls: ClassValue) {
21
- this._userCls.set(userCls);
22
- }
23
19
 
24
20
  constructor() {
25
21
  effect(() => this._classSettable?.setClassToCustomElement(this._computedClass()));
@@ -1,4 +1,4 @@
1
- import { computed, Directive, Input, signal } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnDialogTitleDirective } from '@spartan-ng/ui-dialog-brain';
4
4
  import { ClassValue } from 'clsx';
@@ -12,14 +12,8 @@ import { ClassValue } from 'clsx';
12
12
  hostDirectives: [BrnDialogTitleDirective],
13
13
  })
14
14
  export class HlmDialogTitleDirective {
15
- private readonly _userCls = signal<ClassValue>('');
16
- @Input()
17
- set class(userCls: ClassValue) {
18
- this._userCls.set(userCls);
19
- }
20
-
21
- protected _computedClass = computed(() => this._generateClass());
22
- private _generateClass() {
23
- return hlm('text-lg font-semibold leading-none tracking-tight', this._userCls());
24
- }
15
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected _computedClass = computed(() =>
17
+ hlm('text-lg font-semibold leading-none tracking-tight', this._userClass()),
18
+ );
25
19
  }
@@ -1,4 +1,4 @@
1
- import { Component, computed, effect, ElementRef, inject, Input, Renderer2, signal } from '@angular/core';
1
+ import { Component, computed, effect, ElementRef, inject, input, Renderer2, signal } from '@angular/core';
2
2
  import { hlm, injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -28,7 +28,7 @@ export class HlmHoverCardContentComponent {
28
28
  });
29
29
  }
30
30
 
31
- private readonly _userCls = signal<ClassValue>('');
31
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
32
32
  protected readonly _computedClass = computed(() =>
33
33
  hlm(
34
34
  'z-50 w-64 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none',
@@ -36,9 +36,4 @@ export class HlmHoverCardContentComponent {
36
36
  this._inputs,
37
37
  ),
38
38
  );
39
-
40
- @Input()
41
- set class(userCls: ClassValue) {
42
- this._userCls.set(userCls);
43
- }
44
39
  }
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
2
  import { By } from '@angular/platform-browser';
3
3
  import { NgIconComponent, provideIcons } from '@ng-icons/core';
4
- import { radixCheck } from '@ng-icons/radix-icons';
4
+ import { lucideCheck } from '@ng-icons/lucide';
5
5
  import { RenderResult, render } from '@testing-library/angular';
6
6
  import { HlmIconComponent } from './hlm-icon.component';
7
7
 
@@ -10,9 +10,9 @@ import { HlmIconComponent } from './hlm-icon.component';
10
10
  standalone: true,
11
11
  changeDetection: ChangeDetectionStrategy.OnPush,
12
12
  imports: [HlmIconComponent],
13
- providers: [provideIcons({ radixCheck })],
13
+ providers: [provideIcons({ lucideCheck })],
14
14
  template: `
15
- <hlm-icon class="test" ngIconClass="test2" name="radixCheck" [size]="size" color="red" strokeWidth="2" />
15
+ <hlm-icon class="test" ngIconClass="test2" name="lucideCheck" [size]="size" color="red" strokeWidth="2" />
16
16
  `,
17
17
  })
18
18
  class HlmMockComponent {