@spartan-ng/cli 0.0.1-alpha.336 → 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 +1 -1
  3. package/src/generators/base/versions.js +1 -1
  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 +114 -81
@@ -0,0 +1,21 @@
1
+ import { computed, Directive, Input, signal } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ @Directive({
6
+ // eslint-disable-next-line @angular-eslint/directive-selector
7
+ selector: 'hlm-select, brn-select [hlm]',
8
+ standalone: true,
9
+ host: {
10
+ '[class]': '_computedClass()',
11
+ },
12
+ })
13
+ export class HlmSelectDirective {
14
+ private readonly _classNames = signal<ClassValue>('');
15
+ // eslint-disable-next-line @angular-eslint/no-input-rename
16
+ @Input({ alias: 'class' })
17
+ set _class(classNames: ClassValue) {
18
+ this._classNames.set(classNames);
19
+ }
20
+ protected readonly _computedClass = computed(() => hlm('', this._classNames()));
21
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { HlmBaseGeneratorSchema } from '../../../base/schema';
3
+ export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const generator_1 = require("../../../base/generator");
6
+ function generator(tree, options) {
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ return yield (0, generator_1.default)(tree, Object.assign(Object.assign({}, options), { primitiveName: 'select', internalName: 'ui-select-helm', publicName: 'ui-select-helm' }));
9
+ });
10
+ }
11
+ exports.generator = generator;
12
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-select-helm/generator.ts"],"names":[],"mappings":";;;;AACA,uDAAuD;AAGvD,SAAsB,SAAS,CAAC,IAAU,EAAE,OAA+B;;QAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,kCAC9B,OAAO,KACV,aAAa,EAAE,QAAQ,EACvB,YAAY,EAAE,gBAAgB,EAC9B,UAAU,EAAE,gBAAgB,IAC3B,CAAC;IACJ,CAAC;CAAA;AAPD,8BAOC"}
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, Input, computed, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -17,18 +17,12 @@ export class HlmSeparatorDirective {
17
17
  this._orientation.set(value);
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(
20
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
21
+ protected _computedClass = computed(() =>
22
+ hlm(
29
23
  'inline-flex shrink-0 border-0 bg-border',
30
24
  this._orientation() === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
31
- this._userCls(),
32
- );
33
- }
25
+ this._userClass(),
26
+ ),
27
+ );
34
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,17 +10,11 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmSheetCloseDirective {
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 { Component, computed, effect, ElementRef, inject, Input, Renderer2, signal } from '@angular/core';
2
- import { radixCross1 } from '@ng-icons/radix-icons';
1
+ import { Component, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
2
+ import { lucideX } from '@ng-icons/lucide';
3
3
  import { hlm, injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/ui-core';
4
4
  import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
5
5
  import { BrnSheetCloseDirective } from '@spartan-ng/ui-sheet-brain';
@@ -30,7 +30,7 @@ export const sheetVariants = cva(
30
30
  selector: 'hlm-sheet-content',
31
31
  standalone: true,
32
32
  imports: [HlmSheetCloseDirective, BrnSheetCloseDirective, HlmIconComponent],
33
- providers: [provideIcons({ radixCross1 })],
33
+ providers: [provideIcons({ lucideX })],
34
34
  host: {
35
35
  '[class]': '_computedClass()',
36
36
  '[attr.data-state]': 'state()',
@@ -39,7 +39,7 @@ export const sheetVariants = cva(
39
39
  <ng-content />
40
40
  <button brnSheetClose hlm>
41
41
  <span class="sr-only">Close</span>
42
- <hlm-icon class="flex h-4 w-4" size="100%" name="radixCross1" />
42
+ <hlm-icon class="flex h-4 w-4" size="100%" name="lucideX" />
43
43
  </button>
44
44
  `,
45
45
  })
@@ -56,14 +56,6 @@ export class HlmSheetContentComponent {
56
56
  });
57
57
  }
58
58
 
59
- private readonly _userCls = signal<ClassValue>('');
60
- @Input()
61
- set class(userCls: ClassValue) {
62
- this._userCls.set(userCls);
63
- }
64
-
65
- protected _computedClass = computed(() => this._generateClass());
66
- private _generateClass() {
67
- return hlm(sheetVariants({ side: this._sideProvider.side() }), this._userCls());
68
- }
59
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
60
+ protected _computedClass = computed(() => hlm(sheetVariants({ side: this._sideProvider.side() }), this._userClass()));
69
61
  }
@@ -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 { BrnSheetDescriptionDirective } from '@spartan-ng/ui-sheet-brain';
4
4
  import { ClassValue } from 'clsx';
@@ -12,14 +12,6 @@ import { ClassValue } from 'clsx';
12
12
  hostDirectives: [BrnSheetDescriptionDirective],
13
13
  })
14
14
  export class HlmSheetDescriptionDirective {
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 HlmSheetFooterComponent {
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,6 @@ import { ClassValue } from 'clsx';
13
13
  },
14
14
  })
15
15
  export class HlmSheetHeaderComponent {
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-2 text-center sm:text-left', this._userCls());
25
- }
16
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
17
+ protected _computedClass = computed(() => hlm('flex flex-col space-y-2 text-center sm:text-left', this._userClass()));
26
18
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, effect, input } from '@angular/core';
2
2
  import { hlm, injectCustomClassSettable } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -11,23 +11,17 @@ import { ClassValue } from 'clsx';
11
11
  })
12
12
  export class HlmSheetOverlayDirective {
13
13
  private _classSettable = injectCustomClassSettable({ optional: true, host: true });
14
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
15
+ protected _computedClass = computed(() =>
16
+ hlm(
17
+ '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',
18
+ this._userClass(),
19
+ ),
20
+ );
14
21
 
15
22
  constructor() {
16
- this._classSettable?.setClassToCustomElement(this._computedClass());
17
- }
18
-
19
- private readonly _userCls = signal<ClassValue>('');
20
- @Input()
21
- set class(userCls: ClassValue) {
22
- this._userCls.set(userCls);
23
- this._classSettable?.setClassToCustomElement(this._computedClass());
24
- }
25
-
26
- protected _computedClass = computed(() => this._generateClass());
27
- private _generateClass() {
28
- return hlm(
29
- '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',
30
- this._userCls(),
31
- );
23
+ effect(() => {
24
+ this._classSettable?.setClassToCustomElement(this._computedClass());
25
+ });
32
26
  }
33
27
  }
@@ -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 { BrnSheetTitleDirective } from '@spartan-ng/ui-sheet-brain';
4
4
  import { ClassValue } from 'clsx';
@@ -12,14 +12,6 @@ import { ClassValue } from 'clsx';
12
12
  hostDirectives: [BrnSheetTitleDirective],
13
13
  })
14
14
  export class HlmSheetTitleDirective {
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', this._userCls());
24
- }
15
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
16
+ protected _computedClass = computed(() => hlm('text-lg font-semibold', 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
 
@@ -11,14 +11,6 @@ import { ClassValue } from 'clsx';
11
11
  },
12
12
  })
13
13
  export class HlmSkeletonComponent {
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('block animate-pulse rounded-md bg-muted', this._userCls());
23
- }
14
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
15
+ protected _computedClass = computed(() => hlm('block animate-pulse rounded-md bg-muted', this._userClass()));
24
16
  }
@@ -1,4 +1,4 @@
1
- import { Component, computed, Input, signal } from '@angular/core';
1
+ import { Component, computed, input, Input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { cva, VariantProps } from 'class-variance-authority';
4
4
  import { ClassValue } from 'clsx';
@@ -12,6 +12,8 @@ export const spinnerVariants = cva('inline-block', {
12
12
  xs: 'h-4 w-4',
13
13
  sm: 'h-6 w-6',
14
14
  default: 'w-8 h-8 ',
15
+ lg: 'w-12 h-12',
16
+ xl: 'w-16 h-16',
15
17
  },
16
18
  },
17
19
  defaultVariants: {
@@ -49,14 +51,6 @@ export class HlmSpinnerComponent {
49
51
  this._size.set(value);
50
52
  }
51
53
 
52
- private readonly _userCls = signal<ClassValue>('');
53
- @Input()
54
- set class(userCls: ClassValue) {
55
- this._userCls.set(userCls);
56
- }
57
-
58
- protected _computedClass = computed(() => this._generateClass());
59
- private _generateClass() {
60
- return hlm(spinnerVariants({ size: this._size() }), this._userCls());
61
- }
54
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
55
+ protected _computedClass = computed(() => hlm(spinnerVariants({ size: this._size() }), this._userClass()));
62
56
  }
@@ -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 HlmSwitchThumbDirective {
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 h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform group-data-[state=checked]:translate-x-5 group-data-[state=unchecked]:translate-x-0',
23
- this._userCls(),
24
- );
25
- }
17
+ this._userClass(),
18
+ ),
19
+ );
26
20
  }
@@ -1,4 +1,14 @@
1
- import { Component, EventEmitter, Input, Output, booleanAttribute, computed, forwardRef, 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 { hlm } from '@spartan-ng/ui-core';
4
14
  import { BrnSwitchComponent, BrnSwitchThumbComponent } from '@spartan-ng/ui-switch-brain';
@@ -40,11 +50,14 @@ export const HLM_SWITCH_VALUE_ACCESSOR = {
40
50
  providers: [HLM_SWITCH_VALUE_ACCESSOR],
41
51
  })
42
52
  export class HlmSwitchComponent {
43
- private readonly _userCls = signal<ClassValue>('');
44
- @Input()
45
- set class(userCls: ClassValue) {
46
- this._userCls.set(userCls);
47
- }
53
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
54
+ protected _computedClass = computed(() =>
55
+ hlm(
56
+ 'group inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
57
+ this._disabled() ? 'cursor-not-allowed opacity-50' : '',
58
+ this._userClass(),
59
+ ),
60
+ );
48
61
 
49
62
  @Output()
50
63
  public changed = new EventEmitter<boolean>();
@@ -83,14 +96,6 @@ export class HlmSwitchComponent {
83
96
  @Input('aria-describedby')
84
97
  ariaDescribedby: string | null = null;
85
98
 
86
- protected _computedClass = computed(() =>
87
- hlm(
88
- 'group inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
89
- this._disabled() ? 'cursor-not-allowed opacity-50' : '',
90
- this._userCls(),
91
- ),
92
- );
93
-
94
99
  /** CONROL VALUE ACCESSOR */
95
100
 
96
101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -5,8 +5,7 @@ import {
5
5
  computed,
6
6
  effect,
7
7
  inject,
8
- Input,
9
- signal,
8
+ input,
10
9
  ViewEncapsulation,
11
10
  } from '@angular/core';
12
11
  import { hlm } from '@spartan-ng/ui-core';
@@ -20,7 +19,7 @@ let captionIdSequence = 0;
20
19
  standalone: true,
21
20
  host: {
22
21
  '[class]': '_computedClass()',
23
- '[id]': '_id()',
22
+ '[id]': 'id()',
24
23
  },
25
24
  template: `
26
25
  <ng-content />
@@ -31,41 +30,24 @@ let captionIdSequence = 0;
31
30
  export class HlmCaptionComponent {
32
31
  private readonly _table = inject(HlmTableComponent, { optional: true });
33
32
 
34
- private readonly _hidden = signal(false);
35
- private readonly _userCls = signal<ClassValue>('');
33
+ protected readonly id = input<string | null | undefined>(`${captionIdSequence++}`);
34
+
35
+ private readonly hidden = input(false, { transform: booleanAttribute });
36
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
36
37
  protected readonly _computedClass = computed(() =>
37
38
  hlm(
38
39
  'text-center block mt-4 text-sm text-muted-foreground',
39
- this._hidden() ? 'sr-only' : 'order-last',
40
- this._userCls(),
40
+ this.hidden() ? 'sr-only' : 'order-last',
41
+ this._userClass(),
41
42
  ),
42
43
  );
43
- protected readonly _id = signal<string | null | undefined>(`${captionIdSequence++}`);
44
-
45
- @Input({ transform: booleanAttribute })
46
- public truncate = false;
47
-
48
- @Input()
49
- set class(inputs: ClassValue) {
50
- this._userCls.set(inputs);
51
- }
52
-
53
- @Input()
54
- set id(value: string | null | undefined) {
55
- this._id.set(value);
56
- }
57
-
58
- @Input({ transform: booleanAttribute })
59
- set hidden(value: boolean) {
60
- this._hidden.set(value);
61
- }
62
44
 
63
45
  constructor() {
64
46
  effect(
65
47
  () => {
66
- const id = this._id();
48
+ const id = this.id();
67
49
  if (!this._table) return;
68
- this._table.labeledBy = id;
50
+ this._table.labeledBy.set(id);
69
51
  },
70
52
  { allowSignalWrites: true },
71
53
  );
@@ -1,12 +1,4 @@
1
- import {
2
- booleanAttribute,
3
- ChangeDetectionStrategy,
4
- Component,
5
- computed,
6
- Input,
7
- signal,
8
- ViewEncapsulation,
9
- } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, computed, effect, input, signal, ViewEncapsulation } from '@angular/core';
10
2
  import { hlm } from '@spartan-ng/ui-core';
11
3
  import { ClassValue } from 'clsx';
12
4
 
@@ -16,7 +8,7 @@ import { ClassValue } from 'clsx';
16
8
  host: {
17
9
  '[class]': '_computedClass()',
18
10
  role: 'table',
19
- '[attr.aria-labelledby]': '_labeledBy()',
11
+ '[attr.aria-labelledby]': 'labeledBy()',
20
12
  },
21
13
  template: `
22
14
  <ng-content />
@@ -25,24 +17,16 @@ import { ClassValue } from 'clsx';
25
17
  encapsulation: ViewEncapsulation.None,
26
18
  })
27
19
  export class HlmTableComponent {
28
- @Input({ transform: booleanAttribute })
29
- public truncate = false;
20
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
21
+ protected readonly _computedClass = computed(() =>
22
+ hlm('flex flex-col text-sm [&_hlm-trow:last-child]:border-0', this._userClass()),
23
+ );
30
24
 
31
- private readonly _userCls = signal<ClassValue>('');
32
- @Input()
33
- set class(inputs: ClassValue) {
34
- this._userCls.set(inputs);
35
- }
36
-
37
- protected readonly _labeledBy = signal<string | null | undefined>(undefined);
38
- // eslint-disable-next-line @angular-eslint/no-input-rename
39
- @Input({ alias: 'aria-labelledby' })
40
- set labeledBy(value: string | null | undefined) {
41
- this._labeledBy.set(value);
42
- }
25
+ // we aria-labelledby to be settable from outside but use the input by default.
26
+ private readonly _labeledByInput = input<string | null | undefined>(undefined, { alias: 'aria-labelledby' });
27
+ public readonly labeledBy = signal<string | null | undefined>(undefined);
43
28
 
44
- protected _computedClass = computed(() => this._generateClass());
45
- private _generateClass() {
46
- return hlm('flex flex-col text-sm [&_hlm-trow:last-child]:border-0', this._userCls());
29
+ constructor() {
30
+ effect(() => this.labeledBy.set(this._labeledByInput()), { allowSignalWrites: true });
47
31
  }
48
32
  }
@@ -4,11 +4,12 @@ import {
4
4
  ChangeDetectionStrategy,
5
5
  Component,
6
6
  computed,
7
- Input,
8
- signal,
7
+ inject,
8
+ input,
9
9
  ViewEncapsulation,
10
10
  } from '@angular/core';
11
11
  import { hlm } from '@spartan-ng/ui-core';
12
+ import { BrnColumnDefComponent } from '@spartan-ng/ui-table-brain';
12
13
  import { ClassValue } from 'clsx';
13
14
 
14
15
  @Component({
@@ -22,7 +23,7 @@ import { ClassValue } from 'clsx';
22
23
  <ng-template #content>
23
24
  <ng-content />
24
25
  </ng-template>
25
- @if (truncate) {
26
+ @if (truncate()) {
26
27
  <span class="flex-1 truncate">
27
28
  <ng-container [ngTemplateOutlet]="content" />
28
29
  </span>
@@ -34,16 +35,11 @@ import { ClassValue } from 'clsx';
34
35
  encapsulation: ViewEncapsulation.None,
35
36
  })
36
37
  export class HlmTdComponent {
37
- @Input({ transform: booleanAttribute })
38
- public truncate = false;
38
+ private readonly _columnDef? = inject(BrnColumnDefComponent, { optional: true });
39
+ protected readonly truncate = input(false, { transform: booleanAttribute });
39
40
 
40
- private readonly _userCls = signal<ClassValue>('');
41
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
41
42
  protected readonly _computedClass = computed(() =>
42
- hlm('flex flex-none p-4 items-center [&:has([role=checkbox])]:pr-0', this._userCls()),
43
+ hlm('flex flex-none p-4 items-center [&:has([role=checkbox])]:pr-0', this._columnDef?.class(), this._userClass()),
43
44
  );
44
-
45
- @Input()
46
- set class(inputs: ClassValue) {
47
- this._userCls.set(inputs);
48
- }
49
45
  }