@progress/kendo-angular-buttons 19.1.1-develop.2 → 19.1.2-develop.1
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/button/button.component.d.ts +26 -22
- package/button/button.module.d.ts +8 -18
- package/button/selection-settings.d.ts +4 -1
- package/buttongroup/buttongroup.component.d.ts +22 -18
- package/buttongroup/buttongroup.module.d.ts +18 -1
- package/buttons.module.d.ts +3 -13
- package/chip/chip-list.component.d.ts +19 -13
- package/chip/chip.component.d.ts +32 -46
- package/chip/chip.module.d.ts +8 -15
- package/chip/models/avatar-settings.interface.d.ts +9 -9
- package/chip/models/selection.d.ts +0 -1
- package/common/models/arrow-settings.d.ts +4 -4
- package/common/models/fillmode.d.ts +2 -2
- package/common/models/rounded.d.ts +2 -2
- package/common/models/size.d.ts +2 -3
- package/common/models/theme-color.d.ts +20 -19
- package/directives.d.ts +88 -8
- package/dropdownbutton/dropdownbutton.component.d.ts +38 -76
- package/dropdownbutton/dropdownbutton.module.d.ts +20 -4
- package/esm2022/button/button.component.mjs +28 -24
- package/esm2022/button/button.module.mjs +8 -18
- package/esm2022/buttongroup/buttongroup.component.mjs +22 -18
- package/esm2022/buttongroup/buttongroup.module.mjs +18 -1
- package/esm2022/buttons.module.mjs +3 -13
- package/esm2022/chip/chip-list.component.mjs +19 -13
- package/esm2022/chip/chip.component.mjs +34 -48
- package/esm2022/chip/chip.module.mjs +8 -15
- package/esm2022/directives.mjs +88 -8
- package/esm2022/dropdownbutton/dropdownbutton.component.mjs +38 -76
- package/esm2022/dropdownbutton/dropdownbutton.module.mjs +20 -4
- package/esm2022/floatingactionbutton/floatingactionbutton.component.mjs +33 -75
- package/esm2022/floatingactionbutton/floatingactionbutton.module.mjs +9 -17
- package/esm2022/floatingactionbutton/templates/dial-item-template.directive.mjs +12 -4
- package/esm2022/floatingactionbutton/templates/fab-template.directive.mjs +12 -3
- package/esm2022/listbutton/button-item-template.directive.mjs +15 -37
- package/esm2022/listbutton/list-button.mjs +12 -14
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/splitbutton/localization/custom-messages.component.mjs +2 -2
- package/esm2022/splitbutton/localization/messages.mjs +14 -15
- package/esm2022/splitbutton/splitbutton.component.mjs +35 -135
- package/esm2022/splitbutton/splitbutton.module.mjs +3 -2
- package/fesm2022/progress-kendo-angular-buttons.mjs +435 -544
- package/floatingactionbutton/floatingactionbutton.component.d.ts +33 -75
- package/floatingactionbutton/floatingactionbutton.module.d.ts +9 -16
- package/floatingactionbutton/models/align.d.ts +6 -1
- package/floatingactionbutton/models/item-animation.interface.d.ts +6 -1
- package/floatingactionbutton/models/item-click.event.d.ts +8 -1
- package/floatingactionbutton/models/item.interface.d.ts +6 -6
- package/floatingactionbutton/models/offset.d.ts +7 -2
- package/floatingactionbutton/models/position-mode.d.ts +5 -5
- package/floatingactionbutton/templates/dial-item-template.directive.d.ts +12 -4
- package/floatingactionbutton/templates/fab-template.directive.d.ts +12 -3
- package/listbutton/button-item-template.directive.d.ts +15 -37
- package/listbutton/list-button.d.ts +12 -14
- package/listbutton/list-item-model.d.ts +12 -24
- package/listbutton/popup-settings.d.ts +17 -12
- package/package.json +7 -7
- package/splitbutton/localization/custom-messages.component.d.ts +2 -2
- package/splitbutton/localization/messages.d.ts +14 -15
- package/splitbutton/splitbutton.component.d.ts +35 -135
- package/splitbutton/splitbutton.module.d.ts +2 -1
|
@@ -33,28 +33,26 @@ const DEFAULT_FILL_MODE = 'solid';
|
|
|
33
33
|
/**
|
|
34
34
|
* Represents the Kendo UI DropDownButton component for Angular.
|
|
35
35
|
*
|
|
36
|
+
* Use the DropDownButton to display a button with a popup list of actions.
|
|
37
|
+
*
|
|
36
38
|
* @example
|
|
37
39
|
* ```ts
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
40
|
+
* @Component({
|
|
41
|
+
* selector: 'my-app',
|
|
42
|
+
* template: `
|
|
43
|
+
* <kendo-dropdownbutton [data]="data">
|
|
44
|
+
* User Settings
|
|
45
|
+
* </kendo-dropdownbutton>
|
|
46
|
+
* `
|
|
45
47
|
* })
|
|
46
48
|
* class AppComponent {
|
|
47
|
-
* public data: Array<any> = [
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* text: 'Support'
|
|
55
|
-
* }, {
|
|
56
|
-
* text: 'Log Out'
|
|
57
|
-
* }];
|
|
49
|
+
* public data: Array<any> = [
|
|
50
|
+
* { text: 'My Profile' },
|
|
51
|
+
* { text: 'Friend Requests' },
|
|
52
|
+
* { text: 'Account Settings' },
|
|
53
|
+
* { text: 'Support' },
|
|
54
|
+
* { text: 'Log Out' }
|
|
55
|
+
* ];
|
|
58
56
|
* }
|
|
59
57
|
* ```
|
|
60
58
|
*/
|
|
@@ -62,35 +60,33 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
62
60
|
containerService;
|
|
63
61
|
renderer;
|
|
64
62
|
/**
|
|
65
|
-
*
|
|
63
|
+
* Displays the default arrow icon or a custom one.
|
|
66
64
|
* @default false
|
|
67
65
|
*/
|
|
68
66
|
arrowIcon = false;
|
|
69
67
|
/**
|
|
70
|
-
*
|
|
68
|
+
* Specifies the name of an existing icon in the Kendo UI theme.
|
|
71
69
|
*/
|
|
72
70
|
icon = '';
|
|
73
71
|
/**
|
|
74
|
-
*
|
|
72
|
+
* Specifies an [`SVGIcon`](slug:api_icons_svgicon) to render within the button.
|
|
75
73
|
*/
|
|
76
74
|
svgIcon;
|
|
77
75
|
/**
|
|
78
|
-
*
|
|
76
|
+
* Specifies a list of CSS classes for styling the button with custom icons.
|
|
79
77
|
*/
|
|
80
78
|
iconClass = '';
|
|
81
79
|
/**
|
|
82
|
-
*
|
|
80
|
+
* Specifies a URL for styling the button with a custom image.
|
|
83
81
|
*/
|
|
84
82
|
imageUrl = '';
|
|
85
83
|
/**
|
|
86
84
|
* Sets the data item field that represents the item text.
|
|
87
|
-
* If the data contains only primitive values,
|
|
85
|
+
* If the data contains only primitive values, leave this undefined.
|
|
88
86
|
*/
|
|
89
87
|
textField;
|
|
90
88
|
/**
|
|
91
|
-
* Sets or gets the data of the DropDownButton.
|
|
92
|
-
*
|
|
93
|
-
* > The data has to be provided in an array-like list.
|
|
89
|
+
* Sets or gets the data of the DropDownButton. Provide the data as an array-like list.
|
|
94
90
|
*/
|
|
95
91
|
set data(data) {
|
|
96
92
|
this._data = data || [];
|
|
@@ -99,38 +95,18 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
99
95
|
return this._data;
|
|
100
96
|
}
|
|
101
97
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* The possible values are:
|
|
106
|
-
* * `small`
|
|
107
|
-
* * `medium` (default)
|
|
108
|
-
* * `large`
|
|
109
|
-
* * `none`
|
|
98
|
+
* Specifies the padding of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#size).
|
|
99
|
+
* @default 'medium'
|
|
110
100
|
*/
|
|
111
101
|
size = 'medium';
|
|
112
102
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* The possible values are:
|
|
117
|
-
* * `small`
|
|
118
|
-
* * `medium` (default)
|
|
119
|
-
* * `large`
|
|
120
|
-
* * `full`
|
|
121
|
-
* * `none`
|
|
103
|
+
* Specifies the border radius of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#roundness).
|
|
104
|
+
* @default 'medium'
|
|
122
105
|
*/
|
|
123
106
|
rounded = 'medium';
|
|
124
107
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* The available values are:
|
|
129
|
-
* * `solid` (default)
|
|
130
|
-
* * `flat`
|
|
131
|
-
* * `outline`
|
|
132
|
-
* * `link`
|
|
133
|
-
* * `none`
|
|
108
|
+
* Specifies the background and border styles of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#fill-mode).
|
|
109
|
+
* @default 'solid'
|
|
134
110
|
*/
|
|
135
111
|
set fillMode(fillMode) {
|
|
136
112
|
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
@@ -139,27 +115,12 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
139
115
|
return this._fillMode;
|
|
140
116
|
}
|
|
141
117
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
|
|
145
|
-
*
|
|
146
|
-
* The possible values are:
|
|
147
|
-
* * `base` —Applies coloring based on the `base` theme color. (default)
|
|
148
|
-
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
149
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
150
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
151
|
-
* * `info`—Applies coloring based on the `info` theme color.
|
|
152
|
-
* * `success`— Applies coloring based on the `success` theme color.
|
|
153
|
-
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
154
|
-
* * `error`— Applies coloring based on the `error` theme color.
|
|
155
|
-
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
156
|
-
* * `light`— Applies coloring based on the `light` theme color.
|
|
157
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
158
|
-
* * `none` —Removes the default CSS class (no class would be rendered).
|
|
118
|
+
* Specifies predefined theme colors for the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#theme-colors).
|
|
119
|
+
* @default 'base'
|
|
159
120
|
*/
|
|
160
121
|
themeColor = 'base';
|
|
161
122
|
/**
|
|
162
|
-
* Sets attributes
|
|
123
|
+
* Sets attributes for the main button.
|
|
163
124
|
*/
|
|
164
125
|
set buttonAttributes(buttonAttributes) {
|
|
165
126
|
const newButtonAttributes = buttonAttributes ? buttonAttributes : null;
|
|
@@ -170,15 +131,16 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
170
131
|
return this._buttonAttributes;
|
|
171
132
|
}
|
|
172
133
|
/**
|
|
173
|
-
* Fires
|
|
134
|
+
* Fires when the user clicks a drop-down list item.
|
|
135
|
+
* The event data contains the data item bound to the clicked list item.
|
|
174
136
|
*/
|
|
175
137
|
itemClick = new EventEmitter();
|
|
176
138
|
/**
|
|
177
|
-
* Fires
|
|
139
|
+
* Fires when the DropDownButton is focused.
|
|
178
140
|
*/
|
|
179
141
|
onFocus = new EventEmitter();
|
|
180
142
|
/**
|
|
181
|
-
* Fires
|
|
143
|
+
* Fires when the DropDownButton is blurred.
|
|
182
144
|
*/
|
|
183
145
|
onBlur = new EventEmitter();
|
|
184
146
|
get focused() {
|
|
@@ -253,7 +215,7 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
253
215
|
}
|
|
254
216
|
}
|
|
255
217
|
/**
|
|
256
|
-
* Focuses the DropDownButton
|
|
218
|
+
* Focuses the DropDownButton.
|
|
257
219
|
*/
|
|
258
220
|
focus() {
|
|
259
221
|
if (isDocumentAvailable()) {
|
|
@@ -261,7 +223,7 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
261
223
|
}
|
|
262
224
|
}
|
|
263
225
|
/**
|
|
264
|
-
* Blurs the DropDownButton
|
|
226
|
+
* Blurs the DropDownButton.
|
|
265
227
|
*/
|
|
266
228
|
blur() {
|
|
267
229
|
if (isDocumentAvailable()) {
|
|
@@ -12,12 +12,28 @@ import * as i1 from "./dropdownbutton.component";
|
|
|
12
12
|
import * as i2 from "../listbutton/button-item-template.directive";
|
|
13
13
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
14
14
|
/**
|
|
15
|
+
* Exports the package module.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* Required for adding DropDownButton features in NgModule-based Angular applications.
|
|
17
18
|
*
|
|
18
|
-
* The
|
|
19
|
-
* - `DropDownButtonComponent`—The
|
|
20
|
-
* - `ButtonItemTemplateDirective`—The
|
|
19
|
+
* The module includes:
|
|
20
|
+
* - `DropDownButtonComponent`—The component class for the DropDownButton.
|
|
21
|
+
* - `ButtonItemTemplateDirective`—The directive for the button item template.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import { DropDownButtonModule } from '@progress/kendo-angular-buttons';
|
|
26
|
+
* import { NgModule } from '@angular/core';
|
|
27
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
28
|
+
* import { AppComponent } from './app.component';
|
|
29
|
+
*
|
|
30
|
+
* @NgModule({
|
|
31
|
+
* declarations: [AppComponent],
|
|
32
|
+
* imports: [BrowserModule, DropDownButtonModule],
|
|
33
|
+
* bootstrap: [AppComponent]
|
|
34
|
+
* })
|
|
35
|
+
* export class AppModule {}
|
|
36
|
+
* ```
|
|
21
37
|
*/
|
|
22
38
|
export class DropDownButtonModule {
|
|
23
39
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropDownButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -57,10 +57,17 @@ const DEFAULT_ROUNDED = 'full';
|
|
|
57
57
|
const DEFAULT_SIZE = 'medium';
|
|
58
58
|
const DEFAULT_THEME_COLOR = 'primary';
|
|
59
59
|
/**
|
|
60
|
+
* Represents the Kendo UI FloatingActionButton component for Angular.
|
|
61
|
+
* Use it to represent the primary or most common action in an application.
|
|
60
62
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```html
|
|
65
|
+
* <kendo-floatingactionbutton
|
|
66
|
+
* [icon]="'plus'"
|
|
67
|
+
* [text]="'Add'"
|
|
68
|
+
* [align]="{ horizontal: 'end', vertical: 'bottom' }">
|
|
69
|
+
* </kendo-floatingactionbutton>
|
|
70
|
+
* ```
|
|
64
71
|
*/
|
|
65
72
|
export class FloatingActionButtonComponent {
|
|
66
73
|
renderer;
|
|
@@ -83,22 +90,8 @@ export class FloatingActionButtonComponent {
|
|
|
83
90
|
dialItemTemplate;
|
|
84
91
|
fabTemplate;
|
|
85
92
|
/**
|
|
86
|
-
* Specifies the theme color of the FloatingActionButton
|
|
87
|
-
*
|
|
88
|
-
* The theme color will be applied as background color of the component.
|
|
89
|
-
*
|
|
90
|
-
* The possible values are:
|
|
91
|
-
* * `primary` (Default)—Applies coloring based on the `primary` theme color.
|
|
92
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
93
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
94
|
-
* * `info`—Applies coloring based on the `info` theme color.
|
|
95
|
-
* * `success`— Applies coloring based on the `success` theme color.
|
|
96
|
-
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
97
|
-
* * `error`— Applies coloring based on the `error` theme color.
|
|
98
|
-
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
99
|
-
* * `light`— Applies coloring based on the `light` theme color.
|
|
100
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
101
|
-
* * `none`— Removes the built in theme color.
|
|
93
|
+
* Specifies the theme color of the FloatingActionButton ([see example](slug:appearance_floatingactionbutton#theme-colors)).
|
|
94
|
+
* @default "primary"
|
|
102
95
|
*/
|
|
103
96
|
set themeColor(themeColor) {
|
|
104
97
|
const newThemeColor = themeColor ? themeColor : DEFAULT_THEME_COLOR;
|
|
@@ -109,14 +102,8 @@ export class FloatingActionButtonComponent {
|
|
|
109
102
|
return this._themeColor;
|
|
110
103
|
}
|
|
111
104
|
/**
|
|
112
|
-
* Specifies the size of the FloatingActionButton
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* The possible values are:
|
|
116
|
-
* * `small`
|
|
117
|
-
* * `medium` (Default)
|
|
118
|
-
* * `large`
|
|
119
|
-
* * `none`
|
|
105
|
+
* Specifies the size of the FloatingActionButton ([see example](slug:appearance_floatingactionbutton#size)).
|
|
106
|
+
* @default "medium"
|
|
120
107
|
*/
|
|
121
108
|
set size(size) {
|
|
122
109
|
const newSize = size ? size : DEFAULT_SIZE;
|
|
@@ -127,14 +114,9 @@ export class FloatingActionButtonComponent {
|
|
|
127
114
|
return this._size;
|
|
128
115
|
}
|
|
129
116
|
/**
|
|
130
|
-
*
|
|
117
|
+
* Specifies the border radius of the FloatingActionButton ([see example](slug:appearance_floatingactionbutton#roundness)).
|
|
131
118
|
*
|
|
132
|
-
*
|
|
133
|
-
* * `small`
|
|
134
|
-
* * `medium`
|
|
135
|
-
* * `large`
|
|
136
|
-
* * `full` (default)
|
|
137
|
-
* * `none`
|
|
119
|
+
* @default "full"
|
|
138
120
|
*/
|
|
139
121
|
set rounded(rounded) {
|
|
140
122
|
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
@@ -146,6 +128,7 @@ export class FloatingActionButtonComponent {
|
|
|
146
128
|
}
|
|
147
129
|
/**
|
|
148
130
|
* Specifies whether the FloatingActionButton is disabled.
|
|
131
|
+
* @default false
|
|
149
132
|
*/
|
|
150
133
|
set disabled(disabled) {
|
|
151
134
|
this._disabled = disabled;
|
|
@@ -154,15 +137,8 @@ export class FloatingActionButtonComponent {
|
|
|
154
137
|
return this._disabled;
|
|
155
138
|
}
|
|
156
139
|
/**
|
|
157
|
-
* Specifies the
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* The possible values are:
|
|
161
|
-
* * `{ horizontal: 'start'|'center'|'end', vertical: 'top'|'middle'|'bottom' }`
|
|
162
|
-
*
|
|
163
|
-
* The default value is:
|
|
164
|
-
* * `{ horizontal: 'end', vertical: 'bottom' }`
|
|
165
|
-
*
|
|
140
|
+
* Specifies the alignment of the FloatingActionButton ([see example](slug:positioning_floatingactionbutton#alignment)).
|
|
141
|
+
* @default { horizontal: 'end', vertical: 'top' }
|
|
166
142
|
*/
|
|
167
143
|
set align(align) {
|
|
168
144
|
this._align = Object.assign(this._align, align);
|
|
@@ -171,11 +147,8 @@ export class FloatingActionButtonComponent {
|
|
|
171
147
|
return this._align;
|
|
172
148
|
}
|
|
173
149
|
/**
|
|
174
|
-
* Specifies the
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* * The default value is:
|
|
178
|
-
* * `{ x: '16px', y: '16px' }`
|
|
150
|
+
* Specifies the offset position of the FloatingActionButton ([see example]({% slug positioning_floatingactionbutton %}#offset)).
|
|
151
|
+
* @default { x: '16px', y: '16px' }
|
|
179
152
|
*/
|
|
180
153
|
set offset(offset) {
|
|
181
154
|
this._offset = Object.assign(this._offset, offset);
|
|
@@ -185,17 +158,12 @@ export class FloatingActionButtonComponent {
|
|
|
185
158
|
return this._offset;
|
|
186
159
|
}
|
|
187
160
|
/**
|
|
188
|
-
* Specifies the
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* * The possible values are:
|
|
192
|
-
* * `absolute`—Positions the FloatingActionButton absolutely to its first positioned parent element.
|
|
193
|
-
* * `fixed` (Default)—Positions the FloatingActionButton relative to the viewport. It always stays in the same place even if the page is scrolled.
|
|
161
|
+
* Specifies the position mode of the FloatingActionButton ([see example](slug:positioning_floatingactionbutton#position-mode)).
|
|
162
|
+
* @default "fixed"
|
|
194
163
|
*/
|
|
195
164
|
positionMode = 'fixed';
|
|
196
165
|
/**
|
|
197
166
|
* Defines the name of an existing icon in a Kendo UI theme.
|
|
198
|
-
* If provided, the icon will be rendered inside the FloatingActionButton by a `span.k-icon` element.
|
|
199
167
|
*/
|
|
200
168
|
icon;
|
|
201
169
|
/**
|
|
@@ -203,8 +171,7 @@ export class FloatingActionButtonComponent {
|
|
|
203
171
|
*/
|
|
204
172
|
svgIcon;
|
|
205
173
|
/**
|
|
206
|
-
* Defines a CSS class or multiple classes
|
|
207
|
-
* Allows the usage of custom icons, rendered inside the FloatingActionButton by a `span` element.
|
|
174
|
+
* Defines a CSS class or multiple classes for custom icons.
|
|
208
175
|
*/
|
|
209
176
|
iconClass;
|
|
210
177
|
/**
|
|
@@ -223,46 +190,37 @@ export class FloatingActionButtonComponent {
|
|
|
223
190
|
text;
|
|
224
191
|
/**
|
|
225
192
|
* Specifies the animation settings of the FloatingActionButton dial items.
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* The possible values are:
|
|
229
|
-
* * Boolean
|
|
230
|
-
* * (Default) `true`—Applies the default [`DialItemAnimation`]({% slug api_buttons_dialitemanimation %}) settings.
|
|
231
|
-
* * `false`
|
|
232
|
-
* * `DialItemAnimation`
|
|
233
|
-
* * `duration`—Specifies the animation duration in milliseconds for each dial item. Defaults to `180ms`.
|
|
234
|
-
* * `gap`—Specifies the animation duration gap in milliseconds after each dial item is animated. Defaults to `90ms`.
|
|
193
|
+
* @default true
|
|
235
194
|
*/
|
|
236
195
|
dialItemAnimation = true;
|
|
237
196
|
/**
|
|
238
197
|
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the FloatingActionButton.
|
|
198
|
+
* @default 0
|
|
239
199
|
*/
|
|
240
200
|
tabIndex = 0;
|
|
241
201
|
/**
|
|
242
|
-
* Specifies the collection of
|
|
202
|
+
* Specifies the collection of dial items rendered in the FloatingActionButton popup.
|
|
243
203
|
*/
|
|
244
204
|
dialItems = [];
|
|
245
205
|
/**
|
|
246
|
-
* Fires
|
|
206
|
+
* Fires when the FloatingActionButton is blurred.
|
|
247
207
|
*/
|
|
248
208
|
onBlur = new EventEmitter();
|
|
249
209
|
/**
|
|
250
|
-
* Fires
|
|
210
|
+
* Fires when the FloatingActionButton is focused.
|
|
251
211
|
*/
|
|
252
212
|
onFocus = new EventEmitter();
|
|
253
213
|
/**
|
|
254
|
-
* Fires
|
|
214
|
+
* Fires when a dial item is clicked.
|
|
255
215
|
*/
|
|
256
216
|
dialItemClick = new EventEmitter();
|
|
257
217
|
/**
|
|
258
|
-
* Fires
|
|
259
|
-
*
|
|
260
|
-
* ([more information and example](slug:events_floatingactionbutton)).
|
|
218
|
+
* Fires when the popup is about to open. This event is preventable
|
|
219
|
+
* ([more information and example](slug:events_floatingactionbutton)).
|
|
261
220
|
*/
|
|
262
221
|
open = new EventEmitter();
|
|
263
222
|
/**
|
|
264
|
-
* Fires
|
|
265
|
-
* This event is preventable. If you cancel the event, the popup will remain open
|
|
223
|
+
* Fires when the popup is about to close. This event is preventable
|
|
266
224
|
* ([more information and example](slug:events_floatingactionbutton)).
|
|
267
225
|
*/
|
|
268
226
|
close = new EventEmitter();
|
|
@@ -11,33 +11,25 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
import * as i1 from "./floatingactionbutton.component";
|
|
12
12
|
import * as i2 from "./templates/dial-item-template.directive";
|
|
13
13
|
import * as i3 from "./templates/fab-template.directive";
|
|
14
|
-
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
15
14
|
/**
|
|
16
|
-
* Represents the
|
|
17
|
-
* definition for the FloatingActionButton component.
|
|
15
|
+
* Represents the NgModule definition for the FloatingActionButton component.
|
|
18
16
|
*
|
|
19
|
-
*
|
|
17
|
+
* Required for adding FloatingActionButton features in NgModule-based Angular applications.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
23
21
|
* import { FloatingActionButtonModule } from '@progress/kendo-angular-buttons';
|
|
24
|
-
*
|
|
25
|
-
* // The browser platform with a compiler
|
|
26
22
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
27
|
-
*
|
|
28
23
|
* import { NgModule } from '@angular/core';
|
|
29
|
-
*
|
|
30
|
-
* // Import the app component
|
|
31
24
|
* import { AppComponent } from './app.component';
|
|
25
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
32
26
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* bootstrap: [AppComponent]
|
|
27
|
+
* @NgModule({
|
|
28
|
+
* declarations: [AppComponent],
|
|
29
|
+
* imports: [BrowserModule, FloatingActionButtonModule],
|
|
30
|
+
* bootstrap: [AppComponent]
|
|
38
31
|
* })
|
|
39
32
|
* export class AppModule {}
|
|
40
|
-
*
|
|
41
33
|
* ```
|
|
42
34
|
*/
|
|
43
35
|
export class FloatingActionButtonModule {
|
|
@@ -5,10 +5,18 @@
|
|
|
5
5
|
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
* Represents a template that defines the content of
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Represents a template that defines the content of a dial item.
|
|
9
|
+
* To define the template, nest an `<ng-template>` tag with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
10
|
+
*([see example]({% slug templates_floatingactionbutton %}#dial-item-template)).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <kendo-floatingactionbutton>
|
|
15
|
+
* <ng-template kendoDialItemTemplate let-item="item">
|
|
16
|
+
* {{ item.label }}
|
|
17
|
+
* </ng-template>
|
|
18
|
+
* </kendo-floatingactionbutton>
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
export class DialItemTemplateDirective {
|
|
14
22
|
templateRef;
|
|
@@ -6,9 +6,18 @@ import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Represents a template that defines the content of the FloatingActionButton.
|
|
9
|
-
* To define the template, nest an `<ng-template>` tag
|
|
10
|
-
*
|
|
11
|
-
* ([see example](
|
|
9
|
+
* To define the template, nest an `<ng-template>` tag with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag
|
|
10
|
+
*
|
|
11
|
+
* ([see example](slug:templates_floatingactionbutton#floatingactionbutton-template)).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <kendo-floatingactionbutton>
|
|
16
|
+
* <ng-template kendoFloatingActionButtonTemplate>
|
|
17
|
+
* Custom Content
|
|
18
|
+
* </ng-template>
|
|
19
|
+
* </kendo-floatingactionbutton>
|
|
20
|
+
* ```
|
|
12
21
|
*/
|
|
13
22
|
export class FloatingActionButtonTemplateDirective {
|
|
14
23
|
templateRef;
|
|
@@ -5,49 +5,27 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Renders the list item content.
|
|
9
9
|
*
|
|
10
10
|
* To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* - Use the `kendoDropDownButtonItemTemplate` directive for the DropDownButton.
|
|
13
|
+
* - Use the `kendoSplitButtonItemTemplate` directive for the SplitButton.
|
|
14
14
|
*
|
|
15
|
-
* The template context is set to the current component.
|
|
15
|
+
* The template context is set to the current component. Use the `let-dataItem` directive to reference the current data item.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* <span>{{dataItem}} option</span>
|
|
30
|
-
* </ng-template>
|
|
31
|
-
* </kendo-dropdownbutton>
|
|
32
|
-
* `
|
|
33
|
-
* })
|
|
34
|
-
* class AppComponent {
|
|
35
|
-
* public listItems: Array<any> = [{
|
|
36
|
-
* text: 'item1',
|
|
37
|
-
* icon: 'arrow-rotate-cw',
|
|
38
|
-
* disabled: false,
|
|
39
|
-
* click: (dataItem: any) => {
|
|
40
|
-
* //action
|
|
41
|
-
* }
|
|
42
|
-
* }, {
|
|
43
|
-
* text: 'item2',
|
|
44
|
-
* icon: 'arrow-rotate-cw',
|
|
45
|
-
* disabled: false,
|
|
46
|
-
* click: (dataItem: any) => {
|
|
47
|
-
* //action
|
|
48
|
-
* }
|
|
49
|
-
* }]
|
|
50
|
-
* }
|
|
18
|
+
* ```html
|
|
19
|
+
* <kendo-splitbutton [data]="listItems">
|
|
20
|
+
* <ng-template kendoSplitButtonItemTemplate let-dataItem>
|
|
21
|
+
* <span>{{dataItem}} option</span>
|
|
22
|
+
* </ng-template>
|
|
23
|
+
* </kendo-splitbutton>
|
|
24
|
+
* <kendo-dropdownbutton [data]="listItems">
|
|
25
|
+
* <ng-template kendoDropDownButtonItemTemplate let-dataItem>
|
|
26
|
+
* <span>{{dataItem}} option</span>
|
|
27
|
+
* </ng-template>
|
|
28
|
+
* </kendo-dropdownbutton>
|
|
51
29
|
* ```
|
|
52
30
|
*
|
|
53
31
|
* For more examples, refer to the article on the [DropDownButton templates](slug:itemstemplates_dropdownbutton).
|
|
@@ -58,6 +58,7 @@ export class ListButton extends MultiTabStop {
|
|
|
58
58
|
container;
|
|
59
59
|
/**
|
|
60
60
|
* Sets the disabled state of the DropDownButton.
|
|
61
|
+
* When `true`, the button is disabled and cannot be interacted with.
|
|
61
62
|
*/
|
|
62
63
|
set disabled(value) {
|
|
63
64
|
if (value && this.openState) {
|
|
@@ -70,21 +71,24 @@ export class ListButton extends MultiTabStop {
|
|
|
70
71
|
}
|
|
71
72
|
/**
|
|
72
73
|
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
74
|
+
* Determines the order of focus when navigating with the keyboard.
|
|
75
|
+
*
|
|
76
|
+
* @default 0
|
|
73
77
|
*/
|
|
74
78
|
tabIndex = 0;
|
|
75
79
|
/**
|
|
76
|
-
* The CSS classes
|
|
77
|
-
* Supports the
|
|
80
|
+
* The CSS classes applied to the main button.
|
|
81
|
+
* Supports the same values as [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
78
82
|
*/
|
|
79
83
|
buttonClass;
|
|
80
84
|
/**
|
|
81
|
-
* Fires
|
|
82
|
-
* This event is preventable.
|
|
85
|
+
* Fires when the popup is about to open.
|
|
86
|
+
* This event is preventable. Canceling the event keeps the popup closed.
|
|
83
87
|
*/
|
|
84
88
|
open = new EventEmitter();
|
|
85
89
|
/**
|
|
86
|
-
* Fires
|
|
87
|
-
* This event is preventable.
|
|
90
|
+
* Fires when the popup is about to close.
|
|
91
|
+
* This event is preventable. Canceling the event keeps the popup open.
|
|
88
92
|
*/
|
|
89
93
|
close = new EventEmitter();
|
|
90
94
|
/**
|
|
@@ -108,12 +112,6 @@ export class ListButton extends MultiTabStop {
|
|
|
108
112
|
}
|
|
109
113
|
/**
|
|
110
114
|
* Configures the popup of the DropDownButton.
|
|
111
|
-
*
|
|
112
|
-
* The available options are:
|
|
113
|
-
* - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
114
|
-
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
|
|
115
|
-
* - `appendTo: "root" | "component" | ViewContainerRef`—Specifies the component to which the popup will be appended.
|
|
116
|
-
* - `align: "left" | "center" | "right"`—Specifies the alignment of the popup.
|
|
117
115
|
*/
|
|
118
116
|
set popupSettings(settings) {
|
|
119
117
|
this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings);
|
|
@@ -250,9 +248,9 @@ export class ListButton extends MultiTabStop {
|
|
|
250
248
|
}
|
|
251
249
|
/**
|
|
252
250
|
* Toggles the visibility of the popup.
|
|
253
|
-
* If the `toggle` method is used
|
|
251
|
+
* If the `toggle` method is used, the `open` and `close` events are not fired.
|
|
254
252
|
*
|
|
255
|
-
* @param open - The state of the popup.
|
|
253
|
+
* @param open - The desired state of the popup.
|
|
256
254
|
*/
|
|
257
255
|
toggle(open) {
|
|
258
256
|
if (this.disabled) {
|