@progress/kendo-themes-html 4.43.1-dev.3 → 4.43.1-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/jsx-runtime.js +17 -1
- package/package.json +7 -7
- package/src/autocomplete/autocomplete.jsx +1 -1
- package/src/avatar/README.md +1 -1
- package/src/avatar/avatar.jsx +1 -4
- package/src/button/button.jsx +38 -20
- package/src/checkbox/checkbox.jsx +2 -2
- package/src/chip/chip-avatar.jsx +1 -1
- package/src/colorpicker/color-preview.jsx +27 -20
- package/src/combobox/combobox.jsx +4 -6
- package/src/dropdownlist/dropdownlist.jsx +4 -6
- package/src/fab/README.md +19 -0
- package/src/fab/fab.jsx +154 -0
- package/src/fab/index.js +1 -0
- package/src/index.js +5 -2
- package/src/input/input-inner-span.jsx +1 -1
- package/src/list/README.md +14 -0
- package/src/maskedtextbox/maskedtextbox.jsx +7 -10
- package/src/menu/README.md +40 -0
- package/src/menu/index.js +3 -0
- package/src/menu/menu-item-content.jsx +48 -0
- package/src/menu/menu-item.jsx +174 -0
- package/src/menu/menu-list.jsx +74 -0
- package/src/menubutton/README.md +60 -0
- package/src/menubutton/index.js +1 -0
- package/src/menubutton/menubutton.jsx +161 -0
- package/src/numerictextbox/numerictextbox.jsx +4 -6
- package/src/radio/radio.jsx +6 -2
- package/src/splitbutton/README.md +76 -0
- package/src/splitbutton/index.js +1 -0
- package/src/splitbutton/splitbutton.jsx +176 -0
- package/src/switch/README.md +3 -3
- package/src/treeview/README.md +0 -0
- package/src/treeview/index.js +4 -0
- package/src/treeview/treeview-group.jsx +70 -0
- package/src/treeview/treeview-item.jsx +142 -0
- package/src/treeview/treeview-leaf.jsx +99 -0
- package/src/treeview/treeview.jsx +125 -0
- package/utils/styles.js +9 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
|
|
3
|
+
class MenuItemContent extends Component {
|
|
4
|
+
render() {
|
|
5
|
+
return <MenuItemContentStatic {...this.props} />;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function MenuItemContentStatic(props) {
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
className: ownClassName,
|
|
13
|
+
|
|
14
|
+
children,
|
|
15
|
+
|
|
16
|
+
...htmlAttributes
|
|
17
|
+
} = props;
|
|
18
|
+
|
|
19
|
+
let menuItemContentClasses = [
|
|
20
|
+
ownClassName,
|
|
21
|
+
'k-menu-item-content'
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
if (children.length === 0) {
|
|
25
|
+
return <></>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<span className={menuItemContentClasses} {...htmlAttributes}>
|
|
30
|
+
{children}
|
|
31
|
+
</span>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
MenuItemContentStatic.defaultProps = {
|
|
36
|
+
...globalDefaultProps,
|
|
37
|
+
|
|
38
|
+
children: []
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
MenuItemContentStatic.propTypes = {
|
|
42
|
+
children: typeof [],
|
|
43
|
+
className: typeof '',
|
|
44
|
+
|
|
45
|
+
htmlAttributes: typeof []
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { MenuItemContent, MenuItemContentStatic };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
import { IconStatic } from '../icon/index';
|
|
3
|
+
|
|
4
|
+
class MenuItem extends Component {
|
|
5
|
+
init() {
|
|
6
|
+
let subItem = <></>;
|
|
7
|
+
let contentTemplate = <></>;
|
|
8
|
+
let children = this._props.children;
|
|
9
|
+
let newChildren = [];
|
|
10
|
+
|
|
11
|
+
children.forEach( child => {
|
|
12
|
+
let component = child._component;
|
|
13
|
+
|
|
14
|
+
if (component === 'MenuItem') {
|
|
15
|
+
subItem.props.children.push( child );
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (component === 'MenuItemContent') {
|
|
20
|
+
contentTemplate.props.children.push( child );
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
newChildren.push( child );
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
this._props.subItem = subItem;
|
|
28
|
+
this._props.contentTemplate = contentTemplate;
|
|
29
|
+
this._props.children = newChildren;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return <MenuItemStatic {...this.props} />;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function MenuItemStatic(props) {
|
|
37
|
+
const {
|
|
38
|
+
className: ownClassName,
|
|
39
|
+
|
|
40
|
+
text,
|
|
41
|
+
|
|
42
|
+
icon,
|
|
43
|
+
|
|
44
|
+
showArrow,
|
|
45
|
+
arrowIconName,
|
|
46
|
+
|
|
47
|
+
contentTemplate,
|
|
48
|
+
|
|
49
|
+
hover,
|
|
50
|
+
focus,
|
|
51
|
+
active,
|
|
52
|
+
selected,
|
|
53
|
+
disabled,
|
|
54
|
+
|
|
55
|
+
dir,
|
|
56
|
+
|
|
57
|
+
aria,
|
|
58
|
+
legacy,
|
|
59
|
+
|
|
60
|
+
...htmlAttributes
|
|
61
|
+
} = props;
|
|
62
|
+
|
|
63
|
+
let menuItemClasses = [
|
|
64
|
+
ownClassName,
|
|
65
|
+
'k-item k-menu-item',
|
|
66
|
+
{
|
|
67
|
+
'k-disabled': disabled === true
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
let menuItemLinkClasses = [
|
|
72
|
+
'k-link k-menu-link',
|
|
73
|
+
{
|
|
74
|
+
'k-hover': hover === true,
|
|
75
|
+
'k-focus': focus === true,
|
|
76
|
+
'k-active': active === true,
|
|
77
|
+
'k-selected': selected === true,
|
|
78
|
+
'k-disabled': disabled === true
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
let expandArrowName = arrowIconName;
|
|
83
|
+
|
|
84
|
+
if ( expandArrowName === '' ) {
|
|
85
|
+
expandArrowName = dir === 'rtl'
|
|
86
|
+
? 'arrow-w'
|
|
87
|
+
: 'arrow-e';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Augment attributes
|
|
91
|
+
htmlAttributes.disabled = disabled;
|
|
92
|
+
|
|
93
|
+
let ariaAttr = aria
|
|
94
|
+
? {}
|
|
95
|
+
: {};
|
|
96
|
+
|
|
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
|
+
|
|
110
|
+
return (
|
|
111
|
+
<li className={legacyMenuItemClasses} {...ariaAttr} {...htmlAttributes}>
|
|
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>}
|
|
116
|
+
</span>
|
|
117
|
+
{contentTemplate}
|
|
118
|
+
</li>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<li className={menuItemClasses} {...ariaAttr} {...htmlAttributes}>
|
|
124
|
+
<span className={menuItemLinkClasses}>
|
|
125
|
+
{icon && <IconStatic className="k-menu-link-icon" name={icon} />}
|
|
126
|
+
<span className="k-menu-link-text">{text}</span>
|
|
127
|
+
{showArrow && <span className="k-menu-expand-arrow"><IconStatic name={expandArrowName} /></span>}
|
|
128
|
+
</span>
|
|
129
|
+
{contentTemplate}
|
|
130
|
+
</li>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
MenuItemStatic.defaultProps = {
|
|
135
|
+
...globalDefaultProps,
|
|
136
|
+
|
|
137
|
+
text: '',
|
|
138
|
+
icon: '',
|
|
139
|
+
|
|
140
|
+
className: '',
|
|
141
|
+
arrowIconName: '',
|
|
142
|
+
|
|
143
|
+
size: 'medium',
|
|
144
|
+
|
|
145
|
+
dir: 'ltr'
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
MenuItemStatic.propTypes = {
|
|
149
|
+
text: typeof '',
|
|
150
|
+
icon: typeof '',
|
|
151
|
+
|
|
152
|
+
showArrow: typeof false,
|
|
153
|
+
arrowIconName: typeof '',
|
|
154
|
+
|
|
155
|
+
contentTemplate: typeof '#fragment',
|
|
156
|
+
|
|
157
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
158
|
+
|
|
159
|
+
hover: typeof false,
|
|
160
|
+
focus: typeof false,
|
|
161
|
+
active: typeof false,
|
|
162
|
+
selected: typeof false,
|
|
163
|
+
disabled: typeof false,
|
|
164
|
+
|
|
165
|
+
aria: typeof false,
|
|
166
|
+
legacy: typeof false,
|
|
167
|
+
|
|
168
|
+
dir: typeof '',
|
|
169
|
+
|
|
170
|
+
className: typeof '',
|
|
171
|
+
htmlAttributes: typeof []
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export { MenuItem, MenuItemStatic };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
|
+
|
|
4
|
+
class MenuList extends Component {
|
|
5
|
+
render() {
|
|
6
|
+
return <MenuListStatic {...this.props} />;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function MenuListStatic(props) {
|
|
11
|
+
const {
|
|
12
|
+
className: ownClassName,
|
|
13
|
+
children,
|
|
14
|
+
|
|
15
|
+
size,
|
|
16
|
+
|
|
17
|
+
aria,
|
|
18
|
+
legacy,
|
|
19
|
+
|
|
20
|
+
...htmlAttributes
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
let menuListClasses = [
|
|
24
|
+
ownClassName,
|
|
25
|
+
'k-menu-group',
|
|
26
|
+
styles.sizeClass( size, 'k-menu-group' ),
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
let ariaAttr = aria
|
|
30
|
+
? {}
|
|
31
|
+
: {};
|
|
32
|
+
|
|
33
|
+
if (legacy) {
|
|
34
|
+
|
|
35
|
+
let legacyMenuListClasses = [
|
|
36
|
+
ownClassName,
|
|
37
|
+
'k-group k-menu-group k-reset',
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<ul className={legacyMenuListClasses} {...ariaAttr} {...htmlAttributes}>
|
|
42
|
+
{children}
|
|
43
|
+
</ul>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<ul className={menuListClasses} {...ariaAttr} {...htmlAttributes}>
|
|
49
|
+
{children}
|
|
50
|
+
</ul>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
MenuListStatic.defaultProps = {
|
|
55
|
+
...globalDefaultProps,
|
|
56
|
+
|
|
57
|
+
className: '',
|
|
58
|
+
|
|
59
|
+
size: 'medium'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
MenuListStatic.propTypes = {
|
|
63
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
64
|
+
|
|
65
|
+
children: typeof [],
|
|
66
|
+
|
|
67
|
+
aria: typeof false,
|
|
68
|
+
legacy: typeof false,
|
|
69
|
+
|
|
70
|
+
className: typeof '',
|
|
71
|
+
htmlAttributes: typeof []
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { MenuList, MenuListStatic };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
```html
|
|
2
|
+
<!-- default rendering -->
|
|
3
|
+
<div class="k-dropdown-button">
|
|
4
|
+
<button type="button" class="k-menu-button k-button k-button-md k-rounded-md k-button-solid k-button-solid-base">
|
|
5
|
+
<span class="k-button-text">Text</span>
|
|
6
|
+
<span class="k-button-arrow"><span class="k-icon k-i-arrow-s"></span></span>
|
|
7
|
+
</button>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<!-- canonical rendering -->
|
|
11
|
+
<div class="k-dropdown-button">
|
|
12
|
+
<button class="
|
|
13
|
+
k-button
|
|
14
|
+
{text === '' && icon !== '' && 'k-icon-button'}
|
|
15
|
+
k-button-{size}
|
|
16
|
+
k-button-{shape}
|
|
17
|
+
k-rounded-{rounded}
|
|
18
|
+
k-button-{fillMode}
|
|
19
|
+
k-button-{fillMode}-{themeColor}
|
|
20
|
+
k-{state}
|
|
21
|
+
{disabled && 'k-disabled'}
|
|
22
|
+
" type={type} disabled={disabled}>
|
|
23
|
+
{icon !== '' && <span class="k-button-icon k-icon k-i-{icon}"></span>}
|
|
24
|
+
{text !== '' && <span class="k-button-text">Button</span>}
|
|
25
|
+
{showArrow && <span class="k-button-arrow"><span class="k-icon k-i-{arrowIconName}"></span></span>}
|
|
26
|
+
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- popup menu items default rendering -->
|
|
31
|
+
<div class="k-animation-container k-animation-container-fixed k-animation-container-shown">
|
|
32
|
+
<div class="k-popup k-menu-popup">
|
|
33
|
+
<ul class="k-group k-menu-group k-reset k-menu-group-md">
|
|
34
|
+
<li class="k-item k-menu-item">
|
|
35
|
+
<span class="k-link k-menu-link">
|
|
36
|
+
<span class="k-menu-link-text">Text</span>
|
|
37
|
+
</span>
|
|
38
|
+
</li>
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- popup menu items canonical rendering -->
|
|
44
|
+
<div class="k-animation-container k-animation-container-fixed k-animation-container-shown">
|
|
45
|
+
<div class="k-popup k-menu-popup">
|
|
46
|
+
<ul class="k-group k-menu-group k-reset k-menu-group-{size}">
|
|
47
|
+
<li class="k-item k-menu-item">
|
|
48
|
+
<span class="k-link k-menu-link k-{state}">
|
|
49
|
+
{icon !== '' && <span class="k-icon k-i-{icon}"></span>}
|
|
50
|
+
{text !== '' && <span class="k-menu-link-text">Text</span>}
|
|
51
|
+
{hasChildren
|
|
52
|
+
? <span class="k-menu-expand-arrow k-icon k-i-{arrowIconName}"></span>
|
|
53
|
+
: <span class="k-menu-expand-arrow k-icon k-i-none"></span>
|
|
54
|
+
}
|
|
55
|
+
</span>
|
|
56
|
+
</li>
|
|
57
|
+
</ul>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './menubutton.jsx';
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
import { ButtonStatic } from '../button/index';
|
|
3
|
+
import { IconStatic } from '../icon/index';
|
|
4
|
+
|
|
5
|
+
class MenuButton extends Component {
|
|
6
|
+
|
|
7
|
+
init() {
|
|
8
|
+
this._props.text = this.element.innerHTML;
|
|
9
|
+
this._props.children = [];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
return <MenuButtonStatic {...this.props} />;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function MenuButtonStatic(props) {
|
|
18
|
+
const {
|
|
19
|
+
className: ownClassName,
|
|
20
|
+
|
|
21
|
+
text,
|
|
22
|
+
|
|
23
|
+
size,
|
|
24
|
+
rounded,
|
|
25
|
+
|
|
26
|
+
fillMode,
|
|
27
|
+
themeColor,
|
|
28
|
+
|
|
29
|
+
icon,
|
|
30
|
+
|
|
31
|
+
showArrow,
|
|
32
|
+
arrowIconName,
|
|
33
|
+
|
|
34
|
+
hover,
|
|
35
|
+
focus,
|
|
36
|
+
active,
|
|
37
|
+
selected,
|
|
38
|
+
disabled,
|
|
39
|
+
|
|
40
|
+
aria,
|
|
41
|
+
legacy,
|
|
42
|
+
|
|
43
|
+
...htmlAttributes
|
|
44
|
+
} = props;
|
|
45
|
+
|
|
46
|
+
let menuButtonClasses = [
|
|
47
|
+
ownClassName,
|
|
48
|
+
'k-menu-button'
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
// Augment attributes
|
|
52
|
+
htmlAttributes.disabled = disabled;
|
|
53
|
+
|
|
54
|
+
let ariaAttr = aria
|
|
55
|
+
? {}
|
|
56
|
+
: {};
|
|
57
|
+
|
|
58
|
+
if (legacy) {
|
|
59
|
+
|
|
60
|
+
let legacyMenuButtonClasses = [
|
|
61
|
+
ownClassName,
|
|
62
|
+
'k-menu-button'
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<ButtonStatic className={legacyMenuButtonClasses}
|
|
67
|
+
text={text}
|
|
68
|
+
icon={icon}
|
|
69
|
+
|
|
70
|
+
size={size}
|
|
71
|
+
rounded={rounded}
|
|
72
|
+
fillMode={fillMode}
|
|
73
|
+
themeColor={themeColor}
|
|
74
|
+
|
|
75
|
+
hover={hover}
|
|
76
|
+
focus={focus}
|
|
77
|
+
active={active}
|
|
78
|
+
selected={selected}
|
|
79
|
+
disabled={disabled}
|
|
80
|
+
|
|
81
|
+
{...ariaAttr}
|
|
82
|
+
{...htmlAttributes}
|
|
83
|
+
>
|
|
84
|
+
<IconStatic className="k-button-icon" name={icon} />
|
|
85
|
+
{text && <span className="k-button-text">{text}</span>}
|
|
86
|
+
{showArrow && <span className="k-menu-button-arrow k-button-arrow"><IconStatic name={arrowIconName} /></span>}
|
|
87
|
+
</ButtonStatic>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<ButtonStatic className={menuButtonClasses}
|
|
93
|
+
text={text}
|
|
94
|
+
icon={icon}
|
|
95
|
+
|
|
96
|
+
size={size}
|
|
97
|
+
rounded={rounded}
|
|
98
|
+
fillMode={fillMode}
|
|
99
|
+
themeColor={themeColor}
|
|
100
|
+
|
|
101
|
+
hover={hover}
|
|
102
|
+
focus={focus}
|
|
103
|
+
active={active}
|
|
104
|
+
selected={selected}
|
|
105
|
+
disabled={disabled}
|
|
106
|
+
|
|
107
|
+
{...ariaAttr}
|
|
108
|
+
{...htmlAttributes}
|
|
109
|
+
>
|
|
110
|
+
<IconStatic className="k-button-icon" name={icon} />
|
|
111
|
+
{text && <span className="k-button-text">{text}</span>}
|
|
112
|
+
{showArrow && <span className="k-menu-button-arrow k-button-arrow"><IconStatic name={arrowIconName} /></span>}
|
|
113
|
+
</ButtonStatic>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
MenuButtonStatic.defaultProps = {
|
|
118
|
+
...globalDefaultProps,
|
|
119
|
+
|
|
120
|
+
text: '',
|
|
121
|
+
icon: '',
|
|
122
|
+
|
|
123
|
+
className: '',
|
|
124
|
+
|
|
125
|
+
size: 'medium',
|
|
126
|
+
rounded: 'medium',
|
|
127
|
+
|
|
128
|
+
showArrow: 'true',
|
|
129
|
+
arrowIconName: 'arrow-s',
|
|
130
|
+
|
|
131
|
+
fillMode: 'solid',
|
|
132
|
+
themeColor: 'base'
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
MenuButtonStatic.propTypes = {
|
|
136
|
+
text: typeof '',
|
|
137
|
+
icon: typeof '',
|
|
138
|
+
|
|
139
|
+
showArrow: typeof false,
|
|
140
|
+
arrowIconName: typeof '',
|
|
141
|
+
|
|
142
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
143
|
+
rounded: typeof [ null, '0', 'small', 'medium', 'large', 'full' ],
|
|
144
|
+
|
|
145
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
|
|
146
|
+
themeColor: typeof [ null, 'surface', 'base', 'primary' ],
|
|
147
|
+
|
|
148
|
+
hover: typeof false,
|
|
149
|
+
focus: typeof false,
|
|
150
|
+
active: typeof false,
|
|
151
|
+
selected: typeof false,
|
|
152
|
+
disabled: typeof false,
|
|
153
|
+
|
|
154
|
+
aria: typeof false,
|
|
155
|
+
legacy: typeof false,
|
|
156
|
+
|
|
157
|
+
className: typeof '',
|
|
158
|
+
htmlAttributes: typeof []
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export { MenuButton, MenuButtonStatic };
|
|
@@ -75,17 +75,15 @@ function NumericTextboxStatic(props) {
|
|
|
75
75
|
'k-widget',
|
|
76
76
|
'k-numerictextbox',
|
|
77
77
|
{
|
|
78
|
+
'k-state-hover': hover === true,
|
|
79
|
+
'k-state-focus': focus === true,
|
|
80
|
+
'k-state-invalid': invalid === true,
|
|
78
81
|
'k-state-disabled': disabled === true
|
|
79
82
|
}
|
|
80
83
|
];
|
|
81
84
|
|
|
82
85
|
let legacyWrapClasses = [
|
|
83
|
-
'k-numeric-wrap'
|
|
84
|
-
{
|
|
85
|
-
'k-state-hover': hover === true,
|
|
86
|
-
'k-state-focused': focus === true,
|
|
87
|
-
'k-state-invalid': invalid === true
|
|
88
|
-
}
|
|
86
|
+
'k-numeric-wrap'
|
|
89
87
|
];
|
|
90
88
|
|
|
91
89
|
let legacyInputClasses = [
|
package/src/radio/radio.jsx
CHANGED
|
@@ -62,10 +62,14 @@ function RadioStatic(props) {
|
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
64
|
|
|
65
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
<span className="k-radio-wrap"><input type="radio" className={legacyClasses} {...ariaAttr} {...htmlAttributes}/></span>
|
|
67
|
+
);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
return
|
|
70
|
+
return (
|
|
71
|
+
<span className="k-radio-wrap"><input type="radio" className={radioClasses} {...ariaAttr} {...htmlAttributes}/></span>
|
|
72
|
+
);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
RadioStatic.defaultProps = {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
```html
|
|
2
|
+
<!-- default rendering -->
|
|
3
|
+
<div class="k-split-button k-button-group k-rounded-md">
|
|
4
|
+
<button
|
|
5
|
+
class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
6
|
+
type="button"
|
|
7
|
+
>
|
|
8
|
+
<span className="k-button-text">Text</span>
|
|
9
|
+
</button>
|
|
10
|
+
<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button">
|
|
11
|
+
<span class="k-icon k-i-arrow-s"></span>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<!-- canonical rendering -->
|
|
16
|
+
<div class="k-split-button k-button-group k-rounded-${rounded}">
|
|
17
|
+
<button class="
|
|
18
|
+
k-button
|
|
19
|
+
${text === '' && icon !== '' && 'k-icon-button'}
|
|
20
|
+
k-button-${size}
|
|
21
|
+
k-button-${shape}
|
|
22
|
+
k-rounded-${rounded}
|
|
23
|
+
k-button-${fillMode}
|
|
24
|
+
k-button-${fillMode}-${themeColor}
|
|
25
|
+
k-${state}
|
|
26
|
+
${disabled && 'k-disabled'}
|
|
27
|
+
" type={type} disabled={disabled}>
|
|
28
|
+
{icon !== '' && <span class="k-button-icon k-icon k-i-${icon}"></span>}
|
|
29
|
+
{text !== '' && <span class="k-button-text">Text</span>}
|
|
30
|
+
</button>
|
|
31
|
+
<button class="
|
|
32
|
+
k-button
|
|
33
|
+
k-icon-button
|
|
34
|
+
k-button-${size}
|
|
35
|
+
k-button-${shape}
|
|
36
|
+
k-rounded-${rounded}
|
|
37
|
+
k-button-${fillMode}
|
|
38
|
+
k-button-${fillMode}-${themeColor}
|
|
39
|
+
k-${state}
|
|
40
|
+
${disabled && 'k-disabled'}
|
|
41
|
+
" type={type} disabled={disabled}>
|
|
42
|
+
<span class="k-icon k-i-${arrowIconName}"></span>
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- popup menu items default rendering -->
|
|
47
|
+
<div class="k-animation-container k-animation-container-fixed k-animation-container-shown">
|
|
48
|
+
<div class="k-popup k-menu-popup">
|
|
49
|
+
<ul class="k-group k-menu-group k-reset k-menu-group-md">
|
|
50
|
+
<li class="k-item k-menu-item">
|
|
51
|
+
<span class="k-link k-menu-link">
|
|
52
|
+
<span class="k-menu-link-text">Text</span>
|
|
53
|
+
</span>
|
|
54
|
+
</li>
|
|
55
|
+
</ul>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- popup menu items canonical rendering -->
|
|
60
|
+
<div class="k-animation-container k-animation-container-fixed k-animation-container-shown">
|
|
61
|
+
<div class="k-popup k-menu-popup">
|
|
62
|
+
<ul class="k-group k-menu-group k-reset k-menu-group-${size}">
|
|
63
|
+
<li class="k-item k-menu-item">
|
|
64
|
+
<span class="k-link k-menu-link k-${state}">
|
|
65
|
+
{icon !== '' && <span class="k-icon k-i-${icon}"></span>}
|
|
66
|
+
{text !== '' && <span class="k-menu-link-text">Text</span>}
|
|
67
|
+
{hasChildren ?
|
|
68
|
+
<span class="k-menu-expand-arrow k-icon k-i-${arrowIconName || 'arrow-60-right'}"></span> :
|
|
69
|
+
<span class="k-menu-expand-arrow k-icon k-i-none"></span>
|
|
70
|
+
}
|
|
71
|
+
</span>
|
|
72
|
+
</li>
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './splitbutton.jsx';
|