@spartan-ng/cli 0.0.1-alpha.335 → 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.
- package/package.json +1 -1
- package/src/generators/base/versions.d.ts +20 -20
- package/src/generators/base/versions.js +20 -20
- package/src/generators/ui/generator.js +2 -2
- package/src/generators/ui/generator.js.map +1 -1
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-icon.directive.ts.template +6 -11
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-item.directive.ts.template +9 -9
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-trigger.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion.directive.ts.template +4 -9
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-cancel-button.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-content.component.ts.template +3 -8
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-description.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-footer.component.ts.template +3 -7
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-header.component.ts.template +3 -7
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-overlay.directive.ts.template +3 -7
- package/src/generators/ui/libs/ui-alert-dialog-helm/files/lib/hlm-alert-dialog-title.directive.ts.template +3 -7
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-description.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert-title.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-alert-helm/files/lib/hlm-alert.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-aspect-ratio-helm/files/lib/helm-aspect-ratio.directive.ts.template +3 -8
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.spec.ts.template +10 -6
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/hlm-avatar.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-avatar-helm/files/lib/image/hlm-avatar-image.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-badge-helm/files/lib/hlm-badge.directive.ts.template +5 -14
- package/src/generators/ui/libs/ui-button-helm/files/lib/hlm-button.directive.ts.template +11 -11
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-content.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-description.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-footer.directive.ts.template +6 -16
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-header.directive.ts.template +6 -15
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card-title.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-card-helm/files/lib/hlm-card.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-carousel-helm/files/index.ts.template +26 -0
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-content.component.ts.template +25 -0
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-item.component.ts.template +26 -0
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-next.component.ts.template +62 -0
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel-previous.component.ts.template +62 -0
- package/src/generators/ui/libs/ui-carousel-helm/files/lib/hlm-carousel.component.ts.template +93 -0
- package/src/generators/ui/libs/ui-carousel-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-carousel-helm/generator.js +12 -0
- package/src/generators/ui/libs/ui-carousel-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox-checkicon.component.ts.template +14 -15
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.component.ts.template +29 -17
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog-close-button.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-dialog.directive.ts.template +8 -14
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-empty.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-group.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input-wrapper.component.ts.template +5 -14
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-input.directive.ts.template +7 -12
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item-icon.directive.ts.template +3 -10
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-item.directive.ts.template +7 -12
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-list.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command-shortcut.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-command-helm/files/lib/hlm-command.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-close.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-content.component.ts.template +6 -11
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-description.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-footer.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-header.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-overlay.directive.ts.template +3 -7
- package/src/generators/ui/libs/ui-dialog-helm/files/lib/hlm-dialog-title.directive.ts.template +5 -11
- package/src/generators/ui/libs/ui-hover-card-helm/files/lib/hlm-hover-card-content.component.ts.template +2 -7
- package/src/generators/ui/libs/ui-icon-helm/files/lib/hlm-icon.component.spec.ts.template +3 -3
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input-error.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-input-helm/files/lib/hlm-input.directive.ts.template +5 -10
- package/src/generators/ui/libs/ui-label-helm/files/lib/hlm-label.directive.ts.template +4 -10
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar-item.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-bar.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-check.component.ts.template +12 -14
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-checkbox.directive.ts.template +8 -21
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-icon.directive.ts.template +3 -10
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.component.ts.template +12 -14
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-radio.directive.ts.template +8 -21
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item-sub-indicator.component.ts.template +6 -14
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-item.directive.ts.template +5 -15
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-label.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-separator.component.ts.template +3 -11
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu-shortcut.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-menu.component.ts.template +4 -12
- package/src/generators/ui/libs/ui-menu-helm/files/lib/hlm-sub-menu.component.ts.template +7 -13
- package/src/generators/ui/libs/ui-pagination-helm/files/index.ts.template +33 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-content.directive.ts.template +21 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-ellipsis.componet.ts.template +23 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-item.directive.ts.template +22 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-link.directive.ts.template +56 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-next.componet.ts.template +31 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination-previous.componet.ts.template +31 -0
- package/src/generators/ui/libs/ui-pagination-helm/files/lib/hlm-pagination.directive.ts.template +25 -0
- package/src/generators/ui/libs/ui-pagination-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-pagination-helm/generator.js +12 -0
- package/src/generators/ui/libs/ui-pagination-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-close.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-popover-helm/files/lib/hlm-popover-content.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress-indicator.directive.ts.template +5 -11
- package/src/generators/ui/libs/ui-progress-helm/files/lib/hlm-progress.directive.ts.template +5 -11
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-group.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio-indicator.component.ts.template +3 -11
- package/src/generators/ui/libs/ui-radio-group-helm/files/lib/hlm-radio.directive.ts.template +5 -11
- package/src/generators/ui/libs/ui-select-helm/files/index.ts.template +38 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-content.directive.ts.template +34 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-group.directive.ts.template +22 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-label.directive.ts.template +38 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-option.component.ts.template +54 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-down.component.ts.template +17 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-scroll-up.component.ts.template +17 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-trigger.component.ts.template +44 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select-value.directive.ts.template +26 -0
- package/src/generators/ui/libs/ui-select-helm/files/lib/hlm-select.directive.ts.template +21 -0
- package/src/generators/ui/libs/ui-select-helm/generator.d.ts +3 -0
- package/src/generators/ui/libs/ui-select-helm/generator.js +12 -0
- package/src/generators/ui/libs/ui-select-helm/generator.js.map +1 -0
- package/src/generators/ui/libs/ui-separator-helm/files/lib/hlm-separator.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-close.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-content.component.ts.template +6 -14
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-description.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-footer.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-header.component.ts.template +3 -11
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-overlay.directive.ts.template +11 -17
- package/src/generators/ui/libs/ui-sheet-helm/files/lib/hlm-sheet-title.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-skeleton-helm/files/lib/hlm-skeleton.component.ts.template +3 -11
- package/src/generators/ui/libs/ui-spinner-helm/files/lib/hlm-spinner.component.ts.template +5 -11
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch-thumb.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.component.ts.template +19 -14
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-caption.component.ts.template +10 -28
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-table.component.ts.template +11 -27
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-td.component.ts.template +8 -12
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-th.component.ts.template +22 -23
- package/src/generators/ui/libs/ui-table-helm/files/lib/hlm-trow.component.ts.template +7 -24
- package/src/generators/ui/libs/ui-tabs-helm/files/index.ts.template +8 -1
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template +9 -21
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-list.component.ts.template +5 -17
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template +9 -21
- package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs.component.ts.template +17 -0
- package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template +7 -13
- package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle.directive.ts.template +5 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-code.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h1.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h2.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h3.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-h4.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-large.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-lead.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-muted.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-p.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-small.directive.ts.template +3 -11
- package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-ul.directive.ts.template +3 -11
- package/src/generators/ui/supported-ui-libraries.json +115 -82
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import {
|
|
3
|
+
booleanAttribute,
|
|
3
4
|
ChangeDetectionStrategy,
|
|
4
5
|
Component,
|
|
5
|
-
Input,
|
|
6
|
-
ViewEncapsulation,
|
|
7
|
-
booleanAttribute,
|
|
8
6
|
computed,
|
|
9
|
-
|
|
7
|
+
inject,
|
|
8
|
+
input,
|
|
9
|
+
ViewEncapsulation,
|
|
10
10
|
} from '@angular/core';
|
|
11
11
|
import { hlm } from '@spartan-ng/ui-core';
|
|
12
|
+
import { BrnColumnDefComponent } from '@spartan-ng/ui-table-brain';
|
|
12
13
|
import { ClassValue } from 'clsx';
|
|
13
14
|
|
|
14
15
|
@Component({
|
|
15
16
|
selector: 'hlm-th',
|
|
16
17
|
standalone: true,
|
|
17
|
-
imports: [NgTemplateOutlet
|
|
18
|
+
imports: [NgTemplateOutlet],
|
|
18
19
|
host: {
|
|
19
20
|
'[class]': '_computedClass()',
|
|
20
21
|
},
|
|
@@ -22,29 +23,27 @@ import { ClassValue } from 'clsx';
|
|
|
22
23
|
<ng-template #content>
|
|
23
24
|
<ng-content />
|
|
24
25
|
</ng-template>
|
|
25
|
-
|
|
26
|
+
@if (truncate()) {
|
|
27
|
+
<span class="flex-1 truncate">
|
|
28
|
+
<ng-container [ngTemplateOutlet]="content" />
|
|
29
|
+
</span>
|
|
30
|
+
} @else {
|
|
26
31
|
<ng-container [ngTemplateOutlet]="content" />
|
|
27
|
-
|
|
28
|
-
<ng-container *ngIf="!truncate" [ngTemplateOutlet]="content" />
|
|
32
|
+
}
|
|
29
33
|
`,
|
|
30
34
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
35
|
encapsulation: ViewEncapsulation.None,
|
|
32
36
|
})
|
|
33
37
|
export class HlmThComponent {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
private readonly _userCls = signal<ClassValue>('');
|
|
38
|
-
@Input()
|
|
39
|
-
set class(inputs: ClassValue) {
|
|
40
|
-
this._userCls.set(inputs);
|
|
41
|
-
}
|
|
38
|
+
private readonly _columnDef? = inject(BrnColumnDefComponent, { optional: true });
|
|
39
|
+
protected readonly truncate = input(false, { transform: booleanAttribute });
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
42
|
+
protected readonly _computedClass = computed(() =>
|
|
43
|
+
hlm(
|
|
46
44
|
'flex flex-none h-12 px-4 text-sm items-center font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
this._columnDef?.class(),
|
|
46
|
+
this._userClass(),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
50
49
|
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanAttribute,
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
computed,
|
|
6
|
-
Input,
|
|
7
|
-
signal,
|
|
8
|
-
ViewEncapsulation,
|
|
9
|
-
} from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';
|
|
10
2
|
import { hlm } from '@spartan-ng/ui-core';
|
|
11
3
|
import { ClassValue } from 'clsx';
|
|
12
4
|
|
|
@@ -24,20 +16,11 @@ import { ClassValue } from 'clsx';
|
|
|
24
16
|
encapsulation: ViewEncapsulation.None,
|
|
25
17
|
})
|
|
26
18
|
export class HlmTrowComponent {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
private readonly _userCls = signal<ClassValue>('');
|
|
31
|
-
@Input()
|
|
32
|
-
set class(inputs: ClassValue) {
|
|
33
|
-
this._userCls.set(inputs);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
37
|
-
private _generateClass() {
|
|
38
|
-
return hlm(
|
|
19
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
20
|
+
protected _computedClass = computed(() =>
|
|
21
|
+
hlm(
|
|
39
22
|
'flex flex border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
|
|
40
|
-
this.
|
|
41
|
-
)
|
|
42
|
-
|
|
23
|
+
this._userClass(),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
43
26
|
}
|
|
@@ -3,12 +3,19 @@ import { NgModule } from '@angular/core';
|
|
|
3
3
|
import { HlmTabsContentDirective } from './lib/hlm-tabs-content.directive';
|
|
4
4
|
import { HlmTabsListComponent } from './lib/hlm-tabs-list.component';
|
|
5
5
|
import { HlmTabsTriggerDirective } from './lib/hlm-tabs-trigger.directive';
|
|
6
|
+
import { HlmTabsComponent } from './lib/hlm-tabs.component';
|
|
6
7
|
|
|
7
8
|
export * from './lib/hlm-tabs-content.directive';
|
|
8
9
|
export * from './lib/hlm-tabs-list.component';
|
|
9
10
|
export * from './lib/hlm-tabs-trigger.directive';
|
|
11
|
+
export * from './lib/hlm-tabs.component';
|
|
10
12
|
|
|
11
|
-
export const HlmTabsImports = [
|
|
13
|
+
export const HlmTabsImports = [
|
|
14
|
+
HlmTabsComponent,
|
|
15
|
+
HlmTabsListComponent,
|
|
16
|
+
HlmTabsTriggerDirective,
|
|
17
|
+
HlmTabsContentDirective,
|
|
18
|
+
] as const;
|
|
12
19
|
|
|
13
20
|
@NgModule({
|
|
14
21
|
imports: [...HlmTabsImports],
|
package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-content.directive.ts.template
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '@spartan-ng/ui-core';
|
|
3
3
|
import { BrnTabsContentDirective } from '@spartan-ng/ui-tabs-brain';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
@@ -6,31 +6,19 @@ import { ClassValue } from 'clsx';
|
|
|
6
6
|
@Directive({
|
|
7
7
|
selector: '[hlmTabsContent]',
|
|
8
8
|
standalone: true,
|
|
9
|
-
hostDirectives: [BrnTabsContentDirective],
|
|
9
|
+
hostDirectives: [{ directive: BrnTabsContentDirective, inputs: ['brnTabsContent: hlmTabsContent'] }],
|
|
10
10
|
host: {
|
|
11
11
|
'[class]': '_computedClass()',
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmTabsContentDirective {
|
|
15
|
-
|
|
16
|
-
private readonly _userCls = signal<ClassValue>('');
|
|
17
|
-
@Input()
|
|
18
|
-
set class(userCls: ClassValue) {
|
|
19
|
-
this._userCls.set(userCls);
|
|
20
|
-
}
|
|
15
|
+
public readonly contentFor = input.required<string>({ alias: 'hlmTabsContent' });
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this._brn.contentFor = key;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
30
|
-
private _generateClass() {
|
|
31
|
-
return hlm(
|
|
17
|
+
public readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
|
+
protected _computedClass = computed(() =>
|
|
19
|
+
hlm(
|
|
32
20
|
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
33
|
-
this.
|
|
34
|
-
)
|
|
35
|
-
|
|
21
|
+
this._userClass(),
|
|
22
|
+
),
|
|
23
|
+
);
|
|
36
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component, computed,
|
|
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 {
|
|
4
|
+
import { VariantProps, cva } from 'class-variance-authority';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
export const listVariants = cva(
|
|
@@ -30,20 +30,8 @@ type ListVariants = VariantProps<typeof listVariants>;
|
|
|
30
30
|
},
|
|
31
31
|
})
|
|
32
32
|
export class HlmTabsListComponent {
|
|
33
|
-
|
|
34
|
-
@Input()
|
|
35
|
-
set class(userCls: ClassValue) {
|
|
36
|
-
this._userCls.set(userCls);
|
|
37
|
-
}
|
|
33
|
+
public readonly orientation = input<ListVariants['orientation']>('horizontal');
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
set orientation(value: ListVariants['orientation']) {
|
|
42
|
-
this._orientation.set(value);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
46
|
-
private _generateClass() {
|
|
47
|
-
return hlm(listVariants({ orientation: this._orientation() }), this._userCls());
|
|
48
|
-
}
|
|
35
|
+
public readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
36
|
+
protected _computedClass = computed(() => hlm(listVariants({ orientation: this.orientation() }), this._userClass()));
|
|
49
37
|
}
|
package/src/generators/ui/libs/ui-tabs-helm/files/lib/hlm-tabs-trigger.directive.ts.template
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
1
|
+
import { Directive, computed, input } from '@angular/core';
|
|
2
2
|
import { hlm } from '@spartan-ng/ui-core';
|
|
3
3
|
import { BrnTabsTriggerDirective } from '@spartan-ng/ui-tabs-brain';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
@@ -6,31 +6,19 @@ import { ClassValue } from 'clsx';
|
|
|
6
6
|
@Directive({
|
|
7
7
|
selector: '[hlmTabsTrigger]',
|
|
8
8
|
standalone: true,
|
|
9
|
+
hostDirectives: [{ directive: BrnTabsTriggerDirective, inputs: ['brnTabsTrigger: hlmTabsTrigger', 'disabled'] }],
|
|
9
10
|
host: {
|
|
10
11
|
'[class]': '_computedClass()',
|
|
11
12
|
},
|
|
12
|
-
hostDirectives: [BrnTabsTriggerDirective],
|
|
13
13
|
})
|
|
14
14
|
export class HlmTabsTriggerDirective {
|
|
15
|
-
|
|
16
|
-
private readonly _userCls = signal<ClassValue>('');
|
|
17
|
-
@Input()
|
|
18
|
-
set class(userCls: ClassValue) {
|
|
19
|
-
this._userCls.set(userCls);
|
|
20
|
-
}
|
|
15
|
+
public readonly triggerFor = input.required<string>({ alias: 'hlmTabsTrigger' });
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this._brn.triggerFor = key;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
30
|
-
private _generateClass() {
|
|
31
|
-
return hlm(
|
|
17
|
+
public readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
18
|
+
protected _computedClass = computed(() =>
|
|
19
|
+
hlm(
|
|
32
20
|
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
33
|
-
this.
|
|
34
|
-
)
|
|
35
|
-
|
|
21
|
+
this._userClass(),
|
|
22
|
+
),
|
|
23
|
+
);
|
|
36
24
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component, input } from '@angular/core';
|
|
2
|
+
import { BrnTabsDirective } from '@spartan-ng/ui-tabs-brain';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'hlm-tabs',
|
|
6
|
+
standalone: true,
|
|
7
|
+
hostDirectives: [
|
|
8
|
+
{
|
|
9
|
+
directive: BrnTabsDirective,
|
|
10
|
+
inputs: ['orientation', 'direction', 'activationMode', 'brnTabs: tab'],
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
template: '<ng-content/>',
|
|
14
|
+
})
|
|
15
|
+
export class HlmTabsComponent {
|
|
16
|
+
public readonly tab = input.required<string>();
|
|
17
|
+
}
|
package/src/generators/ui/libs/ui-toggle-helm/files/lib/hlm-toggle-group.directive.ts.template
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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 HlmToggleGroupDirective {
|
|
13
|
-
private readonly
|
|
14
|
-
|
|
15
|
-
|
|
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
|
'inline-flex items-center rounded-md [&>[hlm][brnToggle][variant="outline"]]:-mx-[0.5px] [&>[hlm][brnToggle]]:rounded-none focus:[&>[hlm][brnToggle]]:z-10 first-of-type:[&>[hlm][brnToggle]]:rounded-l-md last-of-type:[&>[hlm][brnToggle]]:rounded-r-md',
|
|
23
|
-
this.
|
|
24
|
-
)
|
|
25
|
-
|
|
17
|
+
this._userClass(),
|
|
18
|
+
),
|
|
19
|
+
);
|
|
26
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, Directive, Input, signal } from '@angular/core';
|
|
1
|
+
import { computed, Directive, Input, input, signal } from '@angular/core';
|
|
2
2
|
import { hlm } from '@spartan-ng/ui-core';
|
|
3
3
|
import { cva, VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
@@ -45,14 +45,8 @@ export class HlmToggleDirective {
|
|
|
45
45
|
this._size.set(value);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
private readonly
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
55
|
-
private _generateClass() {
|
|
56
|
-
return hlm(toggleVariants({ variant: this._variant(), size: this._size() }), this._userCls());
|
|
57
|
-
}
|
|
48
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
49
|
+
protected _computedClass = computed(() =>
|
|
50
|
+
hlm(toggleVariants({ variant: this._variant(), size: this._size() }), this._userClass()),
|
|
51
|
+
);
|
|
58
52
|
}
|
package/src/generators/ui/libs/ui-typography-helm/files/lib/hlm-blockquote.directive.ts.template
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmBlockquote = 'mt-6 border-border border-l-2 pl-6 italic';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmBlockquoteDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmBlockquote, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmBlockquote, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmCode = 'relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-m
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmCodeDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmCode, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmCode, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmH1 = 'scroll-m-20 text-4xl font-extrabold tracking-tight lg:text
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmH1Directive {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmH1, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmH1, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -13,14 +13,6 @@ export const hlmH2 =
|
|
|
13
13
|
},
|
|
14
14
|
})
|
|
15
15
|
export class HlmH2Directive {
|
|
16
|
-
private readonly
|
|
17
|
-
|
|
18
|
-
set class(userCls: ClassValue) {
|
|
19
|
-
this._userCls.set(userCls);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
23
|
-
private _generateClass() {
|
|
24
|
-
return hlm(hlmH2, this._userCls());
|
|
25
|
-
}
|
|
16
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
17
|
+
protected _computedClass = computed(() => hlm(hlmH2, this._userClass()));
|
|
26
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmH3 = 'scroll-m-20 text-2xl font-semibold tracking-tight';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmH3Directive {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmH3, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmH3, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmH4 = 'scroll-m-20 text-xl font-semibold tracking-tight';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmH4Directive {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmH4, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmH4, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmLarge = 'text-lg font-semibold';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmLargeDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmLarge, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmLarge, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmLead = 'text-xl text-muted-foreground';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmLeadDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmLead, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmLead, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmMuted = 'text-sm text-muted-foreground';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmMutedDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmMuted, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmMuted, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmP = 'leading-7 [&:not(:first-child)]:mt-6';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmPDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmP, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmP, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmSmall = 'text-sm font-medium leading-none';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmSmallDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmSmall, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmSmall, this._userClass()));
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
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
|
|
|
@@ -12,14 +12,6 @@ export const hlmUl = 'my-6 ml-6 list-disc [&>li]:mt-2';
|
|
|
12
12
|
},
|
|
13
13
|
})
|
|
14
14
|
export class HlmUlDirective {
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
set class(userCls: ClassValue) {
|
|
18
|
-
this._userCls.set(userCls);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
protected _computedClass = computed(() => this._generateClass());
|
|
22
|
-
private _generateClass() {
|
|
23
|
-
return hlm(hlmUl, this._userCls());
|
|
24
|
-
}
|
|
15
|
+
private readonly _userClass = input<ClassValue>('', { alias: 'class' });
|
|
16
|
+
protected _computedClass = computed(() => hlm(hlmUl, this._userClass()));
|
|
25
17
|
}
|