@angular-material-extensions/fab-menu
Version:
Angular Material component that allow users to select a county or nationality
18 lines • 10.1 kB
JavaScript
import { Component } from '@angular/core';
import { MatFabMenuComponent } from '../mat-fab-menu.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/button";
import * as i3 from "@angular/material/icon";
import * as i4 from "@angular/material/tooltip";
import * as i5 from "@angular/flex-layout/flex";
import * as i6 from "@angular/flex-layout/extended";
export class MatMiniFabMenuComponent extends MatFabMenuComponent {
}
MatMiniFabMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MatMiniFabMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
MatMiniFabMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: MatMiniFabMenuComponent, selector: "mat-mini-fab-menu", usesInheritance: true, ngImport: i0, template: "<div [fxLayout]=\"layout\" class=\"container\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <div fxLayoutAlign=\"center\">\n <button (click)=\"isActive = !isActive\"\n [color]=\"color\" [disabled]=\"disabled\"\n type=\"button\"\n [ngClass]=\"{\n 'mat-fab' : !isActive,\n 'mat-mini-fab' : isActive\n }\"\n mat-mini-fab>\n <mat-icon [@fabToggler]=\"{value: isActive}\">{{icon}}</mat-icon> <!-- Animation here -->\n </button>\n </div>\n <div *ngIf=\"isActive\" [@fabsStagger]=\"fabButtons.length\"\n [fxLayout]=\"layout2\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <button (click)=\"selectFabMenu(fab)\"\n *ngFor=\"let fab of fabButtons\"\n [color]=\"fab?.color\"\n [matTooltip]=\"fab?.tooltip\"\n [matTooltipPosition]=\"fab?.tooltipPosition\"\n [ngClass]=\"{'fullSVG' : fab?.imgUrl}\"\n type=\"button\"\n mat-fab>\n <mat-icon *ngIf=\"fab?.icon\" [color]=\"fab?.iconColor\">{{fab?.icon}}</mat-icon>\n <img *ngIf=\"fab?.imgUrl\" [src]=\"fab?.imgUrl\" alt=\"icon\">\n </button>\n </div>\n</div>\n", styles: [":host{display:block}.fullSVG img{width:100%}.fullSVG ::ng-deep span.mat-button-wrapper{padding:0}.container>div{margin-bottom:5px}.container>div button{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MatMiniFabMenuComponent, decorators: [{
type: Component,
args: [{ selector: 'mat-mini-fab-menu', template: "<div [fxLayout]=\"layout\" class=\"container\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <div fxLayoutAlign=\"center\">\n <button (click)=\"isActive = !isActive\"\n [color]=\"color\" [disabled]=\"disabled\"\n type=\"button\"\n [ngClass]=\"{\n 'mat-fab' : !isActive,\n 'mat-mini-fab' : isActive\n }\"\n mat-mini-fab>\n <mat-icon [@fabToggler]=\"{value: isActive}\">{{icon}}</mat-icon> <!-- Animation here -->\n </button>\n </div>\n <div *ngIf=\"isActive\" [@fabsStagger]=\"fabButtons.length\"\n [fxLayout]=\"layout2\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <button (click)=\"selectFabMenu(fab)\"\n *ngFor=\"let fab of fabButtons\"\n [color]=\"fab?.color\"\n [matTooltip]=\"fab?.tooltip\"\n [matTooltipPosition]=\"fab?.tooltipPosition\"\n [ngClass]=\"{'fullSVG' : fab?.imgUrl}\"\n type=\"button\"\n mat-fab>\n <mat-icon *ngIf=\"fab?.icon\" [color]=\"fab?.iconColor\">{{fab?.icon}}</mat-icon>\n <img *ngIf=\"fab?.imgUrl\" [src]=\"fab?.imgUrl\" alt=\"icon\">\n </button>\n </div>\n</div>\n", styles: [":host{display:block}.fullSVG img{width:100%}.fullSVG ::ng-deep span.mat-button-wrapper{padding:0}.container>div{margin-bottom:5px}.container>div button{margin-bottom:16px}\n"] }]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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