@spartan-ng/cli 0.0.1-alpha.557 → 0.0.1-alpha.558

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 (114) hide show
  1. package/package.json +1 -1
  2. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-content.ts.template +1 -1
  3. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-item.ts.template +3 -3
  4. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion-trigger.ts.template +1 -1
  5. package/src/generators/ui/libs/accordion/files/lib/hlm-accordion.ts.template +1 -1
  6. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-cancel-button.ts.template +1 -1
  7. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-content.ts.template +1 -1
  8. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-description.ts.template +1 -1
  9. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-footer.ts.template +4 -4
  10. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-header.ts.template +4 -4
  11. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-title.ts.template +1 -1
  12. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog.ts.template +6 -6
  13. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +2 -2
  14. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +4 -4
  15. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +5 -5
  16. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +1 -1
  17. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-ellipsis.ts.template +1 -1
  18. package/src/generators/ui/libs/breadcrumb/files/lib/hlm-breadcrumb-separator.ts.template +1 -1
  19. package/src/generators/ui/libs/button-group/files/lib/hlm-button-group-separator.ts.template +1 -1
  20. package/src/generators/ui/libs/calendar/files/lib/hlm-calendar-multi.ts.template +1 -1
  21. package/src/generators/ui/libs/calendar/files/lib/hlm-calendar-range.ts.template +1 -1
  22. package/src/generators/ui/libs/calendar/files/lib/hlm-calendar.ts.template +1 -1
  23. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-next.ts.template +3 -3
  24. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-previous.ts.template +3 -3
  25. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-slide-display.ts.template +4 -4
  26. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel.ts.template +1 -1
  27. package/src/generators/ui/libs/checkbox/files/lib/hlm-checkbox.ts.template +11 -11
  28. package/src/generators/ui/libs/command/files/lib/hlm-command-dialog-close-button.ts.template +1 -1
  29. package/src/generators/ui/libs/command/files/lib/hlm-command-group-label.ts.template +2 -2
  30. package/src/generators/ui/libs/command/files/lib/hlm-command-group.ts.template +2 -2
  31. package/src/generators/ui/libs/command/files/lib/hlm-command-icon.ts.template +1 -1
  32. package/src/generators/ui/libs/command/files/lib/hlm-command-item.ts.template +4 -4
  33. package/src/generators/ui/libs/command/files/lib/hlm-command-list.ts.template +5 -5
  34. package/src/generators/ui/libs/command/files/lib/hlm-command-search-input.ts.template +2 -2
  35. package/src/generators/ui/libs/command/files/lib/hlm-command-search.ts.template +5 -5
  36. package/src/generators/ui/libs/command/files/lib/hlm-command-separator.ts.template +2 -2
  37. package/src/generators/ui/libs/command/files/lib/hlm-command-shortcut.ts.template +2 -2
  38. package/src/generators/ui/libs/command/files/lib/hlm-command.ts.template +4 -4
  39. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker-multi.ts.template +4 -4
  40. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker.ts.template +4 -4
  41. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-range-picker.ts.template +4 -4
  42. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-content.ts.template +1 -1
  43. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-description.ts.template +1 -1
  44. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-footer.ts.template +4 -4
  45. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-header.ts.template +4 -4
  46. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog.ts.template +2 -2
  47. package/src/generators/ui/libs/field/files/lib/hlm-field-error.ts.template +1 -1
  48. package/src/generators/ui/libs/field/files/lib/hlm-field-separator.ts.template +1 -1
  49. package/src/generators/ui/libs/form-field/files/lib/hlm-form-field.ts.template +4 -4
  50. package/src/generators/ui/libs/hover-card/files/lib/hlm-hover-card-content.ts.template +1 -1
  51. package/src/generators/ui/libs/input/files/lib/hlm-input.ts.template +3 -3
  52. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-fake-caret.ts.template +1 -1
  53. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-separator.ts.template +4 -4
  54. package/src/generators/ui/libs/input-otp/files/lib/hlm-input-otp-slot.ts.template +5 -5
  55. package/src/generators/ui/libs/menu/files/lib/hlm-menu-bar-item.ts.template +1 -1
  56. package/src/generators/ui/libs/menu/files/lib/hlm-menu-bar.ts.template +2 -2
  57. package/src/generators/ui/libs/menu/files/lib/hlm-menu-group.ts.template +2 -2
  58. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-check.ts.template +5 -5
  59. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-checkbox.ts.template +3 -3
  60. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-radio-indicator.ts.template +5 -5
  61. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-radio.ts.template +3 -3
  62. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item-sub-indicator.ts.template +5 -5
  63. package/src/generators/ui/libs/menu/files/lib/hlm-menu-item.ts.template +5 -5
  64. package/src/generators/ui/libs/menu/files/lib/hlm-menu-label.ts.template +4 -4
  65. package/src/generators/ui/libs/menu/files/lib/hlm-menu-separator.ts.template +2 -2
  66. package/src/generators/ui/libs/menu/files/lib/hlm-menu-shortcut.ts.template +4 -4
  67. package/src/generators/ui/libs/menu/files/lib/hlm-menu.ts.template +2 -2
  68. package/src/generators/ui/libs/menu/files/lib/hlm-sub-menu.ts.template +2 -2
  69. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-item.ts.template +1 -1
  70. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-link.ts.template +1 -1
  71. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-list.ts.template +3 -3
  72. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu-trigger.ts.template +1 -1
  73. package/src/generators/ui/libs/navigation-menu/files/hlm-navigation-menu.ts.template +3 -3
  74. package/src/generators/ui/libs/pagination/files/lib/hlm-numbered-pagination-query-params.ts.template +13 -13
  75. package/src/generators/ui/libs/pagination/files/lib/hlm-numbered-pagination.ts.template +13 -13
  76. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-ellipsis.ts.template +1 -1
  77. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-next.ts.template +1 -1
  78. package/src/generators/ui/libs/pagination/files/lib/hlm-pagination-previous.ts.template +1 -1
  79. package/src/generators/ui/libs/progress/files/lib/hlm-progress-indicator.ts.template +1 -1
  80. package/src/generators/ui/libs/progress/files/lib/hlm-progress.ts.template +1 -1
  81. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +1 -1
  82. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-indicator.ts.template +1 -1
  83. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio.ts.template +9 -9
  84. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-group.ts.template +4 -4
  85. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-handle.ts.template +5 -5
  86. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-panel.ts.template +4 -4
  87. package/src/generators/ui/libs/select/files/lib/hlm-select-option.ts.template +2 -2
  88. package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-down.ts.template +1 -1
  89. package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-up.ts.template +1 -1
  90. package/src/generators/ui/libs/select/files/lib/hlm-select-trigger.ts.template +1 -1
  91. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-content.ts.template +1 -1
  92. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-description.ts.template +1 -1
  93. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-footer.ts.template +4 -4
  94. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-header.ts.template +4 -4
  95. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-title.ts.template +1 -1
  96. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet.ts.template +2 -2
  97. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-action.ts.template +2 -1
  98. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-button.ts.template +2 -1
  99. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-skeleton.ts.template +10 -11
  100. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-menu-sub-button.ts.template +2 -1
  101. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-trigger.ts.template +4 -4
  102. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar.ts.template +9 -9
  103. package/src/generators/ui/libs/slider/files/lib/hlm-slider.ts.template +4 -4
  104. package/src/generators/ui/libs/sonner/files/lib/hlm-toaster.ts.template +1 -1
  105. package/src/generators/ui/libs/spinner/files/lib/hlm-spinner.ts.template +1 -1
  106. package/src/generators/ui/libs/switch/files/lib/hlm-switch.ts.template +2 -2
  107. package/src/generators/ui/libs/table/files/lib/hlm-table.ts.template +0 -1
  108. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-list.ts.template +2 -2
  109. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-paginated-list.ts.template +4 -4
  110. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs.ts.template +2 -2
  111. package/src/generators/ui/libs/textarea/files/lib/hlm-textarea.ts.template +4 -4
  112. package/src/generators/ui/libs/toggle-group/files/lib/hlm-toggle-group.ts.template +1 -1
  113. package/src/generators/ui/libs/tooltip/files/lib/hlm-tooltip.ts.template +1 -1
  114. package/src/generators/ui/supported-ui-libraries.json +37 -36
@@ -5,9 +5,6 @@ import { ClassValue } from 'clsx';
5
5
 
6
6
  @Directive({
7
7
  selector: 'nav[hlmNavigationMenu]',
8
- host: {
9
- '[class]': '_computedClass()',
10
- },
11
8
  hostDirectives: [
12
9
  {
13
10
  directive: BrnNavigationMenu,
@@ -15,6 +12,9 @@ import { ClassValue } from 'clsx';
15
12
  outputs: ['valueChange'],
16
13
  },
17
14
  ],
15
+ host: {
16
+ '[class]': '_computedClass()',
17
+ },
18
18
  })
19
19
  export class HlmNavigationMenu {
20
20
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -23,6 +23,19 @@ import { HlmPaginationPrevious } from './hlm-pagination-previous';
23
23
 
24
24
  @Component({
25
25
  selector: 'hlm-numbered-pagination-query-params',
26
+ imports: [
27
+ FormsModule,
28
+ HlmPagination,
29
+ HlmPaginationContent,
30
+ HlmPaginationItem,
31
+ HlmPaginationPrevious,
32
+ HlmPaginationNext,
33
+ HlmPaginationLink,
34
+ HlmPaginationEllipsis,
35
+ BrnSelectImports,
36
+ HlmSelectImports,
37
+ ],
38
+ changeDetection: ChangeDetectionStrategy.OnPush,
26
39
  template: `
27
40
  <div class="flex items-center justify-between gap-2 px-4 py-2">
28
41
  <div class="flex items-center gap-1 text-sm text-nowrap text-gray-600">
@@ -87,19 +100,6 @@ import { HlmPaginationPrevious } from './hlm-pagination-previous';
87
100
  </brn-select>
88
101
  </div>
89
102
  `,
90
- imports: [
91
- FormsModule,
92
- HlmPagination,
93
- HlmPaginationContent,
94
- HlmPaginationItem,
95
- HlmPaginationPrevious,
96
- HlmPaginationNext,
97
- HlmPaginationLink,
98
- HlmPaginationEllipsis,
99
- BrnSelectImports,
100
- HlmSelectImports,
101
- ],
102
- changeDetection: ChangeDetectionStrategy.OnPush,
103
103
  })
104
104
  export class HlmNumberedPaginationQueryParams {
105
105
  /**
@@ -22,6 +22,19 @@ import { HlmPaginationPrevious } from './hlm-pagination-previous';
22
22
 
23
23
  @Component({
24
24
  selector: 'hlm-numbered-pagination',
25
+ imports: [
26
+ FormsModule,
27
+ HlmPagination,
28
+ HlmPaginationContent,
29
+ HlmPaginationItem,
30
+ HlmPaginationPrevious,
31
+ HlmPaginationNext,
32
+ HlmPaginationLink,
33
+ HlmPaginationEllipsis,
34
+ BrnSelectImports,
35
+ HlmSelectImports,
36
+ ],
37
+ changeDetection: ChangeDetectionStrategy.OnPush,
25
38
  template: `
26
39
  <div class="flex items-center justify-between gap-2 px-4 py-2">
27
40
  <div class="flex items-center gap-1 text-sm text-nowrap text-gray-600">
@@ -72,19 +85,6 @@ import { HlmPaginationPrevious } from './hlm-pagination-previous';
72
85
  </brn-select>
73
86
  </div>
74
87
  `,
75
- imports: [
76
- FormsModule,
77
- HlmPagination,
78
- HlmPaginationContent,
79
- HlmPaginationItem,
80
- HlmPaginationPrevious,
81
- HlmPaginationNext,
82
- HlmPaginationLink,
83
- HlmPaginationEllipsis,
84
- BrnSelectImports,
85
- HlmSelectImports,
86
- ],
87
- changeDetection: ChangeDetectionStrategy.OnPush,
88
88
  })
89
89
  export class HlmNumberedPagination {
90
90
  /**
@@ -9,13 +9,13 @@ import type { ClassValue } from 'clsx';
9
9
  selector: 'hlm-pagination-ellipsis',
10
10
  imports: [NgIcon, HlmIcon],
11
11
  providers: [provideIcons({ lucideEllipsis })],
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
13
  template: `
13
14
  <span [class]="_computedClass()">
14
15
  <ng-icon hlm size="sm" name="lucideEllipsis" />
15
16
  <span class="sr-only">{{ srOnlyText() }}</span>
16
17
  </span>
17
18
  `,
18
- changeDetection: ChangeDetectionStrategy.OnPush,
19
19
  })
20
20
  export class HlmPaginationEllipsis {
21
21
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -13,6 +13,7 @@ import { HlmPaginationLink } from './hlm-pagination-link';
13
13
  selector: 'hlm-pagination-next',
14
14
  imports: [HlmPaginationLink, NgIcon, HlmIcon],
15
15
  providers: [provideIcons({ lucideChevronRight })],
16
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
17
  template: `
17
18
  <a
18
19
  [class]="_computedClass()"
@@ -27,7 +28,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
27
28
  <ng-icon hlm size="sm" name="lucideChevronRight" />
28
29
  </a>
29
30
  `,
30
- changeDetection: ChangeDetectionStrategy.OnPush,
31
31
  })
32
32
  export class HlmPaginationNext {
33
33
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -13,6 +13,7 @@ import { HlmPaginationLink } from './hlm-pagination-link';
13
13
  selector: 'hlm-pagination-previous',
14
14
  imports: [HlmPaginationLink, NgIcon, HlmIcon],
15
15
  providers: [provideIcons({ lucideChevronLeft })],
16
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
17
  template: `
17
18
  <a
18
19
  [class]="_computedClass()"
@@ -27,7 +28,6 @@ import { HlmPaginationLink } from './hlm-pagination-link';
27
28
  <span [class]="_labelClass()">{{ text() }}</span>
28
29
  </a>
29
30
  `,
30
- changeDetection: ChangeDetectionStrategy.OnPush,
31
31
  })
32
32
  export class HlmPaginationPrevious {
33
33
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -5,12 +5,12 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Directive({
7
7
  selector: '[hlmProgressIndicator],hlm-progress-indicator',
8
+ hostDirectives: [BrnProgressIndicator],
8
9
  host: {
9
10
  '[class]': '_computedClass()',
10
11
  '[class.animate-indeterminate]': '_indeterminate()',
11
12
  '[style.transform]': '_transform()',
12
13
  },
13
- hostDirectives: [BrnProgressIndicator],
14
14
  })
15
15
  export class HlmProgressIndicator {
16
16
  private readonly _progress = injectBrnProgress();
@@ -5,10 +5,10 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Directive({
7
7
  selector: 'hlm-progress,[hlmProgress]',
8
+ hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],
8
9
  host: {
9
10
  '[class]': '_computedClass()',
10
11
  },
11
- hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],
12
12
  })
13
13
  export class HlmProgress {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -5,6 +5,7 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Component({
7
7
  selector: 'hlm-radio-group',
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
8
9
  hostDirectives: [
9
10
  {
10
11
  directive: BrnRadioGroup,
@@ -17,7 +18,6 @@ import type { ClassValue } from 'clsx';
17
18
  '[class]': '_computedClass()',
18
19
  },
19
20
  template: '<ng-content />',
20
- changeDetection: ChangeDetectionStrategy.OnPush,
21
21
  })
22
22
  export class HlmRadioGroup {
23
23
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -4,6 +4,7 @@ import type { ClassValue } from 'clsx';
4
4
 
5
5
  @Component({
6
6
  selector: 'hlm-radio-indicator',
7
+ changeDetection: ChangeDetectionStrategy.OnPush,
7
8
  host: {
8
9
  'data-slot': 'radio-group-indicator',
9
10
  '[class]': '_computedClass()',
@@ -11,7 +12,6 @@ import type { ClassValue } from 'clsx';
11
12
  template: `
12
13
  <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
13
14
  `,
14
- changeDetection: ChangeDetectionStrategy.OnPush,
15
15
  })
16
16
  export class HlmRadioIndicator {
17
17
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -19,6 +19,15 @@ import type { ClassValue } from 'clsx';
19
19
  @Component({
20
20
  selector: 'hlm-radio',
21
21
  imports: [BrnRadio],
22
+ changeDetection: ChangeDetectionStrategy.OnPush,
23
+ host: {
24
+ '[attr.id]': 'null',
25
+ '[attr.aria-label]': 'null',
26
+ '[attr.aria-labelledby]': 'null',
27
+ '[attr.aria-describedby]': 'null',
28
+ '[attr.data-disabled]': 'disabled() ? "" : null',
29
+ 'data-slot': 'radio-group-item',
30
+ },
22
31
  template: `
23
32
  <brn-radio
24
33
  [id]="id()"
@@ -35,15 +44,6 @@ import type { ClassValue } from 'clsx';
35
44
  <ng-content />
36
45
  </brn-radio>
37
46
  `,
38
- changeDetection: ChangeDetectionStrategy.OnPush,
39
- host: {
40
- '[attr.id]': 'null',
41
- '[attr.aria-label]': 'null',
42
- '[attr.aria-labelledby]': 'null',
43
- '[attr.aria-describedby]': 'null',
44
- '[attr.data-disabled]': 'disabled() ? "" : null',
45
- 'data-slot': 'radio-group-item',
46
- },
47
47
  })
48
48
  export class HlmRadio<T = unknown> {
49
49
  private readonly _document = inject(DOCUMENT);
@@ -5,6 +5,7 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Component({
7
7
  selector: 'hlm-resizable-group',
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
8
9
  hostDirectives: [
9
10
  {
10
11
  directive: BrnResizableGroup,
@@ -12,13 +13,12 @@ import type { ClassValue } from 'clsx';
12
13
  outputs: ['dragEnd', 'dragStart', 'layoutChange'],
13
14
  },
14
15
  ],
15
- template: `
16
- <ng-content />
17
- `,
18
16
  host: {
19
17
  '[class]': '_computedClass()',
20
18
  },
21
- changeDetection: ChangeDetectionStrategy.OnPush,
19
+ template: `
20
+ <ng-content />
21
+ `,
22
22
  })
23
23
  export class HlmResizableGroup {
24
24
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -11,9 +11,13 @@ import { hlm } from '<%- importAlias %>/utils';
11
11
  @Component({
12
12
  selector: 'hlm-resizable-handle',
13
13
  exportAs: 'hlmResizableHandle',
14
- hostDirectives: [{ directive: BrnResizableHandle, inputs: ['withHandle', 'disabled'] }],
14
+ imports: [NgIcon, HlmIcon],
15
15
  providers: [provideIcons({ lucideGripVertical })],
16
16
  changeDetection: ChangeDetectionStrategy.OnPush,
17
+ hostDirectives: [{ directive: BrnResizableHandle, inputs: ['withHandle', 'disabled'] }],
18
+ host: {
19
+ '[class]': '_computedClass()',
20
+ },
17
21
  template: `
18
22
  @if (_brnResizableHandle.withHandle()) {
19
23
  <div class="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border">
@@ -21,10 +25,6 @@ import { hlm } from '<%- importAlias %>/utils';
21
25
  </div>
22
26
  }
23
27
  `,
24
- host: {
25
- '[class]': '_computedClass()',
26
- },
27
- imports: [NgIcon, HlmIcon],
28
28
  })
29
29
  export class HlmResizableHandle {
30
30
  protected readonly _brnResizableHandle = inject(BrnResizableHandle);
@@ -5,19 +5,19 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Component({
7
7
  selector: 'hlm-resizable-panel',
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
8
9
  hostDirectives: [
9
10
  {
10
11
  directive: BrnResizablePanel,
11
12
  inputs: ['defaultSize', 'id', 'collapsible', 'maxSize', 'minSize'],
12
13
  },
13
14
  ],
14
- template: `
15
- <ng-content />
16
- `,
17
15
  host: {
18
16
  '[class]': '_computedClass()',
19
17
  },
20
- changeDetection: ChangeDetectionStrategy.OnPush,
18
+ template: `
19
+ <ng-content />
20
+ `,
21
21
  })
22
22
  export class HlmResizablePanel {
23
23
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -8,9 +8,10 @@ import type { ClassValue } from 'clsx';
8
8
 
9
9
  @Component({
10
10
  selector: 'hlm-option',
11
+ imports: [NgIcon, HlmIcon],
12
+ providers: [provideIcons({ lucideCheck })],
11
13
  changeDetection: ChangeDetectionStrategy.OnPush,
12
14
  hostDirectives: [{ directive: BrnSelectOption, inputs: ['disabled', 'value'] }],
13
- providers: [provideIcons({ lucideCheck })],
14
15
  host: {
15
16
  '[class]': '_computedClass()',
16
17
  },
@@ -23,7 +24,6 @@ import type { ClassValue } from 'clsx';
23
24
 
24
25
  <ng-content />
25
26
  `,
26
- imports: [NgIcon, HlmIcon],
27
27
  })
28
28
  export class HlmSelectOption {
29
29
  protected readonly _brnSelectOption = inject(BrnSelectOption, { host: true });
@@ -9,13 +9,13 @@ import type { ClassValue } from 'clsx';
9
9
  selector: 'hlm-select-scroll-down',
10
10
  imports: [NgIcon, HlmIcon],
11
11
  providers: [provideIcons({ lucideChevronDown })],
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
13
  host: {
13
14
  '[class]': '_computedClass()',
14
15
  },
15
16
  template: `
16
17
  <ng-icon hlm size="sm" class="ml-2" name="lucideChevronDown" />
17
18
  `,
18
- changeDetection: ChangeDetectionStrategy.OnPush,
19
19
  })
20
20
  export class HlmSelectScrollDown {
21
21
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -9,13 +9,13 @@ import type { ClassValue } from 'clsx';
9
9
  selector: 'hlm-select-scroll-up',
10
10
  imports: [NgIcon, HlmIcon],
11
11
  providers: [provideIcons({ lucideChevronUp })],
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
13
  host: {
13
14
  '[class]': '_computedClass()',
14
15
  },
15
16
  template: `
16
17
  <ng-icon hlm size="sm" class="ml-2" name="lucideChevronUp" />
17
18
  `,
18
- changeDetection: ChangeDetectionStrategy.OnPush,
19
19
  })
20
20
  export class HlmSelectScrollUp {
21
21
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -26,6 +26,7 @@ export const selectTriggerVariants = cva(
26
26
  selector: 'hlm-select-trigger',
27
27
  imports: [BrnSelectTrigger, NgIcon, HlmIcon],
28
28
  providers: [provideIcons({ lucideChevronDown })],
29
+ changeDetection: ChangeDetectionStrategy.OnPush,
29
30
  template: `
30
31
  <button [class]="_computedClass()" #button hlmInput brnSelectTrigger type="button" [attr.data-size]="size()">
31
32
  <ng-content />
@@ -36,7 +37,6 @@ export const selectTriggerVariants = cva(
36
37
  }
37
38
  </button>
38
39
  `,
39
- changeDetection: ChangeDetectionStrategy.OnPush,
40
40
  })
41
41
  export class HlmSelectTrigger {
42
42
  protected readonly _icon = contentChild(HlmIcon);
@@ -42,6 +42,7 @@ export const sheetVariants = cva(
42
42
  selector: 'hlm-sheet-content',
43
43
  imports: [HlmSheetClose, BrnSheetClose, NgIcon, HlmIcon],
44
44
  providers: [provideIcons({ lucideX })],
45
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
46
  host: {
46
47
  '[class]': '_computedClass()',
47
48
  '[attr.data-state]': 'state()',
@@ -53,7 +54,6 @@ export const sheetVariants = cva(
53
54
  <ng-icon hlm size="sm" name="lucideX" />
54
55
  </button>
55
56
  `,
56
- changeDetection: ChangeDetectionStrategy.OnPush,
57
57
  })
58
58
  export class HlmSheetContent {
59
59
  private readonly _stateProvider = injectExposesStateProvider({ host: true });
@@ -5,10 +5,10 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Directive({
7
7
  selector: '[hlmSheetDescription]',
8
+ hostDirectives: [BrnSheetDescription],
8
9
  host: {
9
10
  '[class]': '_computedClass()',
10
11
  },
11
- hostDirectives: [BrnSheetDescription],
12
12
  })
13
13
  export class HlmSheetDescription {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -4,13 +4,13 @@ import type { ClassValue } from 'clsx';
4
4
 
5
5
  @Component({
6
6
  selector: 'hlm-sheet-footer',
7
- template: `
8
- <ng-content />
9
- `,
7
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
8
  host: {
11
9
  '[class]': '_computedClass()',
12
10
  },
13
- changeDetection: ChangeDetectionStrategy.OnPush,
11
+ template: `
12
+ <ng-content />
13
+ `,
14
14
  })
15
15
  export class HlmSheetFooter {
16
16
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -4,13 +4,13 @@ import type { ClassValue } from 'clsx';
4
4
 
5
5
  @Component({
6
6
  selector: 'hlm-sheet-header',
7
- template: `
8
- <ng-content />
9
- `,
7
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
8
  host: {
11
9
  '[class]': '_computedClass()',
12
10
  },
13
- changeDetection: ChangeDetectionStrategy.OnPush,
11
+ template: `
12
+ <ng-content />
13
+ `,
14
14
  })
15
15
  export class HlmSheetHeader {
16
16
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -5,10 +5,10 @@ import type { ClassValue } from 'clsx';
5
5
 
6
6
  @Directive({
7
7
  selector: '[hlmSheetTitle]',
8
+ hostDirectives: [BrnSheetTitle],
8
9
  host: {
9
10
  '[class]': '_computedClass()',
10
11
  },
11
- hostDirectives: [BrnSheetTitle],
12
12
  })
13
13
  export class HlmSheetTitle {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -5,6 +5,7 @@ import { HlmSheetOverlay } from './hlm-sheet-overlay';
5
5
 
6
6
  @Component({
7
7
  selector: 'hlm-sheet',
8
+ exportAs: 'hlmSheet',
8
9
  imports: [BrnSheetOverlay, HlmSheetOverlay],
9
10
  providers: [
10
11
  {
@@ -19,11 +20,10 @@ import { HlmSheetOverlay } from './hlm-sheet-overlay';
19
20
  // add custom options here
20
21
  }),
21
22
  ],
23
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
24
  template: `
23
25
  <brn-sheet-overlay hlm />
24
26
  <ng-content />
25
27
  `,
26
- changeDetection: ChangeDetectionStrategy.OnPush,
27
- exportAs: 'hlmSheet',
28
28
  })
29
29
  export class HlmSheet extends BrnSheet {}
@@ -1,3 +1,4 @@
1
+ import { type BooleanInput } from '@angular/cdk/coercion';
1
2
  import { booleanAttribute, computed, Directive, input } from '@angular/core';
2
3
  import { hlm } from '<%- importAlias %>/utils';
3
4
  import type { ClassValue } from 'clsx';
@@ -12,7 +13,7 @@ import type { ClassValue } from 'clsx';
12
13
  })
13
14
  export class HlmSidebarMenuAction {
14
15
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- public readonly showOnHover = input<boolean, boolean>(false, { transform: booleanAttribute });
16
+ public readonly showOnHover = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
16
17
  protected readonly _computedClass = computed(() =>
17
18
  hlm(
18
19
  'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none hover:cursor-pointer focus-visible:ring-2 disabled:hover:cursor-default [&>_ng-icon]:size-4 [&>_ng-icon]:shrink-0',
@@ -1,3 +1,4 @@
1
+ import { type BooleanInput } from '@angular/cdk/coercion';
1
2
  import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';
2
3
  import { BrnTooltipTrigger, provideBrnTooltipDefaultOptions } from '@spartan-ng/brain/tooltip';
3
4
  import { DEFAULT_TOOLTIP_CONTENT_CLASSES } from '<%- importAlias %>/tooltip';
@@ -58,7 +59,7 @@ export class HlmSidebarMenuButton {
58
59
 
59
60
  public readonly variant = input<'default' | 'outline'>('default');
60
61
  public readonly size = input<'default' | 'sm' | 'lg'>('default');
61
- public readonly isActive = input<boolean, boolean>(false, { transform: booleanAttribute });
62
+ public readonly isActive = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
62
63
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
63
64
 
64
65
  protected readonly _isTooltipHidden = computed(
@@ -1,12 +1,19 @@
1
+ import { type BooleanInput } from '@angular/cdk/coercion';
1
2
  import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
3
  import { HlmSkeletonImports } from '<%- importAlias %>/skeleton';
3
4
  import { hlm } from '<%- importAlias %>/utils';
4
5
  import type { ClassValue } from 'clsx';
5
6
 
6
7
  @Component({
7
- // eslint-disable-next-line @angular-eslint/component-selector
8
- selector: 'div[hlmSidebarMenuSkeleton]',
8
+ selector: 'hlm-sidebar-menu-skeleton,div[hlmSidebarMenuSkeleton]',
9
+ imports: [HlmSkeletonImports],
9
10
  changeDetection: ChangeDetectionStrategy.OnPush,
11
+ host: {
12
+ 'data-slot': 'sidebar-menu-skeleton',
13
+ 'data-sidebar': 'menu-skeleton',
14
+ '[class]': '_computedClass()',
15
+ '[style.--skeleton-width]': '_width',
16
+ },
10
17
  template: `
11
18
  @if (showIcon()) {
12
19
  <hlm-skeleton data-sidebar="menu-skeleton-icon" class="size-4 rounded-md" />
@@ -14,17 +21,9 @@ import type { ClassValue } from 'clsx';
14
21
  <hlm-skeleton data-sidebar="menu-skeleton-text" class="h-4 max-w-[var(--skeleton-width)] flex-1" />
15
22
  }
16
23
  `,
17
- host: {
18
- 'data-slot': 'sidebar-menu-skeleton',
19
- 'data-sidebar': 'menu-skeleton',
20
- '[class]': '_computedClass()',
21
- '[style.--skeleton-width]': '_width',
22
- },
23
-
24
- imports: [HlmSkeletonImports],
25
24
  })
26
25
  export class HlmSidebarMenuSkeleton {
27
- public readonly showIcon = input<boolean, boolean>(false, { transform: booleanAttribute });
26
+ public readonly showIcon = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
28
27
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
29
28
  protected readonly _computedClass = computed(() =>
30
29
  hlm('flex h-8 items-center gap-2 rounded-md px-2', this.userClass()),
@@ -1,3 +1,4 @@
1
+ import { type BooleanInput } from '@angular/cdk/coercion';
1
2
  import { booleanAttribute, computed, Directive, input } from '@angular/core';
2
3
  import { hlm } from '<%- importAlias %>/utils';
3
4
  import type { ClassValue } from 'clsx';
@@ -14,7 +15,7 @@ import type { ClassValue } from 'clsx';
14
15
  })
15
16
  export class HlmSidebarMenuSubButton {
16
17
  public readonly size = input<'sm' | 'md'>('md');
17
- public readonly isActive = input<boolean, boolean>(false, { transform: booleanAttribute });
18
+ public readonly isActive = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
18
19
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
19
20
  protected readonly _computedClass = computed(() =>
20
21
  hlm(
@@ -8,12 +8,9 @@ import { HlmSidebarService } from './hlm-sidebar.service';
8
8
  @Component({
9
9
  // eslint-disable-next-line @angular-eslint/component-selector
10
10
  selector: 'button[hlmSidebarTrigger]',
11
- changeDetection: ChangeDetectionStrategy.OnPush,
12
11
  imports: [HlmIcon, NgIcon],
13
12
  providers: [provideIcons({ lucidePanelLeft }), provideBrnButtonConfig({ variant: 'ghost', size: 'icon' })],
14
- template: `
15
- <ng-icon hlm name="lucidePanelLeft" size="sm"></ng-icon>
16
- `,
13
+ changeDetection: ChangeDetectionStrategy.OnPush,
17
14
  hostDirectives: [
18
15
  {
19
16
  directive: HlmButton,
@@ -24,6 +21,9 @@ import { HlmSidebarService } from './hlm-sidebar.service';
24
21
  'data-sidebar': 'trigger',
25
22
  '(click)': '_onClick()',
26
23
  },
24
+ template: `
25
+ <ng-icon hlm name="lucidePanelLeft" size="sm"></ng-icon>
26
+ `,
27
27
  })
28
28
  export class HlmSidebarTrigger {
29
29
  private readonly _hlmBtn = inject(HlmButton);
@@ -10,6 +10,15 @@ import { injectHlmSidebarConfig } from './hlm-sidebar.token';
10
10
  @Component({
11
11
  selector: 'hlm-sidebar',
12
12
  imports: [HlmSheet, HlmSheetContent, NgTemplateOutlet, BrnSheetContent],
13
+ changeDetection: ChangeDetectionStrategy.OnPush,
14
+ host: {
15
+ '[attr.data-slot]': '_dataSlot()',
16
+ '[class]': '_computedClass()',
17
+ '[attr.data-state]': '_dataState()',
18
+ '[attr.data-collapsible]': '_dataCollapsible()',
19
+ '[attr.data-variant]': '_dataVariant()',
20
+ '[attr.data-side]': '_dataSide()',
21
+ },
13
22
  template: `
14
23
  <ng-template #contentContainer>
15
24
  <ng-content></ng-content>
@@ -50,15 +59,6 @@ import { injectHlmSidebarConfig } from './hlm-sidebar.token';
50
59
  </div>
51
60
  }
52
61
  `,
53
- changeDetection: ChangeDetectionStrategy.OnPush,
54
- host: {
55
- '[attr.data-slot]': '_dataSlot()',
56
- '[class]': '_computedClass()',
57
- '[attr.data-state]': '_dataState()',
58
- '[attr.data-collapsible]': '_dataCollapsible()',
59
- '[attr.data-variant]': '_dataVariant()',
60
- '[attr.data-side]': '_dataSide()',
61
- },
62
62
  })
63
63
  export class HlmSidebar {
64
64
  protected readonly _sidebarService = inject(HlmSidebarService);