@conciso/design-system-angular 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -138,9 +138,12 @@ class ButtonComponent {
|
|
|
138
138
|
* .btn-text; `filled-on-band` → .btn-filled + .btn-on-band (invertiert). */
|
|
139
139
|
variant = input('filled', /* @ts-ignore */
|
|
140
140
|
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
141
|
-
/** Markenbereich → .btn-co / .btn-ki / .btn-es / .btn-wo */
|
|
141
|
+
/** Markenbereich → .btn-co / .btn-ki / .btn-es / .btn-wo. Wirkungslos bei `tone="err"`. */
|
|
142
142
|
area = input('co', /* @ts-ignore */
|
|
143
143
|
...(ngDevMode ? [{ debugName: "area" }] : /* istanbul ignore next */ []));
|
|
144
|
+
/** Ton → `err` setzt .btn-err (destruktive Aktion) statt der Bereichsklasse. */
|
|
145
|
+
tone = input('def', /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
144
147
|
/** Größe → .btn-sm / (md = Default) / .btn-lg */
|
|
145
148
|
size = input('md', /* @ts-ignore */
|
|
146
149
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
@@ -157,7 +160,10 @@ class ButtonComponent {
|
|
|
157
160
|
classes = computed(() => {
|
|
158
161
|
// filled-on-band = invertierter Filled-Button; rendert .btn-filled + .btn-on-band.
|
|
159
162
|
const onBand = this.variant() === 'filled-on-band';
|
|
160
|
-
|
|
163
|
+
// Ton ersetzt den Bereich, statt ihn zu überlagern: so hängt das Ergebnis nicht an der
|
|
164
|
+
// Reihenfolge der Regeln in components.css und dark-mode.css.
|
|
165
|
+
const color = this.tone() === 'err' ? 'err' : this.area();
|
|
166
|
+
const cls = ['btn', `btn-${onBand ? 'filled' : this.variant()}`, `btn-${color}`];
|
|
161
167
|
if (this.size() === 'sm')
|
|
162
168
|
cls.push('btn-sm');
|
|
163
169
|
if (this.size() === 'lg')
|
|
@@ -170,7 +176,7 @@ class ButtonComponent {
|
|
|
170
176
|
}, /* @ts-ignore */
|
|
171
177
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
172
178
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: ButtonComponent, isStandalone: true, selector: "cds-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, full: { classPropertyName: "full", publicName: "full", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "style.display": "full() ? 'block' : null" } }, ngImport: i0, template: `
|
|
179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: ButtonComponent, isStandalone: true, selector: "cds-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, full: { classPropertyName: "full", publicName: "full", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "style.display": "full() ? 'block' : null" } }, ngImport: i0, template: `
|
|
174
180
|
<button [class]="classes()" [disabled]="disabled()" [attr.type]="type()" (click)="clicked.emit($event)">
|
|
175
181
|
{{ label() }}
|
|
176
182
|
</button>
|
|
@@ -191,7 +197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
191
197
|
</button>
|
|
192
198
|
`,
|
|
193
199
|
}]
|
|
194
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], full: [{ type: i0.Input, args: [{ isSignal: true, alias: "full", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
200
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], full: [{ type: i0.Input, args: [{ isSignal: true, alias: "full", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
195
201
|
|
|
196
202
|
/**
|
|
197
203
|
* Zentrale Icon-Registry des Storybooks — die EINZIGE Import-Fläche für
|