@progress/kendo-angular-buttons 6.4.0 → 7.0.0-dev.202201101733
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/dist/cdn/js/kendo-angular-buttons.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/button/button.directive.js +239 -89
- package/dist/es/button/button.service.js +1 -5
- package/dist/es/buttongroup/buttongroup.component.js +1 -53
- package/dist/es/chip/chip-list.component.js +54 -7
- package/dist/es/chip/chip.component.js +175 -86
- package/dist/es/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
- package/dist/es/{chip/models/type.js → common/models/rounded.js} +0 -0
- package/dist/{es2015/button-look.js → es/common/models/styling-classes.js} +0 -0
- package/dist/es/{button-look.js → common/models.js} +0 -0
- package/dist/es/dropdownbutton/dropdownbutton.component.js +74 -33
- package/dist/es/floatingactionbutton/dial-item.component.js +1 -1
- package/dist/es/floatingactionbutton/floatingactionbutton.component.js +66 -41
- package/dist/es/focusable/focusable.directive.js +4 -4
- package/dist/es/listbutton/list-button.js +1 -1
- package/dist/es/listbutton/list.component.js +20 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/splitbutton/splitbutton.component.js +91 -33
- package/dist/es/util.js +52 -0
- package/dist/es2015/button/button.directive.d.ts +85 -22
- package/dist/es2015/button/button.directive.js +222 -85
- package/dist/es2015/button/button.service.d.ts +1 -4
- package/dist/es2015/button/button.service.js +1 -5
- package/dist/es2015/buttongroup/buttongroup.component.d.ts +0 -15
- package/dist/es2015/buttongroup/buttongroup.component.js +1 -41
- package/dist/es2015/chip/chip-list.component.d.ts +19 -3
- package/dist/es2015/chip/chip-list.component.js +49 -7
- package/dist/es2015/chip/chip.component.d.ts +67 -32
- package/dist/es2015/chip/chip.component.js +186 -97
- package/dist/es2015/common/models/fillmode.d.ts +12 -0
- package/dist/es2015/{chip/models/type.js → common/models/fillmode.js} +0 -0
- package/dist/es2015/common/models/rounded.d.ts +12 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/shape.d.ts +2 -9
- package/dist/es2015/common/models/size.d.ts +9 -6
- package/dist/es2015/common/models/styling-classes.d.ts +11 -0
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/dist/es2015/common/models/theme-color.d.ts +15 -4
- package/dist/es2015/common/models.d.ts +10 -0
- package/dist/es2015/{chip/models/chip-look.js → common/models.js} +0 -0
- package/dist/es2015/dropdownbutton/dropdownbutton.component.d.ts +58 -7
- package/dist/es2015/dropdownbutton/dropdownbutton.component.js +81 -28
- package/dist/es2015/floatingactionbutton/dial-item.component.js +1 -1
- package/dist/es2015/floatingactionbutton/floatingactionbutton.component.d.ts +28 -21
- package/dist/es2015/floatingactionbutton/floatingactionbutton.component.js +62 -42
- package/dist/es2015/focusable/focusable.directive.js +4 -4
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/listbutton/list-button.js +1 -1
- package/dist/es2015/listbutton/list.component.d.ts +3 -0
- package/dist/es2015/listbutton/list.component.js +37 -20
- package/dist/es2015/main.d.ts +4 -4
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/splitbutton/splitbutton.component.d.ts +53 -7
- package/dist/es2015/splitbutton/splitbutton.component.js +101 -29
- package/dist/es2015/util.d.ts +21 -0
- package/dist/es2015/util.js +52 -0
- package/dist/fesm2015/index.js +832 -395
- package/dist/fesm5/index.js +817 -393
- package/dist/npm/button/button.directive.js +239 -89
- package/dist/npm/button/button.service.js +0 -4
- package/dist/npm/buttongroup/buttongroup.component.js +1 -53
- package/dist/npm/chip/chip-list.component.js +52 -5
- package/dist/npm/chip/chip.component.js +173 -84
- package/dist/npm/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
- package/dist/npm/{chip/models/type.js → common/models/rounded.js} +0 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/{button-look.js → common/models.js} +0 -0
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +74 -33
- package/dist/npm/floatingactionbutton/dial-item.component.js +1 -1
- package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +66 -41
- package/dist/npm/focusable/focusable.directive.js +4 -4
- package/dist/npm/listbutton/list-button.js +1 -1
- package/dist/npm/listbutton/list.component.js +20 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/splitbutton/splitbutton.component.js +89 -31
- package/dist/npm/util.js +52 -0
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +18 -15
- package/dist/es2015/button-look.d.ts +0 -21
- package/dist/es2015/chip/models/chip-look.d.ts +0 -20
- package/dist/es2015/chip/models/type.d.ts +0 -21
|
@@ -71,17 +71,70 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
71
71
|
*/
|
|
72
72
|
this.imageUrl = '';
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* The size property specifies the width and height of the DropDownButton
|
|
75
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
|
|
76
|
+
*
|
|
77
|
+
* The possible values are:
|
|
78
|
+
* * `'small'`
|
|
79
|
+
* * `'medium'` (default)
|
|
80
|
+
* * `'large'`
|
|
81
|
+
* * `null`
|
|
82
|
+
*/
|
|
83
|
+
this.size = 'medium';
|
|
84
|
+
/**
|
|
85
|
+
* The shape property specifies if the DropDownButton will be a square or rectangle.
|
|
86
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
|
|
87
|
+
*
|
|
88
|
+
* The possible values are:
|
|
89
|
+
* * `'rectangle'` (default)
|
|
90
|
+
* * `'square'`
|
|
91
|
+
* * `null`
|
|
75
92
|
*/
|
|
76
|
-
this.
|
|
93
|
+
this.shape = 'rectangle';
|
|
77
94
|
/**
|
|
78
|
-
*
|
|
95
|
+
* The rounded property specifies the border radius of the DropDownButton
|
|
96
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
|
|
97
|
+
*
|
|
98
|
+
* The possible values are:
|
|
99
|
+
* * `'small'`
|
|
100
|
+
* * `'medium'` (default)
|
|
101
|
+
* * `'large'`
|
|
102
|
+
* * `'full'`
|
|
103
|
+
* * `null`
|
|
104
|
+
*/
|
|
105
|
+
this.rounded = 'medium';
|
|
106
|
+
/**
|
|
107
|
+
* The fillMode property specifies the background and border styles of the DropDownButton
|
|
108
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
|
|
79
109
|
*
|
|
80
110
|
* The available values are:
|
|
111
|
+
* * `solid` (default)
|
|
81
112
|
* * `flat`
|
|
82
113
|
* * `outline`
|
|
114
|
+
* * `link`
|
|
115
|
+
* * `null`
|
|
83
116
|
*/
|
|
84
|
-
this.
|
|
117
|
+
this.fillMode = 'solid';
|
|
118
|
+
/**
|
|
119
|
+
* The DropDownButton allows you to specify predefined theme colors.
|
|
120
|
+
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
121
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
|
|
122
|
+
*
|
|
123
|
+
* The possible values are:
|
|
124
|
+
* * `base` —Applies coloring based on the `base` theme color. (default)
|
|
125
|
+
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
126
|
+
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
127
|
+
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
128
|
+
* * `info`—Applies coloring based on the `info` theme color.
|
|
129
|
+
* * `success`— Applies coloring based on the `success` theme color.
|
|
130
|
+
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
131
|
+
* * `error`— Applies coloring based on the `error` theme color.
|
|
132
|
+
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
133
|
+
* * `light`— Applies coloring based on the `light` theme color.
|
|
134
|
+
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
135
|
+
* * `null` —Removes the default CSS class (no class would be rendered).
|
|
136
|
+
*/
|
|
137
|
+
this.themeColor = 'base';
|
|
85
138
|
/**
|
|
86
139
|
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
87
140
|
*/
|
|
@@ -191,12 +244,6 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
191
244
|
get focused() {
|
|
192
245
|
return this._isFocused && !this._disabled;
|
|
193
246
|
}
|
|
194
|
-
get isFlat() {
|
|
195
|
-
return this.look === 'flat';
|
|
196
|
-
}
|
|
197
|
-
get isOutline() {
|
|
198
|
-
return this.look === 'outline';
|
|
199
|
-
}
|
|
200
247
|
get widgetClasses() {
|
|
201
248
|
return true;
|
|
202
249
|
}
|
|
@@ -449,12 +496,24 @@ tslib_1.__decorate([
|
|
|
449
496
|
], DropDownButtonComponent.prototype, "data", null);
|
|
450
497
|
tslib_1.__decorate([
|
|
451
498
|
Input(),
|
|
452
|
-
tslib_1.__metadata("design:type",
|
|
453
|
-
], DropDownButtonComponent.prototype, "
|
|
499
|
+
tslib_1.__metadata("design:type", String)
|
|
500
|
+
], DropDownButtonComponent.prototype, "size", void 0);
|
|
454
501
|
tslib_1.__decorate([
|
|
455
502
|
Input(),
|
|
456
503
|
tslib_1.__metadata("design:type", String)
|
|
457
|
-
], DropDownButtonComponent.prototype, "
|
|
504
|
+
], DropDownButtonComponent.prototype, "shape", void 0);
|
|
505
|
+
tslib_1.__decorate([
|
|
506
|
+
Input(),
|
|
507
|
+
tslib_1.__metadata("design:type", String)
|
|
508
|
+
], DropDownButtonComponent.prototype, "rounded", void 0);
|
|
509
|
+
tslib_1.__decorate([
|
|
510
|
+
Input(),
|
|
511
|
+
tslib_1.__metadata("design:type", String)
|
|
512
|
+
], DropDownButtonComponent.prototype, "fillMode", void 0);
|
|
513
|
+
tslib_1.__decorate([
|
|
514
|
+
Input(),
|
|
515
|
+
tslib_1.__metadata("design:type", String)
|
|
516
|
+
], DropDownButtonComponent.prototype, "themeColor", void 0);
|
|
458
517
|
tslib_1.__decorate([
|
|
459
518
|
Input(),
|
|
460
519
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -484,20 +543,10 @@ tslib_1.__decorate([
|
|
|
484
543
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
485
544
|
], DropDownButtonComponent.prototype, "onBlur", void 0);
|
|
486
545
|
tslib_1.__decorate([
|
|
487
|
-
HostBinding('class.k-
|
|
546
|
+
HostBinding('class.k-focus'),
|
|
488
547
|
tslib_1.__metadata("design:type", Boolean),
|
|
489
548
|
tslib_1.__metadata("design:paramtypes", [])
|
|
490
549
|
], DropDownButtonComponent.prototype, "focused", null);
|
|
491
|
-
tslib_1.__decorate([
|
|
492
|
-
HostBinding('class.k-flat'),
|
|
493
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
494
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
495
|
-
], DropDownButtonComponent.prototype, "isFlat", null);
|
|
496
|
-
tslib_1.__decorate([
|
|
497
|
-
HostBinding('class.k-outline'),
|
|
498
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
499
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
500
|
-
], DropDownButtonComponent.prototype, "isOutline", null);
|
|
501
550
|
tslib_1.__decorate([
|
|
502
551
|
HostBinding('class.k-dropdown-button'),
|
|
503
552
|
tslib_1.__metadata("design:type", Boolean),
|
|
@@ -577,12 +626,17 @@ DropDownButtonComponent = tslib_1.__decorate([
|
|
|
577
626
|
role="menu"
|
|
578
627
|
type="button"
|
|
579
628
|
[tabindex]="componentTabIndex"
|
|
580
|
-
[class.k-
|
|
629
|
+
[class.k-active]="active"
|
|
581
630
|
[disabled]="disabled"
|
|
582
631
|
[icon]="icon"
|
|
583
632
|
[iconClass]="iconClass"
|
|
584
633
|
[imageUrl]="imageUrl"
|
|
585
634
|
[ngClass]="buttonClass"
|
|
635
|
+
[size]="size"
|
|
636
|
+
[shape]="shape"
|
|
637
|
+
[rounded]="rounded"
|
|
638
|
+
[fillMode]="fillMode"
|
|
639
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
586
640
|
(click)="openPopup()"
|
|
587
641
|
(focus)="handleFocus()"
|
|
588
642
|
(blur)="onButtonBlur()"
|
|
@@ -590,9 +644,7 @@ DropDownButtonComponent = tslib_1.__decorate([
|
|
|
590
644
|
[attr.aria-expanded]="openState"
|
|
591
645
|
[attr.aria-haspopup]="true"
|
|
592
646
|
[attr.aria-owns]="listId"
|
|
593
|
-
|
|
594
|
-
[primary]="primary"
|
|
595
|
-
>
|
|
647
|
+
>
|
|
596
648
|
<ng-content></ng-content>
|
|
597
649
|
</button>
|
|
598
650
|
<ng-template #popupTemplate>
|
|
@@ -607,6 +659,7 @@ DropDownButtonComponent = tslib_1.__decorate([
|
|
|
607
659
|
(keypress)="keyPressHandler($event)"
|
|
608
660
|
(keyup)="keyUpHandler($event)"
|
|
609
661
|
[attr.dir]="dir"
|
|
662
|
+
[size]="size"
|
|
610
663
|
>
|
|
611
664
|
</kendo-button-list>
|
|
612
665
|
</ng-template>
|
|
@@ -67,7 +67,7 @@ tslib_1.__decorate([
|
|
|
67
67
|
], DialItemComponent.prototype, "role", void 0);
|
|
68
68
|
tslib_1.__decorate([
|
|
69
69
|
HostBinding('attr.aria-disabled'),
|
|
70
|
-
HostBinding('class.k-
|
|
70
|
+
HostBinding('class.k-disabled'),
|
|
71
71
|
tslib_1.__metadata("design:type", Boolean),
|
|
72
72
|
tslib_1.__metadata("design:paramtypes", [])
|
|
73
73
|
], DialItemComponent.prototype, "disabledClass", null);
|
|
@@ -20,6 +20,7 @@ import { ButtonShape } from '../common/models/shape';
|
|
|
20
20
|
import { PreventableEvent } from '../preventable-event';
|
|
21
21
|
import { DialItemTemplateDirective } from './templates/dial-item-template.directive';
|
|
22
22
|
import { FloatingActionButtonTemplateDirective } from './templates/fab-template.directive';
|
|
23
|
+
import { ButtonRounded } from '../common/models';
|
|
23
24
|
/**
|
|
24
25
|
*
|
|
25
26
|
* Represents the [Kendo UI FloatingActionButton component for Angular]({% slug overview_floatingactionbutton %}).
|
|
@@ -48,18 +49,16 @@ export declare class FloatingActionButtonComponent implements AfterViewInit, OnD
|
|
|
48
49
|
* The theme color will be applied as background color of the component.
|
|
49
50
|
*
|
|
50
51
|
* The possible values are:
|
|
51
|
-
* * `primary` (Default)—Applies coloring based on the `primary` theme color.
|
|
52
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
53
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
54
|
-
* * `
|
|
55
|
-
* * `
|
|
56
|
-
* * `
|
|
57
|
-
* * `
|
|
58
|
-
* * `
|
|
59
|
-
* * `
|
|
60
|
-
* * `
|
|
61
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
62
|
-
*
|
|
52
|
+
* * `'primary'` (Default)—Applies coloring based on the `primary` theme color.
|
|
53
|
+
* * `'secondary'`—Applies coloring based on the `secondary` theme color.
|
|
54
|
+
* * `'tertiary'`— Applies coloring based on the `tertiary` theme color.
|
|
55
|
+
* * `'info'`—Applies coloring based on the `info` theme color.
|
|
56
|
+
* * `'success'`— Applies coloring based on the `success` theme color.
|
|
57
|
+
* * `'warning'`— Applies coloring based on the `warning` theme color.
|
|
58
|
+
* * `'error'`— Applies coloring based on the `error` theme color.
|
|
59
|
+
* * `'dark'`— Applies coloring based on the `dark` theme color.
|
|
60
|
+
* * `'light'`— Applies coloring based on the `light` theme color.
|
|
61
|
+
* * `'inverse'`— Applies coloring based on the `inverse` theme color.
|
|
63
62
|
*/
|
|
64
63
|
themeColor: ButtonThemeColor;
|
|
65
64
|
/**
|
|
@@ -67,21 +66,28 @@ export declare class FloatingActionButtonComponent implements AfterViewInit, OnD
|
|
|
67
66
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
|
|
68
67
|
*
|
|
69
68
|
* The possible values are:
|
|
70
|
-
* * `small`
|
|
71
|
-
* * `medium` (Default)
|
|
72
|
-
* * `large`
|
|
73
|
-
*
|
|
69
|
+
* * `'small'`
|
|
70
|
+
* * `'medium'` (Default)
|
|
71
|
+
* * `'large'`
|
|
74
72
|
*/
|
|
75
73
|
size: ButtonSize;
|
|
74
|
+
/**
|
|
75
|
+
* The rounded property specifies the border radius of the FloatingActionButton.
|
|
76
|
+
*
|
|
77
|
+
* The possible values are:
|
|
78
|
+
* * `'small'`
|
|
79
|
+
* * `'medium'`
|
|
80
|
+
* * `'large'`
|
|
81
|
+
* * `'full'` (default)
|
|
82
|
+
* * `null`
|
|
83
|
+
*/
|
|
84
|
+
rounded: ButtonRounded;
|
|
76
85
|
/**
|
|
77
86
|
* Specifies the shape of the FloatingActionButton
|
|
78
87
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
|
|
79
88
|
*
|
|
80
89
|
* The possible values are:
|
|
81
|
-
* * `
|
|
82
|
-
* * `circle`—Applies circle shape on the FloatingActionButton.
|
|
83
|
-
* * `rectangle`—Applies rectangular shape on the FloatingActionButton.
|
|
84
|
-
* * `rounded`—Applies rounded shape on the FloatingActionButton.
|
|
90
|
+
* * `rectangle` (Default)—Applies rectangular shape on the FloatingActionButton.
|
|
85
91
|
* * `square`—Applies square shape on the FloatingActionButton.
|
|
86
92
|
*
|
|
87
93
|
*/
|
|
@@ -202,11 +208,13 @@ export declare class FloatingActionButtonComponent implements AfterViewInit, OnD
|
|
|
202
208
|
private _disabled;
|
|
203
209
|
private _align;
|
|
204
210
|
private _offset;
|
|
211
|
+
private _rounded;
|
|
205
212
|
private subscriptions;
|
|
206
213
|
private popupMouseDownListener;
|
|
207
214
|
private rtl;
|
|
208
215
|
private animationEnd;
|
|
209
216
|
private popupRef;
|
|
217
|
+
private initialSetup;
|
|
210
218
|
constructor(renderer: Renderer2, element: ElementRef, focusService: FocusService, navigationService: NavigationService, ngZone: NgZone, popupService: PopupService, builder: AnimationBuilder, localizationService: LocalizationService);
|
|
211
219
|
ngAfterViewInit(): void;
|
|
212
220
|
ngOnDestroy(): void;
|
|
@@ -279,7 +287,6 @@ export declare class FloatingActionButtonComponent implements AfterViewInit, OnD
|
|
|
279
287
|
private onNavigationEnterPress;
|
|
280
288
|
private onNavigationClose;
|
|
281
289
|
private alignClass;
|
|
282
|
-
private applyClasses;
|
|
283
290
|
private toggleDialWithEvents;
|
|
284
291
|
private openPopup;
|
|
285
292
|
private closePopup;
|
|
@@ -36,12 +36,16 @@ const SIZE_CLASSES = {
|
|
|
36
36
|
large: 'k-fab-lg'
|
|
37
37
|
};
|
|
38
38
|
const SHAPE_CLASSES = {
|
|
39
|
-
pill: 'k-fab-pill',
|
|
40
|
-
circle: 'k-fab-circle',
|
|
41
39
|
rectangle: 'k-fab-rectangle',
|
|
42
|
-
square: 'k-fab-square'
|
|
43
|
-
rounded: 'k-fab-rounded'
|
|
40
|
+
square: 'k-fab-square'
|
|
44
41
|
};
|
|
42
|
+
const ROUNDED_CLASSES = {
|
|
43
|
+
small: 'k-rounded-sm',
|
|
44
|
+
medium: 'k-rounded-md',
|
|
45
|
+
large: 'k-rounded-lg',
|
|
46
|
+
full: 'k-rounded-full'
|
|
47
|
+
};
|
|
48
|
+
const FILLMODE_CLASS = 'k-fab-solid';
|
|
45
49
|
const DEFAULT_DURATION = 180;
|
|
46
50
|
const DEFAULT_ITEM_GAP = 90;
|
|
47
51
|
const DEFAULT_OFFSET = '16px';
|
|
@@ -121,13 +125,15 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
121
125
|
this.id = `k-${guid()}`;
|
|
122
126
|
this._themeColor = 'primary';
|
|
123
127
|
this._size = 'medium';
|
|
124
|
-
this._shape = '
|
|
128
|
+
this._shape = 'rectangle';
|
|
125
129
|
this._disabled = false;
|
|
126
130
|
this._align = { horizontal: 'end', vertical: 'bottom' };
|
|
127
131
|
this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
|
|
132
|
+
this._rounded = 'full';
|
|
128
133
|
this.subscriptions = new Subscription();
|
|
129
134
|
this.rtl = false;
|
|
130
135
|
this.animationEnd = new EventEmitter();
|
|
136
|
+
this.initialSetup = true;
|
|
131
137
|
validatePackage(packageMetadata);
|
|
132
138
|
this.subscribeNavigationEvents();
|
|
133
139
|
this.subscriptions.add(this.localizationService.changes.subscribe(({ rtl }) => {
|
|
@@ -147,18 +153,16 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
147
153
|
* The theme color will be applied as background color of the component.
|
|
148
154
|
*
|
|
149
155
|
* The possible values are:
|
|
150
|
-
* * `primary` (Default)—Applies coloring based on the `primary` theme color.
|
|
151
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
152
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
153
|
-
* * `
|
|
154
|
-
* * `
|
|
155
|
-
* * `
|
|
156
|
-
* * `
|
|
157
|
-
* * `
|
|
158
|
-
* * `
|
|
159
|
-
* * `
|
|
160
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
161
|
-
*
|
|
156
|
+
* * `'primary'` (Default)—Applies coloring based on the `primary` theme color.
|
|
157
|
+
* * `'secondary'`—Applies coloring based on the `secondary` theme color.
|
|
158
|
+
* * `'tertiary'`— Applies coloring based on the `tertiary` theme color.
|
|
159
|
+
* * `'info'`—Applies coloring based on the `info` theme color.
|
|
160
|
+
* * `'success'`— Applies coloring based on the `success` theme color.
|
|
161
|
+
* * `'warning'`— Applies coloring based on the `warning` theme color.
|
|
162
|
+
* * `'error'`— Applies coloring based on the `error` theme color.
|
|
163
|
+
* * `'dark'`— Applies coloring based on the `dark` theme color.
|
|
164
|
+
* * `'light'`— Applies coloring based on the `light` theme color.
|
|
165
|
+
* * `'inverse'`— Applies coloring based on the `inverse` theme color.
|
|
162
166
|
*/
|
|
163
167
|
set themeColor(themeColor) {
|
|
164
168
|
this.handleClasses(themeColor, 'themeColor');
|
|
@@ -172,10 +176,9 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
172
176
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
|
|
173
177
|
*
|
|
174
178
|
* The possible values are:
|
|
175
|
-
* * `small`
|
|
176
|
-
* * `medium` (Default)
|
|
177
|
-
* * `large`
|
|
178
|
-
*
|
|
179
|
+
* * `'small'`
|
|
180
|
+
* * `'medium'` (Default)
|
|
181
|
+
* * `'large'`
|
|
179
182
|
*/
|
|
180
183
|
set size(size) {
|
|
181
184
|
this.handleClasses(size, 'size');
|
|
@@ -184,15 +187,29 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
184
187
|
get size() {
|
|
185
188
|
return this._size;
|
|
186
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* The rounded property specifies the border radius of the FloatingActionButton.
|
|
192
|
+
*
|
|
193
|
+
* The possible values are:
|
|
194
|
+
* * `'small'`
|
|
195
|
+
* * `'medium'`
|
|
196
|
+
* * `'large'`
|
|
197
|
+
* * `'full'` (default)
|
|
198
|
+
* * `null`
|
|
199
|
+
*/
|
|
200
|
+
set rounded(rounded) {
|
|
201
|
+
this.handleClasses(rounded, 'rounded');
|
|
202
|
+
this._rounded = rounded;
|
|
203
|
+
}
|
|
204
|
+
get rounded() {
|
|
205
|
+
return this._rounded;
|
|
206
|
+
}
|
|
187
207
|
/**
|
|
188
208
|
* Specifies the shape of the FloatingActionButton
|
|
189
209
|
* ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
|
|
190
210
|
*
|
|
191
211
|
* The possible values are:
|
|
192
|
-
* * `
|
|
193
|
-
* * `circle`—Applies circle shape on the FloatingActionButton.
|
|
194
|
-
* * `rectangle`—Applies rectangular shape on the FloatingActionButton.
|
|
195
|
-
* * `rounded`—Applies rounded shape on the FloatingActionButton.
|
|
212
|
+
* * `rectangle` (Default)—Applies rectangular shape on the FloatingActionButton.
|
|
196
213
|
* * `square`—Applies square shape on the FloatingActionButton.
|
|
197
214
|
*
|
|
198
215
|
*/
|
|
@@ -250,8 +267,10 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
250
267
|
return this.disabled ? (-1) : this.tabIndex;
|
|
251
268
|
}
|
|
252
269
|
ngAfterViewInit() {
|
|
253
|
-
this.
|
|
270
|
+
['shape', 'size', 'rounded', 'themeColor'].forEach(option => this.handleClasses(this[option], option));
|
|
271
|
+
this.renderer.addClass(this.element.nativeElement, this.alignClass());
|
|
254
272
|
this.offsetStyles();
|
|
273
|
+
this.initialSetup = false;
|
|
255
274
|
}
|
|
256
275
|
ngOnDestroy() {
|
|
257
276
|
this.subscriptions.unsubscribe();
|
|
@@ -393,20 +412,24 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
393
412
|
this.toggleDialWithEvents(false);
|
|
394
413
|
}
|
|
395
414
|
handleClasses(inputValue, input) {
|
|
396
|
-
if (isPresent(this.button) && (this[input] !== inputValue)) {
|
|
415
|
+
if (isPresent(this.button) && (this[input] !== inputValue || this.initialSetup)) {
|
|
397
416
|
const button = this.button.nativeElement;
|
|
398
417
|
const classesToRemove = {
|
|
399
|
-
themeColor:
|
|
418
|
+
themeColor: `${FILLMODE_CLASS}-${this.themeColor}`,
|
|
400
419
|
size: SIZE_CLASSES[this.size],
|
|
401
|
-
shape: SHAPE_CLASSES[this.shape]
|
|
420
|
+
shape: SHAPE_CLASSES[this.shape],
|
|
421
|
+
rounded: ROUNDED_CLASSES[this.rounded]
|
|
402
422
|
};
|
|
403
423
|
const classesToAdd = {
|
|
404
|
-
themeColor:
|
|
424
|
+
themeColor: inputValue ? `${FILLMODE_CLASS}-${inputValue}` : null,
|
|
405
425
|
size: SIZE_CLASSES[inputValue],
|
|
406
|
-
shape: SHAPE_CLASSES[inputValue]
|
|
426
|
+
shape: SHAPE_CLASSES[inputValue],
|
|
427
|
+
rounded: ROUNDED_CLASSES[inputValue]
|
|
407
428
|
};
|
|
408
429
|
this.renderer.removeClass(button, classesToRemove[input]);
|
|
409
|
-
|
|
430
|
+
if (classesToAdd[input]) {
|
|
431
|
+
this.renderer.addClass(button, classesToAdd[input]);
|
|
432
|
+
}
|
|
410
433
|
}
|
|
411
434
|
}
|
|
412
435
|
onEnterPressed() {
|
|
@@ -461,14 +484,6 @@ let FloatingActionButtonComponent = class FloatingActionButtonComponent {
|
|
|
461
484
|
alignClass() {
|
|
462
485
|
return `k-pos-${this.align.vertical}-${this.align.horizontal}`;
|
|
463
486
|
}
|
|
464
|
-
applyClasses() {
|
|
465
|
-
const hostElement = this.element.nativeElement;
|
|
466
|
-
const button = this.button.nativeElement;
|
|
467
|
-
this.renderer.addClass(button, SHAPE_CLASSES[this.shape]);
|
|
468
|
-
this.renderer.addClass(button, `k-fab-${this.themeColor}`);
|
|
469
|
-
this.renderer.addClass(button, SIZE_CLASSES[this.size]);
|
|
470
|
-
this.renderer.addClass(hostElement, this.alignClass());
|
|
471
|
-
}
|
|
472
487
|
toggleDialWithEvents(open) {
|
|
473
488
|
if (open === this.isOpen) {
|
|
474
489
|
return;
|
|
@@ -688,6 +703,11 @@ tslib_1.__decorate([
|
|
|
688
703
|
tslib_1.__metadata("design:type", String),
|
|
689
704
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
690
705
|
], FloatingActionButtonComponent.prototype, "size", null);
|
|
706
|
+
tslib_1.__decorate([
|
|
707
|
+
Input(),
|
|
708
|
+
tslib_1.__metadata("design:type", String),
|
|
709
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
710
|
+
], FloatingActionButtonComponent.prototype, "rounded", null);
|
|
691
711
|
tslib_1.__decorate([
|
|
692
712
|
Input(),
|
|
693
713
|
tslib_1.__metadata("design:type", String),
|
|
@@ -784,8 +804,8 @@ FloatingActionButtonComponent = tslib_1.__decorate([
|
|
|
784
804
|
[attr.role]="role"
|
|
785
805
|
[tabIndex]="componentTabIndex"
|
|
786
806
|
type="button"
|
|
787
|
-
|
|
788
|
-
[class.k-
|
|
807
|
+
class="k-fab k-fab-solid"
|
|
808
|
+
[class.k-disabled]="disabled"
|
|
789
809
|
[ngClass]="buttonClass"
|
|
790
810
|
[disabled]="disabled"
|
|
791
811
|
[attr.aria-disabled]="disabled"
|
|
@@ -18,10 +18,10 @@ let FocusableDirective = class FocusableDirective {
|
|
|
18
18
|
}
|
|
19
19
|
ngOnInit() {
|
|
20
20
|
if (this.index === this.focusService.focused) {
|
|
21
|
-
this.renderer.addClass(this.element, 'k-
|
|
21
|
+
this.renderer.addClass(this.element, 'k-focus');
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
this.renderer.removeClass(this.element, 'k-
|
|
24
|
+
this.renderer.removeClass(this.element, 'k-focus');
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -36,11 +36,11 @@ let FocusableDirective = class FocusableDirective {
|
|
|
36
36
|
}
|
|
37
37
|
this.focusSubscription = this.focusService.onFocus.subscribe((index) => {
|
|
38
38
|
if (this.index === index) {
|
|
39
|
-
this.renderer.addClass(this.element, 'k-
|
|
39
|
+
this.renderer.addClass(this.element, 'k-focus');
|
|
40
40
|
this.element.focus();
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
this.renderer.removeClass(this.element, 'k-
|
|
43
|
+
this.renderer.removeClass(this.element, 'k-focus');
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|