@progress/kendo-react-buttons 5.4.0-dev.202205271059 → 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 +6 -6
- package/dist/es/Button.js +5 -5
- package/dist/es/ButtonGroup.d.ts +1 -1
- package/dist/es/ButtonGroup.js +1 -1
- package/dist/es/ButtonGroupInterface.d.ts +5 -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 +1 -1
- package/dist/es/Chip/selection-reducer.js +10 -6
- package/dist/es/FloatingActionButton/FloatingActionButton.d.ts +1 -1
- package/dist/es/FloatingActionButton/FloatingActionButton.js +7 -7
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.d.ts +1 -1
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +2 -2
- package/dist/es/FloatingActionButton/utils.js +2 -2
- package/dist/es/ListButton/ButtonItem.js +2 -2
- package/dist/es/ListButton/DropDownButton.js +3 -3
- package/dist/es/ListButton/DropDownButtonItem.d.ts +1 -1
- package/dist/es/ListButton/SplitButton.js +4 -4
- package/dist/es/ListButton/SplitButtonItem.d.ts +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/toolbar/Toolbar.d.ts +1 -1
- 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 +3 -3
- package/dist/npm/Button.d.ts +6 -6
- package/dist/npm/Button.js +9 -9
- package/dist/npm/ButtonGroup.d.ts +1 -1
- package/dist/npm/ButtonGroup.js +4 -4
- package/dist/npm/ButtonGroupInterface.d.ts +5 -0
- package/dist/npm/Chip/Chip.d.ts +1 -1
- package/dist/npm/Chip/Chip.js +11 -11
- package/dist/npm/Chip/ChipList.d.ts +4 -4
- package/dist/npm/Chip/ChipList.js +10 -10
- package/dist/npm/Chip/selection-reducer.js +10 -6
- package/dist/npm/FloatingActionButton/FloatingActionButton.d.ts +1 -1
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +22 -22
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +1 -1
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +3 -3
- package/dist/npm/FloatingActionButton/utils.js +4 -4
- package/dist/npm/ListButton/ButtonItem.js +4 -4
- package/dist/npm/ListButton/DropDownButton.js +13 -13
- package/dist/npm/ListButton/DropDownButtonItem.d.ts +1 -1
- package/dist/npm/ListButton/SplitButton.js +15 -15
- package/dist/npm/ListButton/SplitButtonItem.d.ts +1 -1
- package/dist/npm/main.js +5 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/toolbar/Toolbar.d.ts +1 -1
- package/dist/npm/toolbar/Toolbar.js +2 -2
- package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +1 -1
- package/dist/npm/toolbar/tools/ToolbarSpacer.js +2 -1
- package/dist/npm/util.d.ts +3 -3
- package/dist/systemjs/kendo-react-buttons.js +1 -1
- package/package.json +13 -13
package/dist/es/Button.js
CHANGED
|
@@ -118,11 +118,11 @@ var Button = /** @class */ (function (_super) {
|
|
|
118
118
|
imageAlt: imageAlt
|
|
119
119
|
});
|
|
120
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 = {},
|
|
121
|
-
_a["k-button-"
|
|
122
|
-
_a["k-button-"
|
|
123
|
-
_a["k-button-"
|
|
124
|
-
_a["k-button-"
|
|
125
|
-
_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,
|
|
126
126
|
_a['k-icon-button'] = !hasChildren && hasIcon,
|
|
127
127
|
_a['k-disabled'] = this.props.disabled,
|
|
128
128
|
_a['k-selected'] = this.state.selected,
|
package/dist/es/ButtonGroup.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class ButtonGroup extends React.Component<ButtonGroupProps, {}> {
|
|
|
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
|
@@ -52,7 +52,7 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
52
52
|
_a), this.props.className);
|
|
53
53
|
var groupProps = {
|
|
54
54
|
className: groupClasses,
|
|
55
|
-
style: { 'width': ""
|
|
55
|
+
style: { 'width': "".concat(this.props.width) },
|
|
56
56
|
dir: this.props.dir,
|
|
57
57
|
// Accessibility properties
|
|
58
58
|
role: 'group',
|
|
@@ -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
|
@@ -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,7 +1,11 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
2
|
-
for (var i = 0,
|
|
3
|
-
|
|
4
|
-
|
|
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));
|
|
5
9
|
};
|
|
6
10
|
/**
|
|
7
11
|
* @hidden
|
|
@@ -45,7 +49,7 @@ export var selectionReducer = function (state, action) {
|
|
|
45
49
|
if (Array.isArray(state)) {
|
|
46
50
|
return state.some(function (i) { return i === action.payload; })
|
|
47
51
|
? state.filter(function (i) { return i !== action.payload; })
|
|
48
|
-
: __spreadArray(__spreadArray([], state), [action.payload]);
|
|
52
|
+
: __spreadArray(__spreadArray([], state, true), [action.payload], false);
|
|
49
53
|
}
|
|
50
54
|
if (state === null) {
|
|
51
55
|
return [action.payload];
|
|
@@ -56,7 +60,7 @@ export var selectionReducer = function (state, action) {
|
|
|
56
60
|
if (Array.isArray(state)) {
|
|
57
61
|
return state.some(function (i) { return i === action.payload; })
|
|
58
62
|
? state.filter(function (i) { return i !== action.payload; })
|
|
59
|
-
: __spreadArray(__spreadArray([], state), [action.payload]);
|
|
63
|
+
: __spreadArray(__spreadArray([], state, true), [action.payload], false);
|
|
60
64
|
}
|
|
61
65
|
return state;
|
|
62
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>>;
|
|
@@ -202,7 +202,7 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
202
202
|
var buttonClassNames = React.useMemo(function () {
|
|
203
203
|
var _a;
|
|
204
204
|
return classNames('k-fab k-fab-solid', (_a = {},
|
|
205
|
-
_a["k-fab-"
|
|
205
|
+
_a["k-fab-".concat(shape)] = shape,
|
|
206
206
|
_a['k-fab-sm'] = size === 'small',
|
|
207
207
|
_a['k-fab-md'] = size === 'medium',
|
|
208
208
|
_a['k-fab-lg'] = size === 'large',
|
|
@@ -210,12 +210,12 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
210
210
|
_a['k-pos-absolute'] = positionMode === 'absolute',
|
|
211
211
|
_a['k-pos-fixed'] = positionMode === 'fixed',
|
|
212
212
|
_a['k-focus'] = focused,
|
|
213
|
-
_a["k-rounded-"
|
|
214
|
-
_a["k-fab-solid-"
|
|
215
|
-
_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);
|
|
216
216
|
}, [themeColor, size, rounded, shape, disabled, positionMode, align, focused, className]);
|
|
217
217
|
var fabItems = (items && (items.map(function (element, index) {
|
|
218
|
-
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 })));
|
|
219
219
|
})));
|
|
220
220
|
var isIconFab = icon && !text;
|
|
221
221
|
var fabWidth = elementRef.current ? elementRef.current.offsetWidth : 0;
|
|
@@ -223,9 +223,9 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
|
|
|
223
223
|
var spacing = (fabWidth / 2) - (iconWidth / 2);
|
|
224
224
|
return (React.createElement(ZIndexContext.Provider, { value: currentZIndex },
|
|
225
225
|
React.createElement(React.Fragment, null,
|
|
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": (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),
|
|
227
227
|
icon ?
|
|
228
|
-
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)) }) :
|
|
229
229
|
iconClass ?
|
|
230
230
|
React.createElement("span", { role: "presentation", className: iconClass }) :
|
|
231
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>>;
|
|
@@ -60,10 +60,10 @@ export var FloatingActionButtonItem = React.forwardRef(function (props, ref) {
|
|
|
60
60
|
'k-disabled': disabled
|
|
61
61
|
}, className); }, [className, disabled, focused]);
|
|
62
62
|
var ItemComp = item;
|
|
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": (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 }) :
|
|
64
64
|
(React.createElement(React.Fragment, null,
|
|
65
65
|
text && React.createElement("span", { className: "k-fab-item-text" }, text),
|
|
66
|
-
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)) })))));
|
|
67
67
|
});
|
|
68
68
|
FloatingActionButtonItem.propTypes = {
|
|
69
69
|
className: PropTypes.string,
|
|
@@ -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);
|
|
@@ -17,8 +17,8 @@ export 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))))))));
|
|
@@ -179,7 +179,7 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
179
179
|
return (React.createElement("div", { id: id, style: style, className: classNames('k-dropdown-button', {
|
|
180
180
|
'k-focus': this.state.focused
|
|
181
181
|
}, this.props.className), onKeyDown: this.onKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, dir: dir, ref: function (el) { return _this.wrapper = el; } },
|
|
182
|
-
React.createElement(Button, { size: this.props.size, shape: this.props.shape, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, onClick: this.onClickMainButton, onMouseDown: this.mouseDown, disabled: disabled || undefined, tabIndex: tabIndex, accessKey: this.props.accessKey, icon: this.props.icon, iconClass: this.props.iconClass, className: this.props.buttonClass, imageUrl: this.props.imageUrl, dir: dir, ref: function (btn) { return _this.mainButton = btn && btn.element; }, type: "button", "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": this.opened, "aria-label": this.props.text
|
|
182
|
+
React.createElement(Button, { size: this.props.size, shape: this.props.shape, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, onClick: this.onClickMainButton, onMouseDown: this.mouseDown, disabled: disabled || undefined, tabIndex: tabIndex, accessKey: this.props.accessKey, icon: this.props.icon, iconClass: this.props.iconClass, className: this.props.buttonClass, imageUrl: this.props.imageUrl, dir: dir, ref: function (btn) { return _this.mainButton = btn && btn.element; }, type: "button", "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": this.opened, "aria-label": "".concat(this.props.text, " dropdownbutton"), "aria-owns": this.guid, "aria-activedescendant": focusedIndex >= 0 ? "".concat(this.guid, "-").concat(focusedIndex) : undefined }, this.props.text),
|
|
183
183
|
this.renderPopup(rtl)));
|
|
184
184
|
};
|
|
185
185
|
/**
|
|
@@ -223,14 +223,14 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
223
223
|
var _b = this.props.popupSettings, popupSettings = _b === void 0 ? {} : _b;
|
|
224
224
|
return (React.createElement(Popup, { anchor: this.wrapper, show: this.opened, animate: popupSettings.animate, popupClass: classNames('k-menu-popup', popupSettings.popupClass), anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl), popupAlign: popupSettings.popupAlign || getPopupAlign(rtl), style: rtl ? { direction: 'rtl' } : undefined },
|
|
225
225
|
React.createElement("ul", { role: "menu", id: this.guid, className: classNames('k-group k-menu-group k-reset', (_a = {},
|
|
226
|
-
_a["k-menu-group-"
|
|
226
|
+
_a["k-menu-group-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
227
227
|
_a)) }, this.renderChildItems())));
|
|
228
228
|
};
|
|
229
229
|
DropDownButton.prototype.renderChildItems = function () {
|
|
230
230
|
var _this = this;
|
|
231
231
|
var _a = this.props, item = _a.item, itemRender = _a.itemRender, textField = _a.textField;
|
|
232
232
|
return this.buttonsData.length > 0 ? (this.buttonsData.map(function (dataItem, index) {
|
|
233
|
-
return (React.createElement(ButtonItem, { className: "k-menu-item", dataItem: dataItem, textField: textField, focused: _this.state.focusedIndex === index, onClick: _this.onItemClick, onDown: _this.onItemDown, render: itemRender, item: item, index: index, key: index, id: _this.guid
|
|
233
|
+
return (React.createElement(ButtonItem, { className: "k-menu-item", dataItem: dataItem, textField: textField, focused: _this.state.focusedIndex === index, onClick: _this.onItemClick, onDown: _this.onItemDown, render: itemRender, item: item, index: index, key: index, id: "".concat(_this.guid, "-").concat(index) }));
|
|
234
234
|
})) : null;
|
|
235
235
|
};
|
|
236
236
|
DropDownButton.prototype.isItemDisabled = function (index) {
|
|
@@ -186,8 +186,8 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
186
186
|
var focusedIndex = this.state.focusedIndex;
|
|
187
187
|
return (React.createElement("div", { id: id, style: style, className: classNames('k-split-button', 'k-button-group', {
|
|
188
188
|
'k-focus': this.state.focused
|
|
189
|
-
}, "k-rounded-"
|
|
190
|
-
React.createElement(Button, { ref: function (el) { return _this.mainButton = el && el.element; }, type: "button", size: this.props.size, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, onClick: function (event) { return _this.onItemClick(event, -1); }, disabled: disabled || undefined, tabIndex: tabIndex, accessKey: this.props.accessKey, className: this.props.buttonClass, icon: this.props.icon, iconClass: this.props.iconClass, imageUrl: this.props.imageUrl, dir: dir, "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": this.opened, "aria-label": this.props.text
|
|
189
|
+
}, "k-rounded-".concat(kendoThemeMaps.roundedMap[this.props.rounded || 'medium']), this.props.className), onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, dir: dir, ref: function (el) { return _this.wrapper = el; } },
|
|
190
|
+
React.createElement(Button, { ref: function (el) { return _this.mainButton = el && el.element; }, type: "button", size: this.props.size, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, onClick: function (event) { return _this.onItemClick(event, -1); }, disabled: disabled || undefined, tabIndex: tabIndex, accessKey: this.props.accessKey, className: this.props.buttonClass, icon: this.props.icon, iconClass: this.props.iconClass, imageUrl: this.props.imageUrl, dir: dir, "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": this.opened, "aria-label": "".concat(this.props.text, " splitbutton"), "aria-owns": this.guid, "aria-activedescendant": focusedIndex >= 0 ? "".concat(this.guid, "-").concat(focusedIndex) : undefined }, this.props.text),
|
|
191
191
|
React.createElement(Button, { type: "button", size: this.props.size, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, icon: "arrow-s", className: "k-split-button-arrow", disabled: disabled || undefined, tabIndex: -1, onClick: this.onSplitPartClick, onMouseDown: this.onDownSplitPart, onPointerDown: this.onDownSplitPart, dir: dir, "aria-label": "menu toggling button" }),
|
|
192
192
|
this.renderPopup(rtl)));
|
|
193
193
|
};
|
|
@@ -228,14 +228,14 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
228
228
|
var _b = this.props.popupSettings, popupSettings = _b === void 0 ? {} : _b;
|
|
229
229
|
return (React.createElement(Popup, { anchor: this.wrapper, show: this.opened, animate: popupSettings.animate, popupClass: classNames('k-menu-popup', popupSettings.popupClass), anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl), popupAlign: popupSettings.popupAlign || getPopupAlign(rtl), style: rtl ? { direction: 'rtl' } : undefined },
|
|
230
230
|
React.createElement("ul", { role: "menu", id: this.guid, className: classNames('k-group k-menu-group k-reset', (_a = {},
|
|
231
|
-
_a["k-menu-group-"
|
|
231
|
+
_a["k-menu-group-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
232
232
|
_a)) }, this.renderChildItems())));
|
|
233
233
|
};
|
|
234
234
|
SplitButton.prototype.renderChildItems = function () {
|
|
235
235
|
var _this = this;
|
|
236
236
|
var _a = this.props, item = _a.item, itemRender = _a.itemRender, textField = _a.textField;
|
|
237
237
|
return this.buttonsData.length > 0 ? (this.buttonsData.map(function (dataItem, index) {
|
|
238
|
-
return (React.createElement(ButtonItem, { className: "k-menu-item", dataItem: dataItem, textField: textField, focused: _this.state.focusedIndex === index, onClick: _this.onItemClick, onDown: _this.onItemDown, render: itemRender, item: item, key: index, index: index, id: _this.guid
|
|
238
|
+
return (React.createElement(ButtonItem, { className: "k-menu-item", dataItem: dataItem, textField: textField, focused: _this.state.focusedIndex === index, onClick: _this.onItemClick, onDown: _this.onItemDown, render: itemRender, item: item, key: index, index: index, id: "".concat(_this.guid, "-").concat(index) }));
|
|
239
239
|
})) : null;
|
|
240
240
|
};
|
|
241
241
|
SplitButton.prototype.isItemDisabled = function (index) {
|
|
@@ -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: 1654508868,
|
|
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
|
};
|
|
@@ -105,7 +105,7 @@ export declare class Toolbar extends React.Component<ToolbarProps> {
|
|
|
105
105
|
style: PropTypes.Requireable<object>;
|
|
106
106
|
className: PropTypes.Requireable<string>;
|
|
107
107
|
onResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
108
|
-
buttons: PropTypes.Requireable<string[]>;
|
|
108
|
+
buttons: PropTypes.Requireable<(string | null)[]>;
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* @hidden
|
|
@@ -20,4 +20,4 @@ export interface ToolbarSpacerHandle {
|
|
|
20
20
|
* To specify an empty space, provide a ToolbarSpacer component
|
|
21
21
|
* ([see example]({% slug content_toolbar %})).
|
|
22
22
|
*/
|
|
23
|
-
export declare const ToolbarSpacer: React.
|
|
23
|
+
export declare const ToolbarSpacer: React.ForwardRefExoticComponent<ToolbarSpacerProps & React.RefAttributes<ToolbarSpacerHandle>>;
|
|
@@ -14,6 +14,7 @@ export var ToolbarSpacer = React.forwardRef(function (props, ref) {
|
|
|
14
14
|
var className = React.useMemo(function () { return classNames('k-spacer', props.className); }, [props.className]);
|
|
15
15
|
return (React.createElement("span", { ref: element, className: className }));
|
|
16
16
|
});
|
|
17
|
+
ToolbarSpacer.displayName = 'KendoReactToolbarSpacer';
|
|
17
18
|
ToolbarSpacer.propTypes = {
|
|
18
19
|
className: PropTypes.string
|
|
19
20
|
};
|
package/dist/es/util.d.ts
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @hidden
|
|
3
3
|
*/
|
|
4
4
|
export declare const toolbarButtons: string[];
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
5
8
|
declare const _default: {
|
|
6
9
|
styles: {
|
|
7
10
|
button: string;
|
|
@@ -21,7 +24,4 @@ declare const _default: {
|
|
|
21
24
|
rtl: string;
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
27
|
export default _default;
|
package/dist/npm/Button.d.ts
CHANGED
|
@@ -98,11 +98,11 @@ export declare 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
|
|
@@ -136,7 +136,7 @@ export declare class Button extends React.Component<ButtonProps, ButtonState> {
|
|
|
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/npm/Button.js
CHANGED
|
@@ -52,11 +52,11 @@ function iconElement(_a) {
|
|
|
52
52
|
return (React.createElement("img", { role: "presentation", className: 'k-button-icon', alt: imageAlt, src: imageUrl }));
|
|
53
53
|
}
|
|
54
54
|
else if (icon) {
|
|
55
|
-
var iconClasses = kendo_react_common_1.classNames('k-button-icon k-icon', 'k-i-' + icon);
|
|
55
|
+
var iconClasses = (0, kendo_react_common_1.classNames)('k-button-icon k-icon', 'k-i-' + icon);
|
|
56
56
|
return (React.createElement("span", { role: "presentation", className: iconClasses }));
|
|
57
57
|
}
|
|
58
58
|
else if (iconClass) {
|
|
59
|
-
return (React.createElement("span", { role: "presentation", className: kendo_react_common_1.classNames('k-button-icon', iconClass) }));
|
|
59
|
+
return (React.createElement("span", { role: "presentation", className: (0, kendo_react_common_1.classNames)('k-button-icon', iconClass) }));
|
|
60
60
|
}
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
@@ -71,7 +71,7 @@ var Button = /** @class */ (function (_super) {
|
|
|
71
71
|
_this.props.onClick.call(undefined, event);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
74
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
75
75
|
_this.state = { selected: _this.props.togglable === true && _this.props.selected === true };
|
|
76
76
|
return _this;
|
|
77
77
|
}
|
|
@@ -120,12 +120,12 @@ var Button = /** @class */ (function (_super) {
|
|
|
120
120
|
imageUrl: imageUrl,
|
|
121
121
|
imageAlt: imageAlt
|
|
122
122
|
});
|
|
123
|
-
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 = {},
|
|
124
|
-
_a["k-button-"
|
|
125
|
-
_a["k-button-"
|
|
126
|
-
_a["k-button-"
|
|
127
|
-
_a["k-button-"
|
|
128
|
-
_a["k-rounded-"
|
|
123
|
+
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: (0, kendo_react_common_1.classNames)('k-button', (_a = {},
|
|
124
|
+
_a["k-button-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
125
|
+
_a["k-button-".concat(shape)] = shape,
|
|
126
|
+
_a["k-button-".concat(fillMode)] = fillMode,
|
|
127
|
+
_a["k-button-".concat(fillMode, "-").concat(themeColor)] = Boolean(fillMode && themeColor),
|
|
128
|
+
_a["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
129
129
|
_a['k-icon-button'] = !hasChildren && hasIcon,
|
|
130
130
|
_a['k-disabled'] = this.props.disabled,
|
|
131
131
|
_a['k-selected'] = this.state.selected,
|
|
@@ -15,7 +15,7 @@ export declare class ButtonGroup extends React.Component<ButtonGroupProps, {}> {
|
|
|
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/npm/ButtonGroup.js
CHANGED
|
@@ -39,7 +39,7 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
39
39
|
function ButtonGroup(props) {
|
|
40
40
|
var _this = _super.call(this, props) || this;
|
|
41
41
|
_this._element = null;
|
|
42
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
42
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
43
43
|
return _this;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -49,13 +49,13 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
49
49
|
var _a;
|
|
50
50
|
var _this = this;
|
|
51
51
|
var buttons = this.mapButtons(this.props.children);
|
|
52
|
-
var groupClasses = kendo_react_common_1.classNames([styles['button-group']], (_a = {},
|
|
52
|
+
var groupClasses = (0, kendo_react_common_1.classNames)([styles['button-group']], (_a = {},
|
|
53
53
|
_a['k-disabled'] = this.props.disabled,
|
|
54
54
|
_a[styles['button-group-stretched']] = !!this.props.width,
|
|
55
55
|
_a), this.props.className);
|
|
56
56
|
var groupProps = {
|
|
57
57
|
className: groupClasses,
|
|
58
|
-
style: { 'width': ""
|
|
58
|
+
style: { 'width': "".concat(this.props.width) },
|
|
59
59
|
dir: this.props.dir,
|
|
60
60
|
// Accessibility properties
|
|
61
61
|
role: 'group',
|
|
@@ -78,7 +78,7 @@ var ButtonGroup = /** @class */ (function (_super) {
|
|
|
78
78
|
};
|
|
79
79
|
ButtonGroup.prototype.renderButton = function (child, index, isLast, isRtl) {
|
|
80
80
|
var _a;
|
|
81
|
-
var className = kendo_react_common_1.classNames(child.props.className, (_a = {},
|
|
81
|
+
var className = (0, kendo_react_common_1.classNames)(child.props.className, (_a = {},
|
|
82
82
|
_a[styles['group-start']] = isRtl ? isLast : index === 0,
|
|
83
83
|
_a[styles['group-end']] = isRtl ? index === 0 : isLast,
|
|
84
84
|
_a));
|
|
@@ -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/npm/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/npm/Chip/Chip.js
CHANGED
|
@@ -27,10 +27,10 @@ var kendo_react_common_3 = require("@progress/kendo-react-common");
|
|
|
27
27
|
*/
|
|
28
28
|
exports.Chip = React.forwardRef(function (props, ref) {
|
|
29
29
|
var _a;
|
|
30
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
30
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
31
31
|
var target = React.useRef(null);
|
|
32
32
|
var chipRef = React.useRef(null);
|
|
33
|
-
var dir = kendo_react_common_1.useDir(chipRef, props.dir);
|
|
33
|
+
var dir = (0, kendo_react_common_1.useDir)(chipRef, props.dir);
|
|
34
34
|
React.useImperativeHandle(target, function () { return ({
|
|
35
35
|
element: chipRef.current,
|
|
36
36
|
props: props
|
|
@@ -108,27 +108,27 @@ exports.Chip = React.forwardRef(function (props, ref) {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
}, [props.onBlur]);
|
|
111
|
-
var mouseProps = kendo_react_common_3.useMouse(props, target, { onClick: handleClick });
|
|
112
|
-
return (React.createElement("div", __assign({}, mouseProps, { role: props.role, id: props.value, style: props.style, ref: chipRef, dir: dir, tabIndex: kendo_react_common_1.getTabIndex(props.tabIndex, props.disabled, undefined), className: kendo_react_common_1.classNames('k-chip', (_a = {
|
|
111
|
+
var mouseProps = (0, kendo_react_common_3.useMouse)(props, target, { onClick: handleClick });
|
|
112
|
+
return (React.createElement("div", __assign({}, mouseProps, { role: props.role, id: props.value, style: props.style, ref: chipRef, dir: dir, tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled, undefined), className: (0, kendo_react_common_1.classNames)('k-chip', (_a = {
|
|
113
113
|
'k-rtl': dir === 'rtl',
|
|
114
114
|
'k-disabled': props.disabled,
|
|
115
115
|
'k-selected': selected,
|
|
116
116
|
'k-focus': focused
|
|
117
117
|
},
|
|
118
|
-
_a["k-chip-"
|
|
119
|
-
_a["k-rounded-"
|
|
120
|
-
_a["k-chip-"
|
|
121
|
-
_a["k-chip-"
|
|
118
|
+
_a["k-chip-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[props.size] || props.size)] = props.size,
|
|
119
|
+
_a["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[props.rounded] || props.rounded)] = props.rounded,
|
|
120
|
+
_a["k-chip-".concat(props.fillMode)] = props.fillMode,
|
|
121
|
+
_a["k-chip-".concat(props.fillMode, "-").concat(props.themeColor)] = Boolean(props.fillMode && props.themeColor),
|
|
122
122
|
_a), props.className), "aria-checked": selected, "aria-disabled": props.disabled, "aria-describedby": props.ariaDescribedBy, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }),
|
|
123
|
-
(selected && props.selectedIcon) && React.createElement("span", { className: kendo_react_common_1.classNames('k-chip-icon', 'k-icon', props.selectedIcon) }),
|
|
124
|
-
props.icon && React.createElement("span", { className: kendo_react_common_1.classNames('k-chip-icon', 'k-icon', props.icon) }),
|
|
123
|
+
(selected && props.selectedIcon) && React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-chip-icon', 'k-icon', props.selectedIcon) }),
|
|
124
|
+
props.icon && React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-chip-icon', 'k-icon', props.icon) }),
|
|
125
125
|
React.createElement("span", { className: 'k-chip-content' }, props.children !== undefined
|
|
126
126
|
? props.children
|
|
127
127
|
: props.text &&
|
|
128
128
|
React.createElement("span", { "aria-label": props.text, className: 'k-chip-label' }, props.text)),
|
|
129
129
|
props.removable && (React.createElement("span", { className: "k-chip-actions" },
|
|
130
130
|
React.createElement("span", { className: "k-chip-action" },
|
|
131
|
-
React.createElement("span", { className: kendo_react_common_1.classNames('k-chip-remove-action', 'k-icon', props.removeIcon), onClick: handleRemove }))))));
|
|
131
|
+
React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-chip-remove-action', 'k-icon', props.removeIcon), onClick: handleRemove }))))));
|
|
132
132
|
});
|
|
133
133
|
var propTypes = {
|
|
134
134
|
id: PropTypes.string,
|
|
@@ -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>>;
|