UNPKG

@sixbell-telco/sdk

Version:

A collection of reusable components designed for use in Sixbell Telco Angular projects

58 lines (54 loc) 2.82 kB
import * as i0 from '@angular/core'; import { input, computed, Component } from '@angular/core'; import { NgIconComponent } from '@ng-icons/core'; import { cn } from '@sixbell-telco/sdk/utils/cn'; import { cva } from 'class-variance-authority'; const iconComponent = cva(['leading-tight', 'inline-flex!', 'items-center!', 'justify-center!'], { variants: { color: { white: 'text-white!', black: 'text-black!', primary: 'text-primary!', secondary: 'text-secondary!', tertiary: 'text-tertiary!', neutral: 'text-neutral!', success: 'text-success!', info: 'text-info!', warning: 'text-warning!', error: 'text-error!', 'base-content': 'text-base-content!', base: 'text-base-content!', inherit: 'text-inherit!', }, size: { auto: ['[--ng-icon__size:_1.2em]'], xs: ['text-lg'], sm: ['text-xl'], md: ['text-2xl'], lg: ['text-4xl'], xl: ['text-6xl'], }, }, compoundVariants: [], defaultVariants: { color: 'inherit', size: 'auto', }, }); class IconComponent { color = input(); size = input(); icon = input.required(); componentClass = computed(() => cn(iconComponent({ color: this.color(), size: this.size() }))); static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: IconComponent, isStandalone: true, selector: "st-icon", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-icon [svg]=\"icon()\" [class]=\"componentClass()\" />\n", styles: [""], dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: IconComponent, decorators: [{ type: Component, args: [{ selector: 'st-icon', imports: [NgIconComponent], template: "<ng-icon [svg]=\"icon()\" [class]=\"componentClass()\" />\n" }] }] }); /** * Generated bundle index. Do not edit. */ export { IconComponent, iconComponent }; //# sourceMappingURL=sixbell-telco-sdk-components-icon.mjs.map