UNPKG

@hashicorp/design-system-components

Version:
43 lines (42 loc) 1.6 kB
/** * Copyright IBM Corp. 2021, 2025 * SPDX-License-Identifier: MPL-2.0 */ import Component from '@glimmer/component'; import type { WithBoundArgs } from '@glint/template'; import HdsFormLegend from '../legend/index'; import HdsFormHelperText from '../helper-text/index'; import HdsFormError from '../error/index'; import HdsYield from '../../yield/index'; import type { HdsFormFieldsetLayouts } from './types.ts'; export declare const LAYOUT_TYPES: HdsFormFieldsetLayouts[]; export interface HdsFormFieldsetSignature { Args: { extraAriaDescribedBy?: string; isOptional?: boolean; isRequired?: boolean; layout?: HdsFormFieldsetLayouts; }; Blocks: { default: [ { Legend?: WithBoundArgs<typeof HdsFormLegend, 'contextualClass' | 'isRequired' | 'isOptional'>; HelperText?: WithBoundArgs<typeof HdsFormHelperText, 'contextualClass' | 'controlId' | 'onInsert'>; Control?: typeof HdsYield; Error?: WithBoundArgs<typeof HdsFormError, 'contextualClass' | 'controlId' | 'onInsert' | 'onRemove'>; id?: string; ariaDescribedBy?: string; } ]; }; Element: HTMLElement; } export default class HdsFormFieldset extends Component<HdsFormFieldsetSignature> { get layout(): HdsFormFieldsetLayouts; get id(): string; get isRequired(): boolean; get isOptional(): boolean; get classNames(): string; appendDescriptor: (element: HTMLElement) => void; removeDescriptor: (element: HTMLElement) => void; }