@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.
- package/lib/jsx-runtime.js +21 -10
- package/package.json +7 -7
- package/src/autocomplete/autocomplete.jsx +3 -3
- package/src/avatar/README.md +1 -1
- package/src/avatar/avatar.jsx +15 -21
- package/src/button/button.jsx +40 -22
- package/src/checkbox/checkbox.jsx +3 -3
- package/src/chip/README.md +5 -5
- package/src/chip/chip-actions.jsx +80 -0
- package/src/chip/chip-avatar.jsx +2 -10
- package/src/chip/chip-list.jsx +9 -6
- package/src/chip/chip.jsx +56 -39
- package/src/chip/index.js +2 -3
- package/src/colorpicker/README.md +24 -15
- package/src/colorpicker/color-preview.jsx +28 -21
- package/src/colorpicker/colorpicker.jsx +6 -8
- package/src/combobox/combobox.jsx +6 -8
- package/src/{component.js → component/component.jsx} +4 -2
- package/src/component/index.js +1 -0
- package/src/dateinput/dateinput.jsx +6 -8
- package/src/datepicker/datepicker.jsx +6 -8
- package/src/datetimepicker/datetimepicker.jsx +6 -8
- package/src/dropdownlist/dropdownlist.jsx +6 -8
- package/src/fab/README.md +19 -0
- package/src/fab/fab.jsx +154 -0
- package/src/fab/index.js +1 -0
- package/src/icon/icon.jsx +1 -1
- package/src/index.js +43 -6
- package/src/input/input-inner-input.jsx +1 -1
- package/src/input/input-inner-span.jsx +2 -2
- package/src/input/input-inner-textarea.jsx +1 -1
- package/src/input/input-prefix.jsx +1 -1
- package/src/input/input-suffix.jsx +1 -1
- package/src/input/input.jsx +2 -2
- package/src/input/picker.jsx +4 -4
- package/src/list/README.md +75 -26
- package/src/list/index.js +1 -3
- package/src/list/list-content.jsx +37 -61
- package/src/list/list-group-item.jsx +66 -0
- package/src/list/list-header.jsx +13 -7
- package/src/list/list-item.jsx +37 -16
- package/src/list/list.jsx +109 -6
- package/src/maskedtextbox/maskedtextbox.jsx +9 -12
- package/src/menu/README.md +40 -0
- package/src/{menuitem → menu}/index.js +1 -0
- package/src/{menuitem → menu}/menu-item-content.jsx +1 -1
- package/src/{menuitem → menu}/menu-item.jsx +28 -23
- package/src/{menulist/menulist.jsx → menu/menu-list.jsx} +12 -11
- package/src/{dropdownbutton → menubutton}/README.md +20 -20
- package/src/menubutton/index.js +1 -0
- package/src/menubutton/menubutton.jsx +161 -0
- package/src/multiselect/README.md +37 -0
- package/src/multiselect/multiselect-chip-list.jsx +1 -1
- package/src/multiselect/multiselect.jsx +10 -4
- package/src/nodata/index.js +1 -0
- package/src/nodata/nodata.jsx +64 -0
- package/src/numerictextbox/numerictextbox.jsx +6 -8
- package/src/popup/README.md +15 -0
- package/src/popup/index.js +1 -0
- package/src/popup/popup.jsx +80 -0
- package/src/radio/radio.jsx +7 -3
- package/src/searchbar/searchbar.jsx +1 -1
- package/src/searchbox/searchbox.jsx +2 -2
- package/src/spinbutton/spinbutton.jsx +1 -1
- package/src/splitbutton/README.md +2 -2
- package/src/splitbutton/splitbutton.jsx +58 -34
- package/src/switch/README.md +3 -3
- package/src/switch/switch.jsx +5 -5
- package/src/textarea/textarea.jsx +2 -2
- package/src/textbox/textbox.jsx +2 -2
- package/src/timepicker/timepicker.jsx +6 -8
- 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
- package/src/chip/chip-remove-icon.jsx +0 -45
- package/src/chip/chip-selected-icon.jsx +0 -47
- package/src/dropdownbutton/dropdownbutton.jsx +0 -149
- package/src/dropdownbutton/index.js +0 -1
- package/src/list/list-footer.jsx +0 -61
- package/src/list/list-group-header.jsx +0 -92
- package/src/list/list-item-text.jsx +0 -62
- package/src/menuitem/README.md +0 -26
- package/src/menulist/README.md +0 -11
- package/src/menulist/index.js +0 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
|
+
import { TreeviewGroupStatic } from './treeview-group.jsx';
|
|
4
|
+
import { TreeviewItemStatic } from './treeview-item.jsx';
|
|
5
|
+
|
|
6
|
+
class Treeview extends Component {
|
|
7
|
+
|
|
8
|
+
static transformUL( ul ) {
|
|
9
|
+
let children = ul.props.children;
|
|
10
|
+
let items = [];
|
|
11
|
+
|
|
12
|
+
children.filter( child => child.type === 'LI' ).forEach( li => {
|
|
13
|
+
items.push( Treeview.transformLI( li ) );
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return items;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static transformLI( li ) {
|
|
20
|
+
let children = li.props.children;
|
|
21
|
+
let text = li.props.text || '';
|
|
22
|
+
let items = [];
|
|
23
|
+
|
|
24
|
+
children.forEach( child => {
|
|
25
|
+
if (text === '' && child.type === '#text') {
|
|
26
|
+
text = child.props.text;
|
|
27
|
+
}
|
|
28
|
+
if (child.type === 'UL') {
|
|
29
|
+
items.push( ...Treeview.transformUL( child ) );
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
li.props.children = [];
|
|
34
|
+
li.props.text = text;
|
|
35
|
+
li.props.items = items;
|
|
36
|
+
|
|
37
|
+
return <TreeviewItemStatic {...li.props} />;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
init() {
|
|
41
|
+
let children = this._props.children;
|
|
42
|
+
let items = [];
|
|
43
|
+
|
|
44
|
+
children.filter( child => child.type === 'LI' ).forEach( li => {
|
|
45
|
+
items.push( Treeview.transformLI( li ) );
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
this._props.children = [];
|
|
49
|
+
this._props.items = items;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
render() {
|
|
53
|
+
return <TreeviewStatic {...this.props} />;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function TreeviewStatic(props) {
|
|
58
|
+
const {
|
|
59
|
+
className: ownClassName,
|
|
60
|
+
|
|
61
|
+
items,
|
|
62
|
+
|
|
63
|
+
size,
|
|
64
|
+
|
|
65
|
+
aria,
|
|
66
|
+
legacy,
|
|
67
|
+
|
|
68
|
+
...htmlAttributes
|
|
69
|
+
} = props;
|
|
70
|
+
|
|
71
|
+
let treeviewClasses = [
|
|
72
|
+
ownClassName,
|
|
73
|
+
'k-treeview',
|
|
74
|
+
styles.sizeClass( size, 'k-treeview' )
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
let ariaAttr = aria
|
|
78
|
+
? {}
|
|
79
|
+
: {};
|
|
80
|
+
|
|
81
|
+
if (legacy) {
|
|
82
|
+
|
|
83
|
+
let legacyTreeviewClasses = [
|
|
84
|
+
ownClassName,
|
|
85
|
+
'k-treeview'
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<div className={legacyTreeviewClasses} {...ariaAttr} {...htmlAttributes}>
|
|
90
|
+
<TreeviewGroupStatic className="k-treeview-lines" items={items} />
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<div className={treeviewClasses} {...ariaAttr} {...htmlAttributes}>
|
|
97
|
+
<TreeviewGroupStatic className="k-treeview-lines" items={items} />
|
|
98
|
+
</div>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
TreeviewStatic.defaultProps = {
|
|
103
|
+
...globalDefaultProps,
|
|
104
|
+
|
|
105
|
+
children: [],
|
|
106
|
+
items: [],
|
|
107
|
+
|
|
108
|
+
size: 'medium'
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
TreeviewStatic.propTypes = {
|
|
112
|
+
children: typeof [],
|
|
113
|
+
className: typeof '',
|
|
114
|
+
|
|
115
|
+
items: typeof [],
|
|
116
|
+
|
|
117
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
118
|
+
|
|
119
|
+
aria: typeof false,
|
|
120
|
+
legacy: typeof false,
|
|
121
|
+
|
|
122
|
+
htmlAttributes: typeof []
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export { Treeview, TreeviewStatic };
|
package/utils/styles.js
CHANGED
|
@@ -72,6 +72,14 @@ function borderedClass( bordered, prefix ) {
|
|
|
72
72
|
return `${prefix}-bordered`;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function positionClass( position, prefix ) {
|
|
76
|
+
if ( position === null ) {
|
|
77
|
+
return '';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return `k-pos-absolute ${prefix}-${position}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
function classNames( ...args ) {
|
|
76
84
|
|
|
77
85
|
/* eslint-disable arrow-body-style, no-nested-ternary */
|
|
@@ -131,6 +139,7 @@ export {
|
|
|
131
139
|
fillModeClass,
|
|
132
140
|
themeColorClass,
|
|
133
141
|
borderedClass,
|
|
142
|
+
positionClass,
|
|
134
143
|
|
|
135
144
|
classNames,
|
|
136
145
|
cssStyle,
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { IconStatic } from '../icon/index';
|
|
2
|
-
|
|
3
|
-
function ChipRemoveIconStatic(chipProps) {
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
className: ownClassName,
|
|
7
|
-
|
|
8
|
-
showRemoveIcon,
|
|
9
|
-
|
|
10
|
-
aria,
|
|
11
|
-
legacy
|
|
12
|
-
} = chipProps;
|
|
13
|
-
|
|
14
|
-
if (!showRemoveIcon) {
|
|
15
|
-
return <></>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let ariaAttr = aria
|
|
19
|
-
? {}
|
|
20
|
-
: {};
|
|
21
|
-
|
|
22
|
-
let iconClasses = [
|
|
23
|
-
ownClassName,
|
|
24
|
-
'k-chip-remove-icon',
|
|
25
|
-
'k-chip-icon'
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
let legacyClasses = [
|
|
29
|
-
ownClassName,
|
|
30
|
-
'k-remove-icon'
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
if (legacy) {
|
|
34
|
-
return (
|
|
35
|
-
<IconStatic className={legacyClasses} name="x-circle" {...ariaAttr} />
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<IconStatic className={iconClasses} name="x-circle" {...ariaAttr} />
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { ChipRemoveIconStatic };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { IconStatic } from '../icon/index';
|
|
2
|
-
|
|
3
|
-
function ChipSelectedIconStatic(chipProps) {
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
className: ownClassName,
|
|
7
|
-
|
|
8
|
-
showSelectedIcon,
|
|
9
|
-
|
|
10
|
-
selected,
|
|
11
|
-
|
|
12
|
-
aria,
|
|
13
|
-
legacy
|
|
14
|
-
} = chipProps;
|
|
15
|
-
|
|
16
|
-
if (!showSelectedIcon || !selected) {
|
|
17
|
-
return <></>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let ariaAttr = aria
|
|
21
|
-
? {}
|
|
22
|
-
: {};
|
|
23
|
-
|
|
24
|
-
let iconClasses = [
|
|
25
|
-
ownClassName,
|
|
26
|
-
'k-selected-icon',
|
|
27
|
-
'k-chip-icon'
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
let legacyClasses = [
|
|
31
|
-
ownClassName,
|
|
32
|
-
'k-chip-selected-icon'
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
if (legacy) {
|
|
36
|
-
return (
|
|
37
|
-
<span className="k-selected-icon-wrapper">
|
|
38
|
-
<IconStatic name="check" className={legacyClasses} {...ariaAttr} />
|
|
39
|
-
</span>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return ("");
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { ChipSelectedIconStatic };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
import { ButtonStatic } from '../button/index';
|
|
3
|
-
|
|
4
|
-
class DropDownButton extends Component {
|
|
5
|
-
|
|
6
|
-
init() {
|
|
7
|
-
this._props.text = this.element.innerHTML;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
render() {
|
|
11
|
-
return <DropDownButtonStatic {...this.props} />;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function DropDownButtonStatic(props) {
|
|
16
|
-
const {
|
|
17
|
-
className: ownClassName,
|
|
18
|
-
|
|
19
|
-
text,
|
|
20
|
-
|
|
21
|
-
size,
|
|
22
|
-
rounded,
|
|
23
|
-
shape,
|
|
24
|
-
|
|
25
|
-
fillMode,
|
|
26
|
-
themeColor,
|
|
27
|
-
|
|
28
|
-
icon,
|
|
29
|
-
|
|
30
|
-
showArrow,
|
|
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 dropDownButtonClasses = [
|
|
46
|
-
ownClassName,
|
|
47
|
-
'k-dropdown-button',
|
|
48
|
-
{
|
|
49
|
-
'k-focus': focus === true
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let legacyDropDownButtonClasses = [
|
|
55
|
-
ownClassName,
|
|
56
|
-
'k-widget',
|
|
57
|
-
'k-dropdown-button',
|
|
58
|
-
{
|
|
59
|
-
'k-state-focused': focus === true
|
|
60
|
-
}
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
// Augment attributes
|
|
64
|
-
htmlAttributes.disabled = disabled;
|
|
65
|
-
|
|
66
|
-
let ariaAttr = aria
|
|
67
|
-
? {}
|
|
68
|
-
: {};
|
|
69
|
-
|
|
70
|
-
if (legacy) {
|
|
71
|
-
return (
|
|
72
|
-
<div className={legacyDropDownButtonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
73
|
-
<ButtonStatic legacy={true}></ButtonStatic>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
// eslint-disable-next-line no-nested-ternary
|
|
78
|
-
let renderText = text !== '' && showArrow ?
|
|
79
|
-
<>{text}<span className={`k-icon k-i-${arrowIconName || 'arrow-s'}`}></span></> :
|
|
80
|
-
// eslint-disable-next-line no-nested-ternary
|
|
81
|
-
text !== '' && !showArrow ?
|
|
82
|
-
text :
|
|
83
|
-
text === '' && showArrow ?
|
|
84
|
-
<span className={`k-icon k-i-${arrowIconName || 'arrow-s'}`}></span> :
|
|
85
|
-
undefined;
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<div className={dropDownButtonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
89
|
-
<ButtonStatic
|
|
90
|
-
text={renderText}
|
|
91
|
-
disabled={disabled}
|
|
92
|
-
hover={hover}
|
|
93
|
-
active={active}
|
|
94
|
-
selected={selected}
|
|
95
|
-
focus={focus}
|
|
96
|
-
size={size}
|
|
97
|
-
rounded={rounded}
|
|
98
|
-
shape={shape}
|
|
99
|
-
fillMode={fillMode}
|
|
100
|
-
themeColor={themeColor}
|
|
101
|
-
icon={icon}></ButtonStatic>
|
|
102
|
-
</div>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
DropDownButtonStatic.defaultProps = {
|
|
107
|
-
...globalDefaultProps,
|
|
108
|
-
|
|
109
|
-
text: '',
|
|
110
|
-
icon: '',
|
|
111
|
-
|
|
112
|
-
className: '',
|
|
113
|
-
|
|
114
|
-
size: 'medium',
|
|
115
|
-
rounded: 'medium',
|
|
116
|
-
shape: 'rectangle',
|
|
117
|
-
|
|
118
|
-
fillMode: 'solid',
|
|
119
|
-
themeColor: 'base'
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
DropDownButtonStatic.propTypes = {
|
|
123
|
-
text: typeof '',
|
|
124
|
-
icon: typeof '',
|
|
125
|
-
|
|
126
|
-
showArrow: typeof false,
|
|
127
|
-
arrowIconName: typeof '',
|
|
128
|
-
|
|
129
|
-
size: typeof [ 'none', 'small', 'medium', 'large' ],
|
|
130
|
-
rounded: typeof [ 'none', '0', 'small', 'medium', 'large', 'pill', 'circle' ],
|
|
131
|
-
shape: typeof [ 'none', 'rectangle', 'square' ],
|
|
132
|
-
|
|
133
|
-
fillMode: typeof [ 'none', 'solid', 'flat', 'outline', 'link' ],
|
|
134
|
-
themeColor: typeof [ 'none', 'surface', 'base', 'primary' ],
|
|
135
|
-
|
|
136
|
-
hover: typeof false,
|
|
137
|
-
focus: typeof false,
|
|
138
|
-
active: typeof false,
|
|
139
|
-
selected: typeof false,
|
|
140
|
-
disabled: typeof false,
|
|
141
|
-
|
|
142
|
-
aria: typeof false,
|
|
143
|
-
legacy: typeof false,
|
|
144
|
-
|
|
145
|
-
className: typeof '',
|
|
146
|
-
htmlAttributes: typeof []
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export { DropDownButton, DropDownButtonStatic };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dropdownbutton.jsx';
|
package/src/list/list-footer.jsx
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
|
|
3
|
-
class ListFooter extends Component {
|
|
4
|
-
render() {
|
|
5
|
-
return <ListFooterStatic {...this.props} />;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function ListFooterStatic(props) {
|
|
10
|
-
const {
|
|
11
|
-
className: ownClassName,
|
|
12
|
-
|
|
13
|
-
aria,
|
|
14
|
-
legacy,
|
|
15
|
-
|
|
16
|
-
...htmlAttributes
|
|
17
|
-
} = props;
|
|
18
|
-
|
|
19
|
-
let listFooterClasses = [
|
|
20
|
-
ownClassName,
|
|
21
|
-
'k-list-footer'
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
let legacyListFooterClasses = [
|
|
25
|
-
ownClassName
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
let ariaAttr = aria
|
|
29
|
-
? {}
|
|
30
|
-
: {};
|
|
31
|
-
|
|
32
|
-
if (legacy) {
|
|
33
|
-
return (
|
|
34
|
-
<div className={legacyListFooterClasses} {...ariaAttr} {...htmlAttributes}>
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className={listFooterClasses} {...ariaAttr} {...htmlAttributes}>
|
|
42
|
-
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
ListFooterStatic.defaultProps = {
|
|
48
|
-
...globalDefaultProps,
|
|
49
|
-
|
|
50
|
-
className: ''
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
ListFooterStatic.propTypes = {
|
|
54
|
-
aria: typeof false,
|
|
55
|
-
legacy: typeof false,
|
|
56
|
-
|
|
57
|
-
className: typeof '',
|
|
58
|
-
htmlAttributes: typeof []
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export { ListFooter, ListFooterStatic };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
|
|
3
|
-
class ListGroupHeader extends Component {
|
|
4
|
-
render() {
|
|
5
|
-
return <ListGroupHeaderStatic {...this.props} />;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function ListGroupHeaderStatic(props) {
|
|
10
|
-
const {
|
|
11
|
-
className: ownClassName,
|
|
12
|
-
|
|
13
|
-
stuck,
|
|
14
|
-
virtualization,
|
|
15
|
-
|
|
16
|
-
aria,
|
|
17
|
-
legacy,
|
|
18
|
-
|
|
19
|
-
...htmlAttributes
|
|
20
|
-
} = props;
|
|
21
|
-
|
|
22
|
-
let listGroupHeaderClasses = [
|
|
23
|
-
ownClassName,
|
|
24
|
-
'k-list-group-header',
|
|
25
|
-
{
|
|
26
|
-
'k-stuck': stuck === true
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
let legacyListGroupHeaderClasses = [
|
|
31
|
-
ownClassName,
|
|
32
|
-
'k-outer-group-header',
|
|
33
|
-
{
|
|
34
|
-
'k-first': stuck === true,
|
|
35
|
-
'k-virtual-item': virtualization === true
|
|
36
|
-
}
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
let ariaAttr = aria
|
|
40
|
-
? {}
|
|
41
|
-
: {};
|
|
42
|
-
|
|
43
|
-
if (legacy) {
|
|
44
|
-
if (stuck) {
|
|
45
|
-
return (
|
|
46
|
-
<div className={legacyListGroupHeaderClasses} {...ariaAttr} {...htmlAttributes}>
|
|
47
|
-
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
} else {
|
|
51
|
-
return (
|
|
52
|
-
<li className={legacyListGroupHeaderClasses} {...ariaAttr} {...htmlAttributes}>
|
|
53
|
-
|
|
54
|
-
</li>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (stuck) {
|
|
60
|
-
return (
|
|
61
|
-
<div className={listGroupHeaderClasses} {...ariaAttr} {...htmlAttributes}>
|
|
62
|
-
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
} else {
|
|
66
|
-
return (
|
|
67
|
-
<li className={listGroupHeaderClasses} {...ariaAttr} {...htmlAttributes}>
|
|
68
|
-
|
|
69
|
-
</li>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
ListGroupHeaderStatic.defaultProps = {
|
|
75
|
-
...globalDefaultProps,
|
|
76
|
-
|
|
77
|
-
className: '',
|
|
78
|
-
|
|
79
|
-
stuck: false
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
ListGroupHeaderStatic.propTypes = {
|
|
83
|
-
stuck: typeof false,
|
|
84
|
-
|
|
85
|
-
aria: typeof false,
|
|
86
|
-
legacy: typeof false,
|
|
87
|
-
|
|
88
|
-
className: typeof '',
|
|
89
|
-
htmlAttributes: typeof []
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export { ListGroupHeader, ListGroupHeaderStatic };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
|
|
3
|
-
class ListItemText extends Component {
|
|
4
|
-
render() {
|
|
5
|
-
return <ListItemTextStatic {...this.props} />;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function ListItemTextStatic(props) {
|
|
10
|
-
const {
|
|
11
|
-
className: ownClassName,
|
|
12
|
-
|
|
13
|
-
aria,
|
|
14
|
-
legacy,
|
|
15
|
-
|
|
16
|
-
...htmlAttributes
|
|
17
|
-
} = props;
|
|
18
|
-
|
|
19
|
-
let listItemTextClasses = [
|
|
20
|
-
ownClassName,
|
|
21
|
-
'k-list-item-text'
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let legacyListItemTextClasses = [
|
|
26
|
-
ownClassName,
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
let ariaAttr = aria
|
|
30
|
-
? {}
|
|
31
|
-
: {};
|
|
32
|
-
|
|
33
|
-
if (legacy) {
|
|
34
|
-
return (
|
|
35
|
-
<span className={legacyListItemTextClasses} {...ariaAttr} {...htmlAttributes}>
|
|
36
|
-
|
|
37
|
-
</span>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<span className={listItemTextClasses} {...ariaAttr} {...htmlAttributes}>
|
|
43
|
-
|
|
44
|
-
</span>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
ListItemTextStatic.defaultProps = {
|
|
49
|
-
...globalDefaultProps,
|
|
50
|
-
|
|
51
|
-
className: ''
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
ListItemTextStatic.propTypes = {
|
|
55
|
-
aria: typeof false,
|
|
56
|
-
legacy: typeof false,
|
|
57
|
-
|
|
58
|
-
className: typeof '',
|
|
59
|
-
htmlAttributes: typeof []
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { ListItemText, ListItemTextStatic };
|
package/src/menuitem/README.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
```html
|
|
2
|
-
<!-- default rendering -->
|
|
3
|
-
<li class="k-item k-menu-item">
|
|
4
|
-
<span class="k-link k-menu-link">
|
|
5
|
-
{icon !== '' && <span class="k-icon k-i-${icon}"></span>}
|
|
6
|
-
{text !== '' && <span class="k-menu-link-text">Text</span>}
|
|
7
|
-
<span className="k-menu-expand-arrow k-icon k-i-${arrowIconName || 'none'}"></span>
|
|
8
|
-
</span>
|
|
9
|
-
</li>
|
|
10
|
-
|
|
11
|
-
<!-- canonical rendering -->
|
|
12
|
-
<li class="
|
|
13
|
-
k-item
|
|
14
|
-
k-menu-item
|
|
15
|
-
${hover && 'k-hover'}
|
|
16
|
-
${focus && 'k-focus'}
|
|
17
|
-
${active && 'k-active'}
|
|
18
|
-
${disabled && 'k-disabled'}
|
|
19
|
-
" disabled={disabled}>
|
|
20
|
-
<span class="k-link k-menu-link">
|
|
21
|
-
{icon !== '' && <span class="k-icon k-i-${icon}"></span>}
|
|
22
|
-
{text !== '' && <span class="k-menu-link-text">Text</span>}
|
|
23
|
-
<span className="k-menu-expand-arrow k-icon k-i-${arrowIconName || 'none'}"></span>
|
|
24
|
-
</span>
|
|
25
|
-
</li>
|
|
26
|
-
```
|
package/src/menulist/README.md
DELETED
package/src/menulist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './menulist.jsx';
|