@progress/kendo-react-buttons 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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 +9 -9
- package/dist/es/Button.js +16 -12
- package/dist/es/ButtonGroup.d.ts +2 -2
- package/dist/es/ButtonGroup.js +8 -6
- package/dist/es/ButtonGroupInterface.d.ts +5 -0
- package/dist/es/ButtonGroupInterface.js +1 -0
- package/dist/es/ButtonInterface.js +1 -0
- package/dist/es/Chip/Chip.d.ts +1 -1
- package/dist/es/Chip/Chip.js +4 -4
- package/dist/es/Chip/ChipList.d.ts +4 -4
- package/dist/es/Chip/ChipList.js +4 -4
- package/dist/es/Chip/selection-reducer.js +11 -2
- package/dist/es/FloatingActionButton/FloatingActionButton.d.ts +1 -1
- package/dist/es/FloatingActionButton/FloatingActionButton.js +11 -9
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.d.ts +1 -1
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +6 -4
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +1 -0
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +1 -0
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.js +1 -0
- package/dist/es/FloatingActionButton/models/align-offset.js +1 -0
- package/dist/es/FloatingActionButton/models/align.js +1 -0
- package/dist/es/FloatingActionButton/models/events.js +1 -0
- package/dist/es/FloatingActionButton/models/position-mode.js +1 -0
- package/dist/es/FloatingActionButton/models/rounded.js +1 -0
- package/dist/es/FloatingActionButton/models/shape.js +1 -0
- package/dist/es/FloatingActionButton/models/size.js +1 -0
- package/dist/es/FloatingActionButton/models/theme-color.js +1 -0
- package/dist/es/FloatingActionButton/utils.d.ts +2 -2
- package/dist/es/FloatingActionButton/utils.js +2 -2
- package/dist/es/ListButton/ButtonItem.d.ts +1 -2
- package/dist/es/ListButton/ButtonItem.js +3 -4
- package/dist/es/ListButton/DropDownButton.d.ts +3 -3
- package/dist/es/ListButton/DropDownButton.js +12 -10
- package/dist/es/ListButton/DropDownButtonItem.d.ts +2 -2
- package/dist/es/ListButton/DropDownButtonItem.js +4 -2
- package/dist/es/ListButton/SplitButton.d.ts +3 -3
- package/dist/es/ListButton/SplitButton.js +13 -11
- package/dist/es/ListButton/SplitButtonItem.d.ts +2 -2
- package/dist/es/ListButton/SplitButtonItem.js +4 -2
- package/dist/es/ListButton/models/ButtonItem.js +1 -0
- package/dist/es/ListButton/models/ListButtonProps.js +1 -0
- package/dist/es/ListButton/models/PopupSettings.js +1 -0
- package/dist/es/ListButton/models/events.d.ts +2 -2
- package/dist/es/ListButton/models/events.js +1 -0
- package/dist/es/ListButton/utils/navigation.d.ts +1 -1
- package/dist/es/ListButton/utils/navigation.js +1 -1
- package/dist/es/main.d.ts +9 -9
- package/dist/es/main.js +10 -9
- package/dist/es/models/index.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/toolbar/Toolbar.d.ts +5 -5
- package/dist/es/toolbar/Toolbar.js +8 -6
- package/dist/es/toolbar/tools/ToolbarItem.d.ts +2 -2
- package/dist/es/toolbar/tools/ToolbarItem.js +5 -3
- package/dist/es/toolbar/tools/ToolbarSeparator.d.ts +1 -1
- package/dist/es/toolbar/tools/ToolbarSeparator.js +5 -3
- package/dist/es/toolbar/tools/ToolbarSpacer.d.ts +1 -1
- package/dist/es/toolbar/tools/ToolbarSpacer.js +1 -0
- package/dist/es/util.d.ts +9 -9
- package/dist/npm/Button.d.ts +9 -9
- package/dist/npm/Button.js +21 -16
- package/dist/npm/ButtonGroup.d.ts +2 -2
- package/dist/npm/ButtonGroup.js +12 -9
- package/dist/npm/ButtonGroupInterface.d.ts +5 -0
- package/dist/npm/Chip/Chip.d.ts +1 -1
- package/dist/npm/Chip/Chip.js +12 -11
- package/dist/npm/Chip/ChipList.d.ts +4 -4
- package/dist/npm/Chip/ChipList.js +11 -10
- package/dist/npm/Chip/data-reducer.js +3 -1
- package/dist/npm/Chip/focus-reducer.js +3 -1
- package/dist/npm/Chip/selection-reducer.js +14 -3
- package/dist/npm/FloatingActionButton/FloatingActionButton.d.ts +1 -1
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +27 -24
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +1 -1
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +8 -5
- package/dist/npm/FloatingActionButton/utils.d.ts +2 -2
- package/dist/npm/FloatingActionButton/utils.js +15 -9
- package/dist/npm/ListButton/ButtonItem.d.ts +1 -2
- package/dist/npm/ListButton/ButtonItem.js +7 -6
- package/dist/npm/ListButton/DropDownButton.d.ts +3 -3
- package/dist/npm/ListButton/DropDownButton.js +21 -18
- package/dist/npm/ListButton/DropDownButtonItem.d.ts +2 -2
- package/dist/npm/ListButton/DropDownButtonItem.js +5 -2
- package/dist/npm/ListButton/SplitButton.d.ts +3 -3
- package/dist/npm/ListButton/SplitButton.js +23 -20
- package/dist/npm/ListButton/SplitButtonItem.d.ts +2 -2
- package/dist/npm/ListButton/SplitButtonItem.js +5 -2
- package/dist/npm/ListButton/models/events.d.ts +2 -2
- package/dist/npm/ListButton/utils/navigation.d.ts +1 -1
- package/dist/npm/ListButton/utils/navigation.js +2 -1
- package/dist/npm/ListButton/utils/popup.js +1 -0
- package/dist/npm/main.d.ts +9 -9
- package/dist/npm/main.js +30 -14
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/toolbar/Toolbar.d.ts +5 -5
- package/dist/npm/toolbar/Toolbar.js +11 -8
- package/dist/npm/toolbar/tools/ToolbarItem.d.ts +2 -2
- package/dist/npm/toolbar/tools/ToolbarItem.js +6 -3
- package/dist/npm/toolbar/tools/ToolbarSeparator.d.ts +1 -1
- package/dist/npm/toolbar/tools/ToolbarSeparator.js +6 -3
- package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +1 -1
- package/dist/npm/toolbar/tools/ToolbarSpacer.js +3 -1
- package/dist/npm/util.d.ts +9 -9
- package/dist/npm/util.js +1 -0
- package/dist/systemjs/kendo-react-buttons.js +1 -1
- package/package.json +13 -13
package/dist/es/Button.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes
|
|
|
86
86
|
export interface ButtonState {
|
|
87
87
|
selected: boolean;
|
|
88
88
|
}
|
|
89
|
-
export
|
|
89
|
+
export declare class Button extends React.Component<ButtonProps, ButtonState> {
|
|
90
90
|
/**
|
|
91
91
|
* @hidden
|
|
92
92
|
*/
|
|
@@ -98,11 +98,11 @@ export default class Button extends React.Component<ButtonProps, ButtonState> {
|
|
|
98
98
|
iconClass: PropTypes.Requireable<string>;
|
|
99
99
|
imageUrl: PropTypes.Requireable<string>;
|
|
100
100
|
imageAlt: PropTypes.Requireable<string>;
|
|
101
|
-
size: PropTypes.Requireable<string>;
|
|
102
|
-
shape: PropTypes.Requireable<string>;
|
|
103
|
-
rounded: PropTypes.Requireable<string>;
|
|
104
|
-
fillMode: PropTypes.Requireable<string>;
|
|
105
|
-
themeColor: PropTypes.Requireable<string>;
|
|
101
|
+
size: PropTypes.Requireable<string | null>;
|
|
102
|
+
shape: PropTypes.Requireable<string | null>;
|
|
103
|
+
rounded: PropTypes.Requireable<string | null>;
|
|
104
|
+
fillMode: PropTypes.Requireable<string | null>;
|
|
105
|
+
themeColor: PropTypes.Requireable<string | null>;
|
|
106
106
|
};
|
|
107
107
|
/**
|
|
108
108
|
* @hidden
|
|
@@ -124,19 +124,19 @@ export default class Button extends React.Component<ButtonProps, ButtonState> {
|
|
|
124
124
|
/**
|
|
125
125
|
* Gets the DOM element of the Button component.
|
|
126
126
|
*/
|
|
127
|
-
|
|
127
|
+
get element(): HTMLButtonElement | null;
|
|
128
128
|
/**
|
|
129
129
|
* Returns `true` when the component is togglable and selected ([see example]({% slug toggleable_button %})).
|
|
130
130
|
* Otherwise, returns `false`.
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
get selected(): boolean;
|
|
133
133
|
constructor(props: any);
|
|
134
134
|
/**
|
|
135
135
|
* @hidden
|
|
136
136
|
*/
|
|
137
137
|
static getDerivedStateFromProps(props: ButtonProps, state: ButtonState): {
|
|
138
138
|
selected: boolean;
|
|
139
|
-
};
|
|
139
|
+
} | null;
|
|
140
140
|
/**
|
|
141
141
|
* @hidden
|
|
142
142
|
*/
|
package/dist/es/Button.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
|
@@ -75,7 +79,7 @@ var Button = /** @class */ (function (_super) {
|
|
|
75
79
|
get: function () {
|
|
76
80
|
return this._element;
|
|
77
81
|
},
|
|
78
|
-
enumerable:
|
|
82
|
+
enumerable: false,
|
|
79
83
|
configurable: true
|
|
80
84
|
});
|
|
81
85
|
Object.defineProperty(Button.prototype, "selected", {
|
|
@@ -86,7 +90,7 @@ var Button = /** @class */ (function (_super) {
|
|
|
86
90
|
get: function () {
|
|
87
91
|
return this._selectedTemp !== undefined ? this._selectedTemp : this.state.selected;
|
|
88
92
|
},
|
|
89
|
-
enumerable:
|
|
93
|
+
enumerable: false,
|
|
90
94
|
configurable: true
|
|
91
95
|
});
|
|
92
96
|
/**
|
|
@@ -102,8 +106,8 @@ var Button = /** @class */ (function (_super) {
|
|
|
102
106
|
* @hidden
|
|
103
107
|
*/
|
|
104
108
|
Button.prototype.render = function () {
|
|
105
|
-
var _this = this;
|
|
106
109
|
var _a;
|
|
110
|
+
var _this = this;
|
|
107
111
|
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"]);
|
|
108
112
|
var hasIcon = (icon !== undefined || iconClass !== undefined || imageUrl !== undefined);
|
|
109
113
|
var hasChildren = children !== undefined;
|
|
@@ -114,11 +118,11 @@ var Button = /** @class */ (function (_super) {
|
|
|
114
118
|
imageAlt: imageAlt
|
|
115
119
|
});
|
|
116
120
|
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: classNames('k-button', (_a = {},
|
|
117
|
-
_a["k-button-"
|
|
118
|
-
_a["k-button-"
|
|
119
|
-
_a["k-button-"
|
|
120
|
-
_a["k-button-"
|
|
121
|
-
_a["k-rounded-"
|
|
121
|
+
_a["k-button-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
122
|
+
_a["k-button-".concat(shape)] = shape,
|
|
123
|
+
_a["k-button-".concat(fillMode)] = fillMode,
|
|
124
|
+
_a["k-button-".concat(fillMode, "-").concat(themeColor)] = Boolean(fillMode && themeColor),
|
|
125
|
+
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
122
126
|
_a['k-icon-button'] = !hasChildren && hasIcon,
|
|
123
127
|
_a['k-disabled'] = this.props.disabled,
|
|
124
128
|
_a['k-selected'] = this.state.selected,
|
|
@@ -166,4 +170,4 @@ var Button = /** @class */ (function (_super) {
|
|
|
166
170
|
};
|
|
167
171
|
return Button;
|
|
168
172
|
}(React.Component));
|
|
169
|
-
export
|
|
173
|
+
export { Button };
|
package/dist/es/ButtonGroup.d.ts
CHANGED
|
@@ -10,12 +10,12 @@ export interface ButtonGroupProps extends ButtonGroupInterface {
|
|
|
10
10
|
*/
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export declare class ButtonGroup extends React.Component<ButtonGroupProps, {}> {
|
|
14
14
|
/**
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
17
17
|
static propTypes: {
|
|
18
|
-
children: PropTypes.Requireable<PropTypes.ReactElementLike | PropTypes.ReactElementLike[]>;
|
|
18
|
+
children: PropTypes.Requireable<PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null)[]>;
|
|
19
19
|
className: PropTypes.Requireable<string>;
|
|
20
20
|
disabled: PropTypes.Requireable<boolean>;
|
|
21
21
|
width: PropTypes.Requireable<string>;
|
package/dist/es/ButtonGroup.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -41,8 +43,8 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
41
43
|
* @hidden
|
|
42
44
|
*/
|
|
43
45
|
ButtonGroup.prototype.render = function () {
|
|
44
|
-
var _this = this;
|
|
45
46
|
var _a;
|
|
47
|
+
var _this = this;
|
|
46
48
|
var buttons = this.mapButtons(this.props.children);
|
|
47
49
|
var groupClasses = classNames([styles['button-group']], (_a = {},
|
|
48
50
|
_a['k-disabled'] = this.props.disabled,
|
|
@@ -50,7 +52,7 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
50
52
|
_a), this.props.className);
|
|
51
53
|
var groupProps = {
|
|
52
54
|
className: groupClasses,
|
|
53
|
-
style: { 'width': ""
|
|
55
|
+
style: { 'width': "".concat(this.props.width) },
|
|
54
56
|
dir: this.props.dir,
|
|
55
57
|
// Accessibility properties
|
|
56
58
|
role: 'group',
|
|
@@ -77,9 +79,9 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
77
79
|
_a[styles['group-start']] = isRtl ? isLast : index === 0,
|
|
78
80
|
_a[styles['group-end']] = isRtl ? index === 0 : isLast,
|
|
79
81
|
_a));
|
|
80
|
-
var style = __assign({}, (this.props.width ? { width: this.props.width } : {}), (child.props.style || {}));
|
|
82
|
+
var style = __assign(__assign({}, (this.props.width ? { width: this.props.width } : {})), (child.props.style || {}));
|
|
81
83
|
var disabled = this.props.disabled || child.props.disabled;
|
|
82
|
-
var buttonProps = __assign({}, child.props, (className ? { className: className } : {}), (Object.keys(style).length ? { style: style } : {}), (disabled !== undefined ? { disabled: disabled } : {}));
|
|
84
|
+
var buttonProps = __assign(__assign(__assign(__assign({}, child.props), (className ? { className: className } : {})), (Object.keys(style).length ? { style: style } : {})), (disabled !== undefined ? { disabled: disabled } : {}));
|
|
83
85
|
return React.Children.count(child.props.children) > 0 ?
|
|
84
86
|
React.cloneElement(child, buttonProps, child.props.children) :
|
|
85
87
|
React.cloneElement(child, buttonProps);
|
|
@@ -96,4 +98,4 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
96
98
|
};
|
|
97
99
|
return ButtonGroup;
|
|
98
100
|
}(React.Component));
|
|
99
|
-
export
|
|
101
|
+
export { ButtonGroup };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* Represents the properties which can be set to a ButtonGroup.
|
|
3
4
|
*/
|
|
4
5
|
export interface ButtonGroupInterface {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode;
|
|
5
10
|
/**
|
|
6
11
|
* By default, the ButtonGroup is enabled ([see example]({% slug disabledstate_buttongroup %})). To disable the whole group of buttons, set its `disabled` attribute to `true`. To disable a specific button, set its own `disabled` attribute to `true` and leave the `disabled` attribute of the ButtonGroup undefined.
|
|
7
12
|
*
|
package/dist/es/Chip/Chip.d.ts
CHANGED
|
@@ -192,4 +192,4 @@ export interface ChipHandle {
|
|
|
192
192
|
/**
|
|
193
193
|
* Represents the Chip component.
|
|
194
194
|
*/
|
|
195
|
-
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<ChipHandle>>;
|
|
195
|
+
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<ChipHandle | null>>;
|
package/dist/es/Chip/Chip.js
CHANGED
|
@@ -112,10 +112,10 @@ export var Chip = React.forwardRef(function (props, ref) {
|
|
|
112
112
|
'k-selected': selected,
|
|
113
113
|
'k-focus': focused
|
|
114
114
|
},
|
|
115
|
-
_a["k-chip-"
|
|
116
|
-
_a["k-rounded-"
|
|
117
|
-
_a["k-chip-"
|
|
118
|
-
_a["k-chip-"
|
|
115
|
+
_a["k-chip-".concat(kendoThemeMaps.sizeMap[props.size] || props.size)] = props.size,
|
|
116
|
+
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[props.rounded] || props.rounded)] = props.rounded,
|
|
117
|
+
_a["k-chip-".concat(props.fillMode)] = props.fillMode,
|
|
118
|
+
_a["k-chip-".concat(props.fillMode, "-").concat(props.themeColor)] = Boolean(props.fillMode && props.themeColor),
|
|
119
119
|
_a), props.className), "aria-checked": selected, "aria-disabled": props.disabled, "aria-describedby": props.ariaDescribedBy, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }),
|
|
120
120
|
(selected && props.selectedIcon) && React.createElement("span", { className: classNames('k-chip-icon', 'k-icon', props.selectedIcon) }),
|
|
121
121
|
props.icon && React.createElement("span", { className: classNames('k-chip-icon', 'k-icon', props.icon) }),
|
|
@@ -108,16 +108,16 @@ export interface ChipListHandle {
|
|
|
108
108
|
/**
|
|
109
109
|
* @hidden
|
|
110
110
|
*/
|
|
111
|
-
export declare const ChipListSelectionContext: React.Context<[string | string[], Function]>;
|
|
111
|
+
export declare const ChipListSelectionContext: React.Context<[string | string[] | null, Function]>;
|
|
112
112
|
/**
|
|
113
113
|
* @hidden
|
|
114
114
|
*/
|
|
115
|
-
export declare const ChipListFocusContext: React.Context<[string | string[], Function]>;
|
|
115
|
+
export declare const ChipListFocusContext: React.Context<[string | string[] | null, Function]>;
|
|
116
116
|
/**
|
|
117
117
|
* @hidden
|
|
118
118
|
*/
|
|
119
|
-
export declare const ChipListDataContext: React.Context<[string, Function]>;
|
|
119
|
+
export declare const ChipListDataContext: React.Context<[string | null, Function]>;
|
|
120
120
|
/**
|
|
121
121
|
* Represents the ChipList component.
|
|
122
122
|
*/
|
|
123
|
-
export declare const ChipList: React.ForwardRefExoticComponent<ChipListProps & React.RefAttributes<ChipListHandle>>;
|
|
123
|
+
export declare const ChipList: React.ForwardRefExoticComponent<ChipListProps & React.RefAttributes<ChipListHandle | null>>;
|
package/dist/es/Chip/ChipList.js
CHANGED
|
@@ -42,7 +42,7 @@ export var ChipListDataContext = React.createContext([null, function (_args) {
|
|
|
42
42
|
var useSelection = function (defaultValue, args, callback) {
|
|
43
43
|
var _a = React.useState(defaultValue), state = _a[0], setState = _a[1];
|
|
44
44
|
var handleDispatchSelection = function (action) {
|
|
45
|
-
var newState = selectionReducer(args.state || state, __assign({}, action, args));
|
|
45
|
+
var newState = selectionReducer(args.state || state, __assign(__assign({}, action), args));
|
|
46
46
|
if (callback) {
|
|
47
47
|
callback(newState, action.event);
|
|
48
48
|
}
|
|
@@ -56,7 +56,7 @@ var useSelection = function (defaultValue, args, callback) {
|
|
|
56
56
|
var useFocus = function (args) {
|
|
57
57
|
var _a = React.useState(null), state = _a[0], setState = _a[1];
|
|
58
58
|
var handleDispatchFocus = function (action) {
|
|
59
|
-
var newState = focusReducer(action.payload, __assign({}, action, args));
|
|
59
|
+
var newState = focusReducer(action.payload, __assign(__assign({}, action), args));
|
|
60
60
|
setState(newState);
|
|
61
61
|
};
|
|
62
62
|
return [state, handleDispatchFocus];
|
|
@@ -67,7 +67,7 @@ var useFocus = function (args) {
|
|
|
67
67
|
var useData = function (defaultData, args, callback) {
|
|
68
68
|
var _a = React.useState(defaultData), state = _a[0], setState = _a[1];
|
|
69
69
|
var handleDispatchData = function (action) {
|
|
70
|
-
var newState = dataReducer(args.state || state, __assign({}, action, args));
|
|
70
|
+
var newState = dataReducer(args.state || state, __assign(__assign({}, action), args));
|
|
71
71
|
if (callback) {
|
|
72
72
|
callback(newState, action.event);
|
|
73
73
|
}
|
|
@@ -135,7 +135,7 @@ export var ChipList = React.forwardRef(function (props, ref) {
|
|
|
135
135
|
'k-rtl': dir === 'rtl',
|
|
136
136
|
'k-disabled': disabled
|
|
137
137
|
},
|
|
138
|
-
_a["k-chip-list-"
|
|
138
|
+
_a["k-chip-list-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
139
139
|
_a), className), "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }), data.map(function (item, index) {
|
|
140
140
|
return (React.createElement(ChipComponent, { role: 'option', dataItem: item, size: size, key: [valueGetter(item), index].join('-'), text: textGetter(item), value: valueGetter(item) }));
|
|
141
141
|
}))))));
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* @hidden
|
|
3
12
|
*/
|
|
@@ -40,7 +49,7 @@ export var selectionReducer = function (state, action) {
|
|
|
40
49
|
if (Array.isArray(state)) {
|
|
41
50
|
return state.some(function (i) { return i === action.payload; })
|
|
42
51
|
? state.filter(function (i) { return i !== action.payload; })
|
|
43
|
-
:
|
|
52
|
+
: __spreadArray(__spreadArray([], state, true), [action.payload], false);
|
|
44
53
|
}
|
|
45
54
|
if (state === null) {
|
|
46
55
|
return [action.payload];
|
|
@@ -51,7 +60,7 @@ export var selectionReducer = function (state, action) {
|
|
|
51
60
|
if (Array.isArray(state)) {
|
|
52
61
|
return state.some(function (i) { return i === action.payload; })
|
|
53
62
|
? state.filter(function (i) { return i !== action.payload; })
|
|
54
|
-
:
|
|
63
|
+
: __spreadArray(__spreadArray([], state, true), [action.payload], false);
|
|
55
64
|
}
|
|
56
65
|
return state;
|
|
57
66
|
}
|
|
@@ -14,4 +14,4 @@ import { FloatingActionButtonProps } from './interfaces/FloatingActionButtonProp
|
|
|
14
14
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export declare const FloatingActionButton: React.ForwardRefExoticComponent<FloatingActionButtonProps & React.RefAttributes<FloatingActionButtonHandle>>;
|
|
17
|
+
export declare const FloatingActionButton: React.ForwardRefExoticComponent<FloatingActionButtonProps & React.RefAttributes<FloatingActionButtonHandle | null>>;
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -200,7 +202,7 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
200
202
|
var buttonClassNames = React.useMemo(function () {
|
|
201
203
|
var _a;
|
|
202
204
|
return classNames('k-fab k-fab-solid', (_a = {},
|
|
203
|
-
_a["k-fab-"
|
|
205
|
+
_a["k-fab-".concat(shape)] = shape,
|
|
204
206
|
_a['k-fab-sm'] = size === 'small',
|
|
205
207
|
_a['k-fab-md'] = size === 'medium',
|
|
206
208
|
_a['k-fab-lg'] = size === 'large',
|
|
@@ -208,12 +210,12 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
208
210
|
_a['k-pos-absolute'] = positionMode === 'absolute',
|
|
209
211
|
_a['k-pos-fixed'] = positionMode === 'fixed',
|
|
210
212
|
_a['k-focus'] = focused,
|
|
211
|
-
_a["k-rounded-"
|
|
212
|
-
_a["k-fab-solid-"
|
|
213
|
-
_a), "k-"
|
|
213
|
+
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
214
|
+
_a["k-fab-solid-".concat(themeColor)] = themeColor,
|
|
215
|
+
_a), "k-".concat(align.vertical, "-").concat(align.horizontal), className);
|
|
214
216
|
}, [themeColor, size, rounded, shape, disabled, positionMode, align, focused, className]);
|
|
215
217
|
var fabItems = (items && (items.map(function (element, index) {
|
|
216
|
-
return (React.createElement(FloatingActionButtonItem, __assign({}, element, { key: index, index: index, id: listId
|
|
218
|
+
return (React.createElement(FloatingActionButtonItem, __assign({}, element, { key: index, index: index, id: "".concat(listId, "-").concat(index), disabled: disabled || element.disabled, focused: focusedIndex === index, dataItem: element, item: item, className: classNames(element.className, getTextDirectionClass(dir || 'ltr', align.horizontal)), onClick: handleItemClick, onDown: handleItemDown })));
|
|
217
219
|
})));
|
|
218
220
|
var isIconFab = icon && !text;
|
|
219
221
|
var fabWidth = elementRef.current ? elementRef.current.offsetWidth : 0;
|
|
@@ -221,9 +223,9 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
221
223
|
var spacing = (fabWidth / 2) - (iconWidth / 2);
|
|
222
224
|
return (React.createElement(ZIndexContext.Provider, { value: currentZIndex },
|
|
223
225
|
React.createElement(React.Fragment, null,
|
|
224
|
-
React.createElement("button", __assign({ ref: elementRef, id: id || buttonId, role: items ? 'menubutton' : 'button', type: 'button', "aria-disabled": disabled, "aria-expanded": items ? open : undefined, "aria-haspopup": items ? true : false, "aria-label": (text || ''
|
|
226
|
+
React.createElement("button", __assign({ ref: elementRef, id: id || buttonId, role: items ? 'menubutton' : 'button', type: 'button', "aria-disabled": disabled, "aria-expanded": items ? open : undefined, "aria-haspopup": items ? true : false, "aria-label": "".concat(text || '', " floatingactionbutton"), "aria-owns": items ? listId : undefined, "aria-activedescendant": focusedIndex >= 0 && items ? "".concat(listId, "-").concat(focusedIndex) : undefined, tabIndex: getTabIndex(tabIndex, disabled), accessKey: accessKey, dir: dir, disabled: disabled, className: buttonClassNames, style: style, onClick: handleClick, onMouseDown: handleMouseDown, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }, others),
|
|
225
227
|
icon ?
|
|
226
|
-
React.createElement("span", { role: "presentation", className: classNames("k-fab-icon k-icon k-i-"
|
|
228
|
+
React.createElement("span", { role: "presentation", className: classNames("k-fab-icon k-icon k-i-".concat(icon)) }) :
|
|
227
229
|
iconClass ?
|
|
228
230
|
React.createElement("span", { role: "presentation", className: iconClass }) :
|
|
229
231
|
null,
|
|
@@ -97,4 +97,4 @@ export interface FloatingActionButtonItemProps {
|
|
|
97
97
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export declare const FloatingActionButtonItem: React.ForwardRefExoticComponent<Pick<FloatingActionButtonItemProps,
|
|
100
|
+
export declare const FloatingActionButtonItem: React.ForwardRefExoticComponent<Pick<FloatingActionButtonItemProps, keyof FloatingActionButtonItemProps> & React.RefAttributes<FloatingActionButtonItemHandle | null>>;
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -58,10 +60,10 @@ export var FloatingActionButtonItem = React.forwardRef(function (props, ref) {
|
|
|
58
60
|
'k-disabled': disabled
|
|
59
61
|
}, className); }, [className, disabled, focused]);
|
|
60
62
|
var ItemComp = item;
|
|
61
|
-
return (React.createElement("li", __assign({ ref: elementRef, id: id, className: itemClassNames, style: style, role: 'menuitem', tabIndex: getTabIndex(tabIndex, disabled), "aria-disabled": disabled, "aria-label": (text || ''
|
|
63
|
+
return (React.createElement("li", __assign({ ref: elementRef, id: id, className: itemClassNames, style: style, role: 'menuitem', tabIndex: getTabIndex(tabIndex, disabled), "aria-disabled": disabled, "aria-label": "".concat(text || '', " floatingactionbutton item"), onClick: handleClick, onMouseDown: onDown, onPointerDown: onDown }, others), ItemComp ? React.createElement(ItemComp, { itemIndex: index, item: dataItem }) :
|
|
62
64
|
(React.createElement(React.Fragment, null,
|
|
63
65
|
text && React.createElement("span", { className: "k-fab-item-text" }, text),
|
|
64
|
-
icon && React.createElement("span", { className: classNames("k-fab-item-icon k-icon k-i-"
|
|
66
|
+
icon && React.createElement("span", { className: classNames("k-fab-item-icon k-icon k-i-".concat(icon)) })))));
|
|
65
67
|
});
|
|
66
68
|
FloatingActionButtonItem.propTypes = {
|
|
67
69
|
className: PropTypes.string,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export declare const DEFAULT_OFFSET = "16px";
|
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
|
-
export declare const toStringValues: (val:
|
|
11
|
+
export declare const toStringValues: (val: number | string) => string;
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -24,4 +24,4 @@ export declare const getTextDirectionClass: (rtl: string, hAlign: any) => any;
|
|
|
24
24
|
/**
|
|
25
25
|
* @hidden
|
|
26
26
|
*/
|
|
27
|
-
export declare const position: (ref: any, align: FloatingActionButtonAlign, alignOffset: FloatingActionButtonAlignOffset, isRtl: boolean) => void;
|
|
27
|
+
export declare const position: (ref: any, align: FloatingActionButtonAlign, alignOffset: FloatingActionButtonAlignOffset | undefined, isRtl: boolean) => void;
|
|
@@ -53,13 +53,13 @@ export var position = function (ref, align, alignOffset, isRtl) {
|
|
|
53
53
|
toStringValues(alignOffset.x) :
|
|
54
54
|
DEFAULT_OFFSET;
|
|
55
55
|
var xCenterFab = alignOffset && alignOffset.x !== undefined ?
|
|
56
|
-
"calc(50% + "
|
|
56
|
+
"calc(50% + ".concat(toStringValues(alignOffset.x), ")") :
|
|
57
57
|
'50%';
|
|
58
58
|
var yFab = alignOffset && alignOffset.y !== undefined ?
|
|
59
59
|
toStringValues(alignOffset.y) :
|
|
60
60
|
DEFAULT_OFFSET;
|
|
61
61
|
var yCenterFab = alignOffset && alignOffset.y !== undefined ?
|
|
62
|
-
"calc(50% + "
|
|
62
|
+
"calc(50% + ".concat(toStringValues(alignOffset.y), ")") :
|
|
63
63
|
'50%';
|
|
64
64
|
ref.current.style.setProperty(horizontalPosition(align, isRtl), horizontal === 'center' ? xCenterFab : xFab);
|
|
65
65
|
ref.current.style.setProperty(verticalPosition(align), vertical === 'middle' ? yCenterFab : yFab);
|
|
@@ -3,7 +3,7 @@ import { classNames } from '@progress/kendo-react-common';
|
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
|
-
var ButtonItem = function (props) {
|
|
6
|
+
export var ButtonItem = function (props) {
|
|
7
7
|
var _a;
|
|
8
8
|
var handleClick = React.useCallback(function (event) {
|
|
9
9
|
props.onClick(event, props.index);
|
|
@@ -17,8 +17,8 @@ var ButtonItem = function (props) {
|
|
|
17
17
|
? (React.createElement(As, { item: props.dataItem, itemIndex: props.index }))
|
|
18
18
|
: (React.createElement(React.Fragment, null,
|
|
19
19
|
(props.dataItem.icon || props.dataItem.iconClass) && (React.createElement("span", { className: classNames('k-icon', (_a = {},
|
|
20
|
-
_a["k-i-"
|
|
21
|
-
_a[""
|
|
20
|
+
_a["k-i-".concat(props.dataItem.icon)] = props.dataItem.icon,
|
|
21
|
+
_a["".concat(props.dataItem.iconClass)] = props.dataItem.iconClass,
|
|
22
22
|
_a)) })),
|
|
23
23
|
(props.dataItem.imageUrl) && (React.createElement("img", { role: "presentation", alt: "", src: props.dataItem.imageUrl, className: 'k-icon' })),
|
|
24
24
|
(text) && (React.createElement("span", { className: "k-menu-link-text" }, text))))))));
|
|
@@ -26,4 +26,3 @@ var ButtonItem = function (props) {
|
|
|
26
26
|
props.render !== undefined) ? props.render.call(undefined, item, props) : item);
|
|
27
27
|
};
|
|
28
28
|
ButtonItem.displayName = 'KendoReactButtonItem';
|
|
29
|
-
export default ButtonItem;
|
|
@@ -28,7 +28,7 @@ export interface DropDownButtonState {
|
|
|
28
28
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export declare class DropDownButton extends React.Component<DropDownButtonProps, DropDownButtonState> {
|
|
32
32
|
/**
|
|
33
33
|
* @hidden
|
|
34
34
|
*/
|
|
@@ -76,7 +76,7 @@ export default class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
76
76
|
private guid;
|
|
77
77
|
private buttonsData;
|
|
78
78
|
constructor(props: DropDownButtonProps);
|
|
79
|
-
private
|
|
79
|
+
private get opened();
|
|
80
80
|
/**
|
|
81
81
|
* @hidden
|
|
82
82
|
*/
|
|
@@ -92,7 +92,7 @@ export default class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
92
92
|
/**
|
|
93
93
|
* The DOM element of main button.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
get element(): HTMLButtonElement | null;
|
|
96
96
|
private onKeyDown;
|
|
97
97
|
private handleFocus;
|
|
98
98
|
private handleBlur;
|