mn-angular-lib 1.0.53 → 1.0.54

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.
@@ -7698,6 +7698,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
7698
7698
  class MnTabComponent {
7699
7699
  /** Data source containing tab items and default active index. */
7700
7700
  dataSource;
7701
+ /**
7702
+ * Whether to enable horizontal scrolling when items overflow.
7703
+ * If true, tabs will scroll horizontally instead of shrinking too much.
7704
+ */
7705
+ scrollable = false;
7706
+ /**
7707
+ * Whether tabs should stretch to fill the available width.
7708
+ * Defaults to false, so tabs only take as much space as their content.
7709
+ */
7710
+ justified = false;
7701
7711
  /** Emits the newly activated tab item whenever the active tab changes. */
7702
7712
  activeChange = new EventEmitter();
7703
7713
  /** The currently active tab item. */
@@ -7722,13 +7732,17 @@ class MnTabComponent {
7722
7732
  }
7723
7733
  }
7724
7734
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7725
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MnTabComponent, isStandalone: true, selector: "mn-tab", inputs: { dataSource: "dataSource" }, outputs: { activeChange: "activeChange" }, ngImport: i0, template: "<div class=\"w-full mb-10 flex justify-center\">\n <div class=\"inline-flex rounded-lg p-2 bg-base-100 shadow-md\">\n <div role=\"tablist\" class=\"tabs flex\">\n @for (item of dataSource.items; track item.label) {\n <div\n role=\"tab\"\n class=\"tab px-4 min-w-36 py-2 border-b-2 cursor-pointer select-none transition-colors\"\n [class.text-brand-500]=\"currentActive === item\"\n [class.font-bold]=\"currentActive === item\"\n [class.border-brand-500]=\"currentActive === item\"\n [class.border-base-300]=\"currentActive !== item\"\n [class.text-base-content]=\"currentActive !== item\"\n [attr.aria-selected]=\"currentActive === item\"\n (click)=\"setActive(item)\"\n >\n {{ item.label | mnTranslate }}\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: MnTranslatePipe, name: "mnTranslate" }] });
7735
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MnTabComponent, isStandalone: true, selector: "mn-tab", inputs: { dataSource: "dataSource", scrollable: "scrollable", justified: "justified" }, outputs: { activeChange: "activeChange" }, ngImport: i0, template: "<div class=\"mb-10\">\n <div\n class=\"flex justify-start scrollbar-hide\"\n [class.overflow-x-auto]=\"scrollable\"\n [class.overflow-y-hidden]=\"scrollable\"\n >\n <div\n role=\"tablist\"\n class=\"tabs flex flex-nowrap -mb-[1px] border-b border-base-300\"\n [class.w-full]=\"justified\"\n >\n @for (item of dataSource.items; track item.label) {\n <div\n role=\"tab\"\n class=\"tab px-4 py-2 border-b-2 cursor-pointer select-none transition-colors whitespace-nowrap text-center\"\n [class.flex-1]=\"justified\"\n [class.text-primary]=\"currentActive === item\"\n [class.font-bold]=\"currentActive === item\"\n [class.border-primary]=\"currentActive === item\"\n [class.border-transparent]=\"currentActive !== item\"\n [class.text-base-content]=\"currentActive !== item\"\n [attr.aria-selected]=\"currentActive === item\"\n (click)=\"setActive(item)\"\n >\n {{ item.label | mnTranslate }}\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: MnTranslatePipe, name: "mnTranslate" }] });
7726
7736
  }
7727
7737
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnTabComponent, decorators: [{
7728
7738
  type: Component,
7729
- args: [{ selector: 'mn-tab', standalone: true, imports: [MnTranslatePipe], template: "<div class=\"w-full mb-10 flex justify-center\">\n <div class=\"inline-flex rounded-lg p-2 bg-base-100 shadow-md\">\n <div role=\"tablist\" class=\"tabs flex\">\n @for (item of dataSource.items; track item.label) {\n <div\n role=\"tab\"\n class=\"tab px-4 min-w-36 py-2 border-b-2 cursor-pointer select-none transition-colors\"\n [class.text-brand-500]=\"currentActive === item\"\n [class.font-bold]=\"currentActive === item\"\n [class.border-brand-500]=\"currentActive === item\"\n [class.border-base-300]=\"currentActive !== item\"\n [class.text-base-content]=\"currentActive !== item\"\n [attr.aria-selected]=\"currentActive === item\"\n (click)=\"setActive(item)\"\n >\n {{ item.label | mnTranslate }}\n </div>\n }\n </div>\n </div>\n</div>\n" }]
7739
+ args: [{ selector: 'mn-tab', standalone: true, imports: [MnTranslatePipe, CommonModule], template: "<div class=\"mb-10\">\n <div\n class=\"flex justify-start scrollbar-hide\"\n [class.overflow-x-auto]=\"scrollable\"\n [class.overflow-y-hidden]=\"scrollable\"\n >\n <div\n role=\"tablist\"\n class=\"tabs flex flex-nowrap -mb-[1px] border-b border-base-300\"\n [class.w-full]=\"justified\"\n >\n @for (item of dataSource.items; track item.label) {\n <div\n role=\"tab\"\n class=\"tab px-4 py-2 border-b-2 cursor-pointer select-none transition-colors whitespace-nowrap text-center\"\n [class.flex-1]=\"justified\"\n [class.text-primary]=\"currentActive === item\"\n [class.font-bold]=\"currentActive === item\"\n [class.border-primary]=\"currentActive === item\"\n [class.border-transparent]=\"currentActive !== item\"\n [class.text-base-content]=\"currentActive !== item\"\n [attr.aria-selected]=\"currentActive === item\"\n (click)=\"setActive(item)\"\n >\n {{ item.label | mnTranslate }}\n </div>\n }\n </div>\n </div>\n</div>\n" }]
7730
7740
  }], propDecorators: { dataSource: [{
7731
7741
  type: Input
7742
+ }], scrollable: [{
7743
+ type: Input
7744
+ }], justified: [{
7745
+ type: Input
7732
7746
  }], activeChange: [{
7733
7747
  type: Output
7734
7748
  }] } });