@progress/kendo-react-buttons 4.14.1 → 5.0.0-dev.202201182040
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-react-buttons.js +1 -1
- package/dist/es/Button.d.ts +79 -5
- package/dist/es/Button.js +30 -31
- package/dist/es/ButtonGroup.js +1 -1
- package/dist/es/ButtonInterface.d.ts +0 -13
- package/dist/es/Chip/Chip.d.ts +51 -9
- package/dist/es/Chip/Chip.js +34 -37
- package/dist/es/Chip/ChipList.d.ts +12 -0
- package/dist/es/Chip/ChipList.js +15 -13
- package/dist/es/FloatingActionButton/FloatingActionButton.js +26 -18
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +18 -4
- package/dist/es/FloatingActionButton/models/rounded.d.ts +12 -0
- package/dist/es/{buttonLook.js → FloatingActionButton/models/rounded.js} +0 -0
- package/dist/es/FloatingActionButton/models/shape.d.ts +2 -1
- package/dist/es/FloatingActionButton/models/size.d.ts +2 -1
- package/dist/es/FloatingActionButton/models/theme-color.d.ts +2 -1
- package/dist/es/ListButton/ButtonItem.d.ts +6 -5
- package/dist/es/ListButton/ButtonItem.js +24 -44
- package/dist/es/ListButton/DropDownButton.d.ts +2 -4
- package/dist/es/ListButton/DropDownButton.js +14 -13
- package/dist/es/ListButton/SplitButton.d.ts +0 -1
- package/dist/es/ListButton/SplitButton.js +13 -13
- package/dist/es/ListButton/models/ListButtonProps.d.ts +125 -13
- package/dist/es/main.d.ts +3 -3
- package/dist/es/models/index.d.ts +0 -16
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.js +3 -3
- package/dist/npm/Button.d.ts +79 -5
- package/dist/npm/Button.js +29 -30
- package/dist/npm/ButtonGroup.js +1 -1
- package/dist/npm/ButtonInterface.d.ts +0 -13
- package/dist/npm/Chip/Chip.d.ts +51 -9
- package/dist/npm/Chip/Chip.js +33 -36
- package/dist/npm/Chip/ChipList.d.ts +12 -0
- package/dist/npm/Chip/ChipList.js +14 -12
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +25 -17
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +18 -4
- package/dist/npm/FloatingActionButton/models/rounded.d.ts +12 -0
- package/dist/npm/{buttonLook.js → FloatingActionButton/models/rounded.js} +0 -0
- package/dist/npm/FloatingActionButton/models/shape.d.ts +2 -1
- package/dist/npm/FloatingActionButton/models/size.d.ts +2 -1
- package/dist/npm/FloatingActionButton/models/theme-color.d.ts +2 -1
- package/dist/npm/ListButton/ButtonItem.d.ts +6 -5
- package/dist/npm/ListButton/ButtonItem.js +24 -44
- package/dist/npm/ListButton/DropDownButton.d.ts +2 -4
- package/dist/npm/ListButton/DropDownButton.js +13 -12
- package/dist/npm/ListButton/SplitButton.d.ts +0 -1
- package/dist/npm/ListButton/SplitButton.js +12 -12
- package/dist/npm/ListButton/models/ListButtonProps.d.ts +125 -13
- package/dist/npm/main.d.ts +3 -3
- package/dist/npm/models/index.d.ts +0 -16
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/util.js +3 -3
- package/dist/systemjs/kendo-react-buttons.js +1 -1
- package/package.json +11 -10
- package/dist/es/buttonLook.d.ts +0 -14
- package/dist/npm/buttonLook.d.ts +0 -14
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonsPopupSettings } from './PopupSettings';
|
|
3
3
|
import { SplitButtonClickEvent, SplitButtonItemClickEvent, SplitButtonFocusEvent, SplitButtonBlurEvent, SplitButtonOpenEvent, SplitButtonCloseEvent, DropDownButtonItemClickEvent, DropDownButtonFocusEvent, DropDownButtonBlurEvent, DropDownButtonOpenEvent, DropDownButtonCloseEvent } from './events';
|
|
4
|
-
import { ButtonLook } from '../../buttonLook';
|
|
5
4
|
import { ButtonItemProps } from '../ButtonItem';
|
|
6
5
|
export interface DropDownButtonProps {
|
|
7
6
|
/**
|
|
@@ -64,10 +63,6 @@ export interface DropDownButtonProps {
|
|
|
64
63
|
item: any;
|
|
65
64
|
itemIndex: number;
|
|
66
65
|
}>;
|
|
67
|
-
/**
|
|
68
|
-
* Changes the visual appearance by using alternative styling options ([see example]({% slug overview_dropdownbutton %}#toc-basic-usage)).
|
|
69
|
-
*/
|
|
70
|
-
look?: ButtonLook;
|
|
71
66
|
/**
|
|
72
67
|
* Sets the `className` of the DropDownButton component.
|
|
73
68
|
*/
|
|
@@ -80,10 +75,6 @@ export interface DropDownButtonProps {
|
|
|
80
75
|
* Sets the direction of the component.
|
|
81
76
|
*/
|
|
82
77
|
dir?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Adds visual weight to the button and makes it primary ([see example]({% slug overview_dropdownbutton %}#toc-basic-usage)).
|
|
85
|
-
*/
|
|
86
|
-
primary?: boolean;
|
|
87
78
|
/**
|
|
88
79
|
* Fires when the component is focused ([see example]({% slug overview_dropdownbutton %}#toc-events)).
|
|
89
80
|
*/
|
|
@@ -104,6 +95,74 @@ export interface DropDownButtonProps {
|
|
|
104
95
|
* Fires when the popup which contains the items is closed ([see example]({% slug overview_dropdownbutton %}#toc-events)).
|
|
105
96
|
*/
|
|
106
97
|
onClose?: (event: DropDownButtonCloseEvent) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Configures the `size` of the DropDownButton.
|
|
100
|
+
*
|
|
101
|
+
* The available options are:
|
|
102
|
+
* - small
|
|
103
|
+
* - medium
|
|
104
|
+
* - large
|
|
105
|
+
* - null—Does not set a size `className`.
|
|
106
|
+
*
|
|
107
|
+
* @default `medium`
|
|
108
|
+
*/
|
|
109
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
110
|
+
/**
|
|
111
|
+
* Configures the `shape` of the DropDownButton.
|
|
112
|
+
*
|
|
113
|
+
* The available options are:
|
|
114
|
+
* - rectangle
|
|
115
|
+
* - square
|
|
116
|
+
* - null—Does not set a shape `className`.
|
|
117
|
+
*
|
|
118
|
+
* @default `rectangle`
|
|
119
|
+
*/
|
|
120
|
+
shape?: null | 'rectangle' | 'square';
|
|
121
|
+
/**
|
|
122
|
+
* Configures the `roundness` of the DropDownButton.
|
|
123
|
+
*
|
|
124
|
+
* The available options are:
|
|
125
|
+
* - small
|
|
126
|
+
* - medium
|
|
127
|
+
* - large
|
|
128
|
+
* - full
|
|
129
|
+
* - null—Does not set a rounded `className`.
|
|
130
|
+
*
|
|
131
|
+
* @default `medium`
|
|
132
|
+
*/
|
|
133
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
134
|
+
/**
|
|
135
|
+
* Configures the `fillMode` of the DropDownButton.
|
|
136
|
+
*
|
|
137
|
+
* The available options are:
|
|
138
|
+
* - solid
|
|
139
|
+
* - outline
|
|
140
|
+
* - flat
|
|
141
|
+
* - link
|
|
142
|
+
* - null—Does not set a fillMode `className`.
|
|
143
|
+
*
|
|
144
|
+
* @default `solid`
|
|
145
|
+
*/
|
|
146
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link';
|
|
147
|
+
/**
|
|
148
|
+
* Configures the `themeColor` of the DropDownButton.
|
|
149
|
+
*
|
|
150
|
+
* The available options are:
|
|
151
|
+
* - base
|
|
152
|
+
* - primary
|
|
153
|
+
* - secondary
|
|
154
|
+
* - tertiary
|
|
155
|
+
* - info
|
|
156
|
+
* - success
|
|
157
|
+
* - warning
|
|
158
|
+
* - dark
|
|
159
|
+
* - light
|
|
160
|
+
* - inverse
|
|
161
|
+
* - null—Does not set a themeColor `className`.
|
|
162
|
+
*
|
|
163
|
+
* @default `base`
|
|
164
|
+
*/
|
|
165
|
+
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'dark' | 'light' | 'inverse';
|
|
107
166
|
}
|
|
108
167
|
export interface SplitButtonProps {
|
|
109
168
|
/**
|
|
@@ -165,10 +224,6 @@ export interface SplitButtonProps {
|
|
|
165
224
|
item: any;
|
|
166
225
|
itemIndex: number;
|
|
167
226
|
}>;
|
|
168
|
-
/**
|
|
169
|
-
* Changes the visual appearance by using alternative styling options ([see example]({% slug overview_splitbutton %}#toc-basic-usage)).
|
|
170
|
-
*/
|
|
171
|
-
look?: ButtonLook;
|
|
172
227
|
/**
|
|
173
228
|
* Sets the `className` of the SplitButton component.
|
|
174
229
|
*/
|
|
@@ -205,4 +260,61 @@ export interface SplitButtonProps {
|
|
|
205
260
|
* Fires when the popup which contains the items is closed ([see example]({% slug overview_splitbutton %}#toc-events)).
|
|
206
261
|
*/
|
|
207
262
|
onClose?: (event: SplitButtonCloseEvent) => void;
|
|
263
|
+
/**
|
|
264
|
+
* Configures the `size` of the SplitButton.
|
|
265
|
+
*
|
|
266
|
+
* The available options are:
|
|
267
|
+
* - small
|
|
268
|
+
* - medium
|
|
269
|
+
* - large
|
|
270
|
+
* - null—Does not set a size `className`.
|
|
271
|
+
*
|
|
272
|
+
* @default `medium`
|
|
273
|
+
*/
|
|
274
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
275
|
+
/**
|
|
276
|
+
* Configures the `roundness` of the SplitButton.
|
|
277
|
+
*
|
|
278
|
+
* The available options are:
|
|
279
|
+
* - small
|
|
280
|
+
* - medium
|
|
281
|
+
* - large
|
|
282
|
+
* - full
|
|
283
|
+
* - null—Does not set a rounded `className`.
|
|
284
|
+
*
|
|
285
|
+
* @default `medium`
|
|
286
|
+
*/
|
|
287
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
288
|
+
/**
|
|
289
|
+
* Configures the `fillMode` of the SplitButton.
|
|
290
|
+
*
|
|
291
|
+
* The available options are:
|
|
292
|
+
* - solid
|
|
293
|
+
* - outline
|
|
294
|
+
* - flat
|
|
295
|
+
* - link
|
|
296
|
+
* - null—Does not set a fillMode `className`.
|
|
297
|
+
*
|
|
298
|
+
* @default `solid`
|
|
299
|
+
*/
|
|
300
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link';
|
|
301
|
+
/**
|
|
302
|
+
* Configures the `themeColor` of the SplitButton.
|
|
303
|
+
*
|
|
304
|
+
* The available options are:
|
|
305
|
+
* - base
|
|
306
|
+
* - primary
|
|
307
|
+
* - secondary
|
|
308
|
+
* - tertiary
|
|
309
|
+
* - info
|
|
310
|
+
* - success
|
|
311
|
+
* - warning
|
|
312
|
+
* - dark
|
|
313
|
+
* - light
|
|
314
|
+
* - inverse
|
|
315
|
+
* - null—Does not set a themeColor `className`.
|
|
316
|
+
*
|
|
317
|
+
* @default `base`
|
|
318
|
+
*/
|
|
319
|
+
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'dark' | 'light' | 'inverse';
|
|
208
320
|
}
|
package/dist/es/main.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Button, { ButtonProps } from './Button';
|
|
2
2
|
import ButtonGroup, { ButtonGroupProps } from './ButtonGroup';
|
|
3
|
-
import { ButtonLook } from './buttonLook';
|
|
4
3
|
import SplitButton from './ListButton/SplitButton';
|
|
5
4
|
import SplitButtonItem, { SplitButtonItemProps } from './ListButton/SplitButtonItem';
|
|
6
5
|
import DropDownButton from './ListButton/DropDownButton';
|
|
@@ -16,7 +15,7 @@ import ToolbarSeparator from './toolbar/tools/ToolbarSeparator';
|
|
|
16
15
|
import { ToolbarSpacer, ToolbarSpacerProps } from './toolbar/tools/ToolbarSpacer';
|
|
17
16
|
import { Chip, ChipProps, ChipHandle } from './Chip/Chip';
|
|
18
17
|
import { ChipList, ChipListProps, ChipListHandle } from './Chip/ChipList';
|
|
19
|
-
import { ChipRemoveEvent, ChipMouseEvent, ChipKeyboardEvent, ChipFocusEvent, ChipListChangeEvent, ChipListDataChangeEvent
|
|
18
|
+
import { ChipRemoveEvent, ChipMouseEvent, ChipKeyboardEvent, ChipFocusEvent, ChipListChangeEvent, ChipListDataChangeEvent } from './models/index';
|
|
20
19
|
import { FloatingActionButton } from './FloatingActionButton/FloatingActionButton';
|
|
21
20
|
import { FloatingActionButtonHandle } from './FloatingActionButton/interfaces/FloatingActionButtonHandle';
|
|
22
21
|
import { FloatingActionButtonProps } from './FloatingActionButton/interfaces/FloatingActionButtonProps';
|
|
@@ -28,5 +27,6 @@ import { FloatingActionButtonAlignOffset } from './FloatingActionButton/models/a
|
|
|
28
27
|
import { FloatingActionButtonPositionMode } from './FloatingActionButton/models/position-mode';
|
|
29
28
|
import { FloatingActionButtonShape } from './FloatingActionButton/models/shape';
|
|
30
29
|
import { FloatingActionButtonSize } from './FloatingActionButton/models/size';
|
|
30
|
+
import { FloatingActionButtonRounded } from './FloatingActionButton/models/rounded';
|
|
31
31
|
import { FloatingActionButtonThemeColor } from './FloatingActionButton/models/theme-color';
|
|
32
|
-
export { Toolbar, ToolbarProps, ToolbarItem, ToolbarItemProps, ToolbarSeparator, ToolbarResizeEvent, ToolbarSpacer, ToolbarSpacerProps, Button, ButtonProps,
|
|
32
|
+
export { Toolbar, ToolbarProps, ToolbarItem, ToolbarItemProps, ToolbarSeparator, ToolbarResizeEvent, ToolbarSpacer, ToolbarSpacerProps, Button, ButtonProps, ButtonGroup, ButtonGroupProps, SplitButton, SplitButtonItem, SplitButtonItemProps, DropDownButton, DropDownButtonProps, DropDownButtonItem, DropDownButtonItemProps, ButtonItem, ButtonItemProps, SplitButtonFocusEvent, SplitButtonBlurEvent, SplitButtonClickEvent, SplitButtonOpenEvent, SplitButtonCloseEvent, SplitButtonItemClickEvent, DropDownButtonFocusEvent, DropDownButtonBlurEvent, DropDownButtonOpenEvent, DropDownButtonCloseEvent, DropDownButtonItemClickEvent, ButtonsPopupSettings, Chip, ChipProps, ChipHandle, ChipRemoveEvent, ChipMouseEvent, ChipKeyboardEvent, ChipFocusEvent, ChipList, ChipListProps, ChipListHandle, ChipListDataChangeEvent, ChipListChangeEvent, FloatingActionButton, FloatingActionButtonProps, FloatingActionButtonHandle, FloatingActionButtonItem, FloatingActionButtonItemHandle, FloatingActionButtonItemProps, FloatingActionButtonPopupSettings, FloatingActionButtonAlign, FloatingActionButtonAlignOffset, FloatingActionButtonPositionMode, FloatingActionButtonSize, FloatingActionButtonShape, FloatingActionButtonRounded, FloatingActionButtonThemeColor };
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChipHandle } from './../Chip/Chip';
|
|
3
3
|
import { ChipListHandle } from './../Chip/ChipList';
|
|
4
|
-
/**
|
|
5
|
-
* Enables the modification of the Chip appearance.
|
|
6
|
-
*
|
|
7
|
-
* The available styling options are:
|
|
8
|
-
* - `solid`(Default)
|
|
9
|
-
* - `outline`
|
|
10
|
-
* - `filled`(The `filled` option will be deprecated. To apply the identical styling, use `solid` instead).
|
|
11
|
-
* - `outlined`(The `outlined` option will be deprecated. To apply the identical styling, use `outline` instead).
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts-no-run
|
|
15
|
-
* <Chip look="solid" text="Chip component"></Chip>
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export declare type ChipLook = 'solid' | 'outline' | 'filled' | 'outlined';
|
|
20
4
|
/**
|
|
21
5
|
* Represents the return type of the ChipRemoveEvent.
|
|
22
6
|
*/
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-buttons',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1642536693,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
package/dist/es/util.js
CHANGED
|
@@ -7,10 +7,10 @@ var styles = {
|
|
|
7
7
|
'outline': 'k-outline',
|
|
8
8
|
'clear': 'k-button-clear',
|
|
9
9
|
'primary': 'k-primary',
|
|
10
|
-
'state-selected': 'k-
|
|
10
|
+
'state-selected': 'k-selected',
|
|
11
11
|
'button-icon': 'k-button-icon',
|
|
12
12
|
'button-icontext': 'k-button-icontext',
|
|
13
|
-
'state-disabled': 'k-
|
|
13
|
+
'state-disabled': 'k-disabled',
|
|
14
14
|
'group-start': 'k-group-start',
|
|
15
15
|
'group-end': 'k-group-end',
|
|
16
16
|
'button-group': 'k-button-group',
|
|
@@ -18,7 +18,7 @@ var styles = {
|
|
|
18
18
|
'ltr': 'k-ltr',
|
|
19
19
|
'rtl': 'k-rtl'
|
|
20
20
|
};
|
|
21
|
-
var notDisabled = ':not(.k-
|
|
21
|
+
var notDisabled = ':not(.k-disabled):not([disabled]):not([disabled="true"])';
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
package/dist/npm/Button.d.ts
CHANGED
|
@@ -10,6 +10,74 @@ export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes
|
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Configures the `size` of the Button.
|
|
15
|
+
*
|
|
16
|
+
* The available options are:
|
|
17
|
+
* - small
|
|
18
|
+
* - medium
|
|
19
|
+
* - large
|
|
20
|
+
* - null—Does not set a size `className`.
|
|
21
|
+
*
|
|
22
|
+
* @default `medium`
|
|
23
|
+
*/
|
|
24
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
25
|
+
/**
|
|
26
|
+
* Configures the `shape` of the Button.
|
|
27
|
+
*
|
|
28
|
+
* The available options are:
|
|
29
|
+
* - rectangle
|
|
30
|
+
* - square
|
|
31
|
+
* - null—Does not set a shape `className`.
|
|
32
|
+
*
|
|
33
|
+
* @default `rectangle`
|
|
34
|
+
*/
|
|
35
|
+
shape?: null | 'rectangle' | 'square';
|
|
36
|
+
/**
|
|
37
|
+
* Configures the `roundness` of the Button.
|
|
38
|
+
*
|
|
39
|
+
* The available options are:
|
|
40
|
+
* - small
|
|
41
|
+
* - medium
|
|
42
|
+
* - large
|
|
43
|
+
* - full
|
|
44
|
+
* - null—Does not set a rounded `className`.
|
|
45
|
+
*
|
|
46
|
+
* @default `medium`
|
|
47
|
+
*/
|
|
48
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
49
|
+
/**
|
|
50
|
+
* Configures the `fillMode` of the Button.
|
|
51
|
+
*
|
|
52
|
+
* The available options are:
|
|
53
|
+
* - solid
|
|
54
|
+
* - outline
|
|
55
|
+
* - flat
|
|
56
|
+
* - link
|
|
57
|
+
* - null—Does not set a fillMode `className`.
|
|
58
|
+
*
|
|
59
|
+
* @default `solid`
|
|
60
|
+
*/
|
|
61
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link';
|
|
62
|
+
/**
|
|
63
|
+
* Configures the `themeColor` of the Button.
|
|
64
|
+
*
|
|
65
|
+
* The available options are:
|
|
66
|
+
* - base
|
|
67
|
+
* - primary
|
|
68
|
+
* - secondary
|
|
69
|
+
* - tertiary
|
|
70
|
+
* - info
|
|
71
|
+
* - success
|
|
72
|
+
* - warning
|
|
73
|
+
* - dark
|
|
74
|
+
* - light
|
|
75
|
+
* - inverse
|
|
76
|
+
* - null—Does not set a themeColor `className`.
|
|
77
|
+
*
|
|
78
|
+
* @default `base`
|
|
79
|
+
*/
|
|
80
|
+
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'dark' | 'light' | 'inverse';
|
|
13
81
|
}
|
|
14
82
|
/**
|
|
15
83
|
* @hidden
|
|
@@ -23,22 +91,28 @@ export default class Button extends React.Component<ButtonProps, ButtonState> {
|
|
|
23
91
|
*/
|
|
24
92
|
static propTypes: {
|
|
25
93
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
|
-
look: PropTypes.Requireable<string>;
|
|
27
|
-
primary: PropTypes.Requireable<boolean>;
|
|
28
94
|
selected: PropTypes.Requireable<boolean>;
|
|
29
95
|
togglable: PropTypes.Requireable<boolean>;
|
|
30
96
|
icon: PropTypes.Requireable<string>;
|
|
31
97
|
iconClass: PropTypes.Requireable<string>;
|
|
32
98
|
imageUrl: PropTypes.Requireable<string>;
|
|
33
99
|
imageAlt: PropTypes.Requireable<string>;
|
|
100
|
+
size: PropTypes.Requireable<string>;
|
|
101
|
+
shape: PropTypes.Requireable<string>;
|
|
102
|
+
rounded: PropTypes.Requireable<string>;
|
|
103
|
+
fillMode: PropTypes.Requireable<string>;
|
|
104
|
+
themeColor: PropTypes.Requireable<string>;
|
|
34
105
|
};
|
|
35
106
|
/**
|
|
36
107
|
* @hidden
|
|
37
108
|
*/
|
|
38
109
|
static defaultProps: {
|
|
39
|
-
look: string;
|
|
40
|
-
primary: boolean;
|
|
41
110
|
togglable: boolean;
|
|
111
|
+
size: string;
|
|
112
|
+
shape: string;
|
|
113
|
+
rounded: string;
|
|
114
|
+
fillMode: string;
|
|
115
|
+
themeColor: string;
|
|
42
116
|
};
|
|
43
117
|
/**
|
|
44
118
|
* @hidden
|
|
@@ -55,7 +129,7 @@ export default class Button extends React.Component<ButtonProps, ButtonState> {
|
|
|
55
129
|
* Otherwise, returns `false`.
|
|
56
130
|
*/
|
|
57
131
|
readonly selected: boolean;
|
|
58
|
-
constructor(props:
|
|
132
|
+
constructor(props: any);
|
|
59
133
|
/**
|
|
60
134
|
* @hidden
|
|
61
135
|
*/
|
package/dist/npm/Button.js
CHANGED
|
@@ -38,22 +38,20 @@ var PropTypes = require("prop-types");
|
|
|
38
38
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
39
39
|
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
40
40
|
var package_metadata_1 = require("./package-metadata");
|
|
41
|
-
var util_1 = require("./util");
|
|
42
|
-
var styles = util_1.default.styles;
|
|
43
41
|
/**
|
|
44
42
|
* @hidden
|
|
45
43
|
*/
|
|
46
44
|
function iconElement(_a) {
|
|
47
45
|
var imageUrl = _a.imageUrl, icon = _a.icon, iconClass = _a.iconClass, imageAlt = _a.imageAlt;
|
|
48
46
|
if (imageUrl) {
|
|
49
|
-
return (React.createElement("img", { role: "presentation", className: 'k-
|
|
47
|
+
return (React.createElement("img", { role: "presentation", className: 'k-button-icon', alt: imageAlt, src: imageUrl }));
|
|
50
48
|
}
|
|
51
49
|
else if (icon) {
|
|
52
|
-
var iconClasses = kendo_react_common_1.classNames('k-icon', 'k-i-' + icon);
|
|
50
|
+
var iconClasses = kendo_react_common_1.classNames('k-button-icon k-icon', 'k-i-' + icon);
|
|
53
51
|
return (React.createElement("span", { role: "presentation", className: iconClasses }));
|
|
54
52
|
}
|
|
55
53
|
else if (iconClass) {
|
|
56
|
-
return (React.createElement("span", { role: "presentation", className: iconClass }));
|
|
54
|
+
return (React.createElement("span", { role: "presentation", className: kendo_react_common_1.classNames('k-button-icon', iconClass) }));
|
|
57
55
|
}
|
|
58
56
|
return null;
|
|
59
57
|
}
|
|
@@ -108,34 +106,28 @@ var Button = /** @class */ (function (_super) {
|
|
|
108
106
|
Button.prototype.render = function () {
|
|
109
107
|
var _this = this;
|
|
110
108
|
var _a;
|
|
111
|
-
var _b = this.props, children = _b.children,
|
|
109
|
+
var _b = this.props, children = _b.children, togglable = _b.togglable, icon = _b.icon, iconClass = _b.iconClass, imageUrl = _b.imageUrl, imageAlt = _b.imageAlt, className = _b.className, onClick = _b.onClick, _c = _b.size, size = _c === void 0 ? Button.defaultProps.size : _c, _d = _b.shape, shape = _d === void 0 ? Button.defaultProps.shape : _d, _e = _b.rounded, rounded = _e === void 0 ? Button.defaultProps.rounded : _e, _f = _b.fillMode, fillMode = _f === void 0 ? Button.defaultProps.fillMode : _f, _g = _b.themeColor, themeColor = _g === void 0 ? Button.defaultProps.themeColor : _g, htmlAttributes = __rest(_b, ["children", "togglable", "icon", "iconClass", "imageUrl", "imageAlt", "className", "onClick", "size", "shape", "rounded", "fillMode", "themeColor"]);
|
|
112
110
|
var hasIcon = (icon !== undefined || iconClass !== undefined || imageUrl !== undefined);
|
|
113
111
|
var hasChildren = children !== undefined;
|
|
114
|
-
var buttonClasses = kendo_react_common_1.classNames([styles.button], (_a = {},
|
|
115
|
-
_a[styles["" + look]] = look !== 'default',
|
|
116
|
-
_a[styles.primary] = primary,
|
|
117
|
-
_a[styles['state-disabled']] = this.props.disabled,
|
|
118
|
-
_a[styles['state-selected']] = this.state.selected,
|
|
119
|
-
_a[styles['button-icon']] = !hasChildren && hasIcon,
|
|
120
|
-
_a[styles['button-icontext']] = hasChildren && hasIcon,
|
|
121
|
-
_a), [styles["" + this.props.dir]], className);
|
|
122
|
-
var buttonProps = {
|
|
123
|
-
className: buttonClasses,
|
|
124
|
-
onClick: this.handleClick,
|
|
125
|
-
// Accessibility properties
|
|
126
|
-
role: togglable ? 'checkbox' : undefined,
|
|
127
|
-
'aria-disabled': this.props.disabled || undefined,
|
|
128
|
-
'aria-checked': togglable ? this.state.selected : undefined
|
|
129
|
-
};
|
|
130
112
|
var iconEl = iconElement({
|
|
131
113
|
icon: icon,
|
|
132
114
|
iconClass: iconClass,
|
|
133
115
|
imageUrl: imageUrl,
|
|
134
116
|
imageAlt: imageAlt
|
|
135
117
|
});
|
|
136
|
-
return (React.createElement("button", __assign({
|
|
118
|
+
return (React.createElement("button", __assign({ ref: function (button) { return _this._element = button; }, role: togglable ? 'checkbox' : undefined, "aria-disabled": this.props.disabled || undefined, "aria-checked": togglable ? this.state.selected : undefined }, htmlAttributes, { onClick: this.handleClick, className: kendo_react_common_1.classNames('k-button', (_a = {},
|
|
119
|
+
_a["k-button-" + (kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
120
|
+
_a["k-button-" + shape] = shape,
|
|
121
|
+
_a["k-button-" + fillMode] = fillMode,
|
|
122
|
+
_a["k-button-" + fillMode + "-" + themeColor] = Boolean(fillMode && themeColor),
|
|
123
|
+
_a["k-rounded-" + (kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
124
|
+
_a['k-icon-button'] = !hasChildren && hasIcon,
|
|
125
|
+
_a['k-disabled'] = this.props.disabled,
|
|
126
|
+
_a['k-selected'] = this.state.selected,
|
|
127
|
+
_a['k-rtl'] = this.props.dir === 'rtl',
|
|
128
|
+
_a), this.props.className) }),
|
|
137
129
|
iconEl,
|
|
138
|
-
children));
|
|
130
|
+
children && (React.createElement("span", { className: "k-button-text" }, children))));
|
|
139
131
|
};
|
|
140
132
|
Button.prototype.toggleIfApplicable = function () {
|
|
141
133
|
var _this = this;
|
|
@@ -150,22 +142,29 @@ var Button = /** @class */ (function (_super) {
|
|
|
150
142
|
*/
|
|
151
143
|
Button.propTypes = {
|
|
152
144
|
children: PropTypes.node,
|
|
153
|
-
look: PropTypes.oneOf(['default', 'flat', 'outline', 'clear']),
|
|
154
|
-
primary: PropTypes.bool,
|
|
155
145
|
selected: PropTypes.bool,
|
|
156
146
|
togglable: PropTypes.bool,
|
|
157
147
|
icon: PropTypes.string,
|
|
158
148
|
iconClass: PropTypes.string,
|
|
159
149
|
imageUrl: PropTypes.string,
|
|
160
|
-
imageAlt: PropTypes.string
|
|
150
|
+
imageAlt: PropTypes.string,
|
|
151
|
+
size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
|
|
152
|
+
shape: PropTypes.oneOf([null, 'rectangle', 'square']),
|
|
153
|
+
rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
|
|
154
|
+
fillMode: PropTypes.oneOf([null, 'flat', 'link', 'outline', 'solid']),
|
|
155
|
+
// eslint-disable-next-line max-len
|
|
156
|
+
themeColor: PropTypes.oneOf([null, 'base', 'dark', 'error', 'info', 'inverse', 'inverse', 'light', 'primary', 'secondary', 'success', 'tertiary', 'warning'])
|
|
161
157
|
};
|
|
162
158
|
/**
|
|
163
159
|
* @hidden
|
|
164
160
|
*/
|
|
165
161
|
Button.defaultProps = {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
togglable: false,
|
|
163
|
+
size: 'medium',
|
|
164
|
+
shape: 'rectangle',
|
|
165
|
+
rounded: 'medium',
|
|
166
|
+
fillMode: 'solid',
|
|
167
|
+
themeColor: 'base'
|
|
169
168
|
};
|
|
170
169
|
return Button;
|
|
171
170
|
}(React.Component));
|
package/dist/npm/ButtonGroup.js
CHANGED
|
@@ -47,7 +47,7 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
47
47
|
var _a;
|
|
48
48
|
var buttons = this.mapButtons(this.props.children);
|
|
49
49
|
var groupClasses = kendo_react_common_1.classNames([styles['button-group']], (_a = {},
|
|
50
|
-
_a[
|
|
50
|
+
_a['k-state-disabled'] = this.props.disabled,
|
|
51
51
|
_a[styles['button-group-stretched']] = !!this.props.width,
|
|
52
52
|
_a), this.props.className);
|
|
53
53
|
var groupProps = {
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import { ButtonLook } from './buttonLook';
|
|
2
1
|
/**
|
|
3
2
|
* Inherits the native HTML Button. Represents the properties which can be set to a Button.
|
|
4
3
|
*/
|
|
5
4
|
export interface ButtonInterface {
|
|
6
|
-
/**
|
|
7
|
-
* Changes the visual appearance by using alternative styling options ([more information and examples]({% slug appearance_button %})).
|
|
8
|
-
*
|
|
9
|
-
* The available values are:
|
|
10
|
-
* * [`ButtonLook`]({% slug api_buttons_buttonlook %}) = `flat` | `outline`
|
|
11
|
-
* * `clear`
|
|
12
|
-
*/
|
|
13
|
-
look?: ButtonLook | 'clear';
|
|
14
|
-
/**
|
|
15
|
-
* Adds visual weight to the Button and makes it primary ([see example]({% slug primary_button %})).
|
|
16
|
-
*/
|
|
17
|
-
primary?: boolean;
|
|
18
5
|
/**
|
|
19
6
|
* Specifies if the Button is disabled ([see example]({% slug disabled_button %})). Defaults to `false`.
|
|
20
7
|
*/
|
package/dist/npm/Chip/Chip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent
|
|
2
|
+
import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from './../models/index';
|
|
3
3
|
/**
|
|
4
4
|
* Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
|
|
5
5
|
*/
|
|
@@ -32,10 +32,6 @@ export interface ChipProps {
|
|
|
32
32
|
* Sets the `id` value of the Chip.
|
|
33
33
|
*/
|
|
34
34
|
value?: any;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the `type` of the Chip element - 'warning', 'error', 'success', 'info', by default - 'none'.
|
|
37
|
-
*/
|
|
38
|
-
type?: string;
|
|
39
35
|
/**
|
|
40
36
|
* The Chip direction 'ltr' as default or 'rtl'.
|
|
41
37
|
*/
|
|
@@ -60,10 +56,6 @@ export interface ChipProps {
|
|
|
60
56
|
* Determines if the Chip has custom selection `icon`.
|
|
61
57
|
*/
|
|
62
58
|
selectedIcon?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Determines if the Chip has `solid` or `outline` appearance. Defaults to `solid`.
|
|
65
|
-
*/
|
|
66
|
-
look?: ChipLook;
|
|
67
59
|
/**
|
|
68
60
|
* Triggered on Chip removing.
|
|
69
61
|
*/
|
|
@@ -133,6 +125,56 @@ export interface ChipProps {
|
|
|
133
125
|
* @hidden
|
|
134
126
|
*/
|
|
135
127
|
role?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Configures the `size` of the Chip.
|
|
130
|
+
*
|
|
131
|
+
* The available options are:
|
|
132
|
+
* - small
|
|
133
|
+
* - medium
|
|
134
|
+
* - large
|
|
135
|
+
* - null—Does not set a size `className`.
|
|
136
|
+
*
|
|
137
|
+
* @default `medium`
|
|
138
|
+
*/
|
|
139
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
140
|
+
/**
|
|
141
|
+
* Configures the `roundness` of the Chip.
|
|
142
|
+
*
|
|
143
|
+
* The available options are:
|
|
144
|
+
* - small
|
|
145
|
+
* - medium
|
|
146
|
+
* - large
|
|
147
|
+
* - full
|
|
148
|
+
* - null—Does not set a rounded `className`.
|
|
149
|
+
*
|
|
150
|
+
* @default `medium`
|
|
151
|
+
*/
|
|
152
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
153
|
+
/**
|
|
154
|
+
* Configures the `fillMode` of the Chip.
|
|
155
|
+
*
|
|
156
|
+
* The available options are:
|
|
157
|
+
* - solid
|
|
158
|
+
* - outline
|
|
159
|
+
* - null—Does not set a fillMode `className`.
|
|
160
|
+
*
|
|
161
|
+
* @default `solid`
|
|
162
|
+
*/
|
|
163
|
+
fillMode?: null | 'solid' | 'outline';
|
|
164
|
+
/**
|
|
165
|
+
* Configures the `themeColor` of the Chip.
|
|
166
|
+
*
|
|
167
|
+
* The available options are:
|
|
168
|
+
* - base
|
|
169
|
+
* - info
|
|
170
|
+
* - success
|
|
171
|
+
* - warning
|
|
172
|
+
* - error
|
|
173
|
+
* - null—Does not set a themeColor `className`.
|
|
174
|
+
*
|
|
175
|
+
* @default `base`
|
|
176
|
+
*/
|
|
177
|
+
themeColor?: null | 'base' | 'info' | 'success' | 'warning' | 'error';
|
|
136
178
|
}
|
|
137
179
|
/**
|
|
138
180
|
* Represents the target(element and props) of the ChipRemoveEvent.
|