UNPKG

@hashicorp/design-system-components

Version:
24 lines (20 loc) 1.19 kB
import { hash } from '@ember/helper'; import HdsFormField from '../field/index.js'; import HdsFormFileInputBase from './base.js'; import { precompileTemplate } from '@ember/template-compilation'; import { setComponentTemplate } from '@ember/component'; import templateOnly from '@ember/component/template-only'; /** * Copyright IBM Corp. 2021, 2025 * SPDX-License-Identifier: MPL-2.0 */ const HdsFormFileInputField = setComponentTemplate(precompileTemplate("<HdsFormField @layout=\"vertical\" @extraAriaDescribedBy={{@extraAriaDescribedBy}} @isRequired={{@isRequired}} @isOptional={{@isOptional}} @id={{@id}} as |F|>\n {{!-- Notice: the order of the elements is not relevant here, because is controlled at \"HdsFormField\" component level --}}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n <F.Control>\n <HdsFormFileInputBase required={{@isRequired}} ...attributes id={{F.id}} aria-describedby={{F.ariaDescribedBy}} />\n </F.Control>\n</HdsFormField>", { strictMode: true, scope: () => ({ HdsFormField, hash, HdsFormFileInputBase }) }), templateOnly()); export { HdsFormFileInputField as default }; //# sourceMappingURL=field.js.map