@progress/kendo-react-layout 5.10.0-dev.202301092204 → 5.10.0-dev.202301111905

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 (49) hide show
  1. package/dist/cdn/js/kendo-react-layout.js +1 -1
  2. package/dist/es/bottomnavigation/BottomNavigationItem.js +4 -3
  3. package/dist/es/bottomnavigation/BottomNavigationItemProps.d.ts +7 -1
  4. package/dist/es/breadcrumb/BreadcrumbDelimiter.js +3 -2
  5. package/dist/es/drawer/DrawerItem.js +4 -3
  6. package/dist/es/drawer/interfaces/DrawerItemProps.d.ts +5 -0
  7. package/dist/es/expansionpanel/ExpansionPanel.js +7 -4
  8. package/dist/es/expansionpanel/interfaces.d.ts +9 -1
  9. package/dist/es/menu/components/MenuItemArrow.d.ts +1 -1
  10. package/dist/es/menu/components/MenuItemArrow.js +19 -7
  11. package/dist/es/menu/components/MenuItemInternal.js +4 -3
  12. package/dist/es/menu/models/BaseMenuItem.d.ts +5 -0
  13. package/dist/es/menu/models/BaseMenuItem.js +1 -0
  14. package/dist/es/menu/utils/prepareInputItemsForInternalWork.js +4 -1
  15. package/dist/es/package-metadata.js +1 -1
  16. package/dist/es/panelbar/PanelBarItem.d.ts +8 -0
  17. package/dist/es/panelbar/PanelBarItem.js +10 -6
  18. package/dist/es/panelbar/interfaces/PanelBarItemProps.d.ts +4 -0
  19. package/dist/es/splitter/SplitterBar.js +20 -3
  20. package/dist/es/stepper/Step.js +8 -9
  21. package/dist/es/stepper/Stepper.js +6 -2
  22. package/dist/es/stepper/context/StepperContext.d.ts +3 -0
  23. package/dist/es/stepper/interfaces/StepProps.d.ts +7 -0
  24. package/dist/es/stepper/interfaces/StepperProps.d.ts +9 -0
  25. package/dist/npm/bottomnavigation/BottomNavigationItem.js +3 -2
  26. package/dist/npm/bottomnavigation/BottomNavigationItemProps.d.ts +7 -1
  27. package/dist/npm/breadcrumb/BreadcrumbDelimiter.js +2 -1
  28. package/dist/npm/drawer/DrawerItem.js +3 -2
  29. package/dist/npm/drawer/interfaces/DrawerItemProps.d.ts +5 -0
  30. package/dist/npm/expansionpanel/ExpansionPanel.js +6 -3
  31. package/dist/npm/expansionpanel/interfaces.d.ts +9 -1
  32. package/dist/npm/menu/components/MenuItemArrow.d.ts +1 -1
  33. package/dist/npm/menu/components/MenuItemArrow.js +18 -6
  34. package/dist/npm/menu/components/MenuItemInternal.js +3 -2
  35. package/dist/npm/menu/models/BaseMenuItem.d.ts +5 -0
  36. package/dist/npm/menu/models/BaseMenuItem.js +1 -0
  37. package/dist/npm/menu/utils/prepareInputItemsForInternalWork.js +4 -1
  38. package/dist/npm/package-metadata.js +1 -1
  39. package/dist/npm/panelbar/PanelBarItem.d.ts +8 -0
  40. package/dist/npm/panelbar/PanelBarItem.js +9 -5
  41. package/dist/npm/panelbar/interfaces/PanelBarItemProps.d.ts +4 -0
  42. package/dist/npm/splitter/SplitterBar.js +19 -2
  43. package/dist/npm/stepper/Step.js +7 -8
  44. package/dist/npm/stepper/Stepper.js +5 -1
  45. package/dist/npm/stepper/context/StepperContext.d.ts +3 -0
  46. package/dist/npm/stepper/interfaces/StepProps.d.ts +7 -0
  47. package/dist/npm/stepper/interfaces/StepperProps.d.ts +9 -0
  48. package/dist/systemjs/kendo-react-layout.js +1 -1
  49. package/package.json +16 -14
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  /**
3
4
  * The interface for describing items that can be passed to the `items` property of the BottomNavigation component.
4
5
  */
@@ -23,7 +24,12 @@ export interface BottomNavigationItemProps {
23
24
  * Defines the name for an existing icon in a KendoReact theme.
24
25
  * The icon is rendered inside the BottomNavigation item by a `span.k-icon` element.
25
26
  */
26
- icon?: React.ReactNode;
27
+ icon?: string;
28
+ /**
29
+ * Defines an SVG icon.
30
+ * The icon is rendered inside the BottomNavigation item.
31
+ */
32
+ svgIcon?: SVGIcon;
27
33
  /**
28
34
  * Specifies the text content of the BottomNavigation item.
29
35
  */
@@ -5,6 +5,7 @@ var React = require("react");
5
5
  var PropTypes = require("prop-types");
6
6
  var kendo_licensing_1 = require("@progress/kendo-licensing");
7
7
  var kendo_react_common_1 = require("@progress/kendo-react-common");
8
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
8
9
  var package_metadata_1 = require("../package-metadata");
9
10
  /**
10
11
  * Represents the BreadcrumbDelimiter component.
@@ -21,7 +22,7 @@ exports.BreadcrumbDelimiter = React.forwardRef(function (props, ref) {
21
22
  });
22
23
  });
23
24
  React.useImperativeHandle(ref, function () { return target.current; });
24
- return (React.createElement(kendo_react_common_1.Icon, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", className: "k-breadcrumb-delimiter-icon" }));
25
+ return (React.createElement(kendo_react_common_1.IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: kendo_svg_icons_1.chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
25
26
  });
26
27
  var propTypes = {
27
28
  id: PropTypes.string,
@@ -56,7 +56,7 @@ var DrawerContext_1 = require("./context/DrawerContext");
56
56
  * ```
57
57
  */
58
58
  exports.DrawerItem = React.forwardRef(function (props, target) {
59
- var className = props.className, style = props.style, text = props.text, icon = props.icon, separator = props.separator, disabled = props.disabled, selected = props.selected, onSelect = props.onSelect, index = props.index, tabIndex = props.tabIndex, children = props.children, others = __rest(props, ["className", "style", "text", "icon", "separator", "disabled", "selected", "onSelect", "index", "tabIndex", "children"]);
59
+ var className = props.className, style = props.style, text = props.text, icon = props.icon, svgIcon = props.svgIcon, separator = props.separator, disabled = props.disabled, selected = props.selected, onSelect = props.onSelect, index = props.index, tabIndex = props.tabIndex, children = props.children, others = __rest(props, ["className", "style", "text", "icon", "svgIcon", "separator", "disabled", "selected", "onSelect", "index", "tabIndex", "children"]);
60
60
  var _a = React.useContext(DrawerContext_1.DrawerContext), expanded = _a.expanded, mini = _a.mini, item = _a.item;
61
61
  var elementRef = React.useRef(null);
62
62
  var focusElement = React.useCallback(function () {
@@ -84,7 +84,7 @@ exports.DrawerItem = React.forwardRef(function (props, target) {
84
84
  }
85
85
  }, [onSelect, index, disabled]);
86
86
  var drawerItemContent = (React.createElement(React.Fragment, null,
87
- icon && React.createElement("span", { className: 'k-icon ' + icon }),
87
+ (icon || svgIcon) && React.createElement(kendo_react_common_1.IconWrap, { name: icon ? (0, kendo_react_common_1.toIconName)(icon) : icon, icon: svgIcon }),
88
88
  !expanded && mini ? null : React.createElement("span", { className: 'k-item-text' }, text)));
89
89
  return (separator
90
90
  ? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "presentation" })
@@ -95,6 +95,7 @@ exports.DrawerItem.propTypes = {
95
95
  style: PropTypes.object,
96
96
  text: PropTypes.string,
97
97
  icon: PropTypes.string,
98
+ svgIcon: kendo_react_common_1.svgIconPropType,
98
99
  separator: PropTypes.bool,
99
100
  selected: PropTypes.bool,
100
101
  disabled: PropTypes.bool,
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  /**
3
4
  * An interface for the Drawer items.
4
5
  */
@@ -24,6 +25,10 @@ export interface DrawerItemProps {
24
25
  * The icon is rendered inside the Drawer item by a `span.k-icon` element.
25
26
  */
26
27
  icon?: string;
28
+ /**
29
+ * Defines the SVG icon of the item.
30
+ */
31
+ svgIcon?: SVGIcon;
27
32
  /**
28
33
  * Specifies if the Drawer item is initially selected.
29
34
  */
@@ -5,6 +5,7 @@ var React = require("react");
5
5
  var PropTypes = require("prop-types");
6
6
  var kendo_react_common_1 = require("@progress/kendo-react-common");
7
7
  var package_metadata_1 = require("../package-metadata");
8
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
8
9
  /**
9
10
  * Represents the [KendoReact ExpansionPanel component]({% slug overview_expansionpanel %}).
10
11
  */
@@ -15,7 +16,7 @@ exports.ExpansionPanel = React.forwardRef(function (props, target) {
15
16
  var _c = React.useState(false), focused = _c[0], setFocused = _c[1];
16
17
  var getImperativeHandle = React.useCallback(function () { return ({ element: elementRef.current }); }, []);
17
18
  React.useImperativeHandle(target, getImperativeHandle);
18
- var _d = props.expanded, expanded = _d === void 0 ? false : _d, disabled = props.disabled, title = props.title, subtitle = props.subtitle, onAction = props.onAction, expandIcon = props.expandIcon, collapseIcon = props.collapseIcon;
19
+ var _d = props.expanded, expanded = _d === void 0 ? false : _d, disabled = props.disabled, title = props.title, subtitle = props.subtitle, onAction = props.onAction, expandIcon = props.expandIcon, collapseIcon = props.collapseIcon, expandSVGIcon = props.expandSVGIcon, collapseSVGIcon = props.collapseSVGIcon;
19
20
  var onClick = React.useCallback(function (event) {
20
21
  (0, kendo_react_common_1.dispatchEvent)(onAction, event, getImperativeHandle(), { expanded: expanded });
21
22
  }, [onAction, expanded]);
@@ -48,9 +49,11 @@ exports.ExpansionPanel = React.forwardRef(function (props, target) {
48
49
  React.createElement("span", { className: "k-spacer" }),
49
50
  subtitle !== undefined ? React.createElement("div", { className: "k-expander-sub-title" }, subtitle) : undefined,
50
51
  React.createElement("span", { className: "k-expander-indicator" },
51
- React.createElement(kendo_react_common_1.Icon, { name: !expanded
52
+ React.createElement(kendo_react_common_1.IconWrap, { name: !expanded
52
53
  ? !expandIcon ? 'chevron-down' : undefined
53
- : !collapseIcon ? 'chevron-up' : undefined, className: (0, kendo_react_common_1.classNames)(expanded
54
+ : !collapseIcon ? 'chevron-up' : undefined, icon: !expanded
55
+ ? !expandSVGIcon ? kendo_svg_icons_1.chevronDownIcon : undefined
56
+ : !collapseSVGIcon ? kendo_svg_icons_1.chevronUpIcon : undefined, className: (0, kendo_react_common_1.classNames)(expanded
54
57
  ? (_a = {},
55
58
  _a[String(collapseIcon)] = Boolean(collapseIcon),
56
59
  _a) : (_b = {},
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BaseEvent } from '@progress/kendo-react-common';
2
+ import { BaseEvent, SVGIcon } from '@progress/kendo-react-common';
3
3
  /**
4
4
  * The ExpansionPanel ref.
5
5
  */
@@ -54,6 +54,14 @@ export interface ExpansionPanelProps {
54
54
  * Sets a custom icon via css class(es), for the collapsed state of the ExpansionPanel.
55
55
  */
56
56
  collapseIcon?: string;
57
+ /**
58
+ * Sets a custom SVG icon for the expanded state of the ExpansionPanel.
59
+ */
60
+ expandSVGIcon?: SVGIcon;
61
+ /**
62
+ * Sets a custom SVG icon for the collapsed state of the ExpansionPanel.
63
+ */
64
+ collapseSVGIcon?: SVGIcon;
57
65
  /**
58
66
  * Sets the `dir` property of the ExpansionPanel.
59
67
  */
@@ -42,5 +42,5 @@ export declare class MenuItemArrow extends React.Component<MenuItemArrowProps, {
42
42
  * @hidden
43
43
  */
44
44
  render(): JSX.Element;
45
- private getIconName;
45
+ private getIcon;
46
46
  }
@@ -14,11 +14,23 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  Object.defineProperty(exports, "__esModule", { value: true });
18
29
  exports.MenuItemArrow = exports.leftArrowName = exports.rightArrowName = exports.downArrowName = void 0;
19
30
  var React = require("react");
20
31
  var PropTypes = require("prop-types");
21
32
  var kendo_react_common_1 = require("@progress/kendo-react-common");
33
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
22
34
  var misc_1 = require("../utils/misc");
23
35
  /**
24
36
  * @hidden
@@ -41,19 +53,19 @@ var MenuItemArrow = /** @class */ (function (_super) {
41
53
  * @hidden
42
54
  */
43
55
  MenuItemArrow.prototype.render = function () {
44
- return React.createElement(kendo_react_common_1.Icon, { className: 'k-menu-expand-arrow', name: this.getIconName() });
56
+ return React.createElement(kendo_react_common_1.IconWrap, __assign({ className: 'k-menu-expand-arrow' }, this.getIcon()));
45
57
  };
46
- MenuItemArrow.prototype.getIconName = function () {
58
+ MenuItemArrow.prototype.getIcon = function () {
47
59
  var childrenPosition = (0, misc_1.getChildrenPosition)(this.props.itemId, this.props.verticalMenu === true, this.props.dir === 'rtl');
48
60
  switch (childrenPosition) {
49
61
  case 'downward':
50
- return exports.downArrowName;
62
+ return { name: exports.downArrowName, icon: kendo_svg_icons_1.caretAltDownIcon };
51
63
  case 'rightward':
52
- return exports.rightArrowName;
64
+ return { name: exports.rightArrowName, icon: kendo_svg_icons_1.caretAltRightIcon };
53
65
  case 'leftward':
54
- return exports.leftArrowName;
66
+ return { name: exports.leftArrowName, icon: kendo_svg_icons_1.caretAltLeftIcon };
55
67
  default:
56
- return undefined;
68
+ return {};
57
69
  }
58
70
  };
59
71
  /**
@@ -112,8 +112,9 @@ var MenuItemInternal = /** @class */ (function (_super) {
112
112
  }
113
113
  };
114
114
  MenuItemInternal.prototype.renderMenuIconIfApplicable = function () {
115
- return this.props.item.icon ?
116
- React.createElement("span", { className: "k-icon k-i-".concat(this.props.item.icon), role: "presentation", key: "0" }) : null;
115
+ var _a = this.props.item, icon = _a.icon, svgIcon = _a.svgIcon;
116
+ return icon || svgIcon ?
117
+ React.createElement(kendo_react_common_1.IconWrap, { name: icon, icon: svgIcon, key: "0" }) : null;
117
118
  };
118
119
  MenuItemInternal.prototype.renderArrowIfApplicable = function () {
119
120
  return this.props.item.items.length > 0 ?
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  /**
3
4
  * An interface which holds the shared properties of the MenuItemModel and the MenuItem components.
4
5
  */
@@ -15,6 +16,10 @@ export interface BaseMenuItem {
15
16
  * Specifies the name of the [font icon]({% slug icons %}#toc-list-of-font-icons) that will be rendered for the item ([see example]({% slug itemproperties_menu %}#toc-icon)).
16
17
  */
17
18
  icon?: string;
19
+ /**
20
+ * Specifies the SVG icon that will be rendered for the item ([see example]({% slug itemproperties_menu %}#toc-icon)).
21
+ */
22
+ svgIcon?: SVGIcon;
18
23
  /**
19
24
  * Specifies if the item is disabled ([see example]({% slug itemproperties_menu %}#toc-disabled-state)).
20
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
@@ -25,7 +25,7 @@ function prepareInputItemsForInternalWork(models, menuChildren) {
25
25
  exports.prepareInputItemsForInternalWork = prepareInputItemsForInternalWork;
26
26
  function copyInputItemWithoutChildren(inputModel, inputComponent) {
27
27
  var result = {};
28
- var _a = inputModel ? inputModel : inputComponent.props, text = _a.text, url = _a.url, icon = _a.icon, disabled = _a.disabled, cssClass = _a.cssClass, cssStyle = _a.cssStyle, render = _a.render, linkRender = _a.linkRender, contentRender = _a.contentRender, data = _a.data;
28
+ var _a = inputModel ? inputModel : inputComponent.props, text = _a.text, url = _a.url, icon = _a.icon, svgIcon = _a.svgIcon, disabled = _a.disabled, cssClass = _a.cssClass, cssStyle = _a.cssStyle, render = _a.render, linkRender = _a.linkRender, contentRender = _a.contentRender, data = _a.data;
29
29
  if (text !== undefined) {
30
30
  result.text = text;
31
31
  }
@@ -35,6 +35,9 @@ function copyInputItemWithoutChildren(inputModel, inputComponent) {
35
35
  if (icon !== undefined) {
36
36
  result.icon = icon;
37
37
  }
38
+ if (svgIcon !== undefined) {
39
+ result.svgIcon = svgIcon;
40
+ }
38
41
  if (disabled !== undefined) {
39
42
  result.disabled = disabled;
40
43
  }
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-layout',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1673300822,
11
+ publishDate: 1673462573,
12
12
  version: '',
13
13
  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'
14
14
  };
@@ -13,6 +13,14 @@ export declare class PanelBarItem extends React.PureComponent<PanelBarItemProps,
13
13
  animation: PropTypes.Requireable<boolean>;
14
14
  children: PropTypes.Requireable<any>;
15
15
  className: PropTypes.Requireable<string>;
16
+ icon: PropTypes.Requireable<string>;
17
+ iconClass: PropTypes.Requireable<string>;
18
+ imageUrl: PropTypes.Requireable<string>;
19
+ svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
20
+ name: PropTypes.Validator<string>;
21
+ content: PropTypes.Validator<string>;
22
+ viewBox: PropTypes.Validator<string>;
23
+ }>>;
16
24
  expanded: PropTypes.Requireable<boolean>;
17
25
  disabled: PropTypes.Requireable<boolean>;
18
26
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
@@ -30,18 +30,18 @@ exports.PanelBarItem = void 0;
30
30
  var React = require("react");
31
31
  var PropTypes = require("prop-types");
32
32
  var kendo_react_common_1 = require("@progress/kendo-react-common");
33
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
33
34
  var kendo_react_animation_1 = require("@progress/kendo-react-animation");
34
35
  /**
35
36
  * @hidden
36
37
  */
37
38
  function iconElement(_a) {
38
- var imageUrl = _a.imageUrl, icon = _a.icon, iconClass = _a.iconClass;
39
+ var imageUrl = _a.imageUrl, icon = _a.icon, svgIcon = _a.svgIcon, iconClass = _a.iconClass;
39
40
  if (imageUrl) {
40
41
  return (React.createElement("img", { role: "presentation", className: 'k-panelbar-item-icon k-image', src: imageUrl }));
41
42
  }
42
- else if (icon) {
43
- var iconClasses = (0, kendo_react_common_1.classNames)('k-panelbar-item-icon', 'k-icon', 'k-i-' + icon);
44
- return (React.createElement("span", { role: "presentation", className: iconClasses }));
43
+ else if (icon || svgIcon) {
44
+ return (React.createElement(kendo_react_common_1.IconWrap, { className: 'k-panelbar-item-icon', name: icon, icon: svgIcon }));
45
45
  }
46
46
  else if (iconClass) {
47
47
  return (React.createElement("span", { role: "presentation", className: 'k-panelbar-item-icon ' + iconClass }));
@@ -98,7 +98,7 @@ var PanelBarItem = /** @class */ (function (_super) {
98
98
  var animationStyle = { display: 'block' };
99
99
  var icon = iconElement(this.props);
100
100
  var arrow = (!disabled && children)
101
- ? (React.createElement(kendo_react_common_1.Icon, { name: expanded ? 'chevron-up' : 'chevron-down', className: (0, kendo_react_common_1.classNames)('k-panelbar-toggle', expanded
101
+ ? (React.createElement(kendo_react_common_1.IconWrap, { name: expanded ? 'chevron-up' : 'chevron-down', icon: expanded ? kendo_svg_icons_1.chevronUpIcon : kendo_svg_icons_1.chevronDownIcon, className: (0, kendo_react_common_1.classNames)('k-panelbar-toggle', expanded
102
102
  ? 'k-panelbar-collapse'
103
103
  : 'k-panelbar-expand') }))
104
104
  : null;
@@ -125,6 +125,10 @@ var PanelBarItem = /** @class */ (function (_super) {
125
125
  animation: PropTypes.bool,
126
126
  children: PropTypes.any,
127
127
  className: PropTypes.string,
128
+ icon: PropTypes.string,
129
+ iconClass: PropTypes.string,
130
+ imageUrl: PropTypes.string,
131
+ svgIcon: kendo_react_common_1.svgIconPropType,
128
132
  expanded: PropTypes.bool,
129
133
  disabled: PropTypes.bool,
130
134
  onSelect: PropTypes.func,
@@ -39,6 +39,10 @@ export interface PanelBarItemProps {
39
39
  * Defines an icon that will be rendered next to the title ([see example]({% slug titlesitems_panelbar %}#toc-adding-icons)).
40
40
  */
41
41
  icon?: string;
42
+ /**
43
+ * Defines an SVG icon that will be rendered next to the title ([see example]({% slug titlesitems_panelbar %}#toc-adding-icons)).
44
+ */
45
+ svgIcon?: string;
42
46
  /**
43
47
  * Defines an icon with a custom CSS class that will be rendered next to the title ([see example]({% slug titlesitems_panelbar %}#toc-adding-icons)).
44
48
  */
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SplitterBar = void 0;
19
19
  var React = require("react");
20
20
  var kendo_react_common_1 = require("@progress/kendo-react-common");
21
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
21
22
  /**
22
23
  * @hidden
23
24
  */
@@ -143,7 +144,7 @@ var SplitterBar = /** @class */ (function (_super) {
143
144
  return (React.createElement(kendo_react_common_1.Draggable, { onPress: function (event) { return _this.onDrag(event, true, false); }, onDrag: function (event) { return _this.onDrag(event, false, false); }, onRelease: function (event) { return _this.onDrag(event, false, true); }, ref: function (component) { _this.draggable = component; } },
144
145
  React.createElement("div", { tabIndex: isStatic ? -1 : 0, role: 'separator', className: barClasses, style: { touchAction: 'none' }, onFocus: this.onFocus, onBlur: this.onBlur, onDoubleClick: this.onToggle, onKeyDown: this.onKeyDown },
145
146
  this.props.prev.collapsible && React.createElement("div", { className: 'k-collapse-prev', onClick: this.onPrevToggle },
146
- React.createElement(kendo_react_common_1.Icon, { name: this.props.prev.collapsible
147
+ React.createElement(kendo_react_common_1.IconWrap, { name: this.props.prev.collapsible
147
148
  ? isHorizontal
148
149
  ? this.props.prev.collapsed
149
150
  ? 'caret-alt-right'
@@ -151,10 +152,18 @@ var SplitterBar = /** @class */ (function (_super) {
151
152
  : this.props.prev.collapsed
152
153
  ? 'caret-alt-down'
153
154
  : 'caret-alt-up'
155
+ : undefined, icon: this.props.prev.collapsible
156
+ ? isHorizontal
157
+ ? this.props.prev.collapsed
158
+ ? kendo_svg_icons_1.caretAltRightIcon
159
+ : kendo_svg_icons_1.caretAltLeftIcon
160
+ : this.props.prev.collapsed
161
+ ? kendo_svg_icons_1.caretAltDownIcon
162
+ : kendo_svg_icons_1.caretAltUpIcon
154
163
  : undefined })),
155
164
  React.createElement("div", { className: 'k-resize-handle' }),
156
165
  this.props.next.collapsible && React.createElement("div", { className: 'k-collapse-next', onClick: this.onNextToggle },
157
- React.createElement(kendo_react_common_1.Icon, { name: this.props.next.collapsible
166
+ React.createElement(kendo_react_common_1.IconWrap, { name: this.props.next.collapsible
158
167
  ? isHorizontal
159
168
  ? this.props.next.collapsed
160
169
  ? 'caret-alt-left'
@@ -162,6 +171,14 @@ var SplitterBar = /** @class */ (function (_super) {
162
171
  : this.props.next.collapsed
163
172
  ? 'caret-alt-up'
164
173
  : 'caret-alt-down'
174
+ : undefined, icon: this.props.prev.collapsible
175
+ ? isHorizontal
176
+ ? this.props.prev.collapsed
177
+ ? kendo_svg_icons_1.caretAltLeftIcon
178
+ : kendo_svg_icons_1.caretAltRightIcon
179
+ : this.props.prev.collapsed
180
+ ? kendo_svg_icons_1.caretAltUpIcon
181
+ : kendo_svg_icons_1.caretAltDownIcon
165
182
  : undefined })))));
166
183
  };
167
184
  return SplitterBar;
@@ -28,6 +28,7 @@ var PropTypes = require("prop-types");
28
28
  var StepperContext_1 = require("./context/StepperContext");
29
29
  var kendo_react_common_1 = require("@progress/kendo-react-common");
30
30
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
31
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
31
32
  var contants_1 = require("./contants");
32
33
  var messages_1 = require("./messages");
33
34
  /**
@@ -52,8 +53,8 @@ var messages_1 = require("./messages");
52
53
  exports.Step = React.forwardRef(function (props, target) {
53
54
  var
54
55
  // content
55
- children = props.children, className = props.className, current = props.current, disabled = props.disabled, focused = props.focused, icon = props.icon, index = props.index, isValid = props.isValid, label = props.label, optional = props.optional, style = props.style, tabIndex = props.tabIndex, text = props.text, others = __rest(props, ["children", "className", "current", "disabled", "focused", "icon", "index", "isValid", "label", "optional", "style", "tabIndex", "text"]);
56
- var _a = React.useContext(StepperContext_1.StepperContext), animationDuration = _a.animationDuration, isVertical = _a.isVertical, item = _a.item, linear = _a.linear, mode = _a.mode, numOfSteps = _a.numOfSteps, value = _a.value, successIcon = _a.successIcon, errorIcon = _a.errorIcon, onChange = _a.onChange, onFocus = _a.onFocus;
56
+ children = props.children, className = props.className, current = props.current, disabled = props.disabled, focused = props.focused, icon = props.icon, svgIcon = props.svgIcon, index = props.index, isValid = props.isValid, label = props.label, optional = props.optional, style = props.style, tabIndex = props.tabIndex, text = props.text, others = __rest(props, ["children", "className", "current", "disabled", "focused", "icon", "svgIcon", "index", "isValid", "label", "optional", "style", "tabIndex", "text"]);
57
+ var _a = React.useContext(StepperContext_1.StepperContext), animationDuration = _a.animationDuration, isVertical = _a.isVertical, item = _a.item, linear = _a.linear, mode = _a.mode, numOfSteps = _a.numOfSteps, value = _a.value, onChange = _a.onChange, onFocus = _a.onFocus, successIcon = _a.successIcon, errorIcon = _a.errorIcon, successSVGIcon = _a.successSVGIcon, errorSVGIcon = _a.errorSVGIcon;
57
58
  var elementRef = React.useRef(null);
58
59
  var focusElement = React.useCallback(function () {
59
60
  if (elementRef.current) {
@@ -100,15 +101,13 @@ exports.Step = React.forwardRef(function (props, target) {
100
101
  'k-focus': focused
101
102
  }, className); }, [index, numOfSteps, value, current, optional, disabled, focused, isValid, className]);
102
103
  var itemStyles = React.useMemo(function () { return (__assign({ maxWidth: !isVertical ? "calc(100% / ".concat(numOfSteps, ")") : undefined, maxHeight: isVertical ? "calc(100% / ".concat(numOfSteps, ")") : undefined, pointerEvents: !allowClick ? 'none' : undefined }, style)); }, [isVertical, numOfSteps, style, allowClick]);
103
- var validationIconClasses = (isValid
104
- ? successIcon ? "".concat(successIcon) : 'k-icon k-i-check-circle'
105
- : errorIcon ? "".concat(errorIcon) : 'k-icon k-i-exclamation-circle');
106
- var validationIcons = (React.createElement("span", { className: 'k-step-indicator-icon ' + validationIconClasses, "aria-hidden": "true" }));
104
+ var validationIconCustom = isValid ? successIcon : errorIcon;
105
+ var validationIcons = validationIconCustom ? (React.createElement("span", { className: 'k-step-indicator-icon ' + validationIconCustom, "aria-hidden": "true" })) : (React.createElement(kendo_react_common_1.IconWrap, { className: 'k-step-indicator-icon', name: isValid ? 'check-circle' : 'exclamation-circle', icon: isValid ? (successSVGIcon || kendo_svg_icons_1.checkOutlineIcon) : (errorSVGIcon || kendo_svg_icons_1.exclamationCircleIcon) }));
107
106
  var stepIndicator = (React.createElement(React.Fragment, null, mode !== 'labels' ?
108
- React.createElement("span", { className: "k-step-indicator", "aria-hidden": true, style: { transitionDuration: progressAnimation + 'ms' } }, icon
107
+ React.createElement("span", { className: "k-step-indicator", "aria-hidden": true, style: { transitionDuration: progressAnimation + 'ms' } }, (icon || svgIcon)
109
108
  ? !isInLabel && isValid !== undefined
110
109
  ? validationIcons
111
- : React.createElement("span", { className: "k-step-indicator-icon k-icon ".concat(icon) })
110
+ : React.createElement(kendo_react_common_1.IconWrap, { className: 'k-step-indicator-icon', name: icon ? (0, kendo_react_common_1.toIconName)(icon) : icon, icon: svgIcon })
112
111
  : isValid !== undefined
113
112
  ? validationIcons
114
113
  : React.createElement("span", { className: "k-step-indicator-text" }, text ? text : index + 1)) :
@@ -42,7 +42,7 @@ var package_metadata_1 = require("../package-metadata");
42
42
  */
43
43
  exports.Stepper = React.forwardRef(function (props, target) {
44
44
  (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
45
- var animationDuration = props.animationDuration, children = props.children, className = props.className, disabled = props.disabled, errorIcon = props.errorIcon, item = props.item, items = props.items, linear = props.linear, mode = props.mode, orientation = props.orientation, style = props.style, successIcon = props.successIcon, onChange = props.onChange, onFocus = props.onFocus;
45
+ var animationDuration = props.animationDuration, children = props.children, className = props.className, disabled = props.disabled, errorIcon = props.errorIcon, errorSVGIcon = props.errorSVGIcon, item = props.item, items = props.items, linear = props.linear, mode = props.mode, orientation = props.orientation, style = props.style, successIcon = props.successIcon, successSVGIcon = props.successSVGIcon, onChange = props.onChange, onFocus = props.onFocus;
46
46
  var elementRef = React.useRef(null);
47
47
  var focusElement = React.useCallback(function () {
48
48
  if (elementRef.current) {
@@ -183,7 +183,9 @@ exports.Stepper = React.forwardRef(function (props, target) {
183
183
  numOfSteps: numOfSteps,
184
184
  value: value,
185
185
  successIcon: successIcon,
186
+ successSVGIcon: successSVGIcon,
186
187
  errorIcon: errorIcon,
188
+ errorSVGIcon: errorSVGIcon,
187
189
  onChange: handleChange,
188
190
  onFocus: handleFocus
189
191
  } },
@@ -198,6 +200,7 @@ exports.Stepper.propTypes = {
198
200
  dir: PropTypes.string,
199
201
  disabled: PropTypes.bool,
200
202
  errorIcon: PropTypes.string,
203
+ errorSVGIcon: kendo_react_common_1.svgIconPropType,
201
204
  item: PropTypes.any,
202
205
  items: PropTypes.any,
203
206
  linear: PropTypes.bool,
@@ -205,6 +208,7 @@ exports.Stepper.propTypes = {
205
208
  orientation: PropTypes.oneOf(['horizontal', 'vertical']),
206
209
  style: PropTypes.object,
207
210
  successIcon: PropTypes.string,
211
+ successSVGIcon: kendo_react_common_1.svgIconPropType,
208
212
  value: PropTypes.number.isRequired,
209
213
  onChange: PropTypes.func,
210
214
  onFocus: PropTypes.func
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { StepProps } from '../interfaces/StepProps';
3
3
  import { StepChangeEvent } from '../interfaces/StepChangeEvent';
4
4
  import { StepFocusEvent } from '../interfaces/StepFocusEvent';
5
+ import { SVGIcon } from '@progress/kendo-react-common';
5
6
  /** @hidden */
6
7
  export declare type StepperContextType = {
7
8
  animationDuration?: number | boolean;
@@ -13,6 +14,8 @@ export declare type StepperContextType = {
13
14
  value: number;
14
15
  successIcon?: string;
15
16
  errorIcon?: string;
17
+ successSVGIcon?: SVGIcon;
18
+ errorSVGIcon?: SVGIcon;
16
19
  onChange?: (event: StepChangeEvent) => void;
17
20
  onFocus?: (event: StepFocusEvent) => void;
18
21
  };
@@ -1,3 +1,4 @@
1
+ import { SVGIcon } from '@progress/kendo-react-common';
1
2
  import * as React from 'react';
2
3
  /**
3
4
  * Represents the props of the [KendoReact Step component]({% slug overview_stepper %}).
@@ -36,6 +37,12 @@ export interface StepProps {
36
37
  * ([see example]({% slug display_modes_stepper %})).
37
38
  */
38
39
  icon?: string;
40
+ /**
41
+ * Defines the SVG icon.
42
+ * The icon is rendered inside the Step indicator
43
+ * ([see example]({% slug display_modes_stepper %})).
44
+ */
45
+ svgIcon?: SVGIcon;
39
46
  /**
40
47
  * Sets the index of the Step that is used to identify it.
41
48
  */
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { StepProps } from './StepProps';
3
3
  import { StepperChangeEvent } from './StepperChangeEvent';
4
4
  import { StepperFocusEvent } from './StepperFocusEvent';
5
+ import { SVGIcon } from '@progress/kendo-react-common';
5
6
  /**
6
7
  * Represents the props of the [KendoReact Stepper component]({% slug overview_stepper %}).
7
8
  */
@@ -30,6 +31,10 @@ export interface StepperProps {
30
31
  * Specifies a custom icon that will be rendered inside the step for invalid steps.
31
32
  */
32
33
  errorIcon?: string;
34
+ /**
35
+ * Specifies a custom SVG icon that will be rendered inside the step for invalid steps.
36
+ */
37
+ errorSVGIcon?: SVGIcon;
33
38
  /**
34
39
  * Overrides the default component responsible for visualizing a single item ([see example]({% slug custom_rendering_stepper %})).
35
40
  *
@@ -70,6 +75,10 @@ export interface StepperProps {
70
75
  * Specifies a custom icon that will be rendered inside the step for valid steps.
71
76
  */
72
77
  successIcon?: string;
78
+ /**
79
+ * Specifies a custom SVG icon that will be rendered inside the step for valid steps.
80
+ */
81
+ successSVGIcon?: SVGIcon;
73
82
  /**
74
83
  * Specifies the index of the selected Step.
75
84
  */