@spartan-ng/cli 0.0.1-alpha.573 → 0.0.1-alpha.575

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 (91) hide show
  1. package/package.json +1 -1
  2. package/src/generators/healthcheck/generator.js +2 -0
  3. package/src/generators/healthcheck/generator.js.map +1 -1
  4. package/src/generators/healthcheck/healthchecks/hlm-dialog.d.ts +2 -0
  5. package/src/generators/healthcheck/healthchecks/hlm-dialog.js +39 -0
  6. package/src/generators/healthcheck/healthchecks/hlm-dialog.js.map +1 -0
  7. package/src/generators/migrate-dialog/compat.d.ts +2 -0
  8. package/src/generators/migrate-dialog/compat.js +6 -0
  9. package/src/generators/migrate-dialog/compat.js.map +1 -0
  10. package/src/generators/migrate-dialog/generator.d.ts +5 -0
  11. package/src/generators/migrate-dialog/generator.js +57 -0
  12. package/src/generators/migrate-dialog/generator.js.map +1 -0
  13. package/src/generators/migrate-dialog/schema.d.ts +4 -0
  14. package/src/generators/migrate-dialog/schema.json +19 -0
  15. package/src/generators/ui/libs/alert-dialog/files/index.ts.template +10 -7
  16. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-action.ts.template +13 -0
  17. package/src/generators/ui/libs/alert-dialog/files/lib/{hlm-alert-dialog-cancel-button.ts.template → hlm-alert-dialog-cancel.ts.template} +7 -2
  18. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-content.ts.template +4 -7
  19. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-description.ts.template +1 -0
  20. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-footer.ts.template +4 -7
  21. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-header.ts.template +4 -7
  22. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-overlay.ts.template +3 -1
  23. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-title.ts.template +1 -0
  24. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-trigger.ts.template +13 -0
  25. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog.ts.template +3 -7
  26. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +5 -6
  27. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +5 -8
  28. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +5 -6
  29. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +10 -12
  30. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-content.ts.template +4 -7
  31. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-item.ts.template +4 -7
  32. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-next.ts.template +1 -0
  33. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-previous.ts.template +1 -0
  34. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel-slide-display.ts.template +1 -0
  35. package/src/generators/ui/libs/carousel/files/lib/hlm-carousel.ts.template +2 -1
  36. package/src/generators/ui/libs/command/files/lib/hlm-command-dialog.ts.template +1 -0
  37. package/src/generators/ui/libs/command/files/lib/hlm-command-empty.ts.template +1 -0
  38. package/src/generators/ui/libs/command/files/lib/hlm-command-group-label.ts.template +6 -6
  39. package/src/generators/ui/libs/command/files/lib/hlm-command-group.ts.template +6 -6
  40. package/src/generators/ui/libs/command/files/lib/hlm-command-icon.ts.template +1 -0
  41. package/src/generators/ui/libs/command/files/lib/hlm-command-item.ts.template +6 -8
  42. package/src/generators/ui/libs/command/files/lib/hlm-command-list.ts.template +6 -6
  43. package/src/generators/ui/libs/command/files/lib/hlm-command-search-input.ts.template +4 -5
  44. package/src/generators/ui/libs/command/files/lib/hlm-command-search.ts.template +4 -7
  45. package/src/generators/ui/libs/command/files/lib/hlm-command-separator.ts.template +6 -6
  46. package/src/generators/ui/libs/command/files/lib/hlm-command-shortcut.ts.template +4 -5
  47. package/src/generators/ui/libs/command/files/lib/hlm-command.ts.template +4 -7
  48. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker-multi.ts.template +8 -8
  49. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker.ts.template +8 -8
  50. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-range-picker.ts.template +8 -8
  51. package/src/generators/ui/libs/dialog/files/index.ts.template +3 -0
  52. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-close.ts.template +4 -1
  53. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-content.ts.template +6 -5
  54. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-description.ts.template +1 -0
  55. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-footer.ts.template +4 -7
  56. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-header.ts.template +4 -7
  57. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-overlay.ts.template +3 -1
  58. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-title.ts.template +1 -0
  59. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog-trigger.ts.template +11 -0
  60. package/src/generators/ui/libs/dialog/files/lib/hlm-dialog.ts.template +3 -3
  61. package/src/generators/ui/libs/hover-card/files/lib/hlm-hover-card-content.ts.template +4 -17
  62. package/src/generators/ui/libs/popover/files/index.ts.template +5 -3
  63. package/src/generators/ui/libs/popover/files/lib/hlm-popover-trigger.ts.template +13 -0
  64. package/src/generators/ui/libs/popover/files/lib/hlm-popover.ts.template +14 -0
  65. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +3 -5
  66. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio.ts.template +3 -2
  67. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-group.ts.template +4 -7
  68. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-handle.ts.template +2 -3
  69. package/src/generators/ui/libs/resizable/files/lib/hlm-resizable-panel.ts.template +4 -7
  70. package/src/generators/ui/libs/sheet/files/index.ts.template +3 -0
  71. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-close.ts.template +4 -1
  72. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-content.ts.template +5 -5
  73. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-description.ts.template +1 -0
  74. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-footer.ts.template +4 -7
  75. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-header.ts.template +4 -7
  76. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-overlay.ts.template +3 -1
  77. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-title.ts.template +1 -0
  78. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet-trigger.ts.template +11 -0
  79. package/src/generators/ui/libs/sheet/files/lib/hlm-sheet.ts.template +3 -3
  80. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar-wrapper.ts.template +2 -2
  81. package/src/generators/ui/libs/sidebar/files/lib/hlm-sidebar.ts.template +4 -4
  82. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-content.ts.template +1 -0
  83. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-list.ts.template +4 -5
  84. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-paginated-list.ts.template +2 -1
  85. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs-trigger.ts.template +1 -0
  86. package/src/generators/ui/libs/tabs/files/lib/hlm-tabs.ts.template +4 -5
  87. package/src/generators/ui/libs/tooltip/files/lib/hlm-tooltip-trigger.ts.template +3 -0
  88. package/src/generators/ui/libs/tooltip/files/lib/hlm-tooltip.ts.template +4 -7
  89. package/src/generators/ui/supported-ui-libraries.json +40 -39
  90. package/src/generators/ui/libs/alert-dialog/files/lib/hlm-alert-dialog-action-button.ts.template +0 -8
  91. package/src/generators/ui/libs/popover/files/lib/hlm-popover-close.ts.template +0 -19
@@ -14,6 +14,7 @@ import { HlmCarousel } from './hlm-carousel';
14
14
  changeDetection: ChangeDetectionStrategy.OnPush,
15
15
  hostDirectives: [{ directive: HlmButton, inputs: ['variant', 'size'] }],
16
16
  host: {
17
+ 'data-slot': 'carousel-previous',
17
18
  '[disabled]': 'isDisabled()',
18
19
  '(click)': '_carousel.scrollPrev()',
19
20
  },
@@ -7,6 +7,7 @@ import { HlmCarousel } from './hlm-carousel';
7
7
  selector: 'hlm-carousel-slide-display',
8
8
  changeDetection: ChangeDetectionStrategy.OnPush,
9
9
  host: {
10
+ 'data-slot': 'carousel-slide-display',
10
11
  '[class]': '_computedClass()',
11
12
  },
12
13
  template: `
@@ -22,6 +22,7 @@ import {
22
22
  imports: [EmblaCarouselDirective],
23
23
  changeDetection: ChangeDetectionStrategy.OnPush,
24
24
  host: {
25
+ 'data-slot': 'carousel',
25
26
  '[class]': '_computedClass()',
26
27
  role: 'region',
27
28
  'aria-roledescription': 'carousel',
@@ -36,7 +37,7 @@ import {
36
37
  [subscribeToEvents]="['init', 'select', 'reInit']"
37
38
  (emblaChange)="onEmblaEvent($event)"
38
39
  >
39
- <ng-content select="hlm-carousel-content" />
40
+ <ng-content select="[hlmCarouselContent],hlm-carousel-content" />
40
41
  </div>
41
42
  <ng-content />
42
43
  `,
@@ -7,6 +7,7 @@ import type { ClassValue } from 'clsx';
7
7
  @Directive({
8
8
  selector: '[hlmCommandDialog]',
9
9
  host: {
10
+ 'data-slot': 'command-dialog',
10
11
  '[class]': '_computedClass()',
11
12
  },
12
13
  })
@@ -5,6 +5,7 @@ import type { ClassValue } from 'clsx';
5
5
  @Directive({
6
6
  selector: '[hlmCommandEmpty]',
7
7
  host: {
8
+ 'data-slot': 'command-empty',
8
9
  '[class]': '_computedClass()',
9
10
  },
10
11
  })
@@ -1,18 +1,18 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '<%- importAlias %>/utils';
3
+ import type { ClassValue } from 'clsx';
3
4
 
4
- @Component({
5
- selector: 'hlm-command-group-label',
6
- changeDetection: ChangeDetectionStrategy.OnPush,
5
+ @Directive({
6
+ selector: '[hlmCommandGroupLabel],hlm-command-group-label',
7
7
  host: {
8
+ 'data-slot': 'command-group-label',
8
9
  role: 'presentation',
9
10
  '[class]': '_computedClass()',
10
11
  },
11
- template: '<ng-content />',
12
12
  })
13
13
  export class HlmCommandGroupLabel {
14
14
  /** The user defined class */
15
- public readonly userClass = input<string>('', { alias: 'class' });
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
16
 
17
17
  /** The styles to apply */
18
18
  protected readonly _computedClass = computed(() =>
@@ -1,10 +1,10 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { BrnCommandGroup } from '@spartan-ng/brain/command';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
+ import type { ClassValue } from 'clsx';
4
5
 
5
- @Component({
6
- selector: 'hlm-command-group',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
6
+ @Directive({
7
+ selector: '[hlmCommandGroup],hlm-command-group',
8
8
  hostDirectives: [
9
9
  {
10
10
  directive: BrnCommandGroup,
@@ -12,13 +12,13 @@ import { hlm } from '<%- importAlias %>/utils';
12
12
  },
13
13
  ],
14
14
  host: {
15
+ 'data-slot': 'command-group',
15
16
  '[class]': '_computedClass()',
16
17
  },
17
- template: '<ng-content />',
18
18
  })
19
19
  export class HlmCommandGroup {
20
20
  /** The user defined class */
21
- public readonly userClass = input<string>('', { alias: 'class' });
21
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
22
 
23
23
  /** The styles to apply */
24
24
  protected readonly _computedClass = computed(() =>
@@ -7,6 +7,7 @@ import type { ClassValue } from 'clsx';
7
7
  selector: '[hlmCommandIcon]',
8
8
  providers: [provideHlmIconConfig({ size: 'sm' })],
9
9
  host: {
10
+ 'data-slot': 'command-icon',
10
11
  '[class]': '_computedClass()',
11
12
  },
12
13
  })
@@ -1,10 +1,10 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { BrnCommandItem } from '@spartan-ng/brain/command';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
+ import type { ClassValue } from 'clsx';
4
5
 
5
- @Component({
6
- selector: 'button[hlm-command-item]',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
6
+ @Directive({
7
+ selector: 'button[hlmCommandItem],button[hlm-command-item]',
8
8
  hostDirectives: [
9
9
  {
10
10
  directive: BrnCommandItem,
@@ -13,15 +13,13 @@ import { hlm } from '<%- importAlias %>/utils';
13
13
  },
14
14
  ],
15
15
  host: {
16
+ 'data-slot': 'command-item',
16
17
  '[class]': '_computedClass()',
17
18
  },
18
- template: `
19
- <ng-content />
20
- `,
21
19
  })
22
20
  export class HlmCommandItem {
23
21
  /** The user defined class */
24
- public readonly userClass = input<string>('', { alias: 'class' });
22
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
25
23
 
26
24
  /** The styles to apply */
27
25
  protected readonly _computedClass = computed(() =>
@@ -1,10 +1,10 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { BrnCommandList } from '@spartan-ng/brain/command';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
+ import type { ClassValue } from 'clsx';
4
5
 
5
- @Component({
6
- selector: 'hlm-command-list',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
6
+ @Directive({
7
+ selector: '[hlmCommandList],hlm-command-list',
8
8
  hostDirectives: [
9
9
  {
10
10
  directive: BrnCommandList,
@@ -12,13 +12,13 @@ import { hlm } from '<%- importAlias %>/utils';
12
12
  },
13
13
  ],
14
14
  host: {
15
+ 'data-slot': 'command-list',
15
16
  '[class]': '_computedClass()',
16
17
  },
17
- template: '<ng-content />',
18
18
  })
19
19
  export class HlmCommandList {
20
20
  /** The user defined class */
21
- public readonly userClass = input<string>('', { alias: 'class' });
21
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
22
22
 
23
23
  /** The styles to apply */
24
24
  protected readonly _computedClass = computed(() =>
@@ -1,16 +1,15 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { BrnCommandSearchInput } from '@spartan-ng/brain/command';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
- @Component({
7
- selector: 'input[hlm-command-search-input]',
8
- changeDetection: ChangeDetectionStrategy.OnPush,
6
+ @Directive({
7
+ selector: 'input[hlmCommandSearchInput],input[hlm-command-search-input]',
9
8
  hostDirectives: [{ directive: BrnCommandSearchInput, inputs: ['value'] }],
10
9
  host: {
10
+ 'data-slot': 'command-search-input',
11
11
  '[class]': '_computedClass()',
12
12
  },
13
- template: '',
14
13
  })
15
14
  export class HlmCommandSearchInput {
16
15
  /** The user defined class */
@@ -1,18 +1,15 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { provideHlmIconConfig } from '<%- importAlias %>/icon';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
- @Component({
7
- selector: 'hlm-command-search',
6
+ @Directive({
7
+ selector: '[hlmCommandSearch],hlm-command-search',
8
8
  providers: [provideHlmIconConfig({ size: 'sm' })],
9
- changeDetection: ChangeDetectionStrategy.OnPush,
10
9
  host: {
10
+ 'data-slot': 'command-search',
11
11
  '[class]': '_computedClass()',
12
12
  },
13
- template: `
14
- <ng-content />
15
- `,
16
13
  })
17
14
  export class HlmCommandSearch {
18
15
  /** The user defined class */
@@ -1,18 +1,18 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '<%- importAlias %>/utils';
3
+ import type { ClassValue } from 'clsx';
3
4
 
4
- @Component({
5
- selector: 'hlm-command-separator',
6
- changeDetection: ChangeDetectionStrategy.OnPush,
5
+ @Directive({
6
+ selector: '[hlmCommandSeparator],hlm-command-separator',
7
7
  host: {
8
+ 'data-slot': 'command-separator',
8
9
  role: 'separator',
9
10
  '[class]': '_computedClass()',
10
11
  },
11
- template: '',
12
12
  })
13
13
  export class HlmCommandSeparator {
14
14
  /** The user defined class */
15
- public readonly userClass = input<string>('', { alias: 'class' });
15
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
16
16
 
17
17
  /** The styles to apply */
18
18
  protected readonly _computedClass = computed(() => hlm('bg-border -mx-1 block h-px', this.userClass()));
@@ -1,14 +1,13 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
- @Component({
6
- selector: 'hlm-command-shortcut',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
5
+ @Directive({
6
+ selector: '[hlmCommandShortcut],hlm-command-shortcut',
8
7
  host: {
8
+ 'data-slot': 'command-shortcut',
9
9
  '[class]': '_computedClass()',
10
10
  },
11
- template: '<ng-content />',
12
11
  })
13
12
  export class HlmCommandShortcut {
14
13
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -1,11 +1,10 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { BrnCommand } from '@spartan-ng/brain/command';
3
3
  import { hlm } from '<%- importAlias %>/utils';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
- @Component({
7
- selector: 'hlm-command',
8
- changeDetection: ChangeDetectionStrategy.OnPush,
6
+ @Directive({
7
+ selector: '[hlmCommand],hlm-command',
9
8
  hostDirectives: [
10
9
  {
11
10
  directive: BrnCommand,
@@ -14,11 +13,9 @@ import type { ClassValue } from 'clsx';
14
13
  },
15
14
  ],
16
15
  host: {
16
+ 'data-slot': 'command',
17
17
  '[class]': '_computedClass()',
18
18
  },
19
- template: `
20
- <ng-content />
21
- `,
22
19
  })
23
20
  export class HlmCommand {
24
21
  /** The user defined class */
@@ -12,14 +12,14 @@ import {
12
12
  signal,
13
13
  } from '@angular/core';
14
14
  import { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
15
- import { NgIcon, provideIcons } from '@ng-icons/core';
15
+ import { provideIcons } from '@ng-icons/core';
16
16
  import { lucideChevronDown } from '@ng-icons/lucide';
17
17
  import type { BrnDialogState } from '@spartan-ng/brain/dialog';
18
18
  import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
19
- import { BrnPopover, BrnPopoverContent, BrnPopoverTrigger } from '@spartan-ng/brain/popover';
19
+ import { BrnPopoverImports } from '@spartan-ng/brain/popover';
20
20
  import { HlmCalendarMulti } from '<%- importAlias %>/calendar';
21
- import { HlmIcon } from '<%- importAlias %>/icon';
22
- import { HlmPopoverContent } from '<%- importAlias %>/popover';
21
+ import { HlmIconImports } from '<%- importAlias %>/icon';
22
+ import { HlmPopoverImports } from '<%- importAlias %>/popover';
23
23
  import { hlm } from '<%- importAlias %>/utils';
24
24
  import type { ClassValue } from 'clsx';
25
25
  import { injectHlmDatePickerMultiConfig } from './hlm-date-picker-multi.token';
@@ -34,20 +34,20 @@ let nextId = 0;
34
34
 
35
35
  @Component({
36
36
  selector: 'hlm-date-picker-multi',
37
- imports: [NgIcon, HlmIcon, BrnPopover, BrnPopoverTrigger, BrnPopoverContent, HlmPopoverContent, HlmCalendarMulti],
37
+ imports: [HlmIconImports, BrnPopoverImports, HlmPopoverImports, HlmCalendarMulti],
38
38
  providers: [HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR, provideIcons({ lucideChevronDown })],
39
39
  changeDetection: ChangeDetectionStrategy.OnPush,
40
40
  host: {
41
41
  class: 'block',
42
42
  },
43
43
  template: `
44
- <brn-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
44
+ <hlm-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
45
45
  <button
46
46
  [id]="buttonId()"
47
47
  type="button"
48
48
  [class]="_computedClass()"
49
49
  [disabled]="_mutableDisabled()"
50
- brnPopoverTrigger
50
+ hlmPopoverTrigger
51
51
  >
52
52
  <span class="truncate">
53
53
  @if (_formattedDate(); as formattedDate) {
@@ -73,7 +73,7 @@ let nextId = 0;
73
73
  (dateChange)="_handleChange($event)"
74
74
  />
75
75
  </div>
76
- </brn-popover>
76
+ </hlm-popover>
77
77
  `,
78
78
  })
79
79
  export class HlmDatePickerMulti<T> implements ControlValueAccessor {
@@ -11,14 +11,14 @@ import {
11
11
  signal,
12
12
  } from '@angular/core';
13
13
  import { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
14
- import { NgIcon, provideIcons } from '@ng-icons/core';
14
+ import { provideIcons } from '@ng-icons/core';
15
15
  import { lucideChevronDown } from '@ng-icons/lucide';
16
16
  import type { BrnDialogState } from '@spartan-ng/brain/dialog';
17
17
  import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
18
- import { BrnPopover, BrnPopoverContent, BrnPopoverTrigger } from '@spartan-ng/brain/popover';
18
+ import { BrnPopoverImports } from '@spartan-ng/brain/popover';
19
19
  import { HlmCalendar } from '<%- importAlias %>/calendar';
20
- import { HlmIcon } from '<%- importAlias %>/icon';
21
- import { HlmPopoverContent } from '<%- importAlias %>/popover';
20
+ import { HlmIconImports } from '<%- importAlias %>/icon';
21
+ import { HlmPopoverImports } from '<%- importAlias %>/popover';
22
22
  import { hlm } from '<%- importAlias %>/utils';
23
23
  import type { ClassValue } from 'clsx';
24
24
  import { injectHlmDatePickerConfig } from './hlm-date-picker.token';
@@ -33,20 +33,20 @@ let nextId = 0;
33
33
 
34
34
  @Component({
35
35
  selector: 'hlm-date-picker',
36
- imports: [NgIcon, HlmIcon, BrnPopover, BrnPopoverTrigger, BrnPopoverContent, HlmPopoverContent, HlmCalendar],
36
+ imports: [HlmIconImports, BrnPopoverImports, HlmPopoverImports, HlmCalendar],
37
37
  providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideIcons({ lucideChevronDown })],
38
38
  changeDetection: ChangeDetectionStrategy.OnPush,
39
39
  host: {
40
40
  class: 'block',
41
41
  },
42
42
  template: `
43
- <brn-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
43
+ <hlm-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_popoverState.set($event)">
44
44
  <button
45
45
  [id]="buttonId()"
46
46
  type="button"
47
47
  [class]="_computedClass()"
48
48
  [disabled]="_mutableDisabled()"
49
- brnPopoverTrigger
49
+ hlmPopoverTrigger
50
50
  >
51
51
  <span class="truncate">
52
52
  @if (_formattedDate(); as formattedDate) {
@@ -70,7 +70,7 @@ let nextId = 0;
70
70
  (dateChange)="_handleChange($event)"
71
71
  />
72
72
  </div>
73
- </brn-popover>
73
+ </hlm-popover>
74
74
  `,
75
75
  })
76
76
  export class HlmDatePicker<T> implements ControlValueAccessor {
@@ -12,14 +12,14 @@ import {
12
12
  untracked,
13
13
  } from '@angular/core';
14
14
  import { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
15
- import { NgIcon, provideIcons } from '@ng-icons/core';
15
+ import { provideIcons } from '@ng-icons/core';
16
16
  import { lucideChevronDown } from '@ng-icons/lucide';
17
17
  import type { BrnDialogState } from '@spartan-ng/brain/dialog';
18
18
  import type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
19
- import { BrnPopover, BrnPopoverContent, BrnPopoverTrigger } from '@spartan-ng/brain/popover';
19
+ import { BrnPopoverImports } from '@spartan-ng/brain/popover';
20
20
  import { HlmCalendarRange } from '<%- importAlias %>/calendar';
21
- import { HlmIcon } from '<%- importAlias %>/icon';
22
- import { HlmPopoverContent } from '<%- importAlias %>/popover';
21
+ import { HlmIconImports } from '<%- importAlias %>/icon';
22
+ import { HlmPopoverImports } from '<%- importAlias %>/popover';
23
23
  import { hlm } from '<%- importAlias %>/utils';
24
24
  import type { ClassValue } from 'clsx';
25
25
  import { injectHlmDateRangePickerConfig } from './hlm-date-range-picker.token';
@@ -34,14 +34,14 @@ let nextId = 0;
34
34
 
35
35
  @Component({
36
36
  selector: 'hlm-date-range-picker',
37
- imports: [NgIcon, HlmIcon, BrnPopover, BrnPopoverTrigger, BrnPopoverContent, HlmPopoverContent, HlmCalendarRange],
37
+ imports: [HlmIconImports, BrnPopoverImports, HlmPopoverImports, HlmCalendarRange],
38
38
  providers: [HLM_DATE_RANGE_PICKER_VALUE_ACCESSOR, provideIcons({ lucideChevronDown })],
39
39
  changeDetection: ChangeDetectionStrategy.OnPush,
40
40
  host: {
41
41
  class: 'block',
42
42
  },
43
43
  template: `
44
- <brn-popover
44
+ <hlm-popover
45
45
  sideOffset="5"
46
46
  [state]="_popoverState()"
47
47
  (stateChanged)="_popoverState.set($event)"
@@ -52,7 +52,7 @@ let nextId = 0;
52
52
  type="button"
53
53
  [class]="_computedClass()"
54
54
  [disabled]="_mutableDisabled()"
55
- brnPopoverTrigger
55
+ hlmPopoverTrigger
56
56
  >
57
57
  <span class="truncate">
58
58
  @if (_formattedDate(); as formattedDate) {
@@ -78,7 +78,7 @@ let nextId = 0;
78
78
  (endDateChange)="_handleEndDateChange($event)"
79
79
  />
80
80
  </div>
81
- </brn-popover>
81
+ </hlm-popover>
82
82
  `,
83
83
  })
84
84
  export class HlmDateRangePicker<T> implements ControlValueAccessor {
@@ -6,6 +6,7 @@ import { HlmDialogFooter } from './lib/hlm-dialog-footer';
6
6
  import { HlmDialogHeader } from './lib/hlm-dialog-header';
7
7
  import { HlmDialogOverlay } from './lib/hlm-dialog-overlay';
8
8
  import { HlmDialogTitle } from './lib/hlm-dialog-title';
9
+ import { HlmDialogTrigger } from './lib/hlm-dialog-trigger';
9
10
 
10
11
  export * from './lib/hlm-dialog';
11
12
  export * from './lib/hlm-dialog-close';
@@ -15,6 +16,7 @@ export * from './lib/hlm-dialog-footer';
15
16
  export * from './lib/hlm-dialog-header';
16
17
  export * from './lib/hlm-dialog-overlay';
17
18
  export * from './lib/hlm-dialog-title';
19
+ export * from './lib/hlm-dialog-trigger';
18
20
  export * from './lib/hlm-dialog.service';
19
21
 
20
22
  export const HlmDialogImports = [
@@ -26,4 +28,5 @@ export const HlmDialogImports = [
26
28
  HlmDialogHeader,
27
29
  HlmDialogOverlay,
28
30
  HlmDialogTitle,
31
+ HlmDialogTrigger,
29
32
  ] as const;
@@ -1,10 +1,13 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
+ import { BrnDialogClose } from '@spartan-ng/brain/dialog';
2
3
  import { hlm } from '<%- importAlias %>/utils';
3
4
  import type { ClassValue } from 'clsx';
4
5
 
5
6
  @Directive({
6
- selector: '[hlmDialogClose],[brnDialogClose][hlm]',
7
+ selector: 'button[hlmDialogClose]',
8
+ hostDirectives: [{ directive: BrnDialogClose, inputs: ['delay'] }],
7
9
  host: {
10
+ 'data-slot': 'dialog-close',
8
11
  '[class]': '_computedClass()',
9
12
  },
10
13
  })
@@ -1,19 +1,20 @@
1
1
  import { NgComponentOutlet } from '@angular/common';
2
2
  import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
3
- import { NgIcon, provideIcons } from '@ng-icons/core';
3
+ import { provideIcons } from '@ng-icons/core';
4
4
  import { lucideX } from '@ng-icons/lucide';
5
- import { BrnDialogClose, BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/brain/dialog';
6
- import { HlmIcon } from '<%- importAlias %>/icon';
5
+ import { BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/brain/dialog';
6
+ import { HlmIconImports } from '<%- importAlias %>/icon';
7
7
  import { hlm } from '<%- importAlias %>/utils';
8
8
  import type { ClassValue } from 'clsx';
9
9
  import { HlmDialogClose } from './hlm-dialog-close';
10
10
 
11
11
  @Component({
12
12
  selector: 'hlm-dialog-content',
13
- imports: [NgComponentOutlet, BrnDialogClose, HlmDialogClose, NgIcon, HlmIcon],
13
+ imports: [NgComponentOutlet, HlmDialogClose, HlmIconImports],
14
14
  providers: [provideIcons({ lucideX })],
15
15
  changeDetection: ChangeDetectionStrategy.OnPush,
16
16
  host: {
17
+ 'data-slot': 'dialog-content',
17
18
  '[class]': '_computedClass()',
18
19
  '[attr.data-state]': 'state()',
19
20
  },
@@ -24,7 +25,7 @@ import { HlmDialogClose } from './hlm-dialog-close';
24
25
  <ng-content />
25
26
  }
26
27
 
27
- <button brnDialogClose hlm>
28
+ <button hlmDialogClose>
28
29
  <span class="sr-only">Close</span>
29
30
  <ng-icon hlm size="sm" name="lucideX" />
30
31
  </button>
@@ -7,6 +7,7 @@ import type { ClassValue } from 'clsx';
7
7
  selector: '[hlmDialogDescription]',
8
8
  hostDirectives: [BrnDialogDescription],
9
9
  host: {
10
+ 'data-slot': 'dialog-description',
10
11
  '[class]': '_computedClass()',
11
12
  },
12
13
  })
@@ -1,16 +1,13 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
- @Component({
6
- selector: 'hlm-dialog-footer',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
5
+ @Directive({
6
+ selector: '[hlmDialogFooter],hlm-dialog-footer',
8
7
  host: {
8
+ 'data-slot': 'dialog-footer',
9
9
  '[class]': '_computedClass()',
10
10
  },
11
- template: `
12
- <ng-content />
13
- `,
14
11
  })
15
12
  export class HlmDialogFooter {
16
13
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -1,16 +1,13 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { computed, Directive, input } from '@angular/core';
2
2
  import { hlm } from '<%- importAlias %>/utils';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
5
- @Component({
6
- selector: 'hlm-dialog-header',
7
- changeDetection: ChangeDetectionStrategy.OnPush,
5
+ @Directive({
6
+ selector: '[hlmDialogHeader],hlm-dialog-header',
8
7
  host: {
8
+ 'data-slot': 'dialog-header',
9
9
  '[class]': '_computedClass()',
10
10
  },
11
- template: `
12
- <ng-content />
13
- `,
14
11
  })
15
12
  export class HlmDialogHeader {
16
13
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
@@ -1,5 +1,6 @@
1
1
  import { Directive, computed, effect, input, untracked } from '@angular/core';
2
2
  import { injectCustomClassSettable } from '@spartan-ng/brain/core';
3
+ import { BrnDialogOverlay } from '@spartan-ng/brain/dialog';
3
4
  import { hlm } from '<%- importAlias %>/utils';
4
5
  import type { ClassValue } from 'clsx';
5
6
 
@@ -7,7 +8,8 @@ export const hlmDialogOverlayClass =
7
8
  'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-black/50';
8
9
 
9
10
  @Directive({
10
- selector: '[hlmDialogOverlay],brn-dialog-overlay[hlm]',
11
+ selector: '[hlmDialogOverlay],hlm-dialog-overlay',
12
+ hostDirectives: [BrnDialogOverlay],
11
13
  })
12
14
  export class HlmDialogOverlay {
13
15
  private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });
@@ -7,6 +7,7 @@ import type { ClassValue } from 'clsx';
7
7
  selector: '[hlmDialogTitle]',
8
8
  hostDirectives: [BrnDialogTitle],
9
9
  host: {
10
+ 'data-slot': 'dialog-title',
10
11
  '[class]': '_computedClass()',
11
12
  },
12
13
  })
@@ -0,0 +1,11 @@
1
+ import { Directive } from '@angular/core';
2
+ import { BrnDialogTrigger } from '@spartan-ng/brain/dialog';
3
+
4
+ @Directive({
5
+ selector: 'button[hlmDialogTrigger],button[hlmDialogTriggerFor]',
6
+ hostDirectives: [{ directive: BrnDialogTrigger, inputs: ['id', 'brnDialogTriggerFor: hlmDialogTriggerFor', 'type'] }],
7
+ host: {
8
+ 'data-slot': 'dialog-trigger',
9
+ },
10
+ })
11
+ export class HlmDialogTrigger {}