@progress/kendo-react-layout 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 (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 +15 -13
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
- import { validatePackage } from '@progress/kendo-react-common';
3
+ import { IconWrap, svgIconPropType, validatePackage } from '@progress/kendo-react-common';
4
4
  import { packageMetadata } from '../package-metadata';
5
5
  import { classNames } from '@progress/kendo-react-common';
6
6
  /**
@@ -12,7 +12,7 @@ export var BottomNavigationItem = React.forwardRef(function (props, ref) {
12
12
  React.useImperativeHandle(ref, function () { return ({
13
13
  element: elementRef.current
14
14
  }); });
15
- var className = props.className, style = props.style, selected = props.selected, disabled = props.disabled, item = props.item, render = props.render, dataItem = props.dataItem, icon = props.icon, text = props.text, id = props.id, onSelect = props.onSelect, onKeyDown = props.onKeyDown, index = props.index, tabIndex = props.tabIndex;
15
+ var className = props.className, style = props.style, selected = props.selected, disabled = props.disabled, item = props.item, render = props.render, dataItem = props.dataItem, icon = props.icon, svgIcon = props.svgIcon, text = props.text, id = props.id, onSelect = props.onSelect, onKeyDown = props.onKeyDown, index = props.index, tabIndex = props.tabIndex;
16
16
  var itemClasses = React.useMemo(function () { return classNames('k-bottom-nav-item', {
17
17
  'k-selected': selected,
18
18
  'k-disabled': disabled
@@ -31,7 +31,7 @@ export var BottomNavigationItem = React.forwardRef(function (props, ref) {
31
31
  var ItemComp = item;
32
32
  var bottomNavItem = (React.createElement("span", { ref: elementRef, className: itemClasses, style: style, role: 'link', id: id, tabIndex: tabIndex, onClick: handleClick, onKeyDown: handleKeyDown, "aria-selected": selected, "aria-disabled": disabled }, ItemComp ? React.createElement(ItemComp, { itemIndex: index, item: dataItem }) :
33
33
  (React.createElement(React.Fragment, null,
34
- icon && React.createElement("span", { className: "k-bottom-nav-item-icon k-icon k-i-".concat(icon) }),
34
+ (icon || svgIcon) && React.createElement(IconWrap, { className: 'k-bottom-nav-item-icon', name: icon, icon: svgIcon }),
35
35
  text && React.createElement("span", { className: 'k-bottom-nav-item-text', style: { userSelect: 'none' } }, text)))));
36
36
  return renderer !== undefined ? renderer.call(undefined, bottomNavItem, props) : bottomNavItem;
37
37
  });
@@ -45,6 +45,7 @@ BottomNavigationItem.propTypes = {
45
45
  disabled: PropTypes.bool,
46
46
  selected: PropTypes.bool,
47
47
  icon: PropTypes.string,
48
+ svgIcon: svgIconPropType,
48
49
  text: PropTypes.string,
49
50
  tabIndex: PropTypes.number
50
51
  };
@@ -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
  */
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
3
  import { validatePackage } from '@progress/kendo-licensing';
4
- import { Icon } from '@progress/kendo-react-common';
4
+ import { IconWrap } from '@progress/kendo-react-common';
5
+ import { chevronRightIcon } from '@progress/kendo-svg-icons';
5
6
  import { packageMetadata } from '../package-metadata';
6
7
  /**
7
8
  * Represents the BreadcrumbDelimiter component.
@@ -18,7 +19,7 @@ export var BreadcrumbDelimiter = React.forwardRef(function (props, ref) {
18
19
  });
19
20
  });
20
21
  React.useImperativeHandle(ref, function () { return target.current; });
21
- return (React.createElement(Icon, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", className: "k-breadcrumb-delimiter-icon" }));
22
+ return (React.createElement(IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
22
23
  });
23
24
  var propTypes = {
24
25
  id: PropTypes.string,
@@ -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 { classNames, getTabIndex } from '@progress/kendo-react-common';
25
+ import { classNames, getTabIndex, IconWrap, svgIconPropType, toIconName } from '@progress/kendo-react-common';
26
26
  import { DrawerContext } from './context/DrawerContext';
27
27
  /**
28
28
  * Represents the [KendoReact Drawer component]({% slug overview_drawer %}).
@@ -53,7 +53,7 @@ import { DrawerContext } from './context/DrawerContext';
53
53
  * ```
54
54
  */
55
55
  export var DrawerItem = React.forwardRef(function (props, target) {
56
- 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"]);
56
+ 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"]);
57
57
  var _a = React.useContext(DrawerContext), expanded = _a.expanded, mini = _a.mini, item = _a.item;
58
58
  var elementRef = React.useRef(null);
59
59
  var focusElement = React.useCallback(function () {
@@ -81,7 +81,7 @@ export var DrawerItem = React.forwardRef(function (props, target) {
81
81
  }
82
82
  }, [onSelect, index, disabled]);
83
83
  var drawerItemContent = (React.createElement(React.Fragment, null,
84
- icon && React.createElement("span", { className: 'k-icon ' + icon }),
84
+ (icon || svgIcon) && React.createElement(IconWrap, { name: icon ? toIconName(icon) : icon, icon: svgIcon }),
85
85
  !expanded && mini ? null : React.createElement("span", { className: 'k-item-text' }, text)));
86
86
  return (separator
87
87
  ? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "presentation" })
@@ -92,6 +92,7 @@ DrawerItem.propTypes = {
92
92
  style: PropTypes.object,
93
93
  text: PropTypes.string,
94
94
  icon: PropTypes.string,
95
+ svgIcon: svgIconPropType,
95
96
  separator: PropTypes.bool,
96
97
  selected: PropTypes.bool,
97
98
  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
  */
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
- import { classNames, getTabIndex, useRtl, validatePackage, dispatchEvent, Keys, useAsyncFocusBlur, Icon } from '@progress/kendo-react-common';
3
+ import { classNames, getTabIndex, useRtl, validatePackage, dispatchEvent, Keys, useAsyncFocusBlur, IconWrap } from '@progress/kendo-react-common';
4
4
  import { packageMetadata } from '../package-metadata';
5
+ import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
5
6
  /**
6
7
  * Represents the [KendoReact ExpansionPanel component]({% slug overview_expansionpanel %}).
7
8
  */
@@ -12,7 +13,7 @@ export var ExpansionPanel = React.forwardRef(function (props, target) {
12
13
  var _c = React.useState(false), focused = _c[0], setFocused = _c[1];
13
14
  var getImperativeHandle = React.useCallback(function () { return ({ element: elementRef.current }); }, []);
14
15
  React.useImperativeHandle(target, getImperativeHandle);
15
- 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;
16
+ 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;
16
17
  var onClick = React.useCallback(function (event) {
17
18
  dispatchEvent(onAction, event, getImperativeHandle(), { expanded: expanded });
18
19
  }, [onAction, expanded]);
@@ -45,9 +46,11 @@ export var ExpansionPanel = React.forwardRef(function (props, target) {
45
46
  React.createElement("span", { className: "k-spacer" }),
46
47
  subtitle !== undefined ? React.createElement("div", { className: "k-expander-sub-title" }, subtitle) : undefined,
47
48
  React.createElement("span", { className: "k-expander-indicator" },
48
- React.createElement(Icon, { name: !expanded
49
+ React.createElement(IconWrap, { name: !expanded
49
50
  ? !expandIcon ? 'chevron-down' : undefined
50
- : !collapseIcon ? 'chevron-up' : undefined, className: classNames(expanded
51
+ : !collapseIcon ? 'chevron-up' : undefined, icon: !expanded
52
+ ? !expandSVGIcon ? chevronDownIcon : undefined
53
+ : !collapseSVGIcon ? chevronUpIcon : undefined, className: classNames(expanded
51
54
  ? (_a = {},
52
55
  _a[String(collapseIcon)] = Boolean(collapseIcon),
53
56
  _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
  }
@@ -13,9 +13,21 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
16
27
  import * as React from 'react';
17
28
  import * as PropTypes from 'prop-types';
18
- import { Icon } from '@progress/kendo-react-common';
29
+ import { IconWrap } from '@progress/kendo-react-common';
30
+ import { caretAltDownIcon, caretAltRightIcon, caretAltLeftIcon } from '@progress/kendo-svg-icons';
19
31
  import { getChildrenPosition } from '../utils/misc';
20
32
  /**
21
33
  * @hidden
@@ -38,19 +50,19 @@ var MenuItemArrow = /** @class */ (function (_super) {
38
50
  * @hidden
39
51
  */
40
52
  MenuItemArrow.prototype.render = function () {
41
- return React.createElement(Icon, { className: 'k-menu-expand-arrow', name: this.getIconName() });
53
+ return React.createElement(IconWrap, __assign({ className: 'k-menu-expand-arrow' }, this.getIcon()));
42
54
  };
43
- MenuItemArrow.prototype.getIconName = function () {
55
+ MenuItemArrow.prototype.getIcon = function () {
44
56
  var childrenPosition = getChildrenPosition(this.props.itemId, this.props.verticalMenu === true, this.props.dir === 'rtl');
45
57
  switch (childrenPosition) {
46
58
  case 'downward':
47
- return downArrowName;
59
+ return { name: downArrowName, icon: caretAltDownIcon };
48
60
  case 'rightward':
49
- return rightArrowName;
61
+ return { name: rightArrowName, icon: caretAltRightIcon };
50
62
  case 'leftward':
51
- return leftArrowName;
63
+ return { name: leftArrowName, icon: caretAltLeftIcon };
52
64
  default:
53
- return undefined;
65
+ return {};
54
66
  }
55
67
  };
56
68
  /**
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  };
15
15
  })();
16
16
  import * as React from 'react';
17
- import { classNames } from '@progress/kendo-react-common';
17
+ import { classNames, IconWrap } from '@progress/kendo-react-common';
18
18
  import { Popup } from '@progress/kendo-react-popup';
19
19
  import { shouldOpenItem, isFirstItemFromSiblings } from '../utils/itemsIdsUtils';
20
20
  import { getPopupSettings, convertBoolDirectionToString, getDOMElementId } from '../utils/misc';
@@ -109,8 +109,9 @@ var MenuItemInternal = /** @class */ (function (_super) {
109
109
  }
110
110
  };
111
111
  MenuItemInternal.prototype.renderMenuIconIfApplicable = function () {
112
- return this.props.item.icon ?
113
- React.createElement("span", { className: "k-icon k-i-".concat(this.props.item.icon), role: "presentation", key: "0" }) : null;
112
+ var _a = this.props.item, icon = _a.icon, svgIcon = _a.svgIcon;
113
+ return icon || svgIcon ?
114
+ React.createElement(IconWrap, { name: icon, icon: svgIcon, key: "0" }) : null;
114
115
  };
115
116
  MenuItemInternal.prototype.renderArrowIfApplicable = function () {
116
117
  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,2 +1,3 @@
1
+ /* eslint-disable max-len */
1
2
  export {};
2
3
  // tslint:enable:max-line-length
@@ -21,7 +21,7 @@ export function prepareInputItemsForInternalWork(models, menuChildren) {
21
21
  }
22
22
  function copyInputItemWithoutChildren(inputModel, inputComponent) {
23
23
  var result = {};
24
- 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;
24
+ 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;
25
25
  if (text !== undefined) {
26
26
  result.text = text;
27
27
  }
@@ -31,6 +31,9 @@ function copyInputItemWithoutChildren(inputModel, inputComponent) {
31
31
  if (icon !== undefined) {
32
32
  result.icon = icon;
33
33
  }
34
+ if (svgIcon !== undefined) {
35
+ result.svgIcon = svgIcon;
36
+ }
34
37
  if (disabled !== undefined) {
35
38
  result.disabled = disabled;
36
39
  }
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-layout',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1673300822,
8
+ publishDate: 1673444873,
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
  };
@@ -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>;
@@ -26,19 +26,19 @@ var __assign = (this && this.__assign) || function () {
26
26
  };
27
27
  import * as React from 'react';
28
28
  import * as PropTypes from 'prop-types';
29
- import { classNames, Icon } from '@progress/kendo-react-common';
29
+ import { classNames, IconWrap, svgIconPropType } from '@progress/kendo-react-common';
30
+ import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
30
31
  import { Reveal } from '@progress/kendo-react-animation';
31
32
  /**
32
33
  * @hidden
33
34
  */
34
35
  function iconElement(_a) {
35
- var imageUrl = _a.imageUrl, icon = _a.icon, iconClass = _a.iconClass;
36
+ var imageUrl = _a.imageUrl, icon = _a.icon, svgIcon = _a.svgIcon, iconClass = _a.iconClass;
36
37
  if (imageUrl) {
37
38
  return (React.createElement("img", { role: "presentation", className: 'k-panelbar-item-icon k-image', src: imageUrl }));
38
39
  }
39
- else if (icon) {
40
- var iconClasses = classNames('k-panelbar-item-icon', 'k-icon', 'k-i-' + icon);
41
- return (React.createElement("span", { role: "presentation", className: iconClasses }));
40
+ else if (icon || svgIcon) {
41
+ return (React.createElement(IconWrap, { className: 'k-panelbar-item-icon', name: icon, icon: svgIcon }));
42
42
  }
43
43
  else if (iconClass) {
44
44
  return (React.createElement("span", { role: "presentation", className: 'k-panelbar-item-icon ' + iconClass }));
@@ -95,7 +95,7 @@ var PanelBarItem = /** @class */ (function (_super) {
95
95
  var animationStyle = { display: 'block' };
96
96
  var icon = iconElement(this.props);
97
97
  var arrow = (!disabled && children)
98
- ? (React.createElement(Icon, { name: expanded ? 'chevron-up' : 'chevron-down', className: classNames('k-panelbar-toggle', expanded
98
+ ? (React.createElement(IconWrap, { name: expanded ? 'chevron-up' : 'chevron-down', icon: expanded ? chevronUpIcon : chevronDownIcon, className: classNames('k-panelbar-toggle', expanded
99
99
  ? 'k-panelbar-collapse'
100
100
  : 'k-panelbar-expand') }))
101
101
  : null;
@@ -122,6 +122,10 @@ var PanelBarItem = /** @class */ (function (_super) {
122
122
  animation: PropTypes.bool,
123
123
  children: PropTypes.any,
124
124
  className: PropTypes.string,
125
+ icon: PropTypes.string,
126
+ iconClass: PropTypes.string,
127
+ imageUrl: PropTypes.string,
128
+ svgIcon: svgIconPropType,
125
129
  expanded: PropTypes.bool,
126
130
  disabled: PropTypes.bool,
127
131
  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
  */
@@ -14,7 +14,8 @@ var __extends = (this && this.__extends) || (function () {
14
14
  };
15
15
  })();
16
16
  import * as React from 'react';
17
- import { classNames, Draggable, Icon, Keys } from '@progress/kendo-react-common';
17
+ import { classNames, Draggable, IconWrap, Keys } from '@progress/kendo-react-common';
18
+ import { caretAltRightIcon, caretAltLeftIcon, caretAltDownIcon, caretAltUpIcon } from '@progress/kendo-svg-icons';
18
19
  /**
19
20
  * @hidden
20
21
  */
@@ -140,7 +141,7 @@ var SplitterBar = /** @class */ (function (_super) {
140
141
  return (React.createElement(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; } },
141
142
  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 },
142
143
  this.props.prev.collapsible && React.createElement("div", { className: 'k-collapse-prev', onClick: this.onPrevToggle },
143
- React.createElement(Icon, { name: this.props.prev.collapsible
144
+ React.createElement(IconWrap, { name: this.props.prev.collapsible
144
145
  ? isHorizontal
145
146
  ? this.props.prev.collapsed
146
147
  ? 'caret-alt-right'
@@ -148,10 +149,18 @@ var SplitterBar = /** @class */ (function (_super) {
148
149
  : this.props.prev.collapsed
149
150
  ? 'caret-alt-down'
150
151
  : 'caret-alt-up'
152
+ : undefined, icon: this.props.prev.collapsible
153
+ ? isHorizontal
154
+ ? this.props.prev.collapsed
155
+ ? caretAltRightIcon
156
+ : caretAltLeftIcon
157
+ : this.props.prev.collapsed
158
+ ? caretAltDownIcon
159
+ : caretAltUpIcon
151
160
  : undefined })),
152
161
  React.createElement("div", { className: 'k-resize-handle' }),
153
162
  this.props.next.collapsible && React.createElement("div", { className: 'k-collapse-next', onClick: this.onNextToggle },
154
- React.createElement(Icon, { name: this.props.next.collapsible
163
+ React.createElement(IconWrap, { name: this.props.next.collapsible
155
164
  ? isHorizontal
156
165
  ? this.props.next.collapsed
157
166
  ? 'caret-alt-left'
@@ -159,6 +168,14 @@ var SplitterBar = /** @class */ (function (_super) {
159
168
  : this.props.next.collapsed
160
169
  ? 'caret-alt-up'
161
170
  : 'caret-alt-down'
171
+ : undefined, icon: this.props.prev.collapsible
172
+ ? isHorizontal
173
+ ? this.props.prev.collapsed
174
+ ? caretAltLeftIcon
175
+ : caretAltRightIcon
176
+ : this.props.prev.collapsed
177
+ ? caretAltUpIcon
178
+ : caretAltDownIcon
162
179
  : undefined })))));
163
180
  };
164
181
  return SplitterBar;
@@ -23,8 +23,9 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import * as React from 'react';
24
24
  import * as PropTypes from 'prop-types';
25
25
  import { StepperContext } from './context/StepperContext';
26
- import { classNames, focusFirstFocusableChild, dispatchEvent } from '@progress/kendo-react-common';
26
+ import { classNames, focusFirstFocusableChild, dispatchEvent, IconWrap, toIconName } from '@progress/kendo-react-common';
27
27
  import { useLocalization } from '@progress/kendo-react-intl';
28
+ import { checkOutlineIcon, exclamationCircleIcon } from '@progress/kendo-svg-icons';
28
29
  import { DEFAULT_ANIMATION_DURATION, NO_ANIMATION } from './contants';
29
30
  import { messages, optionalText } from './messages';
30
31
  /**
@@ -49,8 +50,8 @@ import { messages, optionalText } from './messages';
49
50
  export var Step = React.forwardRef(function (props, target) {
50
51
  var
51
52
  // content
52
- 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"]);
53
- var _a = React.useContext(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;
53
+ 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"]);
54
+ var _a = React.useContext(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;
54
55
  var elementRef = React.useRef(null);
55
56
  var focusElement = React.useCallback(function () {
56
57
  if (elementRef.current) {
@@ -97,15 +98,13 @@ export var Step = React.forwardRef(function (props, target) {
97
98
  'k-focus': focused
98
99
  }, className); }, [index, numOfSteps, value, current, optional, disabled, focused, isValid, className]);
99
100
  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]);
100
- var validationIconClasses = (isValid
101
- ? successIcon ? "".concat(successIcon) : 'k-icon k-i-check-circle'
102
- : errorIcon ? "".concat(errorIcon) : 'k-icon k-i-exclamation-circle');
103
- var validationIcons = (React.createElement("span", { className: 'k-step-indicator-icon ' + validationIconClasses, "aria-hidden": "true" }));
101
+ var validationIconCustom = isValid ? successIcon : errorIcon;
102
+ var validationIcons = validationIconCustom ? (React.createElement("span", { className: 'k-step-indicator-icon ' + validationIconCustom, "aria-hidden": "true" })) : (React.createElement(IconWrap, { className: 'k-step-indicator-icon', name: isValid ? 'check-circle' : 'exclamation-circle', icon: isValid ? (successSVGIcon || checkOutlineIcon) : (errorSVGIcon || exclamationCircleIcon) }));
104
103
  var stepIndicator = (React.createElement(React.Fragment, null, mode !== 'labels' ?
105
- React.createElement("span", { className: "k-step-indicator", "aria-hidden": true, style: { transitionDuration: progressAnimation + 'ms' } }, icon
104
+ React.createElement("span", { className: "k-step-indicator", "aria-hidden": true, style: { transitionDuration: progressAnimation + 'ms' } }, (icon || svgIcon)
106
105
  ? !isInLabel && isValid !== undefined
107
106
  ? validationIcons
108
- : React.createElement("span", { className: "k-step-indicator-icon k-icon ".concat(icon) })
107
+ : React.createElement(IconWrap, { className: 'k-step-indicator-icon', name: icon ? toIconName(icon) : icon, icon: svgIcon })
109
108
  : isValid !== undefined
110
109
  ? validationIcons
111
110
  : React.createElement("span", { className: "k-step-indicator-text" }, text ? text : index + 1)) :
@@ -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 { StepperContext } from './context/StepperContext';
15
- import { classNames, focusFirstFocusableChild, useRtl, dispatchEvent, Keys } from '@progress/kendo-react-common';
15
+ import { classNames, focusFirstFocusableChild, useRtl, dispatchEvent, Keys, svgIconPropType } from '@progress/kendo-react-common';
16
16
  import { Step } from './Step';
17
17
  import { ProgressBar } from '@progress/kendo-react-progressbars';
18
18
  import { DEFAULT_ANIMATION_DURATION, NO_ANIMATION } from './contants';
@@ -39,7 +39,7 @@ import { packageMetadata } from '../package-metadata';
39
39
  */
40
40
  export var Stepper = React.forwardRef(function (props, target) {
41
41
  validatePackage(packageMetadata);
42
- 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;
42
+ 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;
43
43
  var elementRef = React.useRef(null);
44
44
  var focusElement = React.useCallback(function () {
45
45
  if (elementRef.current) {
@@ -180,7 +180,9 @@ export var Stepper = React.forwardRef(function (props, target) {
180
180
  numOfSteps: numOfSteps,
181
181
  value: value,
182
182
  successIcon: successIcon,
183
+ successSVGIcon: successSVGIcon,
183
184
  errorIcon: errorIcon,
185
+ errorSVGIcon: errorSVGIcon,
184
186
  onChange: handleChange,
185
187
  onFocus: handleFocus
186
188
  } },
@@ -195,6 +197,7 @@ Stepper.propTypes = {
195
197
  dir: PropTypes.string,
196
198
  disabled: PropTypes.bool,
197
199
  errorIcon: PropTypes.string,
200
+ errorSVGIcon: svgIconPropType,
198
201
  item: PropTypes.any,
199
202
  items: PropTypes.any,
200
203
  linear: PropTypes.bool,
@@ -202,6 +205,7 @@ Stepper.propTypes = {
202
205
  orientation: PropTypes.oneOf(['horizontal', 'vertical']),
203
206
  style: PropTypes.object,
204
207
  successIcon: PropTypes.string,
208
+ successSVGIcon: svgIconPropType,
205
209
  value: PropTypes.number.isRequired,
206
210
  onChange: PropTypes.func,
207
211
  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
  */
@@ -15,7 +15,7 @@ exports.BottomNavigationItem = React.forwardRef(function (props, ref) {
15
15
  React.useImperativeHandle(ref, function () { return ({
16
16
  element: elementRef.current
17
17
  }); });
18
- var className = props.className, style = props.style, selected = props.selected, disabled = props.disabled, item = props.item, render = props.render, dataItem = props.dataItem, icon = props.icon, text = props.text, id = props.id, onSelect = props.onSelect, onKeyDown = props.onKeyDown, index = props.index, tabIndex = props.tabIndex;
18
+ var className = props.className, style = props.style, selected = props.selected, disabled = props.disabled, item = props.item, render = props.render, dataItem = props.dataItem, icon = props.icon, svgIcon = props.svgIcon, text = props.text, id = props.id, onSelect = props.onSelect, onKeyDown = props.onKeyDown, index = props.index, tabIndex = props.tabIndex;
19
19
  var itemClasses = React.useMemo(function () { return (0, kendo_react_common_2.classNames)('k-bottom-nav-item', {
20
20
  'k-selected': selected,
21
21
  'k-disabled': disabled
@@ -34,7 +34,7 @@ exports.BottomNavigationItem = React.forwardRef(function (props, ref) {
34
34
  var ItemComp = item;
35
35
  var bottomNavItem = (React.createElement("span", { ref: elementRef, className: itemClasses, style: style, role: 'link', id: id, tabIndex: tabIndex, onClick: handleClick, onKeyDown: handleKeyDown, "aria-selected": selected, "aria-disabled": disabled }, ItemComp ? React.createElement(ItemComp, { itemIndex: index, item: dataItem }) :
36
36
  (React.createElement(React.Fragment, null,
37
- icon && React.createElement("span", { className: "k-bottom-nav-item-icon k-icon k-i-".concat(icon) }),
37
+ (icon || svgIcon) && React.createElement(kendo_react_common_1.IconWrap, { className: 'k-bottom-nav-item-icon', name: icon, icon: svgIcon }),
38
38
  text && React.createElement("span", { className: 'k-bottom-nav-item-text', style: { userSelect: 'none' } }, text)))));
39
39
  return renderer !== undefined ? renderer.call(undefined, bottomNavItem, props) : bottomNavItem;
40
40
  });
@@ -48,6 +48,7 @@ exports.BottomNavigationItem.propTypes = {
48
48
  disabled: PropTypes.bool,
49
49
  selected: PropTypes.bool,
50
50
  icon: PropTypes.string,
51
+ svgIcon: kendo_react_common_1.svgIconPropType,
51
52
  text: PropTypes.string,
52
53
  tabIndex: PropTypes.number
53
54
  };