mn-angular-lib 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,9 +4,9 @@ import { BehaviorSubject, firstValueFrom } from 'rxjs';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule, NgClass, NgOptimizedImage } from '@angular/common';
6
6
  import { tv } from 'tailwind-variants';
7
- import * as i1$1 from '@angular/forms';
7
+ import * as i1$2 from '@angular/forms';
8
8
  import { Validators } from '@angular/forms';
9
- import * as i1$2 from '@angular/common/http';
9
+ import * as i1$1 from '@angular/common/http';
10
10
 
11
11
  /**
12
12
  * MnThemeService is responsible for managing the theme configuration of the application.
@@ -57,10 +57,10 @@ class MnThemeService {
57
57
  this._theme.set(merged);
58
58
  this.initialTheme = initialTheme;
59
59
  }
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnThemeService, providedIn: 'root' });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnThemeService, providedIn: 'root' });
62
62
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnThemeService, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnThemeService, decorators: [{
64
64
  type: Injectable,
65
65
  args: [{ providedIn: 'root' }]
66
66
  }], ctorParameters: () => [] });
@@ -222,10 +222,10 @@ class MnAlertStore {
222
222
  clear() {
223
223
  this._alerts$.next([]);
224
224
  }
225
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
226
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertStore, providedIn: 'root' });
225
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
226
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertStore, providedIn: 'root' });
227
227
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertStore, decorators: [{
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertStore, decorators: [{
229
229
  type: Injectable,
230
230
  args: [{ providedIn: 'root' }]
231
231
  }] });
@@ -314,10 +314,10 @@ class MnAlertService {
314
314
  const icon = (extra?.icon ?? this.cfg.icons[kind]);
315
315
  return this.show({ title, subTitle, duration: duration, cssClass, icon, meta: extra?.meta, kind: kind });
316
316
  }
317
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertService, deps: [{ token: MnAlertStore }, { token: MN_ALERT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
318
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertService, providedIn: 'root' });
317
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertService, deps: [{ token: MnAlertStore }, { token: MN_ALERT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
318
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertService, providedIn: 'root' });
319
319
  }
320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertService, decorators: [{
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertService, decorators: [{
321
321
  type: Injectable,
322
322
  args: [{ providedIn: 'root' }]
323
323
  }], ctorParameters: () => [{ type: MnAlertStore }, { type: undefined, decorators: [{
@@ -343,10 +343,10 @@ class MnAlertOutletComponent {
343
343
  dismiss: () => this.dismissAlert(a.id)
344
344
  };
345
345
  }
346
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: MnAlertOutletComponent, isStandalone: true, selector: "mn-alert-outlet", inputs: { template: "template" }, ngImport: i0, template: "@if (alerts$ | async; as alerts) {\n @for (a of alerts; track trackById($index, a)) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(a)\">\n </ng-container>\n }\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
346
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MnAlertOutletComponent, isStandalone: true, selector: "mn-alert-outlet", inputs: { template: "template" }, ngImport: i0, template: "@if (alerts$ | async; as alerts) {\n @for (a of alerts; track trackById($index, a)) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(a)\">\n </ng-container>\n }\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
348
348
  }
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnAlertOutletComponent, decorators: [{
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnAlertOutletComponent, decorators: [{
350
350
  type: Component,
351
351
  args: [{ selector: 'mn-alert-outlet', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (alerts$ | async; as alerts) {\n @for (a of alerts; track trackById($index, a)) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(a)\">\n </ng-container>\n }\n}\n" }]
352
352
  }], ctorParameters: () => [], propDecorators: { template: [{
@@ -355,10 +355,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
355
355
  }] } });
356
356
 
357
357
  class Test {
358
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Test, deps: [], target: i0.ɵɵFactoryTarget.Component });
359
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: Test, isStandalone: true, selector: "lib-test", ngImport: i0, template: "<p>test works!</p>\n", styles: ["p{color:var(--mn-primary)}\n"] });
358
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: Test, deps: [], target: i0.ɵɵFactoryTarget.Component });
359
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: Test, isStandalone: true, selector: "lib-test", ngImport: i0, template: "<p>test works!</p>\n", styles: ["p{color:var(--mn-primary)}\n"] });
360
360
  }
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Test, decorators: [{
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: Test, decorators: [{
362
362
  type: Component,
363
363
  args: [{ selector: 'lib-test', standalone: true, imports: [], template: "<p>test works!</p>\n", styles: ["p{color:var(--mn-primary)}\n"] }]
364
364
  }] });
@@ -452,10 +452,10 @@ class MnButton {
452
452
  get tabIndex() {
453
453
  return this.data.disabled ? '-1' : null;
454
454
  }
455
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
456
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: MnButton, isStandalone: true, selector: "button[mnButton], a[mnButton]", inputs: { data: "data" }, host: { properties: { "class": "this.hostClasses", "attr.aria-disabled": "this.ariaDisabled", "attr.disabled": "this.disabledAttr", "attr.tabindex": "this.tabIndex" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
455
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
456
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MnButton, isStandalone: true, selector: "button[mnButton], a[mnButton]", inputs: { data: "data" }, host: { properties: { "class": "this.hostClasses", "attr.aria-disabled": "this.ariaDisabled", "attr.disabled": "this.disabledAttr", "attr.tabindex": "this.tabIndex" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
457
457
  }
458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnButton, decorators: [{
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnButton, decorators: [{
459
459
  type: Component,
460
460
  args: [{ selector: 'button[mnButton], a[mnButton]', standalone: true, template: "<ng-content></ng-content>\n" }]
461
461
  }], propDecorators: { data: [{
@@ -646,10 +646,10 @@ const mnInputFieldVariants = tv({
646
646
  class MnErrorMessage {
647
647
  errorMessage;
648
648
  id;
649
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnErrorMessage, deps: [], target: i0.ɵɵFactoryTarget.Component });
650
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: MnErrorMessage, isStandalone: true, selector: "lib-mn-error-message", inputs: { errorMessage: "errorMessage", id: "id" }, ngImport: i0, template: "<div [id]=\"id + '-error'\" class=\"text-red-500 mt-2 text-sm\">\n {{ errorMessage }}\n</div>\n" });
649
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnErrorMessage, deps: [], target: i0.ɵɵFactoryTarget.Component });
650
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MnErrorMessage, isStandalone: true, selector: "lib-mn-error-message", inputs: { errorMessage: "errorMessage", id: "id" }, ngImport: i0, template: "<div [id]=\"id + '-error'\" class=\"text-red-500 mt-2 text-sm\">\n {{ errorMessage }}\n</div>\n" });
651
651
  }
652
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnErrorMessage, decorators: [{
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnErrorMessage, decorators: [{
653
653
  type: Component,
654
654
  args: [{ selector: 'lib-mn-error-message', imports: [], template: "<div [id]=\"id + '-error'\" class=\"text-red-500 mt-2 text-sm\">\n {{ errorMessage }}\n</div>\n" }]
655
655
  }], propDecorators: { errorMessage: [{
@@ -660,6 +660,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
660
660
  args: [{ required: true }]
661
661
  }] } });
662
662
 
663
+ function isPlainObject(value) {
664
+ return (typeof value === 'object' &&
665
+ value !== null &&
666
+ Object.prototype.toString.call(value) === '[object Object]');
667
+ }
668
+ class MnConfigService {
669
+ http;
670
+ _config = null;
671
+ constructor(http) {
672
+ this.http = http;
673
+ }
674
+ /**
675
+ * Load the configuration JSON from the provided URL and cache it in memory.
676
+ * Consumers should typically call this via the APP_INITIALIZER helper.
677
+ */
678
+ async load(url) {
679
+ let json = await firstValueFrom(this.http.get(url, { responseType: 'json' }));
680
+ if (typeof json === 'string') {
681
+ try {
682
+ json = JSON.parse(json);
683
+ }
684
+ catch {
685
+ json = {};
686
+ }
687
+ }
688
+ const cfg = (isPlainObject(json) ? json : {});
689
+ const defaults = (isPlainObject(cfg.defaults) ? cfg.defaults : {});
690
+ const overrides = isPlainObject(cfg.overrides) ? cfg.overrides : cfg.overrides ?? {};
691
+ this._config = { defaults, overrides };
692
+ }
693
+ /**
694
+ * Resolve a configuration object for a component, optionally scoped to a section path
695
+ * and optionally overridden by an instance id.
696
+ */
697
+ resolve(componentName, sectionPath = [], instanceId) {
698
+ const baseConfig = isPlainObject(this._config?.defaults)
699
+ ? (isPlainObject(this._config.defaults[componentName])
700
+ ? { ...this._config.defaults[componentName] }
701
+ : {})
702
+ : {};
703
+ const leaf = this.walkOverrides(this._config?.overrides ?? {}, sectionPath);
704
+ let resolved = baseConfig;
705
+ if (leaf && isPlainObject(leaf[componentName])) {
706
+ resolved = this.deepMerge(resolved, leaf[componentName]);
707
+ }
708
+ if (instanceId) {
709
+ const instKey = `#${instanceId}`;
710
+ if (leaf && isPlainObject(leaf[instKey])) {
711
+ resolved = this.deepMerge(resolved, leaf[instKey]);
712
+ }
713
+ }
714
+ console.debug(`[MnConfig] Resolving for ${componentName}`, {
715
+ sectionPath,
716
+ instanceId,
717
+ resolved,
718
+ });
719
+ return resolved;
720
+ }
721
+ /**
722
+ * Walk the overrides nested object using the provided section path and return the leaf node.
723
+ * If any segment is missing or the current node is not a plain object, returns undefined.
724
+ */
725
+ walkOverrides(overridesRoot, sectionPath) {
726
+ let node = overridesRoot;
727
+ for (const segment of sectionPath) {
728
+ if (!isPlainObject(node))
729
+ return undefined;
730
+ node = node[segment];
731
+ if (node === undefined)
732
+ return undefined;
733
+ }
734
+ return node;
735
+ }
736
+ /**
737
+ * Deep merge two plain-object trees. Arrays and non-plain values are replaced by the patch.
738
+ * Does not mutate inputs; returns a new object.
739
+ */
740
+ deepMerge(base, patch) {
741
+ const out = { ...base };
742
+ for (const key of Object.keys(patch)) {
743
+ const bVal = base[key];
744
+ const pVal = patch[key];
745
+ if (isPlainObject(bVal) && isPlainObject(pVal)) {
746
+ out[key] = this.deepMerge(bVal, pVal);
747
+ }
748
+ else {
749
+ // replace for arrays, primitives, null, undefined, and non-plain objects
750
+ out[key] = pVal;
751
+ }
752
+ }
753
+ return out;
754
+ }
755
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnConfigService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
756
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnConfigService, providedIn: 'root' });
757
+ }
758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnConfigService, decorators: [{
759
+ type: Injectable,
760
+ args: [{ providedIn: 'root' }]
761
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }] });
762
+
763
+ /**
764
+ * Represents the current section path based on nested mn-section directives.
765
+ */
766
+ const MN_SECTION_PATH = new InjectionToken('MN_SECTION_PATH', {
767
+ providedIn: 'root',
768
+ factory: () => [],
769
+ });
770
+ /**
771
+ * Represents the current component instance id provided by [mn-instance].
772
+ */
773
+ const MN_INSTANCE_ID = new InjectionToken('MN_INSTANCE_ID', {
774
+ providedIn: 'root',
775
+ factory: () => null,
776
+ });
777
+
778
+ const MN_INPUT_FIELD_CONFIG = new InjectionToken('MN_INPUT_FIELD_CONFIG');
663
779
  /**
664
780
  * MnInputField Component
665
781
  *
@@ -693,8 +809,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
693
809
  */
694
810
  class MnInputField {
695
811
  ngControl;
812
+ /** Resolved UI configuration for the input field */
813
+ uiConfig = {};
696
814
  /** Configuration properties for the input field */
697
815
  props;
816
+ configService = inject(MnConfigService);
817
+ sectionPath = inject(MN_SECTION_PATH, { optional: true }) ?? [];
818
+ explicitInstanceId = inject(MN_INSTANCE_ID, { optional: true });
698
819
  /** Current raw string value of the input element */
699
820
  value = null;
700
821
  /** Whether the input is disabled */
@@ -727,6 +848,13 @@ class MnInputField {
727
848
  if (this.ngControl)
728
849
  this.ngControl.valueAccessor = this;
729
850
  }
851
+ ngOnInit() {
852
+ this.resolveConfig();
853
+ }
854
+ resolveConfig() {
855
+ const instanceId = this.explicitInstanceId || `mn-input-${this.props.id}`;
856
+ this.uiConfig = this.configService.resolve('mn-input-field', this.sectionPath, instanceId);
857
+ }
730
858
  /**
731
859
  * Gets the appropriate adapter based on the input type.
732
860
  * Adapters handle type-specific formatting, parsing, and validation.
@@ -930,13 +1058,13 @@ class MnInputField {
930
1058
  fullWidth: this.props.fullWidth,
931
1059
  });
932
1060
  }
933
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInputField, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
934
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: MnInputField, isStandalone: true, selector: "mn-input-field", inputs: { props: "props" }, ngImport: i0, template: "<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (props.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ props.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"props.placeholder || null\"\n [attr.aria-label]=\"props.ariaLabel || props.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MnErrorMessage, selector: "lib-mn-error-message", inputs: ["errorMessage", "id"] }] });
1061
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInputField, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1062
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MnInputField, isStandalone: true, selector: "mn-input-field", inputs: { props: "props" }, ngImport: i0, template: "<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (uiConfig.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ uiConfig.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"uiConfig.placeholder || null\"\n [attr.aria-label]=\"uiConfig.ariaLabel || uiConfig.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MnErrorMessage, selector: "lib-mn-error-message", inputs: ["errorMessage", "id"] }] });
935
1063
  }
936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInputField, decorators: [{
1064
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInputField, decorators: [{
937
1065
  type: Component,
938
- args: [{ selector: 'mn-input-field', standalone: true, imports: [NgClass, MnErrorMessage], template: "<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (props.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ props.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"props.placeholder || null\"\n [attr.aria-label]=\"props.ariaLabel || props.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n" }]
939
- }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
1066
+ args: [{ selector: 'mn-input-field', standalone: true, imports: [NgClass, MnErrorMessage], template: "<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (uiConfig.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ uiConfig.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"uiConfig.placeholder || null\"\n [attr.aria-label]=\"uiConfig.ariaLabel || uiConfig.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n" }]
1067
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
940
1068
  type: Optional
941
1069
  }, {
942
1070
  type: Self
@@ -945,116 +1073,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
945
1073
  args: [{ required: true }]
946
1074
  }] } });
947
1075
 
948
- /**
949
- * Represents the current section path based on nested mn-section directives.
950
- */
951
- const MN_SECTION_PATH = new InjectionToken('MN_SECTION_PATH', {
952
- providedIn: 'root',
953
- factory: () => [],
954
- });
955
- /**
956
- * Represents the current component instance id provided by [mn-instance].
957
- */
958
- const MN_INSTANCE_ID = new InjectionToken('MN_INSTANCE_ID', {
959
- providedIn: 'root',
960
- factory: () => null,
961
- });
962
-
963
- function isPlainObject(value) {
964
- return (typeof value === 'object' &&
965
- value !== null &&
966
- Object.prototype.toString.call(value) === '[object Object]');
967
- }
968
- class MnConfigService {
969
- http;
970
- _config = null;
971
- constructor(http) {
972
- this.http = http;
973
- }
974
- /**
975
- * Load the configuration JSON from the provided URL and cache it in memory.
976
- * Consumers should typically call this via the APP_INITIALIZER helper.
977
- */
978
- async load(url) {
979
- let json = await firstValueFrom(this.http.get(url, { responseType: 'json' }));
980
- if (typeof json === 'string') {
981
- try {
982
- json = JSON.parse(json);
983
- }
984
- catch {
985
- json = {};
986
- }
987
- }
988
- const cfg = (isPlainObject(json) ? json : {});
989
- const defaults = (isPlainObject(cfg.defaults) ? cfg.defaults : {});
990
- const overrides = isPlainObject(cfg.overrides) ? cfg.overrides : cfg.overrides ?? {};
991
- this._config = { defaults, overrides };
992
- }
993
- /**
994
- * Resolve a configuration object for a component, optionally scoped to a section path
995
- * and optionally overridden by an instance id.
996
- */
997
- resolve(componentName, sectionPath = [], instanceId) {
998
- const baseConfig = isPlainObject(this._config?.defaults)
999
- ? (isPlainObject(this._config.defaults[componentName])
1000
- ? { ...this._config.defaults[componentName] }
1001
- : {})
1002
- : {};
1003
- const leaf = this.walkOverrides(this._config?.overrides ?? {}, sectionPath);
1004
- let resolved = baseConfig;
1005
- if (leaf && isPlainObject(leaf[componentName])) {
1006
- resolved = this.deepMerge(resolved, leaf[componentName]);
1007
- }
1008
- if (instanceId) {
1009
- const instKey = `#${instanceId}`;
1010
- if (leaf && isPlainObject(leaf[instKey])) {
1011
- resolved = this.deepMerge(resolved, leaf[instKey]);
1012
- }
1013
- }
1014
- return resolved;
1015
- }
1016
- /**
1017
- * Walk the overrides nested object using the provided section path and return the leaf node.
1018
- * If any segment is missing or the current node is not a plain object, returns undefined.
1019
- */
1020
- walkOverrides(overridesRoot, sectionPath) {
1021
- let node = overridesRoot;
1022
- for (const segment of sectionPath) {
1023
- if (!isPlainObject(node))
1024
- return undefined;
1025
- node = node[segment];
1026
- if (node === undefined)
1027
- return undefined;
1028
- }
1029
- return node;
1030
- }
1031
- /**
1032
- * Deep merge two plain-object trees. Arrays and non-plain values are replaced by the patch.
1033
- * Does not mutate inputs; returns a new object.
1034
- */
1035
- deepMerge(base, patch) {
1036
- const out = { ...base };
1037
- for (const key of Object.keys(patch)) {
1038
- const bVal = base[key];
1039
- const pVal = patch[key];
1040
- if (isPlainObject(bVal) && isPlainObject(pVal)) {
1041
- out[key] = this.deepMerge(bVal, pVal);
1042
- }
1043
- else {
1044
- // replace for arrays, primitives, null, undefined, and non-plain objects
1045
- out[key] = pVal;
1046
- }
1047
- }
1048
- return out;
1049
- }
1050
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnConfigService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1051
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnConfigService, providedIn: 'root' });
1052
- }
1053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnConfigService, decorators: [{
1054
- type: Injectable,
1055
- args: [{ providedIn: 'root' }]
1056
- }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
1057
-
1058
1076
  /**
1059
1077
  * Helper to provide a resolved, typed component config via DI.
1060
1078
  *
@@ -1080,18 +1098,18 @@ function provideMnComponentConfig(token, componentName, initial) {
1080
1098
  const MN_TEST_COMPONENT_CONFIG = new InjectionToken('MN_TEST_COMPONENT_CONFIG');
1081
1099
  class MnTestComponent {
1082
1100
  cfg = inject(MN_TEST_COMPONENT_CONFIG);
1083
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnTestComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1084
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: MnTestComponent, isStandalone: true, selector: "mn-test-component", providers: [
1101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnTestComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1102
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MnTestComponent, isStandalone: true, selector: "mn-test-component", providers: [
1085
1103
  provideMnComponentConfig(MN_TEST_COMPONENT_CONFIG, 'test-component'),
1086
1104
  ], ngImport: i0, template: `
1087
1105
  <div class="mn-test" [style.color]="(cfg.color ?? 'inherit')">
1088
1106
  {{ cfg.text ?? 'Hello from component' }}
1089
1107
  </div>
1090
- `, isInline: true, styles: [".mn-test{font-weight:600;padding:8px 12px;border:1px dashed #ddd;border-radius:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1108
+ `, isInline: true, styles: [".mn-test{font-weight:600;padding:8px 12px;border:1px dashed #ddd;border-radius:6px}\n"] });
1091
1109
  }
1092
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnTestComponent, decorators: [{
1110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnTestComponent, decorators: [{
1093
1111
  type: Component,
1094
- args: [{ selector: 'mn-test-component', standalone: true, imports: [CommonModule], providers: [
1112
+ args: [{ selector: 'mn-test-component', standalone: true, imports: [], providers: [
1095
1113
  provideMnComponentConfig(MN_TEST_COMPONENT_CONFIG, 'test-component'),
1096
1114
  ], template: `
1097
1115
  <div class="mn-test" [style.color]="(cfg.color ?? 'inherit')">
@@ -1108,10 +1126,10 @@ class MnDualHorizontalImage {
1108
1126
  get images() {
1109
1127
  return this._images;
1110
1128
  }
1111
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnDualHorizontalImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
1112
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: MnDualHorizontalImage, isStandalone: true, selector: "lib-mn-dual-horizontal-image", inputs: { images: "images" }, ngImport: i0, template: "<div class=\"flex flex-col w-full -space-y-5 md:-space-y-10 lg:-space-y-5\">\n @for (image of images; track image.id) {\n <div class=\"w-[75%] overflow-hidden rounded-3xl shadow-md md:w-[65%] lg:w-[80%] first:self-start last:self-end last:mb-4\">\n <img [ngSrc]=\"image.url\" width=\"150\" height=\"100\" class=\"size-full object-cover\" [alt]=\"image.alt\" />\n </div>\n } @empty {\n <p>No images found</p>\n }\n</div>\n\n", dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] });
1129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnDualHorizontalImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
1130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MnDualHorizontalImage, isStandalone: true, selector: "lib-mn-dual-horizontal-image", inputs: { images: "images" }, ngImport: i0, template: "<div class=\"flex flex-col w-full -space-y-5 md:-space-y-10 lg:-space-y-5\">\n @for (image of images; track image.id) {\n <div class=\"w-[75%] overflow-hidden rounded-3xl shadow-md md:w-[65%] lg:w-[80%] first:self-start last:self-end last:mb-4\">\n <img [ngSrc]=\"image.url\" width=\"150\" height=\"100\" class=\"size-full object-cover\" [alt]=\"image.alt\" />\n </div>\n } @empty {\n <p>No images found</p>\n }\n</div>\n\n", dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] });
1113
1131
  }
1114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnDualHorizontalImage, decorators: [{
1132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnDualHorizontalImage, decorators: [{
1115
1133
  type: Component,
1116
1134
  args: [{ selector: 'lib-mn-dual-horizontal-image', standalone: true, imports: [
1117
1135
  NgOptimizedImage
@@ -1157,10 +1175,10 @@ class MnInformationCard {
1157
1175
  textPosition: this.data.textPosition,
1158
1176
  });
1159
1177
  }
1160
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInformationCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
1161
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: MnInformationCard, isStandalone: true, selector: "lib-mn-information-card", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"flex flex-col items-center gap-y-4 p-4 size-full\" [ngClass]=\"hostClasses\">\n<ng-content select=\"[header]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[footer]\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInformationCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
1179
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MnInformationCard, isStandalone: true, selector: "lib-mn-information-card", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"flex flex-col items-center gap-y-4 p-4 size-full\" [ngClass]=\"hostClasses\">\n<ng-content select=\"[header]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[footer]\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1162
1180
  }
1163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInformationCard, decorators: [{
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInformationCard, decorators: [{
1164
1182
  type: Component,
1165
1183
  args: [{ selector: 'lib-mn-information-card', standalone: true, imports: [
1166
1184
  NgClass
@@ -1193,8 +1211,8 @@ function provideMnConfig(url) {
1193
1211
  class MnSectionDirective {
1194
1212
  /** Section name contributed by this DOM node to the section path */
1195
1213
  mnSection;
1196
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1197
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: MnSectionDirective, isStandalone: true, selector: "[mn-section]", inputs: { mnSection: ["mn-section", "mnSection"] }, providers: [
1214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1215
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: MnSectionDirective, isStandalone: true, selector: "[mn-section]", inputs: { mnSection: ["mn-section", "mnSection"] }, providers: [
1198
1216
  {
1199
1217
  provide: MN_SECTION_PATH,
1200
1218
  // Read parent MN_SECTION_PATH from ancestor injector (skipSelf to avoid self-reference),
@@ -1208,7 +1226,7 @@ class MnSectionDirective {
1208
1226
  },
1209
1227
  ], ngImport: i0 });
1210
1228
  }
1211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnSectionDirective, decorators: [{
1229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnSectionDirective, decorators: [{
1212
1230
  type: Directive,
1213
1231
  args: [{
1214
1232
  selector: '[mn-section]',
@@ -1235,8 +1253,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
1235
1253
  class MnInstanceDirective {
1236
1254
  /** Instance id for targeting per-component instance overrides */
1237
1255
  mnInstance;
1238
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInstanceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1239
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: MnInstanceDirective, isStandalone: true, selector: "[mn-instance]", inputs: { mnInstance: ["mn-instance", "mnInstance"] }, providers: [
1256
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInstanceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1257
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: MnInstanceDirective, isStandalone: true, selector: "[mn-instance]", inputs: { mnInstance: ["mn-instance", "mnInstance"] }, providers: [
1240
1258
  {
1241
1259
  provide: MN_INSTANCE_ID,
1242
1260
  // Read the attribute at provider creation time using Attribute token; Inputs may not be set yet.
@@ -1245,7 +1263,7 @@ class MnInstanceDirective {
1245
1263
  },
1246
1264
  ], ngImport: i0 });
1247
1265
  }
1248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MnInstanceDirective, decorators: [{
1266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnInstanceDirective, decorators: [{
1249
1267
  type: Directive,
1250
1268
  args: [{
1251
1269
  selector: '[mn-instance]',
@@ -1272,5 +1290,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
1272
1290
  * Generated bundle index. Do not edit.
1273
1291
  */
1274
1292
 
1275
- export { DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MN_INSTANCE_ID, MN_SECTION_PATH, MN_TEST_COMPONENT_CONFIG, MN_THEME, MN_THEME_DEFAULTS, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnButton, MnConfigService, MnDualHorizontalImage, MnInformationCard, MnInputField, MnInstanceDirective, MnSectionDirective, MnTestComponent, MnThemeService, Test, dateTimeAdapter, defaultTextAdapter, injectTheme, injectThemeSignal, mnInformationCardVariants, mnInputFieldVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnComponentConfig, provideMnConfig, provideMnTheme, provideMnThemeDynamic };
1293
+ export { DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_SECTION_PATH, MN_TEST_COMPONENT_CONFIG, MN_THEME, MN_THEME_DEFAULTS, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnButton, MnConfigService, MnDualHorizontalImage, MnInformationCard, MnInputField, MnInstanceDirective, MnSectionDirective, MnTestComponent, MnThemeService, Test, dateTimeAdapter, defaultTextAdapter, injectTheme, injectThemeSignal, mnInformationCardVariants, mnInputFieldVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnComponentConfig, provideMnConfig, provideMnTheme, provideMnThemeDynamic };
1276
1294
  //# sourceMappingURL=mn-angular-lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mn-angular-lib.mjs","sources":["../../../projects/mn-angular-lib/src/lib/styles/theme.service.ts","../../../projects/mn-angular-lib/src/lib/styles/themes.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert-outlet/mn-alert-outlet.html","../../../projects/mn-angular-lib/src/lib/features/test/test.ts","../../../projects/mn-angular-lib/src/lib/features/test/test.html","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-buttonVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-button.ts","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-button.html","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field-adapters.ts","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-fieldVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-error-message/mn-error-message.ts","../../../projects/mn-angular-lib/src/lib/features/mn-error-message/mn-error-message.html","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field.ts","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field.html","../../../projects/mn-angular-lib/src/lib/context/mn-context.tokens.ts","../../../projects/mn-angular-lib/src/lib/config/mn-config.service.ts","../../../projects/mn-angular-lib/src/lib/config/mn-component-config.providers.ts","../../../projects/mn-angular-lib/src/lib/features/mn-test-component/mn-test-component.ts","../../../projects/mn-angular-lib/src/lib/features/mn-dual-horizontal-image/mn-dual-horizontal-image.ts","../../../projects/mn-angular-lib/src/lib/features/mn-dual-horizontal-image/mn-dual-horizontal-image.html","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-cardVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-card.ts","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-card.html","../../../projects/mn-angular-lib/src/lib/config/mn-config.types.ts","../../../projects/mn-angular-lib/src/lib/config/mn-config.providers.ts","../../../projects/mn-angular-lib/src/lib/context/mn-section.directive.ts","../../../projects/mn-angular-lib/src/lib/context/mn-instance.directive.ts","../../../projects/mn-angular-lib/src/public-api.ts","../../../projects/mn-angular-lib/src/mn-angular-lib.ts"],"sourcesContent":["import {Injectable, signal, WritableSignal, inject, Signal, effect} from '@angular/core';\nimport { MnTheme, MN_THEME_DEFAULTS } from './themes';\n\n/**\n * MnThemeService is responsible for managing the theme configuration of the application.\n * It provides methods to modify, reset, and access the current theme state.\n *\n * The theming is handled using a WritableSignal object, enabling reactive updates to the theme properties.\n */\n@Injectable({ providedIn: 'root' })\nexport class MnThemeService {\n private readonly _theme: WritableSignal<MnTheme> = signal<MnTheme>(MN_THEME_DEFAULTS);\n\n theme = this._theme.asReadonly();\n\n private initialTheme: Partial<MnTheme> = {};\n\n constructor() {\n effect(() => {\n const t = this.theme();\n document.documentElement.style.setProperty('--mn-primary', t.primary);\n });\n }\n\n /**\n * Updates the current theme by merging the provided partial theme properties with the existing theme.\n *\n * @param {Partial<MnTheme>} partial - An object containing partial theme properties to update the current theme.\n * @return {void} No return value.\n */\n setTheme(partial: Partial<MnTheme>) {\n const merged = { ...this._theme(), ...partial } as MnTheme;\n this._theme.set(merged);\n }\n\n /**\n * Sets the provided theme as the current theme.\n *\n * @param {MnTheme} next - The new theme to be set.\n * @return {void} This method does not return a value.\n */\n setAll(next: MnTheme) {\n this._theme.set(next);\n }\n\n /**\n * Resets the theme configuration to its default values.\n * This method updates the theme settings to reflect the predefined default theme constants.\n *\n * @return {void} Does not return any value.\n */\n reset(): void {\n this.setTheme(this.initialTheme);\n }\n\n setInitialTheme(initialTheme: Partial<MnTheme>) {\n const merged = { ...this._theme(), ...initialTheme } as MnTheme;\n this._theme.set(merged);\n this.initialTheme = initialTheme;\n }\n}\n\n/**\n * Provides a dynamically configurable theme service for the MnTheme module.\n * This function creates an Angular provider with a factory for initializing\n * the MnThemeService. If an initial theme configuration is supplied, it\n * will be used to set the theme upon service creation.\n *\n * @param {Partial<MnTheme>} [initial] An optional partial configuration object\n * for initializing the theme within the MnThemeService.\n * @return {Object} An object containing the provider configuration for the MnThemeService.\n */\nexport function provideMnThemeDynamic(initial?: Partial<MnTheme>) {\n return {\n provide: MnThemeService,\n useFactory: () => {\n const svc = new MnThemeService();\n if (initial) {\n svc.setInitialTheme({ ...initial });\n }\n return svc;\n }\n };\n}\n","import { InjectionToken, inject, Signal, computed } from '@angular/core';\nimport { MnThemeService } from './theme.service';\n\n/**\n * Represents the theme configuration for a UI component or application.\n *\n * This interface defines the structure for theming properties such as primary colors,\n * border radius, and padding specifications. It allows customization of visual appearance.\n *\n * Properties:\n * - `primary`: Specifies the primary color used in the theme, represented as a string.\n * - `radius`: Defines the border radius applied to elements for rounded corners, represented as a string.\n * - `padding`: Determines the default padding size for elements, represented as a string.\n */\nexport interface MnTheme {\n primary: string;\n radius: string;\n padding: string;\n}\n\n/**\n * Default theme configuration object for the MN framework.\n *\n * This variable contains the default values for the theme, including primary color,\n * border radius, and padding. The values are retrieved using the `getCssVar` function,\n * which falls back to predefined default values if the corresponding CSS variables are not set.\n *\n * Properties:\n * - `primary`: The primary color used across the theme.\n * - `radius`: The border radius applied to UI elements.\n * - `padding`: The default padding applied to components.\n */\nexport const MN_THEME_DEFAULTS: MnTheme = {\n primary: getCssVar('--mn-primary', '#ff0000'),\n radius: getCssVar('--mn-radius', '0.375rem'),\n padding: getCssVar('--mn-padding', '0.5rem 0.75rem'),\n};\n\n/**\n * Retrieves the value of a CSS variable from the root element.\n *\n * @param {string} name - The name of the CSS variable to retrieve, including the leading '--'.\n * @param {string} [fallback=''] - The fallback value to return if the variable is not set or empty.\n * @return {string} The value of the CSS variable, trimmed of whitespace. Returns the fallback value if the variable is not set.\n */\nfunction getCssVar(name: string, fallback: string = ''): string {\n const value = getComputedStyle(document.documentElement).getPropertyValue(name);\n return value ? value.trim() : fallback;\n}\n\n/**\n * Injection token used to provide a customizable theme configuration for the application.\n *\n * This token allows the injection of a theme object that can be used application-wide\n * for defining consistent styles, colors, and other design-related settings. By default,\n * it uses the fallback configuration `MN_THEME_DEFAULTS`.\n *\n * Scope: The token is provided in the root injector, ensuring it is available\n * throughout the application.\n *\n * Factory: The default factory function returns the value of `MN_THEME_DEFAULTS`,\n * providing a default theme configuration if no custom theme is explicitly provided.\n */\nexport const MN_THEME = new InjectionToken<MnTheme>('MN_THEME', {\n providedIn: 'root',\n factory: () => MN_THEME_DEFAULTS,\n});\n\n/**\n * Provides a theme configuration by merging the partial values with the default theme values.\n *\n * @param {Partial<MnTheme>} partial - A partial MnTheme object containing theme customizations.\n * @return {object} An object with provide and useValue properties to configure the theme.\n */\nexport function provideMnTheme(partial: Partial<MnTheme>) {\n return {\n provide: MN_THEME,\n useValue: { ...MN_THEME_DEFAULTS, ...partial },\n };\n}\n\n/**\n * Injects the theme configuration into the application.\n * This method attempts to retrieve a theme instance from the dependency injection system.\n * If no theme instance is found, it falls back to default theme settings.\n *\n * @return {MnTheme} The injected theme instance or the default theme settings.\n */\nexport function injectTheme(): MnTheme {\n const t = inject<MnTheme>(MN_THEME, { optional: true });\n return t ?? MN_THEME_DEFAULTS;\n}\n\n/**\n * Injects a theme signal, allowing access to the current theme state.\n * This method retrieves the theme signal from the MnThemeService, if available.\n * If the service is not available, it falls back to a computed snapshot of the theme.\n *\n * @return {Signal<MnTheme>} The theme signal representing the current theme.\n */\nexport function injectThemeSignal(): Signal<MnTheme> {\n const svc = inject(MnThemeService, { optional: true });\n\n if (svc) {\n return (('asReadonly' in svc.theme) ? (svc.theme as any).asReadonly() : svc.theme) as Signal<MnTheme>;\n }\n const snap = injectTheme();\n return computed(() => snap);\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport { InjectionToken } from '@angular/core';\nimport { MnAlert } from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport interface MnAlertConfig {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as any).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as any)[(partial as any).kind] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n this._alerts$.next([...this._alerts$.value, a]);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n setTimeout(() => this.dismiss(a.id), a.duration);\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this._alerts$.next([]);\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport { Injectable, Inject, Optional } from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\n\nexport interface MnShowInput {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor(\n private readonly store: MnAlertStore,\n @Optional() @Inject(MN_ALERT_CONFIG) cfg: MnAlertConfig | null\n ) {\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind});\n }\n}\n","\nimport {Component, Input, TemplateRef, ChangeDetectionStrategy, inject} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert} from '../mn-alert.types';\n\nexport interface MnAlertTemplateContext {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n @Input({ required: true }) template!: TemplateRef<MnAlertTemplateContext>;\n\n private store = inject(MnAlertStore);\n alerts$: Observable<MnAlert[]> = this.store.alerts$;\n\n constructor() {}\n\n dismissAlert(id: string) {\n this.store.dismiss(id);\n }\n\n trackById = (_: number, a: MnAlert) => a.id;\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n}\n","@if (alerts$ | async; as alerts) {\n @for (a of alerts; track trackById($index, a)) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(a)\">\n </ng-container>\n }\n}\n","import {Component} from '@angular/core';\n\n@Component({\n selector: 'lib-test',\n standalone: true,\n imports: [ ],\n templateUrl: './test.html',\n styleUrl: './test.css',\n})\nexport class Test {\n}\n","<p>test works!</p>\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnButtonVariants = tv({\n base: 'hover:cursor-pointer',\n variants: {\n size: {\n sm: 'px-2 py-1 text-sm',\n md: 'px-3 py-1.5 text-base',\n lg: 'px-4 py-2 text-lg',\n },\n\n variant: {\n fill: '',\n outline: 'bg-transparent border',\n text: 'bg-transparent',\n },\n\n // Intentionally empty; resolved via compoundVariants\n color: {\n primary: '',\n secondary: '',\n danger: '',\n warning: '',\n success: '',\n },\n\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n disabled: {\n true: 'opacity-50 pointer-events-none',\n }\n },\n\n compoundVariants: [\n // Fill\n { variant: 'fill', color: 'primary', class: 'bg-blue-600 text-white hover:bg-blue-700' },\n { variant: 'fill', color: 'secondary', class: 'bg-gray-600 text-white hover:bg-gray-700' },\n { variant: 'fill', color: 'danger', class: 'bg-red-600 text-white hover:bg-red-700' },\n { variant: 'fill', color: 'warning', class: 'bg-amber-500 text-black hover:bg-amber-600' },\n { variant: 'fill', color: 'success', class: 'bg-green-600 text-white hover:bg-green-700' },\n\n // Outline\n { variant: 'outline', color: 'primary', class: 'border-blue-600 text-blue-600 hover:bg-blue-100' },\n { variant: 'outline', color: 'secondary', class: 'border-gray-600 text-gray-700 hover:bg-gray-100' },\n { variant: 'outline', color: 'danger', class: 'border-red-600 text-red-600 hover:bg-red-100' },\n { variant: 'outline', color: 'warning', class: 'border-amber-500 text-amber-600 hover:bg-amber-100' },\n { variant: 'outline', color: 'success', class: 'border-green-600 text-green-600 hover:bg-green-100' },\n\n // Text\n { variant: 'text', color: 'primary', class: 'text-blue-600 hover:bg-blue-100' },\n { variant: 'text', color: 'secondary', class: 'text-gray-700 hover:bg-gray-100' },\n { variant: 'text', color: 'danger', class: 'text-red-600 hover:bg-red-100' },\n { variant: 'text', color: 'warning', class: 'text-amber-600 hover:bg-amber-100' },\n { variant: 'text', color: 'success', class: 'text-green-600 hover:bg-green-100' },\n ],\n\n defaultVariants: {\n size: 'md',\n variant: 'fill',\n color: 'primary',\n borderRadius: 'xl',\n disabled: false,\n },\n});\n\nexport type MnButtonVariants = VariantProps<typeof mnButtonVariants>;\n","import {Component, HostBinding, Input } from '@angular/core';\nimport { MnButtonTypes } from './mn-buttonTypes';\nimport { mnButtonVariants } from './mn-buttonVariants';\n\n@Component({\n selector: 'button[mnButton], a[mnButton]',\n standalone: true,\n templateUrl: './mn-button.html',\n})\nexport class MnButton {\n @Input() data: Partial<MnButtonTypes> = {};\n\n // Bind the computed classes to the host element\n @HostBinding('class')\n get hostClasses(): string {\n return mnButtonVariants({\n size: this.data.size,\n variant: this.data.variant,\n color: this.data.color,\n borderRadius: this.data.borderRadius,\n disabled: this.data.disabled,\n });\n }\n // For accessibility (works for both <button> and <a>)\n @HostBinding('attr.aria-disabled')\n get ariaDisabled() {\n return this.data.disabled ? 'true' : null;\n }\n\n // Only meaningful for <button>. For <a> it does nothing semantically.\n @HostBinding('attr.disabled')\n get disabledAttr() {\n return this.data.disabled ? '' : null;\n }\n\n // Make disabled anchors unfocusable + prevent activation\n @HostBinding('attr.tabindex')\n get tabIndex() {\n return this.data.disabled ? '-1' : null;\n }\n\n}\n","<ng-content></ng-content>\n","/**\n * MnInputField Adapters\n *\n * This module implements the Adapter Pattern to handle type-specific behavior\n * for different HTML input types in the MnInputField component.\n *\n * The adapter pattern allows the component to support multiple input types\n * (text, number, date, time, etc.) without coupling the component logic to\n * type-specific implementations. Each adapter handles:\n * - Parsing: converting raw string input to the appropriate data type\n * - Formatting: converting typed values back to string for display\n * - Attributes: providing type-specific DOM attributes (min, max, step, inputmode)\n * - Validation: implementing type-specific validation rules\n *\n * This approach keeps the component code clean and makes it easy to add\n * support for new input types by creating new adapters.\n */\n\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { MnInputDateTimeProps, MnInputProps, MnInputType } from './mn-input-fieldTypes';\n\n/**\n * DOM attributes that can be dynamically set on input elements.\n * These attributes are type-specific and provided by adapters.\n */\nexport type MnDomAttrs = {\n /** Minimum value for date/time/number inputs */\n min?: string | null;\n /** Maximum value for date/time/number inputs */\n max?: string | null;\n /** Step increment for number/date/time inputs */\n step?: string | null;\n /** Mobile keyboard hint (e.g., 'decimal' for number inputs) */\n inputmode?: string | null;\n};\n\n/**\n * Adapter interface for handling input type-specific behavior.\n *\n * Each adapter implementation defines how to handle a specific input type\n * (or group of related types) throughout the component lifecycle.\n *\n * @template TOut - The output type after parsing (e.g., string | null, number | null)\n */\nexport interface MnInputAdapter<TOut = string | null> {\n /**\n * Parses the raw string value from the input element into the typed value\n * that will be sent to the FormControl.\n *\n * @param raw - Raw string value from the input element\n * @returns Typed value to store in the FormControl\n *\n * @example\n * // Text adapter\n * parse('hello') // => 'hello'\n * parse('') // => null\n *\n * // Number adapter\n * parse('42') // => 42\n * parse('') // => null\n * parse('abc') // => null\n */\n parse(raw: string): TOut;\n\n /**\n * Formats the typed value from the FormControl into a string\n * that will be displayed in the input element.\n *\n * @param val - Typed value from the FormControl\n * @returns String representation for the input element's value attribute\n *\n * @example\n * // Text adapter\n * format('hello') // => 'hello'\n * format(null) // => ''\n *\n * // Number adapter\n * format(42) // => '42'\n * format(null) // => ''\n */\n format(val: unknown): string;\n\n /**\n * Returns type-specific DOM attributes for the input element.\n * These attributes are applied dynamically based on the input type and props.\n *\n * @param props - Input field properties\n * @returns Object containing DOM attributes (min, max, step, inputmode)\n *\n * @example\n * // Date adapter with date range\n * attrs({ startDate: '2024-01-01', endDate: '2024-12-31' })\n * // => { min: '2024-01-01', max: '2024-12-31' }\n *\n * // Number adapter\n * attrs({}) // => { inputmode: 'decimal' }\n */\n attrs(props: MnInputProps): MnDomAttrs;\n\n /**\n * Performs type-specific validation on the current input value.\n * This validation runs in addition to Angular's built-in validators.\n *\n * @param props - Input field properties (may contain validation constraints)\n * @param control - The AbstractControl being validated\n * @param currentRaw - Current raw string value from the input element\n * @returns ValidationErrors object if invalid, null if valid\n *\n * @example\n * // Date adapter validation\n * validate(props, control, '2024-06-15')\n * // Returns { mnMin: { min: '2024-07-01', actual: '2024-06-15' } }\n * // if startDate is '2024-07-01'\n */\n validate(props: MnInputProps, control: AbstractControl, currentRaw: string | null): ValidationErrors | null;\n}\n\n/**\n * Utility function to convert empty strings to null.\n * This is a common pattern for optional form fields where empty input\n * should be treated as \"no value\" rather than an empty string.\n *\n * @param raw - Raw input string\n * @returns The input string if non-empty, null if empty\n *\n * @example\n * emptyToNull('hello') // => 'hello'\n * emptyToNull('') // => null\n */\nconst emptyToNull = (raw: string): string | null => (raw === '' ? null : raw);\n\n/**\n * Default adapter for text-based input types.\n * Used for: text, email, password, search, tel, url\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Values are stored as strings in the FormControl\n * - No special DOM attributes\n * - No additional validation (relies on Angular's built-in validators)\n */\nexport const defaultTextAdapter: MnInputAdapter<string | null> = {\n parse: (raw) => emptyToNull(raw),\n format: (val) => (val == null ? '' : String(val)),\n attrs: () => ({}),\n validate: () => null,\n};\n\n/**\n * Adapter for date and time input types.\n * Used for: date, time, datetime-local\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Values are stored as ISO 8601 strings in the FormControl\n * - Provides min/max attributes from startDate/endDate props\n * - Validates date/time ranges using string comparison\n *\n * Note: String comparison works for ISO 8601 dates/times because they are\n * lexicographically ordered (e.g., '2024-01-15' < '2024-12-31').\n */\nexport const dateTimeAdapter: MnInputAdapter<string | null> = {\n parse: (raw) => emptyToNull(raw),\n format: (val) => (val == null ? '' : String(val)),\n attrs: (props) => ({\n min: (props as MnInputDateTimeProps).startDate ?? null,\n max: (props as MnInputDateTimeProps).endDate ?? null,\n }),\n validate: (props, _control, currentRaw) => {\n const value = currentRaw;\n if (!value) return null; // Don't validate empty values (use 'required' validator for that)\n\n const min = (props as MnInputDateTimeProps).startDate as string | undefined;\n const max = (props as MnInputDateTimeProps).endDate as string | undefined;\n\n // Validate minimum date/time constraint\n if (min && value < min) {\n return { mnMin: { min, actual: value } };\n }\n\n // Validate maximum date/time constraint\n if (max && value > max) {\n return { mnMax: { max, actual: value } };\n }\n\n return null;\n },\n};\n\n/**\n * Adapter for number input type.\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Valid numbers are parsed to number type\n * - Invalid numbers (NaN, Infinity) are converted to null\n * - Values are stored as numbers (or null) in the FormControl\n * - Sets inputmode='decimal' for optimized mobile keyboards\n * - No additional validation (relies on Angular's built-in validators)\n *\n * Note: The browser's native number input validation handles\n * basic number format validation automatically.\n */\nexport const numberAdapter: MnInputAdapter<number | null> = {\n parse: (raw) => {\n if (raw === '') return null;\n const num = Number(raw);\n return Number.isFinite(num) ? num : null;\n },\n format: (val) => (val == null ? '' : String(val)),\n attrs: () => ({\n inputmode: 'decimal',\n }),\n validate: () => null,\n};\n\n/**\n * Selects the appropriate adapter based on the input type.\n * This is the main factory function used by the MnInputField component\n * to determine which adapter to use for a given input type.\n *\n * @param type - The input type (e.g., 'text', 'email', 'date', 'number')\n * @returns The appropriate adapter instance\n *\n * @example\n * pickAdapter('text') // => defaultTextAdapter\n * pickAdapter('email') // => defaultTextAdapter\n * pickAdapter('date') // => dateTimeAdapter\n * pickAdapter('number') // => numberAdapter\n */\nexport function pickAdapter(type: MnInputType): MnInputAdapter<any> {\n // Date/time inputs use the dateTimeAdapter for range validation\n if (type === 'date' || type === 'time' || type === 'datetime-local') {\n return dateTimeAdapter;\n }\n\n // Number inputs use the numberAdapter for type conversion\n if (type === 'number') {\n return numberAdapter;\n }\n\n // All other input types use the default text adapter\n return defaultTextAdapter;\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnInputFieldVariants = tv({\n base: 'bg-white border-1 border-gray-500 placeholder-gray-500 text-sm',\n variants: {\n\n shadow: {\n true: 'shadow-lg',\n },\n size: {\n sm: 'p-2',\n md: 'p-3',\n lg: 'p-4',\n },\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n fullWidth: {\n true: 'w-full',\n }\n },\n defaultVariants: {\n size: 'md',\n borderRadius: 'md',\n }\n});\n\nexport type MnInputVariants = VariantProps<typeof mnInputFieldVariants>;\n","import {Component, Input} from '@angular/core';\n\n@Component({\n selector: 'lib-mn-error-message',\n imports: [],\n templateUrl: './mn-error-message.html',\n})\nexport class MnErrorMessage {\n @Input({ required: true }) errorMessage! :string;\n @Input({ required: true }) id!: string;\n}\n","<div [id]=\"id + '-error'\" class=\"text-red-500 mt-2 text-sm\">\n {{ errorMessage }}\n</div>\n","import {Component, Input, Optional, Self} from '@angular/core';\nimport {NgClass} from '@angular/common';\nimport {MnInputProps, MnErrorMessageData} from './mn-input-fieldTypes';\nimport {AbstractControl, NgControl, ValidationErrors, Validators} from '@angular/forms';\nimport {pickAdapter} from './mn-input-field-adapters';\nimport {mnInputFieldVariants} from './mn-input-fieldVariants';\nimport {MnErrorMessage} from '../mn-error-message/mn-error-message';\n\n/**\n * MnInputField Component\n *\n * A flexible, accessible input field component that implements Angular's ControlValueAccessor\n * and Validator interfaces. Supports multiple input types, custom validation messages,\n * and configurable error display (single or multiple errors).\n *\n * Features:\n * - Works with Angular Reactive Forms (FormControl, FormGroup)\n * - Supports standard and date/time input types\n * - Built-in error messages with internationalization support\n * - Custom error messages per field\n * - Priority-based error display or show all errors\n * - Full accessibility (ARIA attributes)\n * - Type-safe adapter pattern for different input types\n *\n * @example\n * ```typescript\n * <mn-input-field\n * formControlName=\"email\"\n * [props]=\"{\n * id: 'email',\n * type: 'email',\n * label: 'Email Address',\n * size: 'md',\n * borderRadius: 'md',\n * errorMessages: { required: 'Email is required' }\n * }\"\n * ></mn-input-field>\n * ```\n */\n@Component({\n selector: 'mn-input-field',\n standalone: true,\n imports: [NgClass, MnErrorMessage],\n templateUrl: './mn-input-field.html',\n})\nexport class MnInputField {\n /** Configuration properties for the input field */\n @Input({ required: true }) props!: MnInputProps;\n\n /** Current raw string value of the input element */\n value: string | null = null;\n\n /** Whether the input is disabled */\n isDisabled = false;\n\n /** Callback function to notify Angular forms of value changes */\n private onChange: (val: any) => void = () => {};\n\n /** Callback function to notify Angular forms when input is touched/blurred */\n private onTouched: () => void = () => {};\n\n /**\n * Built-in default error messages in English.\n * These are used when useBuiltInErrorMessages is true (default).\n * Can be overridden per-field using props.errorMessages.\n */\n private readonly builtInErrorMessages: Record<string, MnErrorMessageData> = {\n required: 'This field is required',\n email: 'Please enter a valid email address',\n minlength: (args: any) => `Minimum ${args.requiredLength} characters required`,\n maxlength: (args: any) => `Maximum ${args.requiredLength} characters allowed`,\n mnMin: (args: any) => `Date/time must be from ${args.min} onwards`,\n mnMax: (args: any) => `Date/time must be up to ${args.max}`,\n };\n\n /**\n * Constructor - Registers this component as the ControlValueAccessor\n * for the injected NgControl (FormControl).\n *\n * @param ngControl - Angular's NgControl (injected via Dependency Injection)\n */\n constructor(@Optional() @Self() public ngControl: NgControl) {\n if (this.ngControl) this.ngControl.valueAccessor = this;\n }\n\n /**\n * Gets the appropriate adapter based on the input type.\n * Adapters handle type-specific formatting, parsing, and validation.\n */\n private get adapter() {\n return pickAdapter(this.props.type);\n }\n\n // ========== ControlValueAccessor Implementation ==========\n\n /**\n * Writes a new value to the input element (called by Angular Forms).\n * Formats the value using the type-specific adapter.\n *\n * @param val - The value to write (type depends on input type)\n */\n writeValue(val: unknown): void {\n this.value = this.adapter.format(val);\n }\n\n /**\n * Registers a callback function to be called when the input value changes.\n *\n * @param fn - Callback function to notify Angular Forms of changes\n */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /**\n * Registers a callback function to be called when the input is touched/blurred.\n *\n * @param fn - Callback function to notify Angular Forms of touch events\n */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the input element.\n *\n * @param isDisabled - Whether the input should be disabled\n */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n }\n\n // ========== Event Handlers ==========\n\n /**\n * Handles input events from the input element.\n * Parses the raw string value and notifies Angular Forms.\n *\n * @param raw - Raw string value from the input element\n */\n handleInput(raw: string): void {\n this.value = raw;\n this.onChange(this.adapter.parse(raw));\n }\n\n /**\n * Handles blur events from the input element.\n * Notifies Angular Forms that the input has been touched.\n */\n handleBlur(): void {\n this.onTouched();\n }\n\n // ========== Validator Implementation ==========\n\n /**\n * Validates the control using the type-specific adapter.\n * Called by Angular Forms during validation.\n *\n * @param control - The AbstractControl to validate\n * @returns ValidationErrors if invalid, null if valid\n */\n validate(control: AbstractControl): ValidationErrors | null {\n return this.adapter.validate(this.props, control, this.value);\n }\n\n // ========== Template Attribute Getters ==========\n\n /**\n * Gets all DOM attributes from the adapter.\n * These are input-type-specific attributes (min, max, step, inputmode).\n */\n get domAttrs() {\n return this.adapter.attrs(this.props);\n }\n\n /** Min attribute for date/time/number inputs */\n get minAttr() {\n return this.domAttrs.min ?? null;\n }\n\n /** Max attribute for date/time/number inputs */\n get maxAttr() {\n return this.domAttrs.max ?? null;\n }\n\n /** Step attribute for number/date/time inputs */\n get stepAttr() {\n return this.domAttrs.step ?? null;\n }\n\n /** Inputmode attribute for mobile keyboard optimization */\n get inputmodeAttr() {\n return this.domAttrs.inputmode ?? null;\n }\n\n // ========== Error Handling ==========\n\n /**\n * Gets the FormControl instance from Angular Forms.\n * Returns null if no control is attached.\n */\n get control() {\n return this.ngControl?.control ?? null;\n }\n\n /**\n * Determines whether to show error messages.\n * Errors are shown when the control is invalid and has been touched or modified.\n */\n get showError(): boolean {\n const c = this.control;\n return !!c && c.invalid && (c.touched || c.dirty);\n }\n\n /**\n * Picks the error key to display based on errorPriority.\n * Used when showAllErrors is false (default).\n *\n * @param errors - ValidationErrors object from the control\n * @returns The error key to display\n */\n private pickErrorKey(errors: ValidationErrors): string {\n // If priority is specified, use the first matching error from the priority list\n if (this.props.errorPriority) {\n for (const key of this.props.errorPriority) {\n if (errors[key] !== undefined) {\n return key;\n }\n }\n }\n // Otherwise, use the first error key\n return Object.keys(errors)[0];\n }\n\n protected isRequired(): boolean {\n if (!this.control) return false;\n return this.control.hasValidator(Validators.required);\n }\n\n /**\n * Resolves a single error message for a specific error key.\n * Checks custom messages, built-in messages, and fallback in order.\n *\n * @param errorKey - The error key (e.g., 'required', 'email')\n * @param errors - All validation errors on the control\n * @returns The resolved error message string\n */\n private resolveErrorMessageForKey(errorKey: string, errors: ValidationErrors): string {\n const errorArgs = errors[errorKey];\n\n // Priority: custom > built-in > fallback > default\n const customMsg = this.props.errorMessages?.[errorKey];\n const useBuiltIn = this.props.useBuiltInErrorMessages !== false;\n const builtInMsg = useBuiltIn ? this.builtInErrorMessages[errorKey] : undefined;\n const fallbackMsg = this.props.defaultErrorMessage;\n\n const msgDef = customMsg ?? builtInMsg ?? fallbackMsg ?? 'Invalid input';\n\n // If the message is a function, call it with error arguments\n if (typeof msgDef === 'function') {\n return msgDef(errorArgs, errors);\n }\n return msgDef;\n }\n\n /**\n * Gets all error messages for the current control state.\n * Returns an array of error messages (used when showAllErrors is true).\n *\n * @returns Array of error message strings\n */\n get errorMessages(): string[] {\n const errors = this.control?.errors;\n if (!errors) return [];\n\n const errorKeys = Object.keys(errors);\n return errorKeys.map(key => this.resolveErrorMessageForKey(key, errors));\n }\n\n /**\n * Gets a single error message for the current control state.\n * Uses errorPriority to determine which error to show (when showAllErrors is false).\n *\n * @returns Single error message string, or null if no errors\n */\n get errorMessage(): string | null {\n const errors = this.control?.errors;\n if (!errors) return null;\n\n const errorKey = this.pickErrorKey(errors);\n return this.resolveErrorMessageForKey(errorKey, errors);\n }\n\n // ========== Resolved Properties ==========\n\n /** Resolved ID for the input element */\n get resolvedId(): string {\n return this.props.id;\n }\n\n /** Resolved name attribute for the input element */\n get resolvedName(): string | null {\n return this.props?.name ?? null;\n }\n\n /**\n * Computes the CSS classes from tailwind-variants based on the props.\n * Returns the variant classes for styling the input element.\n */\n get inputClasses(): string {\n return mnInputFieldVariants({\n size: this.props.size,\n borderRadius: this.props.borderRadius,\n shadow: this.props.shadow,\n fullWidth: this.props.fullWidth,\n });\n }\n}\n","<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (props.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ props.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"props.placeholder || null\"\n [attr.aria-label]=\"props.ariaLabel || props.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Represents the current section path based on nested mn-section directives.\n */\nexport const MN_SECTION_PATH = new InjectionToken<string[]>(\n 'MN_SECTION_PATH',\n {\n providedIn: 'root',\n factory: () => [],\n },\n);\n\n/**\n * Represents the current component instance id provided by [mn-instance].\n */\nexport const MN_INSTANCE_ID = new InjectionToken<string | null>(\n 'MN_INSTANCE_ID',\n {\n providedIn: 'root',\n factory: () => null,\n },\n);\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { firstValueFrom } from 'rxjs';\nimport { MnConfigFile } from './mn-config.types';\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return (\n typeof value === 'object' &&\n value !== null &&\n Object.prototype.toString.call(value) === '[object Object]'\n );\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnConfigService {\n private _config: MnConfigFile | null = null;\n\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Load the configuration JSON from the provided URL and cache it in memory.\n * Consumers should typically call this via the APP_INITIALIZER helper.\n */\n async load(url: string): Promise<void> {\n let json = await firstValueFrom(this.http.get<unknown>(url, { responseType: 'json' as const }));\n if (typeof json === 'string') {\n try {\n json = JSON.parse(json);\n } catch {\n json = {};\n }\n }\n const cfg = (isPlainObject(json) ? json : {}) as any;\n const defaults = (isPlainObject(cfg.defaults) ? cfg.defaults : {}) as Record<string, unknown>;\n const overrides = isPlainObject(cfg.overrides) ? cfg.overrides : cfg.overrides ?? {};\n this._config = { defaults, overrides };\n }\n\n /**\n * Resolve a configuration object for a component, optionally scoped to a section path\n * and optionally overridden by an instance id.\n */\n resolve<T extends object = any>(\n componentName: string,\n sectionPath: string[] = [],\n instanceId?: string,\n ): T {\n const baseConfig: Record<string, unknown> = isPlainObject(this._config?.defaults)\n ? (isPlainObject((this._config as MnConfigFile).defaults[componentName])\n ? { ...(this._config as MnConfigFile).defaults[componentName] as Record<string, unknown> }\n : {})\n : {};\n\n const leaf = this.walkOverrides(this._config?.overrides ?? {}, sectionPath);\n\n let resolved: Record<string, unknown> = baseConfig;\n\n if (leaf && isPlainObject((leaf as any)[componentName])) {\n resolved = this.deepMerge(resolved, (leaf as any)[componentName] as Record<string, unknown>);\n }\n\n if (instanceId) {\n const instKey = `#${instanceId}`;\n if (leaf && isPlainObject((leaf as any)[instKey])) {\n resolved = this.deepMerge(resolved, (leaf as any)[instKey] as Record<string, unknown>);\n }\n }\n\n return resolved as T;\n }\n\n /**\n * Walk the overrides nested object using the provided section path and return the leaf node.\n * If any segment is missing or the current node is not a plain object, returns undefined.\n */\n walkOverrides(overridesRoot: unknown, sectionPath: string[]): unknown | undefined {\n let node: unknown = overridesRoot;\n for (const segment of sectionPath) {\n if (!isPlainObject(node)) return undefined;\n node = (node as Record<string, unknown>)[segment];\n if (node === undefined) return undefined;\n }\n return node;\n }\n\n /**\n * Deep merge two plain-object trees. Arrays and non-plain values are replaced by the patch.\n * Does not mutate inputs; returns a new object.\n */\n deepMerge<A extends Record<string, any>, B extends Record<string, any>>(base: A, patch: B): A & B {\n const out: Record<string, any> = { ...base };\n for (const key of Object.keys(patch)) {\n const bVal = (base as any)[key];\n const pVal = (patch as any)[key];\n\n if (isPlainObject(bVal) && isPlainObject(pVal)) {\n out[key] = this.deepMerge(bVal, pVal);\n } else {\n // replace for arrays, primitives, null, undefined, and non-plain objects\n out[key] = pVal;\n }\n }\n return out as A & B;\n }\n}\n","import { InjectionToken, Optional, Provider } from '@angular/core';\nimport { MN_INSTANCE_ID, MN_SECTION_PATH } from '../context/mn-context.tokens';\nimport { MnConfigService } from './mn-config.service';\n\n/**\n * Helper to provide a resolved, typed component config via DI.\n *\n * Usage in a component/module providers:\n * const MY_CFG = new InjectionToken<MyCfg>('MY_CFG');\n * providers: [ provideMnComponentConfig(MY_CFG, 'my-component') ]\n * Then in the component:\n * readonly cfg = inject(MY_CFG)\n */\nexport function provideMnComponentConfig<T extends object>(\n token: InjectionToken<T>,\n componentName: string,\n initial?: Partial<T>,\n): Provider {\n return {\n provide: token,\n deps: [MnConfigService, [new Optional(), MN_SECTION_PATH], [new Optional(), MN_INSTANCE_ID]],\n useFactory: (svc: MnConfigService, sectionPath: string[] | null, instanceId: string | null): T => {\n const resolved = svc.resolve<T>(componentName, sectionPath ?? [], instanceId ?? undefined);\n // Apply optional initial (local defaults) over resolved? We prefer resolved to override initial local defaults,\n // so merge initial first, then resolved on top.\n return Object.assign({}, initial ?? {}, resolved);\n },\n };\n}\n","import { Component, InjectionToken, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { provideMnComponentConfig } from '../../config/mn-component-config.providers';\n\ninterface TestConfig {\n text?: string;\n color?: string;\n}\n\nexport const MN_TEST_COMPONENT_CONFIG = new InjectionToken<TestConfig>('MN_TEST_COMPONENT_CONFIG');\n\n@Component({\n selector: 'mn-test-component',\n standalone: true,\n imports: [CommonModule],\n providers: [\n provideMnComponentConfig<TestConfig>(MN_TEST_COMPONENT_CONFIG, 'test-component'),\n ],\n template: `\n <div class=\"mn-test\" [style.color]=\"(cfg.color ?? 'inherit')\">\n {{ cfg.text ?? 'Hello from component' }}\n </div>\n `,\n styles: [`\n .mn-test { font-weight: 600; padding: 8px 12px; border: 1px dashed #ddd; border-radius: 6px; }\n `]\n})\nexport class MnTestComponent {\n readonly cfg = inject(MN_TEST_COMPONENT_CONFIG);\n}\n","import {Component, Input} from '@angular/core';\nimport {NgOptimizedImage} from '@angular/common';\nimport { MnDualHorizontalImageTypes } from './mn-dual-horizontal-imageTypes';\n\n@Component({\n selector: 'lib-mn-dual-horizontal-image',\n standalone: true,\n imports: [\n NgOptimizedImage\n ],\n templateUrl: './mn-dual-horizontal-image.html',\n})\nexport class MnDualHorizontalImage {\n private _images: MnDualHorizontalImageTypes[] = [];\n\n @Input()\n set images(value: MnDualHorizontalImageTypes[]) {\n this._images = (value ?? []).slice(0, 2);\n }\n\n get images(): MnDualHorizontalImageTypes[] {\n return this._images;\n }\n}\n","<div class=\"flex flex-col w-full -space-y-5 md:-space-y-10 lg:-space-y-5\">\n @for (image of images; track image.id) {\n <div class=\"w-[75%] overflow-hidden rounded-3xl shadow-md md:w-[65%] lg:w-[80%] first:self-start last:self-end last:mb-4\">\n <img [ngSrc]=\"image.url\" width=\"150\" height=\"100\" class=\"size-full object-cover\" [alt]=\"image.alt\" />\n </div>\n } @empty {\n <p>No images found</p>\n }\n</div>\n\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnInformationCardVariants = tv({\n base: '',\n variants: {\n bottomBorder: {\n true: 'border-b border-b-2 border-brand-500',\n },\n shadow: {\n true: 'shadow-lg',\n },\n textPosition: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n },\n});\n\nexport type MnInformationCardVariants = VariantProps<typeof mnInformationCardVariants>;\n","import {Component, Input} from '@angular/core';\nimport {MnInformationCardData} from './mn-information-cardTypes';\nimport {mnInformationCardVariants} from './mn-information-cardVariants';\nimport {NgClass} from '@angular/common';\n\n@Component({\n selector: 'lib-mn-information-card',\n standalone: true,\n imports: [\n NgClass\n ],\n templateUrl: './mn-information-card.html',\n})\nexport class MnInformationCard<TExtra = unknown> {\n @Input({ required: true }) data!: MnInformationCardData<TExtra>;\n\n get hostClasses(): string {\n return mnInformationCardVariants({\n bottomBorder: this.data.bottomBorder,\n shadow: this.data.shadow,\n textPosition: this.data.textPosition,\n });\n }\n}\n\n","<div class=\"flex flex-col items-center gap-y-4 p-4 size-full\" [ngClass]=\"hostClasses\">\n<ng-content select=\"[header]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[footer]\"></ng-content>\n</div>\n","/**\n * Types for mn-lib configuration.\n */\n\nexport interface MnConfigFile {\n /**\n * Base defaults by component name. Each value is a plain object with inputs/options for that component.\n */\n defaults: Record<string, unknown>;\n /**\n * Nested object tree keyed by section names. Leaf nodes may contain\n * component-name keys (component override objects) and keys starting with '#'\n * representing instance-id overrides.\n */\n overrides: unknown;\n}\n","import { APP_INITIALIZER, Provider } from '@angular/core';\nimport { MnConfigService } from './mn-config.service';\n\n/**\n * Provides an APP_INITIALIZER that loads the mn-lib configuration from the given URL\n * during application bootstrap. The consuming application is responsible for providing\n * HttpClient (e.g., via HttpClientModule or provideHttpClient()).\n */\nexport function provideMnConfig(url: string): Provider[] {\n return [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: (svc: MnConfigService) => () => svc.load(url),\n deps: [MnConfigService],\n },\n ];\n}\n","import { Attribute, Directive, Input, Optional, SkipSelf } from '@angular/core';\nimport { MN_SECTION_PATH } from './mn-context.tokens';\n\n@Directive({\n selector: '[mn-section]',\n standalone: true,\n providers: [\n {\n provide: MN_SECTION_PATH,\n // Read parent MN_SECTION_PATH from ancestor injector (skipSelf to avoid self-reference),\n // and read the attribute value using Attribute so it's available at provider creation time.\n deps: [[new Optional(), new SkipSelf(), MN_SECTION_PATH], new Attribute('mn-section')],\n useFactory: (parentPath: string[] | null, attr: string | null) => {\n const parent = Array.isArray(parentPath) ? parentPath : [];\n const name = (attr ?? '').trim();\n return name ? [...parent, name] : [...parent];\n },\n },\n ],\n})\nexport class MnSectionDirective {\n /** Section name contributed by this DOM node to the section path */\n @Input('mn-section') mnSection: string | undefined;\n}\n","import { Attribute, Directive, Input } from '@angular/core';\nimport { MN_INSTANCE_ID } from './mn-context.tokens';\n\n@Directive({\n selector: '[mn-instance]',\n standalone: true,\n providers: [\n {\n provide: MN_INSTANCE_ID,\n // Read the attribute at provider creation time using Attribute token; Inputs may not be set yet.\n deps: [new Attribute('mn-instance')],\n useFactory: (attr: string | null) => (attr ?? '').trim() || null,\n },\n ],\n})\nexport class MnInstanceDirective {\n /** Instance id for targeting per-component instance overrides */\n @Input('mn-instance') mnInstance: string | undefined;\n}\n","/*\n * Public API Surface of mn-lib\n */\nexport * from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAGA;;;;;AAKG;MAEU,cAAc,CAAA;AACR,IAAA,MAAM,GAA4B,MAAM,CAAU,iBAAiB,kDAAC;AAErF,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;IAExB,YAAY,GAAqB,EAAE;AAE3C,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;AACtB,YAAA,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,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AFrB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,CAAA,aAAA,EAAA,YAAA,CAAA,EAAA,EAAA,SAAA,EATnB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;;AAEvB,gBAAA,IAAI,EAAE,CAAC,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;AACpC,gBAAA,UAAU,EAAE,CAAC,IAAmB,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI;AACjE,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAZ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;;AAEvB,4BAAA,IAAI,EAAE,CAAC,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;AACpC,4BAAA,UAAU,EAAE,CAAC,IAAmB,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI;AACjE,yBAAA;AACF,qBAAA;AACF,iBAAA;;sBAGE,KAAK;uBAAC,aAAa;;;ACjBtB;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"mn-angular-lib.mjs","sources":["../../../projects/mn-angular-lib/src/lib/styles/theme.service.ts","../../../projects/mn-angular-lib/src/lib/styles/themes.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/src/lib/features/mn-alert/mn-alert-outlet/mn-alert-outlet.html","../../../projects/mn-angular-lib/src/lib/features/test/test.ts","../../../projects/mn-angular-lib/src/lib/features/test/test.html","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-buttonVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-button.ts","../../../projects/mn-angular-lib/src/lib/features/mn-button/mn-button.html","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field-adapters.ts","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-fieldVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-error-message/mn-error-message.ts","../../../projects/mn-angular-lib/src/lib/features/mn-error-message/mn-error-message.html","../../../projects/mn-angular-lib/src/lib/config/mn-config.service.ts","../../../projects/mn-angular-lib/src/lib/context/mn-context.tokens.ts","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field.ts","../../../projects/mn-angular-lib/src/lib/features/mn-input-field/mn-input-field.html","../../../projects/mn-angular-lib/src/lib/config/mn-component-config.providers.ts","../../../projects/mn-angular-lib/src/lib/features/mn-test-component/mn-test-component.ts","../../../projects/mn-angular-lib/src/lib/features/mn-dual-horizontal-image/mn-dual-horizontal-image.ts","../../../projects/mn-angular-lib/src/lib/features/mn-dual-horizontal-image/mn-dual-horizontal-image.html","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-cardVariants.ts","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-card.ts","../../../projects/mn-angular-lib/src/lib/features/mn-information-card/mn-information-card.html","../../../projects/mn-angular-lib/src/lib/config/mn-config.types.ts","../../../projects/mn-angular-lib/src/lib/config/mn-config.providers.ts","../../../projects/mn-angular-lib/src/lib/context/mn-section.directive.ts","../../../projects/mn-angular-lib/src/lib/context/mn-instance.directive.ts","../../../projects/mn-angular-lib/src/public-api.ts","../../../projects/mn-angular-lib/src/mn-angular-lib.ts"],"sourcesContent":["import {Injectable, signal, WritableSignal, inject, Signal, effect} from '@angular/core';\nimport { MnTheme, MN_THEME_DEFAULTS } from './themes';\n\n/**\n * MnThemeService is responsible for managing the theme configuration of the application.\n * It provides methods to modify, reset, and access the current theme state.\n *\n * The theming is handled using a WritableSignal object, enabling reactive updates to the theme properties.\n */\n@Injectable({ providedIn: 'root' })\nexport class MnThemeService {\n private readonly _theme: WritableSignal<MnTheme> = signal<MnTheme>(MN_THEME_DEFAULTS);\n\n theme = this._theme.asReadonly();\n\n private initialTheme: Partial<MnTheme> = {};\n\n constructor() {\n effect(() => {\n const t = this.theme();\n document.documentElement.style.setProperty('--mn-primary', t.primary);\n });\n }\n\n /**\n * Updates the current theme by merging the provided partial theme properties with the existing theme.\n *\n * @param {Partial<MnTheme>} partial - An object containing partial theme properties to update the current theme.\n * @return {void} No return value.\n */\n setTheme(partial: Partial<MnTheme>) {\n const merged = { ...this._theme(), ...partial } as MnTheme;\n this._theme.set(merged);\n }\n\n /**\n * Sets the provided theme as the current theme.\n *\n * @param {MnTheme} next - The new theme to be set.\n * @return {void} This method does not return a value.\n */\n setAll(next: MnTheme) {\n this._theme.set(next);\n }\n\n /**\n * Resets the theme configuration to its default values.\n * This method updates the theme settings to reflect the predefined default theme constants.\n *\n * @return {void} Does not return any value.\n */\n reset(): void {\n this.setTheme(this.initialTheme);\n }\n\n setInitialTheme(initialTheme: Partial<MnTheme>) {\n const merged = { ...this._theme(), ...initialTheme } as MnTheme;\n this._theme.set(merged);\n this.initialTheme = initialTheme;\n }\n}\n\n/**\n * Provides a dynamically configurable theme service for the MnTheme module.\n * This function creates an Angular provider with a factory for initializing\n * the MnThemeService. If an initial theme configuration is supplied, it\n * will be used to set the theme upon service creation.\n *\n * @param {Partial<MnTheme>} [initial] An optional partial configuration object\n * for initializing the theme within the MnThemeService.\n * @return {Object} An object containing the provider configuration for the MnThemeService.\n */\nexport function provideMnThemeDynamic(initial?: Partial<MnTheme>) {\n return {\n provide: MnThemeService,\n useFactory: () => {\n const svc = new MnThemeService();\n if (initial) {\n svc.setInitialTheme({ ...initial });\n }\n return svc;\n }\n };\n}\n","import { InjectionToken, inject, Signal, computed } from '@angular/core';\nimport { MnThemeService } from './theme.service';\n\n/**\n * Represents the theme configuration for a UI component or application.\n *\n * This interface defines the structure for theming properties such as primary colors,\n * border radius, and padding specifications. It allows customization of visual appearance.\n *\n * Properties:\n * - `primary`: Specifies the primary color used in the theme, represented as a string.\n * - `radius`: Defines the border radius applied to elements for rounded corners, represented as a string.\n * - `padding`: Determines the default padding size for elements, represented as a string.\n */\nexport interface MnTheme {\n primary: string;\n radius: string;\n padding: string;\n}\n\n/**\n * Default theme configuration object for the MN framework.\n *\n * This variable contains the default values for the theme, including primary color,\n * border radius, and padding. The values are retrieved using the `getCssVar` function,\n * which falls back to predefined default values if the corresponding CSS variables are not set.\n *\n * Properties:\n * - `primary`: The primary color used across the theme.\n * - `radius`: The border radius applied to UI elements.\n * - `padding`: The default padding applied to components.\n */\nexport const MN_THEME_DEFAULTS: MnTheme = {\n primary: getCssVar('--mn-primary', '#ff0000'),\n radius: getCssVar('--mn-radius', '0.375rem'),\n padding: getCssVar('--mn-padding', '0.5rem 0.75rem'),\n};\n\n/**\n * Retrieves the value of a CSS variable from the root element.\n *\n * @param {string} name - The name of the CSS variable to retrieve, including the leading '--'.\n * @param {string} [fallback=''] - The fallback value to return if the variable is not set or empty.\n * @return {string} The value of the CSS variable, trimmed of whitespace. Returns the fallback value if the variable is not set.\n */\nfunction getCssVar(name: string, fallback: string = ''): string {\n const value = getComputedStyle(document.documentElement).getPropertyValue(name);\n return value ? value.trim() : fallback;\n}\n\n/**\n * Injection token used to provide a customizable theme configuration for the application.\n *\n * This token allows the injection of a theme object that can be used application-wide\n * for defining consistent styles, colors, and other design-related settings. By default,\n * it uses the fallback configuration `MN_THEME_DEFAULTS`.\n *\n * Scope: The token is provided in the root injector, ensuring it is available\n * throughout the application.\n *\n * Factory: The default factory function returns the value of `MN_THEME_DEFAULTS`,\n * providing a default theme configuration if no custom theme is explicitly provided.\n */\nexport const MN_THEME = new InjectionToken<MnTheme>('MN_THEME', {\n providedIn: 'root',\n factory: () => MN_THEME_DEFAULTS,\n});\n\n/**\n * Provides a theme configuration by merging the partial values with the default theme values.\n *\n * @param {Partial<MnTheme>} partial - A partial MnTheme object containing theme customizations.\n * @return {object} An object with provide and useValue properties to configure the theme.\n */\nexport function provideMnTheme(partial: Partial<MnTheme>) {\n return {\n provide: MN_THEME,\n useValue: { ...MN_THEME_DEFAULTS, ...partial },\n };\n}\n\n/**\n * Injects the theme configuration into the application.\n * This method attempts to retrieve a theme instance from the dependency injection system.\n * If no theme instance is found, it falls back to default theme settings.\n *\n * @return {MnTheme} The injected theme instance or the default theme settings.\n */\nexport function injectTheme(): MnTheme {\n const t = inject<MnTheme>(MN_THEME, { optional: true });\n return t ?? MN_THEME_DEFAULTS;\n}\n\n/**\n * Injects a theme signal, allowing access to the current theme state.\n * This method retrieves the theme signal from the MnThemeService, if available.\n * If the service is not available, it falls back to a computed snapshot of the theme.\n *\n * @return {Signal<MnTheme>} The theme signal representing the current theme.\n */\nexport function injectThemeSignal(): Signal<MnTheme> {\n const svc = inject(MnThemeService, { optional: true });\n\n if (svc) {\n return (('asReadonly' in svc.theme) ? (svc.theme as any).asReadonly() : svc.theme) as Signal<MnTheme>;\n }\n const snap = injectTheme();\n return computed(() => snap);\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport { InjectionToken } from '@angular/core';\nimport { MnAlert } from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport interface MnAlertConfig {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as any).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as any)[(partial as any).kind] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n this._alerts$.next([...this._alerts$.value, a]);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n setTimeout(() => this.dismiss(a.id), a.duration);\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this._alerts$.next([]);\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport { Injectable, Inject, Optional } from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\n\nexport interface MnShowInput {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor(\n private readonly store: MnAlertStore,\n @Optional() @Inject(MN_ALERT_CONFIG) cfg: MnAlertConfig | null\n ) {\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind});\n }\n}\n","\nimport {Component, Input, TemplateRef, ChangeDetectionStrategy, inject} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert} from '../mn-alert.types';\n\nexport interface MnAlertTemplateContext {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n @Input({ required: true }) template!: TemplateRef<MnAlertTemplateContext>;\n\n private store = inject(MnAlertStore);\n alerts$: Observable<MnAlert[]> = this.store.alerts$;\n\n constructor() {}\n\n dismissAlert(id: string) {\n this.store.dismiss(id);\n }\n\n trackById = (_: number, a: MnAlert) => a.id;\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n}\n","@if (alerts$ | async; as alerts) {\n @for (a of alerts; track trackById($index, a)) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(a)\">\n </ng-container>\n }\n}\n","import {Component} from '@angular/core';\n\n@Component({\n selector: 'lib-test',\n standalone: true,\n imports: [ ],\n templateUrl: './test.html',\n styleUrl: './test.css',\n})\nexport class Test {\n}\n","<p>test works!</p>\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnButtonVariants = tv({\n base: 'hover:cursor-pointer',\n variants: {\n size: {\n sm: 'px-2 py-1 text-sm',\n md: 'px-3 py-1.5 text-base',\n lg: 'px-4 py-2 text-lg',\n },\n\n variant: {\n fill: '',\n outline: 'bg-transparent border',\n text: 'bg-transparent',\n },\n\n // Intentionally empty; resolved via compoundVariants\n color: {\n primary: '',\n secondary: '',\n danger: '',\n warning: '',\n success: '',\n },\n\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n disabled: {\n true: 'opacity-50 pointer-events-none',\n }\n },\n\n compoundVariants: [\n // Fill\n { variant: 'fill', color: 'primary', class: 'bg-blue-600 text-white hover:bg-blue-700' },\n { variant: 'fill', color: 'secondary', class: 'bg-gray-600 text-white hover:bg-gray-700' },\n { variant: 'fill', color: 'danger', class: 'bg-red-600 text-white hover:bg-red-700' },\n { variant: 'fill', color: 'warning', class: 'bg-amber-500 text-black hover:bg-amber-600' },\n { variant: 'fill', color: 'success', class: 'bg-green-600 text-white hover:bg-green-700' },\n\n // Outline\n { variant: 'outline', color: 'primary', class: 'border-blue-600 text-blue-600 hover:bg-blue-100' },\n { variant: 'outline', color: 'secondary', class: 'border-gray-600 text-gray-700 hover:bg-gray-100' },\n { variant: 'outline', color: 'danger', class: 'border-red-600 text-red-600 hover:bg-red-100' },\n { variant: 'outline', color: 'warning', class: 'border-amber-500 text-amber-600 hover:bg-amber-100' },\n { variant: 'outline', color: 'success', class: 'border-green-600 text-green-600 hover:bg-green-100' },\n\n // Text\n { variant: 'text', color: 'primary', class: 'text-blue-600 hover:bg-blue-100' },\n { variant: 'text', color: 'secondary', class: 'text-gray-700 hover:bg-gray-100' },\n { variant: 'text', color: 'danger', class: 'text-red-600 hover:bg-red-100' },\n { variant: 'text', color: 'warning', class: 'text-amber-600 hover:bg-amber-100' },\n { variant: 'text', color: 'success', class: 'text-green-600 hover:bg-green-100' },\n ],\n\n defaultVariants: {\n size: 'md',\n variant: 'fill',\n color: 'primary',\n borderRadius: 'xl',\n disabled: false,\n },\n});\n\nexport type MnButtonVariants = VariantProps<typeof mnButtonVariants>;\n","import {Component, HostBinding, Input } from '@angular/core';\nimport { MnButtonTypes } from './mn-buttonTypes';\nimport { mnButtonVariants } from './mn-buttonVariants';\n\n@Component({\n selector: 'button[mnButton], a[mnButton]',\n standalone: true,\n templateUrl: './mn-button.html',\n})\nexport class MnButton {\n @Input() data: Partial<MnButtonTypes> = {};\n\n // Bind the computed classes to the host element\n @HostBinding('class')\n get hostClasses(): string {\n return mnButtonVariants({\n size: this.data.size,\n variant: this.data.variant,\n color: this.data.color,\n borderRadius: this.data.borderRadius,\n disabled: this.data.disabled,\n });\n }\n // For accessibility (works for both <button> and <a>)\n @HostBinding('attr.aria-disabled')\n get ariaDisabled() {\n return this.data.disabled ? 'true' : null;\n }\n\n // Only meaningful for <button>. For <a> it does nothing semantically.\n @HostBinding('attr.disabled')\n get disabledAttr() {\n return this.data.disabled ? '' : null;\n }\n\n // Make disabled anchors unfocusable + prevent activation\n @HostBinding('attr.tabindex')\n get tabIndex() {\n return this.data.disabled ? '-1' : null;\n }\n\n}\n","<ng-content></ng-content>\n","/**\n * MnInputField Adapters\n *\n * This module implements the Adapter Pattern to handle type-specific behavior\n * for different HTML input types in the MnInputField component.\n *\n * The adapter pattern allows the component to support multiple input types\n * (text, number, date, time, etc.) without coupling the component logic to\n * type-specific implementations. Each adapter handles:\n * - Parsing: converting raw string input to the appropriate data type\n * - Formatting: converting typed values back to string for display\n * - Attributes: providing type-specific DOM attributes (min, max, step, inputmode)\n * - Validation: implementing type-specific validation rules\n *\n * This approach keeps the component code clean and makes it easy to add\n * support for new input types by creating new adapters.\n */\n\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { MnInputDateTimeProps, MnInputProps, MnInputType } from './mn-input-fieldTypes';\n\n/**\n * DOM attributes that can be dynamically set on input elements.\n * These attributes are type-specific and provided by adapters.\n */\nexport type MnDomAttrs = {\n /** Minimum value for date/time/number inputs */\n min?: string | null;\n /** Maximum value for date/time/number inputs */\n max?: string | null;\n /** Step increment for number/date/time inputs */\n step?: string | null;\n /** Mobile keyboard hint (e.g., 'decimal' for number inputs) */\n inputmode?: string | null;\n};\n\n/**\n * Adapter interface for handling input type-specific behavior.\n *\n * Each adapter implementation defines how to handle a specific input type\n * (or group of related types) throughout the component lifecycle.\n *\n * @template TOut - The output type after parsing (e.g., string | null, number | null)\n */\nexport interface MnInputAdapter<TOut = string | null> {\n /**\n * Parses the raw string value from the input element into the typed value\n * that will be sent to the FormControl.\n *\n * @param raw - Raw string value from the input element\n * @returns Typed value to store in the FormControl\n *\n * @example\n * // Text adapter\n * parse('hello') // => 'hello'\n * parse('') // => null\n *\n * // Number adapter\n * parse('42') // => 42\n * parse('') // => null\n * parse('abc') // => null\n */\n parse(raw: string): TOut;\n\n /**\n * Formats the typed value from the FormControl into a string\n * that will be displayed in the input element.\n *\n * @param val - Typed value from the FormControl\n * @returns String representation for the input element's value attribute\n *\n * @example\n * // Text adapter\n * format('hello') // => 'hello'\n * format(null) // => ''\n *\n * // Number adapter\n * format(42) // => '42'\n * format(null) // => ''\n */\n format(val: unknown): string;\n\n /**\n * Returns type-specific DOM attributes for the input element.\n * These attributes are applied dynamically based on the input type and props.\n *\n * @param props - Input field properties\n * @returns Object containing DOM attributes (min, max, step, inputmode)\n *\n * @example\n * // Date adapter with date range\n * attrs({ startDate: '2024-01-01', endDate: '2024-12-31' })\n * // => { min: '2024-01-01', max: '2024-12-31' }\n *\n * // Number adapter\n * attrs({}) // => { inputmode: 'decimal' }\n */\n attrs(props: MnInputProps): MnDomAttrs;\n\n /**\n * Performs type-specific validation on the current input value.\n * This validation runs in addition to Angular's built-in validators.\n *\n * @param props - Input field properties (may contain validation constraints)\n * @param control - The AbstractControl being validated\n * @param currentRaw - Current raw string value from the input element\n * @returns ValidationErrors object if invalid, null if valid\n *\n * @example\n * // Date adapter validation\n * validate(props, control, '2024-06-15')\n * // Returns { mnMin: { min: '2024-07-01', actual: '2024-06-15' } }\n * // if startDate is '2024-07-01'\n */\n validate(props: MnInputProps, control: AbstractControl, currentRaw: string | null): ValidationErrors | null;\n}\n\n/**\n * Utility function to convert empty strings to null.\n * This is a common pattern for optional form fields where empty input\n * should be treated as \"no value\" rather than an empty string.\n *\n * @param raw - Raw input string\n * @returns The input string if non-empty, null if empty\n *\n * @example\n * emptyToNull('hello') // => 'hello'\n * emptyToNull('') // => null\n */\nconst emptyToNull = (raw: string): string | null => (raw === '' ? null : raw);\n\n/**\n * Default adapter for text-based input types.\n * Used for: text, email, password, search, tel, url\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Values are stored as strings in the FormControl\n * - No special DOM attributes\n * - No additional validation (relies on Angular's built-in validators)\n */\nexport const defaultTextAdapter: MnInputAdapter<string | null> = {\n parse: (raw) => emptyToNull(raw),\n format: (val) => (val == null ? '' : String(val)),\n attrs: () => ({}),\n validate: () => null,\n};\n\n/**\n * Adapter for date and time input types.\n * Used for: date, time, datetime-local\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Values are stored as ISO 8601 strings in the FormControl\n * - Provides min/max attributes from startDate/endDate props\n * - Validates date/time ranges using string comparison\n *\n * Note: String comparison works for ISO 8601 dates/times because they are\n * lexicographically ordered (e.g., '2024-01-15' < '2024-12-31').\n */\nexport const dateTimeAdapter: MnInputAdapter<string | null> = {\n parse: (raw) => emptyToNull(raw),\n format: (val) => (val == null ? '' : String(val)),\n attrs: (props) => ({\n min: (props as MnInputDateTimeProps).startDate ?? null,\n max: (props as MnInputDateTimeProps).endDate ?? null,\n }),\n validate: (props, _control, currentRaw) => {\n const value = currentRaw;\n if (!value) return null; // Don't validate empty values (use 'required' validator for that)\n\n const min = (props as MnInputDateTimeProps).startDate as string | undefined;\n const max = (props as MnInputDateTimeProps).endDate as string | undefined;\n\n // Validate minimum date/time constraint\n if (min && value < min) {\n return { mnMin: { min, actual: value } };\n }\n\n // Validate maximum date/time constraint\n if (max && value > max) {\n return { mnMax: { max, actual: value } };\n }\n\n return null;\n },\n};\n\n/**\n * Adapter for number input type.\n *\n * Behavior:\n * - Empty strings are converted to null\n * - Valid numbers are parsed to number type\n * - Invalid numbers (NaN, Infinity) are converted to null\n * - Values are stored as numbers (or null) in the FormControl\n * - Sets inputmode='decimal' for optimized mobile keyboards\n * - No additional validation (relies on Angular's built-in validators)\n *\n * Note: The browser's native number input validation handles\n * basic number format validation automatically.\n */\nexport const numberAdapter: MnInputAdapter<number | null> = {\n parse: (raw) => {\n if (raw === '') return null;\n const num = Number(raw);\n return Number.isFinite(num) ? num : null;\n },\n format: (val) => (val == null ? '' : String(val)),\n attrs: () => ({\n inputmode: 'decimal',\n }),\n validate: () => null,\n};\n\n/**\n * Selects the appropriate adapter based on the input type.\n * This is the main factory function used by the MnInputField component\n * to determine which adapter to use for a given input type.\n *\n * @param type - The input type (e.g., 'text', 'email', 'date', 'number')\n * @returns The appropriate adapter instance\n *\n * @example\n * pickAdapter('text') // => defaultTextAdapter\n * pickAdapter('email') // => defaultTextAdapter\n * pickAdapter('date') // => dateTimeAdapter\n * pickAdapter('number') // => numberAdapter\n */\nexport function pickAdapter(type: MnInputType): MnInputAdapter<any> {\n // Date/time inputs use the dateTimeAdapter for range validation\n if (type === 'date' || type === 'time' || type === 'datetime-local') {\n return dateTimeAdapter;\n }\n\n // Number inputs use the numberAdapter for type conversion\n if (type === 'number') {\n return numberAdapter;\n }\n\n // All other input types use the default text adapter\n return defaultTextAdapter;\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnInputFieldVariants = tv({\n base: 'bg-white border-1 border-gray-500 placeholder-gray-500 text-sm',\n variants: {\n\n shadow: {\n true: 'shadow-lg',\n },\n size: {\n sm: 'p-2',\n md: 'p-3',\n lg: 'p-4',\n },\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n fullWidth: {\n true: 'w-full',\n }\n },\n defaultVariants: {\n size: 'md',\n borderRadius: 'md',\n }\n});\n\nexport type MnInputVariants = VariantProps<typeof mnInputFieldVariants>;\n","import {Component, Input} from '@angular/core';\n\n@Component({\n selector: 'lib-mn-error-message',\n imports: [],\n templateUrl: './mn-error-message.html',\n})\nexport class MnErrorMessage {\n @Input({ required: true }) errorMessage! :string;\n @Input({ required: true }) id!: string;\n}\n","<div [id]=\"id + '-error'\" class=\"text-red-500 mt-2 text-sm\">\n {{ errorMessage }}\n</div>\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { firstValueFrom } from 'rxjs';\nimport { MnConfigFile } from './mn-config.types';\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return (\n typeof value === 'object' &&\n value !== null &&\n Object.prototype.toString.call(value) === '[object Object]'\n );\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnConfigService {\n private _config: MnConfigFile | null = null;\n\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Load the configuration JSON from the provided URL and cache it in memory.\n * Consumers should typically call this via the APP_INITIALIZER helper.\n */\n async load(url: string): Promise<void> {\n let json = await firstValueFrom(this.http.get<unknown>(url, { responseType: 'json' as const }));\n if (typeof json === 'string') {\n try {\n json = JSON.parse(json);\n } catch {\n json = {};\n }\n }\n const cfg = (isPlainObject(json) ? json : {}) as any;\n const defaults = (isPlainObject(cfg.defaults) ? cfg.defaults : {}) as Record<string, unknown>;\n const overrides = isPlainObject(cfg.overrides) ? cfg.overrides : cfg.overrides ?? {};\n this._config = { defaults, overrides };\n }\n\n /**\n * Resolve a configuration object for a component, optionally scoped to a section path\n * and optionally overridden by an instance id.\n */\n resolve<T extends object = any>(\n componentName: string,\n sectionPath: string[] = [],\n instanceId?: string,\n ): T {\n const baseConfig: Record<string, unknown> = isPlainObject(this._config?.defaults)\n ? (isPlainObject((this._config as MnConfigFile).defaults[componentName])\n ? { ...(this._config as MnConfigFile).defaults[componentName] as Record<string, unknown> }\n : {})\n : {};\n\n const leaf = this.walkOverrides(this._config?.overrides ?? {}, sectionPath);\n\n let resolved: Record<string, unknown> = baseConfig;\n\n if (leaf && isPlainObject((leaf as any)[componentName])) {\n resolved = this.deepMerge(resolved, (leaf as any)[componentName] as Record<string, unknown>);\n }\n\n if (instanceId) {\n const instKey = `#${instanceId}`;\n if (leaf && isPlainObject((leaf as any)[instKey])) {\n resolved = this.deepMerge(resolved, (leaf as any)[instKey] as Record<string, unknown>);\n }\n }\n\n console.debug(`[MnConfig] Resolving for ${componentName}`, {\n sectionPath,\n instanceId,\n resolved,\n });\n\n return resolved as T;\n }\n\n /**\n * Walk the overrides nested object using the provided section path and return the leaf node.\n * If any segment is missing or the current node is not a plain object, returns undefined.\n */\n walkOverrides(overridesRoot: unknown, sectionPath: string[]): unknown | undefined {\n let node: unknown = overridesRoot;\n for (const segment of sectionPath) {\n if (!isPlainObject(node)) return undefined;\n node = (node as Record<string, unknown>)[segment];\n if (node === undefined) return undefined;\n }\n return node;\n }\n\n /**\n * Deep merge two plain-object trees. Arrays and non-plain values are replaced by the patch.\n * Does not mutate inputs; returns a new object.\n */\n deepMerge<A extends Record<string, any>, B extends Record<string, any>>(base: A, patch: B): A & B {\n const out: Record<string, any> = { ...base };\n for (const key of Object.keys(patch)) {\n const bVal = (base as any)[key];\n const pVal = (patch as any)[key];\n\n if (isPlainObject(bVal) && isPlainObject(pVal)) {\n out[key] = this.deepMerge(bVal, pVal);\n } else {\n // replace for arrays, primitives, null, undefined, and non-plain objects\n out[key] = pVal;\n }\n }\n return out as A & B;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Represents the current section path based on nested mn-section directives.\n */\nexport const MN_SECTION_PATH = new InjectionToken<string[]>(\n 'MN_SECTION_PATH',\n {\n providedIn: 'root',\n factory: () => [],\n },\n);\n\n/**\n * Represents the current component instance id provided by [mn-instance].\n */\nexport const MN_INSTANCE_ID = new InjectionToken<string | null>(\n 'MN_INSTANCE_ID',\n {\n providedIn: 'root',\n factory: () => null,\n },\n);\n","import {Component, inject, InjectionToken, Input, OnInit, Optional, Self} from '@angular/core';\nimport {NgClass} from '@angular/common';\nimport {MnInputProps, MnErrorMessageData, MnInputFieldUIConfig} from './mn-input-fieldTypes';\nimport {AbstractControl, NgControl, ValidationErrors, Validators} from '@angular/forms';\nimport {pickAdapter} from './mn-input-field-adapters';\nimport {mnInputFieldVariants} from './mn-input-fieldVariants';\nimport {MnErrorMessage} from '../mn-error-message/mn-error-message';\nimport {MnConfigService} from \"../../config/mn-config.service\";\nimport {MN_INSTANCE_ID, MN_SECTION_PATH} from \"../../context/mn-context.tokens\";\n\nexport const MN_INPUT_FIELD_CONFIG = new InjectionToken<MnInputFieldUIConfig>('MN_INPUT_FIELD_CONFIG');\n\n/**\n * MnInputField Component\n *\n * A flexible, accessible input field component that implements Angular's ControlValueAccessor\n * and Validator interfaces. Supports multiple input types, custom validation messages,\n * and configurable error display (single or multiple errors).\n *\n * Features:\n * - Works with Angular Reactive Forms (FormControl, FormGroup)\n * - Supports standard and date/time input types\n * - Built-in error messages with internationalization support\n * - Custom error messages per field\n * - Priority-based error display or show all errors\n * - Full accessibility (ARIA attributes)\n * - Type-safe adapter pattern for different input types\n *\n * @example\n * ```typescript\n * <mn-input-field\n * formControlName=\"email\"\n * [props]=\"{\n * id: 'email',\n * type: 'email',\n * label: 'Email Address',\n * size: 'md',\n * borderRadius: 'md',\n * errorMessages: { required: 'Email is required' }\n * }\"\n * ></mn-input-field>\n * ```\n */\n@Component({\n selector: 'mn-input-field',\n standalone: true,\n imports: [NgClass, MnErrorMessage],\n templateUrl: './mn-input-field.html',\n})\nexport class MnInputField implements OnInit {\n /** Resolved UI configuration for the input field */\n protected uiConfig: MnInputFieldUIConfig = {};\n\n /** Configuration properties for the input field */\n @Input({ required: true }) props!: MnInputProps;\n\n private readonly configService = inject(MnConfigService);\n private readonly sectionPath = inject(MN_SECTION_PATH, { optional: true }) ?? [];\n private readonly explicitInstanceId = inject(MN_INSTANCE_ID, { optional: true });\n\n /** Current raw string value of the input element */\n value: string | null = null;\n\n /** Whether the input is disabled */\n isDisabled = false;\n\n /** Callback function to notify Angular forms of value changes */\n private onChange: (val: any) => void = () => {};\n\n /** Callback function to notify Angular forms when input is touched/blurred */\n private onTouched: () => void = () => {};\n\n /**\n * Built-in default error messages in English.\n * These are used when useBuiltInErrorMessages is true (default).\n * Can be overridden per-field using props.errorMessages.\n */\n private readonly builtInErrorMessages: Record<string, MnErrorMessageData> = {\n required: 'This field is required',\n email: 'Please enter a valid email address',\n minlength: (args: any) => `Minimum ${args.requiredLength} characters required`,\n maxlength: (args: any) => `Maximum ${args.requiredLength} characters allowed`,\n mnMin: (args: any) => `Date/time must be from ${args.min} onwards`,\n mnMax: (args: any) => `Date/time must be up to ${args.max}`,\n };\n\n /**\n * Constructor - Registers this component as the ControlValueAccessor\n * for the injected NgControl (FormControl).\n *\n * @param ngControl - Angular's NgControl (injected via Dependency Injection)\n */\n constructor(@Optional() @Self() public ngControl: NgControl) {\n if (this.ngControl) this.ngControl.valueAccessor = this;\n }\n\n ngOnInit() {\n this.resolveConfig();\n }\n\n private resolveConfig() {\n const instanceId = this.explicitInstanceId || `mn-input-${this.props.id}`;\n this.uiConfig = this.configService.resolve<MnInputFieldUIConfig>(\n 'mn-input-field',\n this.sectionPath,\n instanceId\n );\n }\n\n /**\n * Gets the appropriate adapter based on the input type.\n * Adapters handle type-specific formatting, parsing, and validation.\n */\n private get adapter() {\n return pickAdapter(this.props.type);\n }\n\n // ========== ControlValueAccessor Implementation ==========\n\n /**\n * Writes a new value to the input element (called by Angular Forms).\n * Formats the value using the type-specific adapter.\n *\n * @param val - The value to write (type depends on input type)\n */\n writeValue(val: unknown): void {\n this.value = this.adapter.format(val);\n }\n\n /**\n * Registers a callback function to be called when the input value changes.\n *\n * @param fn - Callback function to notify Angular Forms of changes\n */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /**\n * Registers a callback function to be called when the input is touched/blurred.\n *\n * @param fn - Callback function to notify Angular Forms of touch events\n */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the input element.\n *\n * @param isDisabled - Whether the input should be disabled\n */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n }\n\n // ========== Event Handlers ==========\n\n /**\n * Handles input events from the input element.\n * Parses the raw string value and notifies Angular Forms.\n *\n * @param raw - Raw string value from the input element\n */\n handleInput(raw: string): void {\n this.value = raw;\n this.onChange(this.adapter.parse(raw));\n }\n\n /**\n * Handles blur events from the input element.\n * Notifies Angular Forms that the input has been touched.\n */\n handleBlur(): void {\n this.onTouched();\n }\n\n // ========== Validator Implementation ==========\n\n /**\n * Validates the control using the type-specific adapter.\n * Called by Angular Forms during validation.\n *\n * @param control - The AbstractControl to validate\n * @returns ValidationErrors if invalid, null if valid\n */\n validate(control: AbstractControl): ValidationErrors | null {\n return this.adapter.validate(this.props, control, this.value);\n }\n\n // ========== Template Attribute Getters ==========\n\n /**\n * Gets all DOM attributes from the adapter.\n * These are input-type-specific attributes (min, max, step, inputmode).\n */\n get domAttrs() {\n return this.adapter.attrs(this.props);\n }\n\n /** Min attribute for date/time/number inputs */\n get minAttr() {\n return this.domAttrs.min ?? null;\n }\n\n /** Max attribute for date/time/number inputs */\n get maxAttr() {\n return this.domAttrs.max ?? null;\n }\n\n /** Step attribute for number/date/time inputs */\n get stepAttr() {\n return this.domAttrs.step ?? null;\n }\n\n /** Inputmode attribute for mobile keyboard optimization */\n get inputmodeAttr() {\n return this.domAttrs.inputmode ?? null;\n }\n\n // ========== Error Handling ==========\n\n /**\n * Gets the FormControl instance from Angular Forms.\n * Returns null if no control is attached.\n */\n get control() {\n return this.ngControl?.control ?? null;\n }\n\n /**\n * Determines whether to show error messages.\n * Errors are shown when the control is invalid and has been touched or modified.\n */\n get showError(): boolean {\n const c = this.control;\n return !!c && c.invalid && (c.touched || c.dirty);\n }\n\n /**\n * Picks the error key to display based on errorPriority.\n * Used when showAllErrors is false (default).\n *\n * @param errors - ValidationErrors object from the control\n * @returns The error key to display\n */\n private pickErrorKey(errors: ValidationErrors): string {\n // If priority is specified, use the first matching error from the priority list\n if (this.props.errorPriority) {\n for (const key of this.props.errorPriority) {\n if (errors[key] !== undefined) {\n return key;\n }\n }\n }\n // Otherwise, use the first error key\n return Object.keys(errors)[0];\n }\n\n protected isRequired(): boolean {\n if (!this.control) return false;\n return this.control.hasValidator(Validators.required);\n }\n\n /**\n * Resolves a single error message for a specific error key.\n * Checks custom messages, built-in messages, and fallback in order.\n *\n * @param errorKey - The error key (e.g., 'required', 'email')\n * @param errors - All validation errors on the control\n * @returns The resolved error message string\n */\n private resolveErrorMessageForKey(errorKey: string, errors: ValidationErrors): string {\n const errorArgs = errors[errorKey];\n\n // Priority: custom > built-in > fallback > default\n const customMsg = this.props.errorMessages?.[errorKey];\n const useBuiltIn = this.props.useBuiltInErrorMessages !== false;\n const builtInMsg = useBuiltIn ? this.builtInErrorMessages[errorKey] : undefined;\n const fallbackMsg = this.props.defaultErrorMessage;\n\n const msgDef = customMsg ?? builtInMsg ?? fallbackMsg ?? 'Invalid input';\n\n // If the message is a function, call it with error arguments\n if (typeof msgDef === 'function') {\n return msgDef(errorArgs, errors);\n }\n return msgDef;\n }\n\n /**\n * Gets all error messages for the current control state.\n * Returns an array of error messages (used when showAllErrors is true).\n *\n * @returns Array of error message strings\n */\n get errorMessages(): string[] {\n const errors = this.control?.errors;\n if (!errors) return [];\n\n const errorKeys = Object.keys(errors);\n return errorKeys.map(key => this.resolveErrorMessageForKey(key, errors));\n }\n\n /**\n * Gets a single error message for the current control state.\n * Uses errorPriority to determine which error to show (when showAllErrors is false).\n *\n * @returns Single error message string, or null if no errors\n */\n get errorMessage(): string | null {\n const errors = this.control?.errors;\n if (!errors) return null;\n\n const errorKey = this.pickErrorKey(errors);\n return this.resolveErrorMessageForKey(errorKey, errors);\n }\n\n // ========== Resolved Properties ==========\n\n /** Resolved ID for the input element */\n get resolvedId(): string {\n return this.props.id;\n }\n\n /** Resolved name attribute for the input element */\n get resolvedName(): string | null {\n return this.props?.name ?? null;\n }\n\n /**\n * Computes the CSS classes from tailwind-variants based on the props.\n * Returns the variant classes for styling the input element.\n */\n get inputClasses(): string {\n return mnInputFieldVariants({\n size: this.props.size,\n borderRadius: this.props.borderRadius,\n shadow: this.props.shadow,\n fullWidth: this.props.fullWidth,\n });\n }\n}\n","<div class=\"flex flex-col\" [class.is-fullwidth]=\"props.fullWidth\">\n <!-- Label -->\n @if (uiConfig.label) {\n <label class=\"pl-2 pb-1 flex flex-row gap-x-0.5! text-base!\" [attr.for]=\"resolvedId\">\n <p>{{ uiConfig.label }}</p>\n @if (isRequired()) {\n <span class=\"text-red-500 \">*</span>\n }\n </label>\n }\n\n <!-- Input Element -->\n <input\n [id]=\"resolvedId\"\n [attr.name]=\"resolvedName\"\n [type]=\"props.type\"\n [attr.placeholder]=\"uiConfig.placeholder || null\"\n [attr.aria-label]=\"uiConfig.ariaLabel || uiConfig.label || null\"\n [attr.aria-invalid]=\"showError || null\"\n [attr.aria-describedby]=\"showError ? resolvedId + '-error' : null\"\n [disabled]=\"isDisabled\"\n [attr.min]=\"minAttr\"\n [attr.max]=\"maxAttr\"\n [value]=\"value ?? ''\"\n [ngClass]=\"inputClasses\"\n (input)=\"handleInput(($any($event.target)).value)\"\n (blur)=\"handleBlur()\"\n />\n\n <!-- Error Messages -->\n @if (showError) {\n <!-- Show all errors mode -->\n @if (props.showAllErrors) {\n <div class=\"flex flex-col gap-y-1\">\n @for (error of errorMessages; track $index) {\n <lib-mn-error-message [errorMessage]=\"error\" [id]=\"resolvedId + '-' + $index\"></lib-mn-error-message>\n }\n </div>\n } @else {\n @if (errorMessage != null) {\n <lib-mn-error-message [errorMessage]=\"errorMessage\" [id]=\"resolvedId\"></lib-mn-error-message>\n\n }\n }\n }\n</div>\n","import { InjectionToken, Optional, Provider } from '@angular/core';\nimport { MN_INSTANCE_ID, MN_SECTION_PATH } from '../context/mn-context.tokens';\nimport { MnConfigService } from './mn-config.service';\n\n/**\n * Helper to provide a resolved, typed component config via DI.\n *\n * Usage in a component/module providers:\n * const MY_CFG = new InjectionToken<MyCfg>('MY_CFG');\n * providers: [ provideMnComponentConfig(MY_CFG, 'my-component') ]\n * Then in the component:\n * readonly cfg = inject(MY_CFG)\n */\nexport function provideMnComponentConfig<T extends object>(\n token: InjectionToken<T>,\n componentName: string,\n initial?: Partial<T>,\n): Provider {\n return {\n provide: token,\n deps: [MnConfigService, [new Optional(), MN_SECTION_PATH], [new Optional(), MN_INSTANCE_ID]],\n useFactory: (svc: MnConfigService, sectionPath: string[] | null, instanceId: string | null): T => {\n const resolved = svc.resolve<T>(componentName, sectionPath ?? [], instanceId ?? undefined);\n // Apply optional initial (local defaults) over resolved? We prefer resolved to override initial local defaults,\n // so merge initial first, then resolved on top.\n return Object.assign({}, initial ?? {}, resolved);\n },\n };\n}\n","import { Component, InjectionToken, inject } from '@angular/core';\n\nimport { provideMnComponentConfig } from '../../config/mn-component-config.providers';\n\ninterface TestConfig {\n text?: string;\n color?: string;\n}\n\nexport const MN_TEST_COMPONENT_CONFIG = new InjectionToken<TestConfig>('MN_TEST_COMPONENT_CONFIG');\n\n@Component({\n selector: 'mn-test-component',\n standalone: true,\n imports: [],\n providers: [\n provideMnComponentConfig<TestConfig>(MN_TEST_COMPONENT_CONFIG, 'test-component'),\n ],\n template: `\n <div class=\"mn-test\" [style.color]=\"(cfg.color ?? 'inherit')\">\n {{ cfg.text ?? 'Hello from component' }}\n </div>\n `,\n styles: [`\n .mn-test { font-weight: 600; padding: 8px 12px; border: 1px dashed #ddd; border-radius: 6px; }\n `]\n})\nexport class MnTestComponent {\n readonly cfg = inject(MN_TEST_COMPONENT_CONFIG);\n}\n","import {Component, Input} from '@angular/core';\nimport {NgOptimizedImage} from '@angular/common';\nimport { MnDualHorizontalImageTypes } from './mn-dual-horizontal-imageTypes';\n\n@Component({\n selector: 'lib-mn-dual-horizontal-image',\n standalone: true,\n imports: [\n NgOptimizedImage\n ],\n templateUrl: './mn-dual-horizontal-image.html',\n})\nexport class MnDualHorizontalImage {\n private _images: MnDualHorizontalImageTypes[] = [];\n\n @Input()\n set images(value: MnDualHorizontalImageTypes[]) {\n this._images = (value ?? []).slice(0, 2);\n }\n\n get images(): MnDualHorizontalImageTypes[] {\n return this._images;\n }\n}\n","<div class=\"flex flex-col w-full -space-y-5 md:-space-y-10 lg:-space-y-5\">\n @for (image of images; track image.id) {\n <div class=\"w-[75%] overflow-hidden rounded-3xl shadow-md md:w-[65%] lg:w-[80%] first:self-start last:self-end last:mb-4\">\n <img [ngSrc]=\"image.url\" width=\"150\" height=\"100\" class=\"size-full object-cover\" [alt]=\"image.alt\" />\n </div>\n } @empty {\n <p>No images found</p>\n }\n</div>\n\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnInformationCardVariants = tv({\n base: '',\n variants: {\n bottomBorder: {\n true: 'border-b border-b-2 border-brand-500',\n },\n shadow: {\n true: 'shadow-lg',\n },\n textPosition: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n borderRadius: {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n two_xl: 'rounded-2xl',\n three_xl: 'rounded-3xl',\n four_xl: 'rounded-4xl',\n },\n },\n});\n\nexport type MnInformationCardVariants = VariantProps<typeof mnInformationCardVariants>;\n","import {Component, Input} from '@angular/core';\nimport {MnInformationCardData} from './mn-information-cardTypes';\nimport {mnInformationCardVariants} from './mn-information-cardVariants';\nimport {NgClass} from '@angular/common';\n\n@Component({\n selector: 'lib-mn-information-card',\n standalone: true,\n imports: [\n NgClass\n ],\n templateUrl: './mn-information-card.html',\n})\nexport class MnInformationCard<TExtra = unknown> {\n @Input({ required: true }) data!: MnInformationCardData<TExtra>;\n\n get hostClasses(): string {\n return mnInformationCardVariants({\n bottomBorder: this.data.bottomBorder,\n shadow: this.data.shadow,\n textPosition: this.data.textPosition,\n });\n }\n}\n\n","<div class=\"flex flex-col items-center gap-y-4 p-4 size-full\" [ngClass]=\"hostClasses\">\n<ng-content select=\"[header]\"></ng-content>\n<ng-content></ng-content>\n<ng-content select=\"[footer]\"></ng-content>\n</div>\n","/**\n * Types for mn-lib configuration.\n */\n\nexport interface MnConfigFile {\n /**\n * Base defaults by component name. Each value is a plain object with inputs/options for that component.\n */\n defaults: Record<string, unknown>;\n /**\n * Nested object tree keyed by section names. Leaf nodes may contain\n * component-name keys (component override objects) and keys starting with '#'\n * representing instance-id overrides.\n */\n overrides: unknown;\n}\n","import { APP_INITIALIZER, Provider } from '@angular/core';\nimport { MnConfigService } from './mn-config.service';\n\n/**\n * Provides an APP_INITIALIZER that loads the mn-lib configuration from the given URL\n * during application bootstrap. The consuming application is responsible for providing\n * HttpClient (e.g., via HttpClientModule or provideHttpClient()).\n */\nexport function provideMnConfig(url: string): Provider[] {\n return [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: (svc: MnConfigService) => () => svc.load(url),\n deps: [MnConfigService],\n },\n ];\n}\n","import { Attribute, Directive, Input, Optional, SkipSelf } from '@angular/core';\nimport { MN_SECTION_PATH } from './mn-context.tokens';\n\n@Directive({\n selector: '[mn-section]',\n standalone: true,\n providers: [\n {\n provide: MN_SECTION_PATH,\n // Read parent MN_SECTION_PATH from ancestor injector (skipSelf to avoid self-reference),\n // and read the attribute value using Attribute so it's available at provider creation time.\n deps: [[new Optional(), new SkipSelf(), MN_SECTION_PATH], new Attribute('mn-section')],\n useFactory: (parentPath: string[] | null, attr: string | null) => {\n const parent = Array.isArray(parentPath) ? parentPath : [];\n const name = (attr ?? '').trim();\n return name ? [...parent, name] : [...parent];\n },\n },\n ],\n})\nexport class MnSectionDirective {\n /** Section name contributed by this DOM node to the section path */\n @Input('mn-section') mnSection: string | undefined;\n}\n","import { Attribute, Directive, Input } from '@angular/core';\nimport { MN_INSTANCE_ID } from './mn-context.tokens';\n\n@Directive({\n selector: '[mn-instance]',\n standalone: true,\n providers: [\n {\n provide: MN_INSTANCE_ID,\n // Read the attribute at provider creation time using Attribute token; Inputs may not be set yet.\n deps: [new Attribute('mn-instance')],\n useFactory: (attr: string | null) => (attr ?? '').trim() || null,\n },\n ],\n})\nexport class MnInstanceDirective {\n /** Instance id for targeting per-component instance overrides */\n @Input('mn-instance') mnInstance: string | undefined;\n}\n","/*\n * Public API Surface of mn-lib\n */\nexport * from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAGA;;;;;AAKG;MAEU,cAAc,CAAA;AACR,IAAA,MAAM,GAA4B,MAAM,CAAU,iBAAiB,kDAAC;AAErF,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;IAExB,YAAY,GAAqB,EAAE;AAE3C,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;AACtB,YAAA,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC;AACvE,QAAA,CAAC,CAAC;IACJ;AAEA;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAAyB,EAAA;AAChC,QAAA,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAa;AAC1D,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;IACzB;AAEA;;;;;AAKG;AACH,IAAA,MAAM,CAAC,IAAa,EAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;IACvB;AAEA;;;;;AAKG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;IAClC;AAEA,IAAA,eAA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iBAAA;;sBAGE,KAAK;uBAAC,aAAa;;;ACjBtB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.0",
6
6
  "@angular/core": "^20.3.0"
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "sideEffects": false,
20
20
  "module": "fesm2022/mn-angular-lib.mjs",
21
- "typings": "index.d.ts",
21
+ "typings": "types/mn-angular-lib.d.ts",
22
22
  "exports": {
23
23
  "./package.json": {
24
24
  "default": "./package.json"
25
25
  },
26
26
  ".": {
27
- "types": "./index.d.ts",
27
+ "types": "./types/mn-angular-lib.d.ts",
28
28
  "default": "./fesm2022/mn-angular-lib.mjs"
29
29
  }
30
30
  }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Signal, Provider, TemplateRef } from '@angular/core';
2
+ import { InjectionToken, Signal, Provider, TemplateRef, OnInit } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as tailwind_variants from 'tailwind-variants';
@@ -442,12 +442,6 @@ interface MnInputBaseProps {
442
442
  name?: string;
443
443
  /** Type of input field (text, email, date, etc.) */
444
444
  type: MnInputType;
445
- /** Label text displayed above the input field */
446
- label?: string;
447
- /** Placeholder text shown inside the input when empty */
448
- placeholder?: string;
449
- /** ARIA label for screen readers (falls back to label if not provided) */
450
- ariaLabel?: string;
451
445
  /** Size variant of the input field (default: 'md') */
452
446
  size?: MnInputVariants['size'];
453
447
  /** Border radius variant (default: 'md') */
@@ -487,6 +481,18 @@ interface MnInputBaseProps {
487
481
  */
488
482
  showAllErrors?: boolean;
489
483
  }
484
+ /**
485
+ * Configuration for MnInputField resolved from MnConfigService.
486
+ * Contains UI properties that can ONLY be set via configuration.
487
+ */
488
+ interface MnInputFieldUIConfig {
489
+ /** Label text displayed above the input field */
490
+ label?: string;
491
+ /** Placeholder text shown inside the input when empty */
492
+ placeholder?: string;
493
+ /** ARIA label for screen readers (falls back to label if not provided) */
494
+ ariaLabel?: string;
495
+ }
490
496
  /**
491
497
  * Properties for standard input fields (text, email, password, tel, url, number, search).
492
498
  * Excludes date/time input types which have additional properties.
@@ -511,6 +517,7 @@ interface MnInputDateTimeProps extends MnInputBaseProps {
511
517
  */
512
518
  type MnInputProps = MnInputFieldProps | MnInputDateTimeProps;
513
519
 
520
+ declare const MN_INPUT_FIELD_CONFIG: InjectionToken<MnInputFieldUIConfig>;
514
521
  /**
515
522
  * MnInputField Component
516
523
  *
@@ -542,10 +549,15 @@ type MnInputProps = MnInputFieldProps | MnInputDateTimeProps;
542
549
  * ></mn-input-field>
543
550
  * ```
544
551
  */
545
- declare class MnInputField {
552
+ declare class MnInputField implements OnInit {
546
553
  ngControl: NgControl;
554
+ /** Resolved UI configuration for the input field */
555
+ protected uiConfig: MnInputFieldUIConfig;
547
556
  /** Configuration properties for the input field */
548
557
  props: MnInputProps;
558
+ private readonly configService;
559
+ private readonly sectionPath;
560
+ private readonly explicitInstanceId;
549
561
  /** Current raw string value of the input element */
550
562
  value: string | null;
551
563
  /** Whether the input is disabled */
@@ -567,6 +579,8 @@ declare class MnInputField {
567
579
  * @param ngControl - Angular's NgControl (injected via Dependency Injection)
568
580
  */
569
581
  constructor(ngControl: NgControl);
582
+ ngOnInit(): void;
583
+ private resolveConfig;
570
584
  /**
571
585
  * Gets the appropriate adapter based on the input type.
572
586
  * Adapters handle type-specific formatting, parsing, and validation.
@@ -1054,5 +1068,5 @@ declare class MnInstanceDirective {
1054
1068
  static ɵdir: i0.ɵɵDirectiveDeclaration<MnInstanceDirective, "[mn-instance]", never, { "mnInstance": { "alias": "mn-instance"; "required": false; }; }, {}, never, never, true, never>;
1055
1069
  }
1056
1070
 
1057
- export { DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MN_INSTANCE_ID, MN_SECTION_PATH, MN_TEST_COMPONENT_CONFIG, MN_THEME, MN_THEME_DEFAULTS, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnButton, MnConfigService, MnDualHorizontalImage, MnInformationCard, MnInputField, MnInstanceDirective, MnSectionDirective, MnTestComponent, MnThemeService, Test, dateTimeAdapter, defaultTextAdapter, injectTheme, injectThemeSignal, mnInformationCardVariants, mnInputFieldVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnComponentConfig, provideMnConfig, provideMnTheme, provideMnThemeDynamic };
1058
- export type { MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnConfigFile, MnDomAttrs, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessagesData, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputProps, MnInputType, MnInputVariants, MnShowInput, MnTheme };
1071
+ export { DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_SECTION_PATH, MN_TEST_COMPONENT_CONFIG, MN_THEME, MN_THEME_DEFAULTS, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnButton, MnConfigService, MnDualHorizontalImage, MnInformationCard, MnInputField, MnInstanceDirective, MnSectionDirective, MnTestComponent, MnThemeService, Test, dateTimeAdapter, defaultTextAdapter, injectTheme, injectThemeSignal, mnInformationCardVariants, mnInputFieldVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnComponentConfig, provideMnConfig, provideMnTheme, provideMnThemeDynamic };
1072
+ export type { MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnConfigFile, MnDomAttrs, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessagesData, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnShowInput, MnTheme };