{"version":3,"file":"ng-nest-ui-typography.mjs","sources":["../../../../lib/ng-nest/ui/typography/typography.property.ts","../../../../lib/ng-nest/ui/typography/typography.component.ts","../../../../lib/ng-nest/ui/typography/typography.component.html","../../../../lib/ng-nest/ui/typography/typography.module.ts","../../../../lib/ng-nest/ui/typography/ng-nest-ui-typography.ts"],"sourcesContent":["import { XProperty } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\n\r\n/**\r\n * Typography\r\n * @selector x-typography\r\n * @decorator component\r\n */\r\nexport const XTypographyPrefix = 'x-typography';\r\n\r\n/**\r\n * Typography Property\r\n */\r\n@Component({ selector: `${XTypographyPrefix}-property`, template: '' })\r\nexport class XTypographyProperty extends XProperty {\r\n  /**\r\n   * @zh_CN 字体\r\n   * @en_US Font\r\n   */\r\n  readonly font = input<string>(\r\n    'Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,SimSun,sans-serif'\r\n  );\r\n  /**\r\n   * @zh_CN 显示文字\r\n   * @en_US Display text\r\n   */\r\n  readonly text = input<string>();\r\n}\r\n","import {\r\n  Component,\r\n  OnInit,\r\n  ViewEncapsulation,\r\n  ChangeDetectionStrategy,\r\n  Renderer2,\r\n  ElementRef,\r\n  inject,\r\n  signal\r\n} from '@angular/core';\r\nimport { XTypographyPrefix, XTypographyProperty } from './typography.property';\r\n\r\n@Component({\r\n  selector: 'x-typography',\r\n  templateUrl: './typography.component.html',\r\n  styleUrls: ['./style/index.scss'],\r\n  encapsulation: ViewEncapsulation.None,\r\n  changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTypographyComponent extends XTypographyProperty implements OnInit {\r\n  firstText = signal('');\r\n  private renderer = inject(Renderer2);\r\n  private elementRef = inject(ElementRef);\r\n\r\n  ngOnInit() {\r\n    this.renderer.addClass(this.elementRef.nativeElement, XTypographyPrefix);\r\n    const font = this.font();\r\n    const text = this.text();\r\n    if (font) this.renderer.setStyle(this.elementRef.nativeElement, 'font-family', font);\r\n    if (text && text.length > 0) this.firstText.set(text.slice(0, 1));\r\n  }\r\n}\r\n","<h4>{{ font() }}</h4>\r\n<div class=\"x-typography-list\">\r\n  <div class=\"x-typography-item\">\r\n    <h1>{{ firstText() }}</h1>\r\n    <p>\r\n      <span>常规</span>\r\n      <span class=\"x-typography-blod\">粗体</span>\r\n    </p>\r\n  </div>\r\n  <div class=\"x-typography-item\">\r\n    <h1>Aa</h1>\r\n    <p>\r\n      <span>Regular</span>\r\n      <span class=\"x-typography-blod\">Bold</span>\r\n    </p>\r\n  </div>\r\n</div>\r\n<p>{{ text() }}</p>\r\n<p>abcdefghijklmnopqrstuvwxyz</p>\r\n<p>ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>\r\n<p>1234567890.:,;'\"(!?)+-*/=</p>\r\n","import { NgModule } from '@angular/core';\r\nimport { XTypographyComponent } from './typography.component';\r\n\r\n@NgModule({\r\n  exports: [XTypographyComponent],\r\n  imports: [XTypographyComponent]\r\n})\r\nexport class XTypographyModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG;AAEjC;;AAEG;AAEG,MAAO,mBAAoB,SAAQ,SAAS,CAAA;AADlD,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CACnB,yFAAyF,gDAC1F;AACD;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAChC,IAAA;iIAbY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,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