@progress/kendo-themes-html 5.0.0-beta.0 → 5.0.0-beta.4

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 (88) hide show
  1. package/lib/jsx-runtime.js +21 -10
  2. package/package.json +7 -7
  3. package/src/autocomplete/autocomplete.jsx +3 -3
  4. package/src/avatar/README.md +1 -1
  5. package/src/avatar/avatar.jsx +15 -21
  6. package/src/button/button.jsx +40 -22
  7. package/src/checkbox/checkbox.jsx +3 -3
  8. package/src/chip/README.md +5 -5
  9. package/src/chip/chip-actions.jsx +80 -0
  10. package/src/chip/chip-avatar.jsx +2 -10
  11. package/src/chip/chip-list.jsx +9 -6
  12. package/src/chip/chip.jsx +56 -39
  13. package/src/chip/index.js +2 -3
  14. package/src/colorpicker/README.md +24 -15
  15. package/src/colorpicker/color-preview.jsx +28 -21
  16. package/src/colorpicker/colorpicker.jsx +6 -8
  17. package/src/combobox/combobox.jsx +6 -8
  18. package/src/{component.js → component/component.jsx} +4 -2
  19. package/src/component/index.js +1 -0
  20. package/src/dateinput/dateinput.jsx +6 -8
  21. package/src/datepicker/datepicker.jsx +6 -8
  22. package/src/datetimepicker/datetimepicker.jsx +6 -8
  23. package/src/dropdownlist/dropdownlist.jsx +6 -8
  24. package/src/fab/README.md +19 -0
  25. package/src/fab/fab.jsx +154 -0
  26. package/src/fab/index.js +1 -0
  27. package/src/icon/icon.jsx +1 -1
  28. package/src/index.js +43 -6
  29. package/src/input/input-inner-input.jsx +1 -1
  30. package/src/input/input-inner-span.jsx +2 -2
  31. package/src/input/input-inner-textarea.jsx +1 -1
  32. package/src/input/input-prefix.jsx +1 -1
  33. package/src/input/input-suffix.jsx +1 -1
  34. package/src/input/input.jsx +2 -2
  35. package/src/input/picker.jsx +4 -4
  36. package/src/list/README.md +75 -26
  37. package/src/list/index.js +1 -3
  38. package/src/list/list-content.jsx +37 -61
  39. package/src/list/list-group-item.jsx +66 -0
  40. package/src/list/list-header.jsx +13 -7
  41. package/src/list/list-item.jsx +37 -16
  42. package/src/list/list.jsx +109 -6
  43. package/src/maskedtextbox/maskedtextbox.jsx +9 -12
  44. package/src/menu/README.md +40 -0
  45. package/src/{menuitem → menu}/index.js +1 -0
  46. package/src/{menuitem → menu}/menu-item-content.jsx +1 -1
  47. package/src/{menuitem → menu}/menu-item.jsx +28 -23
  48. package/src/{menulist/menulist.jsx → menu/menu-list.jsx} +12 -11
  49. package/src/{dropdownbutton → menubutton}/README.md +20 -20
  50. package/src/menubutton/index.js +1 -0
  51. package/src/menubutton/menubutton.jsx +161 -0
  52. package/src/multiselect/README.md +37 -0
  53. package/src/multiselect/multiselect-chip-list.jsx +1 -1
  54. package/src/multiselect/multiselect.jsx +10 -4
  55. package/src/nodata/index.js +1 -0
  56. package/src/nodata/nodata.jsx +64 -0
  57. package/src/numerictextbox/numerictextbox.jsx +6 -8
  58. package/src/popup/README.md +15 -0
  59. package/src/popup/index.js +1 -0
  60. package/src/popup/popup.jsx +80 -0
  61. package/src/radio/radio.jsx +7 -3
  62. package/src/searchbar/searchbar.jsx +1 -1
  63. package/src/searchbox/searchbox.jsx +2 -2
  64. package/src/spinbutton/spinbutton.jsx +1 -1
  65. package/src/splitbutton/README.md +2 -2
  66. package/src/splitbutton/splitbutton.jsx +58 -34
  67. package/src/switch/README.md +3 -3
  68. package/src/switch/switch.jsx +5 -5
  69. package/src/textarea/textarea.jsx +2 -2
  70. package/src/textbox/textbox.jsx +2 -2
  71. package/src/timepicker/timepicker.jsx +6 -8
  72. package/src/treeview/README.md +0 -0
  73. package/src/treeview/index.js +4 -0
  74. package/src/treeview/treeview-group.jsx +70 -0
  75. package/src/treeview/treeview-item.jsx +142 -0
  76. package/src/treeview/treeview-leaf.jsx +99 -0
  77. package/src/treeview/treeview.jsx +125 -0
  78. package/utils/styles.js +9 -0
  79. package/src/chip/chip-remove-icon.jsx +0 -45
  80. package/src/chip/chip-selected-icon.jsx +0 -47
  81. package/src/dropdownbutton/dropdownbutton.jsx +0 -149
  82. package/src/dropdownbutton/index.js +0 -1
  83. package/src/list/list-footer.jsx +0 -61
  84. package/src/list/list-group-header.jsx +0 -92
  85. package/src/list/list-item-text.jsx +0 -62
  86. package/src/menuitem/README.md +0 -26
  87. package/src/menulist/README.md +0 -11
  88. package/src/menulist/index.js +0 -1
@@ -0,0 +1,66 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ListGroupItem extends Component {
4
+ render() {
5
+ return <ListGroupItemStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ListGroupItemStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ children,
14
+
15
+ aria,
16
+ legacy,
17
+
18
+ ...htmlAttributes
19
+ } = props;
20
+
21
+ let listGroupItemClasses = [
22
+ ownClassName,
23
+ 'k-list-group-item'
24
+ ];
25
+
26
+ let legacyListGroupItemClasses = [
27
+ ownClassName,
28
+ 'k-group-header'
29
+ ];
30
+
31
+ let ariaAttr = aria
32
+ ? {}
33
+ : {};
34
+
35
+ if (legacy) {
36
+ return (
37
+ <li className={legacyListGroupItemClasses} {...ariaAttr} {...htmlAttributes}>
38
+ {children}
39
+ </li>
40
+ );
41
+ }
42
+
43
+ return (
44
+ <li className={listGroupItemClasses} {...ariaAttr} {...htmlAttributes}>
45
+ <span className="k-list-item-text">{children}</span>
46
+ </li>
47
+ );
48
+ }
49
+
50
+ ListGroupItemStatic.defaultProps = {
51
+ ...globalDefaultProps,
52
+
53
+ children: []
54
+ };
55
+
56
+ ListGroupItemStatic.propTypes = {
57
+ children: typeof [],
58
+ className: typeof '',
59
+
60
+ aria: typeof false,
61
+ legacy: typeof false,
62
+
63
+ htmlAttributes: typeof []
64
+ };
65
+
66
+ export { ListGroupItem, ListGroupItemStatic };
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class ListHeader extends Component {
4
4
  render() {
@@ -10,6 +10,8 @@ function ListHeaderStatic(props) {
10
10
  const {
11
11
  className: ownClassName,
12
12
 
13
+ children,
14
+
13
15
  aria,
14
16
  legacy,
15
17
 
@@ -18,11 +20,13 @@ function ListHeaderStatic(props) {
18
20
 
19
21
  let listHeaderClasses = [
20
22
  ownClassName,
21
- 'k-list-header'
23
+ // 'k-list-header',
24
+ 'k-list-group-sticky-header'
22
25
  ];
23
26
 
24
27
  let legacyListHeaderClasses = [
25
- ownClassName
28
+ ownClassName,
29
+ 'k-group-header'
26
30
  ];
27
31
 
28
32
  let ariaAttr = aria
@@ -32,14 +36,14 @@ function ListHeaderStatic(props) {
32
36
  if (legacy) {
33
37
  return (
34
38
  <div className={legacyListHeaderClasses} {...ariaAttr} {...htmlAttributes}>
35
-
39
+ {children}
36
40
  </div>
37
41
  );
38
42
  }
39
43
 
40
44
  return (
41
45
  <div className={listHeaderClasses} {...ariaAttr} {...htmlAttributes}>
42
-
46
+ <div className="k-list-header-text">{children}</div>
43
47
  </div>
44
48
  );
45
49
  }
@@ -47,14 +51,16 @@ function ListHeaderStatic(props) {
47
51
  ListHeaderStatic.defaultProps = {
48
52
  ...globalDefaultProps,
49
53
 
50
- className: ''
54
+ children: []
51
55
  };
52
56
 
53
57
  ListHeaderStatic.propTypes = {
58
+ children: typeof [],
59
+ className: typeof '',
60
+
54
61
  aria: typeof false,
55
62
  legacy: typeof false,
56
63
 
57
- className: typeof '',
58
64
  htmlAttributes: typeof []
59
65
  };
60
66
 
@@ -1,4 +1,6 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { CheckboxStatic } from '../checkbox/index';
3
+ import { IconStatic } from '../icon/index';
2
4
 
3
5
  class ListItem extends Component {
4
6
  render() {
@@ -9,9 +11,14 @@ class ListItem extends Component {
9
11
  function ListItemStatic(props) {
10
12
  const {
11
13
  className: ownClassName,
14
+ children,
12
15
 
13
- virtualization,
14
- custom,
16
+ groupLabel,
17
+
18
+ showIcon,
19
+ iconName,
20
+ showCheckbox,
21
+ checked,
15
22
 
16
23
  hover,
17
24
  focus,
@@ -31,8 +38,7 @@ function ListItemStatic(props) {
31
38
  'k-hover': hover === true,
32
39
  'k-focus': focus === true,
33
40
  'k-selected': selected === true,
34
- 'k-disabled': disabled === true,
35
- 'k-custom-item': custom === true
41
+ 'k-disabled': disabled === true
36
42
  }
37
43
  ];
38
44
 
@@ -44,9 +50,7 @@ function ListItemStatic(props) {
44
50
  'k-state-hover': hover === true,
45
51
  'k-state-focused': focus === true,
46
52
  'k-state-selected': selected === true,
47
- 'k-state-disabled': disabled === true,
48
- 'k-virtual-item': virtualization === true,
49
- 'k-custom-item': custom === true
53
+ 'k-state-disabled': disabled === true
50
54
  }
51
55
  ];
52
56
 
@@ -57,14 +61,20 @@ function ListItemStatic(props) {
57
61
  if (legacy) {
58
62
  return (
59
63
  <li className={legacyListItemClasses} {...ariaAttr} {...htmlAttributes}>
60
-
64
+ {showCheckbox && <CheckboxStatic checked={checked} />}
65
+ {showIcon && <IconStatic name={iconName} />}
66
+ <span className="k-list-item-text">{children}</span>
67
+ {groupLabel !== '' && <div className="k-group">{groupLabel}</div>}
61
68
  </li>
62
69
  );
63
70
  }
64
71
 
65
72
  return (
66
73
  <li className={listItemClasses} {...ariaAttr} {...htmlAttributes}>
67
-
74
+ {showCheckbox && <CheckboxStatic checked={checked} />}
75
+ {showIcon && <IconStatic name={iconName} />}
76
+ <span className="k-list-item-text">{children}</span>
77
+ {groupLabel !== '' && <div className="k-list-item-group-label">{groupLabel}</div>}
68
78
  </li>
69
79
  );
70
80
  }
@@ -72,24 +82,35 @@ function ListItemStatic(props) {
72
82
  ListItemStatic.defaultProps = {
73
83
  ...globalDefaultProps,
74
84
 
75
- className: '',
85
+ children: [],
86
+
87
+ groupLabel: '',
76
88
 
77
- virtualization: false,
78
- custom: false
89
+ showIcon: false,
90
+ iconName: '',
91
+ showCheckbox: false,
92
+ checked: false,
79
93
  };
80
94
 
81
95
  ListItemStatic.propTypes = {
82
- virtualization: typeof false,
83
- custom: typeof false,
96
+ children: typeof [],
97
+ className: typeof '',
98
+
99
+ groupLabel: typeof '',
100
+
101
+ showIcon: typeof false,
102
+ iconName: typeof '',
103
+ showCheckbox: typeof false,
104
+ checked: typeof false,
84
105
 
85
106
  hover: typeof false,
86
107
  focus: typeof false,
108
+ selected: typeof false,
87
109
  disabled: typeof false,
88
110
 
89
111
  aria: typeof false,
90
112
  legacy: typeof false,
91
113
 
92
- className: typeof '',
93
114
  htmlAttributes: typeof []
94
115
  };
95
116
 
package/src/list/list.jsx CHANGED
@@ -1,7 +1,105 @@
1
1
  import * as styles from '../../utils/styles';
2
- import { Component, globalDefaultProps } from '../component';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
+ import { ListHeaderStatic } from './list-header.jsx';
4
+ import { ListContentStatic } from './list-content.jsx';
5
+ import { ListGroupItemStatic } from './list-group-item.jsx';
6
+ import { ListItemStatic } from './list-item.jsx';
7
+ import { NoDataStatic } from '../nodata/index';
3
8
 
4
9
  class List extends Component {
10
+
11
+ _transformChildrenUniversal() {
12
+ let virtualization = this._props.virtualization;
13
+ let children = this._props.children;
14
+ let listHeader;
15
+ let listContent;
16
+ let listChildren = [];
17
+ let newChildren = [];
18
+
19
+ children.forEach( child => {
20
+ if ( child.type === 'OPTGROUP') {
21
+ if (child.props.root === true) {
22
+ listHeader = <ListHeaderStatic {...child.props}>{child.props.label}</ListHeaderStatic>;
23
+
24
+ child.props.children.forEach( optChild => {
25
+ listChildren.push( <ListItemStatic {...optChild.props} /> );
26
+ });
27
+ } else {
28
+ child.props.children.forEach( ( optChild, index ) => {
29
+ let groupLabel = '';
30
+
31
+ if ( index === 0 ) {
32
+ groupLabel = child.props.label;
33
+ optChild.props.className = [ optChild.props.className, 'k-first' ];
34
+ }
35
+ listChildren.push( <ListItemStatic {...optChild.props} groupLabel={groupLabel} /> );
36
+ });
37
+ }
38
+ } else if ( child.type === 'OPTION' ) {
39
+ listChildren.push( <ListItemStatic {...child.props} /> );
40
+ }
41
+ });
42
+
43
+ listContent = <ListContentStatic virtualization={virtualization}>{listChildren}</ListContentStatic>;
44
+
45
+ newChildren.push( listHeader );
46
+ newChildren.push( listContent );
47
+
48
+ this._props.children = newChildren;
49
+ }
50
+
51
+ _transformChildrenAngular() {
52
+ let virtualization = this._props.virtualization;
53
+ let children = this._props.children;
54
+ let listHeader;
55
+ let listContent;
56
+ let listChildren = [];
57
+ let newChildren = [];
58
+
59
+ children.forEach( child => {
60
+ if ( child.type === 'OPTGROUP') {
61
+ if (child.props.root === true) {
62
+ listHeader = <ListHeaderStatic {...child.props}>{child.props.label}</ListHeaderStatic>;
63
+
64
+ child.props.children.forEach( optChild => {
65
+ listChildren.push( <ListItemStatic {...optChild.props} /> );
66
+ });
67
+ } else {
68
+ listChildren.push( <ListGroupItemStatic {...child.props}>{child.props.label}</ListGroupItemStatic> );
69
+
70
+ child.props.children.forEach( optChild => {
71
+ listChildren.push( <ListItemStatic {...optChild.props} /> );
72
+ });
73
+ }
74
+ } else if ( child.type === 'OPTION' ) {
75
+ listChildren.push( <ListItemStatic {...child.props} /> );
76
+ }
77
+ });
78
+
79
+ listContent = <ListContentStatic virtualization={virtualization}>{listChildren}</ListContentStatic>;
80
+
81
+ newChildren.push( listHeader );
82
+ newChildren.push( listContent );
83
+
84
+ this._props.children = newChildren;
85
+ }
86
+
87
+ init() {
88
+ let framework = this._props.framework;
89
+
90
+ if ( this._props.children.length === 0 ) {
91
+ this._props.children.push( <NoDataStatic /> );
92
+ return;
93
+ }
94
+
95
+ if ( framework === 'angular' || framework === 'blazor' ) {
96
+ this._transformChildrenAngular();
97
+ return;
98
+ }
99
+
100
+ this._transformChildrenUniversal();
101
+ }
102
+
5
103
  render() {
6
104
  return <ListStatic {...this.props} />;
7
105
  }
@@ -10,6 +108,7 @@ class List extends Component {
10
108
  function ListStatic(props) {
11
109
  const {
12
110
  className: ownClassName,
111
+ children,
13
112
 
14
113
  size,
15
114
 
@@ -33,6 +132,7 @@ function ListStatic(props) {
33
132
 
34
133
  let legacyListClasses = [
35
134
  ownClassName,
135
+ 'k-list-container'
36
136
  ];
37
137
 
38
138
  let ariaAttr = aria
@@ -42,14 +142,14 @@ function ListStatic(props) {
42
142
  if (legacy) {
43
143
  return (
44
144
  <div className={legacyListClasses} {...ariaAttr} {...htmlAttributes}>
45
-
145
+ {children}
46
146
  </div>
47
147
  );
48
148
  }
49
149
 
50
150
  return (
51
151
  <div className={listClasses} {...ariaAttr} {...htmlAttributes}>
52
-
152
+ {children}
53
153
  </div>
54
154
  );
55
155
  }
@@ -57,7 +157,7 @@ function ListStatic(props) {
57
157
  ListStatic.defaultProps = {
58
158
  ...globalDefaultProps,
59
159
 
60
- className: '',
160
+ children: [],
61
161
 
62
162
  size: 'medium',
63
163
 
@@ -65,14 +165,17 @@ ListStatic.defaultProps = {
65
165
  };
66
166
 
67
167
  ListStatic.propTypes = {
68
- size: typeof [ 'none', 'small', 'medium', 'large' ],
168
+ framework: typeof [ 'universal', 'angular' ],
169
+ children: typeof [],
170
+ className: typeof '',
171
+
172
+ size: typeof [ null, 'small', 'medium', 'large' ],
69
173
 
70
174
  virtualization: typeof false,
71
175
 
72
176
  aria: typeof false,
73
177
  legacy: typeof false,
74
178
 
75
- className: typeof '',
76
179
  htmlAttributes: typeof []
77
180
  };
78
181
 
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
  import { InputStatic, InputInnerInputStatic } from '../input/index';
3
3
  import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
4
4
 
@@ -71,23 +71,20 @@ function MaskedTextboxStatic(props) {
71
71
  ownClassName,
72
72
  'k-widget',
73
73
  'k-maskedtextbox',
74
- {
75
- 'k-state-disabled': disabled === true
76
- }
77
- ];
78
-
79
- let legacyInputClasses = [
80
- 'k-textbox',
81
74
  {
82
75
  'k-state-hover': hover === true,
83
- 'k-state-focused': focus === true,
84
- 'k-state-invalid': invalid === true
76
+ 'k-state-focus': focus === true,
77
+ 'k-state-invalid': invalid === true,
78
+ 'k-state-disabled': disabled === true
85
79
  }
86
80
  ];
87
81
 
88
82
  return (
89
83
  <InputStatic className={legacyClasses} {...htmlAttributes}>
90
- <input type={type} className={legacyInputClasses} {...inputAttributes} />
84
+ <input type={type} className="k-input" {...inputAttributes} />
85
+ <InputValidationIconStatic {...props} />
86
+ <InputLoadingIconStatic {...props} />
87
+ <InputClearValueStatic {...props} />
91
88
  </InputStatic>
92
89
  );
93
90
  }
@@ -133,7 +130,7 @@ MaskedTextboxStatic.propTypes = {
133
130
  showClearButton: typeof true,
134
131
 
135
132
  size: typeof [ null, 'small', 'medium', 'large' ],
136
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
133
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
137
134
 
138
135
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
139
136
 
@@ -0,0 +1,40 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <ul class="k-group k-menu-group k-reset"></ul>
4
+
5
+ <!-- canonical rendering -->
6
+ <ul class="
7
+ k-group k-menu-group k-reset
8
+ k-menulist-{size}
9
+ "
10
+ ></ul>
11
+ ```
12
+
13
+ ```html
14
+ <!-- default rendering -->
15
+ <li class="k-item k-menu-item">
16
+ <span class="k-link k-menu-link">
17
+ {icon !== '' && <span class="k-icon k-i-{icon}"></span>}
18
+ {text !== '' && <span class="k-menu-link-text">Text</span>}
19
+ <span className="k-menu-expand-arrow k-icon k-i-{arrowIconName || 'none'}"></span>
20
+ </span>
21
+ </li>
22
+
23
+ <!-- canonical rendering -->
24
+ <li class="
25
+ k-item
26
+ k-menu-item
27
+ {hover && 'k-hover'}
28
+ {focus && 'k-focus'}
29
+ {active && 'k-active'}
30
+ {disabled && 'k-disabled'}
31
+ " disabled={disabled}>
32
+ <span class="k-link k-menu-link">
33
+ {icon !== '' && <span class="k-icon k-i-{icon}"></span>}
34
+ {text !== '' && <span class="k-menu-link-text">Text</span>}
35
+ {showArrow && <span className="k-menu-expand-arrow">
36
+ <span className="k-icon k-i-{arrowIconName || 'none'}"></span>
37
+ </span>}
38
+ </span>
39
+ </li>
40
+ ```
@@ -1,2 +1,3 @@
1
+ export * from './menu-list.jsx';
1
2
  export * from './menu-item.jsx';
2
3
  export * from './menu-item-content.jsx';
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class MenuItemContent extends Component {
4
4
  render() {
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
  import { IconStatic } from '../icon/index';
3
3
 
4
4
  class MenuItem extends Component {
@@ -79,48 +79,52 @@ function MenuItemStatic(props) {
79
79
  }
80
80
  ];
81
81
 
82
+ let expandArrowName = arrowIconName;
82
83
 
83
- let legacyMenuItemClasses = [
84
- ownClassName,
85
- 'k-item k-menu-item',
86
- {
87
- 'k-state-hover': hover === true,
88
- 'k-state-focus': focus === true,
89
- 'k-state-selected': selected === true,
90
- 'k-state-disabled': disabled === true,
91
- }
92
- ];
84
+ if ( expandArrowName === '' ) {
85
+ expandArrowName = dir === 'rtl'
86
+ ? 'arrow-w'
87
+ : 'arrow-e';
88
+ }
93
89
 
94
90
  // Augment attributes
95
91
  htmlAttributes.disabled = disabled;
96
- htmlAttributes.dir = dir;
97
92
 
98
93
  let ariaAttr = aria
99
94
  ? {}
100
95
  : {};
101
96
 
102
97
  if (legacy) {
98
+
99
+ let legacyMenuItemClasses = [
100
+ ownClassName,
101
+ 'k-item k-menu-item',
102
+ {
103
+ 'k-state-hover': hover === true,
104
+ 'k-state-focus': focus === true,
105
+ 'k-state-selected': selected === true,
106
+ 'k-state-disabled': disabled === true,
107
+ }
108
+ ];
109
+
103
110
  return (
104
111
  <li className={legacyMenuItemClasses} {...ariaAttr} {...htmlAttributes}>
105
- <span className={`k-link k-menu-link ${active === true && 'k-state-active'}`}>
106
- {icon && <IconStatic name={icon} />}
107
- {text}
108
- {showArrow && <IconStatic className="k-menu-expand-arrow" name={dir === 'ltr' ? 'arrow-60-right' : 'arrow-60-left'} />}
112
+ <span className={`k-link k-menu-link ${active === true ? 'k-state-active' : ''}`}>
113
+ {icon && <IconStatic className="k-menu-link-icon" name={icon} />}
114
+ <span className="k-menu-link-text">{text}</span>
115
+ {showArrow && <span className="k-menu-expand-arrow"><IconStatic name={expandArrowName} /></span>}
109
116
  </span>
117
+ {contentTemplate}
110
118
  </li>
111
119
  );
112
120
  }
113
121
 
114
- const renderLTRArrowIconName = showArrow ? arrowIconName || 'arrow-60-right' : 'none';
115
-
116
- const renderRTLArrowIconName = showArrow ? arrowIconName || 'arrow-60-left' : 'none';
117
-
118
122
  return (
119
123
  <li className={menuItemClasses} {...ariaAttr} {...htmlAttributes}>
120
124
  <span className={menuItemLinkClasses}>
121
- {icon && <IconStatic name={icon} />}
125
+ {icon && <IconStatic className="k-menu-link-icon" name={icon} />}
122
126
  <span className="k-menu-link-text">{text}</span>
123
- {<IconStatic className="k-menu-expand-arrow" name={dir === 'ltr' ? renderLTRArrowIconName : renderRTLArrowIconName} />}
127
+ {showArrow && <span className="k-menu-expand-arrow"><IconStatic name={expandArrowName} /></span>}
124
128
  </span>
125
129
  {contentTemplate}
126
130
  </li>
@@ -134,6 +138,7 @@ MenuItemStatic.defaultProps = {
134
138
  icon: '',
135
139
 
136
140
  className: '',
141
+ arrowIconName: '',
137
142
 
138
143
  size: 'medium',
139
144
 
@@ -149,7 +154,7 @@ MenuItemStatic.propTypes = {
149
154
 
150
155
  contentTemplate: typeof '#fragment',
151
156
 
152
- size: typeof [ 'none', 'small', 'medium', 'large' ],
157
+ size: typeof [ null, 'small', 'medium', 'large' ],
153
158
 
154
159
  hover: typeof false,
155
160
  focus: typeof false,
@@ -1,5 +1,5 @@
1
1
  import * as styles from '../../utils/styles';
2
- import { Component, globalDefaultProps } from '../component';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
3
 
4
4
  class MenuList extends Component {
5
5
  render() {
@@ -10,6 +10,7 @@ class MenuList extends Component {
10
10
  function MenuListStatic(props) {
11
11
  const {
12
12
  className: ownClassName,
13
+ children,
13
14
 
14
15
  size,
15
16
 
@@ -21,31 +22,31 @@ function MenuListStatic(props) {
21
22
 
22
23
  let menuListClasses = [
23
24
  ownClassName,
24
- 'k-group k-menu-group k-reset',
25
+ 'k-menu-group',
25
26
  styles.sizeClass( size, 'k-menu-group' ),
26
27
  ];
27
28
 
28
-
29
- let legacyMenuListClasses = [
30
- ownClassName,
31
- 'k-group k-menu-group k-reset',
32
- ];
33
-
34
29
  let ariaAttr = aria
35
30
  ? {}
36
31
  : {};
37
32
 
38
33
  if (legacy) {
34
+
35
+ let legacyMenuListClasses = [
36
+ ownClassName,
37
+ 'k-group k-menu-group k-reset',
38
+ ];
39
+
39
40
  return (
40
41
  <ul className={legacyMenuListClasses} {...ariaAttr} {...htmlAttributes}>
41
- {props.children}
42
+ {children}
42
43
  </ul>
43
44
  );
44
45
  }
45
46
 
46
47
  return (
47
48
  <ul className={menuListClasses} {...ariaAttr} {...htmlAttributes}>
48
- {props.children}
49
+ {children}
49
50
  </ul>
50
51
  );
51
52
  }
@@ -59,7 +60,7 @@ MenuListStatic.defaultProps = {
59
60
  };
60
61
 
61
62
  MenuListStatic.propTypes = {
62
- size: typeof [ 'none', 'small', 'medium', 'large' ],
63
+ size: typeof [ null, 'small', 'medium', 'large' ],
63
64
 
64
65
  children: typeof [],
65
66