@spartan-ng/cli 0.0.1-alpha.350 → 0.0.1-alpha.352

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 (67) hide show
  1. package/package.json +2 -2
  2. package/src/generators/base/generator.js +2 -2
  3. package/src/generators/base/generator.js.map +1 -1
  4. package/src/generators/base/lib/build-dependency-array.js +2 -2
  5. package/src/generators/base/lib/build-dependency-array.js.map +1 -1
  6. package/src/generators/base/lib/get-target-library-directory.js +1 -1
  7. package/src/generators/base/lib/get-target-library-directory.js.map +1 -1
  8. package/src/generators/base/lib/initialize-angular-library.js +1 -1
  9. package/src/generators/base/lib/initialize-angular-library.js.map +1 -1
  10. package/src/generators/base/versions.d.ts +20 -20
  11. package/src/generators/base/versions.js +20 -20
  12. package/src/generators/theme/libs/add-theme-to-application-styles.js +1 -1
  13. package/src/generators/theme/libs/add-theme-to-application-styles.js.map +1 -1
  14. package/src/generators/ui/generator.js +9 -4
  15. package/src/generators/ui/generator.js.map +1 -1
  16. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +1 -1
  17. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +1 -1
  18. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +1 -1
  19. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.spec.ts.template +2 -2
  20. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +3 -3
  21. package/src/generators/ui/libs/ui-avatar-helm/files/lib/fallback/hlm-avatar-fallback.directive.spec.ts.template +1 -1
  22. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template +1 -1
  23. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +1 -1
  24. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.spec.ts.template +1 -1
  25. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +1 -1
  26. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +1 -1
  27. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +1 -1
  28. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +1 -1
  29. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +1 -1
  30. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +1 -1
  31. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +1 -1
  32. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +1 -1
  33. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +2 -2
  34. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +8 -23
  35. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +3 -3
  36. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog.service.ts.template +3 -2
  37. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +1 -1
  38. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.ts.template +2 -2
  39. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +1 -1
  40. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +1 -1
  41. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +1 -1
  42. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +1 -1
  43. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +1 -1
  44. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +1 -1
  45. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +1 -1
  46. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +1 -1
  47. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +1 -1
  48. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +2 -2
  49. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +1 -1
  50. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +1 -1
  51. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +1 -1
  52. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +1 -1
  53. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +1 -1
  54. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +2 -2
  55. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +1 -1
  56. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +1 -1
  57. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +1 -1
  58. package/src/generators/ui/libs/ui-tabs-helm/files/index.ts.template +3 -0
  59. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +1 -1
  60. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-paginated-list.component.ts.template +91 -0
  61. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +1 -1
  62. package/src/generators/ui/libs/ui-tooltip-helm/files/lib/hlm-tooltip-trigger.directive.ts.template +1 -1
  63. package/src/generators/ui/supported-ui-libraries.json +47 -47
  64. package/src/index.js +1 -0
  65. package/src/index.js.map +1 -1
  66. package/src/utils/version-utils.js +5 -5
  67. package/src/utils/version-utils.js.map +1 -1
@@ -4,14 +4,14 @@ import {
4
4
  Component,
5
5
  ElementRef,
6
6
  Input,
7
+ type OnDestroy,
7
8
  PLATFORM_ID,
8
9
  ViewEncapsulation,
9
10
  computed,
10
11
  inject,
11
12
  signal,
12
- type OnDestroy,
13
13
  } from '@angular/core';
14
- import { NgIconComponent, type IconName } from '@ng-icons/core';
14
+ import { type IconName, NgIconComponent } from '@ng-icons/core';
15
15
  import { hlm } from '@spartan-ng/ui-core';
16
16
  import { cva } from 'class-variance-authority';
17
17
  import type { ClassValue } from 'clsx';
@@ -1,6 +1,6 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
6
  export const inputErrorVariants = cva('text-destructive text-sm font-medium', {
@@ -1,6 +1,6 @@
1
1
  import { Directive, Input, computed, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
6
  export const inputVariants = cva(
@@ -1,7 +1,7 @@
1
1
  import { Directive, Input, computed, inject, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnLabelDirective } from '@spartan-ng/ui-label-brain';
4
- import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { type VariantProps, cva } from 'class-variance-authority';
5
5
  import type { ClassValue } from 'clsx';
6
6
 
7
7
  export const labelVariants = cva(
@@ -10,7 +10,7 @@ import type { ClassValue } from 'clsx';
10
10
  providers: [provideIcons({ lucideChevronRight })],
11
11
  imports: [HlmIconComponent],
12
12
  template: `
13
- <hlm-icon size="none" class="h-full w-full" name="lucideChevronRight" />
13
+ <hlm-icon size="none" class="w-full h-full" name="lucideChevronRight" />
14
14
  `,
15
15
  host: {
16
16
  '[class]': '_computedClass()',
@@ -1,7 +1,7 @@
1
1
  import { Directive, Input, booleanAttribute, computed, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnMenuItemDirective } from '@spartan-ng/ui-menu-brain';
4
- import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { type VariantProps, cva } from 'class-variance-authority';
5
5
  import type { ClassValue } from 'clsx';
6
6
 
7
7
  export const hlmMenuItemVariants = cva(
@@ -5,7 +5,7 @@ import type { ClassValue } from 'clsx';
5
5
  @Component({
6
6
  selector: 'hlm-menu-separator',
7
7
  standalone: true,
8
- template: ``,
8
+ template: '',
9
9
  host: {
10
10
  '[class]': '_computedClass()',
11
11
  },
@@ -1,7 +1,7 @@
1
1
  import { Component, Input, computed, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnMenuDirective } from '@spartan-ng/ui-menu-brain';
4
- import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { type VariantProps, cva } from 'class-variance-authority';
5
5
  import type { ClassValue } from 'clsx';
6
6
 
7
7
  export const menuVariants = cva(
@@ -1,6 +1,6 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
 
5
5
  export const paginationContentVariants = cva('flex flex-row items-center gap-1', {
6
6
  variants: {},
@@ -1,6 +1,6 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
 
5
5
  export const paginationItemVariants = cva('', {
6
6
  variants: {},
@@ -1,8 +1,8 @@
1
1
  import { Directive, booleanAttribute, computed, input } from '@angular/core';
2
2
  import { RouterLink } from '@angular/router';
3
- import { buttonVariants, type ButtonVariants } from '@spartan-ng/ui-button-helm';
3
+ import { type ButtonVariants, buttonVariants } from '@spartan-ng/ui-button-helm';
4
4
  import { hlm } from '@spartan-ng/ui-core';
5
- import { cva, type VariantProps } from 'class-variance-authority';
5
+ import { type VariantProps, cva } from 'class-variance-authority';
6
6
 
7
7
  export const paginationLinkVariants = cva('', {
8
8
  variants: {},
@@ -1,6 +1,6 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
6
  export const paginationVariants = cva('mx-auto flex w-full justify-center', {
@@ -1,4 +1,4 @@
1
- import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal, type DoCheck } from '@angular/core';
1
+ import { Directive, type DoCheck, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import type { ClassValue } from 'clsx';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Directive, computed, inject, input, signal, type OnInit } from '@angular/core';
1
+ import { Directive, type OnInit, computed, inject, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnSelectLabelDirective } from '@spartan-ng/ui-select-brain';
4
4
  import type { ClassValue } from 'clsx';
@@ -11,7 +11,7 @@ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
11
11
  class: 'flex cursor-default items-center justify-center py-1',
12
12
  },
13
13
  template: `
14
- <hlm-icon class="ml-2 h-4 w-4" name="lucideChevronDown" />
14
+ <hlm-icon class="w-4 h-4 ml-2" name="lucideChevronDown" />
15
15
  `,
16
16
  })
17
17
  export class HlmSelectScrollDownComponent {}
@@ -11,7 +11,7 @@ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
11
11
  class: 'flex cursor-default items-center justify-center py-1',
12
12
  },
13
13
  template: `
14
- <hlm-icon class="ml-2 h-4 w-4" name="lucideChevronUp" />
14
+ <hlm-icon class="w-4 h-4 ml-2" name="lucideChevronUp" />
15
15
  `,
16
16
  })
17
17
  export class HlmSelectScrollUpComponent {}
@@ -1,4 +1,4 @@
1
- import { Component, ContentChild, ViewChild, computed, input, type ElementRef } from '@angular/core';
1
+ import { Component, ContentChild, type ElementRef, ViewChild, computed, input } from '@angular/core';
2
2
  import { provideIcons } from '@ng-icons/core';
3
3
  import { lucideChevronDown } from '@ng-icons/lucide';
4
4
  import { hlm } from '@spartan-ng/ui-core';
@@ -17,7 +17,7 @@ import type { ClassValue } from 'clsx';
17
17
  @if (icon) {
18
18
  <ng-content select="hlm-icon" />
19
19
  } @else {
20
- <hlm-icon class="ml-2 h-4 w-4 flex-none" name="lucideChevronDown" />
20
+ <hlm-icon class="flex-none w-4 h-4 ml-2" name="lucideChevronDown" />
21
21
  }
22
22
  </button>
23
23
  `,
@@ -39,7 +39,7 @@ export const sheetVariants = cva(
39
39
  <ng-content />
40
40
  <button brnSheetClose hlm>
41
41
  <span class="sr-only">Close</span>
42
- <hlm-icon class="flex h-4 w-4" size="100%" name="lucideX" />
42
+ <hlm-icon class="flex w-4 h-4" size="100%" name="lucideX" />
43
43
  </button>
44
44
  `,
45
45
  })
@@ -5,7 +5,7 @@ import type { ClassValue } from 'clsx';
5
5
  @Component({
6
6
  selector: 'hlm-skeleton',
7
7
  standalone: true,
8
- template: ``,
8
+ template: '',
9
9
  host: {
10
10
  '[class]': '_computedClass()',
11
11
  },
@@ -1,6 +1,6 @@
1
1
  import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
6
  export const spinnerVariants = cva('inline-block', {
@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
2
2
 
3
3
  import { HlmTabsContentDirective } from './lib/hlm-tabs-content.directive';
4
4
  import { HlmTabsListComponent } from './lib/hlm-tabs-list.component';
5
+ import { HlmTabsPaginatedListComponent } from './lib/hlm-tabs-paginated-list.component';
5
6
  import { HlmTabsTriggerDirective } from './lib/hlm-tabs-trigger.directive';
6
7
  import { HlmTabsComponent } from './lib/hlm-tabs.component';
7
8
 
8
9
  export * from './lib/hlm-tabs-content.directive';
9
10
  export * from './lib/hlm-tabs-list.component';
11
+ export * from './lib/hlm-tabs-paginated-list.component';
10
12
  export * from './lib/hlm-tabs-trigger.directive';
11
13
  export * from './lib/hlm-tabs.component';
12
14
 
@@ -15,6 +17,7 @@ export const HlmTabsImports = [
15
17
  HlmTabsListComponent,
16
18
  HlmTabsTriggerDirective,
17
19
  HlmTabsContentDirective,
20
+ HlmTabsPaginatedListComponent,
18
21
  ] as const;
19
22
 
20
23
  @NgModule({
@@ -1,7 +1,7 @@
1
1
  import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { BrnTabsListDirective } from '@spartan-ng/ui-tabs-brain';
4
- import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { type VariantProps, cva } from 'class-variance-authority';
5
5
  import type { ClassValue } from 'clsx';
6
6
 
7
7
  export const listVariants = cva(
@@ -0,0 +1,91 @@
1
+ import { CdkObserveContent } from '@angular/cdk/observers';
2
+ import { Component, ContentChildren, ElementRef, QueryList, ViewChild, computed, input } from '@angular/core';
3
+ import { lucideChevronLeft, lucideChevronRight } from '@ng-icons/lucide';
4
+ import { buttonVariants } from '@spartan-ng/ui-button-helm';
5
+ import { hlm } from '@spartan-ng/ui-core';
6
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
7
+ import { BrnTabsPaginatedListDirective, BrnTabsTriggerDirective } from '@spartan-ng/ui-tabs-brain';
8
+ import { ClassValue } from 'clsx';
9
+ import { listVariants } from './hlm-tabs-list.component';
10
+
11
+ @Component({
12
+ selector: 'hlm-paginated-tabs-list',
13
+ standalone: true,
14
+ imports: [CdkObserveContent, HlmIconComponent],
15
+ providers: [provideIcons({ lucideChevronRight, lucideChevronLeft })],
16
+ template: `
17
+ <button
18
+ #previousPaginator
19
+ data-pagination="previous"
20
+ type="button"
21
+ aria-hidden="true"
22
+ tabindex="-1"
23
+ [class.flex]="_showPaginationControls()"
24
+ [class.hidden]="!_showPaginationControls()"
25
+ [class]="_paginationButtonClass()"
26
+ [disabled]="_disableScrollBefore || null"
27
+ (click)="_handlePaginatorClick('before')"
28
+ (mousedown)="_handlePaginatorPress('before', $event)"
29
+ (touchend)="_stopInterval()"
30
+ >
31
+ <hlm-icon size="base" name="lucideChevronLeft" />
32
+ </button>
33
+
34
+ <div #tabListContainer class="z-[1] flex grow overflow-hidden " (keydown)="_handleKeydown($event)">
35
+ <div class="relative grow transition-transform" #tabList role="tablist" (cdkObserveContent)="_onContentChanges()">
36
+ <div #tabListInner [class]="_tabListClass()">
37
+ <ng-content></ng-content>
38
+ </div>
39
+ </div>
40
+ </div>
41
+
42
+ <button
43
+ #nextPaginator
44
+ data-pagination="next"
45
+ type="button"
46
+ aria-hidden="true"
47
+ tabindex="-1"
48
+ [class.flex]="_showPaginationControls()"
49
+ [class.hidden]="!_showPaginationControls()"
50
+ [class]="_paginationButtonClass()"
51
+ [disabled]="_disableScrollAfter || null"
52
+ (click)="_handlePaginatorClick('after')"
53
+ (mousedown)="_handlePaginatorPress('after', $event)"
54
+ (touchend)="_stopInterval()"
55
+ >
56
+ <hlm-icon size="base" name="lucideChevronRight" />
57
+ </button>
58
+ `,
59
+ host: {
60
+ '[class]': '_computedClass()',
61
+ },
62
+ })
63
+ export class HlmTabsPaginatedListComponent extends BrnTabsPaginatedListDirective {
64
+ @ContentChildren(BrnTabsTriggerDirective, { descendants: false })
65
+ _items!: QueryList<BrnTabsTriggerDirective>;
66
+ @ViewChild('tabListContainer', { static: true })
67
+ _tabListContainer!: ElementRef;
68
+ @ViewChild('tabList', { static: true }) _tabList!: ElementRef;
69
+ @ViewChild('tabListInner', { static: true }) _tabListInner!: ElementRef;
70
+ @ViewChild('nextPaginator') _nextPaginator!: ElementRef<HTMLElement>;
71
+ @ViewChild('previousPaginator') _previousPaginator!: ElementRef<HTMLElement>;
72
+
73
+ public readonly userClass = input<ClassValue>('', { alias: 'class' });
74
+ protected _computedClass = computed(() => hlm('flex overflow-hidden relative flex-shrink-0', this.userClass()));
75
+
76
+ public readonly tabLisClass = input<ClassValue>('', { alias: 'class' });
77
+ protected _tabListClass = computed(() => hlm(listVariants(), this.tabLisClass()));
78
+
79
+ public readonly paginationButtonClass = input<ClassValue>('', { alias: 'class' });
80
+ protected _paginationButtonClass = computed(() =>
81
+ hlm(
82
+ 'relative z-[2] select-none data-[pagination=previous]:pr-1 data-[pagination=next]:pl-1 disabled:cursor-default',
83
+ buttonVariants({ variant: 'ghost', size: 'icon' }),
84
+ this.paginationButtonClass(),
85
+ ),
86
+ );
87
+
88
+ protected _itemSelected(event: KeyboardEvent) {
89
+ event.preventDefault();
90
+ }
91
+ }
@@ -1,6 +1,6 @@
1
1
  import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
- import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { type VariantProps, cva } from 'class-variance-authority';
4
4
  import type { ClassValue } from 'clsx';
5
5
 
6
6
  export const toggleVariants = cva(
@@ -1,4 +1,4 @@
1
- import { Directive, Input, inject, type TemplateRef } from '@angular/core';
1
+ import { Directive, Input, type TemplateRef, inject } from '@angular/core';
2
2
  import { BrnTooltipTriggerDirective } from '@spartan-ng/ui-tooltip-brain';
3
3
 
4
4
  @Directive({