@progress/kendo-react-buttons 5.10.0-dev.202301092204 → 5.10.0-dev.202301111405

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.
Files changed (37) hide show
  1. package/dist/cdn/js/kendo-react-buttons.js +1 -1
  2. package/dist/es/Button.d.ts +5 -0
  3. package/dist/es/Button.js +8 -7
  4. package/dist/es/ButtonInterface.d.ts +2 -0
  5. package/dist/es/ButtonInterface.js +1 -0
  6. package/dist/es/Chip/Chip.d.ts +16 -3
  7. package/dist/es/Chip/Chip.js +10 -5
  8. package/dist/es/FloatingActionButton/FloatingActionButton.js +6 -5
  9. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +5 -0
  10. package/dist/es/ListButton/ButtonItem.js +2 -6
  11. package/dist/es/ListButton/DropDownButton.d.ts +5 -0
  12. package/dist/es/ListButton/DropDownButton.js +3 -2
  13. package/dist/es/ListButton/SplitButton.d.ts +5 -0
  14. package/dist/es/ListButton/SplitButton.js +5 -3
  15. package/dist/es/ListButton/models/ButtonItem.d.ts +5 -0
  16. package/dist/es/ListButton/models/ButtonItem.js +1 -0
  17. package/dist/es/ListButton/models/ListButtonProps.d.ts +9 -1
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/npm/Button.d.ts +5 -0
  20. package/dist/npm/Button.js +7 -6
  21. package/dist/npm/ButtonInterface.d.ts +2 -0
  22. package/dist/npm/ButtonInterface.js +1 -0
  23. package/dist/npm/Chip/Chip.d.ts +16 -3
  24. package/dist/npm/Chip/Chip.js +9 -4
  25. package/dist/npm/FloatingActionButton/FloatingActionButton.js +5 -4
  26. package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +5 -0
  27. package/dist/npm/ListButton/ButtonItem.js +1 -5
  28. package/dist/npm/ListButton/DropDownButton.d.ts +5 -0
  29. package/dist/npm/ListButton/DropDownButton.js +2 -1
  30. package/dist/npm/ListButton/SplitButton.d.ts +5 -0
  31. package/dist/npm/ListButton/SplitButton.js +4 -2
  32. package/dist/npm/ListButton/models/ButtonItem.d.ts +5 -0
  33. package/dist/npm/ListButton/models/ButtonItem.js +1 -0
  34. package/dist/npm/ListButton/models/ListButtonProps.d.ts +9 -1
  35. package/dist/npm/package-metadata.js +1 -1
  36. package/dist/systemjs/kendo-react-buttons.js +1 -1
  37. package/package.json +14 -13
@@ -84,6 +84,11 @@ export declare class Button extends React.Component<ButtonProps, ButtonState> {
84
84
  selected: PropTypes.Requireable<boolean>;
85
85
  togglable: PropTypes.Requireable<boolean>;
86
86
  icon: PropTypes.Requireable<string>;
87
+ svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
88
+ name: PropTypes.Validator<string>;
89
+ content: PropTypes.Validator<string>;
90
+ viewBox: PropTypes.Validator<string>;
91
+ }>>;
87
92
  iconClass: PropTypes.Requireable<string>;
88
93
  imageUrl: PropTypes.Requireable<string>;
89
94
  imageAlt: PropTypes.Requireable<string>;
package/dist/es/Button.js CHANGED
@@ -37,20 +37,19 @@ var __rest = (this && this.__rest) || function (s, e) {
37
37
  };
38
38
  import * as React from 'react';
39
39
  import * as PropTypes from 'prop-types';
40
- import { classNames, kendoThemeMaps } from '@progress/kendo-react-common';
40
+ import { classNames, kendoThemeMaps, IconWrap, svgIconPropType } from '@progress/kendo-react-common';
41
41
  import { validatePackage } from '@progress/kendo-react-common';
42
42
  import { packageMetadata } from './package-metadata';
43
43
  /**
44
44
  * @hidden
45
45
  */
46
46
  function iconElement(_a) {
47
- var imageUrl = _a.imageUrl, icon = _a.icon, iconClass = _a.iconClass, imageAlt = _a.imageAlt;
47
+ var imageUrl = _a.imageUrl, name = _a.name, iconClass = _a.iconClass, svgIcon = _a.svgIcon, imageAlt = _a.imageAlt;
48
48
  if (imageUrl) {
49
49
  return (React.createElement("img", { role: "presentation", className: 'k-button-icon', alt: imageAlt, src: imageUrl }));
50
50
  }
51
- else if (icon) {
52
- var iconClasses = classNames('k-button-icon k-icon', 'k-i-' + icon);
53
- return (React.createElement("span", { role: "presentation", className: iconClasses }));
51
+ else if (name || svgIcon) {
52
+ return React.createElement(IconWrap, { className: 'k-button-icon', name: name, icon: svgIcon });
54
53
  }
55
54
  else if (iconClass) {
56
55
  return (React.createElement("span", { role: "presentation", className: classNames('k-button-icon', iconClass) }));
@@ -108,11 +107,12 @@ var Button = /** @class */ (function (_super) {
108
107
  Button.prototype.render = function () {
109
108
  var _a;
110
109
  var _this = this;
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.rounded, rounded = _d === void 0 ? Button.defaultProps.rounded : _d, _e = _b.fillMode, fillMode = _e === void 0 ? Button.defaultProps.fillMode : _e, _f = _b.themeColor, themeColor = _f === void 0 ? Button.defaultProps.themeColor : _f, htmlAttributes = __rest(_b, ["children", "togglable", "icon", "iconClass", "imageUrl", "imageAlt", "className", "onClick", "size", "rounded", "fillMode", "themeColor"]);
110
+ var _b = this.props, children = _b.children, togglable = _b.togglable, icon = _b.icon, iconClass = _b.iconClass, svgIcon = _b.svgIcon, 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.rounded, rounded = _d === void 0 ? Button.defaultProps.rounded : _d, _e = _b.fillMode, fillMode = _e === void 0 ? Button.defaultProps.fillMode : _e, _f = _b.themeColor, themeColor = _f === void 0 ? Button.defaultProps.themeColor : _f, htmlAttributes = __rest(_b, ["children", "togglable", "icon", "iconClass", "svgIcon", "imageUrl", "imageAlt", "className", "onClick", "size", "rounded", "fillMode", "themeColor"]);
112
111
  var hasIcon = (icon !== undefined || iconClass !== undefined || imageUrl !== undefined);
113
112
  var hasChildren = children !== undefined;
114
113
  var iconEl = iconElement({
115
- icon: icon,
114
+ name: icon,
115
+ svgIcon: svgIcon,
116
116
  iconClass: iconClass,
117
117
  imageUrl: imageUrl,
118
118
  imageAlt: imageAlt
@@ -146,6 +146,7 @@ var Button = /** @class */ (function (_super) {
146
146
  selected: PropTypes.bool,
147
147
  togglable: PropTypes.bool,
148
148
  icon: PropTypes.string,
149
+ svgIcon: svgIconPropType,
149
150
  iconClass: PropTypes.string,
150
151
  imageUrl: PropTypes.string,
151
152
  imageAlt: PropTypes.string,
@@ -1,3 +1,4 @@
1
+ import { SVGIcon } from '@progress/kendo-react-common';
1
2
  /**
2
3
  * Inherits the native HTML Button. Represents the properties which can be set to a Button.
3
4
  */
@@ -18,6 +19,7 @@ export interface ButtonInterface {
18
19
  * Defines the name for an existing icon in a KendoReact theme ([see example]({% slug icons_button %})). The icon is rendered inside the Button by a `span.k-icon` element.
19
20
  */
20
21
  icon?: string;
22
+ svgIcon?: SVGIcon;
21
23
  /**
22
24
  * Defines a CSS class&mdash;or multiple classes separated by spaces&mdash;which are applied to a `span` element inside the Button ([see example]({% slug icons_button %})). Allows the usage of custom icons.
23
25
  */
@@ -1,2 +1,3 @@
1
+ /* eslint-disable max-len */
1
2
  export {};
2
3
  // tslint:enable:max-line-length
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from './../models/index';
3
4
  /**
4
5
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
@@ -41,21 +42,33 @@ export interface ChipProps {
41
42
  */
42
43
  removable?: boolean;
43
44
  /**
44
- * Determines if the Chip has custom `removeIcon`.
45
+ * Determines if the Chip has custom font `removeIcon`.
45
46
  */
46
47
  removeIcon?: string;
48
+ /**
49
+ * Determines if the Chip has custom SVG `removeIcon`.
50
+ */
51
+ removeSvgIcon?: SVGIcon;
47
52
  /**
48
53
  * Determines if the Chip is disabled.
49
54
  */
50
55
  disabled?: boolean;
51
56
  /**
52
- * Determines if the Chip has an `icon`.
57
+ * Determines if the Chip has a font `icon`.
53
58
  */
54
59
  icon?: string;
55
60
  /**
56
- * Determines if the Chip has custom selection `icon`.
61
+ * Determines if the Chip has an SVG `icon`.
62
+ */
63
+ svgIcon?: SVGIcon;
64
+ /**
65
+ * Determines if the Chip has custom selection font `icon`.
57
66
  */
58
67
  selectedIcon?: string;
68
+ /**
69
+ * Determines if the Chip has custom selection SVG `icon`.
70
+ */
71
+ selectedSvgIcon?: SVGIcon;
59
72
  /**
60
73
  * Triggered on Chip removing.
61
74
  */
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import * as React from 'react';
13
13
  import * as PropTypes from 'prop-types';
14
14
  import { ChipListSelectionContext, ChipListFocusContext, ChipListDataContext } from './ChipList';
15
- import { classNames, useDir, getTabIndex, Keys, kendoThemeMaps } from '@progress/kendo-react-common';
15
+ import { classNames, useDir, getTabIndex, Keys, IconWrap, kendoThemeMaps, toIconName, svgIconPropType } from '@progress/kendo-react-common';
16
16
  import { FOCUS_ACTION } from './focus-reducer';
17
17
  import { DATA_ACTION } from './data-reducer';
18
18
  import { SELECTION_ACTION } from './selection-reducer';
@@ -117,15 +117,17 @@ export var Chip = React.forwardRef(function (props, ref) {
117
117
  _a["k-chip-".concat(props.fillMode)] = props.fillMode,
118
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
- (selected && props.selectedIcon) && React.createElement("span", { className: classNames('k-chip-icon', 'k-icon', props.selectedIcon) }),
121
- props.icon && React.createElement("span", { className: classNames('k-chip-icon', 'k-icon', props.icon) }),
120
+ (selected && (props.selectedIcon || props.selectedSvgIcon)) &&
121
+ React.createElement(IconWrap, { className: 'k-chip-icon', name: props.selectedIcon ? toIconName(props.selectedIcon) : undefined, icon: props.selectedSvgIcon }),
122
+ (props.icon || props.svgIcon) &&
123
+ React.createElement(IconWrap, { className: 'k-chip-icon', name: props.icon ? toIconName(props.icon) : undefined, icon: props.svgIcon }),
122
124
  React.createElement("span", { className: 'k-chip-content' }, props.children !== undefined
123
125
  ? props.children
124
126
  : props.text &&
125
127
  React.createElement("span", { "aria-label": props.text, className: 'k-chip-label' }, props.text)),
126
128
  props.removable && (React.createElement("span", { className: "k-chip-actions" },
127
- React.createElement("span", { className: classNames('k-chip-action', 'k-chip-remove-action') },
128
- React.createElement("span", { className: classNames('k-icon', props.removeIcon), onClick: handleRemove }))))));
129
+ React.createElement("span", { className: classNames('k-chip-action', 'k-chip-remove-action'), onClick: handleRemove },
130
+ React.createElement(IconWrap, { name: props.removeIcon ? toIconName(props.removeIcon) : undefined, icon: props.removeSvgIcon }))))));
129
131
  });
130
132
  var propTypes = {
131
133
  id: PropTypes.string,
@@ -134,9 +136,12 @@ var propTypes = {
134
136
  dir: PropTypes.oneOf(['ltr', 'rtl']),
135
137
  removable: PropTypes.bool,
136
138
  removeIcon: PropTypes.string,
139
+ removeIconSvg: svgIconPropType,
137
140
  disabled: PropTypes.bool,
138
141
  icon: PropTypes.string,
142
+ svgIcon: svgIconPropType,
139
143
  selectedIcon: PropTypes.string,
144
+ selectedIconSvg: svgIconPropType,
140
145
  onRemove: PropTypes.func,
141
146
  dataItem: PropTypes.any,
142
147
  selected: PropTypes.bool,
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import * as React from 'react';
24
24
  import * as PropTypes from 'prop-types';
25
- import { kendoThemeMaps, useZIndexContext, validatePackage, ZIndexContext } from '@progress/kendo-react-common';
25
+ import { IconWrap, kendoThemeMaps, svgIconPropType, useZIndexContext, validatePackage, ZIndexContext } from '@progress/kendo-react-common';
26
26
  import { classNames, guid, useDir, dispatchEvent, Keys, getTabIndex } from '@progress/kendo-react-common';
27
27
  import { FloatingActionButtonItem } from './FloatingActionButtonItem';
28
28
  import { packageMetadata } from '../package-metadata';
@@ -47,7 +47,7 @@ var DEFAULT_FAB_ZINDEX = 100;
47
47
  */
48
48
  export var FloatingActionButton = React.forwardRef(function (props, ref) {
49
49
  validatePackage(packageMetadata);
50
- var _a = props.align, align = _a === void 0 ? defaultProps.align : _a, alignOffset = props.alignOffset, className = props.className, disabled = props.disabled, icon = props.icon, iconClass = props.iconClass, id = props.id, items = props.items, item = props.item, text = props.text, _b = props.positionMode, positionMode = _b === void 0 ? defaultProps.positionMode : _b, _c = props.size, size = _c === void 0 ? defaultProps.size : _c, style = props.style, _d = props.rounded, rounded = _d === void 0 ? defaultProps.rounded : _d, _e = props.themeColor, themeColor = _e === void 0 ? defaultProps.themeColor : _e, overlayStyle = props.overlayStyle, tabIndex = props.tabIndex, accessKey = props.accessKey, _f = props.popupSettings, popupSettings = _f === void 0 ? {} : _f, modal = props.modal, onClick = props.onClick, onItemClick = props.onItemClick, onFocus = props.onFocus, onBlur = props.onBlur, onKeyDown = props.onKeyDown, onOpen = props.onOpen, onClose = props.onClose, others = __rest(props, ["align", "alignOffset", "className", "disabled", "icon", "iconClass", "id", "items", "item", "text", "positionMode", "size", "style", "rounded", "themeColor", "overlayStyle", "tabIndex", "accessKey", "popupSettings", "modal", "onClick", "onItemClick", "onFocus", "onBlur", "onKeyDown", "onOpen", "onClose"]);
50
+ var _a = props.align, align = _a === void 0 ? defaultProps.align : _a, alignOffset = props.alignOffset, className = props.className, disabled = props.disabled, icon = props.icon, svgIcon = props.svgIcon, iconClass = props.iconClass, id = props.id, items = props.items, item = props.item, text = props.text, _b = props.positionMode, positionMode = _b === void 0 ? defaultProps.positionMode : _b, _c = props.size, size = _c === void 0 ? defaultProps.size : _c, style = props.style, _d = props.rounded, rounded = _d === void 0 ? defaultProps.rounded : _d, _e = props.themeColor, themeColor = _e === void 0 ? defaultProps.themeColor : _e, overlayStyle = props.overlayStyle, tabIndex = props.tabIndex, accessKey = props.accessKey, _f = props.popupSettings, popupSettings = _f === void 0 ? {} : _f, modal = props.modal, onClick = props.onClick, onItemClick = props.onItemClick, onFocus = props.onFocus, onBlur = props.onBlur, onKeyDown = props.onKeyDown, onOpen = props.onOpen, onClose = props.onClose, others = __rest(props, ["align", "alignOffset", "className", "disabled", "icon", "svgIcon", "iconClass", "id", "items", "item", "text", "positionMode", "size", "style", "rounded", "themeColor", "overlayStyle", "tabIndex", "accessKey", "popupSettings", "modal", "onClick", "onItemClick", "onFocus", "onBlur", "onKeyDown", "onOpen", "onClose"]);
51
51
  var zIndexContext = useZIndexContext();
52
52
  var currentZIndex = zIndexContext ? zIndexContext + ZINDEX_FAB_STEP : DEFAULT_FAB_ZINDEX;
53
53
  var target = React.useRef(null);
@@ -217,15 +217,15 @@ export var FloatingActionButton = React.forwardRef(function (props, ref) {
217
217
  var fabItems = (items && (items.map(function (element, index) {
218
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
- var isIconFab = icon && !text;
220
+ var isIconFab = Boolean((icon || svgIcon) && !text);
221
221
  var fabWidth = elementRef.current ? elementRef.current.offsetWidth : 0;
222
222
  var iconWidth = 32;
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
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
- icon ?
228
- React.createElement("span", { role: "presentation", className: classNames("k-fab-icon k-icon k-i-".concat(icon)) }) :
227
+ (icon || svgIcon) ?
228
+ React.createElement(IconWrap, { className: "k-fab-icon", name: icon, icon: svgIcon }) :
229
229
  iconClass ?
230
230
  React.createElement("span", { role: "presentation", className: iconClass }) :
231
231
  null,
@@ -249,6 +249,7 @@ FloatingActionButton.propTypes = {
249
249
  accessKey: PropTypes.string,
250
250
  disabled: PropTypes.bool,
251
251
  icon: PropTypes.string,
252
+ svgIcon: svgIconPropType,
252
253
  iconClass: PropTypes.string,
253
254
  text: PropTypes.string,
254
255
  alignOffset: PropTypes.shape({
@@ -8,6 +8,7 @@ import { FloatingActionButtonPositionMode } from '../models/position-mode';
8
8
  import { FloatingActionButtonSize } from '../models/size';
9
9
  import { FloatingActionButtonThemeColor } from '../models/theme-color';
10
10
  import { FloatingActionButtonRounded } from '../models/rounded';
11
+ import { SVGIcon } from '@progress/kendo-react-common';
11
12
  /**
12
13
  * @hidden
13
14
  */
@@ -40,6 +41,10 @@ export interface FloatingActionButtonProps extends Omit<React.ButtonHTMLAttribut
40
41
  * Defines the icon rendered in the Floating Action Button [see example]({% slug contenttypes_floatingactionbutton %}).
41
42
  */
42
43
  icon?: string;
44
+ /**
45
+ * Defines the SVG icon rendered in the Floating Action Button [see example]({% slug contenttypes_floatingactionbutton %}).
46
+ */
47
+ svgIcon?: SVGIcon;
43
48
  /**
44
49
  * Defines a CSS class or multiple classes separated by spaces which are applied
45
50
  * to a `span` element inside the Floating Action Button. Allows the usage of custom icons.
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
- import { classNames } from '@progress/kendo-react-common';
2
+ import { classNames, IconWrap } from '@progress/kendo-react-common';
3
3
  /**
4
4
  * @hidden
5
5
  */
6
6
  export var ButtonItem = function (props) {
7
- var _a;
8
7
  var handleClick = React.useCallback(function (event) {
9
8
  props.onClick(event, props.index);
10
9
  }, [props]);
@@ -16,10 +15,7 @@ export var ButtonItem = function (props) {
16
15
  }), key: "icon" }, As
17
16
  ? (React.createElement(As, { item: props.dataItem, itemIndex: props.index }))
18
17
  : (React.createElement(React.Fragment, null,
19
- (props.dataItem.icon || props.dataItem.iconClass) && (React.createElement("span", { className: classNames('k-icon', (_a = {},
20
- _a["k-i-".concat(props.dataItem.icon)] = props.dataItem.icon,
21
- _a["".concat(props.dataItem.iconClass)] = props.dataItem.iconClass,
22
- _a)) })),
18
+ (props.dataItem.icon || props.dataItem.iconClass) && (React.createElement(IconWrap, { className: props.dataItem.iconClass, name: props.dataItem.icon, icon: props.dataItem.svgIcon })),
23
19
  (props.dataItem.imageUrl) && (React.createElement("img", { role: "presentation", alt: "", src: props.dataItem.imageUrl, className: 'k-icon' })),
24
20
  (text) && (React.createElement("span", { className: "k-menu-link-text" }, text))))))));
25
21
  return ((props.item !== undefined && /* to be removed in 5.0.0 */
@@ -46,6 +46,11 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
46
46
  tabIndex: PropTypes.Requireable<number>;
47
47
  disabled: PropTypes.Requireable<boolean>;
48
48
  icon: PropTypes.Requireable<string>;
49
+ svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
50
+ name: PropTypes.Validator<string>;
51
+ content: PropTypes.Validator<string>;
52
+ viewBox: PropTypes.Validator<string>;
53
+ }>>;
49
54
  iconClass: PropTypes.Requireable<string>;
50
55
  imageUrl: PropTypes.Requireable<string>;
51
56
  popupSettings: PropTypes.Requireable<object>;
@@ -27,7 +27,7 @@ var __assign = (this && this.__assign) || function () {
27
27
  import * as React from 'react';
28
28
  import * as PropTypes from 'prop-types';
29
29
  import { Button } from './../main';
30
- import { classNames, guid, Keys, kendoThemeMaps } from '@progress/kendo-react-common';
30
+ import { classNames, guid, Keys, kendoThemeMaps, svgIconPropType } from '@progress/kendo-react-common';
31
31
  import { dispatchEvent } from '@progress/kendo-react-common';
32
32
  import { navigate as navigation } from './utils/navigation';
33
33
  import { DropDownButtonItem } from './DropDownButtonItem';
@@ -215,7 +215,7 @@ var DropDownButton = /** @class */ (function (_super) {
215
215
  return (React.createElement("div", { id: id, style: style, className: classNames('k-dropdown-button', {
216
216
  'k-focus': this.state.focused
217
217
  }, this.props.className), onKeyDown: this.onKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, dir: dir, ref: function (el) { return _this.wrapper = el; } },
218
- React.createElement(Button, { size: this.props.size, 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-haspopup": true, "aria-expanded": this.opened || undefined, "aria-label": this.props.ariaLabel, "aria-controls": this.opened ? this.guid : undefined, id: 'button-' + this.guid, title: this.props.title }, this.props.text),
218
+ React.createElement(Button, { size: this.props.size, 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, svgIcon: this.props.svgIcon, 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-haspopup": true, "aria-expanded": this.opened || undefined, "aria-label": this.props.ariaLabel, "aria-controls": this.opened ? this.guid : undefined, id: 'button-' + this.guid, title: this.props.title }, this.props.text),
219
219
  this.renderPopup(rtl)));
220
220
  };
221
221
  /**
@@ -285,6 +285,7 @@ var DropDownButton = /** @class */ (function (_super) {
285
285
  tabIndex: PropTypes.number,
286
286
  disabled: PropTypes.bool,
287
287
  icon: PropTypes.string,
288
+ svgIcon: svgIconPropType,
288
289
  iconClass: PropTypes.string,
289
290
  imageUrl: PropTypes.string,
290
291
  popupSettings: PropTypes.object,
@@ -48,6 +48,11 @@ export declare class SplitButton extends React.Component<SplitButtonProps, Split
48
48
  tabIndex: PropTypes.Requireable<number>;
49
49
  disabled: PropTypes.Requireable<boolean>;
50
50
  icon: PropTypes.Requireable<string>;
51
+ svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
52
+ name: PropTypes.Validator<string>;
53
+ content: PropTypes.Validator<string>;
54
+ viewBox: PropTypes.Validator<string>;
55
+ }>>;
51
56
  iconClass: PropTypes.Requireable<string>;
52
57
  imageUrl: PropTypes.Requireable<string>;
53
58
  popupSettings: PropTypes.Requireable<object>;
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  import * as React from 'react';
17
17
  import * as PropTypes from 'prop-types';
18
18
  import { Button } from './../main';
19
- import { classNames, guid, kendoThemeMaps, Keys } from '@progress/kendo-react-common';
19
+ import { classNames, guid, kendoThemeMaps, Keys, svgIconPropType } from '@progress/kendo-react-common';
20
20
  import { dispatchEvent } from '@progress/kendo-react-common';
21
21
  import { ButtonItem } from './ButtonItem';
22
22
  import { SplitButtonItem } from './SplitButtonItem';
@@ -25,6 +25,7 @@ import { Popup } from '@progress/kendo-react-popup';
25
25
  import { getAnchorAlign, getPopupAlign } from './utils/popup';
26
26
  import { validatePackage } from '@progress/kendo-react-common';
27
27
  import { packageMetadata } from '../package-metadata';
28
+ import { caretAltDownIcon } from '@progress/kendo-svg-icons';
28
29
  /**
29
30
  * Represents the [KendoReact SplitButton component]({% slug overview_splitbutton %}).
30
31
  *
@@ -220,8 +221,8 @@ var SplitButton = /** @class */ (function (_super) {
220
221
  return (React.createElement("div", { id: id, style: style, className: classNames('k-split-button', 'k-button-group', {
221
222
  'k-focus': this.state.focused
222
223
  }, "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; } },
223
- 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 || undefined, "aria-label": this.props.ariaLabel, "aria-controls": this.opened ? this.guid : undefined, id: 'button-' + this.guid, title: this.props.title }, this.props.text),
224
- React.createElement(Button, { type: "button", size: this.props.size, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, icon: "caret-alt-down", 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" }),
224
+ 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, svgIcon: this.props.svgIcon, iconClass: this.props.iconClass, imageUrl: this.props.imageUrl, dir: dir, "aria-disabled": disabled, "aria-haspopup": true, "aria-expanded": this.opened || undefined, "aria-label": this.props.ariaLabel, "aria-controls": this.opened ? this.guid : undefined, id: 'button-' + this.guid, title: this.props.title }, this.props.text),
225
+ React.createElement(Button, { type: "button", size: this.props.size, rounded: this.props.rounded, fillMode: this.props.fillMode, themeColor: this.props.themeColor, icon: "caret-alt-down", svgIcon: caretAltDownIcon, 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" }),
225
226
  this.renderPopup(rtl)));
226
227
  };
227
228
  /**
@@ -298,6 +299,7 @@ var SplitButton = /** @class */ (function (_super) {
298
299
  tabIndex: PropTypes.number,
299
300
  disabled: PropTypes.bool,
300
301
  icon: PropTypes.string,
302
+ svgIcon: svgIconPropType,
301
303
  iconClass: PropTypes.string,
302
304
  imageUrl: PropTypes.string,
303
305
  popupSettings: PropTypes.object,
@@ -1,3 +1,4 @@
1
+ import { SVGIcon } from '@progress/kendo-react-common';
1
2
  /**
2
3
  * The interface for describing items that can be passed to the `items` property of the SplitButton or the DropDownButton as an alternative to passing them as children.
3
4
  */
@@ -10,6 +11,10 @@ export interface ButtonItem {
10
11
  * Defines an icon that will be rendered next to the item text.
11
12
  */
12
13
  icon?: string;
14
+ /**
15
+ * Defines an SVG icon that will be rendered next to the item text.
16
+ */
17
+ svgIcon?: SVGIcon;
13
18
  /**
14
19
  * Defines an icon with a custom CSS class that will be rendered next to the item text.
15
20
  */
@@ -1,2 +1,3 @@
1
+ /* eslint-disable max-len */
1
2
  export {};
2
3
  // tslint:enable:max-line-length
@@ -2,7 +2,7 @@
2
2
  import { ButtonsPopupSettings } from './PopupSettings';
3
3
  import { SplitButtonClickEvent, SplitButtonItemClickEvent, SplitButtonFocusEvent, SplitButtonBlurEvent, SplitButtonOpenEvent, SplitButtonCloseEvent, DropDownButtonItemClickEvent, DropDownButtonFocusEvent, DropDownButtonBlurEvent, DropDownButtonOpenEvent, DropDownButtonCloseEvent } from './events';
4
4
  import { ButtonItemProps } from '../ButtonItem';
5
- import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
5
+ import { KendoReactComponentBaseProps, SVGIcon } from '@progress/kendo-react-common';
6
6
  export interface DropDownButtonProps extends KendoReactComponentBaseProps {
7
7
  /**
8
8
  * Specifies the `accessKey` of the main button.
@@ -44,6 +44,10 @@ export interface DropDownButtonProps extends KendoReactComponentBaseProps {
44
44
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
45
45
  */
46
46
  icon?: string;
47
+ /**
48
+ * Defines a SVG icon that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
49
+ */
50
+ svgIcon?: SVGIcon;
47
51
  /**
48
52
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
49
53
  */
@@ -199,6 +203,10 @@ export interface SplitButtonProps extends KendoReactComponentBaseProps {
199
203
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
200
204
  */
201
205
  icon?: string;
206
+ /**
207
+ * Defines a SVG icon that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
208
+ */
209
+ svgIcon?: SVGIcon;
202
210
  /**
203
211
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
204
212
  */
@@ -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: 1673300411,
8
+ publishDate: 1673444453,
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
  };
@@ -84,6 +84,11 @@ export declare class Button extends React.Component<ButtonProps, ButtonState> {
84
84
  selected: PropTypes.Requireable<boolean>;
85
85
  togglable: PropTypes.Requireable<boolean>;
86
86
  icon: PropTypes.Requireable<string>;
87
+ svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
88
+ name: PropTypes.Validator<string>;
89
+ content: PropTypes.Validator<string>;
90
+ viewBox: PropTypes.Validator<string>;
91
+ }>>;
87
92
  iconClass: PropTypes.Requireable<string>;
88
93
  imageUrl: PropTypes.Requireable<string>;
89
94
  imageAlt: PropTypes.Requireable<string>;
@@ -47,13 +47,12 @@ var package_metadata_1 = require("./package-metadata");
47
47
  * @hidden
48
48
  */
49
49
  function iconElement(_a) {
50
- var imageUrl = _a.imageUrl, icon = _a.icon, iconClass = _a.iconClass, imageAlt = _a.imageAlt;
50
+ var imageUrl = _a.imageUrl, name = _a.name, iconClass = _a.iconClass, svgIcon = _a.svgIcon, imageAlt = _a.imageAlt;
51
51
  if (imageUrl) {
52
52
  return (React.createElement("img", { role: "presentation", className: 'k-button-icon', alt: imageAlt, src: imageUrl }));
53
53
  }
54
- else if (icon) {
55
- var iconClasses = (0, kendo_react_common_1.classNames)('k-button-icon k-icon', 'k-i-' + icon);
56
- return (React.createElement("span", { role: "presentation", className: iconClasses }));
54
+ else if (name || svgIcon) {
55
+ return React.createElement(kendo_react_common_1.IconWrap, { className: 'k-button-icon', name: name, icon: svgIcon });
57
56
  }
58
57
  else if (iconClass) {
59
58
  return (React.createElement("span", { role: "presentation", className: (0, kendo_react_common_1.classNames)('k-button-icon', iconClass) }));
@@ -111,11 +110,12 @@ var Button = /** @class */ (function (_super) {
111
110
  Button.prototype.render = function () {
112
111
  var _a;
113
112
  var _this = this;
114
- 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.rounded, rounded = _d === void 0 ? Button.defaultProps.rounded : _d, _e = _b.fillMode, fillMode = _e === void 0 ? Button.defaultProps.fillMode : _e, _f = _b.themeColor, themeColor = _f === void 0 ? Button.defaultProps.themeColor : _f, htmlAttributes = __rest(_b, ["children", "togglable", "icon", "iconClass", "imageUrl", "imageAlt", "className", "onClick", "size", "rounded", "fillMode", "themeColor"]);
113
+ var _b = this.props, children = _b.children, togglable = _b.togglable, icon = _b.icon, iconClass = _b.iconClass, svgIcon = _b.svgIcon, 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.rounded, rounded = _d === void 0 ? Button.defaultProps.rounded : _d, _e = _b.fillMode, fillMode = _e === void 0 ? Button.defaultProps.fillMode : _e, _f = _b.themeColor, themeColor = _f === void 0 ? Button.defaultProps.themeColor : _f, htmlAttributes = __rest(_b, ["children", "togglable", "icon", "iconClass", "svgIcon", "imageUrl", "imageAlt", "className", "onClick", "size", "rounded", "fillMode", "themeColor"]);
115
114
  var hasIcon = (icon !== undefined || iconClass !== undefined || imageUrl !== undefined);
116
115
  var hasChildren = children !== undefined;
117
116
  var iconEl = iconElement({
118
- icon: icon,
117
+ name: icon,
118
+ svgIcon: svgIcon,
119
119
  iconClass: iconClass,
120
120
  imageUrl: imageUrl,
121
121
  imageAlt: imageAlt
@@ -149,6 +149,7 @@ var Button = /** @class */ (function (_super) {
149
149
  selected: PropTypes.bool,
150
150
  togglable: PropTypes.bool,
151
151
  icon: PropTypes.string,
152
+ svgIcon: kendo_react_common_1.svgIconPropType,
152
153
  iconClass: PropTypes.string,
153
154
  imageUrl: PropTypes.string,
154
155
  imageAlt: PropTypes.string,
@@ -1,3 +1,4 @@
1
+ import { SVGIcon } from '@progress/kendo-react-common';
1
2
  /**
2
3
  * Inherits the native HTML Button. Represents the properties which can be set to a Button.
3
4
  */
@@ -18,6 +19,7 @@ export interface ButtonInterface {
18
19
  * Defines the name for an existing icon in a KendoReact theme ([see example]({% slug icons_button %})). The icon is rendered inside the Button by a `span.k-icon` element.
19
20
  */
20
21
  icon?: string;
22
+ svgIcon?: SVGIcon;
21
23
  /**
22
24
  * Defines a CSS class&mdash;or multiple classes separated by spaces&mdash;which are applied to a `span` element inside the Button ([see example]({% slug icons_button %})). Allows the usage of custom icons.
23
25
  */
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ /* eslint-disable max-len */
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  // tslint:enable:max-line-length
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from './../models/index';
3
4
  /**
4
5
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
@@ -41,21 +42,33 @@ export interface ChipProps {
41
42
  */
42
43
  removable?: boolean;
43
44
  /**
44
- * Determines if the Chip has custom `removeIcon`.
45
+ * Determines if the Chip has custom font `removeIcon`.
45
46
  */
46
47
  removeIcon?: string;
48
+ /**
49
+ * Determines if the Chip has custom SVG `removeIcon`.
50
+ */
51
+ removeSvgIcon?: SVGIcon;
47
52
  /**
48
53
  * Determines if the Chip is disabled.
49
54
  */
50
55
  disabled?: boolean;
51
56
  /**
52
- * Determines if the Chip has an `icon`.
57
+ * Determines if the Chip has a font `icon`.
53
58
  */
54
59
  icon?: string;
55
60
  /**
56
- * Determines if the Chip has custom selection `icon`.
61
+ * Determines if the Chip has an SVG `icon`.
62
+ */
63
+ svgIcon?: SVGIcon;
64
+ /**
65
+ * Determines if the Chip has custom selection font `icon`.
57
66
  */
58
67
  selectedIcon?: string;
68
+ /**
69
+ * Determines if the Chip has custom selection SVG `icon`.
70
+ */
71
+ selectedSvgIcon?: SVGIcon;
59
72
  /**
60
73
  * Triggered on Chip removing.
61
74
  */
@@ -120,15 +120,17 @@ exports.Chip = React.forwardRef(function (props, ref) {
120
120
  _a["k-chip-".concat(props.fillMode)] = props.fillMode,
121
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: (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) }),
123
+ (selected && (props.selectedIcon || props.selectedSvgIcon)) &&
124
+ React.createElement(kendo_react_common_1.IconWrap, { className: 'k-chip-icon', name: props.selectedIcon ? (0, kendo_react_common_1.toIconName)(props.selectedIcon) : undefined, icon: props.selectedSvgIcon }),
125
+ (props.icon || props.svgIcon) &&
126
+ React.createElement(kendo_react_common_1.IconWrap, { className: 'k-chip-icon', name: props.icon ? (0, kendo_react_common_1.toIconName)(props.icon) : undefined, icon: props.svgIcon }),
125
127
  React.createElement("span", { className: 'k-chip-content' }, props.children !== undefined
126
128
  ? props.children
127
129
  : props.text &&
128
130
  React.createElement("span", { "aria-label": props.text, className: 'k-chip-label' }, props.text)),
129
131
  props.removable && (React.createElement("span", { className: "k-chip-actions" },
130
- React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-chip-action', 'k-chip-remove-action') },
131
- React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-icon', props.removeIcon), onClick: handleRemove }))))));
132
+ React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-chip-action', 'k-chip-remove-action'), onClick: handleRemove },
133
+ React.createElement(kendo_react_common_1.IconWrap, { name: props.removeIcon ? (0, kendo_react_common_1.toIconName)(props.removeIcon) : undefined, icon: props.removeSvgIcon }))))));
132
134
  });
133
135
  var propTypes = {
134
136
  id: PropTypes.string,
@@ -137,9 +139,12 @@ var propTypes = {
137
139
  dir: PropTypes.oneOf(['ltr', 'rtl']),
138
140
  removable: PropTypes.bool,
139
141
  removeIcon: PropTypes.string,
142
+ removeIconSvg: kendo_react_common_1.svgIconPropType,
140
143
  disabled: PropTypes.bool,
141
144
  icon: PropTypes.string,
145
+ svgIcon: kendo_react_common_1.svgIconPropType,
142
146
  selectedIcon: PropTypes.string,
147
+ selectedIconSvg: kendo_react_common_1.svgIconPropType,
143
148
  onRemove: PropTypes.func,
144
149
  dataItem: PropTypes.any,
145
150
  selected: PropTypes.bool,
@@ -50,7 +50,7 @@ var DEFAULT_FAB_ZINDEX = 100;
50
50
  */
51
51
  exports.FloatingActionButton = React.forwardRef(function (props, ref) {
52
52
  (0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
53
- var _a = props.align, align = _a === void 0 ? defaultProps.align : _a, alignOffset = props.alignOffset, className = props.className, disabled = props.disabled, icon = props.icon, iconClass = props.iconClass, id = props.id, items = props.items, item = props.item, text = props.text, _b = props.positionMode, positionMode = _b === void 0 ? defaultProps.positionMode : _b, _c = props.size, size = _c === void 0 ? defaultProps.size : _c, style = props.style, _d = props.rounded, rounded = _d === void 0 ? defaultProps.rounded : _d, _e = props.themeColor, themeColor = _e === void 0 ? defaultProps.themeColor : _e, overlayStyle = props.overlayStyle, tabIndex = props.tabIndex, accessKey = props.accessKey, _f = props.popupSettings, popupSettings = _f === void 0 ? {} : _f, modal = props.modal, onClick = props.onClick, onItemClick = props.onItemClick, onFocus = props.onFocus, onBlur = props.onBlur, onKeyDown = props.onKeyDown, onOpen = props.onOpen, onClose = props.onClose, others = __rest(props, ["align", "alignOffset", "className", "disabled", "icon", "iconClass", "id", "items", "item", "text", "positionMode", "size", "style", "rounded", "themeColor", "overlayStyle", "tabIndex", "accessKey", "popupSettings", "modal", "onClick", "onItemClick", "onFocus", "onBlur", "onKeyDown", "onOpen", "onClose"]);
53
+ var _a = props.align, align = _a === void 0 ? defaultProps.align : _a, alignOffset = props.alignOffset, className = props.className, disabled = props.disabled, icon = props.icon, svgIcon = props.svgIcon, iconClass = props.iconClass, id = props.id, items = props.items, item = props.item, text = props.text, _b = props.positionMode, positionMode = _b === void 0 ? defaultProps.positionMode : _b, _c = props.size, size = _c === void 0 ? defaultProps.size : _c, style = props.style, _d = props.rounded, rounded = _d === void 0 ? defaultProps.rounded : _d, _e = props.themeColor, themeColor = _e === void 0 ? defaultProps.themeColor : _e, overlayStyle = props.overlayStyle, tabIndex = props.tabIndex, accessKey = props.accessKey, _f = props.popupSettings, popupSettings = _f === void 0 ? {} : _f, modal = props.modal, onClick = props.onClick, onItemClick = props.onItemClick, onFocus = props.onFocus, onBlur = props.onBlur, onKeyDown = props.onKeyDown, onOpen = props.onOpen, onClose = props.onClose, others = __rest(props, ["align", "alignOffset", "className", "disabled", "icon", "svgIcon", "iconClass", "id", "items", "item", "text", "positionMode", "size", "style", "rounded", "themeColor", "overlayStyle", "tabIndex", "accessKey", "popupSettings", "modal", "onClick", "onItemClick", "onFocus", "onBlur", "onKeyDown", "onOpen", "onClose"]);
54
54
  var zIndexContext = (0, kendo_react_common_1.useZIndexContext)();
55
55
  var currentZIndex = zIndexContext ? zIndexContext + ZINDEX_FAB_STEP : DEFAULT_FAB_ZINDEX;
56
56
  var target = React.useRef(null);
@@ -220,15 +220,15 @@ exports.FloatingActionButton = React.forwardRef(function (props, ref) {
220
220
  var fabItems = (items && (items.map(function (element, index) {
221
221
  return (React.createElement(FloatingActionButtonItem_1.FloatingActionButtonItem, __assign({}, element, { key: index, index: index, id: "".concat(listId, "-").concat(index), disabled: disabled || element.disabled, focused: focusedIndex === index, dataItem: element, item: item, className: (0, kendo_react_common_2.classNames)(element.className, (0, utils_1.getTextDirectionClass)(dir || 'ltr', align.horizontal)), onClick: handleItemClick, onDown: handleItemDown })));
222
222
  })));
223
- var isIconFab = icon && !text;
223
+ var isIconFab = Boolean((icon || svgIcon) && !text);
224
224
  var fabWidth = elementRef.current ? elementRef.current.offsetWidth : 0;
225
225
  var iconWidth = 32;
226
226
  var spacing = (fabWidth / 2) - (iconWidth / 2);
227
227
  return (React.createElement(kendo_react_common_1.ZIndexContext.Provider, { value: currentZIndex },
228
228
  React.createElement(React.Fragment, null,
229
229
  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: (0, kendo_react_common_2.getTabIndex)(tabIndex, disabled), accessKey: accessKey, dir: dir, disabled: disabled, className: buttonClassNames, style: style, onClick: handleClick, onMouseDown: handleMouseDown, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }, others),
230
- icon ?
231
- React.createElement("span", { role: "presentation", className: (0, kendo_react_common_2.classNames)("k-fab-icon k-icon k-i-".concat(icon)) }) :
230
+ (icon || svgIcon) ?
231
+ React.createElement(kendo_react_common_1.IconWrap, { className: "k-fab-icon", name: icon, icon: svgIcon }) :
232
232
  iconClass ?
233
233
  React.createElement("span", { role: "presentation", className: iconClass }) :
234
234
  null,
@@ -252,6 +252,7 @@ exports.FloatingActionButton.propTypes = {
252
252
  accessKey: PropTypes.string,
253
253
  disabled: PropTypes.bool,
254
254
  icon: PropTypes.string,
255
+ svgIcon: kendo_react_common_1.svgIconPropType,
255
256
  iconClass: PropTypes.string,
256
257
  text: PropTypes.string,
257
258
  alignOffset: PropTypes.shape({