+
+
+
+
{{ field.label }}
+
+ {{ getModuleVersionProperty(field.key) || 'Not specified' }}
+
+
-
-
- @for (field of moduleFields; track field.key) {
-
-
-
-
-
{{ field.label }}
-
- {{ getModuleVersionProperty(field.key) }}
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+ @if (fieldStates[field.key].accepted === false) {
+
+ Feedback for {{ field.label }}
+
+
+ }
-
-
-
- @if (fieldStates[field.key].accepted === false) {
-
-
-
}
- }
-
-
-
-
- Reject
-
-
- Confirm Rejection?
-
- Rejection is final.
- The user cannot make any modifications to this proposal again. Are you sure you want to reject this proposal?
-
-
-
-
-
-
- Cancel
- Confirm Rejection
-
-
-
+
+
-
Submit Feedback
+
+
+
+ Rejection is final.
+ The user cannot make any modifications to this proposal again. Are you sure you want to reject this proposal?
+
+
+ Rejection reason
+
+
+
+
+
+
+
-
+}
diff --git a/Client/src/app/pages/feedback-view/feedback-view.component.ts b/Client/src/app/pages/feedback-view/feedback-view.component.ts
index 83040b8f..7785a4b8 100644
--- a/Client/src/app/pages/feedback-view/feedback-view.component.ts
+++ b/Client/src/app/pages/feedback-view/feedback-view.component.ts
@@ -1,60 +1,36 @@
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
-import { BrnSelectModule } from '@spartan-ng/ui-select-brain';
-import { BrnSeparatorModule } from '@spartan-ng/ui-separator-brain';
-import { CommonModule } from '@angular/common';
+
import { Component, inject } from '@angular/core';
import { FeedbackControllerService, ModuleVersionUpdateRequestDTO, FeedbackDTO, GiveFeedbackDTO, ModuleVersionControllerService } from '../../core/modules/openapi';
import { FormBuilder, FormGroup, FormsModule } from '@angular/forms';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
-import { HlmSelectModule } from '@spartan-ng/ui-select-helm';
-import { toast } from 'ngx-sonner';
-import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/ui-alertdialog-brain';
-import { HlmAlertDialogComponent, HlmAlertDialogContentComponent, HlmAlertDialogDescriptionDirective, HlmAlertDialogFooterComponent, HlmAlertDialogHeaderComponent, HlmAlertDialogTitleDirective } from '@spartan-ng/ui-alertdialog-helm';
import { HttpErrorResponse } from '@angular/common/http';
-import { lucideCheck, lucideX } from '@ng-icons/lucide';
-import { provideIcons } from '@ng-icons/core';
-import { HlmIconComponent } from "../../../spartan-components/ui-icon-helm/src/lib/hlm-icon.component";
-import { BrnDialogCloseDirective } from '@spartan-ng/ui-dialog-brain';
-import { HlmToasterComponent } from '@spartan-ng/ui-sonner-helm';
+import { MessageService } from 'primeng/api';
+import { ButtonModule } from 'primeng/button';
+import { TextareaModule } from 'primeng/textarea';
+import { DialogModule } from 'primeng/dialog';
+import { ToastModule } from 'primeng/toast';
+import { ProgressSpinnerModule } from 'primeng/progressspinner';
+import { TooltipModule } from 'primeng/tooltip';
+import { MessageModule } from 'primeng/message';
@Component({
selector: 'app-feedback-view',
standalone: true,
- imports: [
- CommonModule,
- FormsModule,
- RouterModule,
- BrnSelectModule,
- BrnSeparatorModule,
- HlmButtonDirective,
- HlmInputDirective,
- HlmSelectModule,
- BrnAlertDialogTriggerDirective,
- BrnAlertDialogContentDirective,
- BrnDialogCloseDirective,
- HlmAlertDialogComponent,
- HlmAlertDialogHeaderComponent,
- HlmAlertDialogFooterComponent,
- HlmAlertDialogTitleDirective,
- HlmAlertDialogDescriptionDirective,
- HlmAlertDialogContentComponent,
- HlmIconComponent,
- HlmToasterComponent
-],
- providers: [provideIcons({ lucideCheck, lucideX })],
+ imports: [FormsModule, RouterModule, ButtonModule, TextareaModule, DialogModule, ToastModule, ProgressSpinnerModule, TooltipModule, MessageModule],
templateUrl: './feedback-view.component.html'
})
export class FeedbackViewComponent {
router = inject(Router);
feedbackService = inject(FeedbackControllerService);
- moduleVersionService = inject(ModuleVersionControllerService)
+ messageService = inject(MessageService);
+ moduleVersionService = inject(ModuleVersionControllerService);
feedbackForm: FormGroup;
feedbackId: number | null = null;
moduleVersion: ModuleVersionUpdateRequestDTO | null = null;
loading: boolean = true;
error: string | null = null;
rejectionReason: string = '';
+ showRejectDialog: boolean = false;
// utility
@@ -90,7 +66,7 @@ export class FeedbackViewComponent {
] as const;
constructor(formBulider: FormBuilder, route: ActivatedRoute) {
- this.moduleFields.forEach(field => {
+ this.moduleFields.forEach((field) => {
this.fieldStates[field.key] = { accepted: null };
this.fieldFeedback[field.key] = '';
});
@@ -132,7 +108,7 @@ export class FeedbackViewComponent {
responsiblesAccepted: [null],
responsiblesFeedback: [''],
lvSwsLecturerAccepted: [null],
- lvSwsLecturerFeedback: [''],
+ lvSwsLecturerFeedback: ['']
});
this.feedbackId = Number(route.snapshot.paramMap.get('id'));
this.fetchModuleVersion(this.feedbackId);
@@ -154,7 +130,7 @@ export class FeedbackViewComponent {
// field methods
handleApprove(key: string) {
- const formField = key.replace('Eng', '');
+ const formField = key.replace('Eng', '');
this.fieldStates[key] = { accepted: true };
this.fieldFeedback[key] = '';
const acceptedField = `${formField}Accepted`;
@@ -164,14 +140,14 @@ export class FeedbackViewComponent {
}
handleReject(key: string) {
- const formField = key.replace('Eng', '');
+ const formField = key.replace('Eng', '');
this.fieldStates[key] = { accepted: false };
const acceptedField = `${formField}Accepted`;
this.feedbackForm.get(acceptedField)?.setValue(false);
}
updateFeedback(key: string, value: string) {
- const formField = key.replace('Eng', '');
+ const formField = key.replace('Eng', '');
this.fieldFeedback[key] = value;
this.feedbackForm.patchValue({
[`${formField}Feedback`]: value
@@ -181,45 +157,38 @@ export class FeedbackViewComponent {
// form methods
isEveryFieldFilled(): boolean {
- const formValues = this.feedbackForm.value;
- return Object.keys(formValues)
- .filter(key => key.endsWith('Accepted'))
- .every(acceptedKey => {
- const isAccepted = formValues[acceptedKey];
- if (isAccepted === true) {
- return true;
- }
- if (isAccepted === false) {
- const feedbackKey = acceptedKey.replace('Accepted', 'Feedback');
- const feedback = formValues[feedbackKey];
- return feedback && feedback.trim().length > 0;
- }
- return false;
- });
- }
-
- cancel() {
- this.router.navigate(['']);
+ const formValues = this.feedbackForm.value;
+ return Object.keys(formValues)
+ .filter((key) => key.endsWith('Accepted'))
+ .every((acceptedKey) => {
+ const isAccepted = formValues[acceptedKey];
+ if (isAccepted === true) {
+ return true;
+ }
+ if (isAccepted === false) {
+ const feedbackKey = acceptedKey.replace('Accepted', 'Feedback');
+ const feedback = formValues[feedbackKey];
+ return feedback && feedback.trim().length > 0;
+ }
+ return false;
+ });
}
- checkOverlaps() {
-
- }
+ checkOverlaps() {}
pdfExport() {
const mvid = this.moduleVersion?.moduleVersionId;
if (!mvid) {
- toast('Exporting PDF', {
- description: 'Failed to create PDF...',
- duration: 3000
- })
+ this.messageService.add({ severity: 'error', summary: 'Exporting PDF', detail: 'Failed to create PDF...' });
return;
}
-
+
+ this.messageService.add({ severity: 'info', summary: 'Exporting PDF', detail: 'Creating a PDF file for you to download...' });
+
this.feedbackService.exportModuleVersionPdf(mvid).subscribe({
next: (response: Blob) => {
{
- const fileName = `f${this.feedbackId}_mv${mvid}_${this.moduleVersion?.titleEng}`
+ const fileName = `f${this.feedbackId}_mv${mvid}_${this.moduleVersion?.titleEng}`;
const blob = new Blob([response], { type: 'application/pdf' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
@@ -228,21 +197,13 @@ export class FeedbackViewComponent {
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(link.href);
+ this.messageService.add({ severity: 'success', summary: 'PDF Exported', detail: 'PDF file downloaded successfully' });
}
},
- error: () => {
- toast('Exporting PDF', {
- description: 'Failed to create PDF...',
- duration: 3000
- });
- }
- })
-
- toast('Exporting PDF', {
- description: 'Creating a PDF file for you to download...',
- duration: 3000
- })
-
+ error: () => {
+ this.messageService.add({ severity: 'error', summary: 'Exporting PDF', detail: 'Failed to create PDF...' });
+ }
+ });
}
reject() {
@@ -250,13 +211,12 @@ export class FeedbackViewComponent {
const giveFeedbackDTO: GiveFeedbackDTO = { comment: this.rejectionReason };
this.feedbackService.rejectFeedback(this.feedbackId, giveFeedbackDTO).subscribe({
next: () => {
- this.router.navigate([''], { queryParams: { rejected: true } });
+ this.messageService.add({ severity: 'success', summary: 'Module Proposal Rejected', detail: 'You successfully rejected this Module Proposal' });
+ this.showRejectDialog = false;
+ this.router.navigate(['']);
},
error: (err: HttpErrorResponse) => {
- toast('Rejection failed.', {
- description: err.error || 'Unable to reject module',
- duration: 3000
- });
+ this.messageService.add({ severity: 'error', summary: 'Rejection failed', detail: err.error || 'Unable to reject module' });
this.error = err.error;
}
});
@@ -266,17 +226,15 @@ export class FeedbackViewComponent {
giveFeedback() {
if (this.feedbackId) {
const feedbackDTO: FeedbackDTO = {
- ...this.feedbackForm.value,
- }
+ ...this.feedbackForm.value
+ };
this.feedbackService.giveFeedback(this.feedbackId, feedbackDTO).subscribe({
next: () => {
- this.router.navigate([''], { queryParams: { feedback_given: true } });
+ this.messageService.add({ severity: 'success', summary: 'Feedback Submitted', detail: 'Your feedback has been submitted successfully' });
+ this.router.navigate(['']);
},
error: (err: HttpErrorResponse) => {
- toast('Sending feedback failed.', {
- description: err.error || 'Unable to send feedback',
- duration: 3000
- });
+ this.messageService.add({ severity: 'error', summary: 'Sending feedback failed', detail: err.error || 'Unable to send feedback' });
this.error = err.error;
}
});
diff --git a/Client/src/app/pages/module-version-edit/module-version-edit.component.html b/Client/src/app/pages/module-version-edit/module-version-edit.component.html
deleted file mode 100644
index ad50a7c8..00000000
--- a/Client/src/app/pages/module-version-edit/module-version-edit.component.html
+++ /dev/null
@@ -1,196 +0,0 @@
-
diff --git a/Client/src/app/pages/module-version-edit/module-version-edit.component.ts b/Client/src/app/pages/module-version-edit/module-version-edit.component.ts
index e6d21095..234341c6 100644
--- a/Client/src/app/pages/module-version-edit/module-version-edit.component.ts
+++ b/Client/src/app/pages/module-version-edit/module-version-edit.component.ts
@@ -1,23 +1,17 @@
import { Component } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
-import { ActivatedRoute } from '@angular/router';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { HlmFormFieldModule } from '@spartan-ng/ui-formfield-helm';
-import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
-import { BrnSelectImports } from '@spartan-ng/ui-select-brain';
-import { HlmSelectImports } from '@spartan-ng/ui-select-helm';
-import { RouterModule } from '@angular/router';
+import { ActivatedRoute, RouterModule } from '@angular/router';
import { HttpErrorResponse } from '@angular/common/http';
-import { AutoResizeDirective } from '../../core/shared/autoresize.directive';
-import { HlmAlertDescriptionDirective, HlmAlertDirective, HlmAlertIconDirective, HlmAlertTitleDirective } from '@spartan-ng/ui-alert-helm';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import { provideIcons } from '@ng-icons/core';
-import { lucideInfo } from '@ng-icons/lucide';
import { ProposalBaseComponent } from '../../components/create-edit-base/create-edit-base.component';
import { FeedbackDepartmentPipe } from '../../pipes/feedbackDepartment.pipe';
import { ModuleVersionUpdateRequestDTO, ModuleVersionUpdateResponseDTO, ModuleVersionViewDTO, ModuleVersionViewFeedbackDTO } from '../../core/modules/openapi';
import { ToggleButtonGroupComponent } from '../../components/toggle-button-group/toggle-button-group.component';
+import { ButtonModule } from 'primeng/button';
+import { InputTextModule } from 'primeng/inputtext';
+import { TextareaModule } from 'primeng/textarea';
+import { InputNumberModule } from 'primeng/inputnumber';
+import { MessageModule } from 'primeng/message';
@Component({
selector: 'app-module-version-edit',
@@ -25,22 +19,15 @@ import { ToggleButtonGroupComponent } from '../../components/toggle-button-group
imports: [
ReactiveFormsModule,
CommonModule,
- HlmButtonDirective,
- HlmFormFieldModule,
- HlmInputDirective,
- BrnSelectImports,
- HlmSelectImports,
RouterModule,
- AutoResizeDirective,
- HlmAlertDescriptionDirective,
- HlmAlertDirective,
- HlmAlertIconDirective,
- HlmAlertTitleDirective,
- HlmIconComponent,
FeedbackDepartmentPipe,
- ToggleButtonGroupComponent
+ ToggleButtonGroupComponent,
+ ButtonModule,
+ InputTextModule,
+ TextareaModule,
+ InputNumberModule,
+ MessageModule
],
- providers: [provideIcons({ lucideInfo })],
templateUrl: '../../components/create-edit-base/create-edit-base.component.html'
})
export class ModuleVersionEditComponent extends ProposalBaseComponent {
diff --git a/Client/src/app/pages/module-version-view/module-version-view.component.html b/Client/src/app/pages/module-version-view/module-version-view.component.html
index dafd06db..25ab9d10 100644
--- a/Client/src/app/pages/module-version-view/module-version-view.component.html
+++ b/Client/src/app/pages/module-version-view/module-version-view.component.html
@@ -1,164 +1,159 @@
@if (loading) {
-
Loading...
-} @else if (error) {
-
{{ error }}
-} @else if (moduleVersionDto) {
-
-
Overview of '{{ moduleVersionDto.titleEng }}' - Version {{ moduleVersionDto.version }}
-
-
Export PDF
- @if (isLatestVersion() && moduleVersionDto.status == moduleVersionStatus.PendingSubmission) {
-
Edit Module Version
- }
+
-
-
-
-
Module Version ID
-
{{ moduleVersionDto.moduleVersionId }}
+} @else if (error) {
+
+
-
-
Version
-
{{ moduleVersionDto.version }} / {{ moduleVersionDto.latestVersion }}
+
+} @else if (moduleVersionDto) {
+
+
Overview of '{{ moduleVersionDto.titleEng }}' - Version {{ moduleVersionDto.version }}
+
+
+ @if (isLatestVersion() && moduleVersionDto.status == moduleVersionStatus.PendingSubmission) {
+
+ }
-
-
Status
-
- {{ (moduleVersionDto.status! | moduleVersionStatus).text }}
+
+
+
+
Module Version ID
+
{{ moduleVersionDto.moduleVersionId }}
+
+
+
Version
+
{{ moduleVersionDto.version }} / {{ moduleVersionDto.latestVersion }}
+
+
+
+
Created On
+
{{ moduleVersionDto.creationDate | date: 'yyyy-MM-dd' }}
-
-
Created On
-
{{ moduleVersionDto.creationDate | date : 'yyyy-MM-dd' }}
-
-
-
-
Feedbacks
- @if (moduleVersionDto.feedbacks?.length) {
-
- @for (feedback of moduleVersionDto.feedbacks; track feedback.feedbackId) {
-
-
-
-
- {{ (feedback.feedbackRole! | feedbackDepartment).text }}
-
-
{{ feedback.feedbackFromFirstName }} {{ feedback.feedbackFromLastName }}
-
-
- {{ (feedback.feedbackStatus! | feedbackStatus).text }}
+
+ @if (moduleVersionDto.feedbacks?.length) {
+
+ @for (feedback of moduleVersionDto.feedbacks; track feedback.feedbackId) {
+
+
+
+
{{ feedback.feedbackFromFirstName }} {{ feedback.feedbackFromLastName }}
+
+ {{ feedback.submissionDate | date: 'yyyy-MM-dd' }}
+
-
-
-
- {{ feedback.submissionDate | date : 'yyyy-MM-dd' }}
-
-
- @if (feedback.rejectionComment) {
-
-
Rejection Comment:
-
{{ feedback.rejectionComment }}
-
- }
+ @if (feedback.rejectionComment) {
+
+ Rejection Comment:
+ {{ feedback.rejectionComment }}
+
+ }
-
- @for (field of getFeedbackFields(feedback); track field.key) {
-
-
{{ field.label }}
-
{{ field.value }}
-
+
+ @for (field of getFeedbackFields(feedback); track field.key) {
+
+ {{ field.label }}
+ {{ field.value }}
+
+ }
+
+
}
-
+ } @else {
+
No feedback provided yet
}
-
- } @else {
-
No feedback provided yet
- }
-
+
-
- Module Version Data
-
- @for (field of getFieldsBySection('basic'); track field.key) {
-
-
{{ field.label }}
-
- @if (getModuleVersionProperty(field.key)) {
- {{ getModuleVersionProperty(field.key) }}
- } @else {
- Not specified
- }
-
- @if (getFieldFeedbacks(field.key).length > 0) {
-
- @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
-
-
{{ (feedback.feedbackRole! | feedbackDepartment).text }}
-
{{ getFeedbackContent(feedback, field.key) }}
-
- }
-
+
+ Module Version Data
+
+ @for (field of getFieldsBySection('basic'); track field.key) {
+
+
+ @if (getModuleVersionProperty(field.key)) {
+ {{ getModuleVersionProperty(field.key) }}
+ } @else {
+ Not specified
+ }
+
+ @if (getFieldFeedbacks(field.key).length > 0) {
+
+ @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
+
+ {{ (feedback.feedbackRole! | feedbackDepartment).text }}
+ {{ getFeedbackContent(feedback, field.key) }}
+
+ }
+
+ }
+
}
- }
-
-
+
-
-
- @for (field of getFieldsBySection('hours'); track field.key) {
-
-
{{ field.label }}
-
- @if (getModuleVersionProperty(field.key)) {
- {{ getModuleVersionProperty(field.key) }}
- } @else {
- Not specified
- }
-
- @if (getFieldFeedbacks(field.key).length > 0) {
-
- @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
-
-
{{ (feedback.feedbackRole! | feedbackDepartment).text }}
-
{{ getFeedbackContent(feedback, field.key) }}
-
- }
-
+
+
+ @for (field of getFieldsBySection('hours'); track field.key) {
+
+
+ @if (getModuleVersionProperty(field.key)) {
+ {{ getModuleVersionProperty(field.key) }}
+ } @else {
+ Not specified
+ }
+
+ @if (getFieldFeedbacks(field.key).length > 0) {
+
+ @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
+
+ {{ (feedback.feedbackRole! | feedbackDepartment).text }}
+ {{ getFeedbackContent(feedback, field.key) }}
+
+ }
+
+ }
+
}
- }
-
-
+
- @for (field of getFieldsBySection('content'); track field.key) {
-
- {{ field.label }}
- @if (getModuleVersionProperty(field.key)) {
- {{ getModuleVersionProperty(field.key) }}
- @if (field.hasPrompt && getModuleVersionProperty(field.hasPrompt)) {
-
-
Generation Prompt:
-
{{ getModuleVersionProperty(field.hasPrompt) }}
-
- } @if (getFieldFeedbacks(field.key).length > 0) {
-
- @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
-
-
{{ (feedback.feedbackRole! | feedbackDepartment).text }}
-
{{ getFeedbackContent(feedback, field.key) }}
-
- }
-
- } } @else {
- No content provided
+ @for (field of getFieldsBySection('content'); track field.key) {
+
+ @if (getModuleVersionProperty(field.key)) {
+ {{ getModuleVersionProperty(field.key) }}
+ @if (field.hasPrompt && getModuleVersionProperty(field.hasPrompt)) {
+
+ {{ getModuleVersionProperty(field.hasPrompt) }}
+
+ }
+ @if (getFieldFeedbacks(field.key).length > 0) {
+
+ @for (feedback of getFieldFeedbacks(field.key); track feedback.feedbackId) {
+
+ {{ (feedback.feedbackRole! | feedbackDepartment).text }}
+ {{ getFeedbackContent(feedback, field.key) }}
+
+ }
+
+ }
+ } @else {
+ No content provided
+ }
+
}
-
- }
-
+
} @else {
-No module version found
+ No module version found
}
diff --git a/Client/src/app/pages/module-version-view/module-version-view.component.ts b/Client/src/app/pages/module-version-view/module-version-view.component.ts
index 54404297..96228ce5 100644
--- a/Client/src/app/pages/module-version-view/module-version-view.component.ts
+++ b/Client/src/app/pages/module-version-view/module-version-view.component.ts
@@ -1,13 +1,17 @@
-import { CommonModule } from "@angular/common";
-import { HttpErrorResponse } from "@angular/common/http";
-import { Component, inject } from "@angular/core";
-import { RouterModule, ActivatedRoute } from "@angular/router";
-import { HlmBadgeDirective } from "@spartan-ng/ui-badge-helm";
-import { HlmButtonDirective } from "@spartan-ng/ui-button-helm";
-import { ModuleVersionControllerService, ModuleVersionViewDTO, ModuleVersion, ModuleVersionViewFeedbackDTO } from "../../core/modules/openapi";
-import { FeedbackDepartmentPipe } from "../../pipes/feedbackDepartment.pipe";
-import { FeedbackStatusPipe } from "../../pipes/feedbackStatus.pipe";
-import { ModuleVersionStatusPipe } from "../../pipes/moduleVersionStatus.pipe";
+import { CommonModule } from '@angular/common';
+import { HttpErrorResponse } from '@angular/common/http';
+import { Component, inject } from '@angular/core';
+import { RouterModule, ActivatedRoute } from '@angular/router';
+import { ModuleVersionControllerService, ModuleVersionViewDTO, ModuleVersion, ModuleVersionViewFeedbackDTO } from '../../core/modules/openapi';
+import { FeedbackDepartmentPipe } from '../../pipes/feedbackDepartment.pipe';
+import { FeedbackStatusPipe } from '../../pipes/feedbackStatus.pipe';
+import { ModuleVersionStatusPipe } from '../../pipes/moduleVersionStatus.pipe';
+import { ButtonModule } from 'primeng/button';
+import { TagModule } from 'primeng/tag';
+import { ProgressSpinnerModule } from 'primeng/progressspinner';
+import { MessageModule } from 'primeng/message';
+import { CardModule } from 'primeng/card';
+import { PanelModule } from 'primeng/panel';
export interface ModuleField {
key: keyof ModuleVersionViewDTO;
@@ -21,7 +25,19 @@ export interface ModuleField {
@Component({
selector: 'module-version-view',
standalone: true,
- imports: [CommonModule, RouterModule, HlmBadgeDirective, HlmButtonDirective, ModuleVersionStatusPipe, FeedbackStatusPipe, FeedbackDepartmentPipe],
+ imports: [
+ CommonModule,
+ RouterModule,
+ ModuleVersionStatusPipe,
+ FeedbackStatusPipe,
+ FeedbackDepartmentPipe,
+ ButtonModule,
+ TagModule,
+ ProgressSpinnerModule,
+ MessageModule,
+ CardModule,
+ PanelModule
+ ],
templateUrl: './module-version-view.component.html'
})
export class ModuleVersionViewComponent {
@@ -45,10 +61,24 @@ export class ModuleVersionViewComponent {
{ key: 'hoursSelfStudy', label: 'Self-Study Hours', section: 'hours', feedbackKey: 'hoursSelfStudyFeedback' },
{ key: 'hoursPresence', label: 'Presence Hours', section: 'hours', feedbackKey: 'hoursPresenceFeedback' },
{ key: 'bulletPoints', label: 'Key Points', section: 'content', isLongText: true },
- { key: 'examinationAchievementsEng', label: 'Examination Achievements', section: 'content', isLongText: true, hasPrompt: 'examinationAchievementsPromptEng', feedbackKey: 'examinationAchievementsFeedback' },
+ {
+ key: 'examinationAchievementsEng',
+ label: 'Examination Achievements',
+ section: 'content',
+ isLongText: true,
+ hasPrompt: 'examinationAchievementsPromptEng',
+ feedbackKey: 'examinationAchievementsFeedback'
+ },
{ key: 'recommendedPrerequisitesEng', label: 'Recommended Prerequisites', section: 'content', isLongText: true, feedbackKey: 'recommendedPrerequisitesFeedback' },
{ key: 'contentEng', label: 'Module Content', section: 'content', isLongText: true, hasPrompt: 'contentPromptEng', feedbackKey: 'contentFeedback' },
- { key: 'learningOutcomesEng', label: 'Learning Outcomes', section: 'content', isLongText: true, hasPrompt: 'learningOutcomesPromptEng', feedbackKey: 'learningOutcomesFeedback' },
+ {
+ key: 'learningOutcomesEng',
+ label: 'Learning Outcomes',
+ section: 'content',
+ isLongText: true,
+ hasPrompt: 'learningOutcomesPromptEng',
+ feedbackKey: 'learningOutcomesFeedback'
+ },
{ key: 'teachingMethodsEng', label: 'Teaching Methods', section: 'content', isLongText: true, hasPrompt: 'teachingMethodsPromptEng', feedbackKey: 'teachingMethodsFeedback' },
{ key: 'mediaEng', label: 'Media', section: 'content', isLongText: true, feedbackKey: 'mediaFeedback' },
{ key: 'literatureEng', label: 'Literature', section: 'content', isLongText: true, feedbackKey: 'literatureFeedback' },
@@ -75,11 +105,11 @@ export class ModuleVersionViewComponent {
if (!mvid) {
return;
}
-
+
this.moduleVersionService.exportProfessorModuleVersionPdf(mvid).subscribe({
next: (response: Blob) => {
{
- const fileName = `mv${mvid}_${this.moduleVersionDto!.titleEng}`
+ const fileName = `mv${mvid}_${this.moduleVersionDto!.titleEng}`;
const blob = new Blob([response], { type: 'application/pdf' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
@@ -90,8 +120,8 @@ export class ModuleVersionViewComponent {
URL.revokeObjectURL(link.href);
}
},
- error: (err: HttpErrorResponse) => this.error = err.error
- })
+ error: (err: HttpErrorResponse) => (this.error = err.error)
+ });
}
getModuleVersionProperty(key: keyof ModuleVersionViewDTO): string {
@@ -109,10 +139,10 @@ export class ModuleVersionViewComponent {
getFeedbackFields(feedback: ModuleVersionViewFeedbackDTO): { key: string; label: string; value: string }[] {
const feedbackFields: { key: string; label: string; value: string }[] = [];
-
+
for (const field of this.moduleFields) {
if (!field.feedbackKey) continue;
-
+
const feedbackValue = feedback[field.feedbackKey as keyof ModuleVersionViewFeedbackDTO];
if (feedbackValue) {
feedbackFields.push({
@@ -122,30 +152,26 @@ export class ModuleVersionViewComponent {
});
}
}
-
+
return feedbackFields;
}
getFieldFeedbacks(fieldKey: keyof ModuleVersionViewDTO): ModuleVersionViewFeedbackDTO[] {
if (!this.moduleVersionDto?.feedbacks) return [];
-
- const field = this.moduleFields.find(f => f.key === fieldKey);
+
+ const field = this.moduleFields.find((f) => f.key === fieldKey);
if (!field?.feedbackKey) return [];
-
- return this.moduleVersionDto.feedbacks.filter(feedback => {
+
+ return this.moduleVersionDto.feedbacks.filter((feedback) => {
const feedbackValue = feedback[field.feedbackKey as keyof ModuleVersionViewFeedbackDTO];
return feedbackValue !== null && feedbackValue !== undefined && feedbackValue !== '';
});
}
getFeedbackContent(feedback: ModuleVersionViewFeedbackDTO, fieldKey: keyof ModuleVersionViewDTO): string {
- const field = this.moduleFields.find(f => f.key === fieldKey);
+ const field = this.moduleFields.find((f) => f.key === fieldKey);
if (!field?.feedbackKey) return '';
-
- return String(feedback[field.feedbackKey as keyof ModuleVersionViewFeedbackDTO] || '');
- }
- getFeedbackBorderClass(status: ModuleVersionViewFeedbackDTO.FeedbackStatusEnum): string {
- return 'border-blue-500';
+ return String(feedback[field.feedbackKey as keyof ModuleVersionViewFeedbackDTO] || '');
}
}
diff --git a/Client/src/app/pages/professor-home/professor-home-page.component.html b/Client/src/app/pages/professor-home/professor-home-page.component.html
index e3b130e5..23b46db8 100644
--- a/Client/src/app/pages/professor-home/professor-home-page.component.html
+++ b/Client/src/app/pages/professor-home/professor-home-page.component.html
@@ -1,19 +1,20 @@
-
-
Welcome, {{ user()?.firstName }} {{ user()?.lastName }}!
-
-
-
-
Information
-
- To offer a new module, please create a new Module Proposal.
-
- After submitting the proposal the necessary entities will be notified and evaluate your proposal.
-
+
Welcome, {{ user()?.firstName }} {{ user()?.lastName }}!
+
+
+
+
+
+
+
Information
+
+ To offer a new module, please create a new Module Proposal.
+
+ After submitting the proposal the necessary entities will be notified and evaluate your proposal.
+
+
- Create a new Module Proposal
-
-
-
Here are your module proposals:
-
-
+
+
+
Here are your module proposals:
+
diff --git a/Client/src/app/pages/professor-home/professor-home-page.component.ts b/Client/src/app/pages/professor-home/professor-home-page.component.ts
index 88784689..816c37af 100644
--- a/Client/src/app/pages/professor-home/professor-home-page.component.ts
+++ b/Client/src/app/pages/professor-home/professor-home-page.component.ts
@@ -1,27 +1,19 @@
import { Component, inject } from '@angular/core';
import { RouterModule } from '@angular/router';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
+import { ButtonModule } from 'primeng/button';
+import { MessageModule } from 'primeng/message';
import { ProposalListTableComponent } from '../../components/proposal-list-table/proposal-list-table.component';
import { SecurityStore } from '../../core/security/security-store.service';
-import { HlmAlertDescriptionDirective, HlmAlertDirective, HlmAlertIconDirective, HlmAlertTitleDirective } from '@spartan-ng/ui-alert-helm';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import { provideIcons } from '@ng-icons/core';
-import { lucideInfo } from '@ng-icons/lucide';
@Component({
selector: 'professor-home-page',
standalone: true,
imports: [
RouterModule,
- HlmButtonDirective,
- ProposalListTableComponent,
- HlmAlertDescriptionDirective,
- HlmAlertDirective,
- HlmAlertIconDirective,
- HlmAlertTitleDirective,
- HlmIconComponent
+ ButtonModule,
+ MessageModule,
+ ProposalListTableComponent
],
- providers: [provideIcons({ lucideInfo })],
templateUrl: './professor-home-page.component.html'
})
export class ProfessorHomePageComponent {
diff --git a/Client/src/app/pages/proposal-create/proposal-create.component.html b/Client/src/app/pages/proposal-create/proposal-create.component.html
deleted file mode 100644
index c21527d1..00000000
--- a/Client/src/app/pages/proposal-create/proposal-create.component.html
+++ /dev/null
@@ -1,195 +0,0 @@
-
- Create a New Module Proposal
-
-
-
-
Information
-
- Please fill out all information fields required for a new module.
-
- After giving the module a title you can save your progress at any time and come back at another time.
-
-
-
-
-
- Title
-
-
- A preliminary title is required
-
-
-
-
-
-
- Level
-
-
-
-
-
-
-
- Language
-
-
-
-
-
-
- Language
- English
- German
-
-
-
-
-
-
-
- Repetition
-
-
-
-
-
-
-
-
- Frequency
-
-
-
-
-
-
-
-
-
-
- Examination Achievements
-
-
-
-
-
-
-
-
- Recommended Prerequisites
-
-
-
-
-
-
-
-
- Module Content
-
-
-
-
-
-
-
-
- Learning Outcomes
-
-
-
-
-
-
-
-
- Teaching Methods
-
-
-
-
-
-
-
-
- Media used
-
-
-
-
-
-
-
-
- Literature
-
-
-
-
-
-
-
-
- Responsibles
-
-
-
-
-
-
-
-
- Lecturer
-
-
-
-
-
-
-
- Cancel
-
- {{ loading ? 'Creating...' : 'Create Proposal' }}
-
-
- @if (error) {
- {{ error }}
- }
-
diff --git a/Client/src/app/pages/proposal-create/proposal-create.component.ts b/Client/src/app/pages/proposal-create/proposal-create.component.ts
index f573b057..12976a04 100644
--- a/Client/src/app/pages/proposal-create/proposal-create.component.ts
+++ b/Client/src/app/pages/proposal-create/proposal-create.component.ts
@@ -1,46 +1,31 @@
import { Component } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
-import { CommonModule } from '@angular/common';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { HlmFormFieldModule } from '@spartan-ng/ui-formfield-helm';
-import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
-import { BrnSelectImports } from '@spartan-ng/ui-select-brain';
-import { HlmSelectImports } from '@spartan-ng/ui-select-helm';
-import { HlmLabelDirective } from '@spartan-ng/ui-label-helm';
+
import { RouterModule } from '@angular/router';
import { HttpErrorResponse } from '@angular/common/http';
-import { AutoResizeDirective } from '../../core/shared/autoresize.directive';
-import { HlmAlertDescriptionDirective, HlmAlertDirective, HlmAlertIconDirective, HlmAlertTitleDirective } from '@spartan-ng/ui-alert-helm';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import { provideIcons } from '@ng-icons/core';
-import { lucideInfo } from '@ng-icons/lucide';
import { ProposalBaseComponent } from '../../components/create-edit-base/create-edit-base.component';
import { FeedbackDepartmentPipe } from '../../pipes/feedbackDepartment.pipe';
import { ToggleButtonGroupComponent } from '../../components/toggle-button-group/toggle-button-group.component';
+import { ButtonModule } from 'primeng/button';
+import { InputTextModule } from 'primeng/inputtext';
+import { TextareaModule } from 'primeng/textarea';
+import { InputNumberModule } from 'primeng/inputnumber';
+import { MessageModule } from 'primeng/message';
@Component({
selector: 'app-proposal-create',
standalone: true,
imports: [
ReactiveFormsModule,
- CommonModule,
- HlmButtonDirective,
- HlmFormFieldModule,
- HlmInputDirective,
- BrnSelectImports,
- HlmSelectImports,
- HlmLabelDirective,
RouterModule,
- AutoResizeDirective,
- HlmAlertDescriptionDirective,
- HlmAlertDirective,
- HlmAlertIconDirective,
- HlmAlertTitleDirective,
- HlmIconComponent,
FeedbackDepartmentPipe,
- ToggleButtonGroupComponent
+ ToggleButtonGroupComponent,
+ ButtonModule,
+ InputTextModule,
+ TextareaModule,
+ InputNumberModule,
+ MessageModule
],
- providers: [provideIcons({ lucideInfo })],
templateUrl: '../../components/create-edit-base/create-edit-base.component.html'
})
export class ProposalCreateComponent extends ProposalBaseComponent {
diff --git a/Client/src/app/pages/proposal-view/proposal-view.component.html b/Client/src/app/pages/proposal-view/proposal-view.component.html
index d21992bf..e5affb6d 100644
--- a/Client/src/app/pages/proposal-view/proposal-view.component.html
+++ b/Client/src/app/pages/proposal-view/proposal-view.component.html
@@ -1,159 +1,168 @@
-
@if (loading) {
-
Loading...
+
} @else if (error) {
-
{{ error }}
+
+
+
} @else if (proposal) {
-
-
-
Module Proposal '{{ proposal.latestModuleVersion?.titleEng }}'
-
+
+
Module Proposal '{{ proposal.latestModuleVersion?.titleEng }}'
-
-
-
-
Proposal ID
-
{{ proposal.proposalId }}
-
-
-
Latest Version
-
{{ proposal.latestVersion }}
-
-
-
Proposal Status
-
- {{ (proposal.status! | statusDisplay).text }}
+
+
+
+
Proposal ID
+
{{ proposal.proposalId }}
+
+
+
Latest Version
+
{{ proposal.latestVersion }}
+
+
+
+
Created On
+
{{ proposal.creationDate | date: 'yyyy-MM-dd' }}
-
-
Created On
-
{{ proposal.creationDate | date : 'yyyy-MM-dd' }}
-
-
-
-
-
-
Information
-
{{ proposal.status! | statusInfo }}
-
+
+
+
+
+
Information
+
{{ proposal.status! | statusInfo }}
+
+
+
-
-
Current Module Versions
-
-
- Version
- Title
- Status
- Required Feedbacks
- Actions
-
-
-
- {{ proposal.latestVersion }}
-
-
- {{ proposal.latestModuleVersion!.titleEng }}
-
-
-
-
- {{ (proposal.latestModuleVersion!.status! | moduleVersionStatus).text }}
-
-
-
- @if(proposal.latestModuleVersion!.feedbackList!.length) { @for (feedback of proposal.latestModuleVersion!.feedbackList; track feedback.requiredRole) {
-
-
-
-
-
Feedback from
-
- {{ (feedback.requiredRole! | feedbackDepartment).text }}
-
-
- {{ (feedback.status | fadedFeedbackStatus).text }}
-
+
Current Module Versions
+
+
+
+ Version
+ Title
+ Status
+ Required Feedbacks
+ Actions
+
+
+
+
+ {{ proposal.latestVersion }}
+
+ {{ proposal.latestModuleVersion!.titleEng }}
+
+
+
+
+
+
+ @if (proposal.latestModuleVersion!.feedbackList!.length) {
+ @for (feedback of proposal.latestModuleVersion!.feedbackList; track feedback.requiredRole) {
+
+ }
+ }
+
+
+
+
+ @if (proposal.latestModuleVersion!.isComplete && proposal.latestModuleVersion!.status == moduleStatusEnum.PendingSubmission) {
+
+ }
+ @if (proposal.latestModuleVersion!.status === moduleStatusEnum.FeedbackGiven || proposal.latestModuleVersion!.status === moduleStatusEnum.Rejected) {
+
+ }
+ @if (proposal.latestModuleVersion!.status === moduleStatusEnum.PendingSubmission) {
+
+ }
+ @if (proposal.latestModuleVersion!.status === moduleStatusEnum.PendingFeedback) {
+
+ }
+ @if (proposal.status === proposalStatusEnum.RequiresReview) {
+
+ }
+
-
-
- } }
-
-
- @if (proposal.latestModuleVersion!.isComplete && proposal.latestModuleVersion!.status == moduleStatusEnum.PendingSubmission) {
- Submit
- } @if (proposal.latestModuleVersion!.isComplete && proposal.latestModuleVersion!.status !== moduleStatusEnum.FeedbackGiven) {
- Overlaps
- } @if (proposal.latestModuleVersion!.status === moduleStatusEnum.FeedbackGiven || proposal.latestModuleVersion!.status === moduleStatusEnum.Rejected) {
-
- View Feedback
-
- } @if(proposal.latestModuleVersion!.status === moduleStatusEnum.PendingSubmission) {
- Edit
- } @if(proposal.latestModuleVersion!.status === moduleStatusEnum.PendingFeedback) {
- Cancel
- } @if(proposal.status === proposalStatusEnum.RequiresReview) {
- Create New Version
- }
-
-
-
+
+
+
+
-
Previous Module Versions
-@if (proposal.oldModuleVersions && proposal.oldModuleVersions.length > 0) {
-
-
- Version
- Title
- Status
- Required Feedbacks
- Actions
-
+ Previous Module Versions
- @for (version of proposal.oldModuleVersions; track version.moduleVersionId) {
-
- {{ version.version }}
-
-
- {{ version.titleEng }}
-
-
-
-
- {{ (version.status! | fadedModuleVersionStatus).text }}
-
-
-
- @if(version.feedbackList?.length) { @for (feedback of version.feedbackList; track feedback.requiredRole) {
-
-
-
-
-
Feedback from
-
- {{ (feedback.requiredRole! | feedbackDepartment).text }}
-
-
- {{ (feedback.status | fadedFeedbackStatus).text }}
-
+
+
+
+ Version
+ Title
+ Status
+ Required Feedbacks
+ Actions
+
+
+
+
+ {{ version.version }}
+
+ {{ version.titleEng }}
+
+
+
+
+
+
+ @if (version.feedbackList?.length) {
+ @for (feedback of version.feedbackList; track feedback.requiredRole) {
+
+ }
+ }
+
+
+
+
-
-
- } }
-
-
- View Module
- View Feedback
-
-
- }
-
-} } @else {
-No proposal found
+
+
+
+
+
+ No previous module versions found.
+
+
+
}
diff --git a/Client/src/app/pages/proposal-view/proposal-view.component.ts b/Client/src/app/pages/proposal-view/proposal-view.component.ts
index ec2de3d1..a288d654 100644
--- a/Client/src/app/pages/proposal-view/proposal-view.component.ts
+++ b/Client/src/app/pages/proposal-view/proposal-view.component.ts
@@ -1,58 +1,43 @@
import { Component, inject } from '@angular/core';
-import { HlmTableComponent, HlmTrowComponent, HlmThComponent, HlmTdComponent, HlmCaptionComponent } from '@spartan-ng/ui-table-helm';
import { AddModuleVersionDTO, ModuleVersion, Proposal, ProposalControllerService, ProposalViewDTO } from '../../core/modules/openapi';
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { HlmBadgeDirective } from '@spartan-ng/ui-badge-helm';
-import { BrnHoverCardComponent, BrnHoverCardContentDirective, BrnHoverCardTriggerDirective } from '@spartan-ng/ui-hovercard-brain';
import { HttpErrorResponse } from '@angular/common/http';
-import { StatusDisplayPipe, StatusInfoPipeline } from '../../pipes/proposalStatus.pipe';
-import { FadedModuleVersionStatusPipe, ModuleVersionStatusPipe } from '../../pipes/moduleVersionStatus.pipe';
-import { HlmHoverCardModule } from '@spartan-ng/ui-hovercard-helm';
-import { FadedFeedbackStatusPipe, FeedbackStatusPipe } from '../../pipes/feedbackStatus.pipe';
+import { StatusInfoPipeline, StatusDisplayPipe } from '../../pipes/proposalStatus.pipe';
+import { ModuleVersionStatusPipe } from '../../pipes/moduleVersionStatus.pipe';
+import { FeedbackStatusPipe } from '../../pipes/feedbackStatus.pipe';
import { FeedbackDepartmentPipe } from '../../pipes/feedbackDepartment.pipe';
-import { HlmAlertDescriptionDirective, HlmAlertDirective, HlmAlertIconDirective, HlmAlertTitleDirective } from '@spartan-ng/ui-alert-helm';
-import { lucideInfo } from '@ng-icons/lucide';
-import { provideIcons } from '@ng-icons/core';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import { HlmToasterComponent } from "../../../spartan-components/ui-sonner-helm/src/lib/hlm-toaster.component";
+import { TableModule } from 'primeng/table';
+import { ButtonModule } from 'primeng/button';
+import { TagModule } from 'primeng/tag';
+import { MessageModule } from 'primeng/message';
+import { ToastModule } from 'primeng/toast';
+import { TooltipModule } from 'primeng/tooltip';
+import { ProgressSpinnerModule } from 'primeng/progressspinner';
@Component({
selector: 'app-proposal-view',
standalone: true,
imports: [
- BrnHoverCardComponent,
- BrnHoverCardContentDirective,
- BrnHoverCardTriggerDirective,
- HlmTableComponent,
- HlmTrowComponent,
- HlmHoverCardModule,
- HlmThComponent,
- HlmTdComponent,
- HlmButtonDirective,
+ TableModule,
+ ButtonModule,
+ TagModule,
+ MessageModule,
+ ToastModule,
+ TooltipModule,
FeedbackStatusPipe,
FeedbackDepartmentPipe,
- FadedFeedbackStatusPipe,
RouterModule,
CommonModule,
- HlmBadgeDirective,
StatusDisplayPipe,
StatusInfoPipeline,
ModuleVersionStatusPipe,
- FadedModuleVersionStatusPipe,
- HlmAlertDescriptionDirective,
- HlmAlertDirective,
- HlmAlertIconDirective,
- HlmAlertTitleDirective,
- HlmIconComponent,
- HlmToasterComponent
-],
+ ProgressSpinnerModule
+ ],
host: {
class: 'w-full overflow-x-auto'
},
- templateUrl: './proposal-view.component.html',
- providers: [provideIcons({ lucideInfo })]
+ templateUrl: './proposal-view.component.html'
})
export class ProposalViewComponent {
router = inject(Router);
@@ -109,24 +94,6 @@ export class ProposalViewComponent {
}
}
- updateProposal() {
- if (this.proposal) {
- this.router.navigate(['/proposals/edit', this.proposal.proposalId]);
- }
- }
-
- viewModuleVersion(versionId: number | undefined) {
- if (versionId) {
- this.router.navigate(['/module-version/view', versionId]);
- }
- }
-
- editLatestModuleVersion() {
- if (this.proposal?.latestVersion) {
- this.router.navigate(['/module-version/edit', this.proposal.latestModuleVersion!.moduleVersionId]);
- }
- }
-
addNewModuleVersion() {
if (this.proposal) {
const addModuleVersionDto: AddModuleVersionDTO = { proposalId: this.proposal.proposalId! };
diff --git a/Client/src/app/pages/similar-modules/similar-modules.component.html b/Client/src/app/pages/similar-modules/similar-modules.component.html
index 85eb94cf..0d72f7ac 100644
--- a/Client/src/app/pages/similar-modules/similar-modules.component.html
+++ b/Client/src/app/pages/similar-modules/similar-modules.component.html
@@ -1,46 +1,38 @@
-
-
Potential Module Overlaps
+
Potential Module Overlaps
- @if (isLoading) {
-
-
+@if (isLoading) {
+
- } @else if (similarModules.length === 0) {
-
-
-
No Similar Modules Found
-
We couldn't find any modules that are similar to your proposal.
-
- } @else {
-
- @for (module of similarModules; track module.moduleId) {
-
-
-
-
{{ module.titleEng || 'Module ' + module.moduleId }}
-
Module ID: {{ module.moduleId }}
-
+} @else if (similarModules.length === 0) {
+
+
+
+
+
No Similar Modules Found
+
We couldn't find any modules that are similar to your proposal.
+
+
+} @else {
+
+ @for (module of similarModules; track module.moduleId) {
+
+ {{ module.titleEng || 'Module ' + module.moduleId }}
+ Module ID: {{ module.moduleId }}
-
Module Content:
-
{{ module.contentEng }}
-
-
- @if (module.similarity !== undefined) {
-
-
Similarity Score:
-
0.7 ? 'bg-red-500' : module.similarity > 0.4 ? 'bg-yellow-500' : 'bg-green-500'">
- {{ (module.similarity * 100).toFixed(1) }}%
+
+ {{ module.contentEng }}
-
- }
-
- }
-
- }
-
-
Go Back
+ @if (module.similarity !== undefined) {
+
+ Similarity Score:
+ 0.7 ? 'danger' : module.similarity > 0.4 ? 'warn' : 'success'" />
+
+ }
+
+ }
-
+}
diff --git a/Client/src/app/pages/similar-modules/similar-modules.component.ts b/Client/src/app/pages/similar-modules/similar-modules.component.ts
index db553abb..518f5584 100644
--- a/Client/src/app/pages/similar-modules/similar-modules.component.ts
+++ b/Client/src/app/pages/similar-modules/similar-modules.component.ts
@@ -2,18 +2,17 @@ import { Component, inject } from '@angular/core';
import { ModuleVersionControllerService, SimilarModuleDTO } from '../../core/modules/openapi';
import { HttpErrorResponse } from '@angular/common/http';
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
-import { provideIcons } from '@ng-icons/core';
-import { lucideInfo } from '@ng-icons/lucide';
-import { HlmIconModule } from '@spartan-ng/ui-icon-helm';
-import { HlmButtonModule } from '@spartan-ng/ui-button-helm';
-import { HlmBadgeModule } from '@spartan-ng/ui-badge-helm';
-import { HlmAlertDescriptionDirective, HlmAlertIconDirective, HlmAlertModule, HlmAlertTitleDirective } from '@spartan-ng/ui-alert-helm';
+import { ButtonModule } from 'primeng/button';
+import { TagModule } from 'primeng/tag';
+import { MessageModule } from 'primeng/message';
+import { ProgressSpinnerModule } from 'primeng/progressspinner';
+import { PanelModule } from 'primeng/panel';
+import { TextareaModule } from 'primeng/textarea';
@Component({
selector: 'similar-modules-page',
standalone: true,
- imports: [HlmIconModule, RouterModule, HlmButtonModule, HlmBadgeModule, HlmAlertDescriptionDirective, HlmAlertTitleDirective, HlmAlertIconDirective, HlmAlertModule],
- providers: [provideIcons({ lucideInfo })],
+ imports: [RouterModule, ButtonModule, TagModule, MessageModule, ProgressSpinnerModule, PanelModule, TextareaModule],
templateUrl: './similar-modules.component.html'
})
export class SimilarModulesPage {
@@ -45,8 +44,4 @@ export class SimilarModulesPage {
return;
}
-
- goBack() {
- this.router.navigate(['../']);
- }
}
diff --git a/Client/src/app/pipes/feedbackStatus.pipe.ts b/Client/src/app/pipes/feedbackStatus.pipe.ts
index 138329e4..1f64907f 100644
--- a/Client/src/app/pipes/feedbackStatus.pipe.ts
+++ b/Client/src/app/pipes/feedbackStatus.pipe.ts
@@ -1,50 +1,72 @@
import { Pipe, PipeTransform } from '@angular/core';
-import { Feedback } from '../core/modules/openapi';
+import { Feedback, ModuleVersionViewFeedbackDTO } from '../core/modules/openapi';
+import { Tag } from 'primeng/tag';
@Pipe({ name: 'feedbackStatus', standalone: true })
export class FeedbackStatusPipe implements PipeTransform {
- transform(status: Feedback.StatusEnum): { text: string; colorClass: string } {
+ transform(status: Feedback.StatusEnum | ModuleVersionViewFeedbackDTO.FeedbackStatusEnum): {
+ text: string;
+ normalColor: string;
+ fadedColor: string;
+ severity: Tag['severity'];
+ } {
switch (status) {
case 'PENDING_SUBMISSION':
- return { text: 'Pending Submission', colorClass: 'bg-gray-500 text-white' };
+ return {
+ text: 'Pending Submission',
+ normalColor: 'bg-gray-500 text-white',
+ fadedColor: 'bg-gray-300 text-white',
+ severity: 'secondary'
+ };
case 'PENDING_FEEDBACK':
- return { text: 'Pending Feedback', colorClass: 'bg-yellow-500 text-white' };
+ return {
+ text: 'Pending Feedback',
+ normalColor: 'bg-yellow-500 text-white',
+ fadedColor: 'bg-yellow-300 text-white',
+ severity: 'warn'
+ };
case 'APPROVED':
- return { text: 'Approved', colorClass: 'bg-green-500 text-white' };
+ return {
+ text: 'Approved',
+ normalColor: 'bg-green-500 text-white',
+ fadedColor: 'bg-green-300 text-white',
+ severity: 'success'
+ };
case 'FEEDBACK_GIVEN':
- return { text: 'Feedback given', colorClass: 'bg-blue-500 text-white' };
+ return {
+ text: 'Feedback given',
+ normalColor: 'bg-blue-500 text-white',
+ fadedColor: 'bg-blue-300 text-white',
+ severity: 'info'
+ };
case 'REJECTED':
- return { text: 'Rejected', colorClass: 'bg-red-500 text-white' };
+ return {
+ text: 'Rejected',
+ normalColor: 'bg-red-500 text-white',
+ fadedColor: 'bg-red-300 text-white',
+ severity: 'danger'
+ };
case 'OBSOLETE':
- return { text: 'Obsolete', colorClass: 'bg-gray-300 text-gray-600' };
+ return {
+ text: 'Obsolete',
+ normalColor: 'bg-gray-300 text-gray-600',
+ fadedColor: 'bg-gray-200 text-gray-600',
+ severity: 'secondary'
+ };
case 'CANCELLED':
- return { text: 'Cancelled', colorClass: 'bg-gray-400 text-white' };
+ return {
+ text: 'Cancelled',
+ normalColor: 'bg-gray-400 text-white',
+ fadedColor: 'bg-gray-300 text-white',
+ severity: 'secondary'
+ };
default:
- return { text: status, colorClass: 'bg-gray-400 text-white' };
- }
- }
-}
-
-@Pipe({ name: 'fadedFeedbackStatus', standalone: true })
-export class FadedFeedbackStatusPipe implements PipeTransform {
- transform(status: Feedback.StatusEnum): { text: string; colorClass: string } {
- switch (status) {
- case 'PENDING_SUBMISSION':
- return { text: 'Pending Submission', colorClass: 'bg-gray-300 text-white' };
- case 'PENDING_FEEDBACK':
- return { text: 'Pending Feedback', colorClass: 'bg-yellow-300 text-white' };
- case 'APPROVED':
- return { text: 'Approved', colorClass: 'bg-green-300 text-white' };
- case 'FEEDBACK_GIVEN':
- return { text: 'Feedback given', colorClass: 'bg-blue-300 text-white' };
- case 'REJECTED':
- return { text: 'Rejected', colorClass: 'bg-red-300 text-white' };
- case 'OBSOLETE':
- return { text: 'Obsolete', colorClass: 'bg-gray-200 text-gray-600' };
- case 'CANCELLED':
- return { text: 'Cancelled', colorClass: 'bg-gray-300 text-white' };
- default:
- return { text: status, colorClass: 'bg-gray-300 text-white' };
+ return {
+ text: status,
+ normalColor: 'bg-gray-400 text-white',
+ fadedColor: 'bg-gray-300 text-white',
+ severity: 'secondary'
+ };
}
}
}
diff --git a/Client/src/app/pipes/moduleVersionStatus.pipe.ts b/Client/src/app/pipes/moduleVersionStatus.pipe.ts
index ebd163e8..f12e9aae 100644
--- a/Client/src/app/pipes/moduleVersionStatus.pipe.ts
+++ b/Client/src/app/pipes/moduleVersionStatus.pipe.ts
@@ -1,52 +1,68 @@
import { Pipe, PipeTransform } from '@angular/core';
import { ModuleVersionCompactDTO } from '../core/modules/openapi';
+import { Tag } from 'primeng/tag';
@Pipe({
name: 'moduleVersionStatus',
standalone: true
})
export class ModuleVersionStatusPipe implements PipeTransform {
- transform(status: ModuleVersionCompactDTO.StatusEnum): { text: string; colorClass: string } {
+ transform(status: ModuleVersionCompactDTO.StatusEnum): {
+ text: string;
+ normalColor: string;
+ fadedColor: string;
+ severity: Tag['severity'];
+ } {
switch (status) {
case ModuleVersionCompactDTO.StatusEnum.PendingSubmission:
- return { text: 'Pending Submission', colorClass: 'bg-gray-500' };
+ return {
+ text: 'Pending Submission',
+ normalColor: 'bg-gray-500',
+ fadedColor: 'bg-gray-300',
+ severity: 'secondary'
+ };
case ModuleVersionCompactDTO.StatusEnum.PendingFeedback:
- return { text: 'Pending Feedback', colorClass: 'bg-yellow-500' };
+ return {
+ text: 'Pending Feedback',
+ normalColor: 'bg-yellow-500',
+ fadedColor: 'bg-yellow-300',
+ severity: 'warn'
+ };
case ModuleVersionCompactDTO.StatusEnum.Accepted:
- return { text: 'Accepted', colorClass: 'bg-green-500' };
+ return {
+ text: 'Accepted',
+ normalColor: 'bg-green-500',
+ fadedColor: 'bg-green-300',
+ severity: 'success'
+ };
case ModuleVersionCompactDTO.StatusEnum.FeedbackGiven:
- return { text: 'Feedback given', colorClass: 'bg-blue-500' };
+ return {
+ text: 'Feedback given',
+ normalColor: 'bg-blue-500',
+ fadedColor: 'bg-blue-300',
+ severity: 'info'
+ };
case ModuleVersionCompactDTO.StatusEnum.Rejected:
- return { text: 'Rejected', colorClass: 'bg-red-500' };
+ return {
+ text: 'Rejected',
+ normalColor: 'bg-red-500',
+ fadedColor: 'bg-red-300',
+ severity: 'danger'
+ };
case ModuleVersionCompactDTO.StatusEnum.Cancelled:
- return { text: 'Cancelled', colorClass: 'bg-gray-300' };
+ return {
+ text: 'Cancelled',
+ normalColor: 'bg-gray-300',
+ fadedColor: 'bg-gray-100',
+ severity: 'secondary'
+ };
default:
- return { text: status, colorClass: 'bg-gray-400' };
- }
- }
-}
-
-@Pipe({
- name: 'fadedModuleVersionStatus',
- standalone: true
-})
-export class FadedModuleVersionStatusPipe implements PipeTransform {
- transform(status: ModuleVersionCompactDTO.StatusEnum): { text: string; colorClass: string } {
- switch (status) {
- case ModuleVersionCompactDTO.StatusEnum.PendingSubmission:
- return { text: 'Pending Submission', colorClass: 'bg-gray-300' };
- case ModuleVersionCompactDTO.StatusEnum.PendingFeedback:
- return { text: 'Pending Feedback', colorClass: 'bg-yellow-300' };
- case ModuleVersionCompactDTO.StatusEnum.Accepted:
- return { text: 'Accepted', colorClass: 'bg-green-300' };
- case ModuleVersionCompactDTO.StatusEnum.FeedbackGiven:
- return { text: 'Feedback given', colorClass: 'bg-blue-300' };
- case ModuleVersionCompactDTO.StatusEnum.Rejected:
- return { text: 'Rejected', colorClass: 'bg-red-300' };
- case ModuleVersionCompactDTO.StatusEnum.Cancelled:
- return { text: 'Cancelled', colorClass: 'bg-gray-100' };
- default:
- return { text: status, colorClass: 'bg-gray-200' };
+ return {
+ text: status,
+ normalColor: 'bg-gray-400',
+ fadedColor: 'bg-gray-200',
+ severity: 'secondary'
+ };
}
}
}
diff --git a/Client/src/app/pipes/proposalStatus.pipe.ts b/Client/src/app/pipes/proposalStatus.pipe.ts
index 604928bc..71b9de43 100644
--- a/Client/src/app/pipes/proposalStatus.pipe.ts
+++ b/Client/src/app/pipes/proposalStatus.pipe.ts
@@ -1,22 +1,22 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Proposal } from '../core/modules/openapi';
-
+import { Tag } from 'primeng/tag';
@Pipe({ name: 'statusDisplay', standalone: true })
export class StatusDisplayPipe implements PipeTransform {
- transform(status: Proposal.StatusEnum): { text: string; colorClass: string } {
+ transform(status: Proposal.StatusEnum): { text: string; severity: Tag['severity'] } {
switch (status) {
case 'PENDING_SUBMISSION':
- return { text: 'Pending Submission', colorClass: 'bg-gray-500' };
+ return { text: 'Pending Submission', severity: 'secondary' };
case 'PENDING_FEEDBACK':
- return { text: 'Pending Feedback', colorClass: 'bg-yellow-500' };
+ return { text: 'Pending Feedback', severity: 'warn' };
case 'ACCEPTED':
- return { text: 'Accepted', colorClass: 'bg-green-500' };
+ return { text: 'Accepted', severity: 'success' };
case 'REQUIRES_REVIEW':
- return { text: 'Requires Review', colorClass: 'bg-blue-500' };
+ return { text: 'Requires Review', severity: 'info' };
case 'REJECTED':
- return { text: 'Rejected', colorClass: 'bg-red-500' };
+ return { text: 'Rejected', severity: 'danger' };
default:
- return { text: status, colorClass: 'bg-gray-400' };
+ return { text: status, severity: 'secondary' };
}
}
}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/index.ts b/Client/src/spartan-components/ui-accordion-helm/src/index.ts
deleted file mode 100644
index d029f963..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmAccordionContentComponent } from './lib/hlm-accordion-content.component';
-import { HlmAccordionIconDirective } from './lib/hlm-accordion-icon.directive';
-import { HlmAccordionItemDirective } from './lib/hlm-accordion-item.directive';
-import { HlmAccordionTriggerDirective } from './lib/hlm-accordion-trigger.directive';
-import { HlmAccordionDirective } from './lib/hlm-accordion.directive';
-
-export * from './lib/hlm-accordion-content.component';
-export * from './lib/hlm-accordion-icon.directive';
-export * from './lib/hlm-accordion-item.directive';
-export * from './lib/hlm-accordion-trigger.directive';
-export * from './lib/hlm-accordion.directive';
-
-export const HlmAccordionImports = [
- HlmAccordionDirective,
- HlmAccordionItemDirective,
- HlmAccordionTriggerDirective,
- HlmAccordionIconDirective,
- HlmAccordionContentComponent,
-] as const;
-
-@NgModule({
- imports: [...HlmAccordionImports],
- exports: [...HlmAccordionImports],
-})
-export class HlmAccordionModule {}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-content.component.ts b/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-content.component.ts
deleted file mode 100644
index 0b1c6327..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-content.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, effect, input } from '@angular/core';
-import { BrnAccordionContentComponent } from '@spartan-ng/ui-accordion-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-accordion-content',
- template: `
-
- `,
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[class]': '_computedClass()'
- }
-})
-export class HlmAccordionContentComponent extends BrnAccordionContentComponent {
- public readonly userClass = input
('', { alias: 'class' });
- protected readonly _computedClass = computed(() => {
- const gridRows = this.state() === 'open' ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]';
- return hlm('text-sm transition-all grid', gridRows, this.userClass());
- });
-
- constructor() {
- super();
- effect(() => {
- this.setClassToCustomElement('pt-1 pb-4');
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-icon.directive.ts b/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-icon.directive.ts
deleted file mode 100644
index 3666e7ef..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-icon.directive.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { lucideChevronDown } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'hlm-icon[hlmAccordionIcon], hlm-icon[hlmAccIcon]',
- standalone: true,
- providers: [provideIcons({ lucideChevronDown })],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmAccordionIconDirective {
- private readonly _hlmIcon = inject(HlmIconComponent);
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('inline-block h-4 w-4 transition-transform [animation-duration:200]', this.userClass()),
- );
-
- constructor() {
- this._hlmIcon.size = 'none';
- this._hlmIcon.name = 'lucideChevronDown';
- }
-}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-item.directive.ts b/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-item.directive.ts
deleted file mode 100644
index e004b673..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-item.directive.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { BrnAccordionItemDirective } from '@spartan-ng/ui-accordion-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAccordionItem],brn-accordion-item[hlm],hlm-accordion-item',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [
- {
- directive: BrnAccordionItemDirective,
- inputs: ['isOpened'],
- },
- ],
-})
-export class HlmAccordionItemDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm('flex flex-1 flex-col border-b border-border', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-trigger.directive.ts b/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-trigger.directive.ts
deleted file mode 100644
index 5b3c9a2a..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion-trigger.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { BrnAccordionTriggerDirective } from '@spartan-ng/ui-accordion-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAccordionTrigger]',
- standalone: true,
- host: {
- '[style.--tw-ring-offset-shadow]': '"0 0 #000"',
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnAccordionTriggerDirective],
-})
-export class HlmAccordionTriggerDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'w-full focus-visible:outline-none text-sm focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 flex flex-1 items-center justify-between py-4 px-0.5 font-medium underline-offset-4 hover:underline [&[data-state=open]>[hlmAccordionIcon]]:rotate-180 [&[data-state=open]>[hlmAccIcon]]:rotate-180',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion.directive.ts b/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion.directive.ts
deleted file mode 100644
index b9eabb70..00000000
--- a/Client/src/spartan-components/ui-accordion-helm/src/lib/hlm-accordion.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { BrnAccordionDirective } from '@spartan-ng/ui-accordion-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAccordion], hlm-accordion',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [{ directive: BrnAccordionDirective, inputs: ['type', 'dir', 'orientation'] }],
-})
-export class HlmAccordionDirective {
- private readonly _brn = inject(BrnAccordionDirective);
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm('flex', this._brn.orientation === 'horizontal' ? 'flex-row' : 'flex-col', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-alert-helm/src/index.ts b/Client/src/spartan-components/ui-alert-helm/src/index.ts
deleted file mode 100644
index 33172b42..00000000
--- a/Client/src/spartan-components/ui-alert-helm/src/index.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmAlertDescriptionDirective } from './lib/hlm-alert-description.directive';
-import { HlmAlertIconDirective } from './lib/hlm-alert-icon.directive';
-import { HlmAlertTitleDirective } from './lib/hlm-alert-title.directive';
-import { HlmAlertDirective } from './lib/hlm-alert.directive';
-
-export * from './lib/hlm-alert-description.directive';
-export * from './lib/hlm-alert-icon.directive';
-export * from './lib/hlm-alert-title.directive';
-export * from './lib/hlm-alert.directive';
-
-export const HlmAlertImports = [
- HlmAlertDirective,
- HlmAlertTitleDirective,
- HlmAlertDescriptionDirective,
- HlmAlertIconDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmAlertImports],
- exports: [...HlmAlertImports],
-})
-export class HlmAlertModule {}
diff --git a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-description.directive.ts b/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-description.directive.ts
deleted file mode 100644
index e38f5cb6..00000000
--- a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-description.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const alertDescriptionVariants = cva('text-sm [&_p]:leading-relaxed', {
- variants: {},
-});
-export type AlertDescriptionVariants = VariantProps;
-
-@Directive({
- selector: '[hlmAlertDesc],[hlmAlertDescription]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmAlertDescriptionDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(alertDescriptionVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-icon.directive.ts b/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-icon.directive.ts
deleted file mode 100644
index 08ac73a3..00000000
--- a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-icon.directive.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Directive, inject } from '@angular/core';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-
-@Directive({
- selector: '[hlmAlertIcon]',
- standalone: true,
-})
-export class HlmAlertIconDirective {
- private _icon = inject(HlmIconComponent, { host: true, optional: true });
-
- constructor() {
- if (!this._icon) return;
- this._icon.size = 'sm';
- }
-}
diff --git a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-title.directive.ts b/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-title.directive.ts
deleted file mode 100644
index a94942eb..00000000
--- a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert-title.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const alertTitleVariants = cva('mb-1 font-medium leading-none tracking-tight', {
- variants: {},
-});
-export type AlertTitleVariants = VariantProps;
-
-@Directive({
- selector: '[hlmAlertTitle]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmAlertTitleDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(alertTitleVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert.directive.ts b/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert.directive.ts
deleted file mode 100644
index 6d6b1d4e..00000000
--- a/Client/src/spartan-components/ui-alert-helm/src/lib/hlm-alert.directive.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Directive, Input, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const alertVariants = cva(
- 'relative w-full rounded-lg border border-border p-4 [&>[hlmAlertIcon]]:absolute [&>[hlmAlertIcon]]:text-foreground [&>[hlmAlertIcon]]:left-4 [&>[hlmAlertIcon]]:top-4 [&>[hlmAlertIcon]+div]:translate-y-[-3px] [&>[hlmAlertIcon]~*]:pl-7',
- {
- variants: {
- variant: {
- default: 'bg-background text-foreground',
- destructive:
- 'text-destructive border-destructive/50 dark:border-destructive [&>[hlmAlertIcon]]:text-destructive text-destructive',
- },
- },
- defaultVariants: {
- variant: 'default',
- },
- },
-);
-export type AlertVariants = VariantProps;
-
-@Directive({
- selector: '[hlmAlert]',
- standalone: true,
- host: {
- role: 'alert',
- '[class]': '_computedClass()',
- },
-})
-export class HlmAlertDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(alertVariants({ variant: this._variant() }), this.userClass()));
-
- private readonly _variant = signal('default');
- @Input()
- set variant(variant: AlertVariants['variant']) {
- this._variant.set(variant);
- }
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/index.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/index.ts
deleted file mode 100644
index 6d2bf9f8..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/index.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmAlertDialogActionButtonDirective } from './lib/hlm-alert-dialog-action-button.directive';
-import { HlmAlertDialogCancelButtonDirective } from './lib/hlm-alert-dialog-cancel-button.directive';
-import { HlmAlertDialogContentComponent } from './lib/hlm-alert-dialog-content.component';
-import { HlmAlertDialogDescriptionDirective } from './lib/hlm-alert-dialog-description.directive';
-import { HlmAlertDialogFooterComponent } from './lib/hlm-alert-dialog-footer.component';
-import { HlmAlertDialogHeaderComponent } from './lib/hlm-alert-dialog-header.component';
-import { HlmAlertDialogOverlayDirective } from './lib/hlm-alert-dialog-overlay.directive';
-import { HlmAlertDialogTitleDirective } from './lib/hlm-alert-dialog-title.directive';
-import { HlmAlertDialogComponent } from './lib/hlm-alert-dialog.component';
-
-export * from './lib/hlm-alert-dialog-action-button.directive';
-export * from './lib/hlm-alert-dialog-cancel-button.directive';
-export * from './lib/hlm-alert-dialog-content.component';
-export * from './lib/hlm-alert-dialog-description.directive';
-export * from './lib/hlm-alert-dialog-footer.component';
-export * from './lib/hlm-alert-dialog-header.component';
-export * from './lib/hlm-alert-dialog-overlay.directive';
-export * from './lib/hlm-alert-dialog-title.directive';
-export * from './lib/hlm-alert-dialog.component';
-
-export const HlmAlertDialogImports = [
- HlmAlertDialogContentComponent,
- HlmAlertDialogDescriptionDirective,
- HlmAlertDialogFooterComponent,
- HlmAlertDialogHeaderComponent,
- HlmAlertDialogOverlayDirective,
- HlmAlertDialogTitleDirective,
- HlmAlertDialogActionButtonDirective,
- HlmAlertDialogCancelButtonDirective,
- HlmAlertDialogComponent,
-] as const;
-
-@NgModule({
- imports: [...HlmAlertDialogImports],
- exports: [...HlmAlertDialogImports],
-})
-export class HlmAlertDialogModule {}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-action-button.directive.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-action-button.directive.ts
deleted file mode 100644
index 836a11e8..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-action-button.directive.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Directive } from '@angular/core';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-
-@Directive({
- selector: 'button[hlmAlertDialogAction]',
- standalone: true,
- hostDirectives: [HlmButtonDirective],
-})
-export class HlmAlertDialogActionButtonDirective {}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-cancel-button.directive.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-cancel-button.directive.ts
deleted file mode 100644
index 4e39ffb1..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-cancel-button.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'button[hlmAlertDialogCancel]',
- standalone: true,
- hostDirectives: [HlmButtonDirective],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmAlertDialogCancelButtonDirective {
- private readonly _hlmBtn = inject(HlmButtonDirective, { host: true });
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm('mt-2 sm:mt-0', this.userClass()));
-
- constructor() {
- this._hlmBtn.variant = 'outline';
- }
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-content.component.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-content.component.ts
deleted file mode 100644
index 35787f10..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-content.component.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input, signal } from '@angular/core';
-import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-alert-dialog-content',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[attr.data-state]': 'state()',
- },
- template: `
-
- `,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
-})
-export class HlmAlertDialogContentComponent {
- private readonly _stateProvider = injectExposesStateProvider({ optional: true, host: true });
- public readonly state = this._stateProvider?.state ?? signal('closed');
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- 'relative grid w-full max-w-lg gap-4 border-border border bg-background p-6 shadow-lg [animation-duration:200] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] sm:rounded-lg md:w-full',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-description.directive.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-description.directive.ts
deleted file mode 100644
index dd955984..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-description.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { BrnAlertDialogDescriptionDirective } from '@spartan-ng/ui-alertdialog-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAlertDialogDescription]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnAlertDialogDescriptionDirective],
-})
-export class HlmAlertDialogDescriptionDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm('text-sm text-muted-foreground', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-footer.component.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-footer.component.ts
deleted file mode 100644
index c3541cb8..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-footer.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-alert-dialog-footer',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
-})
-export class HlmAlertDialogFooterComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-header.component.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-header.component.ts
deleted file mode 100644
index 07799f4c..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-header.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-alert-dialog-header',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
-})
-export class HlmAlertDialogHeaderComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm('flex flex-col space-y-2 text-center sm:text-left', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-overlay.directive.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-overlay.directive.ts
deleted file mode 100644
index d997b579..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-overlay.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, effect, input } from '@angular/core';
-import { hlm, injectCustomClassSettable } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAlertDialogOverlay],brn-alert-dialog-overlay[hlm]',
- standalone: true,
-})
-export class HlmAlertDialogOverlayDirective {
- private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- 'bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
- this.userClass(),
- ),
- );
-
- constructor() {
- effect(() => this._classSettable?.setClassToCustomElement(this._computedClass()));
- }
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-title.directive.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-title.directive.ts
deleted file mode 100644
index 8e3cc595..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog-title.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { BrnAlertDialogTitleDirective } from '@spartan-ng/ui-alertdialog-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmAlertDialogTitle]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnAlertDialogTitleDirective],
-})
-export class HlmAlertDialogTitleDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm('text-lg font-semibold', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog.component.ts b/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog.component.ts
deleted file mode 100644
index 272fbcfe..00000000
--- a/Client/src/spartan-components/ui-alertdialog-helm/src/lib/hlm-alert-dialog.component.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, forwardRef } from '@angular/core';
-import { BrnAlertDialogComponent, BrnAlertDialogOverlayComponent } from '@spartan-ng/ui-alertdialog-brain';
-import { BrnDialogComponent } from '@spartan-ng/ui-dialog-brain';
-import { HlmAlertDialogOverlayDirective } from './hlm-alert-dialog-overlay.directive';
-
-@Component({
- selector: 'hlm-alert-dialog',
- standalone: true,
- template: `
-
-
- `,
- providers: [
- {
- provide: BrnDialogComponent,
- useExisting: forwardRef(() => HlmAlertDialogComponent),
- },
- ],
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- exportAs: 'hlmAlertDialog',
- imports: [BrnAlertDialogOverlayComponent, HlmAlertDialogOverlayDirective],
-})
-export class HlmAlertDialogComponent extends BrnAlertDialogComponent {
- constructor() {
- super();
- this.closeDelay = 100;
- }
-}
diff --git a/Client/src/spartan-components/ui-aspectratio-helm/src/index.ts b/Client/src/spartan-components/ui-aspectratio-helm/src/index.ts
deleted file mode 100644
index e7c2b300..00000000
--- a/Client/src/spartan-components/ui-aspectratio-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmAspectRatioDirective } from './lib/helm-aspect-ratio.directive';
-
-export * from './lib/helm-aspect-ratio.directive';
-
-@NgModule({
- imports: [HlmAspectRatioDirective],
- exports: [HlmAspectRatioDirective],
-})
-export class HlmAspectRatioModule {}
diff --git a/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.spec.ts b/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.spec.ts
deleted file mode 100644
index 4add8c2c..00000000
--- a/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.spec.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { Component } from '@angular/core';
-import { type ComponentFixture, TestBed } from '@angular/core/testing';
-import { HlmAspectRatioDirective } from './helm-aspect-ratio.directive';
-
-@Component({
- selector: 'hlm-mock',
- standalone: true,
- imports: [HlmAspectRatioDirective],
- template: `
-
-
-
- `,
-})
-class MockComponent {
- ratio: number | undefined = 16 / 9;
-}
-
-describe('HelmAspectRatioDirective', () => {
- let component: MockComponent;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MockComponent);
- component = fixture.componentInstance;
- });
-
- it('should compile', () => {
- expect(component).toBeTruthy();
- });
-
- it('should show the image', () => {
- fixture.detectChanges();
- const img = fixture.nativeElement.querySelector('img');
- expect(img).toBeTruthy();
- });
-
- it('should have the correct aspect ratio', () => {
- fixture.detectChanges();
- const div = fixture.nativeElement.querySelector('div');
- expect(div.style.paddingBottom).toEqual(`${100 / (component.ratio || 1)}%`);
- });
-
- it('should default to an aspect ratio of 1', () => {
- component.ratio = undefined;
- fixture.detectChanges();
- const div = fixture.nativeElement.querySelector('div');
- expect(div.style.paddingBottom).toEqual('100%');
- });
-
- it('should fallback to an aspect ratio of 1 if the ratio is 0', () => {
- component.ratio = 0;
- fixture.detectChanges();
- const div = fixture.nativeElement.querySelector('div');
- expect(div.style.paddingBottom).toEqual('100%');
- });
-
- it('should fallback to an aspect ratio of 1 if the ratio is negative', () => {
- component.ratio = -1;
- fixture.detectChanges();
- const div = fixture.nativeElement.querySelector('div');
- expect(div.style.paddingBottom).toEqual('100%');
- });
-
- it('should add the correct styles to the image', () => {
- fixture.detectChanges();
-
- const img = fixture.nativeElement.querySelector('img') as HTMLImageElement;
- expect(img.classList.toString()).toBe('absolute w-full h-full object-cover');
- });
-});
diff --git a/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.ts b/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.ts
deleted file mode 100644
index 6aafe8ec..00000000
--- a/Client/src/spartan-components/ui-aspectratio-helm/src/lib/helm-aspect-ratio.directive.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { type NumberInput, coerceNumberProperty } from '@angular/cdk/coercion';
-import { type AfterViewInit, Directive, ElementRef, Input, computed, inject, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-const parseDividedString = (value: NumberInput): NumberInput => {
- if (typeof value !== 'string' || !value.includes('/')) return value;
- return value
- .split('/')
- .map((v) => Number.parseInt(v, 10))
- .reduce((a, b) => a / b);
-};
-
-@Directive({
- selector: '[hlmAspectRatio]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[style.padding-bottom]': '_computedPaddingBottom()',
- },
-})
-export class HlmAspectRatioDirective implements AfterViewInit {
- private readonly _ratio = signal(1);
- private readonly _el: HTMLElement = inject(ElementRef).nativeElement;
-
- protected readonly _computedPaddingBottom = computed(() => {
- return `${100 / this._ratio()}%`;
- });
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm('relative w-full', this.userClass()));
-
- @Input()
- set hlmAspectRatio(value: NumberInput) {
- const coerced = coerceNumberProperty(parseDividedString(value));
- this._ratio.set(coerced <= 0 ? 1 : coerced);
- }
-
- ngAfterViewInit() {
- // support delayed addition of image to dom
- const child = this._el.firstElementChild;
- if (child) {
- child.classList.add('absolute', 'w-full', 'h-full', 'object-cover');
- }
- }
-}
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/index.ts b/Client/src/spartan-components/ui-avatar-helm/src/index.ts
deleted file mode 100644
index d6ecc6f5..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmAvatarFallbackDirective } from './lib/fallback';
-import { HlmAvatarComponent } from './lib/hlm-avatar.component';
-import { HlmAvatarImageDirective } from './lib/image';
-
-export * from './lib/fallback';
-export * from './lib/hlm-avatar.component';
-export * from './lib/image';
-
-export const HlmAvatarImports = [HlmAvatarFallbackDirective, HlmAvatarImageDirective, HlmAvatarComponent] as const;
-
-@NgModule({
- imports: [...HlmAvatarImports],
- exports: [...HlmAvatarImports],
-})
-export class HlmAvatarModule {}
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.spec.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.spec.ts
deleted file mode 100644
index ff8ab583..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.spec.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { Component, PLATFORM_ID } from '@angular/core';
-import { type ComponentFixture, TestBed, fakeAsync } from '@angular/core/testing';
-import { hexColorFor, isBright } from '@spartan-ng/ui-avatar-brain';
-import { HlmAvatarFallbackDirective } from './hlm-avatar-fallback.directive';
-
-@Component({
- selector: 'hlm-mock',
- standalone: true,
- imports: [HlmAvatarFallbackDirective],
- template: `
- fallback2
- `,
-})
-class HlmMockComponent {
- userCls = '';
- autoColor = false;
-}
-
-describe('HlmAvatarFallbackDirective', () => {
- let component: HlmMockComponent;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- fixture = TestBed.overrideProvider(PLATFORM_ID, { useValue: 'browser' }).createComponent(HlmMockComponent);
- component = fixture.componentInstance;
- });
-
- it('should compile', () => {
- expect(component).toBeTruthy();
- });
-
- it('should contain the default classes if no inputs are provided', () => {
- fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('span').className).toBe(
- 'bg-muted flex h-full items-center justify-center rounded-full w-full',
- );
- });
-
- it('should add any user defined classes', async () => {
- component.userCls = 'test-class';
-
- fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('span').className).toContain('test-class');
- });
- it('should merge bg-destructive correctly when set as user defined class, therefore removing bg-muted', async () => {
- component.userCls = 'bg-destructive ';
-
- fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('span').className).toContain('bg-destructive');
- });
-
- describe('autoColor', () => {
- beforeEach(() => {
- component.autoColor = true;
- fixture.detectChanges();
- });
-
- it('should remove the bg-muted class from the component', fakeAsync(() => {
- fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('span').className).not.toContain('bg-muted');
- }));
-
- it('should remove add a text color class and hex backgroundColor style depending on its content', () => {
- const hex = hexColorFor('fallback2');
- const textCls = isBright(hex) ? 'text-black' : 'text-white';
- expect(fixture.nativeElement.querySelector('span').className).toContain(textCls);
- expect(fixture.nativeElement.querySelector('span').style.backgroundColor).toBe('rgb(144, 53, 149)');
- });
- });
-});
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.ts
deleted file mode 100644
index 29d23563..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/hlm-avatar-fallback.directive.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Directive, computed, inject } from '@angular/core';
-import { BrnAvatarFallbackDirective, hexColorFor, isBright } from '@spartan-ng/ui-avatar-brain';
-import { hlm } from '@spartan-ng/ui-core';
-
-@Directive({
- selector: '[hlmAvatarFallback]',
- standalone: true,
- exportAs: 'avatarFallback',
- hostDirectives: [
- {
- directive: BrnAvatarFallbackDirective,
- inputs: ['class:class', 'autoColor:autoColor'],
- },
- ],
- host: {
- '[class]': '_computedClass()',
- '[style.backgroundColor]': "_hex() || ''",
- },
-})
-export class HlmAvatarFallbackDirective {
- private readonly _brn = inject(BrnAvatarFallbackDirective);
- private readonly _hex = computed(() => {
- if (!this._brn.useAutoColor() || !this._brn.getTextContent()) return;
- return hexColorFor(this._brn.getTextContent());
- });
-
- private readonly _autoColorTextCls = computed(() => {
- const hex = this._hex();
- if (!hex) return;
- return `${isBright(hex) ? 'text-black' : 'text-white'}`;
- });
-
- protected readonly _computedClass = computed(() => {
- return hlm(
- 'flex h-full w-full items-center justify-center rounded-full',
- this._autoColorTextCls() ?? 'bg-muted',
- this._brn?.userCls(),
- );
- });
-}
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/index.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/index.ts
deleted file mode 100644
index 46e5b466..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/fallback/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './hlm-avatar-fallback.directive';
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.spec.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.spec.ts
deleted file mode 100644
index f4ac8060..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.spec.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { Component, Input } from '@angular/core';
-import { type ComponentFixture, TestBed } from '@angular/core/testing';
-import { BrnAvatarFallbackDirective, BrnAvatarImageDirective } from '@spartan-ng/ui-avatar-brain';
-import { HlmAvatarComponent } from './hlm-avatar.component';
-
-@Component({
- selector: 'hlm-mock',
- imports: [BrnAvatarImageDirective, BrnAvatarFallbackDirective, HlmAvatarComponent],
- template: `
-
- fallback
-
- `,
- standalone: true,
-})
-class MockComponent {
- @Input() class = '';
-}
-
-describe('HlmAvatarComponent', () => {
- let component: HlmAvatarComponent;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- fixture = TestBed.createComponent(HlmAvatarComponent);
- component = fixture.componentInstance;
- });
-
- it('should compile', () => {
- expect(component).toBeTruthy();
- });
-
- it('should add the default classes if no inputs are provided', () => {
- fixture.detectChanges();
- expect(fixture.nativeElement.className).toBe('flex h-10 overflow-hidden relative rounded-full shrink-0 w-10');
- });
-
- it('should add any user defined classes', () => {
- const mockFixture = TestBed.createComponent(MockComponent);
- mockFixture.componentRef.setInput('class', 'test-class');
- mockFixture.detectChanges();
- const avatar = mockFixture.nativeElement.querySelector('hlm-avatar');
- expect(avatar.className).toContain('test-class');
- });
-
- it('should change the size when the variant is changed', () => {
- component.variant = 'small';
- fixture.detectChanges();
- expect(fixture.nativeElement.className).toContain('h-6');
- expect(fixture.nativeElement.className).toContain('w-6');
- expect(fixture.nativeElement.className).toContain('text-xs');
-
- component.variant = 'large';
- fixture.detectChanges();
- expect(fixture.nativeElement.className).toContain('h-14');
- expect(fixture.nativeElement.className).toContain('w-14');
- expect(fixture.nativeElement.className).toContain('text-lg');
- });
-
- it('should support brn directives', () => {
- const mockFixture = TestBed.createComponent(MockComponent);
- mockFixture.detectChanges();
- expect(mockFixture.nativeElement.querySelector('span').textContent).toBe('fallback');
- });
-});
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.ts
deleted file mode 100644
index 98fc40fe..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/hlm-avatar.component.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, computed, input, signal } from '@angular/core';
-import { BrnAvatarComponent } from '@spartan-ng/ui-avatar-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const avatarVariants = cva('relative flex shrink-0 overflow-hidden rounded-full', {
- variants: {
- variant: {
- small: 'h-6 w-6 text-xs',
- medium: 'h-10 w-10',
- large: 'h-14 w-14 text-lg',
- },
- },
- defaultVariants: {
- variant: 'medium',
- },
-});
-
-type AvatarVariants = VariantProps;
-
-@Component({
- selector: 'hlm-avatar',
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- template: `
- @if (image?.canShow()) {
-
- } @else {
-
- }
- `,
-})
-export class HlmAvatarComponent extends BrnAvatarComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(avatarVariants({ variant: this._variant() }), this.userClass()),
- );
-
- private readonly _variant = signal('medium');
- @Input()
- set variant(variant: AvatarVariants['variant']) {
- this._variant.set(variant);
- }
-}
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.spec.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.spec.ts
deleted file mode 100644
index 734da017..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.spec.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { Component } from '@angular/core';
-import { type ComponentFixture, TestBed } from '@angular/core/testing';
-import { HlmAvatarImageDirective } from './hlm-avatar-image.directive';
-
-@Component({
- selector: 'hlm-mock',
- standalone: true,
- imports: [HlmAvatarImageDirective],
- template: `
-
- `,
-})
-class HlmMockComponent {
- userCls = '';
-}
-
-describe('HlmAvatarImageDirective', () => {
- let component: HlmMockComponent;
- let fixture: ComponentFixture;
-
- beforeEach(() => {
- fixture = TestBed.createComponent(HlmMockComponent);
- component = fixture.componentInstance;
- });
-
- it('should compile', () => {
- expect(component).toBeTruthy();
- });
-
- it('should add the default classes if no inputs are provided', () => {
- fixture.detectChanges();
- expect(fixture.nativeElement.querySelector('img').className).toBe('aspect-square h-full object-cover w-full');
- });
-
- it('should add any user defined classes', async () => {
- component.userCls = 'test-class';
- fixture.detectChanges();
-
- // fallback uses Promise.resolve().then() so we need to wait for the next tick
- setTimeout(() => {
- expect(fixture.nativeElement.querySelector('img').className).toContain('test-class');
- });
- });
-});
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.ts
deleted file mode 100644
index 8aa794e3..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/hlm-avatar-image.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { BrnAvatarImageDirective } from '@spartan-ng/ui-avatar-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'img[hlmAvatarImage]',
- standalone: true,
- exportAs: 'avatarImage',
- hostDirectives: [BrnAvatarImageDirective],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmAvatarImageDirective {
- canShow = inject(BrnAvatarImageDirective).canShow;
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('aspect-square object-cover h-full w-full', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/index.ts b/Client/src/spartan-components/ui-avatar-helm/src/lib/image/index.ts
deleted file mode 100644
index 7c059f1f..00000000
--- a/Client/src/spartan-components/ui-avatar-helm/src/lib/image/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './hlm-avatar-image.directive';
diff --git a/Client/src/spartan-components/ui-badge-helm/src/index.ts b/Client/src/spartan-components/ui-badge-helm/src/index.ts
deleted file mode 100644
index ad60d353..00000000
--- a/Client/src/spartan-components/ui-badge-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmBadgeDirective } from './lib/hlm-badge.directive';
-
-export * from './lib/hlm-badge.directive';
-
-@NgModule({
- imports: [HlmBadgeDirective],
- exports: [HlmBadgeDirective],
-})
-export class HlmBadgeModule {}
diff --git a/Client/src/spartan-components/ui-badge-helm/src/lib/hlm-badge.directive.ts b/Client/src/spartan-components/ui-badge-helm/src/lib/hlm-badge.directive.ts
deleted file mode 100644
index ac9276a4..00000000
--- a/Client/src/spartan-components/ui-badge-helm/src/lib/hlm-badge.directive.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Directive, Input, booleanAttribute, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const badgeVariants = cva(
- 'inline-flex items-center border rounded-full px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
- {
- variants: {
- variant: {
- default: 'bg-primary border-transparent text-primary-foreground',
- secondary: 'bg-secondary border-transparent text-secondary-foreground',
- destructive: 'bg-destructive border-transparent text-destructive-foreground',
- outline: 'text-foreground border-border',
- },
- size: {
- default: 'text-xs',
- lg: 'text-sm',
- },
- static: { true: '', false: '' },
- },
- compoundVariants: [
- {
- variant: 'default',
- static: false,
- class: 'hover:bg-primary/80',
- },
- {
- variant: 'secondary',
- static: false,
- class: 'hover:bg-secondary/80',
- },
- {
- variant: 'destructive',
- static: false,
- class: 'hover:bg-destructive/80',
- },
- ],
- defaultVariants: {
- variant: 'default',
- size: 'default',
- static: false,
- },
- },
-);
-type badgeVariants = VariantProps;
-
-@Directive({
- selector: '[hlmBadge]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmBadgeDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(badgeVariants({ variant: this._variant(), size: this._size(), static: this._static() }), this.userClass()),
- );
-
- private readonly _variant = signal('default');
- @Input()
- set variant(variant: badgeVariants['variant']) {
- this._variant.set(variant);
- }
-
- private readonly _static = signal(false);
- @Input({ transform: booleanAttribute })
- set static(value: badgeVariants['static']) {
- this._static.set(value);
- }
-
- private readonly _size = signal('default');
- @Input()
- set size(size: badgeVariants['size']) {
- this._size.set(size);
- }
-}
diff --git a/Client/src/spartan-components/ui-button-helm/src/index.ts b/Client/src/spartan-components/ui-button-helm/src/index.ts
deleted file mode 100644
index 413697fd..00000000
--- a/Client/src/spartan-components/ui-button-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmButtonDirective } from './lib/hlm-button.directive';
-
-export * from './lib/hlm-button.directive';
-
-@NgModule({
- imports: [HlmButtonDirective],
- exports: [HlmButtonDirective],
-})
-export class HlmButtonModule {}
diff --git a/Client/src/spartan-components/ui-button-helm/src/lib/hlm-button.directive.ts b/Client/src/spartan-components/ui-button-helm/src/lib/hlm-button.directive.ts
deleted file mode 100644
index ddae0c90..00000000
--- a/Client/src/spartan-components/ui-button-helm/src/lib/hlm-button.directive.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Directive, Input, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const buttonVariants = cva(
- 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background',
- {
- variants: {
- variant: {
- default: 'bg-primary text-primary-foreground hover:bg-primary/90',
- destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
- outline: 'border border-input hover:bg-accent hover:text-accent-foreground',
- secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
- ghost: 'hover:bg-accent hover:text-accent-foreground',
- link: 'underline-offset-4 hover:underline text-primary',
- },
- size: {
- default: 'h-10 py-2 px-4',
- sm: 'h-9 px-3 rounded-md',
- lg: 'h-11 px-8 rounded-md',
- icon: 'h-10 w-10',
- },
- },
- defaultVariants: {
- variant: 'default',
- size: 'default',
- },
- },
-);
-export type ButtonVariants = VariantProps;
-
-@Directive({
- selector: '[hlmBtn]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmButtonDirective {
- public readonly userClass = input('', { alias: 'class' });
- private readonly _settableClass = signal('');
-
- protected _computedClass = computed(() =>
- hlm(buttonVariants({ variant: this._variant(), size: this._size() }), this._settableClass(), this.userClass()),
- );
-
- setClass(value: ClassValue) {
- this._settableClass.set(value);
- }
-
- private readonly _variant = signal('default');
- @Input()
- set variant(variant: ButtonVariants['variant']) {
- this._variant.set(variant);
- }
-
- private readonly _size = signal('default');
- @Input()
- set size(size: ButtonVariants['size']) {
- this._size.set(size);
- }
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/index.ts b/Client/src/spartan-components/ui-card-helm/src/index.ts
deleted file mode 100644
index b6f2d14d..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/index.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmCardContentDirective } from './lib/hlm-card-content.directive';
-import { HlmCardDescriptionDirective } from './lib/hlm-card-description.directive';
-import { HlmCardFooterDirective } from './lib/hlm-card-footer.directive';
-import { HlmCardHeaderDirective } from './lib/hlm-card-header.directive';
-import { HlmCardTitleDirective } from './lib/hlm-card-title.directive';
-import { HlmCardDirective } from './lib/hlm-card.directive';
-
-export * from './lib/hlm-card-content.directive';
-export * from './lib/hlm-card-description.directive';
-export * from './lib/hlm-card-footer.directive';
-export * from './lib/hlm-card-header.directive';
-export * from './lib/hlm-card-title.directive';
-export * from './lib/hlm-card.directive';
-
-export const HlmCardImports = [
- HlmCardDirective,
- HlmCardHeaderDirective,
- HlmCardFooterDirective,
- HlmCardTitleDirective,
- HlmCardDescriptionDirective,
- HlmCardContentDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmCardImports],
- exports: [...HlmCardImports],
-})
-export class HlmCardModule {}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-content.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-content.directive.ts
deleted file mode 100644
index 66173f5c..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-content.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardContentVariants = cva('p-6 pt-0', {
- variants: {},
- defaultVariants: {},
-});
-export type CardContentVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCardContent]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardContentDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardContentVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-description.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-description.directive.ts
deleted file mode 100644
index a5802aa1..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-description.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardDescriptionVariants = cva('text-sm text-muted-foreground', {
- variants: {},
- defaultVariants: {},
-});
-export type CardDescriptionVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCardDescription]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardDescriptionDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardDescriptionVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-footer.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-footer.directive.ts
deleted file mode 100644
index 74348044..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-footer.directive.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardFooterVariants = cva('flex p-6 pt-0', {
- variants: {
- direction: {
- row: 'flex-row items-center space-x-1.5',
- column: 'flex-col space-y-1.5',
- },
- },
- defaultVariants: {
- direction: 'row',
- },
-});
-export type CardFooterVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCardFooter]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardFooterDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardFooterVariants({ direction: this.direction() }), this.userClass()));
-
- public readonly direction = input('row');
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-header.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-header.directive.ts
deleted file mode 100644
index bbaef4e6..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-header.directive.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardHeaderVariants = cva('flex p-6', {
- variants: {
- direction: {
- row: 'flex-row items-center space-x-1.5',
- column: 'flex-col space-y-1.5',
- },
- },
- defaultVariants: {
- direction: 'column',
- },
-});
-export type CardHeaderVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCardHeader]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardHeaderDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardHeaderVariants({ direction: this.direction() }), this.userClass()));
-
- public readonly direction = input('column');
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-title.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-title.directive.ts
deleted file mode 100644
index e8ba8211..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card-title.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardTitleVariants = cva('text-lg font-semibold leading-none tracking-tight', {
- variants: {},
- defaultVariants: {},
-});
-export type CardTitleVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCardTitle]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardTitleDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardTitleVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card.directive.ts b/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card.directive.ts
deleted file mode 100644
index 5662a4c1..00000000
--- a/Client/src/spartan-components/ui-card-helm/src/lib/hlm-card.directive.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const cardVariants = cva(
- 'rounded-lg border border-border bg-card focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-card-foreground shadow-sm',
- {
- variants: {},
- defaultVariants: {},
- },
-);
-export type CardVariants = VariantProps;
-
-@Directive({
- selector: '[hlmCard]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCardDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(cardVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/index.ts b/Client/src/spartan-components/ui-carousel-helm/src/index.ts
deleted file mode 100644
index 700d182b..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/index.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmCarouselContentComponent } from './lib/hlm-carousel-content.component';
-import { HlmCarouselItemComponent } from './lib/hlm-carousel-item.component';
-import { HlmCarouselNextComponent } from './lib/hlm-carousel-next.component';
-import { HlmCarouselPreviousComponent } from './lib/hlm-carousel-previous.component';
-import { HlmCarouselComponent } from './lib/hlm-carousel.component';
-
-export * from './lib/hlm-carousel-content.component';
-export * from './lib/hlm-carousel-item.component';
-export * from './lib/hlm-carousel-next.component';
-export * from './lib/hlm-carousel-previous.component';
-export * from './lib/hlm-carousel.component';
-
-export const HlmCarouselImports = [
- HlmCarouselComponent,
- HlmCarouselContentComponent,
- HlmCarouselItemComponent,
- HlmCarouselPreviousComponent,
- HlmCarouselNextComponent,
-] as const;
-
-@NgModule({
- imports: [...HlmCarouselImports],
- exports: [...HlmCarouselImports],
-})
-export class HlmCarouselModule {}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-content.component.ts b/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-content.component.ts
deleted file mode 100644
index 4a4899a1..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-content.component.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import { HlmCarouselComponent } from './hlm-carousel.component';
-
-@Component({
- selector: 'hlm-carousel-content',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[class]': '_computedClass()',
- },
- template: `
-
- `,
-})
-export class HlmCarouselContentComponent {
- private orientation = inject(HlmCarouselComponent).orientation;
-
- _userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex', this.orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', this._userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-item.component.ts b/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-item.component.ts
deleted file mode 100644
index c533d89a..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-item.component.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import { HlmCarouselComponent } from './hlm-carousel.component';
-
-@Component({
- selector: 'hlm-carousel-item',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[class]': '_computedClass()',
- role: 'group',
- 'aria-roledescription': 'slide',
- },
- template: `
-
- `,
-})
-export class HlmCarouselItemComponent {
- _userClass = input('', { alias: 'class' });
- private orientation = inject(HlmCarouselComponent).orientation;
- protected _computedClass = computed(() =>
- hlm('min-w-0 shrink-0 grow-0 basis-full', this.orientation() === 'horizontal' ? 'pl-4' : 'pt-4', this._userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-next.component.ts b/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-next.component.ts
deleted file mode 100644
index 4b5c0e34..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-next.component.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import {
- ChangeDetectionStrategy,
- Component,
- ViewEncapsulation,
- computed,
- effect,
- inject,
- input,
- untracked,
-} from '@angular/core';
-import { lucideArrowRight } from '@ng-icons/lucide';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-import { HlmCarouselComponent } from './hlm-carousel.component';
-
-@Component({
- // eslint-disable-next-line @angular-eslint/component-selector
- selector: 'button[hlm-carousel-next], button[hlmCarouselNext]',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[disabled]': 'isDisabled()',
- '(click)': 'carousel.scrollNext()',
- },
- hostDirectives: [{ directive: HlmButtonDirective, inputs: ['variant', 'size'] }],
- providers: [provideIcons({ lucideArrowRight })],
- imports: [HlmIconComponent],
- template: `
-
- Next slide
- `,
-})
-export class HlmCarouselNextComponent {
- protected carousel = inject(HlmCarouselComponent);
- _userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'absolute h-8 w-8 rounded-full',
- this.carousel.orientation() === 'horizontal'
- ? '-right-12 top-1/2 -translate-y-1/2'
- : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
- this._userClass(),
- ),
- );
- protected isDisabled = () => !this.carousel.canScrollNext();
-
- constructor() {
- const button = inject(HlmButtonDirective);
-
- button.variant = 'outline';
- button.size = 'icon';
-
- effect(() => {
- const computedClass = this._computedClass();
-
- untracked(() => button.setClass(computedClass));
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-previous.component.ts b/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-previous.component.ts
deleted file mode 100644
index 34a971d7..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel-previous.component.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import {
- ChangeDetectionStrategy,
- Component,
- ViewEncapsulation,
- computed,
- effect,
- inject,
- input,
- untracked,
-} from '@angular/core';
-import { lucideArrowLeft } from '@ng-icons/lucide';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-import { HlmCarouselComponent } from './hlm-carousel.component';
-
-@Component({
- // eslint-disable-next-line @angular-eslint/component-selector
- selector: 'button[hlm-carousel-previous], button[hlmCarouselPrevious]',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[disabled]': 'isDisabled()',
- '(click)': 'carousel.scrollPrev()',
- },
- hostDirectives: [{ directive: HlmButtonDirective, inputs: ['variant', 'size'] }],
- providers: [provideIcons({ lucideArrowLeft })],
- imports: [HlmIconComponent],
- template: `
-
- Previous slide
- `,
-})
-export class HlmCarouselPreviousComponent {
- protected carousel = inject(HlmCarouselComponent);
- _userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'absolute h-8 w-8 rounded-full',
- this.carousel.orientation() === 'horizontal'
- ? '-left-12 top-1/2 -translate-y-1/2'
- : '-top-12 left-1/2 -translate-x-1/2 rotate-90',
- this._userClass(),
- ),
- );
- protected isDisabled = () => !this.carousel.canScrollPrev();
-
- constructor() {
- const button = inject(HlmButtonDirective);
-
- button.variant = 'outline';
- button.size = 'icon';
-
- effect(() => {
- const computedClass = this._computedClass();
-
- untracked(() => button.setClass(computedClass));
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel.component.ts b/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel.component.ts
deleted file mode 100644
index 6a9dfe14..00000000
--- a/Client/src/spartan-components/ui-carousel-helm/src/lib/hlm-carousel.component.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import {
- ChangeDetectionStrategy,
- Component,
- HostListener,
- type InputSignal,
- type Signal,
- ViewChild,
- ViewEncapsulation,
- computed,
- input,
- signal,
-} from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import {
- EmblaCarouselDirective,
- type EmblaEventType,
- type EmblaOptionsType,
- type EmblaPluginType,
-} from 'embla-carousel-angular';
-
-@Component({
- selector: 'hlm-carousel',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[class]': '_computedClass()',
- role: 'region',
- 'aria-roledescription': 'carousel',
- },
- imports: [EmblaCarouselDirective],
- template: `
-
-
-
-
- `,
-})
-export class HlmCarouselComponent {
- @ViewChild(EmblaCarouselDirective) protected emblaCarousel?: EmblaCarouselDirective;
-
- _userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('relative', this._userClass()));
-
- orientation = input<'horizontal' | 'vertical'>('horizontal');
- options: InputSignal | undefined> = input();
- plugins: InputSignal = input([] as EmblaPluginType[]);
-
- protected emblaOptions: Signal = computed(() => ({
- ...this.options(),
- axis: this.orientation() === 'horizontal' ? 'x' : 'y',
- }));
-
- private _canScrollPrev = signal(false);
- canScrollPrev = this._canScrollPrev.asReadonly();
- private _canScrollNext = signal(false);
- canScrollNext = this._canScrollNext.asReadonly();
-
- protected onEmblaEvent(event: EmblaEventType) {
- const emblaApi = this.emblaCarousel?.emblaApi;
-
- if (!emblaApi) {
- return;
- }
-
- if (event === 'select' || event === 'init' || event === 'reInit') {
- this._canScrollPrev.set(emblaApi.canScrollPrev());
- this._canScrollNext.set(emblaApi.canScrollNext());
- }
- }
-
- @HostListener('keydown', ['$event'])
- protected onKeydown(event: KeyboardEvent) {
- if (event.key === 'ArrowLeft') {
- event.preventDefault();
- this.emblaCarousel?.scrollPrev();
- } else if (event.key === 'ArrowRight') {
- event.preventDefault();
- this.emblaCarousel?.scrollNext();
- }
- }
-
- scrollPrev() {
- this.emblaCarousel?.scrollPrev();
- }
-
- scrollNext() {
- this.emblaCarousel?.scrollNext();
- }
-}
diff --git a/Client/src/spartan-components/ui-checkbox-helm/src/index.ts b/Client/src/spartan-components/ui-checkbox-helm/src/index.ts
deleted file mode 100644
index 18374d9d..00000000
--- a/Client/src/spartan-components/ui-checkbox-helm/src/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmCheckboxCheckIconComponent } from './lib/hlm-checkbox-checkicon.component';
-import { HlmCheckboxComponent } from './lib/hlm-checkbox.component';
-
-export * from './lib/hlm-checkbox-checkicon.component';
-export * from './lib/hlm-checkbox.component';
-
-export const HlmCheckboxImports = [HlmCheckboxComponent, HlmCheckboxCheckIconComponent] as const;
-@NgModule({
- imports: [...HlmCheckboxImports],
- exports: [...HlmCheckboxImports],
-})
-export class HlmCheckboxModule {}
diff --git a/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox-checkicon.component.ts b/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox-checkicon.component.ts
deleted file mode 100644
index 0bcb4b4e..00000000
--- a/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox-checkicon.component.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Component, computed, inject, input } from '@angular/core';
-import { lucideCheck } from '@ng-icons/lucide';
-import { BrnCheckboxComponent } from '@spartan-ng/ui-checkbox-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-checkbox-checkicon',
- standalone: true,
- imports: [HlmIconComponent],
- providers: [provideIcons({ lucideCheck })],
- host: {
- '[class]': '_computedClass()',
- },
- template: `
-
- `,
-})
-export class HlmCheckboxCheckIconComponent {
- private _brnCheckbox = inject(BrnCheckboxComponent);
- protected _checked = this._brnCheckbox?.isChecked;
- public readonly userClass = input('', { alias: 'class' });
-
- public readonly iconName = input('lucideCheck');
-
- protected _computedClass = computed(() =>
- hlm(
- 'h-4 w-4 leading-none group-data-[state=unchecked]:opacity-0',
- this._checked() === 'indeterminate' ? 'opacity-50' : '',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox.component.ts b/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox.component.ts
deleted file mode 100644
index e06704c9..00000000
--- a/Client/src/spartan-components/ui-checkbox-helm/src/lib/hlm-checkbox.component.ts
+++ /dev/null
@@ -1,119 +0,0 @@
-import { Component, EventEmitter, Output, booleanAttribute, computed, effect, forwardRef, input, model, signal } from '@angular/core';
-import { NG_VALUE_ACCESSOR } from '@angular/forms';
-import { BrnCheckboxComponent } from '@spartan-ng/ui-checkbox-brain';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import { HlmCheckboxCheckIconComponent } from './hlm-checkbox-checkicon.component';
-
-export const HLM_CHECKBOX_VALUE_ACCESSOR = {
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => HlmCheckboxComponent),
- multi: true
-};
-
-@Component({
- selector: 'hlm-checkbox',
- standalone: true,
- imports: [BrnCheckboxComponent, HlmCheckboxCheckIconComponent],
- template: `
-
-
-
- `,
- host: {
- class: 'contents',
- '[attr.id]': 'null',
- '[attr.aria-label]': 'null',
- '[attr.aria-labelledby]': 'null',
- '[attr.aria-describedby]': 'null'
- },
- providers: [HLM_CHECKBOX_VALUE_ACCESSOR]
-})
-export class HlmCheckboxComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'group inline-flex border border-foreground shrink-0 cursor-pointer items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring' +
- ' focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:text-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-background',
- this.userClass(),
- this._disabled() ? 'cursor-not-allowed opacity-50' : ''
- )
- );
-
- /** Used to set the id on the underlying brn element. */
- public readonly id = input(null);
-
- /** Used to set the aria-label attribute on the underlying brn element. */
- public readonly ariaLabel = input(null, { alias: 'aria-label' });
-
- /** Used to set the aria-labelledby attribute on the underlying brn element. */
- public readonly ariaLabelledby = input(null, { alias: 'aria-labelledby' });
-
- /** Used to set the aria-describedby attribute on the underlying brn element. */
- public readonly ariaDescribedby = input(null, { alias: 'aria-describedby' });
-
- public readonly checked = model(false);
-
- public readonly name = input(null);
- public readonly required = input(false, { transform: booleanAttribute });
-
- protected readonly _disabled = signal(false);
- public readonly disabled = input(false, { transform: booleanAttribute });
-
- private disableInput = effect(() => {
- this._disabled.set(this.disabled());
- });
-
- // icon inputs
- public readonly checkIconName = input('lucideCheck');
- public readonly checkIconClass = input('');
-
- @Output()
- public changed = new EventEmitter();
-
- protected _handleChange(): void {
- if (this._disabled()) return;
-
- const previousChecked = this.checked();
- this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);
- this._onChange(!previousChecked);
- this.changed.emit(!previousChecked);
- }
-
- /** CONROL VALUE ACCESSOR */
-
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- writeValue(value: any): void {
- this.checked.set(!!value);
- }
- // eslint-disable-next-line @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars,,@typescript-eslint/no-explicit-any
- protected _onChange = (_: any) => {};
- // eslint-disable-next-line @typescript-eslint/no-empty-function
- protected _onTouched = () => {};
-
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- registerOnChange(fn: any): void {
- this._onChange = fn;
- }
-
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- registerOnTouched(fn: any): void {
- this._onTouched = fn;
- }
-
- setDisabledState(isDisabled: boolean): void {
- this._disabled.set(isDisabled);
- }
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/index.ts b/Client/src/spartan-components/ui-command-helm/src/index.ts
deleted file mode 100644
index 68962838..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/index.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmCommandDialogCloseButtonDirective } from './lib/hlm-command-dialog-close-button.directive';
-import { HlmCommandDialogDirective } from './lib/hlm-command-dialog.directive';
-import { HlmCommandEmptyDirective } from './lib/hlm-command-empty.directive';
-import { HlmCommandGroupDirective } from './lib/hlm-command-group.directive';
-import { HlmCommandInputWrapperComponent } from './lib/hlm-command-input-wrapper.component';
-import { HlmCommandInputDirective } from './lib/hlm-command-input.directive';
-import { HlmCommandItemIconDirective } from './lib/hlm-command-item-icon.directive';
-import { HlmCommandItemDirective } from './lib/hlm-command-item.directive';
-import { HlmCommandListDirective } from './lib/hlm-command-list.directive';
-import { HlmCommandSeparatorDirective } from './lib/hlm-command-separator.directive';
-import { HlmCommandShortcutComponent } from './lib/hlm-command-shortcut.component';
-import { HlmCommandDirective } from './lib/hlm-command.directive';
-
-export * from './lib/hlm-command-dialog-close-button.directive';
-export * from './lib/hlm-command-dialog.directive';
-export * from './lib/hlm-command-empty.directive';
-export * from './lib/hlm-command-group.directive';
-export * from './lib/hlm-command-input-wrapper.component';
-export * from './lib/hlm-command-input.directive';
-export * from './lib/hlm-command-item-icon.directive';
-export * from './lib/hlm-command-item.directive';
-export * from './lib/hlm-command-list.directive';
-export * from './lib/hlm-command-loader.directive';
-export * from './lib/hlm-command-separator.directive';
-export * from './lib/hlm-command-shortcut.component';
-export * from './lib/hlm-command.directive';
-
-export const HlmCommandImports = [
- HlmCommandDirective,
- HlmCommandInputDirective,
- HlmCommandItemDirective,
- HlmCommandSeparatorDirective,
- HlmCommandGroupDirective,
- HlmCommandListDirective,
- HlmCommandShortcutComponent,
- HlmCommandItemIconDirective,
- HlmCommandEmptyDirective,
- HlmCommandInputWrapperComponent,
- HlmCommandDialogCloseButtonDirective,
- HlmCommandDialogDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmCommandImports],
- exports: [...HlmCommandImports],
-})
-export class HlmCommandModule {}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog-close-button.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog-close-button.directive.ts
deleted file mode 100644
index b2558921..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog-close-button.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmCmdDialogCloseBtn]',
- standalone: true,
- hostDirectives: [HlmButtonDirective],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandDialogCloseButtonDirective {
- private _hlmBtn = inject(HlmButtonDirective, { host: true });
- constructor() {
- this._hlmBtn.variant = 'ghost';
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('!p-1 !h-5 !w-5', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog.directive.ts
deleted file mode 100644
index 5df5c361..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-dialog.directive.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
-import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import { HlmCommandDirective } from './hlm-command.directive';
-
-@Directive({
- selector: '[hlmCmdDialog]',
- standalone: true,
- hostDirectives: [HlmCommandDirective],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandDialogDirective {
- private _stateProvider = injectExposesStateProvider({ host: true });
- public state = this._stateProvider.state ?? signal('closed').asReadonly();
- private _renderer = inject(Renderer2);
- private _element = inject(ElementRef);
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%]',
- this.userClass(),
- ),
- );
-
- constructor() {
- effect(() => {
- this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-empty.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-empty.directive.ts
deleted file mode 100644
index 3af3ec7f..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-empty.directive.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmCmdEmpty]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandEmptyDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('py-6 text-center text-sm', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-group.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-group.directive.ts
deleted file mode 100644
index c3596f21..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-group.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'brn-cmd-group[hlm],cmdk-group[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandGroupDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'block [&[cmdk-hidden="true"]]:hidden\n' +
- '[&_.cmdk-group-label]:px-2 [&_.cmdk-group-label]:py-1.5 [&_.cmdk-group-label]:text-xs [&_.cmdk-group-label]:font-medium [&_.cmdk-group-label]:text-muted-foreground\n' +
- '[&_.cmdk-group-content]:flex [&_.cmdk-group-content]:flex-col [&_.cmdk-group-content]:flex-col overflow-hidden p-1 text-foreground',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input-wrapper.component.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input-wrapper.component.ts
deleted file mode 100644
index 7fd92717..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input-wrapper.component.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-cmd-input-wrapper',
- standalone: true,
- template: ' ',
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandInputWrapperComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex space-x-2 items-center border-b border-border px-3 [&_hlm-icon]:h-5 [&_hlm-icon]:w-5', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input.directive.ts
deleted file mode 100644
index 18c01615..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-input.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlm][brnCmdInput],[hlm][cmdkInput]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandInputDirective {
- public readonly userClass = input('', { alias: 'class' });
-
- protected _computedClass = computed(() =>
- hlm(
- 'h-11 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item-icon.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item-icon.directive.ts
deleted file mode 100644
index 8828be37..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item-icon.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmCmdIcon]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandItemIconDirective {
- private _menuIcon = inject(HlmIconComponent, { host: true, optional: true });
-
- constructor() {
- if (!this._menuIcon) return;
- this._menuIcon.size = 'none';
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('mr-2 h-4 w-4', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item.directive.ts
deleted file mode 100644
index 0718504f..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-item.directive.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlm][brnCmdItem],[hlm][cmdkItem]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- // This is needed after changes to the underlying CMDK library used for the BrnCommand primitive
- // Ideally we would remove the dependency on this outside module. If you are open to that please
- // reach out and if you are feeling super ambitious you can implement it yourself and open a PR!
- '[style.display]': '"flex"',
- },
-})
-export class HlmCommandItemDirective {
- public readonly userClass = input('', { alias: 'class' });
-
- protected _computedClass = computed(() =>
- hlm(
- 'items-center relative cursor-default select-none rounded-sm px-2 py-1.5 text-sm outline-none\n' +
- 'aria-selected:bg-accent aria-selected:text-accent-foreground\n' +
- 'hover:bg-accent/50\n' +
- 'disabled:pointer-events-none disabled:opacity-50',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-list.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-list.directive.ts
deleted file mode 100644
index 11849782..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-list.directive.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'cmdk-list[hlm],brn-cmd-list[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandListDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('max-h-[300px] overflow-y-auto overflow-x-hidden', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-loader.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-loader.directive.ts
deleted file mode 100644
index c4d3c639..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-loader.directive.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { Directive } from '@angular/core';
-
-@Directive({
- selector: '[hlmCmdLoader]',
- standalone: true,
-})
-export class HlmCommandLoaderDirective {}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-separator.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-separator.directive.ts
deleted file mode 100644
index 3edbeac0..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-separator.directive.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Directive } from '@angular/core';
-
-@Directive({
- selector: 'cmdk-separator[hlm],brn-cmd-separator[hlm],[hlmCmdSeparator]',
- standalone: true,
- host: {
- class: '[&_hr]:border-border [&[cmdk-hidden="true"]]:hidden',
- },
-})
-export class HlmCommandSeparatorDirective {}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-shortcut.component.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-shortcut.component.ts
deleted file mode 100644
index 3a6132a9..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command-shortcut.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-cmd-shortcut',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandShortcutComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('ml-auto font-light text-xs tracking-widest opacity-60', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command.directive.ts b/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command.directive.ts
deleted file mode 100644
index f40adba9..00000000
--- a/Client/src/spartan-components/ui-command-helm/src/lib/hlm-command.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'cmdk-command[hlm],brn-cmd[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmCommandDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'flex h-full w-full flex-col overflow-hidden rounded-md border border-border bg-popover text-popover-foreground',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/index.ts b/Client/src/spartan-components/ui-dialog-helm/src/index.ts
deleted file mode 100644
index fb6b7041..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/index.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmDialogCloseDirective } from './lib/hlm-dialog-close.directive';
-import { HlmDialogContentComponent } from './lib/hlm-dialog-content.component';
-import { HlmDialogDescriptionDirective } from './lib/hlm-dialog-description.directive';
-import { HlmDialogFooterComponent } from './lib/hlm-dialog-footer.component';
-import { HlmDialogHeaderComponent } from './lib/hlm-dialog-header.component';
-import { HlmDialogOverlayDirective } from './lib/hlm-dialog-overlay.directive';
-import { HlmDialogTitleDirective } from './lib/hlm-dialog-title.directive';
-import { HlmDialogComponent } from './lib/hlm-dialog.component';
-
-export * from './lib/hlm-dialog-close.directive';
-export * from './lib/hlm-dialog-content.component';
-export * from './lib/hlm-dialog-description.directive';
-export * from './lib/hlm-dialog-footer.component';
-export * from './lib/hlm-dialog-header.component';
-export * from './lib/hlm-dialog-overlay.directive';
-export * from './lib/hlm-dialog-title.directive';
-export * from './lib/hlm-dialog.component';
-export * from './lib/hlm-dialog.service';
-
-export const HlmDialogImports = [
- HlmDialogComponent,
- HlmDialogCloseDirective,
- HlmDialogContentComponent,
- HlmDialogDescriptionDirective,
- HlmDialogFooterComponent,
- HlmDialogHeaderComponent,
- HlmDialogOverlayDirective,
- HlmDialogTitleDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmDialogImports],
- exports: [...HlmDialogImports],
-})
-export class HlmDialogModule {}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-close.directive.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-close.directive.ts
deleted file mode 100644
index 7ba493ca..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-close.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmDialogClose],[brnDialogClose][hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmDialogCloseDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- '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',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-content.component.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-content.component.ts
deleted file mode 100644
index 37107fdc..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-content.component.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { NgComponentOutlet } from '@angular/common';
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';
-import { lucideX } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnDialogCloseDirective, BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/ui-dialog-brain';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-import { HlmDialogCloseDirective } from './hlm-dialog-close.directive';
-
-@Component({
- selector: 'hlm-dialog-content',
- standalone: true,
- imports: [NgComponentOutlet, BrnDialogCloseDirective, HlmDialogCloseDirective, HlmIconComponent],
- providers: [provideIcons({ lucideX })],
- host: {
- '[class]': '_computedClass()',
- '[attr.data-state]': 'state()',
- },
- template: `
- @if (component) {
-
- } @else {
-
- }
-
-
- Close
-
-
- `,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
-})
-export class HlmDialogContentComponent {
- private readonly _dialogRef = inject(BrnDialogRef);
- private readonly _dialogContext = injectBrnDialogContext({ optional: true });
-
- public readonly state = computed(() => this._dialogRef?.state() ?? 'closed');
-
- public readonly component = this._dialogContext?.$component;
- private readonly _dynamicComponentClass = this._dialogContext?.$dynamicComponentClass;
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- 'border-border grid w-full max-w-lg relative gap-4 border bg-background p-6 shadow-lg [animation-duration:200] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] sm:rounded-lg md:w-full',
- this.userClass(),
- this._dynamicComponentClass,
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-description.directive.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-description.directive.ts
deleted file mode 100644
index 784ce18a..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-description.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnDialogDescriptionDirective } from '@spartan-ng/ui-dialog-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmDialogDescription]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnDialogDescriptionDirective],
-})
-export class HlmDialogDescriptionDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('text-sm text-muted-foreground', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-footer.component.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-footer.component.ts
deleted file mode 100644
index ba21d47f..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-footer.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-dialog-footer',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmDialogFooterComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-header.component.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-header.component.ts
deleted file mode 100644
index b784a102..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-header.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-dialog-header',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmDialogHeaderComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex flex-col space-y-1.5 text-center sm:text-left', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-overlay.directive.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-overlay.directive.ts
deleted file mode 100644
index c5d8e09b..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-overlay.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, effect, input } from '@angular/core';
-import { hlm, injectCustomClassSettable } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-export const hlmDialogOverlayClass =
- 'bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0';
-
-@Directive({
- selector: '[hlmDialogOverlay],brn-dialog-overlay[hlm]',
- standalone: true,
-})
-export class HlmDialogOverlayDirective {
- private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm(hlmDialogOverlayClass, this.userClass()));
-
- constructor() {
- effect(() => {
- this._classSettable?.setClassToCustomElement(this._computedClass());
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-title.directive.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-title.directive.ts
deleted file mode 100644
index 4e32adb4..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog-title.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnDialogTitleDirective } from '@spartan-ng/ui-dialog-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmDialogTitle]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnDialogTitleDirective],
-})
-export class HlmDialogTitleDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('text-lg font-semibold leading-none tracking-tight', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.component.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.component.ts
deleted file mode 100644
index 74e049c7..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, forwardRef } from '@angular/core';
-import { BrnDialogComponent, BrnDialogOverlayComponent } from '@spartan-ng/ui-dialog-brain';
-import { HlmDialogOverlayDirective } from './hlm-dialog-overlay.directive';
-
-@Component({
- selector: 'hlm-dialog',
- standalone: true,
- imports: [BrnDialogComponent, BrnDialogOverlayComponent, HlmDialogOverlayDirective],
- providers: [
- {
- provide: BrnDialogComponent,
- useExisting: forwardRef(() => HlmDialogComponent),
- },
- ],
- template: `
-
-
- `,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- exportAs: 'hlmDialog',
-})
-export class HlmDialogComponent extends BrnDialogComponent {
- constructor() {
- super();
- this.closeDelay = 100;
- }
-}
diff --git a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.service.ts b/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.service.ts
deleted file mode 100644
index 7eed6815..00000000
--- a/Client/src/spartan-components/ui-dialog-helm/src/lib/hlm-dialog.service.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import type { ComponentType } from '@angular/cdk/portal';
-import { Injectable, type TemplateRef, inject } from '@angular/core';
-import {
- type BrnDialogOptions,
- BrnDialogService,
- DEFAULT_BRN_DIALOG_OPTIONS,
- cssClassesToArray,
-} from '@spartan-ng/ui-dialog-brain';
-import { HlmDialogContentComponent } from './hlm-dialog-content.component';
-import { hlmDialogOverlayClass } from './hlm-dialog-overlay.directive';
-
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export type HlmDialogOptions = BrnDialogOptions & {
- contentClass?: string;
- context?: DialogContext;
-};
-
-@Injectable({
- providedIn: 'root',
-})
-export class HlmDialogService {
- private readonly _brnDialogService = inject(BrnDialogService);
-
- public open(component: ComponentType | TemplateRef, options?: Partial) {
- options = {
- ...DEFAULT_BRN_DIALOG_OPTIONS,
- closeDelay: 100,
- // eslint-disable-next-line
- ...(options ?? {}),
- backdropClass: cssClassesToArray(`${hlmDialogOverlayClass} ${options?.backdropClass ?? ''}`),
- context: { ...options?.context, $component: component, $dynamicComponentClass: options?.contentClass },
- };
-
- return this._brnDialogService.open(HlmDialogContentComponent, undefined, options.context, options);
- }
-}
diff --git a/Client/src/spartan-components/ui-formfield-helm/src/index.ts b/Client/src/spartan-components/ui-formfield-helm/src/index.ts
deleted file mode 100644
index 9c14fd5f..00000000
--- a/Client/src/spartan-components/ui-formfield-helm/src/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmErrorDirective } from './lib/hlm-error.directive';
-import { HlmFormFieldComponent } from './lib/hlm-form-field.component';
-import { HlmHintDirective } from './lib/hlm-hint.directive';
-
-export * from './lib/hlm-error.directive';
-export * from './lib/hlm-form-field.component';
-export * from './lib/hlm-hint.directive';
-
-@NgModule({
- imports: [HlmFormFieldComponent, HlmErrorDirective, HlmHintDirective],
- exports: [HlmFormFieldComponent, HlmErrorDirective, HlmHintDirective],
-})
-export class HlmFormFieldModule {}
diff --git a/Client/src/spartan-components/ui-formfield-helm/src/lib/form-field.spec.ts b/Client/src/spartan-components/ui-formfield-helm/src/lib/form-field.spec.ts
deleted file mode 100644
index a377bda2..00000000
--- a/Client/src/spartan-components/ui-formfield-helm/src/lib/form-field.spec.ts
+++ /dev/null
@@ -1,134 +0,0 @@
-import { Component } from '@angular/core';
-import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
-import { render, screen } from '@testing-library/angular';
-import userEvent from '@testing-library/user-event';
-
-import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
-
-import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@spartan-ng/ui-forms-brain';
-import { HlmErrorDirective } from './hlm-error.directive';
-import { HlmFormFieldComponent } from './hlm-form-field.component';
-import { HlmHintDirective } from './hlm-hint.directive';
-
-const DIRECTIVES = [HlmFormFieldComponent, HlmErrorDirective, HlmHintDirective, HlmInputDirective];
-
-@Component({
- standalone: true,
- selector: 'single-form-field-example',
- imports: [ReactiveFormsModule, ...DIRECTIVES],
- template: `
-
-
- Your name is required
- This is your public display name.
-
- `,
-})
-class SingleFormFieldMock {
- name = new FormControl('', Validators.required);
-}
-
-@Component({
- standalone: true,
- selector: 'single-form-field-dirty-example',
- imports: [ReactiveFormsModule, ...DIRECTIVES],
- template: `
-
-
- Your name is required
- This is your public display name.
-
- `,
- providers: [{ provide: ErrorStateMatcher, useClass: ShowOnDirtyErrorStateMatcher }],
-})
-class SingleFormFieldDirtyMock {
- name = new FormControl('', Validators.required);
-}
-
-describe('Hlm Form Field Component', () => {
- const TEXT_HINT = 'This is your public display name.';
- const TEXT_ERROR = 'Your name is required';
-
- const setupFormField = async () => {
- const { fixture } = await render(SingleFormFieldMock);
- return {
- user: userEvent.setup(),
- fixture,
- hint: screen.getByTestId('hlm-hint'),
- error: () => screen.queryByTestId('hlm-error'),
- trigger: screen.getByTestId('hlm-input'),
- };
- };
-
- const setupFormFieldWithErrorStateDirty = async () => {
- const { fixture } = await render(SingleFormFieldDirtyMock);
- return {
- user: userEvent.setup(),
- fixture,
- hint: screen.getByTestId('hlm-hint'),
- error: () => screen.queryByTestId('hlm-error'),
- trigger: screen.getByTestId('hlm-input'),
- };
- };
-
- describe('SingleFormField', () => {
- it('should show the hint if the errorState is false', async () => {
- const { hint } = await setupFormField();
-
- expect(hint.textContent).toBe(TEXT_HINT);
- });
-
- it('should show the error if the errorState is true', async () => {
- const { user, error, trigger } = await setupFormField();
-
- expect(error()).toBeNull();
-
- await user.click(trigger);
-
- await user.click(document.body);
-
- expect(screen.queryByTestId('hlm-hint')).toBeNull();
- expect(error()?.textContent?.trim()).toBe(TEXT_ERROR);
- });
- });
-
- describe('SingleFormFieldDirty', () => {
- it('should not display the error if the input does not have the dirty state due to the ErrorStateMatcher', async () => {
- const { error, user, trigger } = await setupFormFieldWithErrorStateDirty();
-
- await user.click(trigger);
-
- await user.click(document.body);
-
- expect(error()).toBeNull();
- });
-
- it('should display the error if the input has the dirty state due to the ErrorStateMatcher', async () => {
- const { error, user, trigger } = await setupFormFieldWithErrorStateDirty();
-
- await user.click(trigger);
- await user.type(trigger, 'a');
- await user.clear(trigger);
-
- await user.click(document.body);
-
- expect(error()?.textContent?.trim()).toBe(TEXT_ERROR);
- });
- });
-});
diff --git a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-error.directive.ts b/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-error.directive.ts
deleted file mode 100644
index b4a0acd7..00000000
--- a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-error.directive.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Directive } from '@angular/core';
-
-@Directive({
- standalone: true,
- selector: 'hlm-error',
- host: {
- class: 'block text-destructive text-sm font-medium',
- },
-})
-export class HlmErrorDirective {}
diff --git a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-form-field.component.ts b/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-form-field.component.ts
deleted file mode 100644
index d7531c7b..00000000
--- a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-form-field.component.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Component, type Signal, computed, contentChild, contentChildren, effect } from '@angular/core';
-
-import { BrnFormFieldControl } from '@spartan-ng/ui-formfield-brain';
-import { HlmErrorDirective } from './hlm-error.directive';
-
-@Component({
- selector: 'hlm-form-field',
- template: `
-
-
- @switch (hasDisplayedMessage()) {
- @case ('error') {
-
- }
- @default {
-
- }
- }
- `,
- standalone: true,
- host: {
- class: 'space-y-2 block',
- },
-})
-export class HlmFormFieldComponent {
- control = contentChild(BrnFormFieldControl);
-
- errorChildren = contentChildren(HlmErrorDirective);
-
- hasDisplayedMessage: Signal<'error' | 'hint'> = computed(() => {
- return this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint';
- });
-
- constructor() {
- effect(() => {
- if (!this.control()) {
- throw new Error('hlm-form-field must contain a BrnFormFieldControl.');
- }
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-hint.directive.ts b/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-hint.directive.ts
deleted file mode 100644
index 66befb15..00000000
--- a/Client/src/spartan-components/ui-formfield-helm/src/lib/hlm-hint.directive.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Directive } from '@angular/core';
-
-@Directive({
- selector: 'hlm-hint',
- standalone: true,
- host: {
- class: 'block text-sm text-muted-foreground',
- },
-})
-export class HlmHintDirective {}
diff --git a/Client/src/spartan-components/ui-hovercard-helm/src/index.ts b/Client/src/spartan-components/ui-hovercard-helm/src/index.ts
deleted file mode 100644
index 75ad3b0d..00000000
--- a/Client/src/spartan-components/ui-hovercard-helm/src/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmHoverCardContentComponent } from './lib/hlm-hover-card-content.component';
-
-export { HlmHoverCardContentComponent } from './lib/hlm-hover-card-content.component';
-
-export const HlmHoverCardImports = [HlmHoverCardContentComponent] as const;
-
-@NgModule({
- imports: [...HlmHoverCardImports],
- exports: [...HlmHoverCardImports],
-})
-export class HlmHoverCardModule {}
diff --git a/Client/src/spartan-components/ui-hovercard-helm/src/lib/hlm-hover-card-content.component.ts b/Client/src/spartan-components/ui-hovercard-helm/src/lib/hlm-hover-card-content.component.ts
deleted file mode 100644
index 8681e8c4..00000000
--- a/Client/src/spartan-components/ui-hovercard-helm/src/lib/hlm-hover-card-content.component.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Component, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
-import { hlm, injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-hover-card-content',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- template: `
-
- `,
-})
-export class HlmHoverCardContentComponent {
- private readonly _renderer = inject(Renderer2);
- private readonly _element = inject(ElementRef);
-
- public readonly state = injectExposesStateProvider({ host: true }).state ?? signal('closed').asReadonly();
- public readonly side = injectExposedSideProvider({ host: true }).side ?? signal('bottom').asReadonly();
-
- constructor() {
- effect(() => {
- this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
- this._renderer.setAttribute(this._element.nativeElement, 'data-side', this.side());
- });
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- 'z-50 w-64 rounded-md border border-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',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-icon-helm/src/index.ts b/Client/src/spartan-components/ui-icon-helm/src/index.ts
deleted file mode 100644
index 9f814c4f..00000000
--- a/Client/src/spartan-components/ui-icon-helm/src/index.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { NgModule } from '@angular/core';
-import { provideIcons as provideIconsImport } from '@ng-icons/core';
-import { HlmIconComponent } from './lib/hlm-icon.component';
-
-export * from './lib/hlm-icon.component';
-
-export const provideIcons = provideIconsImport;
-
-@NgModule({
- imports: [HlmIconComponent],
- exports: [HlmIconComponent],
-})
-export class HlmIconModule {}
diff --git a/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.spec.ts b/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.spec.ts
deleted file mode 100644
index 9bfe6c6e..00000000
--- a/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.spec.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
-import { By } from '@angular/platform-browser';
-import { NgIconComponent, provideIcons } from '@ng-icons/core';
-import { lucideCheck } from '@ng-icons/lucide';
-import { type RenderResult, render } from '@testing-library/angular';
-import { HlmIconComponent } from './hlm-icon.component';
-
-@Component({
- selector: 'hlm-mock',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- imports: [HlmIconComponent],
- providers: [provideIcons({ lucideCheck })],
- template: `
-
- `,
-})
-class HlmMockComponent {
- @Input() size = 'base';
-}
-
-describe('HlmIconComponent', () => {
- let r: RenderResult;
-
- beforeEach(async () => {
- r = await render(HlmMockComponent);
- });
-
- it('should create', () => {
- expect(r).toBeTruthy();
- });
-
- it('should render the icon', () => {
- expect(r.container.querySelector('svg')).toBeTruthy();
- });
-
- it('should pass the size, color and strokeWidth props and the classes to the ng-icon component', () => {
- const debugEl = r.fixture.debugElement.query(By.directive(NgIconComponent));
- const component = debugEl.componentInstance as NgIconComponent;
- expect(component.color).toBe('red');
- expect(component.strokeWidth).toBe('2');
- expect(component.size).toBe('100%');
- expect(debugEl.nativeElement.classList).toContain('test2');
- });
-
- it('should add the appropriate size variant class', () => {
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('h-6');
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('w-6');
- });
-
- it('should compose the user classes', () => {
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('inline-flex');
- expect(r.container.querySelector('hlm-icon')?.classList).toContain('test');
- });
-
- it('should forward the size property if the size is not a pre-defined size', async () => {
- await r.rerender({ componentInputs: { size: '2rem' } });
- r.fixture.detectChanges();
- const debugEl = r.fixture.debugElement.query(By.directive(NgIconComponent));
- expect(debugEl.componentInstance.size).toBe('2rem');
- expect(r.container.querySelector('hlm-icon')?.classList).not.toContain('h-6');
- expect(r.container.querySelector('hlm-icon')?.classList).not.toContain('w-6');
- });
-});
diff --git a/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.ts b/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.ts
deleted file mode 100644
index 69ac5d97..00000000
--- a/Client/src/spartan-components/ui-icon-helm/src/lib/hlm-icon.component.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-import { isPlatformBrowser } from '@angular/common';
-import {
- ChangeDetectionStrategy,
- Component,
- ElementRef,
- Input,
- type OnDestroy,
- PLATFORM_ID,
- ViewEncapsulation,
- computed,
- inject,
- signal,
-} from '@angular/core';
-import { type IconName, NgIconComponent } from '@ng-icons/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-const DEFINED_SIZES = ['xs', 'sm', 'base', 'lg', 'xl', 'none'] as const;
-
-type DefinedSizes = (typeof DEFINED_SIZES)[number];
-
-export const iconVariants = cva('inline-flex', {
- variants: {
- variant: {
- xs: 'h-3 w-3',
- sm: 'h-4 w-4',
- base: 'h-6 w-6',
- lg: 'h-8 w-8',
- xl: 'h-12 w-12',
- none: '',
- } satisfies Record,
- },
- defaultVariants: {
- variant: 'base',
- },
-});
-
-// eslint-disable-next-line @typescript-eslint/ban-types
-export type IconSize = DefinedSizes | (Record & string);
-
-const isDefinedSize = (size: IconSize): size is DefinedSizes => {
- return DEFINED_SIZES.includes(size as DefinedSizes);
-};
-
-const TAILWIND_H_W_PATTERN = /\b(h-\d+|w-\d+)\b/g;
-
-@Component({
- selector: 'hlm-icon',
- standalone: true,
- imports: [NgIconComponent],
- encapsulation: ViewEncapsulation.None,
- changeDetection: ChangeDetectionStrategy.OnPush,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmIconComponent implements OnDestroy {
- private readonly _host = inject(ElementRef);
- private readonly _platformId = inject(PLATFORM_ID);
-
- private _mutObs?: MutationObserver;
-
- private readonly _hostClasses = signal('');
-
- protected readonly _name = signal('');
- protected readonly _size = signal('base');
- protected readonly _color = signal(undefined);
- protected readonly _strokeWidth = signal(undefined);
- protected readonly userCls = signal('');
- protected readonly ngIconSize = computed(() => (isDefinedSize(this._size()) ? '100%' : (this._size() as string)));
- protected readonly ngIconCls = signal('');
-
- protected readonly _computedClass = computed(() => {
- const size: IconSize = this._size();
- const hostClasses = this._hostClasses();
- const userCls = this.userCls();
- const variant = isDefinedSize(size) ? size : 'none';
- const classes = variant === 'none' && size === 'none' ? hostClasses : hostClasses.replace(TAILWIND_H_W_PATTERN, '');
- return hlm(iconVariants({ variant }), userCls, classes);
- });
-
- constructor() {
- if (isPlatformBrowser(this._platformId)) {
- this._mutObs = new MutationObserver((mutations: MutationRecord[]) => {
- mutations.forEach((mutation: MutationRecord) => {
- if (mutation.attributeName !== 'class') return;
- this._hostClasses.set((mutation.target as Node & { className?: string })?.className ?? '');
- });
- });
- this._mutObs.observe(this._host.nativeElement, {
- attributes: true,
- });
- }
- }
-
- ngOnDestroy() {
- this._mutObs?.disconnect();
- this._mutObs = undefined;
- }
-
- @Input()
- set name(value: IconName | string) {
- this._name.set(value);
- }
-
- @Input()
- set size(value: IconSize) {
- this._size.set(value);
- }
-
- @Input()
- set color(value: string | undefined) {
- this._color.set(value);
- }
-
- @Input()
- set strokeWidth(value: string | number | undefined) {
- this._strokeWidth.set(value);
- }
-
- @Input()
- set ngIconClass(cls: ClassValue) {
- this.ngIconCls.set(cls);
- }
-
- @Input()
- set class(cls: ClassValue) {
- this.userCls.set(cls);
- }
-}
diff --git a/Client/src/spartan-components/ui-input-helm/src/index.ts b/Client/src/spartan-components/ui-input-helm/src/index.ts
deleted file mode 100644
index 3bf4bec1..00000000
--- a/Client/src/spartan-components/ui-input-helm/src/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmInputErrorDirective } from './lib/hlm-input-error.directive';
-import { HlmInputDirective } from './lib/hlm-input.directive';
-
-export * from './lib/hlm-input-error.directive';
-export * from './lib/hlm-input.directive';
-
-@NgModule({
- imports: [HlmInputDirective, HlmInputErrorDirective],
- exports: [HlmInputDirective, HlmInputErrorDirective],
-})
-export class HlmInputModule {}
diff --git a/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input-error.directive.ts b/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input-error.directive.ts
deleted file mode 100644
index b643579b..00000000
--- a/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input-error.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const inputErrorVariants = cva('text-destructive text-sm font-medium', {
- variants: {},
- defaultVariants: {},
-});
-export type InputErrorVariants = VariantProps;
-
-@Directive({
- selector: '[hlmInputError]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmInputErrorDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(inputErrorVariants(), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input.directive.ts b/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input.directive.ts
deleted file mode 100644
index 1cc585be..00000000
--- a/Client/src/spartan-components/ui-input-helm/src/lib/hlm-input.directive.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { Directive, type DoCheck, Injector, Input, computed, effect, inject, input, signal } from '@angular/core';
-import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnFormFieldControl } from '@spartan-ng/ui-formfield-brain';
-import { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/ui-forms-brain';
-
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const inputVariants = cva(
- 'flex rounded-md border font-normal border-input bg-transparent text-sm ring-offset-background file:border-0 file:text-foreground file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
- {
- variants: {
- size: {
- default: 'h-10 py-2 px-4',
- sm: 'h-9 px-3',
- lg: 'h-11 px-8'
- },
- error: {
- auto: '[&.ng-invalid.ng-touched]:text-destructive [&.ng-invalid.ng-touched]:border-destructive [&.ng-invalid.ng-touched]:focus-visible:ring-destructive',
- true: 'text-destructive border-destructive focus-visible:ring-destructive'
- }
- },
- defaultVariants: {
- size: 'default',
- error: 'auto'
- }
- }
-);
-type InputVariants = VariantProps;
-
-@Directive({
- selector: '[hlmInput]',
- standalone: true,
- host: {
- '[class]': '_computedClass()'
- },
- providers: [
- {
- provide: BrnFormFieldControl,
- useExisting: HlmInputDirective
- }
- ]
-})
-export class HlmInputDirective implements BrnFormFieldControl, DoCheck {
- private readonly _size = signal('default');
- @Input()
- set size(value: InputVariants['size']) {
- this._size.set(value);
- }
-
- private readonly _error = signal('auto');
- @Input()
- set error(value: InputVariants['error']) {
- this._error.set(value);
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(inputVariants({ size: this._size(), error: this._error() }), this.userClass()));
-
- private injector = inject(Injector);
-
- ngControl: NgControl | null = this.injector.get(NgControl, null);
-
- errorStateTracker: ErrorStateTracker;
-
- private defaultErrorStateMatcher = inject(ErrorStateMatcher);
- private parentForm = inject(NgForm, { optional: true });
- private parentFormGroup = inject(FormGroupDirective, { optional: true });
-
- errorState = computed(() => this.errorStateTracker.errorState());
-
- constructor() {
- this.errorStateTracker = new ErrorStateTracker(this.defaultErrorStateMatcher, this.ngControl, this.parentFormGroup, this.parentForm);
-
- effect(() => {
- if (this.ngControl) {
- this.error = this.errorStateTracker.errorState();
- }
- });
- }
-
- ngDoCheck() {
- this.errorStateTracker.updateErrorState();
- }
-}
diff --git a/Client/src/spartan-components/ui-label-helm/src/index.ts b/Client/src/spartan-components/ui-label-helm/src/index.ts
deleted file mode 100644
index a5506be0..00000000
--- a/Client/src/spartan-components/ui-label-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmLabelDirective } from './lib/hlm-label.directive';
-
-export * from './lib/hlm-label.directive';
-
-@NgModule({
- imports: [HlmLabelDirective],
- exports: [HlmLabelDirective],
-})
-export class HlmLabelModule {}
diff --git a/Client/src/spartan-components/ui-label-helm/src/lib/hlm-label.directive.ts b/Client/src/spartan-components/ui-label-helm/src/lib/hlm-label.directive.ts
deleted file mode 100644
index 94d751d4..00000000
--- a/Client/src/spartan-components/ui-label-helm/src/lib/hlm-label.directive.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { Directive, Input, computed, inject, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnLabelDirective } from '@spartan-ng/ui-label-brain';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const labelVariants = cva(
- 'text-sm font-medium leading-none [&>[hlmInput]]:my-1 [&:has([hlmInput]:disabled)]:cursor-not-allowed [&:has([hlmInput]:disabled)]:opacity-70',
- {
- variants: {
- variant: {
- default: '',
- },
- error: {
- auto: '[&:has([hlmInput].ng-invalid.ng-touched)]:text-destructive',
- true: 'text-destructive',
- },
- disabled: {
- auto: '[&:has([hlmInput]:disabled)]:opacity-70',
- true: 'opacity-70',
- false: '',
- },
- },
- defaultVariants: {
- variant: 'default',
- error: 'auto',
- },
- },
-);
-export type LabelVariants = VariantProps;
-
-@Directive({
- selector: '[hlmLabel]',
- standalone: true,
- hostDirectives: [
- {
- directive: BrnLabelDirective,
- inputs: ['id'],
- },
- ],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmLabelDirective {
- private readonly _brn = inject(BrnLabelDirective, { host: true });
-
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- labelVariants({
- variant: this._variant(),
- error: this._error(),
- disabled: this._brn?.dataDisabled() ?? 'auto',
- }),
- '[&.ng-invalid.ng-touched]:text-destructive',
- this.userClass(),
- ),
- );
-
- private readonly _variant = signal('default');
- @Input()
- set variant(value: LabelVariants['variant']) {
- this._variant.set(value);
- }
-
- private readonly _error = signal('auto');
- @Input()
- set error(value: LabelVariants['error']) {
- this._error.set(value);
- }
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/index.ts b/Client/src/spartan-components/ui-menu-helm/src/index.ts
deleted file mode 100644
index cd94bf71..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/index.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmMenuBarItemDirective } from './lib/hlm-menu-bar-item.directive';
-import { HlmMenuBarComponent } from './lib/hlm-menu-bar.component';
-import { HlmMenuGroupComponent } from './lib/hlm-menu-group.component';
-import { HlmMenuItemCheckComponent } from './lib/hlm-menu-item-check.component';
-import { HlmMenuItemCheckboxDirective } from './lib/hlm-menu-item-checkbox.directive';
-import { HlmMenuItemIconDirective } from './lib/hlm-menu-item-icon.directive';
-import { HlmMenuItemRadioComponent } from './lib/hlm-menu-item-radio.component';
-import { HlmMenuItemRadioDirective } from './lib/hlm-menu-item-radio.directive';
-import { HlmMenuItemSubIndicatorComponent } from './lib/hlm-menu-item-sub-indicator.component';
-import { HlmMenuItemDirective } from './lib/hlm-menu-item.directive';
-import { HlmMenuLabelComponent } from './lib/hlm-menu-label.component';
-import { HlmMenuSeparatorComponent } from './lib/hlm-menu-separator.component';
-import { HlmMenuShortcutComponent } from './lib/hlm-menu-shortcut.component';
-import { HlmMenuComponent } from './lib/hlm-menu.component';
-import { HlmSubMenuComponent } from './lib/hlm-sub-menu.component';
-
-export * from './lib/hlm-menu-bar-item.directive';
-export * from './lib/hlm-menu-bar.component';
-export * from './lib/hlm-menu-group.component';
-export * from './lib/hlm-menu-item-check.component';
-export * from './lib/hlm-menu-item-checkbox.directive';
-export * from './lib/hlm-menu-item-icon.directive';
-export * from './lib/hlm-menu-item-radio.component';
-export * from './lib/hlm-menu-item-radio.directive';
-export * from './lib/hlm-menu-item-sub-indicator.component';
-export * from './lib/hlm-menu-item.directive';
-export * from './lib/hlm-menu-label.component';
-export * from './lib/hlm-menu-separator.component';
-export * from './lib/hlm-menu-shortcut.component';
-export * from './lib/hlm-menu.component';
-export * from './lib/hlm-sub-menu.component';
-
-export const HlmMenuItemImports = [
- HlmMenuItemDirective,
- HlmMenuItemIconDirective,
- HlmMenuGroupComponent,
- HlmMenuItemSubIndicatorComponent,
- HlmMenuItemRadioComponent,
- HlmMenuItemCheckComponent,
- HlmMenuShortcutComponent,
- HlmMenuItemCheckboxDirective,
- HlmMenuItemRadioDirective,
-];
-export const HlmMenuStructureImports = [HlmMenuLabelComponent, HlmMenuSeparatorComponent] as const;
-export const HlmMenuImports = [
- ...HlmMenuItemImports,
- ...HlmMenuStructureImports,
- HlmMenuComponent,
- HlmSubMenuComponent,
-] as const;
-export const HlmMenuBarImports = [...HlmMenuImports, HlmMenuBarComponent, HlmMenuBarItemDirective] as const;
-
-@NgModule({
- imports: [...HlmMenuItemImports],
- exports: [...HlmMenuItemImports],
-})
-export class HlmMenuItemModule {}
-
-@NgModule({
- imports: [...HlmMenuImports],
- exports: [...HlmMenuImports],
-})
-export class HlmMenuModule {}
-
-@NgModule({
- imports: [...HlmMenuBarImports],
- exports: [...HlmMenuBarImports],
-})
-export class HlmMenuBarModule {}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar-item.directive.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar-item.directive.ts
deleted file mode 100644
index 1ffd1afb..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar-item.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuItemDirective } from '@spartan-ng/ui-menu-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmMenuBarItem]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnMenuItemDirective],
-})
-export class HlmMenuBarItemDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar.component.ts
deleted file mode 100644
index c08238a3..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-bar.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuBarDirective } from '@spartan-ng/ui-menu-brain';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-bar',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnMenuBarDirective],
- template: ' ',
-})
-export class HlmMenuBarComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('border-border flex h-10 items-center space-x-1 rounded-md border bg-background p-1', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-group.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-group.component.ts
deleted file mode 100644
index aaaad32e..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-group.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component } from '@angular/core';
-import { BrnMenuGroupDirective } from '@spartan-ng/ui-menu-brain';
-
-@Component({
- selector: 'hlm-menu-group',
- standalone: true,
- host: {
- class: 'block',
- },
- hostDirectives: [BrnMenuGroupDirective],
- template: `
-
- `,
-})
-export class HlmMenuGroupComponent {}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-check.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-check.component.ts
deleted file mode 100644
index 13172258..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-check.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideCheck } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-item-check',
- standalone: true,
- providers: [provideIcons({ lucideCheck })],
- imports: [HlmIconComponent],
- template: `
-
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuItemCheckComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'group-[.checked]:opacity-100 opacity-0 absolute left-2 flex h-3.5 w-3.5 items-center justify-center',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-checkbox.directive.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-checkbox.directive.ts
deleted file mode 100644
index 13ea5d9a..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-checkbox.directive.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuItemCheckboxDirective } from '@spartan-ng/ui-menu-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmMenuItemCheckbox]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [
- {
- directive: BrnMenuItemCheckboxDirective,
- inputs: ['disabled: disabled', 'checked: checked'],
- outputs: ['triggered: triggered'],
- },
- ],
-})
-export class HlmMenuItemCheckboxDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'group w-full relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-icon.directive.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-icon.directive.ts
deleted file mode 100644
index 4d1793cd..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-icon.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmMenuIcon]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuItemIconDirective {
- private _menuIcon = inject(HlmIconComponent, { host: true, optional: true });
-
- constructor() {
- if (!this._menuIcon) return;
- this._menuIcon.size = 'none';
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('mr-2 h-4 w-4', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.component.ts
deleted file mode 100644
index 0acf64ed..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideCircle } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-item-radio',
- standalone: true,
- providers: [provideIcons({ lucideCircle })],
- imports: [HlmIconComponent],
- template: `
-
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuItemRadioComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'group-[.checked]:opacity-100 opacity-0 absolute left-2 flex h-3.5 w-3.5 items-center justify-center',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.directive.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.directive.ts
deleted file mode 100644
index 88166e01..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-radio.directive.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuItemRadioDirective } from '@spartan-ng/ui-menu-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmMenuItemRadio]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [
- {
- directive: BrnMenuItemRadioDirective,
- inputs: ['disabled: disabled', 'checked: checked'],
- outputs: ['triggered: triggered'],
- },
- ],
-})
-export class HlmMenuItemRadioDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'group w-full relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-sub-indicator.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-sub-indicator.component.ts
deleted file mode 100644
index 7c129a18..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item-sub-indicator.component.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideChevronRight } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-item-sub-indicator',
- standalone: true,
- providers: [provideIcons({ lucideChevronRight })],
- imports: [HlmIconComponent],
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuItemSubIndicatorComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('inline-block ml-auto h-4 w-4', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item.directive.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item.directive.ts
deleted file mode 100644
index 600ed539..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-item.directive.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Directive, Input, booleanAttribute, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuItemDirective } from '@spartan-ng/ui-menu-brain';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const hlmMenuItemVariants = cva(
- 'group w-full relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50',
- {
- variants: { inset: { true: 'pl-8', false: '' } },
- defaultVariants: { inset: false },
- },
-);
-export type HlmMenuItemVariants = VariantProps;
-
-@Directive({
- selector: '[hlmMenuItem]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [
- {
- directive: BrnMenuItemDirective,
- inputs: ['disabled: disabled'],
- outputs: ['triggered: triggered'],
- },
- ],
-})
-export class HlmMenuItemDirective {
- private readonly _inset = signal(false);
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(hlmMenuItemVariants({ inset: this._inset() }), this.userClass()));
-
- @Input({ transform: booleanAttribute })
- set inset(value: boolean) {
- this._inset.set(value);
- }
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-label.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-label.component.ts
deleted file mode 100644
index cc9d82f5..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-label.component.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Component, Input, booleanAttribute, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-label',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuLabelComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('block px-2 py-1.5 text-sm font-semibold', this._inset() && 'pl-8', this.userClass()),
- );
-
- private readonly _inset = signal(false);
- @Input({ transform: booleanAttribute })
- set inset(value: boolean) {
- this._inset.set(value);
- }
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-separator.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-separator.component.ts
deleted file mode 100644
index 44e41b09..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-separator.component.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-separator',
- standalone: true,
- template: '',
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuSeparatorComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('block -mx-1 my-1 h-px bg-muted', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-shortcut.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-shortcut.component.ts
deleted file mode 100644
index e7998707..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu-shortcut.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-menu-shortcut',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmMenuShortcutComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('ml-auto font-light text-xs tracking-widest opacity-60', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu.component.ts
deleted file mode 100644
index 298d301e..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-menu.component.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { Component, Input, computed, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuDirective } from '@spartan-ng/ui-menu-brain';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const menuVariants = cva(
- 'block border-border min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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',
- {
- variants: {
- variant: {
- default: 'my-0.5',
- menubar: 'my-2',
- },
- },
- defaultVariants: {
- variant: 'default',
- },
- },
-);
-type MenuVariants = VariantProps;
-
-@Component({
- selector: 'hlm-menu',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnMenuDirective],
- template: `
-
- `,
-})
-export class HlmMenuComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(menuVariants({ variant: this._variant() }), this.userClass()));
-
- private readonly _variant = signal('default');
- @Input()
- set variant(value: MenuVariants['variant']) {
- this._variant.set(value);
- }
-}
diff --git a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-sub-menu.component.ts b/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-sub-menu.component.ts
deleted file mode 100644
index 40b30d24..00000000
--- a/Client/src/spartan-components/ui-menu-helm/src/lib/hlm-sub-menu.component.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnMenuDirective } from '@spartan-ng/ui-menu-brain';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-sub-menu',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnMenuDirective],
- template: `
-
- `,
-})
-export class HlmSubMenuComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'border-border min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/index.ts b/Client/src/spartan-components/ui-pagination-helm/src/index.ts
deleted file mode 100644
index b5f3bf74..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmPaginationContentDirective } from './lib/hlm-pagination-content.directive';
-import { HlmPaginationEllipsisComponent } from './lib/hlm-pagination-ellipsis.component';
-import { HlmPaginationItemDirective } from './lib/hlm-pagination-item.directive';
-import { HlmPaginationLinkDirective } from './lib/hlm-pagination-link.directive';
-import { HlmPaginationNextComponent } from './lib/hlm-pagination-next.component';
-import { HlmPaginationPreviousComponent } from './lib/hlm-pagination-previous.component';
-import { HlmPaginationDirective } from './lib/hlm-pagination.directive';
-
-export * from './lib/hlm-pagination-content.directive';
-export * from './lib/hlm-pagination-ellipsis.component';
-export * from './lib/hlm-pagination-item.directive';
-export * from './lib/hlm-pagination-link.directive';
-export * from './lib/hlm-pagination-next.component';
-export * from './lib/hlm-pagination-previous.component';
-export * from './lib/hlm-pagination.directive';
-
-export const HlmPaginationImports = [
- HlmPaginationDirective,
- HlmPaginationContentDirective,
- HlmPaginationItemDirective,
- HlmPaginationLinkDirective,
- HlmPaginationPreviousComponent,
- HlmPaginationNextComponent,
- HlmPaginationEllipsisComponent,
-] as const;
-
-@NgModule({
- imports: [...HlmPaginationImports],
- exports: [...HlmPaginationImports],
-})
-export class HlmPaginationModule {}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-content.directive.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-content.directive.ts
deleted file mode 100644
index a5d615ba..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-content.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-
-export const paginationContentVariants = cva('flex flex-row items-center gap-1', {
- variants: {},
- defaultVariants: {},
-});
-export type PaginationContentVariants = VariantProps;
-
-@Directive({
- selector: '[hlmPaginationContent]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmPaginationContentDirective {
- public readonly class = input('');
- protected readonly _computedClass = computed(() => hlm(paginationContentVariants(), this.class()));
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-ellipsis.component.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-ellipsis.component.ts
deleted file mode 100644
index cec82fd3..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-ellipsis.component.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideMoreHorizontal } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import { HlmPaginationLinkDirective } from './hlm-pagination-link.directive';
-
-@Component({
- selector: 'hlm-pagination-ellipsis',
- standalone: true,
- imports: [HlmPaginationLinkDirective, HlmIconComponent],
- providers: [provideIcons({ lucideMoreHorizontal })],
- template: `
-
-
- More pages
-
- `,
-})
-export class HlmPaginationEllipsisComponent {
- public readonly class = input('');
-
- protected _computedClass = computed(() => hlm('flex h-9 w-9 items-center justify-center', this.class()));
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-item.directive.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-item.directive.ts
deleted file mode 100644
index 7956b84a..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-item.directive.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-
-export const paginationItemVariants = cva('', {
- variants: {},
- defaultVariants: {},
-});
-export type PaginationItemVariants = VariantProps;
-
-@Directive({
- selector: '[hlmPaginationItem]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmPaginationItemDirective {
- public readonly class = input('');
-
- protected _computedClass = computed(() => hlm(paginationItemVariants(), this.class()));
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-link.directive.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-link.directive.ts
deleted file mode 100644
index b3929dde..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-link.directive.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Directive, booleanAttribute, computed, input } from '@angular/core';
-import { RouterLink } from '@angular/router';
-import { type ButtonVariants, buttonVariants } from '@spartan-ng/ui-button-helm';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-
-export const paginationLinkVariants = cva('', {
- variants: {},
- defaultVariants: {},
-});
-export type PaginationLinkVariants = VariantProps;
-
-@Directive({
- selector: '[hlmPaginationLink]',
- standalone: true,
- hostDirectives: [
- {
- directive: RouterLink,
- inputs: [
- 'target',
- 'queryParams',
- 'fragment',
- 'queryParamsHandling',
- 'state',
- 'info',
- 'relativeTo',
- 'preserveFragment',
- 'skipLocationChange',
- 'replaceUrl',
- 'routerLink: link',
- ],
- },
- ],
- host: {
- '[class]': '_computedClass()',
- '[attr.aria-current]': 'isActive() ? "page" : null',
- },
-})
-export class HlmPaginationLinkDirective {
- public readonly class = input('');
- public readonly isActive = input(false, { transform: booleanAttribute });
- public readonly size = input('icon');
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- public readonly link = input();
-
- protected _computedClass = computed(() =>
- hlm(
- paginationLinkVariants(),
- buttonVariants({
- variant: this.isActive() ? 'outline' : 'ghost',
- size: this.size(),
- }),
- this.class(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-next.component.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-next.component.ts
deleted file mode 100644
index 567b6371..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-next.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideChevronRight } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import { HlmPaginationLinkDirective } from './hlm-pagination-link.directive';
-
-@Component({
- selector: 'hlm-pagination-next',
- standalone: true,
- imports: [HlmPaginationLinkDirective, HlmIconComponent],
- providers: [provideIcons({ lucideChevronRight })],
- template: `
-
- Next
-
-
- `,
-})
-export class HlmPaginationNextComponent {
- public readonly class = input('');
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- public readonly link = input();
-
- protected _computedClass = computed(() => hlm('gap-1 pr-2.5', this.class()));
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-previous.component.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-previous.component.ts
deleted file mode 100644
index 953687bb..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination-previous.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { lucideChevronLeft } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import { HlmPaginationLinkDirective } from './hlm-pagination-link.directive';
-
-@Component({
- selector: 'hlm-pagination-previous',
- standalone: true,
- imports: [HlmPaginationLinkDirective, HlmIconComponent],
- providers: [provideIcons({ lucideChevronLeft })],
- template: `
-
-
- Previous
-
- `,
-})
-export class HlmPaginationPreviousComponent {
- public readonly class = input('');
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- public readonly link = input();
-
- protected _computedClass = computed(() => hlm('gap-1 pr-2.5', this.class()));
-}
diff --git a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination.directive.ts b/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination.directive.ts
deleted file mode 100644
index daf10e94..00000000
--- a/Client/src/spartan-components/ui-pagination-helm/src/lib/hlm-pagination.directive.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const paginationVariants = cva('mx-auto flex w-full justify-center', {
- variants: {},
- defaultVariants: {},
-});
-export type PaginationVariants = VariantProps;
-
-@Directive({
- selector: '[hlmPagination]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[attr.role]': '"navigation"',
- '[attr.aria-label]': '"pagination"',
- },
-})
-export class HlmPaginationDirective {
- public readonly class = input('');
-
- protected _computedClass = computed(() => hlm(paginationVariants(), this.class()));
-}
diff --git a/Client/src/spartan-components/ui-popover-helm/src/index.ts b/Client/src/spartan-components/ui-popover-helm/src/index.ts
deleted file mode 100644
index 7af7813d..00000000
--- a/Client/src/spartan-components/ui-popover-helm/src/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmPopoverCloseDirective } from './lib/hlm-popover-close.directive';
-import { HlmPopoverContentDirective } from './lib/hlm-popover-content.directive';
-
-export * from './lib/hlm-popover-close.directive';
-export * from './lib/hlm-popover-content.directive';
-
-export const HlmPopoverImports = [HlmPopoverContentDirective, HlmPopoverCloseDirective] as const;
-
-@NgModule({
- imports: [...HlmPopoverImports],
- exports: [...HlmPopoverImports],
-})
-export class HlmPopoverModule {}
diff --git a/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-close.directive.ts b/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-close.directive.ts
deleted file mode 100644
index 5ae4aa3d..00000000
--- a/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-close.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmPopoverClose],[brnPopoverClose][hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmPopoverCloseDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- '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',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-content.directive.ts b/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-content.directive.ts
deleted file mode 100644
index eeeb10ee..00000000
--- a/Client/src/spartan-components/ui-popover-helm/src/lib/hlm-popover-content.directive.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
-import { hlm, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmPopoverContent],[brnPopoverContent][hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmPopoverContentDirective {
- private _stateProvider = injectExposesStateProvider({ host: true });
- public state = this._stateProvider.state ?? signal('closed');
- private _renderer = inject(Renderer2);
- private _element = inject(ElementRef);
-
- constructor() {
- effect(() => {
- this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
- });
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- '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',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-progress-helm/src/index.ts b/Client/src/spartan-components/ui-progress-helm/src/index.ts
deleted file mode 100644
index edd3d027..00000000
--- a/Client/src/spartan-components/ui-progress-helm/src/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmProgressIndicatorDirective } from './lib/hlm-progress-indicator.directive';
-import { HlmProgressDirective } from './lib/hlm-progress.directive';
-
-export * from './lib/hlm-progress-indicator.directive';
-export * from './lib/hlm-progress.directive';
-
-export const HlmProgressImports = [HlmProgressDirective, HlmProgressIndicatorDirective] as const;
-
-@NgModule({
- imports: [...HlmProgressImports],
- exports: [...HlmProgressImports],
-})
-export class HlmProgressModule {}
diff --git a/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress-indicator.directive.ts b/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress-indicator.directive.ts
deleted file mode 100644
index f5174e6f..00000000
--- a/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress-indicator.directive.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Directive, type DoCheck, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmProgressIndicator],brn-progress-indicator[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmProgressIndicatorDirective implements DoCheck {
- private _element = inject(ElementRef);
- private _renderer = inject(Renderer2);
- private readonly _value = signal(0);
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('inline-flex transform-gpu h-full w-full flex-1 bg-primary transition-all', this.userClass()),
- );
-
- constructor() {
- effect(() => {
- // using renderer directly as hostbinding is one change detection cycle behind
- const currentValue = this._value();
- this._renderer.setStyle(this._element.nativeElement, 'transform', `translateX(-${100 - (currentValue || 100)}%)`);
- if (!currentValue) {
- this._renderer.addClass(this._element.nativeElement, 'animate-indeterminate');
- } else {
- this._renderer.removeClass(this._element.nativeElement, 'animate-indeterminate');
- }
- });
- }
-
- ngDoCheck(): void {
- this._value.set(this._element.nativeElement.getAttribute('data-value'));
- }
-}
diff --git a/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress.directive.ts b/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress.directive.ts
deleted file mode 100644
index f58ae913..00000000
--- a/Client/src/spartan-components/ui-progress-helm/src/lib/hlm-progress.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmProgress],brn-progress[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmProgressDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('inline-flex relative h-4 w-full overflow-hidden rounded-full bg-secondary', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-radiogroup-helm/src/index.ts b/Client/src/spartan-components/ui-radiogroup-helm/src/index.ts
deleted file mode 100644
index 1deea33c..00000000
--- a/Client/src/spartan-components/ui-radiogroup-helm/src/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmRadioGroupDirective } from './lib/hlm-radio-group.directive';
-import { HlmRadioIndicatorComponent } from './lib/hlm-radio-indicator.component';
-import { HlmRadioDirective } from './lib/hlm-radio.directive';
-
-export * from './lib/hlm-radio-group.directive';
-export * from './lib/hlm-radio-indicator.component';
-export * from './lib/hlm-radio.directive';
-
-export const HlmRadioGroupImports = [HlmRadioGroupDirective, HlmRadioDirective, HlmRadioIndicatorComponent];
-
-@NgModule({
- imports: [...HlmRadioGroupImports],
- exports: [...HlmRadioGroupImports],
-})
-export class HlmRadioGroupModule {}
diff --git a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-group.directive.ts b/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-group.directive.ts
deleted file mode 100644
index d5238d10..00000000
--- a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-group.directive.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'brn-radio-group[hlm],[hlmRadioGroup]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmRadioGroupDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('block', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-indicator.component.ts b/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-indicator.component.ts
deleted file mode 100644
index fa205534..00000000
--- a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio-indicator.component.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-const btnLike =
- 'aspect-square rounded-full ring-offset-background group-[.cdk-keyboard-focused]:ring-2 group-[.cdk-keyboard-focused]:ring-ring group-[.cdk-keyboard-focused]:ring-offset-2 group-[.brn-radio-disabled]:cursor-not-allowed group-[.brn-radio-disabled]:opacity-50';
-
-@Component({
- selector: 'hlm-radio-indicator',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- template: `
-
-
- `,
-})
-export class HlmRadioIndicatorComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('relative inline-flex h-4 w-4', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio.directive.ts b/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio.directive.ts
deleted file mode 100644
index 18c962cf..00000000
--- a/Client/src/spartan-components/ui-radiogroup-helm/src/lib/hlm-radio.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'brn-radio[hlm],[hlmRadio]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmRadioDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('group [&.brn-radio-disabled]:text-muted-foreground flex items-center space-x-2', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-scrollarea-helm/src/index.ts b/Client/src/spartan-components/ui-scrollarea-helm/src/index.ts
deleted file mode 100644
index 764f1e3e..00000000
--- a/Client/src/spartan-components/ui-scrollarea-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmScrollAreaComponent } from './lib/hlm-scroll-area.component';
-
-export * from './lib/hlm-scroll-area.component';
-
-@NgModule({
- imports: [HlmScrollAreaComponent],
- exports: [HlmScrollAreaComponent],
-})
-export class HlmScrollAreaModule {}
diff --git a/Client/src/spartan-components/ui-scrollarea-helm/src/lib/hlm-scroll-area.component.ts b/Client/src/spartan-components/ui-scrollarea-helm/src/lib/hlm-scroll-area.component.ts
deleted file mode 100644
index c01d6381..00000000
--- a/Client/src/spartan-components/ui-scrollarea-helm/src/lib/hlm-scroll-area.component.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import {
- ChangeDetectionStrategy,
- Component,
- Input,
- ViewEncapsulation,
- booleanAttribute,
- computed,
- signal,
-} from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-import { NgScrollbarModule } from 'ngx-scrollbar';
-
-@Component({
- selector: 'hlm-scroll-area',
- standalone: true,
- imports: [NgScrollbarModule],
- template: `
-
-
-
- `,
- changeDetection: ChangeDetectionStrategy.OnPush,
- encapsulation: ViewEncapsulation.None,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmScrollAreaComponent {
- protected readonly _computedClass = computed(() => hlm('block', this._class()));
-
- @Input()
- set class(value: ClassValue) {
- this._class.set(value);
- }
-
- private readonly _class = signal('');
-
- @Input()
- set track(value: 'vertical' | 'horizontal' | 'all') {
- this._track.set(value);
- }
-
- protected readonly _track = signal<'vertical' | 'horizontal' | 'all'>('all');
-
- @Input({ transform: booleanAttribute })
- set autoHeightDisabled(value: boolean) {
- this._autoHeightDisabled.set(value);
- }
-
- protected readonly _autoHeightDisabled = signal(true);
-
- @Input({ transform: booleanAttribute })
- set autoWidthDisabled(value: boolean) {
- this._autoWidthDisabled.set(value);
- }
-
- protected readonly _autoWidthDisabled = signal(true);
-
- @Input()
- set visibility(value: 'hover' | 'always' | 'native') {
- this._visibility.set(value);
- }
-
- protected readonly _visibility = signal<'hover' | 'always' | 'native'>('native');
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/index.ts b/Client/src/spartan-components/ui-select-helm/src/index.ts
deleted file mode 100644
index 1d9260ba..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/index.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmSelectContentDirective } from './lib/hlm-select-content.directive';
-import { HlmSelectGroupDirective } from './lib/hlm-select-group.directive';
-import { HlmSelectLabelDirective } from './lib/hlm-select-label.directive';
-import { HlmSelectOptionComponent } from './lib/hlm-select-option.component';
-import { HlmSelectScrollDownComponent } from './lib/hlm-select-scroll-down.component';
-import { HlmSelectScrollUpComponent } from './lib/hlm-select-scroll-up.component';
-import { HlmSelectTriggerComponent } from './lib/hlm-select-trigger.component';
-import { HlmSelectValueDirective } from './lib/hlm-select-value.directive';
-import { HlmSelectDirective } from './lib/hlm-select.directive';
-
-export * from './lib/hlm-select-content.directive';
-export * from './lib/hlm-select-group.directive';
-export * from './lib/hlm-select-label.directive';
-export * from './lib/hlm-select-option.component';
-export * from './lib/hlm-select-scroll-down.component';
-export * from './lib/hlm-select-scroll-up.component';
-export * from './lib/hlm-select-trigger.component';
-export * from './lib/hlm-select-value.directive';
-export * from './lib/hlm-select.directive';
-
-export const HlmSelectImports = [
- HlmSelectContentDirective,
- HlmSelectTriggerComponent,
- HlmSelectOptionComponent,
- HlmSelectValueDirective,
- HlmSelectDirective,
- HlmSelectScrollUpComponent,
- HlmSelectScrollDownComponent,
- HlmSelectLabelDirective,
- HlmSelectGroupDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmSelectImports],
- exports: [...HlmSelectImports],
-})
-export class HlmSelectModule {}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-content.directive.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-content.directive.ts
deleted file mode 100644
index 99327d36..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-content.directive.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Directive, Input, computed, input, signal } from '@angular/core';
-import { hlm, injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSelectContent], hlm-select-content',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[attr.data-state]': '_stateProvider?.state() ?? "open"',
- '[attr.data-side]': '_sideProvider?.side() ?? "bottom"',
- },
-})
-export class HlmSelectContentDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _stateProvider = injectExposesStateProvider({ optional: true });
- protected readonly _sideProvider = injectExposedSideProvider({ optional: true });
-
- protected readonly _computedClass = computed(() =>
- hlm(
- 'w-full relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md p-1 data-[side=bottom]:top-[2px] data-[side=top]:bottom-[2px] 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',
- this.userClass(),
- ),
- );
-
- private readonly _stickyLabels = signal(false);
- @Input()
- set stickyLabels(value: boolean) {
- this._stickyLabels.set(value);
- }
- get stickyLabels() {
- return this._stickyLabels();
- }
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-group.directive.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-group.directive.ts
deleted file mode 100644
index 54ba6673..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-group.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnSelectGroupDirective } from '@spartan-ng/ui-select-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSelectGroup], hlm-select-group',
- hostDirectives: [BrnSelectGroupDirective],
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSelectGroupDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm(this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-label.directive.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-label.directive.ts
deleted file mode 100644
index 21a52852..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-label.directive.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { Directive, type OnInit, computed, inject, input, signal } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnSelectLabelDirective } from '@spartan-ng/ui-select-brain';
-import type { ClassValue } from 'clsx';
-import { HlmSelectContentDirective } from './hlm-select-content.directive';
-
-@Directive({
- selector: '[hlmSelectLabel], hlm-select-label',
- hostDirectives: [BrnSelectLabelDirective],
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSelectLabelDirective implements OnInit {
- private readonly selectContent = inject(HlmSelectContentDirective);
- private readonly _stickyLabels = signal(false);
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'pl-8 pr-2 text-sm font-semibold rtl:pl-2 rtl:pr-8',
- this._stickyLabels() ? 'sticky top-0 bg-popover block z-[2]' : '',
- this.userClass(),
- ),
- );
-
- ngOnInit(): void {
- if (this.selectContent.stickyLabels) {
- this._stickyLabels.set(true);
- }
- }
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-option.component.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-option.component.ts
deleted file mode 100644
index cf45879a..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-option.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { ChangeDetectionStrategy, Component, Input, computed, inject, input } from '@angular/core';
-import { lucideCheck } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import { BrnSelectOptionDirective } from '@spartan-ng/ui-select-brain';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-option',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- hostDirectives: [BrnSelectOptionDirective],
- providers: [provideIcons({ lucideCheck })],
- host: {
- '[class]': '_computedClass()',
- },
- template: `
-
-
- @if (this._brnSelectOption.selected()) {
-
- }
-
- `,
- imports: [HlmIconComponent],
-})
-export class HlmSelectOptionComponent {
- protected readonly _brnSelectOption = inject(BrnSelectOptionDirective, { host: true });
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 rtl:flex-reverse rtl:pr-8 rtl:pl-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
- this.userClass(),
- ),
- );
-
- @Input()
- set value(value: unknown | null) {
- this._brnSelectOption.value = value;
- }
-
- @Input()
- public disabled = false;
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-down.component.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-down.component.ts
deleted file mode 100644
index 653d5db1..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-down.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component } from '@angular/core';
-import { lucideChevronDown } from '@ng-icons/lucide';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-
-@Component({
- selector: 'hlm-select-scroll-down',
- standalone: true,
- imports: [HlmIconComponent],
- providers: [provideIcons({ lucideChevronDown })],
- host: {
- class: 'flex cursor-default items-center justify-center py-1',
- },
- template: `
-
- `,
-})
-export class HlmSelectScrollDownComponent {}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-up.component.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-up.component.ts
deleted file mode 100644
index 021e299c..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-scroll-up.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component } from '@angular/core';
-import { lucideChevronUp } from '@ng-icons/lucide';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-
-@Component({
- selector: 'hlm-select-scroll-up',
- standalone: true,
- imports: [HlmIconComponent],
- providers: [provideIcons({ lucideChevronUp })],
- host: {
- class: 'flex cursor-default items-center justify-center py-1',
- },
- template: `
-
- `,
-})
-export class HlmSelectScrollUpComponent {}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-trigger.component.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-trigger.component.ts
deleted file mode 100644
index 59966f60..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-trigger.component.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Component, ContentChild, type ElementRef, ViewChild, computed, inject, input } from '@angular/core';
-import { provideIcons } from '@ng-icons/core';
-import { lucideChevronDown } from '@ng-icons/lucide';
-import { hlm } from '@spartan-ng/ui-core';
-import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
-import { BrnSelectComponent, BrnSelectTriggerDirective } from '@spartan-ng/ui-select-brain';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const selectTriggerVariants = cva(
- 'flex items-center justify-between rounded-md border border-input bg-background text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
- {
- variants: {
- size: {
- default: 'h-10 py-2 px-4',
- sm: 'h-9 px-3',
- lg: 'h-11 px-8',
- },
- error: {
- auto: '[&.ng-invalid.ng-touched]:text-destructive [&.ng-invalid.ng-touched]:border-destructive [&.ng-invalid.ng-touched]:focus-visible:ring-destructive',
- true: 'text-destructive border-destructive focus-visible:ring-destructive',
- },
- },
- defaultVariants: {
- size: 'default',
- error: 'auto',
- },
- },
-);
-type SelectTriggerVariants = VariantProps;
-
-@Component({
- selector: 'hlm-select-trigger',
- standalone: true,
- imports: [BrnSelectTriggerDirective, HlmIconComponent],
- providers: [provideIcons({ lucideChevronDown })],
- template: `
-
-
- @if (icon) {
-
- } @else {
-
- }
-
- `,
-})
-export class HlmSelectTriggerComponent {
- @ViewChild('button', { static: true })
- public buttonEl!: ElementRef;
-
- @ContentChild(HlmIconComponent, { static: false })
- protected icon!: HlmIconComponent;
-
- protected readonly brnSelect = inject(BrnSelectComponent, { optional: true });
-
- public readonly _size = input('default');
- public readonly userClass = input('', { alias: 'class' });
-
- protected _computedClass = computed(() =>
- hlm(selectTriggerVariants({ size: this._size(), error: this.brnSelect?.errorState() }), this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-value.directive.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-value.directive.ts
deleted file mode 100644
index 06d7636a..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select-value.directive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- // eslint-disable-next-line @angular-eslint/component-selector
- selector: 'hlm-select-value,[hlmSelectValue], brn-select-value[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSelectValueDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() =>
- hlm(
- '!inline-block ltr:text-left rtl:text-right border-border w-[calc(100%)]] min-w-0 pointer-events-none truncate',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select.directive.ts b/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select.directive.ts
deleted file mode 100644
index c95b6031..00000000
--- a/Client/src/spartan-components/ui-select-helm/src/lib/hlm-select.directive.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- // eslint-disable-next-line @angular-eslint/directive-selector
- selector: 'hlm-select, brn-select [hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSelectDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected readonly _computedClass = computed(() => hlm('space-y-2', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-separator-helm/src/index.ts b/Client/src/spartan-components/ui-separator-helm/src/index.ts
deleted file mode 100644
index 97cf2a8b..00000000
--- a/Client/src/spartan-components/ui-separator-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmSeparatorDirective } from './lib/hlm-separator.directive';
-
-export * from './lib/hlm-separator.directive';
-
-@NgModule({
- imports: [HlmSeparatorDirective],
- exports: [HlmSeparatorDirective],
-})
-export class HlmSeparatorModule {}
diff --git a/Client/src/spartan-components/ui-separator-helm/src/lib/hlm-separator.directive.ts b/Client/src/spartan-components/ui-separator-helm/src/lib/hlm-separator.directive.ts
deleted file mode 100644
index 1c50fbd2..00000000
--- a/Client/src/spartan-components/ui-separator-helm/src/lib/hlm-separator.directive.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-export type HlmSeparatorOrientation = 'horizontal' | 'vertical';
-@Directive({
- selector: '[hlmSeparator],brn-separator[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSeparatorDirective {
- public readonly orientation = input('horizontal');
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'inline-flex shrink-0 border-0 bg-border',
- this.orientation() === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/index.ts b/Client/src/spartan-components/ui-sheet-helm/src/index.ts
deleted file mode 100644
index 28f1f895..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/index.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { HlmSheetCloseDirective } from './lib/hlm-sheet-close.directive';
-import { HlmSheetContentComponent } from './lib/hlm-sheet-content.component';
-import { HlmSheetDescriptionDirective } from './lib/hlm-sheet-description.directive';
-import { HlmSheetFooterComponent } from './lib/hlm-sheet-footer.component';
-import { HlmSheetHeaderComponent } from './lib/hlm-sheet-header.component';
-import { HlmSheetOverlayDirective } from './lib/hlm-sheet-overlay.directive';
-import { HlmSheetTitleDirective } from './lib/hlm-sheet-title.directive';
-import { HlmSheetComponent } from './lib/hlm-sheet.component';
-
-export * from './lib/hlm-sheet-close.directive';
-export * from './lib/hlm-sheet-content.component';
-export * from './lib/hlm-sheet-description.directive';
-export * from './lib/hlm-sheet-footer.component';
-export * from './lib/hlm-sheet-header.component';
-export * from './lib/hlm-sheet-overlay.directive';
-export * from './lib/hlm-sheet-title.directive';
-export * from './lib/hlm-sheet.component';
-
-export const HlmSheetImports = [
- HlmSheetComponent,
- HlmSheetCloseDirective,
- HlmSheetContentComponent,
- HlmSheetDescriptionDirective,
- HlmSheetFooterComponent,
- HlmSheetHeaderComponent,
- HlmSheetOverlayDirective,
- HlmSheetTitleDirective,
-] as const;
-
-@NgModule({
- imports: [...HlmSheetImports],
- exports: [...HlmSheetImports],
-})
-export class HlmSheetModule {}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-close.directive.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-close.directive.ts
deleted file mode 100644
index 550e3b81..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-close.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSheetClose],[brnSheetClose][hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSheetCloseDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- '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',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-content.component.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-content.component.ts
deleted file mode 100644
index e5b212e3..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-content.component.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { Component, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';
-import { lucideX } from '@ng-icons/lucide';
-import { hlm, injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/ui-core';
-import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
-import { BrnSheetCloseDirective } from '@spartan-ng/ui-sheet-brain';
-import { cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-import { HlmSheetCloseDirective } from './hlm-sheet-close.directive';
-
-export const sheetVariants = cva(
- 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
- {
- variants: {
- side: {
- top: 'border-border inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
- bottom:
- 'border-border inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
- left: 'border-border inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
- right:
- 'border-border inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
- },
- },
- defaultVariants: {
- side: 'right',
- },
- },
-);
-
-@Component({
- selector: 'hlm-sheet-content',
- standalone: true,
- imports: [HlmSheetCloseDirective, BrnSheetCloseDirective, HlmIconComponent],
- providers: [provideIcons({ lucideX })],
- host: {
- '[class]': '_computedClass()',
- '[attr.data-state]': 'state()',
- },
- template: `
-
-
- Close
-
-
- `,
-})
-export class HlmSheetContentComponent {
- private _stateProvider = injectExposesStateProvider({ host: true });
- private _sideProvider = injectExposedSideProvider({ host: true });
- public state = this._stateProvider.state ?? signal('closed');
- private _renderer = inject(Renderer2);
- private _element = inject(ElementRef);
-
- constructor() {
- effect(() => {
- this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
- });
- }
-
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-description.directive.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-description.directive.ts
deleted file mode 100644
index f12d8f3e..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-description.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnSheetDescriptionDirective } from '@spartan-ng/ui-sheet-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSheetDescription]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnSheetDescriptionDirective],
-})
-export class HlmSheetDescriptionDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('text-sm text-muted-foreground', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-footer.component.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-footer.component.ts
deleted file mode 100644
index bfeb145b..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-footer.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-sheet-footer',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSheetFooterComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-header.component.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-header.component.ts
deleted file mode 100644
index 10ec21ff..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-header.component.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-sheet-header',
- standalone: true,
- template: `
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSheetHeaderComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('flex flex-col space-y-2 text-center sm:text-left', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-overlay.directive.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-overlay.directive.ts
deleted file mode 100644
index a3b72c09..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-overlay.directive.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Directive, computed, effect, input } from '@angular/core';
-import { hlm, injectCustomClassSettable } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSheetOverlayDirective {
- private _classSettable = injectCustomClassSettable({ optional: true, host: true });
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
- this.userClass(),
- ),
- );
-
- constructor() {
- effect(() => {
- this._classSettable?.setClassToCustomElement(this._computedClass());
- });
- }
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-title.directive.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-title.directive.ts
deleted file mode 100644
index aabe0de6..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet-title.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnSheetTitleDirective } from '@spartan-ng/ui-sheet-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSheetTitle]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnSheetTitleDirective],
-})
-export class HlmSheetTitleDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('text-lg font-semibold', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet.component.ts b/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet.component.ts
deleted file mode 100644
index d9792670..00000000
--- a/Client/src/spartan-components/ui-sheet-helm/src/lib/hlm-sheet.component.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { ChangeDetectionStrategy, Component, ViewEncapsulation, forwardRef } from '@angular/core';
-import { BrnDialogComponent } from '@spartan-ng/ui-dialog-brain';
-import { BrnSheetComponent, BrnSheetOverlayComponent } from '@spartan-ng/ui-sheet-brain';
-import { HlmSheetOverlayDirective } from './hlm-sheet-overlay.directive';
-
-@Component({
- selector: 'hlm-sheet',
- standalone: true,
- imports: [BrnSheetOverlayComponent, HlmSheetOverlayDirective],
- providers: [
- {
- provide: BrnDialogComponent,
- useExisting: forwardRef(() => BrnSheetComponent),
- },
- {
- provide: BrnSheetComponent,
- useExisting: forwardRef(() => HlmSheetComponent),
- },
- ],
- template: `
-
-
- `,
- encapsulation: ViewEncapsulation.None,
- changeDetection: ChangeDetectionStrategy.OnPush,
- exportAs: 'hlmSheet',
-})
-export class HlmSheetComponent extends BrnSheetComponent {
- constructor() {
- super();
- this.closeDelay = 100;
- }
-}
diff --git a/Client/src/spartan-components/ui-skeleton-helm/src/index.ts b/Client/src/spartan-components/ui-skeleton-helm/src/index.ts
deleted file mode 100644
index 5466cd45..00000000
--- a/Client/src/spartan-components/ui-skeleton-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmSkeletonComponent } from './lib/hlm-skeleton.component';
-
-export * from './lib/hlm-skeleton.component';
-
-@NgModule({
- imports: [HlmSkeletonComponent],
- exports: [HlmSkeletonComponent],
-})
-export class HlmSkeletonModule {}
diff --git a/Client/src/spartan-components/ui-skeleton-helm/src/lib/hlm-skeleton.component.ts b/Client/src/spartan-components/ui-skeleton-helm/src/lib/hlm-skeleton.component.ts
deleted file mode 100644
index bc2e381d..00000000
--- a/Client/src/spartan-components/ui-skeleton-helm/src/lib/hlm-skeleton.component.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-skeleton',
- standalone: true,
- template: '',
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSkeletonComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() => hlm('block animate-pulse rounded-md bg-muted', this.userClass()));
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/index.ts b/Client/src/spartan-components/ui-slider-helm/src/index.ts
deleted file mode 100644
index 3f616f2a..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { HlmSliderInputDirective } from './lib/hlm-slider-input.directive';
-import { HlmSliderThumbDirective } from './lib/hlm-slider-thumb.directive';
-import { HlmSliderTrackComponent } from './lib/hlm-slider-track.component';
-import { HlmSliderComponent } from './lib/hlm-slider.component';
-
-export const HlmSliderImports = [
- HlmSliderComponent,
- HlmSliderTrackComponent,
- HlmSliderInputDirective,
- HlmSliderThumbDirective,
-] as const;
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-input.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-input.directive.ts
deleted file mode 100644
index 06723ab3..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-input.directive.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BrnSliderInputDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'input[hlmSliderInput], input[brnSliderInput]',
- standalone: true,
- hostDirectives: [BrnSliderInputDirective],
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSliderInputDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('w-full h-5 -top-1.5 left-0 opacity-0 absolute cursor-pointer transition-all', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-thumb.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-thumb.directive.ts
deleted file mode 100644
index 79bf2bc6..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-thumb.directive.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BRN_SLIDER, BrnSliderThumbDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: 'hlm-slider-thumb, brn-slider-thumb [hlm]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[attr.dir]': '_direction()',
- },
- hostDirectives: [BrnSliderThumbDirective],
-})
-export class HlmSliderThumbDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- '-translate-y-1/2 h-5 w-5 absolute rounded-full top-1/2 ltr:left-0 rtl:right-0 bg-secondary border-2 border-black cursor-pointer pointer-events-none transition-all',
- this._brnSlider.brnSliderTrack()?.brnSliderInput()?.isFocused() ? 'ring-2 ring-gray-400' : '',
- this.userClass(),
- ),
- );
- protected _direction = computed(() => this._brnSlider.direction());
-
- private readonly _brnSlider = inject(BRN_SLIDER);
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-mark.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-mark.directive.ts
deleted file mode 100644
index 78757893..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-mark.directive.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BRN_SLIDER, BrnSliderTickMarkDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSliderTickMark]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- '[attr.dir]': '_direction()',
- },
- hostDirectives: [{ directive: BrnSliderTickMarkDirective, inputs: ['data'] }],
-})
-export class HlmSliderTickMarkDirective {
- public readonly userClass = input('', { alias: 'class' });
- public readonly active = input();
-
- protected _computedClass = computed(() =>
- hlm(
- 'absolute w-1 h-1 top-0.5 rounded-full rtl:right-0',
- this.active() ? 'bg-secondary' : 'bg-primary',
- this.userClass(),
- ),
- );
- protected _direction = computed(() => this._brnSlider.direction());
-
- private readonly _brnSlider = inject(BRN_SLIDER);
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-marks.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-marks.directive.ts
deleted file mode 100644
index c5f6ae11..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-tick-marks.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSliderTickMarks]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSliderTickMarksDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('h-full w-full relative -top-4 cursor-pointer pointer-events-none transition-all', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active-fill.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active-fill.directive.ts
deleted file mode 100644
index 7967b15a..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active-fill.directive.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Directive, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BRN_SLIDER, BrnSliderTrackActiveFillDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSliderTrackActiveFill]',
- standalone: true,
- hostDirectives: [BrnSliderTrackActiveFillDirective],
- host: {
- '[class]': '_computedClass()',
- '[attr.dir]': '_direction()',
- },
-})
-export class HlmSliderTrackActiveFillDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'h-full w-full absolute top-0 pointer-events-none bg-primary ltr:origin-left rtl:origin-right transition-all scale-x-0',
- this.userClass(),
- ),
- );
- protected _direction = computed(() => this._brnSlider.direction());
-
- private readonly _brnSlider = inject(BRN_SLIDER);
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active.directive.ts
deleted file mode 100644
index 56bbe0d6..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-active.directive.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSliderTrackActive]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSliderTrackActiveDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm(
- 'h-full w-full relative -top-2 pointer-events-none overflow-hidden rounded-full transition-all',
- this.userClass(),
- ),
- );
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-inactive.directive.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-inactive.directive.ts
deleted file mode 100644
index 81d5a29d..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track-inactive.directive.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Directive, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import type { ClassValue } from 'clsx';
-
-@Directive({
- selector: '[hlmSliderTrackInactive]',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSliderTrackInactiveDirective {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('w-full h-full bg-secondary rounded-full transition-all', this.userClass()),
- );
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track.component.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track.component.ts
deleted file mode 100644
index bd6fb19c..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider-track.component.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BRN_SLIDER, BRN_SLIDER_TRACK, BrnSliderTrackDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-import { HlmSliderTickMarkDirective } from './hlm-slider-tick-mark.directive';
-import { HlmSliderTickMarksDirective } from './hlm-slider-tick-marks.directive';
-import { HlmSliderTrackActiveFillDirective } from './hlm-slider-track-active-fill.directive';
-import { HlmSliderTrackActiveDirective } from './hlm-slider-track-active.directive';
-import { HlmSliderTrackInactiveDirective } from './hlm-slider-track-inactive.directive';
-
-@Component({
- selector: 'hlm-slider-track, brn-slider-track [hlm]',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- template: `
-
-
-
-
- @if (_brnSlider.showTickMarks()) {
-
- @for (tickMark of _brnSliderTrack.tickMarks(); track $index) {
-
- }
-
- }
-
- `,
- host: {
- '[class]': '_computedClass()',
- },
- hostDirectives: [BrnSliderTrackDirective],
- imports: [
- HlmSliderTrackInactiveDirective,
- HlmSliderTrackActiveDirective,
- HlmSliderTrackActiveFillDirective,
- HlmSliderTickMarksDirective,
- HlmSliderTickMarkDirective,
- ],
-})
-export class HlmSliderTrackComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('flex w-full h-2 px-3 self-center relative transition-all', this.userClass()),
- );
-
- protected readonly _brnSlider = inject(BRN_SLIDER);
- protected readonly _brnSliderTrack = inject(BRN_SLIDER_TRACK, { host: true });
-}
diff --git a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider.component.ts b/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider.component.ts
deleted file mode 100644
index 3b7584f2..00000000
--- a/Client/src/spartan-components/ui-slider-helm/src/lib/hlm-slider.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { BRN_SLIDER, BrnSliderDirective } from '@spartan-ng/ui-slider-brain';
-import type { ClassValue } from 'clsx';
-
-@Component({
- selector: 'hlm-slider, brn-slider [hlm]',
- standalone: true,
- changeDetection: ChangeDetectionStrategy.OnPush,
- hostDirectives: [
- {
- directive: BrnSliderDirective,
- inputs: ['brnSliderDisabled: disabled', 'min', 'max', 'step', 'dir', 'label', 'ariaLabel', 'showTickMarks'],
- },
- ],
- template: ' ',
- host: {
- '[class]': '_computedClass()',
- },
-})
-export class HlmSliderComponent {
- public readonly userClass = input('', { alias: 'class' });
- protected _computedClass = computed(() =>
- hlm('w-full h-5 flex relative', this._brnSlider.disabled() ? 'opacity-40' : '', this.userClass()),
- );
-
- private readonly _brnSlider = inject(BRN_SLIDER, { host: true });
-}
diff --git a/Client/src/spartan-components/ui-sonner-helm/src/index.ts b/Client/src/spartan-components/ui-sonner-helm/src/index.ts
deleted file mode 100644
index f3e6a4e6..00000000
--- a/Client/src/spartan-components/ui-sonner-helm/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './lib/hlm-toaster.component';
diff --git a/Client/src/spartan-components/ui-sonner-helm/src/lib/hlm-toaster.component.ts b/Client/src/spartan-components/ui-sonner-helm/src/lib/hlm-toaster.component.ts
deleted file mode 100644
index af2bbc7d..00000000
--- a/Client/src/spartan-components/ui-sonner-helm/src/lib/hlm-toaster.component.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { ChangeDetectionStrategy, Component, booleanAttribute, input, numberAttribute } from '@angular/core';
-import { NgxSonnerToaster, type ToasterProps } from 'ngx-sonner';
-
-@Component({
- selector: 'hlm-toaster',
- standalone: true,
- imports: [NgxSonnerToaster],
- template: `
-
- `,
- changeDetection: ChangeDetectionStrategy.OnPush,
-})
-export class HlmToasterComponent {
- invert = input(false, {
- transform: booleanAttribute,
- });
- theme = input('light');
- position = input('bottom-right');
- hotKey = input(['altKey', 'KeyT']);
- richColors = input(false, {
- transform: booleanAttribute,
- });
- expand = input(false, {
- transform: booleanAttribute,
- });
- duration = input(4000, {
- transform: numberAttribute,
- });
- visibleToasts = input(3, {
- transform: numberAttribute,
- });
- closeButton = input(false, {
- transform: booleanAttribute,
- });
- toastOptions = input({
- classes: {
- toast:
- 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
- description: 'group-[.toast]:text-muted-foreground',
- actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
- cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
- },
- });
- offset = input(null);
- dir = input('auto');
- _class = input('', { alias: 'class' });
- _style = input>({}, { alias: 'style' });
-}
diff --git a/Client/src/spartan-components/ui-spinner-helm/src/index.ts b/Client/src/spartan-components/ui-spinner-helm/src/index.ts
deleted file mode 100644
index 12846032..00000000
--- a/Client/src/spartan-components/ui-spinner-helm/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { HlmSpinnerComponent } from './lib/hlm-spinner.component';
-
-export * from './lib/hlm-spinner.component';
-
-@NgModule({
- imports: [HlmSpinnerComponent],
- exports: [HlmSpinnerComponent],
-})
-export class HlmSpinnerModule {}
diff --git a/Client/src/spartan-components/ui-spinner-helm/src/lib/hlm-spinner.component.ts b/Client/src/spartan-components/ui-spinner-helm/src/lib/hlm-spinner.component.ts
deleted file mode 100644
index 02d37bfc..00000000
--- a/Client/src/spartan-components/ui-spinner-helm/src/lib/hlm-spinner.component.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Component, computed, input } from '@angular/core';
-import { hlm } from '@spartan-ng/ui-core';
-import { type VariantProps, cva } from 'class-variance-authority';
-import type { ClassValue } from 'clsx';
-
-export const spinnerVariants = cva('inline-block', {
- variants: {
- variant: {
- default: 'animate-spin [&>svg]:text-foreground/30 [&>svg]:fill-accent',
- },
- size: {
- xs: 'h-4 w-4',
- sm: 'h-6 w-6',
- default: 'w-8 h-8 ',
- lg: 'w-12 h-12',
- xl: 'w-16 h-16',
- },
- },
- defaultVariants: {
- variant: 'default',
- size: 'default',
- },
-});
-export type SpinnerVariants = VariantProps;
-
-@Component({
- selector: 'hlm-spinner',
- standalone: true,
- host: {
- '[class]': '_computedClass()',
- role: 'status',
- },
- template: `
-
-