@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
119 lines (114 loc) • 5.1 kB
JavaScript
import * as i0 from '@angular/core';
import { Input, Component } from '@angular/core';
import '@synergy-design-system/components/components/fieldset/fieldset.js';
// ---------------------------------------------------------------------
// 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components
// Please do not edit this file directly!
// It will get recreated when running pnpm build.
// ---------------------------------------------------------------------
/**
* @summary Fieldsets are used to group related elements in a form.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-fieldset--docs
* @status stable
* @since 3.18.0
*
* @slot - The fieldset's main content. Place form controls inside the fieldset to group them together.
* @slot legend - Add a legend to the fieldset. This is displayed as the title of the fieldset. Alternatively, you can use the `legend` attribute.
* @slot description - Add a description to the fieldset. This is displayed below the legend and provides additional information about the fieldset. Alternatively, you can use the `description` attribute.
*
* @csspart base - The component's base wrapper.
* @csspart legend - The component's legend element.
* @csspart description - The component's description element.
* @csspart field-container - The container for the fieldset's fields.
*
* @cssproperty --item-gap - The gap between the fields in the fieldset. Defaults to `--syn-spacing-large`
*/
class SynFieldsetComponent {
nativeElement;
_ngZone;
constructor(e, ngZone) {
this.nativeElement = e.nativeElement;
this._ngZone = ngZone;
}
/**
* The description for the fieldset.
* This is displayed below the legend.
If not provided, the fieldset will not have a description.
*/
set description(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.description = v));
}
get description() {
return this.nativeElement.description;
}
/**
* The legend for the fieldset.
* This is displayed as the title of the fieldset.
If not provided, the fieldset will not have a legend.
*/
set legend(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.legend = v));
}
get legend() {
return this.nativeElement.legend;
}
/**
* Whether the fieldset is disabled.
When true, all form controls inside the fieldset are disabled
*/
set disabled(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.disabled = v === '' || v));
}
get disabled() {
return this.nativeElement.disabled;
}
/**
* Disables automatic grouped control layout syncing.
When true, nested grouped controls keep their own layout configuration.
*/
set disableAutoGroupLayout(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.disableAutoGroupLayout = v === '' || v));
}
get disableAutoGroupLayout() {
return this.nativeElement.disableAutoGroupLayout;
}
/**
* The layout of the fieldset.
* This determines how the fields are displayed.
Defaults to `one-column`.
- `one-column`: All fields are displayed in a single column.
- `two-columns`: Fields are displayed in two columns.
* Will automatically fall back to one-column if the fieldset is too narrow to display two columns.
*/
set layout(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.layout = v));
}
get layout() {
return this.nativeElement.layout;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SynFieldsetComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: SynFieldsetComponent, isStandalone: true, selector: "syn-fieldset", inputs: { description: "description", legend: "legend", disabled: "disabled", disableAutoGroupLayout: "disableAutoGroupLayout", layout: "layout" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SynFieldsetComponent, decorators: [{
type: Component,
args: [{
selector: 'syn-fieldset',
standalone: true,
template: '<ng-content></ng-content>',
}]
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { description: [{
type: Input
}], legend: [{
type: Input
}], disabled: [{
type: Input
}], disableAutoGroupLayout: [{
type: Input
}], layout: [{
type: Input
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { SynFieldsetComponent };
//# sourceMappingURL=synergy-design-system-angular-components-fieldset.mjs.map