@spartan-ng/cli 0.0.1-alpha.336 → 0.0.1-alpha.337

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/package.json +1 -1
  2. package/src/generators/base/versions.d.ts +1 -1
  3. package/src/generators/base/versions.js +1 -1
  4. package/src/generators/ui/generator.js +2 -2
  5. package/src/generators/ui/generator.js.map +1 -1
  6. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.directive.ts.template +3 -8
  7. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +6 -11
  8. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template +9 -9
  9. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +3 -8
  10. package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +4 -9
  11. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +3 -8
  12. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.component.ts.template +3 -8
  13. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.directive.ts.template +3 -8
  14. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.component.ts.template +3 -7
  15. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.component.ts.template +3 -7
  16. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.directive.ts.template +3 -7
  17. package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.directive.ts.template +3 -7
  18. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +3 -11
  19. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +3 -11
  20. package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +3 -11
  21. package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +3 -8
  22. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template +10 -6
  23. package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +5 -11
  24. package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template +3 -11
  25. package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +5 -14
  26. package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +11 -11
  27. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +3 -11
  28. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +3 -11
  29. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +6 -16
  30. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +6 -15
  31. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +3 -11
  32. package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +3 -11
  33. package/src/generators/ui/libs/ui-carousel-helm/files/index.ts.template +26 -0
  34. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +25 -0
  35. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +26 -0
  36. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +62 -0
  37. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +62 -0
  38. package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +93 -0
  39. package/src/generators/ui/libs/ui-carousel-helm/generator.d.ts +3 -0
  40. package/src/generators/ui/libs/ui-carousel-helm/generator.js +12 -0
  41. package/src/generators/ui/libs/ui-carousel-helm/generator.js.map +1 -0
  42. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +14 -15
  43. package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +29 -17
  44. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +3 -11
  45. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +8 -14
  46. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.directive.ts.template +3 -11
  47. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.directive.ts.template +7 -13
  48. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input-wrapper.component.ts.template +5 -14
  49. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input.directive.ts.template +7 -12
  50. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -10
  51. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.directive.ts.template +7 -12
  52. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.directive.ts.template +3 -11
  53. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.component.ts.template +5 -11
  54. package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.directive.ts.template +7 -13
  55. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.directive.ts.template +7 -13
  56. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +6 -11
  57. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +3 -11
  58. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.component.ts.template +5 -11
  59. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.component.ts.template +5 -11
  60. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.directive.ts.template +3 -7
  61. package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +5 -11
  62. package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.component.ts.template +2 -7
  63. package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +3 -3
  64. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +3 -11
  65. package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +5 -10
  66. package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +4 -10
  67. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +7 -13
  68. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.component.ts.template +5 -11
  69. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.component.ts.template +12 -14
  70. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +8 -21
  71. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -10
  72. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.component.ts.template +12 -14
  73. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +8 -21
  74. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +6 -14
  75. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +5 -15
  76. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.component.ts.template +5 -11
  77. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +3 -11
  78. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.component.ts.template +5 -11
  79. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +4 -12
  80. package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +7 -13
  81. package/src/generators/ui/libs/ui-pagination-helm/files/index.ts.template +33 -0
  82. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +21 -0
  83. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.componet.ts.template +23 -0
  84. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +22 -0
  85. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +56 -0
  86. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.componet.ts.template +31 -0
  87. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.componet.ts.template +31 -0
  88. package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +25 -0
  89. package/src/generators/ui/libs/ui-pagination-helm/generator.d.ts +3 -0
  90. package/src/generators/ui/libs/ui-pagination-helm/generator.js +12 -0
  91. package/src/generators/ui/libs/ui-pagination-helm/generator.js.map +1 -0
  92. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +7 -13
  93. package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +7 -13
  94. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +5 -11
  95. package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +5 -11
  96. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.directive.ts.template +3 -11
  97. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +3 -11
  98. package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.directive.ts.template +5 -11
  99. package/src/generators/ui/libs/ui-select-helm/files/index.ts.template +38 -0
  100. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +34 -0
  101. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.directive.ts.template +22 -0
  102. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +38 -0
  103. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +54 -0
  104. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +17 -0
  105. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +17 -0
  106. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +44 -0
  107. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +26 -0
  108. package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +21 -0
  109. package/src/generators/ui/libs/ui-select-helm/generator.d.ts +3 -0
  110. package/src/generators/ui/libs/ui-select-helm/generator.js +12 -0
  111. package/src/generators/ui/libs/ui-select-helm/generator.js.map +1 -0
  112. package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.directive.ts.template +7 -13
  113. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +7 -13
  114. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +6 -14
  115. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +3 -11
  116. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.component.ts.template +5 -11
  117. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.component.ts.template +3 -11
  118. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +11 -17
  119. package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +3 -11
  120. package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +3 -11
  121. package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +5 -11
  122. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +7 -13
  123. package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +19 -14
  124. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-caption.component.ts.template +10 -28
  125. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.component.ts.template +11 -27
  126. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-td.component.ts.template +8 -12
  127. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-th.component.ts.template +22 -23
  128. package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-trow.component.ts.template +7 -24
  129. package/src/generators/ui/libs/ui-tabs-helm/files/index.ts.template +8 -1
  130. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +9 -21
  131. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +5 -17
  132. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template +9 -21
  133. package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.component.ts.template +17 -0
  134. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template +7 -13
  135. package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +5 -11
  136. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template +3 -11
  137. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.directive.ts.template +3 -11
  138. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.directive.ts.template +3 -11
  139. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.directive.ts.template +3 -11
  140. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.directive.ts.template +3 -11
  141. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +3 -11
  142. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.directive.ts.template +3 -11
  143. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.directive.ts.template +3 -11
  144. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.directive.ts.template +3 -11
  145. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.directive.ts.template +3 -11
  146. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.directive.ts.template +3 -11
  147. package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.directive.ts.template +3 -11
  148. package/src/generators/ui/supported-ui-libraries.json +114 -81
@@ -0,0 +1,56 @@
1
+ import { booleanAttribute, computed, Directive, input } from '@angular/core';
2
+ import { RouterLink } from '@angular/router';
3
+ import { buttonVariants, ButtonVariants } from '@spartan-ng/ui-button-helm';
4
+ import { hlm } from '@spartan-ng/ui-core';
5
+ import { cva, VariantProps } from 'class-variance-authority';
6
+
7
+ export const paginationLinkVariants = cva('', {
8
+ variants: {},
9
+ defaultVariants: {},
10
+ });
11
+ export type PaginationLinkVariants = VariantProps<typeof paginationLinkVariants>;
12
+
13
+ @Directive({
14
+ selector: '[hlmPaginationLink]',
15
+ standalone: true,
16
+ hostDirectives: [
17
+ {
18
+ directive: RouterLink,
19
+ inputs: [
20
+ 'target',
21
+ 'queryParams',
22
+ 'fragment',
23
+ 'queryParamsHandling',
24
+ 'state',
25
+ 'info',
26
+ 'relativeTo',
27
+ 'preserveFragment',
28
+ 'skipLocationChange',
29
+ 'replaceUrl',
30
+ 'routerLink: link',
31
+ ],
32
+ },
33
+ ],
34
+ host: {
35
+ '[class]': '_computedClass()',
36
+ '[attr.aria-current]': 'isActive() ? "page" : null',
37
+ },
38
+ })
39
+ export class HlmPaginationLinkDirective {
40
+ public readonly class = input('');
41
+ public readonly isActive = input(false, { transform: booleanAttribute });
42
+ public readonly size = input<ButtonVariants['size']>('icon');
43
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
+ public readonly link = input<string | any[] | null | undefined>();
45
+
46
+ protected _computedClass = computed(() =>
47
+ hlm(
48
+ paginationLinkVariants(),
49
+ buttonVariants({
50
+ variant: this.isActive() ? 'outline' : 'ghost',
51
+ size: this.size(),
52
+ }),
53
+ this.class(),
54
+ ),
55
+ );
56
+ }
@@ -0,0 +1,31 @@
1
+ import { Component, computed, input } from '@angular/core';
2
+ import { lucideChevronRight } from '@ng-icons/lucide';
3
+ import { hlm } from '@spartan-ng/ui-core';
4
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
5
+ import { HlmPaginationLinkDirective } from './hlm-pagination-link.directive';
6
+
7
+ @Component({
8
+ selector: 'hlm-pagination-next',
9
+ standalone: true,
10
+ imports: [HlmPaginationLinkDirective, HlmIconComponent],
11
+ providers: [provideIcons({ lucideChevronRight })],
12
+ template: `
13
+ <a
14
+ [class]="_computedClass()"
15
+ hlmPaginationLink
16
+ [link]="link()"
17
+ size="default"
18
+ [attr.aria-label]="'Go to next page'"
19
+ >
20
+ <span>Next</span>
21
+ <hlm-icon size="sm" name="lucideChevronRight" />
22
+ </a>
23
+ `,
24
+ })
25
+ export class HlmPaginationNextComponent {
26
+ public readonly class = input('');
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ public readonly link = input<string | any[] | null | undefined>();
29
+
30
+ protected _computedClass = computed(() => hlm('gap-1 pr-2.5', this.class()));
31
+ }
@@ -0,0 +1,31 @@
1
+ import { Component, computed, input } from '@angular/core';
2
+ import { lucideChevronLeft } from '@ng-icons/lucide';
3
+ import { hlm } from '@spartan-ng/ui-core';
4
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
5
+ import { HlmPaginationLinkDirective } from './hlm-pagination-link.directive';
6
+
7
+ @Component({
8
+ selector: 'hlm-pagination-previous',
9
+ standalone: true,
10
+ imports: [HlmPaginationLinkDirective, HlmIconComponent],
11
+ providers: [provideIcons({ lucideChevronLeft })],
12
+ template: `
13
+ <a
14
+ [class]="_computedClass()"
15
+ hlmPaginationLink
16
+ [link]="link()"
17
+ size="default"
18
+ [attr.aria-label]="'Go to previous page'"
19
+ >
20
+ <hlm-icon size="sm" name="lucideChevronLeft" />
21
+ <span>Previous</span>
22
+ </a>
23
+ `,
24
+ })
25
+ export class HlmPaginationPreviousComponent {
26
+ public readonly class = input('');
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ public readonly link = input<string | any[] | null | undefined>();
29
+
30
+ protected _computedClass = computed(() => hlm('gap-1 pr-2.5', this.class()));
31
+ }
@@ -0,0 +1,25 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { cva, VariantProps } from 'class-variance-authority';
4
+ import { ClassValue } from 'clsx';
5
+
6
+ export const paginationVariants = cva('mx-auto flex w-full justify-center', {
7
+ variants: {},
8
+ defaultVariants: {},
9
+ });
10
+ export type PaginationVariants = VariantProps<typeof paginationVariants>;
11
+
12
+ @Directive({
13
+ selector: '[hlmPagination]',
14
+ standalone: true,
15
+ host: {
16
+ '[class]': '_computedClass()',
17
+ '[attr.role]': '"navigation"',
18
+ '[attr.aria-label]': '"pagination"',
19
+ },
20
+ })
21
+ export class HlmPaginationDirective {
22
+ public readonly class = input<ClassValue>('');
23
+
24
+ protected _computedClass = computed(() => hlm(paginationVariants(), this.class()));
25
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { HlmBaseGeneratorSchema } from '../../../base/schema';
3
+ export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const generator_1 = require("../../../base/generator");
6
+ function generator(tree, options) {
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ return yield (0, generator_1.default)(tree, Object.assign(Object.assign({}, options), { primitiveName: 'pagination', internalName: 'ui-pagination-helm', publicName: 'ui-pagination-helm' }));
9
+ });
10
+ }
11
+ exports.generator = generator;
12
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/ui-pagination-helm/generator.ts"],"names":[],"mappings":";;;;AACA,uDAAuD;AAGvD,SAAsB,SAAS,CAAC,IAAU,EAAE,OAA+B;;QAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,kCAC9B,OAAO,KACV,aAAa,EAAE,YAAY,EAC3B,YAAY,EAAE,oBAAoB,EAClC,UAAU,EAAE,oBAAoB,IAC/B,CAAC;IACJ,CAAC;CAAA;AAPD,8BAOC"}
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,17 +10,11 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmPopoverCloseDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm(
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm(
22
16
  'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',
23
- this._userCls(),
24
- );
25
- }
17
+ this._userClass(),
18
+ ),
19
+ );
26
20
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, effect, ElementRef, inject, Input, Renderer2, signal } from '@angular/core';
1
+ import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
2
2
  import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -21,17 +21,11 @@ export class HlmPopoverContentDirective {
21
21
  });
22
22
  }
23
23
 
24
- private readonly _userCls = signal<ClassValue>('');
25
- @Input()
26
- set class(userCls: ClassValue) {
27
- this._userCls.set(userCls);
28
- }
29
-
30
- protected _computedClass = computed(() => this._generateClass());
31
- private _generateClass() {
32
- return hlm(
24
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
25
+ protected _computedClass = computed(() =>
26
+ hlm(
33
27
  'relative border-border w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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',
34
- this._userCls(),
35
- );
36
- }
28
+ this._userClass(),
29
+ ),
30
+ );
37
31
  }
@@ -1,4 +1,4 @@
1
- import { computed, Directive, DoCheck, effect, ElementRef, inject, Input, Renderer2, signal } from '@angular/core';
1
+ import { Directive, DoCheck, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -14,16 +14,10 @@ export class HlmProgressIndicatorDirective implements DoCheck {
14
14
  private _renderer = inject(Renderer2);
15
15
  private readonly _value = signal(0);
16
16
 
17
- private readonly _userCls = signal<ClassValue>('');
18
- @Input()
19
- set class(userCls: ClassValue) {
20
- this._userCls.set(userCls);
21
- }
22
-
23
- protected _computedClass = computed(() => this._generateClass());
24
- private _generateClass() {
25
- return hlm('inline-flex transform-gpu h-full w-full flex-1 bg-primary transition-all', this._userCls());
26
- }
17
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
18
+ protected _computedClass = computed(() =>
19
+ hlm('inline-flex transform-gpu h-full w-full flex-1 bg-primary transition-all', this._userClass()),
20
+ );
27
21
 
28
22
  constructor() {
29
23
  effect(() => {
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,14 +10,8 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmProgressDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm('inline-flex relative h-4 w-full overflow-hidden rounded-full bg-secondary', this._userCls());
22
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm('inline-flex relative h-4 w-full overflow-hidden rounded-full bg-secondary', this._userClass()),
16
+ );
23
17
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,14 +10,6 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmRadioGroupDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm('block', this._userCls());
22
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() => hlm('block', this._userClass()));
23
15
  }
@@ -1,4 +1,4 @@
1
- import { Component, Input, computed, signal } from '@angular/core';
1
+ import { Component, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -19,14 +19,6 @@ const btnLike =
19
19
  `,
20
20
  })
21
21
  export class HlmRadioIndicatorComponent {
22
- private readonly _userCls = signal<ClassValue>('');
23
- @Input()
24
- set class(userCls: ClassValue) {
25
- this._userCls.set(userCls);
26
- }
27
-
28
- protected _computedClass = computed(() => this._generateClass());
29
- private _generateClass() {
30
- return hlm('relative inline-flex h-4 w-4', this._userCls());
31
- }
22
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
23
+ protected _computedClass = computed(() => hlm('relative inline-flex h-4 w-4', this._userClass()));
32
24
  }
@@ -1,4 +1,4 @@
1
- import { Directive, Input, computed, signal } from '@angular/core';
1
+ import { Directive, computed, input } from '@angular/core';
2
2
  import { hlm } from '@spartan-ng/ui-core';
3
3
  import { ClassValue } from 'clsx';
4
4
 
@@ -10,14 +10,8 @@ import { ClassValue } from 'clsx';
10
10
  },
11
11
  })
12
12
  export class HlmRadioDirective {
13
- private readonly _userCls = signal<ClassValue>('');
14
- @Input()
15
- set class(userCls: ClassValue) {
16
- this._userCls.set(userCls);
17
- }
18
-
19
- protected _computedClass = computed(() => this._generateClass());
20
- private _generateClass() {
21
- return hlm('group [&.brn-radio-disabled]:text-muted-foreground flex items-center space-x-2', this._userCls());
22
- }
13
+ private readonly _userClass = input<ClassValue>('', { alias: 'class' });
14
+ protected _computedClass = computed(() =>
15
+ hlm('group [&.brn-radio-disabled]:text-muted-foreground flex items-center space-x-2', this._userClass()),
16
+ );
23
17
  }
@@ -0,0 +1,38 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { HlmSelectContentDirective } from './lib/hlm-select-content.directive';
3
+ import { HlmSelectGroupDirective } from './lib/hlm-select-group.directive';
4
+ import { HlmSelectLabelDirective } from './lib/hlm-select-label.directive';
5
+ import { HlmSelectOptionComponent } from './lib/hlm-select-option.component';
6
+ import { HlmSelectScrollDownComponent } from './lib/hlm-select-scroll-down.component';
7
+ import { HlmSelectScrollUpComponent } from './lib/hlm-select-scroll-up.component';
8
+ import { HlmSelectTriggerComponent } from './lib/hlm-select-trigger.component';
9
+ import { HlmSelectValueDirective } from './lib/hlm-select-value.directive';
10
+ import { HlmSelectDirective } from './lib/hlm-select.directive';
11
+
12
+ export * from './lib/hlm-select-content.directive';
13
+ export * from './lib/hlm-select-group.directive';
14
+ export * from './lib/hlm-select-label.directive';
15
+ export * from './lib/hlm-select-option.component';
16
+ export * from './lib/hlm-select-scroll-down.component';
17
+ export * from './lib/hlm-select-scroll-up.component';
18
+ export * from './lib/hlm-select-trigger.component';
19
+ export * from './lib/hlm-select-value.directive';
20
+ export * from './lib/hlm-select.directive';
21
+
22
+ export const HlmSelectImports = [
23
+ HlmSelectContentDirective,
24
+ HlmSelectTriggerComponent,
25
+ HlmSelectOptionComponent,
26
+ HlmSelectValueDirective,
27
+ HlmSelectDirective,
28
+ HlmSelectScrollUpComponent,
29
+ HlmSelectScrollDownComponent,
30
+ HlmSelectLabelDirective,
31
+ HlmSelectGroupDirective,
32
+ ] as const;
33
+
34
+ @NgModule({
35
+ imports: [...HlmSelectImports],
36
+ exports: [...HlmSelectImports],
37
+ })
38
+ export class HlmSelectModule {}
@@ -0,0 +1,34 @@
1
+ import { computed, Directive, Input, signal } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ @Directive({
6
+ selector: '[hlmSelectContent], hlm-select-content',
7
+ standalone: true,
8
+ host: {
9
+ '[class]': '_computedClass()',
10
+ },
11
+ })
12
+ export class HlmSelectContentDirective {
13
+ private readonly _classNames = signal<ClassValue>('');
14
+ // eslint-disable-next-line @angular-eslint/no-input-rename
15
+ @Input({ alias: 'class' })
16
+ set _class(classNames: ClassValue) {
17
+ this._classNames.set(classNames);
18
+ }
19
+ protected readonly _computedClass = computed(() =>
20
+ hlm(
21
+ 'top-[2px] relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md p-1 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
+ this._classNames(),
23
+ ),
24
+ );
25
+
26
+ private readonly _stickyLabels = signal(false);
27
+ @Input()
28
+ set stickyLabels(value: boolean) {
29
+ this._stickyLabels.set(value);
30
+ }
31
+ get stickyLabels() {
32
+ return this._stickyLabels();
33
+ }
34
+ }
@@ -0,0 +1,22 @@
1
+ import { computed, Directive, Input, signal } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { BrnSelectGroupDirective } from '@spartan-ng/ui-select-brain';
4
+ import { ClassValue } from 'clsx';
5
+
6
+ @Directive({
7
+ selector: '[hlmSelectGroup], hlm-select-group',
8
+ hostDirectives: [BrnSelectGroupDirective],
9
+ standalone: true,
10
+ host: {
11
+ '[class]': '_computedClass()',
12
+ },
13
+ })
14
+ export class HlmSelectGroupDirective {
15
+ private readonly _classNames = signal<ClassValue>('');
16
+ // eslint-disable-next-line @angular-eslint/no-input-rename
17
+ @Input({ alias: 'class' })
18
+ set _class(classNames: ClassValue) {
19
+ this._classNames.set(classNames);
20
+ }
21
+ protected readonly _computedClass = computed(() => hlm(this._classNames()));
22
+ }
@@ -0,0 +1,38 @@
1
+ import { computed, Directive, inject, Input, OnInit, signal } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { BrnSelectLabelDirective } from '@spartan-ng/ui-select-brain';
4
+ import { ClassValue } from 'clsx';
5
+ import { HlmSelectContentDirective } from './hlm-select-content.directive';
6
+
7
+ @Directive({
8
+ selector: '[hlmSelectLabel], hlm-select-label',
9
+ hostDirectives: [BrnSelectLabelDirective],
10
+ standalone: true,
11
+ host: {
12
+ '[class]': '_computedClass()',
13
+ },
14
+ })
15
+ export class HlmSelectLabelDirective implements OnInit {
16
+ private readonly selectContent = inject(HlmSelectContentDirective);
17
+ private readonly _stickyLabels = signal(false);
18
+
19
+ private readonly _classNames = signal<ClassValue>('');
20
+ // eslint-disable-next-line @angular-eslint/no-input-rename
21
+ @Input({ alias: 'class' })
22
+ set _class(classNames: ClassValue) {
23
+ this._classNames.set(classNames);
24
+ }
25
+ protected _computedClass = computed(() =>
26
+ hlm(
27
+ 'px-2 py-1.5 text-sm font-semibold',
28
+ this._stickyLabels() ? 'sticky top-0 bg-popover block z-[2]' : '',
29
+ this._classNames(),
30
+ ),
31
+ );
32
+
33
+ ngOnInit(): void {
34
+ if (this.selectContent.stickyLabels) {
35
+ this._stickyLabels.set(true);
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,54 @@
1
+ import { ChangeDetectionStrategy, Component, computed, inject, Input, signal } from '@angular/core';
2
+ import { lucideCheck } from '@ng-icons/lucide';
3
+ import { hlm } from '@spartan-ng/ui-core';
4
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
5
+ import { BrnSelectOptionDirective } from '@spartan-ng/ui-select-brain';
6
+ import { ClassValue } from 'clsx';
7
+
8
+ @Component({
9
+ selector: 'hlm-option',
10
+ standalone: true,
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ hostDirectives: [BrnSelectOptionDirective],
13
+ providers: [provideIcons({ lucideCheck })],
14
+ host: {
15
+ '[class]': '_computedClass()',
16
+ },
17
+ template: `
18
+ <ng-content />
19
+ <span
20
+ [attr.dir]="_brnSelectOption.dir()"
21
+ class="absolute right-2 flex h-3.5 w-3.5 items-center justify-center rtl:left-2 rtl:right-auto"
22
+ [attr.data-state]="this._brnSelectOption.checkedState()"
23
+ >
24
+ @if (this._brnSelectOption.selected()) {
25
+ <hlm-icon aria-hidden="true" name="lucideCheck" />
26
+ }
27
+ </span>
28
+ `,
29
+ imports: [HlmIconComponent],
30
+ })
31
+ export class HlmSelectOptionComponent {
32
+ protected readonly _brnSelectOption = inject(BrnSelectOptionDirective, { host: true });
33
+
34
+ private readonly classNames = signal<ClassValue>('');
35
+ // eslint-disable-next-line @angular-eslint/no-input-rename
36
+ @Input({ alias: 'class' })
37
+ set _class(classNames: ClassValue) {
38
+ this.classNames.set(classNames);
39
+ }
40
+ protected readonly _computedClass = computed(() =>
41
+ hlm(
42
+ 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 rtl:flex-reverse rtl:pl-8 rtl:pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
43
+ this.classNames(),
44
+ ),
45
+ );
46
+
47
+ @Input()
48
+ set value(value: unknown | null) {
49
+ this._brnSelectOption.value = value;
50
+ }
51
+
52
+ @Input()
53
+ public disabled = false;
54
+ }
@@ -0,0 +1,17 @@
1
+ import { Component } from '@angular/core';
2
+ import { lucideChevronDown } from '@ng-icons/lucide';
3
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
4
+
5
+ @Component({
6
+ selector: 'hlm-select-scroll-down',
7
+ standalone: true,
8
+ imports: [HlmIconComponent],
9
+ providers: [provideIcons({ lucideChevronDown })],
10
+ host: {
11
+ class: 'flex cursor-default items-center justify-center py-1',
12
+ },
13
+ template: `
14
+ <hlm-icon class="ml-2 h-4 w-4" name="lucideChevronDown" />
15
+ `,
16
+ })
17
+ export class HlmSelectScrollDownComponent {}
@@ -0,0 +1,17 @@
1
+ import { Component } from '@angular/core';
2
+ import { lucideChevronUp } from '@ng-icons/lucide';
3
+ import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
4
+
5
+ @Component({
6
+ selector: 'hlm-select-scroll-up',
7
+ standalone: true,
8
+ imports: [HlmIconComponent],
9
+ providers: [provideIcons({ lucideChevronUp })],
10
+ host: {
11
+ class: 'flex cursor-default items-center justify-center py-1',
12
+ },
13
+ template: `
14
+ <hlm-icon class="ml-2 h-4 w-4" name="lucideChevronUp" />
15
+ `,
16
+ })
17
+ export class HlmSelectScrollUpComponent {}
@@ -0,0 +1,44 @@
1
+ import { Component, computed, ContentChild, ElementRef, Input, signal, ViewChild } from '@angular/core';
2
+ import { provideIcons } from '@ng-icons/core';
3
+ import { lucideChevronsUpDown } from '@ng-icons/lucide';
4
+ import { hlm } from '@spartan-ng/ui-core';
5
+ import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
6
+ import { BrnSelectTriggerDirective } from '@spartan-ng/ui-select-brain';
7
+ import { ClassValue } from 'clsx';
8
+
9
+ @Component({
10
+ selector: 'hlm-select-trigger',
11
+ standalone: true,
12
+ imports: [BrnSelectTriggerDirective, HlmIconComponent],
13
+ providers: [provideIcons({ lucideChevronsUpDown })],
14
+ template: `
15
+ <button [class]="_computedClass()" #button brnSelectTrigger type="button">
16
+ <ng-content />
17
+ @if (icon) {
18
+ <ng-content select="hlm-icon" />
19
+ } @else {
20
+ <hlm-icon class="ml-2 h-4 w-4 flex-none" name="lucideChevronsUpDown" />
21
+ }
22
+ </button>
23
+ `,
24
+ })
25
+ export class HlmSelectTriggerComponent {
26
+ @ViewChild('button', { static: true })
27
+ public buttonEl!: ElementRef;
28
+
29
+ @ContentChild(HlmIconComponent, { static: false })
30
+ protected icon!: HlmIconComponent;
31
+
32
+ private readonly classNames = signal<ClassValue>('');
33
+ // eslint-disable-next-line @angular-eslint/no-input-rename
34
+ @Input({ alias: 'class' })
35
+ set _class(classNames: ClassValue) {
36
+ this.classNames.set(classNames);
37
+ }
38
+ protected readonly _computedClass = computed(() =>
39
+ hlm(
40
+ 'flex h-10 items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 w-[180px]',
41
+ this.classNames(),
42
+ ),
43
+ );
44
+ }
@@ -0,0 +1,26 @@
1
+ import { computed, Directive, Input, signal } from '@angular/core';
2
+ import { hlm } from '@spartan-ng/ui-core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ @Directive({
6
+ // eslint-disable-next-line @angular-eslint/component-selector
7
+ selector: 'hlm-select-value,[hlmSelectValue], brn-select-value[hlm]',
8
+ standalone: true,
9
+ host: {
10
+ '[class]': '_computedClass()',
11
+ },
12
+ })
13
+ export class HlmSelectValueDirective {
14
+ private readonly classNames = signal<ClassValue>('');
15
+ // eslint-disable-next-line @angular-eslint/no-input-rename
16
+ @Input({ alias: 'class' })
17
+ set _class(classNames: ClassValue) {
18
+ this.classNames.set(classNames);
19
+ }
20
+ protected readonly _computedClass = computed(() =>
21
+ hlm(
22
+ '!inline-block ltr:text-left rtl:text-right border-border w-[calc(100%)]] min-w-0 pointer-events-none truncate',
23
+ this.classNames(),
24
+ ),
25
+ );
26
+ }