@tetacom/ng-components 1.2.9 → 1.2.11
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.
- package/component/accordion/accordion-item/accordion-item.component.d.ts +5 -3
- package/component/button/button/button.component.d.ts +3 -5
- package/docs/accordionDocs.mdx +139 -118
- package/esm2022/component/accordion/accordion/accordion.component.mjs +1 -1
- package/esm2022/component/accordion/accordion-head/accordion-head.component.mjs +4 -7
- package/esm2022/component/accordion/accordion-item/accordion-item.component.mjs +17 -8
- package/esm2022/component/button/button/button.component.mjs +19 -12
- package/fesm2022/tetacom-ng-components.mjs +35 -23
- package/fesm2022/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/style/accordion.scss +65 -42
- package/style/chips.scss +2 -6
|
@@ -57,15 +57,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
57
57
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
58
58
|
|
|
59
59
|
class AccordionItemComponent {
|
|
60
|
+
get dividerClass() {
|
|
61
|
+
return this.divider;
|
|
62
|
+
}
|
|
60
63
|
get class() {
|
|
61
|
-
return `
|
|
64
|
+
return `accordion-item_${this.viewType}`;
|
|
62
65
|
}
|
|
63
66
|
constructor(accordion, cdr$) {
|
|
64
67
|
this.cdr$ = cdr$;
|
|
65
68
|
this.open = false;
|
|
66
69
|
this.disabled = false;
|
|
67
|
-
this.viewType = 'rounded';
|
|
68
70
|
this.accordionItemClass = true;
|
|
71
|
+
this.divider = false;
|
|
72
|
+
this.viewType = 'rounded';
|
|
69
73
|
this.accordion$ = accordion;
|
|
70
74
|
}
|
|
71
75
|
toggle() {
|
|
@@ -73,11 +77,11 @@ class AccordionItemComponent {
|
|
|
73
77
|
this.cdr$.detectChanges();
|
|
74
78
|
}
|
|
75
79
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, deps: [{ token: AccordionComponent, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AccordionItemComponent, isStandalone: true, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled", viewType: "viewType" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass", "class": "this.class" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n@if (open) {\n
|
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AccordionItemComponent, isStandalone: true, selector: "teta-accordion-item", inputs: { open: "open", disabled: "disabled", divider: "divider", viewType: "viewType" }, host: { properties: { "class.accordion-item_active": "this.open", "class.accordion-item": "this.accordionItemClass", "class.accordion-item_divider": "this.dividerClass", "class": "this.class" } }, queries: [{ propertyName: "content", first: true, predicate: AccordionContentDirective, descendants: true }], ngImport: i0, template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n@if (open) {\n<div class=\"accordion-content\">\n <ng-container *ngTemplateOutlet=\"content!.template\"></ng-container>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
77
81
|
}
|
|
78
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
79
83
|
type: Component,
|
|
80
|
-
args: [{ selector: 'teta-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n@if (open) {\n
|
|
84
|
+
args: [{ selector: 'teta-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-content select=\"teta-accordion-head\"></ng-content>\n@if (open) {\n<div class=\"accordion-content\">\n <ng-container *ngTemplateOutlet=\"content!.template\"></ng-container>\n</div>\n}\n" }]
|
|
81
85
|
}], ctorParameters: () => [{ type: AccordionComponent, decorators: [{
|
|
82
86
|
type: Optional
|
|
83
87
|
}, {
|
|
@@ -93,11 +97,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
93
97
|
type: Input
|
|
94
98
|
}], disabled: [{
|
|
95
99
|
type: Input
|
|
96
|
-
}], viewType: [{
|
|
97
|
-
type: Input
|
|
98
100
|
}], accordionItemClass: [{
|
|
99
101
|
type: HostBinding,
|
|
100
102
|
args: ['class.accordion-item']
|
|
103
|
+
}], divider: [{
|
|
104
|
+
type: Input
|
|
105
|
+
}], dividerClass: [{
|
|
106
|
+
type: HostBinding,
|
|
107
|
+
args: ['class.accordion-item_divider']
|
|
108
|
+
}], viewType: [{
|
|
109
|
+
type: Input
|
|
101
110
|
}], class: [{
|
|
102
111
|
type: HostBinding,
|
|
103
112
|
args: [`class`]
|
|
@@ -246,16 +255,13 @@ class AccordionHeadComponent {
|
|
|
246
255
|
get disabled() {
|
|
247
256
|
return this.accordionItem$.disabled;
|
|
248
257
|
}
|
|
249
|
-
ngOnInit() {
|
|
250
|
-
}
|
|
258
|
+
ngOnInit() { }
|
|
251
259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionHeadComponent, deps: [{ token: AccordionItemComponent, host: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
252
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AccordionHeadComponent, isStandalone: true, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n@if (showToggle) {\n
|
|
260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AccordionHeadComponent, isStandalone: true, selector: "teta-accordion-head", inputs: { showToggle: "showToggle" }, host: { listeners: { "click": "toggle()" }, properties: { "class.accordion-head": "this.accordionHeadClass", "class.accordion-head_open": "this.open", "class.accordion-head_disabled": "this.disabled" } }, ngImport: i0, template: "<ng-content></ng-content>\n@if (showToggle) {\n<div class=\"accordion-toggle\" [class.accordion-toggle_opened]=\"open\">\n <teta-icon [name]=\"'arrowDownKey'\"></teta-icon>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
253
261
|
}
|
|
254
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionHeadComponent, decorators: [{
|
|
255
263
|
type: Component,
|
|
256
|
-
args: [{ selector: 'teta-accordion-head', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
257
|
-
IconComponent
|
|
258
|
-
], template: "<ng-content></ng-content>\n@if (showToggle) {\n <div class=\"accordion-toggle\">\n <teta-icon [name]=\"open ? 'arrowUpKey' : 'arrowDownKey'\"></teta-icon>\n </div>\n}\n\n" }]
|
|
264
|
+
args: [{ selector: 'teta-accordion-head', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [IconComponent], template: "<ng-content></ng-content>\n@if (showToggle) {\n<div class=\"accordion-toggle\" [class.accordion-toggle_opened]=\"open\">\n <teta-icon [name]=\"'arrowDownKey'\"></teta-icon>\n</div>\n}\n" }]
|
|
259
265
|
}], ctorParameters: () => [{ type: AccordionItemComponent, decorators: [{
|
|
260
266
|
type: Host
|
|
261
267
|
}, {
|
|
@@ -364,6 +370,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
364
370
|
}], ctorParameters: () => [] });
|
|
365
371
|
|
|
366
372
|
class ButtonComponent {
|
|
373
|
+
constructor() {
|
|
374
|
+
this.view = 'primary';
|
|
375
|
+
this.square = false;
|
|
376
|
+
this.viewType = 'rounded';
|
|
377
|
+
this.size = TetaSize.M;
|
|
378
|
+
}
|
|
367
379
|
get getClass() {
|
|
368
380
|
const result = [this.class, 'button'];
|
|
369
381
|
if (this.palette) {
|
|
@@ -376,35 +388,35 @@ class ButtonComponent {
|
|
|
376
388
|
result.push(`button-square`);
|
|
377
389
|
}
|
|
378
390
|
switch (this.size) {
|
|
379
|
-
case
|
|
391
|
+
case TetaSize.XL:
|
|
392
|
+
result.push(`button-xl`);
|
|
393
|
+
break;
|
|
394
|
+
case TetaSize.L:
|
|
380
395
|
result.push(`button-l`);
|
|
381
396
|
break;
|
|
382
|
-
case
|
|
397
|
+
case TetaSize.M:
|
|
383
398
|
result.push(`font-button-2`);
|
|
384
399
|
result.push(`button-m`);
|
|
385
400
|
break;
|
|
386
|
-
case
|
|
401
|
+
case TetaSize.S:
|
|
387
402
|
result.push(`font-button-3`);
|
|
388
403
|
result.push(`button-s`);
|
|
389
404
|
break;
|
|
405
|
+
case TetaSize.XS:
|
|
406
|
+
result.push(`font-button-3`);
|
|
407
|
+
result.push(`button-xs`);
|
|
408
|
+
break;
|
|
390
409
|
}
|
|
391
410
|
result.push(`button_${this.viewType}`);
|
|
392
411
|
return result.join(' ');
|
|
393
412
|
}
|
|
394
|
-
constructor() {
|
|
395
|
-
this.view = 'primary';
|
|
396
|
-
this.square = false;
|
|
397
|
-
this.viewType = 'rounded';
|
|
398
|
-
this.size = 'm';
|
|
399
|
-
}
|
|
400
|
-
ngOnInit() { }
|
|
401
413
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
402
414
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: ButtonComponent, isStandalone: true, selector: "button[teta-button], teta-button", inputs: { palette: "palette", class: "class", view: "view", square: "square", viewType: "viewType", size: "size" }, host: { properties: { "class": "this.getClass" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
403
415
|
}
|
|
404
416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
405
417
|
type: Component,
|
|
406
418
|
args: [{ selector: 'button[teta-button], teta-button', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
407
|
-
}],
|
|
419
|
+
}], propDecorators: { palette: [{
|
|
408
420
|
type: Input
|
|
409
421
|
}], class: [{
|
|
410
422
|
type: Input
|