dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
49 lines (48 loc) • 2.7 kB
TypeScript
import { DdsElement } from '../../../internal/dds-hu-element';
declare const DapDSFormLabel_base: {
new (...args: any[]): import('../../../internal/mixin/labelableMixin').LabelableElementInterface;
prototype: import('../../../internal/mixin/labelableMixin').LabelableElementInterface;
} & typeof DdsElement & {
new (...args: any[]): import('../../../internal/mixin/sizedMixin').SizedElementInterface;
prototype: import('../../../internal/mixin/sizedMixin').SizedElementInterface;
};
/**
* `dap-ds-form-label`
* @summary A form label is a container for labels in a form.
* @element dap-ds-form-label
* @title - Form label
* @group form
*
* @property {string} optionalLabel - Label of optional text
* @property {boolean} subtle - Text weight of the label.
* @property {boolean} optional - If the label is optional.
* @property {boolean} required - If the label is required.
* @property {string} requiredLabel - Indicator of required text. (default: '*')
* @property {string} label - The label text.
* @property {boolean} hideLabel - Visually hides the label while keeping it available to assistive technology. (default: false)
*
* @csspart base - The main form label container.
* @csspart required - The required indicator of the form label.
* @csspart optional - The optional indicator of the form label.
*
* @cssproperty --dds-form-label-font-weight - Font weight of the label. (default: var(--dds-font-weight-bold))
* @cssproperty --dds-form-label-line-height - Line height of the label. (default: var(--dds-font-line-height-xlarge))
* @cssproperty --dds-form-label-color - Text color of the label. (default: var(--dds-text-neutral-enabled))
* @cssproperty --dds-form-label-disabled-color - Text color when the label is disabled. (default: var(--dds-text-neutral-disabled))
* @cssproperty --dds-form-label-required-color - Color of the required indicator. (default: var(--dds-text-negative-subtle))
* @cssproperty --dds-form-label-optional-color - Color of the optional indicator. (default: var(--dds-text-neutral-subtle))
* @cssproperty --dds-form-label-margin-bottom - Bottom margin of the label. (default: var(--dds-spacing-200))
*/
export default class DapDSFormLabel extends DapDSFormLabel_base {
static tagName: string;
/** The id of the form element that the label is associated with. */
for?: string;
/** Whether the label should be rendered as text or a <label> tag. Default is label. */
renderAs: string;
/** Whether the label should have no margin. */
noMargin: boolean;
static readonly styles: import('lit').CSSResult;
createRenderRoot(): this;
render(): import('lit-html').TemplateResult;
}
export {};