{"version":3,"file":"edsis-component-input.mjs","sources":["../../../library/component/input/input.component.ts","../../../library/component/input/edsis-component-input.ts"],"sourcesContent":["import { Component, ElementRef, computed, inject, input } from '@angular/core';\nimport { cn } from '@edsis/component/class';\n\nconst BASE = [\n  'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1',\n  'text-sm shadow-sm transition-colors',\n  'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n  'placeholder:text-muted-foreground',\n  'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n  'disabled:cursor-not-allowed disabled:opacity-50',\n  'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive',\n].join(' ');\n\n/**\n * Styled native `<input>`. Works with Angular's DefaultValueAccessor,\n * so `ngModel` and reactive forms just work.\n */\n@Component({\n  selector: 'input[Input]',\n  host: { '[class]': 'classes()' },\n  template: '',\n})\nexport class InputComponent {\n  private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n  readonly class = input<string>('');\n\n  protected readonly classes = computed(() => cn(BASE, this.class()));\n\n  focus(): void {\n    this.el.nativeElement.focus();\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAAM,IAAI,GAAG;IACX,yEAAyE;IACzE,qCAAqC;IACrC,sFAAsF;IACtF,mCAAmC;IACnC,yEAAyE;IACzE,iDAAiD;IACjD,2FAA2F;AAC5F,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX;;;AAGG;MAMU,cAAc,CAAA;AACR,IAAA,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC;IAC7D,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gFAAC;IAEnE,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;IAC/B;uGARW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,4PAFf,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAED,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACrBD;;AAEG;;;;"}