{"version":3,"file":"airy-ui-typography.mjs","sources":["../../../projects/typography/src/lib/directives/title/title.directive.ts","../../../projects/typography/src/lib/directives/text/text.directive.ts","../../../projects/typography/src/lib/directives/color/color.directive.ts","../../../projects/typography/src/lib/directives/text-direction/text-direction.directive.ts","../../../projects/typography/src/lib/air-typography.module.ts","../../../projects/typography/src/airy-ui-typography.ts"],"sourcesContent":["import {Directive, ElementRef, HostBinding, Input} from '@angular/core';\nimport {camelToKebab} from '@airy-ui/cdk';\n\nconst POSSIBLE_ATTRIBUTES = ['airH1', 'airH2', 'airH3', 'airH4', 'airH5', 'airFixedH1', 'airFixedH2', 'airFixedH3', 'airFixedH4', 'airFixedH5'];\n\n@Directive({\n  selector: '[airH1], [airH2], [airH3], [airH4], [airH5], [airFixedH1], [airFixedH2], [airFixedH3], [airFixedH4], [airFixedH5]'\n})\nexport class TitleDirective {\n  @Input() airTitleCaption: boolean | undefined | '' = false;\n  @Input() airTitleDeep: boolean | undefined | '' | 'important' = false;\n\n  @HostBinding('class.air-tp-deep')\n  get deep(): boolean {\n    return (this.airTitleDeep === '' || this.airTitleDeep === true || this.airTitleDeep === undefined);\n  }\n\n  @HostBinding('class.air-tp-deep-important')\n  get deepImportant() {\n    return this.airTitleDeep === 'important';\n  }\n\n  @HostBinding('class.air-caption')\n  get isCaption(): boolean {\n    return (this.airTitleCaption === '' || this.airTitleCaption || this.airTitleCaption === undefined);\n  }\n\n  constructor(private elementRef: ElementRef<HTMLDivElement>) {\n    const attribute = POSSIBLE_ATTRIBUTES.find(att => this.elementRef.nativeElement.hasAttribute(att));\n    if (attribute) {\n      this.elementRef.nativeElement.classList.add(camelToKebab(attribute));\n    }\n  }\n}\n","import {Directive, ElementRef, HostBinding, Input} from '@angular/core';\nimport {camelToKebab} from '@airy-ui/cdk';\n\nconst POSSIBLE_ATTRIBUTES = ['airText1', 'airText2', 'airText3', 'airFixedText1', 'airFixedText2', 'airFixedText3'];\n\n@Directive({\n  selector: '[airText1], [airText2], [airText3], [airFixedText1], [airFixedText2], [airFixedText3]'\n})\nexport class TextDirective {\n  @Input() airTextCaption: boolean | '' = false;\n  @Input() airTextDeep: boolean | '' | 'important' = false;\n\n  @HostBinding('class.air-tp-deep')\n  get deep(): boolean {\n    return (this.airTextDeep === '' || this.airTextDeep === true);\n  }\n\n  @HostBinding('class.air-tp-deep-important')\n  get deepImportant() {\n    return this.airTextDeep === 'important';\n  }\n\n  @HostBinding('class.air-caption')\n  get isCaption(): boolean {\n    return (this.airTextCaption === '' || this.airTextCaption);\n  }\n\n  constructor(private elementRef: ElementRef<HTMLDivElement>) {\n    const attribute = POSSIBLE_ATTRIBUTES.find(att => this.elementRef.nativeElement.hasAttribute(att));\n    if (attribute) {\n      this.elementRef.nativeElement.classList.add(camelToKebab(attribute));\n    }\n  }\n\n}\n","import {Directive, ElementRef, Input} from '@angular/core';\nimport {ThemePalette} from '@airy-ui/cdk';\n\ntype Color = ThemePalette | 'text-primary' | 'text-secondary';\n\n@Directive({selector: '[airColor]'})\nexport class ColorDirective {\n  private previousColor: Color = 'text-primary';\n\n  @Input() set airColor(color: Color) {\n    if (this.previousColor) {\n      this.elementRef.nativeElement.classList.remove(`air-tp-color-${this.previousColor}`);\n    }\n\n    this.elementRef.nativeElement.classList.add(`air-tp-color-${color}`);\n    this.previousColor = color;\n  }\n\n  constructor(private elementRef: ElementRef) {\n  }\n}\n","import {Directive, ElementRef, HostBinding} from '@angular/core';\n\n@Directive({\n  selector: '[airTextStart], [airTextEnd], [airTextCenter]'\n})\nexport class TextDirectionDirective {\n  private hasAttribute(attribute: string): boolean {\n    return this.elementRef.nativeElement.hasAttribute(attribute);\n  }\n\n  @HostBinding('style.text-align')\n  get textAlign(): string {\n    if (this.hasAttribute('airTextStart')) {\n      return 'left';\n    }\n\n    if (this.hasAttribute('airTextEnd')) {\n      return 'right';\n    }\n\n    return 'center';\n  }\n\n  constructor(private elementRef: ElementRef<HTMLDivElement>) {\n  }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {TitleDirective, TextDirective, ColorDirective, TextDirectionDirective} from './directives';\n\nconst declarations = [TitleDirective, TextDirective, ColorDirective, TextDirectionDirective];\n\n\n@NgModule({\n  declarations,\n  exports: declarations,\n  imports: [\n    CommonModule\n  ]\n})\nexport class AirTypographyModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["POSSIBLE_ATTRIBUTES"],"mappings":";;;;;AAGA,MAAMA,qBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;MAKnI,cAAc,CAAA;AAmBzB,IAAA,WAAA,CAAoB,UAAsC,EAAA;AAAtC,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAA4B;AAlBjD,QAAA,IAAe,CAAA,eAAA,GAA6B,KAAK,CAAC;AAClD,QAAA,IAAY,CAAA,YAAA,GAA2C,KAAK,CAAC;QAkBpE,MAAM,SAAS,GAAGA,qBAAmB,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AACnG,QAAA,IAAI,SAAS,EAAE;AACb,YAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;AACtE,SAAA;KACF;AApBD,IAAA,IACI,IAAI,GAAA;AACN,QAAA,QAAQ,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;KACpG;AAED,IAAA,IACI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW,CAAC;KAC1C;AAED,IAAA,IACI,SAAS,GAAA;AACX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