@progress/kendo-themes-html 4.43.1-dev.4 → 4.43.1-dev.8
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 +18 -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/fab/fab.jsx +1 -5
- package/src/index.js +4 -1
- package/src/input/input-inner-span.jsx +1 -1
- 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
|
@@ -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';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
|
+
import { ButtonStatic } from '../button/index';
|
|
4
|
+
|
|
5
|
+
class SplitButton extends Component {
|
|
6
|
+
|
|
7
|
+
init() {
|
|
8
|
+
this._props.text = this.element.innerHTML;
|
|
9
|
+
this._props.children = [];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
return <SplitButtonStatic {...this.props} />;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function SplitButtonStatic(props) {
|
|
18
|
+
const {
|
|
19
|
+
className: ownClassName,
|
|
20
|
+
|
|
21
|
+
text,
|
|
22
|
+
|
|
23
|
+
size,
|
|
24
|
+
rounded,
|
|
25
|
+
|
|
26
|
+
fillMode,
|
|
27
|
+
themeColor,
|
|
28
|
+
|
|
29
|
+
icon,
|
|
30
|
+
|
|
31
|
+
arrowIconName,
|
|
32
|
+
|
|
33
|
+
hover,
|
|
34
|
+
focus,
|
|
35
|
+
active,
|
|
36
|
+
selected,
|
|
37
|
+
disabled,
|
|
38
|
+
|
|
39
|
+
aria,
|
|
40
|
+
legacy,
|
|
41
|
+
|
|
42
|
+
...htmlAttributes
|
|
43
|
+
} = props;
|
|
44
|
+
|
|
45
|
+
let splitButtonClasses = [
|
|
46
|
+
ownClassName,
|
|
47
|
+
'k-split-button',
|
|
48
|
+
'k-button-group',
|
|
49
|
+
styles.roundedClass( rounded )
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
// Augment attributes
|
|
53
|
+
htmlAttributes.disabled = disabled;
|
|
54
|
+
|
|
55
|
+
let ariaAttr = aria
|
|
56
|
+
? {}
|
|
57
|
+
: {};
|
|
58
|
+
|
|
59
|
+
if (legacy) {
|
|
60
|
+
|
|
61
|
+
let legacySplitButtonClasses = [
|
|
62
|
+
ownClassName,
|
|
63
|
+
'k-split-button',
|
|
64
|
+
'k-button-group'
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className={legacySplitButtonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
69
|
+
<ButtonStatic
|
|
70
|
+
text={text}
|
|
71
|
+
icon={icon}
|
|
72
|
+
|
|
73
|
+
size={size}
|
|
74
|
+
rounded={rounded}
|
|
75
|
+
fillMode={fillMode}
|
|
76
|
+
themeColor={themeColor}
|
|
77
|
+
|
|
78
|
+
hover={hover}
|
|
79
|
+
focus={focus}
|
|
80
|
+
active={active}
|
|
81
|
+
selected={selected}
|
|
82
|
+
disabled={disabled}
|
|
83
|
+
></ButtonStatic>
|
|
84
|
+
<ButtonStatic
|
|
85
|
+
className="k-split-button-arrow"
|
|
86
|
+
|
|
87
|
+
icon={arrowIconName}
|
|
88
|
+
|
|
89
|
+
size={size}
|
|
90
|
+
rounded={rounded}
|
|
91
|
+
fillMode={fillMode}
|
|
92
|
+
themeColor={themeColor}
|
|
93
|
+
|
|
94
|
+
disabled={disabled}
|
|
95
|
+
></ButtonStatic>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<div className={splitButtonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
102
|
+
<ButtonStatic
|
|
103
|
+
text={text}
|
|
104
|
+
icon={icon}
|
|
105
|
+
|
|
106
|
+
size={size}
|
|
107
|
+
rounded={rounded}
|
|
108
|
+
fillMode={fillMode}
|
|
109
|
+
themeColor={themeColor}
|
|
110
|
+
|
|
111
|
+
hover={hover}
|
|
112
|
+
focus={focus}
|
|
113
|
+
active={active}
|
|
114
|
+
selected={selected}
|
|
115
|
+
disabled={disabled}
|
|
116
|
+
></ButtonStatic>
|
|
117
|
+
<ButtonStatic
|
|
118
|
+
className="k-split-button-arrow"
|
|
119
|
+
|
|
120
|
+
icon={arrowIconName}
|
|
121
|
+
|
|
122
|
+
size={size}
|
|
123
|
+
rounded={rounded}
|
|
124
|
+
fillMode={fillMode}
|
|
125
|
+
themeColor={themeColor}
|
|
126
|
+
|
|
127
|
+
disabled={disabled}
|
|
128
|
+
></ButtonStatic>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
SplitButtonStatic.defaultProps = {
|
|
134
|
+
...globalDefaultProps,
|
|
135
|
+
|
|
136
|
+
text: '',
|
|
137
|
+
icon: '',
|
|
138
|
+
|
|
139
|
+
arrowIconName: 'arrow-s',
|
|
140
|
+
|
|
141
|
+
className: '',
|
|
142
|
+
type: 'button',
|
|
143
|
+
|
|
144
|
+
size: 'medium',
|
|
145
|
+
rounded: 'medium',
|
|
146
|
+
|
|
147
|
+
fillMode: 'solid',
|
|
148
|
+
themeColor: 'base'
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
SplitButtonStatic.propTypes = {
|
|
152
|
+
text: typeof '',
|
|
153
|
+
icon: typeof '',
|
|
154
|
+
|
|
155
|
+
arrowIconName: typeof '',
|
|
156
|
+
|
|
157
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
158
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
159
|
+
|
|
160
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
|
|
161
|
+
themeColor: typeof [ null, 'surface', 'base', 'primary' ],
|
|
162
|
+
|
|
163
|
+
hover: typeof false,
|
|
164
|
+
focus: typeof false,
|
|
165
|
+
active: typeof false,
|
|
166
|
+
selected: typeof false,
|
|
167
|
+
disabled: typeof false,
|
|
168
|
+
|
|
169
|
+
aria: typeof false,
|
|
170
|
+
legacy: typeof false,
|
|
171
|
+
|
|
172
|
+
className: typeof '',
|
|
173
|
+
htmlAttributes: typeof []
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export { SplitButton, SplitButtonStatic };
|
package/src/switch/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
```html
|
|
2
2
|
<!-- default rendering -->
|
|
3
|
-
<span class="k-switch k-switch-on k-switch-md k-rounded-
|
|
4
|
-
<span class="k-switch-track k-rounded-
|
|
3
|
+
<span class="k-switch k-switch-on k-switch-md k-rounded-full">
|
|
4
|
+
<span class="k-switch-track k-rounded-full">
|
|
5
5
|
<span class="k-switch-label-on">On</span>
|
|
6
6
|
<span class="k-switch-label-off">Off</span>
|
|
7
7
|
</span>
|
|
8
8
|
<span class="k-switch-thumb-wrap">
|
|
9
|
-
<span class="k-switch-thumb k-rounded-
|
|
9
|
+
<span class="k-switch-thumb k-rounded-full"></span>
|
|
10
10
|
</span>
|
|
11
11
|
</span>
|
|
12
12
|
|
|
File without changes
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
|
|
3
|
+
class TreeviewGroup extends Component {
|
|
4
|
+
render() {
|
|
5
|
+
return <TreeviewGroupStatic {...this.props} />;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function TreeviewGroupStatic(props) {
|
|
10
|
+
const {
|
|
11
|
+
className: ownClassName,
|
|
12
|
+
|
|
13
|
+
items,
|
|
14
|
+
|
|
15
|
+
aria,
|
|
16
|
+
legacy,
|
|
17
|
+
|
|
18
|
+
...htmlAttributes
|
|
19
|
+
} = props;
|
|
20
|
+
|
|
21
|
+
let treeviewULClasses = [
|
|
22
|
+
ownClassName,
|
|
23
|
+
'k-treeview-group'
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
let ariaAttr = aria
|
|
27
|
+
? {}
|
|
28
|
+
: {};
|
|
29
|
+
|
|
30
|
+
if (legacy) {
|
|
31
|
+
|
|
32
|
+
let legacyTreeviewULClasses = [
|
|
33
|
+
ownClassName,
|
|
34
|
+
'k-group',
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ul className={legacyTreeviewULClasses} {...ariaAttr} {...htmlAttributes}>
|
|
39
|
+
{items}
|
|
40
|
+
</ul>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<ul className={treeviewULClasses} {...ariaAttr} {...htmlAttributes}>
|
|
46
|
+
{items}
|
|
47
|
+
</ul>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
TreeviewGroupStatic.defaultProps = {
|
|
52
|
+
...globalDefaultProps,
|
|
53
|
+
|
|
54
|
+
children: [],
|
|
55
|
+
items: []
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
TreeviewGroupStatic.propTypes = {
|
|
59
|
+
children: typeof [],
|
|
60
|
+
className: typeof '',
|
|
61
|
+
|
|
62
|
+
items: typeof [],
|
|
63
|
+
|
|
64
|
+
aria: typeof false,
|
|
65
|
+
legacy: typeof false,
|
|
66
|
+
|
|
67
|
+
htmlAttributes: typeof []
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { TreeviewGroup, TreeviewGroupStatic };
|