@progress/kendo-react-buttons 9.0.0-develop.2 → 9.0.0-develop.21
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.js +1 -1
- package/Button.mjs +91 -108
- package/ButtonGroup.js +1 -1
- package/ButtonGroup.mjs +47 -67
- package/Chip/Chip.mjs +22 -56
- package/Chip/ChipList.mjs +2 -20
- package/Chip/chip-list-contexts.mjs +13 -4
- package/FloatingActionButton/FloatingActionButton.js +1 -1
- package/FloatingActionButton/FloatingActionButton.mjs +243 -272
- package/FloatingActionButton/FloatingActionButtonItem.mjs +3 -6
- package/ListButton/ButtonItem.js +1 -1
- package/ListButton/ButtonItem.mjs +30 -27
- package/ListButton/utils/popup.js +1 -1
- package/ListButton/utils/popup.mjs +8 -8
- package/README.md +60 -58
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.mts +56 -168
- package/index.d.ts +56 -168
- package/index.mjs +6 -2
- package/package-metadata.mjs +1 -1
- package/package.json +3 -3
- package/toolbar/Toolbar.js +1 -1
- package/toolbar/Toolbar.mjs +100 -110
- package/toolbar/tools/ToolbarItem.js +1 -1
- package/toolbar/tools/ToolbarItem.mjs +15 -32
- package/toolbar/tools/ToolbarSeparator.js +1 -1
- package/toolbar/tools/ToolbarSeparator.mjs +1 -8
- package/toolbar/tools/ToolbarSpacer.mjs +8 -18
package/index.d.mts
CHANGED
|
@@ -20,88 +20,18 @@ import * as React_2 from 'react';
|
|
|
20
20
|
import { RefAttributes } from 'react';
|
|
21
21
|
import { SVGIcon } from '@progress/kendo-react-common';
|
|
22
22
|
|
|
23
|
-
export declare
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
static propTypes: {
|
|
28
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
-
selected: PropTypes.Requireable<boolean>;
|
|
30
|
-
togglable: PropTypes.Requireable<boolean>;
|
|
31
|
-
icon: PropTypes.Requireable<string>;
|
|
32
|
-
svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
|
-
name: PropTypes.Validator<string>;
|
|
34
|
-
content: PropTypes.Validator<string>;
|
|
35
|
-
viewBox: PropTypes.Validator<string>;
|
|
36
|
-
}>>;
|
|
37
|
-
iconClass: PropTypes.Requireable<string>;
|
|
38
|
-
imageUrl: PropTypes.Requireable<string>;
|
|
39
|
-
imageAlt: PropTypes.Requireable<string>;
|
|
40
|
-
size: PropTypes.Requireable<string | null>;
|
|
41
|
-
rounded: PropTypes.Requireable<string | null>;
|
|
42
|
-
fillMode: PropTypes.Requireable<string | null>;
|
|
43
|
-
themeColor: PropTypes.Requireable<string | null>;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
static defaultProps: {
|
|
49
|
-
togglable: boolean;
|
|
50
|
-
size: string;
|
|
51
|
-
rounded: string;
|
|
52
|
-
fillMode: string;
|
|
53
|
-
themeColor: string;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* @hidden
|
|
57
|
-
*/
|
|
58
|
-
readonly state: ButtonState;
|
|
59
|
-
private _selectedTemp?;
|
|
60
|
-
private _element;
|
|
61
|
-
/**
|
|
62
|
-
* Gets the DOM element of the Button component.
|
|
63
|
-
*/
|
|
64
|
-
get element(): HTMLButtonElement | null;
|
|
65
|
-
/**
|
|
66
|
-
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
67
|
-
* Otherwise, returns `false`.
|
|
68
|
-
*/
|
|
69
|
-
get selected(): boolean;
|
|
70
|
-
constructor(props: ButtonProps);
|
|
71
|
-
/**
|
|
72
|
-
* @hidden
|
|
73
|
-
*/
|
|
74
|
-
static getDerivedStateFromProps(props: ButtonProps, state: ButtonState): {
|
|
75
|
-
selected: boolean;
|
|
76
|
-
} | null;
|
|
77
|
-
/**
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
render(): JSX_2.Element;
|
|
81
|
-
private toggleIfApplicable;
|
|
82
|
-
private handleClick;
|
|
83
|
-
}
|
|
23
|
+
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<ButtonHandle | null>>;
|
|
84
24
|
|
|
85
|
-
export declare
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*/
|
|
89
|
-
static propTypes: {
|
|
25
|
+
export declare const ButtonGroup: {
|
|
26
|
+
(props: ButtonGroupProps): JSX_2.Element;
|
|
27
|
+
propTypes: {
|
|
90
28
|
children: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[] | null | undefined>>;
|
|
91
29
|
className: PropTypes.Requireable<string>;
|
|
92
30
|
disabled: PropTypes.Requireable<boolean>;
|
|
93
31
|
width: PropTypes.Requireable<string>;
|
|
94
32
|
dir: PropTypes.Requireable<string>;
|
|
95
33
|
};
|
|
96
|
-
|
|
97
|
-
constructor(props: ButtonGroupProps);
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
render(): JSX_2.Element;
|
|
102
|
-
private mapButtons;
|
|
103
|
-
private renderButton;
|
|
104
|
-
}
|
|
34
|
+
};
|
|
105
35
|
|
|
106
36
|
/**
|
|
107
37
|
* Represents the properties which can be set to a ButtonGroup.
|
|
@@ -150,6 +80,21 @@ export declare interface ButtonGroupProps extends ButtonGroupInterface {
|
|
|
150
80
|
unstyled?: ButtonsClassStructure;
|
|
151
81
|
}
|
|
152
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @hidden
|
|
85
|
+
*/
|
|
86
|
+
export declare interface ButtonHandle {
|
|
87
|
+
/**
|
|
88
|
+
* Gets the DOM element of the Button component.
|
|
89
|
+
*/
|
|
90
|
+
element: HTMLButtonElement | null;
|
|
91
|
+
/**
|
|
92
|
+
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
93
|
+
* Otherwise, returns `false`.
|
|
94
|
+
*/
|
|
95
|
+
selected: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
153
98
|
/**
|
|
154
99
|
* Inherits the native HTML Button. Represents the properties which can be set to a Button.
|
|
155
100
|
*/
|
|
@@ -240,6 +185,7 @@ export declare interface ButtonItemProps {
|
|
|
240
185
|
id?: string;
|
|
241
186
|
textField?: string;
|
|
242
187
|
className?: string;
|
|
188
|
+
unstyled?: ButtonsClassStructure;
|
|
243
189
|
}
|
|
244
190
|
|
|
245
191
|
/**
|
|
@@ -315,15 +261,21 @@ export declare interface ButtonProps extends ButtonInterface, React_2.ButtonHTML
|
|
|
315
261
|
*/
|
|
316
262
|
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
317
263
|
/**
|
|
318
|
-
* Sets an SVG icon or custom element before the content of the Button. For the custom component, we recommend
|
|
264
|
+
* Sets an SVG icon or custom element before the content of the Button. For the custom component, we recommend
|
|
265
|
+
* using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
|
|
319
266
|
* but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
|
|
320
267
|
*/
|
|
321
268
|
startIcon?: React_2.ReactNode;
|
|
322
269
|
/**
|
|
323
|
-
* Sets an SVG icon or custom element after the content of the Button. For the custom component, we recommend
|
|
270
|
+
* Sets an SVG icon or custom element after the content of the Button. For the custom component, we recommend
|
|
271
|
+
* using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
|
|
324
272
|
* but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
|
|
325
273
|
*/
|
|
326
274
|
endIcon?: React_2.ReactNode;
|
|
275
|
+
/**
|
|
276
|
+
* The unstyled option classes.
|
|
277
|
+
*/
|
|
278
|
+
unstyled?: ButtonsClassStructure;
|
|
327
279
|
}
|
|
328
280
|
|
|
329
281
|
/**
|
|
@@ -354,13 +306,6 @@ export declare interface ButtonsPopupSettings {
|
|
|
354
306
|
onClose?: (event: PopupCloseEvent) => void;
|
|
355
307
|
}
|
|
356
308
|
|
|
357
|
-
/**
|
|
358
|
-
* @hidden
|
|
359
|
-
*/
|
|
360
|
-
declare interface ButtonState {
|
|
361
|
-
selected: boolean;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
309
|
/**
|
|
365
310
|
* Represents the Chip component.
|
|
366
311
|
*/
|
|
@@ -813,8 +758,7 @@ export declare interface DropDownButtonBlurEvent extends BaseEvent<DropDownButto
|
|
|
813
758
|
*
|
|
814
759
|
* @example
|
|
815
760
|
* ```jsx
|
|
816
|
-
*
|
|
817
|
-
* render() {
|
|
761
|
+
* const App = () => {
|
|
818
762
|
* return (
|
|
819
763
|
* <DropDownButton text="Act">
|
|
820
764
|
* <DropDownButtonItem text="Item1" />
|
|
@@ -822,7 +766,6 @@ export declare interface DropDownButtonBlurEvent extends BaseEvent<DropDownButto
|
|
|
822
766
|
* <DropDownButtonItem text="Item3" />
|
|
823
767
|
* </DropDownButton>
|
|
824
768
|
* );
|
|
825
|
-
* }
|
|
826
769
|
* }
|
|
827
770
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
828
771
|
* ```
|
|
@@ -1657,8 +1600,7 @@ export declare interface SplitButtonBlurEvent extends BaseEvent<SplitButtonClass
|
|
|
1657
1600
|
*
|
|
1658
1601
|
* @example
|
|
1659
1602
|
* ```jsx
|
|
1660
|
-
*
|
|
1661
|
-
* render() {
|
|
1603
|
+
* const App = () => {
|
|
1662
1604
|
* return (
|
|
1663
1605
|
* <SplitButton text="Act">
|
|
1664
1606
|
* <SplitButtonItem text="Item1" />
|
|
@@ -1666,7 +1608,6 @@ export declare interface SplitButtonBlurEvent extends BaseEvent<SplitButtonClass
|
|
|
1666
1608
|
* <SplitButtonItem text="Item3" />
|
|
1667
1609
|
* </SplitButton>
|
|
1668
1610
|
* );
|
|
1669
|
-
* }
|
|
1670
1611
|
* }
|
|
1671
1612
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
1672
1613
|
* ```
|
|
@@ -2000,8 +1941,7 @@ declare interface SplitButtonState {
|
|
|
2000
1941
|
*
|
|
2001
1942
|
* @example
|
|
2002
1943
|
* ```jsx
|
|
2003
|
-
*
|
|
2004
|
-
* render() {
|
|
1944
|
+
* const App = () => {
|
|
2005
1945
|
* return (
|
|
2006
1946
|
* <Toolbar>
|
|
2007
1947
|
* <ToolbarItem>
|
|
@@ -2020,66 +1960,11 @@ declare interface SplitButtonState {
|
|
|
2020
1960
|
* </ToolbarItem>
|
|
2021
1961
|
* </Toolbar>
|
|
2022
1962
|
* );
|
|
2023
|
-
* }
|
|
2024
1963
|
* }
|
|
2025
1964
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
2026
1965
|
* ```
|
|
2027
1966
|
*/
|
|
2028
|
-
export declare
|
|
2029
|
-
/**
|
|
2030
|
-
* @hidden
|
|
2031
|
-
*/
|
|
2032
|
-
static propTypes: {
|
|
2033
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
2034
|
-
dir: PropTypes.Requireable<string>;
|
|
2035
|
-
keyboardNavigation: PropTypes.Requireable<boolean>;
|
|
2036
|
-
style: PropTypes.Requireable<object>;
|
|
2037
|
-
className: PropTypes.Requireable<string>;
|
|
2038
|
-
role: PropTypes.Requireable<string>;
|
|
2039
|
-
onResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
2040
|
-
buttons: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
2041
|
-
size: PropTypes.Requireable<string | null>;
|
|
2042
|
-
};
|
|
2043
|
-
/**
|
|
2044
|
-
* @hidden
|
|
2045
|
-
*/
|
|
2046
|
-
static defaultProps: {
|
|
2047
|
-
tabIndex: number;
|
|
2048
|
-
size: string;
|
|
2049
|
-
};
|
|
2050
|
-
private _element;
|
|
2051
|
-
private offsetHeight;
|
|
2052
|
-
private offsetWidth;
|
|
2053
|
-
private buttons;
|
|
2054
|
-
private focusedSelector;
|
|
2055
|
-
constructor(props: ToolbarProps);
|
|
2056
|
-
private get selectors();
|
|
2057
|
-
private get focusedIndex();
|
|
2058
|
-
/**
|
|
2059
|
-
* Returns the HTML element of the Toolbar component.
|
|
2060
|
-
*/
|
|
2061
|
-
get element(): HTMLDivElement | null;
|
|
2062
|
-
/**
|
|
2063
|
-
* @hidden
|
|
2064
|
-
*/
|
|
2065
|
-
componentDidMount(): void;
|
|
2066
|
-
/**
|
|
2067
|
-
* @hidden
|
|
2068
|
-
*/
|
|
2069
|
-
componentDidUpdate(): void;
|
|
2070
|
-
/**
|
|
2071
|
-
* @hidden
|
|
2072
|
-
*/
|
|
2073
|
-
componentWillUnmount(): void;
|
|
2074
|
-
/**
|
|
2075
|
-
* @hidden
|
|
2076
|
-
*/
|
|
2077
|
-
render(): JSX_2.Element;
|
|
2078
|
-
private setTabIndex;
|
|
2079
|
-
private onKeyDown;
|
|
2080
|
-
private focusButton;
|
|
2081
|
-
private onWindowResize;
|
|
2082
|
-
}
|
|
1967
|
+
export declare const Toolbar: React_2.ForwardRefExoticComponent<ToolbarProps & React_2.RefAttributes<ToolbarHandle>>;
|
|
2083
1968
|
|
|
2084
1969
|
/**
|
|
2085
1970
|
* @hidden
|
|
@@ -2087,26 +1972,34 @@ export declare class Toolbar extends React_2.Component<ToolbarProps> {
|
|
|
2087
1972
|
export declare const toolbarButtons: string[];
|
|
2088
1973
|
|
|
2089
1974
|
/**
|
|
2090
|
-
* Represents the
|
|
2091
|
-
* To add a tool to the Toolbar, wrap it inside a ToolbarItem component
|
|
2092
|
-
* ([see example]({% slug content_toolbar %})).
|
|
1975
|
+
* Represents the Toolbar handle.
|
|
2093
1976
|
*/
|
|
2094
|
-
export declare
|
|
1977
|
+
export declare interface ToolbarHandle {
|
|
2095
1978
|
/**
|
|
2096
|
-
*
|
|
1979
|
+
* Represents the element of the Toolbar component.
|
|
2097
1980
|
*/
|
|
2098
|
-
|
|
2099
|
-
className: PropTypes.Requireable<string>;
|
|
2100
|
-
};
|
|
2101
|
-
private _element;
|
|
1981
|
+
element: HTMLDivElement | null;
|
|
2102
1982
|
/**
|
|
2103
|
-
*
|
|
1983
|
+
* Represents the props of the Toolbar component.
|
|
2104
1984
|
*/
|
|
2105
|
-
|
|
1985
|
+
props: Readonly<ToolbarProps>;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Represents the KendoReact ToolbarItem component.
|
|
1990
|
+
* To add a tool to the Toolbar, wrap it inside a ToolbarItem component
|
|
1991
|
+
* ([see example]({% slug content_toolbar %})).
|
|
1992
|
+
*/
|
|
1993
|
+
export declare const ToolbarItem: React_2.ForwardRefExoticComponent<ToolbarItemProps & React_2.RefAttributes<ToolbarItemHandle>>;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Represents the ToolbarItem handle.
|
|
1997
|
+
*/
|
|
1998
|
+
export declare interface ToolbarItemHandle {
|
|
2106
1999
|
/**
|
|
2107
|
-
*
|
|
2000
|
+
* Returns the HTML element of the ToolbarItem component.
|
|
2108
2001
|
*/
|
|
2109
|
-
|
|
2002
|
+
element: HTMLDivElement | null;
|
|
2110
2003
|
}
|
|
2111
2004
|
|
|
2112
2005
|
/**
|
|
@@ -2193,7 +2086,7 @@ export declare interface ToolbarResizeEvent {
|
|
|
2193
2086
|
/**
|
|
2194
2087
|
* An event target.
|
|
2195
2088
|
*/
|
|
2196
|
-
target:
|
|
2089
|
+
target: ToolbarHandle;
|
|
2197
2090
|
/**
|
|
2198
2091
|
* The `offsetWidth` event of the Toolbar.
|
|
2199
2092
|
*/
|
|
@@ -2208,12 +2101,7 @@ export declare interface ToolbarResizeEvent {
|
|
|
2208
2101
|
nativeEvent: any;
|
|
2209
2102
|
}
|
|
2210
2103
|
|
|
2211
|
-
export declare
|
|
2212
|
-
/**
|
|
2213
|
-
* @hidden
|
|
2214
|
-
*/
|
|
2215
|
-
render(): JSX_2.Element;
|
|
2216
|
-
}
|
|
2104
|
+
export declare const ToolbarSeparator: (props: ToolbarSeparatorProps) => JSX_2.Element;
|
|
2217
2105
|
|
|
2218
2106
|
/**
|
|
2219
2107
|
* Represents the KendoReact Toolbar Separator component.
|
package/index.d.ts
CHANGED
|
@@ -20,88 +20,18 @@ import * as React_2 from 'react';
|
|
|
20
20
|
import { RefAttributes } from 'react';
|
|
21
21
|
import { SVGIcon } from '@progress/kendo-react-common';
|
|
22
22
|
|
|
23
|
-
export declare
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
static propTypes: {
|
|
28
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
-
selected: PropTypes.Requireable<boolean>;
|
|
30
|
-
togglable: PropTypes.Requireable<boolean>;
|
|
31
|
-
icon: PropTypes.Requireable<string>;
|
|
32
|
-
svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
|
-
name: PropTypes.Validator<string>;
|
|
34
|
-
content: PropTypes.Validator<string>;
|
|
35
|
-
viewBox: PropTypes.Validator<string>;
|
|
36
|
-
}>>;
|
|
37
|
-
iconClass: PropTypes.Requireable<string>;
|
|
38
|
-
imageUrl: PropTypes.Requireable<string>;
|
|
39
|
-
imageAlt: PropTypes.Requireable<string>;
|
|
40
|
-
size: PropTypes.Requireable<string | null>;
|
|
41
|
-
rounded: PropTypes.Requireable<string | null>;
|
|
42
|
-
fillMode: PropTypes.Requireable<string | null>;
|
|
43
|
-
themeColor: PropTypes.Requireable<string | null>;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
static defaultProps: {
|
|
49
|
-
togglable: boolean;
|
|
50
|
-
size: string;
|
|
51
|
-
rounded: string;
|
|
52
|
-
fillMode: string;
|
|
53
|
-
themeColor: string;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* @hidden
|
|
57
|
-
*/
|
|
58
|
-
readonly state: ButtonState;
|
|
59
|
-
private _selectedTemp?;
|
|
60
|
-
private _element;
|
|
61
|
-
/**
|
|
62
|
-
* Gets the DOM element of the Button component.
|
|
63
|
-
*/
|
|
64
|
-
get element(): HTMLButtonElement | null;
|
|
65
|
-
/**
|
|
66
|
-
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
67
|
-
* Otherwise, returns `false`.
|
|
68
|
-
*/
|
|
69
|
-
get selected(): boolean;
|
|
70
|
-
constructor(props: ButtonProps);
|
|
71
|
-
/**
|
|
72
|
-
* @hidden
|
|
73
|
-
*/
|
|
74
|
-
static getDerivedStateFromProps(props: ButtonProps, state: ButtonState): {
|
|
75
|
-
selected: boolean;
|
|
76
|
-
} | null;
|
|
77
|
-
/**
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
render(): JSX_2.Element;
|
|
81
|
-
private toggleIfApplicable;
|
|
82
|
-
private handleClick;
|
|
83
|
-
}
|
|
23
|
+
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<ButtonHandle | null>>;
|
|
84
24
|
|
|
85
|
-
export declare
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*/
|
|
89
|
-
static propTypes: {
|
|
25
|
+
export declare const ButtonGroup: {
|
|
26
|
+
(props: ButtonGroupProps): JSX_2.Element;
|
|
27
|
+
propTypes: {
|
|
90
28
|
children: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[] | null | undefined>>;
|
|
91
29
|
className: PropTypes.Requireable<string>;
|
|
92
30
|
disabled: PropTypes.Requireable<boolean>;
|
|
93
31
|
width: PropTypes.Requireable<string>;
|
|
94
32
|
dir: PropTypes.Requireable<string>;
|
|
95
33
|
};
|
|
96
|
-
|
|
97
|
-
constructor(props: ButtonGroupProps);
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
render(): JSX_2.Element;
|
|
102
|
-
private mapButtons;
|
|
103
|
-
private renderButton;
|
|
104
|
-
}
|
|
34
|
+
};
|
|
105
35
|
|
|
106
36
|
/**
|
|
107
37
|
* Represents the properties which can be set to a ButtonGroup.
|
|
@@ -150,6 +80,21 @@ export declare interface ButtonGroupProps extends ButtonGroupInterface {
|
|
|
150
80
|
unstyled?: ButtonsClassStructure;
|
|
151
81
|
}
|
|
152
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @hidden
|
|
85
|
+
*/
|
|
86
|
+
export declare interface ButtonHandle {
|
|
87
|
+
/**
|
|
88
|
+
* Gets the DOM element of the Button component.
|
|
89
|
+
*/
|
|
90
|
+
element: HTMLButtonElement | null;
|
|
91
|
+
/**
|
|
92
|
+
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
93
|
+
* Otherwise, returns `false`.
|
|
94
|
+
*/
|
|
95
|
+
selected: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
153
98
|
/**
|
|
154
99
|
* Inherits the native HTML Button. Represents the properties which can be set to a Button.
|
|
155
100
|
*/
|
|
@@ -240,6 +185,7 @@ export declare interface ButtonItemProps {
|
|
|
240
185
|
id?: string;
|
|
241
186
|
textField?: string;
|
|
242
187
|
className?: string;
|
|
188
|
+
unstyled?: ButtonsClassStructure;
|
|
243
189
|
}
|
|
244
190
|
|
|
245
191
|
/**
|
|
@@ -315,15 +261,21 @@ export declare interface ButtonProps extends ButtonInterface, React_2.ButtonHTML
|
|
|
315
261
|
*/
|
|
316
262
|
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
317
263
|
/**
|
|
318
|
-
* Sets an SVG icon or custom element before the content of the Button. For the custom component, we recommend
|
|
264
|
+
* Sets an SVG icon or custom element before the content of the Button. For the custom component, we recommend
|
|
265
|
+
* using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
|
|
319
266
|
* but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
|
|
320
267
|
*/
|
|
321
268
|
startIcon?: React_2.ReactNode;
|
|
322
269
|
/**
|
|
323
|
-
* Sets an SVG icon or custom element after the content of the Button. For the custom component, we recommend
|
|
270
|
+
* Sets an SVG icon or custom element after the content of the Button. For the custom component, we recommend
|
|
271
|
+
* using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
|
|
324
272
|
* but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
|
|
325
273
|
*/
|
|
326
274
|
endIcon?: React_2.ReactNode;
|
|
275
|
+
/**
|
|
276
|
+
* The unstyled option classes.
|
|
277
|
+
*/
|
|
278
|
+
unstyled?: ButtonsClassStructure;
|
|
327
279
|
}
|
|
328
280
|
|
|
329
281
|
/**
|
|
@@ -354,13 +306,6 @@ export declare interface ButtonsPopupSettings {
|
|
|
354
306
|
onClose?: (event: PopupCloseEvent) => void;
|
|
355
307
|
}
|
|
356
308
|
|
|
357
|
-
/**
|
|
358
|
-
* @hidden
|
|
359
|
-
*/
|
|
360
|
-
declare interface ButtonState {
|
|
361
|
-
selected: boolean;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
309
|
/**
|
|
365
310
|
* Represents the Chip component.
|
|
366
311
|
*/
|
|
@@ -813,8 +758,7 @@ export declare interface DropDownButtonBlurEvent extends BaseEvent<DropDownButto
|
|
|
813
758
|
*
|
|
814
759
|
* @example
|
|
815
760
|
* ```jsx
|
|
816
|
-
*
|
|
817
|
-
* render() {
|
|
761
|
+
* const App = () => {
|
|
818
762
|
* return (
|
|
819
763
|
* <DropDownButton text="Act">
|
|
820
764
|
* <DropDownButtonItem text="Item1" />
|
|
@@ -822,7 +766,6 @@ export declare interface DropDownButtonBlurEvent extends BaseEvent<DropDownButto
|
|
|
822
766
|
* <DropDownButtonItem text="Item3" />
|
|
823
767
|
* </DropDownButton>
|
|
824
768
|
* );
|
|
825
|
-
* }
|
|
826
769
|
* }
|
|
827
770
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
828
771
|
* ```
|
|
@@ -1657,8 +1600,7 @@ export declare interface SplitButtonBlurEvent extends BaseEvent<SplitButtonClass
|
|
|
1657
1600
|
*
|
|
1658
1601
|
* @example
|
|
1659
1602
|
* ```jsx
|
|
1660
|
-
*
|
|
1661
|
-
* render() {
|
|
1603
|
+
* const App = () => {
|
|
1662
1604
|
* return (
|
|
1663
1605
|
* <SplitButton text="Act">
|
|
1664
1606
|
* <SplitButtonItem text="Item1" />
|
|
@@ -1666,7 +1608,6 @@ export declare interface SplitButtonBlurEvent extends BaseEvent<SplitButtonClass
|
|
|
1666
1608
|
* <SplitButtonItem text="Item3" />
|
|
1667
1609
|
* </SplitButton>
|
|
1668
1610
|
* );
|
|
1669
|
-
* }
|
|
1670
1611
|
* }
|
|
1671
1612
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
1672
1613
|
* ```
|
|
@@ -2000,8 +1941,7 @@ declare interface SplitButtonState {
|
|
|
2000
1941
|
*
|
|
2001
1942
|
* @example
|
|
2002
1943
|
* ```jsx
|
|
2003
|
-
*
|
|
2004
|
-
* render() {
|
|
1944
|
+
* const App = () => {
|
|
2005
1945
|
* return (
|
|
2006
1946
|
* <Toolbar>
|
|
2007
1947
|
* <ToolbarItem>
|
|
@@ -2020,66 +1960,11 @@ declare interface SplitButtonState {
|
|
|
2020
1960
|
* </ToolbarItem>
|
|
2021
1961
|
* </Toolbar>
|
|
2022
1962
|
* );
|
|
2023
|
-
* }
|
|
2024
1963
|
* }
|
|
2025
1964
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
2026
1965
|
* ```
|
|
2027
1966
|
*/
|
|
2028
|
-
export declare
|
|
2029
|
-
/**
|
|
2030
|
-
* @hidden
|
|
2031
|
-
*/
|
|
2032
|
-
static propTypes: {
|
|
2033
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
2034
|
-
dir: PropTypes.Requireable<string>;
|
|
2035
|
-
keyboardNavigation: PropTypes.Requireable<boolean>;
|
|
2036
|
-
style: PropTypes.Requireable<object>;
|
|
2037
|
-
className: PropTypes.Requireable<string>;
|
|
2038
|
-
role: PropTypes.Requireable<string>;
|
|
2039
|
-
onResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
2040
|
-
buttons: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
2041
|
-
size: PropTypes.Requireable<string | null>;
|
|
2042
|
-
};
|
|
2043
|
-
/**
|
|
2044
|
-
* @hidden
|
|
2045
|
-
*/
|
|
2046
|
-
static defaultProps: {
|
|
2047
|
-
tabIndex: number;
|
|
2048
|
-
size: string;
|
|
2049
|
-
};
|
|
2050
|
-
private _element;
|
|
2051
|
-
private offsetHeight;
|
|
2052
|
-
private offsetWidth;
|
|
2053
|
-
private buttons;
|
|
2054
|
-
private focusedSelector;
|
|
2055
|
-
constructor(props: ToolbarProps);
|
|
2056
|
-
private get selectors();
|
|
2057
|
-
private get focusedIndex();
|
|
2058
|
-
/**
|
|
2059
|
-
* Returns the HTML element of the Toolbar component.
|
|
2060
|
-
*/
|
|
2061
|
-
get element(): HTMLDivElement | null;
|
|
2062
|
-
/**
|
|
2063
|
-
* @hidden
|
|
2064
|
-
*/
|
|
2065
|
-
componentDidMount(): void;
|
|
2066
|
-
/**
|
|
2067
|
-
* @hidden
|
|
2068
|
-
*/
|
|
2069
|
-
componentDidUpdate(): void;
|
|
2070
|
-
/**
|
|
2071
|
-
* @hidden
|
|
2072
|
-
*/
|
|
2073
|
-
componentWillUnmount(): void;
|
|
2074
|
-
/**
|
|
2075
|
-
* @hidden
|
|
2076
|
-
*/
|
|
2077
|
-
render(): JSX_2.Element;
|
|
2078
|
-
private setTabIndex;
|
|
2079
|
-
private onKeyDown;
|
|
2080
|
-
private focusButton;
|
|
2081
|
-
private onWindowResize;
|
|
2082
|
-
}
|
|
1967
|
+
export declare const Toolbar: React_2.ForwardRefExoticComponent<ToolbarProps & React_2.RefAttributes<ToolbarHandle>>;
|
|
2083
1968
|
|
|
2084
1969
|
/**
|
|
2085
1970
|
* @hidden
|
|
@@ -2087,26 +1972,34 @@ export declare class Toolbar extends React_2.Component<ToolbarProps> {
|
|
|
2087
1972
|
export declare const toolbarButtons: string[];
|
|
2088
1973
|
|
|
2089
1974
|
/**
|
|
2090
|
-
* Represents the
|
|
2091
|
-
* To add a tool to the Toolbar, wrap it inside a ToolbarItem component
|
|
2092
|
-
* ([see example]({% slug content_toolbar %})).
|
|
1975
|
+
* Represents the Toolbar handle.
|
|
2093
1976
|
*/
|
|
2094
|
-
export declare
|
|
1977
|
+
export declare interface ToolbarHandle {
|
|
2095
1978
|
/**
|
|
2096
|
-
*
|
|
1979
|
+
* Represents the element of the Toolbar component.
|
|
2097
1980
|
*/
|
|
2098
|
-
|
|
2099
|
-
className: PropTypes.Requireable<string>;
|
|
2100
|
-
};
|
|
2101
|
-
private _element;
|
|
1981
|
+
element: HTMLDivElement | null;
|
|
2102
1982
|
/**
|
|
2103
|
-
*
|
|
1983
|
+
* Represents the props of the Toolbar component.
|
|
2104
1984
|
*/
|
|
2105
|
-
|
|
1985
|
+
props: Readonly<ToolbarProps>;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Represents the KendoReact ToolbarItem component.
|
|
1990
|
+
* To add a tool to the Toolbar, wrap it inside a ToolbarItem component
|
|
1991
|
+
* ([see example]({% slug content_toolbar %})).
|
|
1992
|
+
*/
|
|
1993
|
+
export declare const ToolbarItem: React_2.ForwardRefExoticComponent<ToolbarItemProps & React_2.RefAttributes<ToolbarItemHandle>>;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Represents the ToolbarItem handle.
|
|
1997
|
+
*/
|
|
1998
|
+
export declare interface ToolbarItemHandle {
|
|
2106
1999
|
/**
|
|
2107
|
-
*
|
|
2000
|
+
* Returns the HTML element of the ToolbarItem component.
|
|
2108
2001
|
*/
|
|
2109
|
-
|
|
2002
|
+
element: HTMLDivElement | null;
|
|
2110
2003
|
}
|
|
2111
2004
|
|
|
2112
2005
|
/**
|
|
@@ -2193,7 +2086,7 @@ export declare interface ToolbarResizeEvent {
|
|
|
2193
2086
|
/**
|
|
2194
2087
|
* An event target.
|
|
2195
2088
|
*/
|
|
2196
|
-
target:
|
|
2089
|
+
target: ToolbarHandle;
|
|
2197
2090
|
/**
|
|
2198
2091
|
* The `offsetWidth` event of the Toolbar.
|
|
2199
2092
|
*/
|
|
@@ -2208,12 +2101,7 @@ export declare interface ToolbarResizeEvent {
|
|
|
2208
2101
|
nativeEvent: any;
|
|
2209
2102
|
}
|
|
2210
2103
|
|
|
2211
|
-
export declare
|
|
2212
|
-
/**
|
|
2213
|
-
* @hidden
|
|
2214
|
-
*/
|
|
2215
|
-
render(): JSX_2.Element;
|
|
2216
|
-
}
|
|
2104
|
+
export declare const ToolbarSeparator: (props: ToolbarSeparatorProps) => JSX_2.Element;
|
|
2217
2105
|
|
|
2218
2106
|
/**
|
|
2219
2107
|
* Represents the KendoReact Toolbar Separator component.
|
package/index.mjs
CHANGED
|
@@ -22,9 +22,13 @@ import { ChipList as N } from "./Chip/ChipList.mjs";
|
|
|
22
22
|
import { FloatingActionButton as $ } from "./FloatingActionButton/FloatingActionButton.mjs";
|
|
23
23
|
import { FloatingActionButtonItem as H } from "./FloatingActionButton/FloatingActionButtonItem.mjs";
|
|
24
24
|
import { withIdHOC as o } from "@progress/kendo-react-common";
|
|
25
|
-
const p = o(
|
|
25
|
+
const p = o(
|
|
26
|
+
r
|
|
27
|
+
);
|
|
26
28
|
p.displayName = "KendoReactDropDownButton";
|
|
27
|
-
const n = o(
|
|
29
|
+
const n = o(
|
|
30
|
+
t
|
|
31
|
+
);
|
|
28
32
|
n.displayName = "KendoReactSplitButton";
|
|
29
33
|
export {
|
|
30
34
|
l as Button,
|