UNPKG

@hashicorp/design-system-components

Version:
24 lines (20 loc) 1.2 kB
import { hash } from '@ember/helper'; import HdsFormCheckboxBase from './base.js'; import HdsFormField from '../field/index.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 HdsFormCheckboxField = setComponentTemplate(precompileTemplate("<HdsFormField @layout=\"flag\" @contextualClass={{@contextualClass}} @extraAriaDescribedBy={{@extraAriaDescribedBy}} @id={{@id}} as |F|>\n {{!-- Notice: the order of the elements is not relevant here, because it's controlled at \"HdsFormField\" component level --}}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n <F.Control>\n <HdsFormCheckboxBase @value={{@value}} name={{@name}} required={{@isRequired}} ...attributes id={{F.id}} aria-describedby={{F.ariaDescribedBy}} />\n </F.Control>\n</HdsFormField>", { strictMode: true, scope: () => ({ HdsFormField, hash, HdsFormCheckboxBase }) }), templateOnly()); export { HdsFormCheckboxField as default }; //# sourceMappingURL=field.js.map