@spartan-ng/cli 0.0.1-alpha.489 → 0.0.1-alpha.490

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 (46) hide show
  1. package/package.json +1 -1
  2. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +1 -1
  3. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +1 -1
  4. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.component.ts.template +13 -13
  5. package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.component.ts.template +13 -13
  6. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +3 -3
  7. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +3 -7
  8. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-slide-display.component.ts.template +9 -9
  9. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +8 -8
  10. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +6 -6
  11. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +1 -1
  12. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.component.ts.template +12 -12
  13. package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.component.ts.template +12 -12
  14. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +1 -1
  15. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +3 -1
  16. package/src/generators/ui/libs/ui-form-field-helm/files/lib/hlm-form-field.component.ts.template +2 -2
  17. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +3 -3
  18. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +1 -1
  19. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +1 -1
  20. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +1 -1
  21. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +1 -1
  22. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +1 -1
  23. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +1 -1
  24. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination-query-params.component.ts.template +10 -10
  25. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-numbered-pagination.component.ts.template +11 -11
  26. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.component.ts.template +2 -2
  27. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.component.ts.template +2 -2
  28. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +1 -1
  29. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +1 -1
  30. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +4 -4
  31. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +1 -1
  32. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.component.ts.template +4 -4
  33. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +1 -1
  34. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +5 -5
  35. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +1 -1
  36. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +3 -1
  37. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +1 -1
  38. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +1 -1
  39. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +1 -1
  40. package/src/generators/ui/libs/ui-slider-helm/files/lib/hlm-slider.component.ts.template +3 -3
  41. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +1 -1
  42. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +1 -1
  43. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +3 -1
  44. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.component.ts.template +13 -13
  45. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +1 -1
  46. package/src/generators/ui/supported-ui-libraries.json +40 -40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/cli",
3
- "version": "0.0.1-alpha.489",
3
+ "version": "0.0.1-alpha.490",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@nx/angular": ">=20.0.0",
@@ -13,7 +13,7 @@ import type { ClassValue } from 'clsx';
13
13
  })
14
14
  export class HlmAccordionTriggerDirective {
15
15
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
- protected _computedClass = computed(() =>
16
+ protected readonly _computedClass = computed(() =>
17
17
  hlm(
18
18
  'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>[hlmAccIcon]]:rotate-180',
19
19
  this.userClass(),
@@ -11,7 +11,7 @@ import type { ClassValue } from 'clsx';
11
11
  '[class]': '_computedClass()',
12
12
  },
13
13
  template: `
14
- @if (image()?.canShow()) {
14
+ @if (_image()?.canShow()) {
15
15
  <ng-content select="[hlmAvatarImage],[brnAvatarImage]" />
16
16
  } @else {
17
17
  <ng-content select="[hlmAvatarFallback],[brnAvatarFallback]" />
@@ -65,7 +65,7 @@ import type { ClassValue } from 'clsx';
65
65
  <div class="space-y-4">
66
66
  <div class="relative flex items-center justify-center pt-1">
67
67
  <div brnCalendarHeader class="text-sm font-medium">
68
- {{ heading() }}
68
+ {{ _heading() }}
69
69
  </div>
70
70
 
71
71
  <div class="flex items-center space-x-1">
@@ -93,22 +93,22 @@ import type { ClassValue } from 'clsx';
93
93
  *brnCalendarWeekday="let weekday"
94
94
  scope="col"
95
95
  class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
96
- [attr.aria-label]="i18n.labelWeekday(weekday)"
96
+ [attr.aria-label]="_i18n.labelWeekday(weekday)"
97
97
  >
98
- {{ i18n.formatWeekdayName(weekday) }}
98
+ {{ _i18n.formatWeekdayName(weekday) }}
99
99
  </th>
100
100
  </tr>
101
101
  </thead>
102
102
 
103
103
  <tbody role="rowgroup">
104
104
  <tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
105
- @for (date of week; track dateAdapter.getTime(date)) {
105
+ @for (date of week; track _dateAdapter.getTime(date)) {
106
106
  <td
107
107
  brnCalendarCell
108
108
  class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative h-8 w-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
109
109
  >
110
- <button brnCalendarCellButton [date]="date" [class]="btnClass">
111
- {{ dateAdapter.getDate(date) }}
110
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
111
+ {{ _dateAdapter.getDate(date) }}
112
112
  </button>
113
113
  </td>
114
114
  }
@@ -126,10 +126,10 @@ export class HlmCalendarMultiComponent<T> {
126
126
  protected readonly _computedCalenderClass = computed(() => hlm('rounded-md border p-3', this.calendarClass()));
127
127
 
128
128
  /** Access the calendar i18n */
129
- protected readonly i18n = injectBrnCalendarI18n();
129
+ protected readonly _i18n = injectBrnCalendarI18n();
130
130
 
131
131
  /** Access the date time adapter */
132
- protected readonly dateAdapter = injectDateAdapter<T>();
132
+ protected readonly _dateAdapter = injectDateAdapter<T>();
133
133
 
134
134
  /** The minimum date that can be selected.*/
135
135
  public readonly min = input<T>();
@@ -170,14 +170,14 @@ export class HlmCalendarMultiComponent<T> {
170
170
  private readonly _calendar = viewChild.required(BrnCalendarMultiDirective);
171
171
 
172
172
  /** Get the heading for the current month and year */
173
- protected heading = computed(() =>
174
- this.i18n.formatHeader(
175
- this.dateAdapter.getMonth(this._calendar().focusedDate()),
176
- this.dateAdapter.getYear(this._calendar().focusedDate()),
173
+ protected readonly _heading = computed(() =>
174
+ this._i18n.formatHeader(
175
+ this._dateAdapter.getMonth(this._calendar().focusedDate()),
176
+ this._dateAdapter.getYear(this._calendar().focusedDate()),
177
177
  ),
178
178
  );
179
179
 
180
- protected readonly btnClass = hlm(
180
+ protected readonly _btnClass = hlm(
181
181
  buttonVariants({ variant: 'ghost' }),
182
182
  'size-8 p-0 font-normal aria-selected:opacity-100',
183
183
  'data-[outside]:text-muted-foreground data-[outside]:opacity-50 data-[outside]:aria-selected:bg-accent/50 data-[outside]:aria-selected:text-muted-foreground data-[outside]:aria-selected:opacity-30',
@@ -63,7 +63,7 @@ import type { ClassValue } from 'clsx';
63
63
  <div class="space-y-4">
64
64
  <div class="relative flex items-center justify-center pt-1">
65
65
  <div brnCalendarHeader class="text-sm font-medium">
66
- {{ heading() }}
66
+ {{ _heading() }}
67
67
  </div>
68
68
 
69
69
  <div class="flex items-center space-x-1">
@@ -91,22 +91,22 @@ import type { ClassValue } from 'clsx';
91
91
  *brnCalendarWeekday="let weekday"
92
92
  scope="col"
93
93
  class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
94
- [attr.aria-label]="i18n.labelWeekday(weekday)"
94
+ [attr.aria-label]="_i18n.labelWeekday(weekday)"
95
95
  >
96
- {{ i18n.formatWeekdayName(weekday) }}
96
+ {{ _i18n.formatWeekdayName(weekday) }}
97
97
  </th>
98
98
  </tr>
99
99
  </thead>
100
100
 
101
101
  <tbody role="rowgroup">
102
102
  <tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
103
- @for (date of week; track dateAdapter.getTime(date)) {
103
+ @for (date of week; track _dateAdapter.getTime(date)) {
104
104
  <td
105
105
  brnCalendarCell
106
106
  class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative size-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
107
107
  >
108
- <button brnCalendarCellButton [date]="date" [class]="btnClass">
109
- {{ dateAdapter.getDate(date) }}
108
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
109
+ {{ _dateAdapter.getDate(date) }}
110
110
  </button>
111
111
  </td>
112
112
  }
@@ -124,10 +124,10 @@ export class HlmCalendarComponent<T> {
124
124
  protected readonly _computedCalenderClass = computed(() => hlm('rounded-md border p-3', this.calendarClass()));
125
125
 
126
126
  /** Access the calendar i18n */
127
- protected readonly i18n = injectBrnCalendarI18n();
127
+ protected readonly _i18n = injectBrnCalendarI18n();
128
128
 
129
129
  /** Access the date time adapter */
130
- protected readonly dateAdapter = injectDateAdapter<T>();
130
+ protected readonly _dateAdapter = injectDateAdapter<T>();
131
131
 
132
132
  /** The minimum date that can be selected.*/
133
133
  public readonly min = input<T>();
@@ -158,14 +158,14 @@ export class HlmCalendarComponent<T> {
158
158
  private readonly _calendar = viewChild.required(BrnCalendarDirective);
159
159
 
160
160
  /** Get the heading for the current month and year */
161
- protected heading = computed(() =>
162
- this.i18n.formatHeader(
163
- this.dateAdapter.getMonth(this._calendar().focusedDate()),
164
- this.dateAdapter.getYear(this._calendar().focusedDate()),
161
+ protected readonly _heading = computed(() =>
162
+ this._i18n.formatHeader(
163
+ this._dateAdapter.getMonth(this._calendar().focusedDate()),
164
+ this._dateAdapter.getYear(this._calendar().focusedDate()),
165
165
  ),
166
166
  );
167
167
 
168
- protected readonly btnClass = hlm(
168
+ protected readonly _btnClass = hlm(
169
169
  buttonVariants({ variant: 'ghost' }),
170
170
  'size-8 p-0 font-normal aria-selected:opacity-100',
171
171
  'data-[outside]:text-muted-foreground data-[outside]:opacity-50 data-[outside]:aria-selected:bg-accent/50 data-[outside]:aria-selected:text-muted-foreground data-[outside]:aria-selected:opacity-30',
@@ -17,8 +17,8 @@ import { HlmCarouselComponent } from './hlm-carousel.component';
17
17
  export class HlmCarouselContentComponent {
18
18
  private readonly _orientation = inject(HlmCarouselComponent).orientation;
19
19
 
20
- public _userClass = input<ClassValue>('', { alias: 'class' });
21
- protected _computedClass = computed(() =>
22
- hlm('flex', this._orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', this._userClass()),
20
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
+ protected readonly _computedClass = computed(() =>
22
+ hlm('flex', this._orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', this.userClass()),
23
23
  );
24
24
  }
@@ -17,13 +17,9 @@ import { HlmCarouselComponent } from './hlm-carousel.component';
17
17
  `,
18
18
  })
19
19
  export class HlmCarouselItemComponent {
20
- public _userClass = input<ClassValue>('', { alias: 'class' });
20
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
21
  private readonly _orientation = inject(HlmCarouselComponent).orientation;
22
- protected _computedClass = computed(() =>
23
- hlm(
24
- 'min-w-0 shrink-0 grow-0 basis-full',
25
- this._orientation() === 'horizontal' ? 'pl-4' : 'pt-4',
26
- this._userClass(),
27
- ),
22
+ protected readonly _computedClass = computed(() =>
23
+ hlm('min-w-0 shrink-0 grow-0 basis-full', this._orientation() === 'horizontal' ? 'pl-4' : 'pt-4', this.userClass()),
28
24
  );
29
25
  }
@@ -5,9 +5,9 @@ import { HlmCarouselComponent } from './hlm-carousel.component';
5
5
  @Component({
6
6
  selector: 'hlm-carousel-slide-display',
7
7
  template: `
8
- <span class="sr-only">{{ labelContent() }}</span>
8
+ <span class="sr-only">{{ _labelContent() }}</span>
9
9
  <div aria-hidden="true" class="text-muted-foreground text-sm">
10
- {{ currentSlide() }} / {{ carousel.slideCount() }}
10
+ {{ _currentSlide() }} / {{ _carousel.slideCount() }}
11
11
  </div>
12
12
  `,
13
13
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -16,18 +16,18 @@ import { HlmCarouselComponent } from './hlm-carousel.component';
16
16
  },
17
17
  })
18
18
  export class HlmCarouselSlideDisplayComponent {
19
- protected readonly carousel = inject(HlmCarouselComponent);
19
+ protected readonly _carousel = inject(HlmCarouselComponent);
20
20
 
21
- protected readonly currentSlide = computed(() => this.carousel.currentSlide() + 1);
21
+ protected readonly _currentSlide = computed(() => this._carousel.currentSlide() + 1);
22
22
 
23
- public _userClass = input<ClassValue>('', { alias: 'class' });
24
- protected _computedClass = computed(() => this._userClass());
23
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
24
+ protected _computedClass = computed(() => this.userClass());
25
25
 
26
26
  public readonly label = input('Slide');
27
27
 
28
- protected readonly labelContent = computed(() => {
29
- const currentSlide = this.currentSlide();
30
- const slideCount = this.carousel.slideCount();
28
+ protected readonly _labelContent = computed(() => {
29
+ const currentSlide = this._currentSlide();
30
+ const slideCount = this._carousel.slideCount();
31
31
  return `${this.label()} ${currentSlide} of ${slideCount} is displayed`;
32
32
  });
33
33
  }
@@ -34,7 +34,7 @@ import {
34
34
  emblaCarousel
35
35
  class="overflow-hidden"
36
36
  [plugins]="plugins()"
37
- [options]="emblaOptions()"
37
+ [options]="_emblaOptions()"
38
38
  [subscribeToEvents]="['init', 'select', 'reInit']"
39
39
  (emblaChange)="onEmblaEvent($event)"
40
40
  >
@@ -44,7 +44,7 @@ import {
44
44
  `,
45
45
  })
46
46
  export class HlmCarouselComponent {
47
- protected emblaCarousel = viewChild.required(EmblaCarouselDirective);
47
+ protected readonly _emblaCarousel = viewChild.required(EmblaCarouselDirective);
48
48
 
49
49
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
50
50
  protected readonly _computedClass = computed(() => hlm('relative', this.userClass()));
@@ -53,7 +53,7 @@ export class HlmCarouselComponent {
53
53
  public readonly options: InputSignal<Omit<EmblaOptionsType, 'axis'> | undefined> = input();
54
54
  public readonly plugins: InputSignal<EmblaPluginType[]> = input([] as EmblaPluginType[]);
55
55
 
56
- protected emblaOptions: Signal<EmblaOptionsType> = computed(() => ({
56
+ protected readonly _emblaOptions: Signal<EmblaOptionsType> = computed(() => ({
57
57
  ...this.options(),
58
58
  axis: this.orientation() === 'horizontal' ? 'x' : 'y',
59
59
  }));
@@ -69,7 +69,7 @@ export class HlmCarouselComponent {
69
69
  public readonly slideCount = this._slideCount.asReadonly();
70
70
 
71
71
  protected onEmblaEvent(event: EmblaEventType) {
72
- const emblaApi = this.emblaCarousel().emblaApi;
72
+ const emblaApi = this._emblaCarousel().emblaApi;
73
73
 
74
74
  if (!emblaApi) {
75
75
  return;
@@ -88,18 +88,18 @@ export class HlmCarouselComponent {
88
88
  protected onKeydown(event: KeyboardEvent) {
89
89
  if (event.key === 'ArrowLeft') {
90
90
  event.preventDefault();
91
- this.emblaCarousel().scrollPrev();
91
+ this._emblaCarousel().scrollPrev();
92
92
  } else if (event.key === 'ArrowRight') {
93
93
  event.preventDefault();
94
- this.emblaCarousel().scrollNext();
94
+ this._emblaCarousel().scrollNext();
95
95
  }
96
96
  }
97
97
 
98
98
  scrollPrev() {
99
- this.emblaCarousel().scrollPrev();
99
+ this._emblaCarousel().scrollPrev();
100
100
  }
101
101
 
102
102
  scrollNext() {
103
- this.emblaCarousel().scrollNext();
103
+ this._emblaCarousel().scrollNext();
104
104
  }
105
105
  }
@@ -34,7 +34,7 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
34
34
  [name]="name()"
35
35
  [class]="_computedClass()"
36
36
  [checked]="checked()"
37
- [disabled]="state().disabled()"
37
+ [disabled]="_state().disabled()"
38
38
  [required]="required()"
39
39
  [aria-label]="ariaLabel()"
40
40
  [aria-labelledby]="ariaLabelledby()"
@@ -55,7 +55,7 @@ export const HLM_CHECKBOX_VALUE_ACCESSOR = {
55
55
  '[attr.aria-label]': 'null',
56
56
  '[attr.aria-labelledby]': 'null',
57
57
  '[attr.aria-describedby]': 'null',
58
- '[attr.data-disabled]': 'state().disabled() ? "" : null',
58
+ '[attr.data-disabled]': '_state().disabled() ? "" : null',
59
59
  },
60
60
  providers: [HLM_CHECKBOX_VALUE_ACCESSOR],
61
61
  viewProviders: [provideIcons({ lucideCheck })],
@@ -68,7 +68,7 @@ export class HlmCheckboxComponent implements ControlValueAccessor {
68
68
  hlm(
69
69
  'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-default',
70
70
  this.userClass(),
71
- this.state().disabled() ? 'cursor-not-allowed opacity-50' : '',
71
+ this._state().disabled() ? 'cursor-not-allowed opacity-50' : '',
72
72
  ),
73
73
  );
74
74
 
@@ -96,7 +96,7 @@ export class HlmCheckboxComponent implements ControlValueAccessor {
96
96
  /** Whether the checkbox is disabled. */
97
97
  public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
98
98
 
99
- protected readonly state = computed(() => ({
99
+ protected readonly _state = computed(() => ({
100
100
  disabled: signal(this.disabled()),
101
101
  }));
102
102
 
@@ -106,7 +106,7 @@ export class HlmCheckboxComponent implements ControlValueAccessor {
106
106
  protected _onTouched?: TouchFn;
107
107
 
108
108
  protected _handleChange(): void {
109
- if (this.state().disabled()) return;
109
+ if (this._state().disabled()) return;
110
110
 
111
111
  const previousChecked = this.checked();
112
112
  this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);
@@ -128,7 +128,7 @@ export class HlmCheckboxComponent implements ControlValueAccessor {
128
128
  }
129
129
 
130
130
  setDisabledState(isDisabled: boolean): void {
131
- this.state().disabled.set(isDisabled);
131
+ this._state().disabled.set(isDisabled);
132
132
  }
133
133
  }
134
134
 
@@ -19,7 +19,7 @@ export class HlmCommandDialogDirective {
19
19
  private readonly _searchInput = contentChild(BrnCommandSearchInputToken, { read: ElementRef });
20
20
 
21
21
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
- protected _computedClass = computed(() =>
22
+ protected readonly _computedClass = computed(() =>
23
23
  hlm(
24
24
  '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%]',
25
25
  this.userClass(),
@@ -43,12 +43,12 @@ export const HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR = {
43
43
  ],
44
44
  providers: [HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR, provideIcons({ lucideCalendar })],
45
45
  template: `
46
- <brn-popover sideOffset="5" [state]="popoverState()" (stateChanged)="popoverState.set($event)">
47
- <button type="button" [class]="_computedClass()" [disabled]="state().disabled()" brnPopoverTrigger>
46
+ <brn-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
47
+ <button type="button" [class]="_computedClass()" [disabled]="_state().disabled()" brnPopoverTrigger>
48
48
  <ng-icon hlm size="sm" name="lucideCalendar" />
49
49
 
50
50
  <span class="truncate">
51
- @if (formattedDate(); as formattedDate) {
51
+ @if (_formattedDate(); as formattedDate) {
52
52
  {{ formattedDate }}
53
53
  } @else {
54
54
  <ng-content />
@@ -64,7 +64,7 @@ export const HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR = {
64
64
  [max]="max()"
65
65
  [minSelection]="minSelection()"
66
66
  [maxSelection]="maxSelection()"
67
- [disabled]="state().disabled()"
67
+ [disabled]="_state().disabled()"
68
68
  (dateChange)="_handleChange($event)"
69
69
  />
70
70
  </div>
@@ -125,13 +125,13 @@ export class HlmDatePickerMultiComponent<T> implements ControlValueAccessor {
125
125
  /** Defines how the date should be transformed before saving to model/form. */
126
126
  public readonly transformDates = input<(date: T[]) => T[]>(this._config.transformDates);
127
127
 
128
- protected readonly popoverState = signal<BrnDialogState | null>(null);
128
+ protected readonly _popoverState = signal<BrnDialogState | null>(null);
129
129
 
130
- protected readonly state = computed(() => ({
130
+ protected readonly _state = computed(() => ({
131
131
  disabled: signal(this.disabled()),
132
132
  }));
133
133
 
134
- protected readonly formattedDate = computed(() => {
134
+ protected readonly _formattedDate = computed(() => {
135
135
  const dates = this.date();
136
136
  return dates ? this.formatDates()(dates) : undefined;
137
137
  });
@@ -144,7 +144,7 @@ export class HlmDatePickerMultiComponent<T> implements ControlValueAccessor {
144
144
  protected _handleChange(value: T[] | undefined) {
145
145
  if (value === undefined) return;
146
146
 
147
- if (this.state().disabled()) return;
147
+ if (this._state().disabled()) return;
148
148
  const transformedDate = this.transformDates()(value);
149
149
 
150
150
  this.date.set(transformedDate);
@@ -152,7 +152,7 @@ export class HlmDatePickerMultiComponent<T> implements ControlValueAccessor {
152
152
  this.changed.emit(transformedDate);
153
153
 
154
154
  if (this.autoCloseOnMaxSelection() && this.date()?.length === this.maxSelection()) {
155
- this.popoverState.set('closed');
155
+ this._popoverState.set('closed');
156
156
  }
157
157
  }
158
158
 
@@ -173,14 +173,14 @@ export class HlmDatePickerMultiComponent<T> implements ControlValueAccessor {
173
173
  }
174
174
 
175
175
  setDisabledState(isDisabled: boolean): void {
176
- this.state().disabled.set(isDisabled);
176
+ this._state().disabled.set(isDisabled);
177
177
  }
178
178
 
179
179
  open() {
180
- this.popoverState.set('open');
180
+ this._popoverState.set('open');
181
181
  }
182
182
 
183
183
  close() {
184
- this.popoverState.set('closed');
184
+ this._popoverState.set('closed');
185
185
  }
186
186
  }
@@ -42,10 +42,10 @@ export const HLM_DATE_PICKER_VALUE_ACCESSOR = {
42
42
  ],
43
43
  providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideIcons({ lucideChevronDown })],
44
44
  template: `
45
- <brn-popover sideOffset="5" [state]="popoverState()" (stateChanged)="popoverState.set($event)">
46
- <button type="button" [class]="_computedClass()" [disabled]="state().disabled()" brnPopoverTrigger>
45
+ <brn-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
46
+ <button type="button" [class]="_computedClass()" [disabled]="_state().disabled()" brnPopoverTrigger>
47
47
  <span class="truncate">
48
- @if (formattedDate(); as formattedDate) {
48
+ @if (_formattedDate(); as formattedDate) {
49
49
  {{ formattedDate }}
50
50
  } @else {
51
51
  <ng-content />
@@ -61,7 +61,7 @@ export const HLM_DATE_PICKER_VALUE_ACCESSOR = {
61
61
  [date]="date()"
62
62
  [min]="min()"
63
63
  [max]="max()"
64
- [disabled]="state().disabled()"
64
+ [disabled]="_state().disabled()"
65
65
  (dateChange)="_handleChange($event)"
66
66
  />
67
67
  </div>
@@ -112,13 +112,13 @@ export class HlmDatePickerComponent<T> implements ControlValueAccessor {
112
112
  /** Defines how the date should be transformed before saving to model/form. */
113
113
  public readonly transformDate = input<(date: T) => T>(this._config.transformDate);
114
114
 
115
- protected readonly popoverState = signal<BrnDialogState | null>(null);
115
+ protected readonly _popoverState = signal<BrnDialogState | null>(null);
116
116
 
117
- protected readonly state = computed(() => ({
117
+ protected readonly _state = computed(() => ({
118
118
  disabled: signal(this.disabled()),
119
119
  }));
120
120
 
121
- protected readonly formattedDate = computed(() => {
121
+ protected readonly _formattedDate = computed(() => {
122
122
  const date = this.date();
123
123
  return date ? this.formatDate()(date) : undefined;
124
124
  });
@@ -129,7 +129,7 @@ export class HlmDatePickerComponent<T> implements ControlValueAccessor {
129
129
  protected _onTouched?: TouchFn;
130
130
 
131
131
  protected _handleChange(value: T) {
132
- if (this.state().disabled()) return;
132
+ if (this._state().disabled()) return;
133
133
  const transformedDate = this.transformDate()(value);
134
134
 
135
135
  this.date.set(transformedDate);
@@ -137,7 +137,7 @@ export class HlmDatePickerComponent<T> implements ControlValueAccessor {
137
137
  this.changed.emit(transformedDate);
138
138
 
139
139
  if (this.autoCloseOnSelect()) {
140
- this.popoverState.set('closed');
140
+ this._popoverState.set('closed');
141
141
  }
142
142
  }
143
143
 
@@ -158,14 +158,14 @@ export class HlmDatePickerComponent<T> implements ControlValueAccessor {
158
158
  }
159
159
 
160
160
  setDisabledState(isDisabled: boolean): void {
161
- this.state().disabled.set(isDisabled);
161
+ this._state().disabled.set(isDisabled);
162
162
  }
163
163
 
164
164
  open() {
165
- this.popoverState.set('open');
165
+ this._popoverState.set('open');
166
166
  }
167
167
 
168
168
  close() {
169
- this.popoverState.set('closed');
169
+ this._popoverState.set('closed');
170
170
  }
171
171
  }
@@ -12,5 +12,5 @@ import type { ClassValue } from 'clsx';
12
12
  })
13
13
  export class HlmDialogDescriptionDirective {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected _computedClass = computed(() => hlm('text-sm text-muted-foreground', this.userClass()));
15
+ protected readonly _computedClass = computed(() => hlm('text-sm text-muted-foreground', this.userClass()));
16
16
  }
@@ -12,5 +12,7 @@ import type { ClassValue } from 'clsx';
12
12
  })
13
13
  export class HlmDialogTitleDirective {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected _computedClass = computed(() => hlm('text-lg font-semibold leading-none tracking-tight', this.userClass()));
15
+ protected readonly _computedClass = computed(() =>
16
+ hlm('text-lg font-semibold leading-none tracking-tight', this.userClass()),
17
+ );
16
18
  }
@@ -17,7 +17,7 @@ import { HlmErrorDirective } from './hlm-error.directive';
17
17
  template: `
18
18
  <ng-content />
19
19
 
20
- @switch (hasDisplayedMessage()) {
20
+ @switch (_hasDisplayedMessage()) {
21
21
  @case ('error') {
22
22
  <ng-content select="hlm-error" />
23
23
  }
@@ -38,7 +38,7 @@ export class HlmFormFieldComponent {
38
38
 
39
39
  public readonly errorChildren = contentChildren(HlmErrorDirective);
40
40
 
41
- protected readonly hasDisplayedMessage = computed<'error' | 'hint'>(() =>
41
+ protected readonly _hasDisplayedMessage = computed<'error' | 'hint'>(() =>
42
42
  this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint',
43
43
  );
44
44
 
@@ -48,11 +48,11 @@ type InputVariants = VariantProps<typeof inputVariants>;
48
48
  export class HlmInputDirective implements BrnFormFieldControl, DoCheck {
49
49
  public readonly error = input<InputVariants['error']>('auto');
50
50
 
51
- protected readonly state = linkedSignal(() => ({ error: this.error() }));
51
+ protected readonly _state = linkedSignal(() => ({ error: this.error() }));
52
52
 
53
53
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
54
54
  protected readonly _computedClass = computed(() =>
55
- hlm(inputVariants({ error: this.state().error }), this.userClass()),
55
+ hlm(inputVariants({ error: this._state().error }), this.userClass()),
56
56
  );
57
57
 
58
58
  private readonly _injector = inject(Injector);
@@ -92,6 +92,6 @@ export class HlmInputDirective implements BrnFormFieldControl, DoCheck {
92
92
  }
93
93
 
94
94
  setError(error: InputVariants['error']) {
95
- this.state.set({ error });
95
+ this._state.set({ error });
96
96
  }
97
97
  }
@@ -12,7 +12,7 @@ import type { ClassValue } from 'clsx';
12
12
  })
13
13
  export class HlmMenuBarItemDirective {
14
14
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
15
- protected _computedClass = computed(() =>
15
+ protected readonly _computedClass = computed(() =>
16
16
  hlm(
17
17
  'focus:bg-accent focus:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-none select-none',
18
18
  this.userClass(),
@@ -18,7 +18,7 @@ import type { ClassValue } from 'clsx';
18
18
  })
19
19
  export class HlmMenuItemCheckboxDirective {
20
20
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected _computedClass = computed(() =>
21
+ protected readonly _computedClass = computed(() =>
22
22
  hlm(
23
23
  'group w-full relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50',
24
24
  this.userClass(),
@@ -18,7 +18,7 @@ import type { ClassValue } from 'clsx';
18
18
  })
19
19
  export class HlmMenuItemRadioDirective {
20
20
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
21
- protected _computedClass = computed(() =>
21
+ protected readonly _computedClass = computed(() =>
22
22
  hlm(
23
23
  'group w-full relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50',
24
24
  this.userClass(),
@@ -27,7 +27,7 @@ export class HlmMenuItemDirective {
27
27
  });
28
28
 
29
29
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
30
- protected _computedClass = computed(() =>
30
+ protected readonly _computedClass = computed(() =>
31
31
  hlm(
32
32
  `hover:bg-accent focus-visible:bg-accent w-full focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[ng-icon]:!text-destructive [&_ng-icon:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0`,
33
33
  this.userClass(),
@@ -33,7 +33,7 @@ type MenuVariants = VariantProps<typeof menuVariants>;
33
33
  })
34
34
  export class HlmMenuComponent {
35
35
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
36
- protected _computedClass = computed(() => hlm(menuVariants({ variant: this.variant() }), this.userClass()));
36
+ protected readonly _computedClass = computed(() => hlm(menuVariants({ variant: this.variant() }), this.userClass()));
37
37
 
38
38
  public readonly variant = input<MenuVariants['variant']>('default');
39
39
  }
@@ -16,7 +16,7 @@ import type { ClassValue } from 'clsx';
16
16
  })
17
17
  export class HlmSubMenuComponent {
18
18
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
19
- protected _computedClass = computed(() =>
19
+ protected readonly _computedClass = computed(() =>
20
20
  hlm(
21
21
  'border-border min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
22
22
  this.userClass(),