@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
package/src/fab/fab.jsx
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
|
+
import { IconStatic } from '../icon/index';
|
|
4
|
+
|
|
5
|
+
class Fab extends Component {
|
|
6
|
+
|
|
7
|
+
init() {
|
|
8
|
+
this._props.text = this.element.innerHTML;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
return <FabStatic {...this.props} />;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function FabStatic(props) {
|
|
17
|
+
const {
|
|
18
|
+
className: ownClassName,
|
|
19
|
+
|
|
20
|
+
text,
|
|
21
|
+
type,
|
|
22
|
+
|
|
23
|
+
size,
|
|
24
|
+
rounded,
|
|
25
|
+
shape,
|
|
26
|
+
|
|
27
|
+
fillMode,
|
|
28
|
+
themeColor,
|
|
29
|
+
|
|
30
|
+
icon,
|
|
31
|
+
|
|
32
|
+
position,
|
|
33
|
+
|
|
34
|
+
hover,
|
|
35
|
+
focus,
|
|
36
|
+
active,
|
|
37
|
+
selected,
|
|
38
|
+
disabled,
|
|
39
|
+
|
|
40
|
+
aria,
|
|
41
|
+
legacy,
|
|
42
|
+
|
|
43
|
+
...htmlAttributes
|
|
44
|
+
} = props;
|
|
45
|
+
|
|
46
|
+
let buttonClasses = [
|
|
47
|
+
ownClassName,
|
|
48
|
+
'k-fab',
|
|
49
|
+
styles.positionClass( position, 'k'),
|
|
50
|
+
styles.shapeClass( shape, 'k-fab' ),
|
|
51
|
+
styles.sizeClass( size, 'k-fab' ),
|
|
52
|
+
styles.roundedClass( rounded ),
|
|
53
|
+
styles.fillModeClass( fillMode, 'k-fab' ),
|
|
54
|
+
styles.themeColorClass( fillMode, themeColor, 'k-fab' ),
|
|
55
|
+
{
|
|
56
|
+
'k-hover': hover === true,
|
|
57
|
+
'k-focus': focus === true,
|
|
58
|
+
'k-active': active === true,
|
|
59
|
+
'k-selected': selected === true,
|
|
60
|
+
'k-disabled': disabled === true
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
// Augment attributes
|
|
65
|
+
htmlAttributes.disabled = disabled;
|
|
66
|
+
|
|
67
|
+
let ariaAttr = aria
|
|
68
|
+
? {}
|
|
69
|
+
: {};
|
|
70
|
+
|
|
71
|
+
if (legacy) {
|
|
72
|
+
let legacyClasses = [
|
|
73
|
+
ownClassName,
|
|
74
|
+
'k-fab',
|
|
75
|
+
`k-fab-${themeColor}`,
|
|
76
|
+
{
|
|
77
|
+
'k-fab-rectangle': rounded === null,
|
|
78
|
+
'k-fab-rounded': rounded !== 'full' && rounded !== null,
|
|
79
|
+
'k-fab-pill': rounded === 'full'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
'k-state-hover': hover === true,
|
|
83
|
+
'k-state-focus': focus === true,
|
|
84
|
+
'k-state-active': active === true,
|
|
85
|
+
'k-state-selected': selected === true,
|
|
86
|
+
'k-state-disabled': disabled === true
|
|
87
|
+
},
|
|
88
|
+
styles.positionClass( position, 'k'),
|
|
89
|
+
styles.sizeClass( size, 'k-fab' )
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<button type={type} className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
|
|
94
|
+
<IconStatic className="k-fab-icon" name={icon} />
|
|
95
|
+
{text && <span className="k-fab-text">{text}</span>}
|
|
96
|
+
</button>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<button type={type} className={buttonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
102
|
+
<IconStatic className="k-fab-icon" name={icon} />
|
|
103
|
+
{text && <span className="k-fab-text">{text}</span>}
|
|
104
|
+
</button>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
FabStatic.defaultProps = {
|
|
109
|
+
...globalDefaultProps,
|
|
110
|
+
|
|
111
|
+
text: '',
|
|
112
|
+
icon: '',
|
|
113
|
+
|
|
114
|
+
className: '',
|
|
115
|
+
type: 'button',
|
|
116
|
+
|
|
117
|
+
size: 'medium',
|
|
118
|
+
rounded: 'full',
|
|
119
|
+
shape: 'rectangle',
|
|
120
|
+
|
|
121
|
+
position: null,
|
|
122
|
+
|
|
123
|
+
fillMode: 'solid',
|
|
124
|
+
themeColor: 'primary'
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
FabStatic.propTypes = {
|
|
128
|
+
text: typeof '',
|
|
129
|
+
icon: typeof '',
|
|
130
|
+
|
|
131
|
+
type: typeof [ 'button', 'submit', 'reset' ],
|
|
132
|
+
|
|
133
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
134
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
135
|
+
shape: typeof [ null, 'rectangle', 'square' ],
|
|
136
|
+
fillMode: typeof [ null, 'solid' ],
|
|
137
|
+
themeColor: typeof [ null, 'primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse' ],
|
|
138
|
+
|
|
139
|
+
position: typeof [ null, 'top-start', 'top-center', 'top-end', 'middle-start', 'middle-end', 'bottom-start', 'bottom-center', 'bottom-end' ],
|
|
140
|
+
|
|
141
|
+
hover: typeof false,
|
|
142
|
+
focus: typeof false,
|
|
143
|
+
active: typeof false,
|
|
144
|
+
selected: typeof false,
|
|
145
|
+
disabled: typeof false,
|
|
146
|
+
|
|
147
|
+
aria: typeof false,
|
|
148
|
+
legacy: typeof false,
|
|
149
|
+
|
|
150
|
+
className: typeof '',
|
|
151
|
+
htmlAttributes: typeof []
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export { Fab, FabStatic };
|
package/src/fab/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fab.jsx';
|
package/src/icon/icon.jsx
CHANGED
package/src/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export function init() {
|
|
|
16
16
|
window.addEventListener('DOMContentLoaded', init);
|
|
17
17
|
|
|
18
18
|
// Dependencies
|
|
19
|
-
export * from './component';
|
|
19
|
+
export * from './component/index';
|
|
20
20
|
|
|
21
21
|
// Generic content
|
|
22
22
|
export * from './icon/index';
|
|
@@ -24,15 +24,21 @@ export * from './icon/index';
|
|
|
24
24
|
// Primitive components
|
|
25
25
|
export * from './input/index';
|
|
26
26
|
// export * from './picker/index';
|
|
27
|
-
|
|
27
|
+
export * from './popup/index';
|
|
28
28
|
export * from './list/index';
|
|
29
|
+
export * from './nodata/index';
|
|
30
|
+
|
|
31
|
+
// Indicators
|
|
29
32
|
export * from './avatar/index';
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
33
|
+
// export * from './badge/index';
|
|
34
|
+
export * from './chip/index';
|
|
35
|
+
// export * from './color-preview/index';
|
|
36
|
+
// export * from './loader/index';
|
|
37
|
+
// export * from './skeleton/index';
|
|
32
38
|
|
|
33
39
|
// Native forms
|
|
34
40
|
export * from './button/index';
|
|
35
|
-
export * from './
|
|
41
|
+
export * from './menubutton/index';
|
|
36
42
|
export * from './splitbutton/index';
|
|
37
43
|
export * from './textbox/index';
|
|
38
44
|
export * from './textarea/index';
|
|
@@ -41,7 +47,6 @@ export * from './radio/index';
|
|
|
41
47
|
// export * from './listbox/index';
|
|
42
48
|
// export * from './progressbar/index';
|
|
43
49
|
// export * from './slider/index';
|
|
44
|
-
export * from './chip/index';
|
|
45
50
|
|
|
46
51
|
// Augmented inputs
|
|
47
52
|
export * from './autocomplete/index';
|
|
@@ -63,3 +68,35 @@ export * from './searchbox/index';
|
|
|
63
68
|
export * from './switch/index';
|
|
64
69
|
// export * from './upload/index';
|
|
65
70
|
// export * from './dropzone/index';
|
|
71
|
+
|
|
72
|
+
// Command interfaces
|
|
73
|
+
// export * from './action-buttons/index';
|
|
74
|
+
export * from './fab/index';
|
|
75
|
+
export * from './menu/index';
|
|
76
|
+
// export * from './toolbar/index';
|
|
77
|
+
|
|
78
|
+
// Popups and modals
|
|
79
|
+
// export * from './action-sheet/index';
|
|
80
|
+
// export * from './dialog/index';
|
|
81
|
+
// export * from './drawer/index';
|
|
82
|
+
// export * from './notification/index';
|
|
83
|
+
// export * from './popover/index';
|
|
84
|
+
// export * from './tooltip/index';
|
|
85
|
+
// export * from './window/index';
|
|
86
|
+
|
|
87
|
+
// Navigation
|
|
88
|
+
// export * from './appbar/index';
|
|
89
|
+
// export * from './bottom-nav/index';
|
|
90
|
+
// export * from './breadcrumb/index';
|
|
91
|
+
// export * from './pager/index';
|
|
92
|
+
// export * from './stepper/index';
|
|
93
|
+
// export * from './tabstrip/index';
|
|
94
|
+
export * from './treeview/index';
|
|
95
|
+
// export * from './wizard/index';
|
|
96
|
+
|
|
97
|
+
// Layout & containers
|
|
98
|
+
// export * from './card/index';
|
|
99
|
+
// export * from './expander/index';
|
|
100
|
+
// export * from './panelbar/index';
|
|
101
|
+
// export * from './splitter/index';
|
|
102
|
+
// export * from './tile-layout/index';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconStatic } from '../icon/index';
|
|
2
|
-
import { Component, globalDefaultProps } from '../component';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
3
|
|
|
4
4
|
class InputInnerSpan extends Component {
|
|
5
5
|
render() {
|
|
@@ -56,7 +56,7 @@ function InputInnerSpanStatic(props) {
|
|
|
56
56
|
{valueIcon}
|
|
57
57
|
{valueIcon === null && <IconStatic className="k-icon k-input-value-icon" name={valueIconName} />}
|
|
58
58
|
{showValue && value === '' && placeholder}
|
|
59
|
-
{showValue && value && <span className="k-value-text">{value}</span>}
|
|
59
|
+
{showValue && value && <span className="k-input-value-text">{value}</span>}
|
|
60
60
|
</span>
|
|
61
61
|
);
|
|
62
62
|
}
|
package/src/input/input.jsx
CHANGED
|
@@ -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 Input extends Component {
|
|
5
5
|
|
|
@@ -127,7 +127,7 @@ InputStatic.propTypes = {
|
|
|
127
127
|
suffix: typeof '#fragment',
|
|
128
128
|
|
|
129
129
|
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
130
|
-
rounded: typeof [ null, 'small', 'medium', 'large', '
|
|
130
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
131
131
|
|
|
132
132
|
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
133
133
|
|
package/src/input/picker.jsx
CHANGED
|
@@ -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 Picker extends Component {
|
|
5
5
|
|
|
@@ -62,9 +62,9 @@ function PickerStatic(props) {
|
|
|
62
62
|
let pickerClasses = [
|
|
63
63
|
ownClassName,
|
|
64
64
|
'k-picker',
|
|
65
|
-
styles.sizeClass( size, 'k-
|
|
65
|
+
styles.sizeClass( size, 'k-picker' ),
|
|
66
66
|
styles.roundedClass( rounded ),
|
|
67
|
-
styles.fillModeClass( fillMode, 'k-
|
|
67
|
+
styles.fillModeClass( fillMode, 'k-picker' ),
|
|
68
68
|
{
|
|
69
69
|
'k-hover': hover === true,
|
|
70
70
|
'k-focus': focus === true,
|
|
@@ -125,7 +125,7 @@ PickerStatic.propTypes = {
|
|
|
125
125
|
suffix: typeof '#fragment',
|
|
126
126
|
|
|
127
127
|
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
128
|
-
rounded: typeof [ null, 'small', 'medium', 'large', '
|
|
128
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
129
129
|
|
|
130
130
|
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
131
131
|
|
package/src/list/README.md
CHANGED
|
@@ -1,58 +1,107 @@
|
|
|
1
1
|
```html
|
|
2
|
-
<!--
|
|
2
|
+
<!-- jquery / react / vue rendering -->
|
|
3
3
|
<div class="k-list k-list-md">
|
|
4
|
-
<div class="k-list-header">
|
|
5
|
-
<div class="k-list-
|
|
6
|
-
<div class="k-list-content k-list-scroller">
|
|
4
|
+
<div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
|
|
5
|
+
<div class="k-list-content">
|
|
7
6
|
<ul class="k-list-ul">
|
|
8
7
|
<li class="k-list-item">
|
|
9
|
-
<span class="k-list-item-text">Item 1</span>
|
|
8
|
+
<span class="k-list-item-text">Item 1.1</span>
|
|
10
9
|
</li>
|
|
11
10
|
<li class="k-list-item">
|
|
12
|
-
<span class="k-list-item-text">Item 2</span>
|
|
11
|
+
<span class="k-list-item-text">Item 1.2</span>
|
|
13
12
|
</li>
|
|
13
|
+
<li class="k-list-item k-first">
|
|
14
|
+
<span class="k-list-item-text">Item 2.1</span>
|
|
15
|
+
<span class="k-list-group-label">Group 2</span>
|
|
16
|
+
</li>
|
|
17
|
+
<li class="k-list-item">
|
|
18
|
+
<span class="k-list-item-text">Item 2.2</span>
|
|
19
|
+
</li>
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<!-- jquery / react / vue rendering w/ virtualization -->
|
|
25
|
+
<div class="k-list k-virtual-list k-list-md">
|
|
26
|
+
<div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
|
|
27
|
+
<div class="k-list-content">
|
|
28
|
+
<ul class="k-list-ul">
|
|
14
29
|
<li class="k-list-item">
|
|
15
|
-
<span class="k-list-item-text">Item
|
|
30
|
+
<span class="k-list-item-text">Item 1.1</span>
|
|
16
31
|
</li>
|
|
17
|
-
<li class="k-list-group-header">Normal Group Header</li>
|
|
18
32
|
<li class="k-list-item">
|
|
19
|
-
<span class="k-list-item-text">Item
|
|
33
|
+
<span class="k-list-item-text">Item 1.2</span>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="k-list-item k-first">
|
|
36
|
+
<span class="k-list-item-text">Item 2.1</span>
|
|
37
|
+
<span class="k-list-group-label">Group 2</span>
|
|
20
38
|
</li>
|
|
21
39
|
<li class="k-list-item">
|
|
22
|
-
<span class="k-list-item-text">Item
|
|
40
|
+
<span class="k-list-item-text">Item 2.2</span>
|
|
23
41
|
</li>
|
|
24
42
|
</ul>
|
|
25
43
|
</div>
|
|
26
|
-
<div class="k-list-footer">Footer goes here</div>
|
|
27
44
|
</div>
|
|
28
45
|
|
|
29
|
-
<!--
|
|
30
|
-
<div class="k-list k-
|
|
31
|
-
<div class="k-list-header">
|
|
32
|
-
<div class="k-list-
|
|
33
|
-
<div class="k-list-content k-virtual-content">
|
|
46
|
+
<!-- angular / blazor rendering -->
|
|
47
|
+
<div class="k-list k-list-md">
|
|
48
|
+
<div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
|
|
49
|
+
<div class="k-list-content">
|
|
34
50
|
<ul class="k-list-ul">
|
|
35
51
|
<li class="k-list-item">
|
|
36
|
-
<span class="k-list-item-text">Item 1</span>
|
|
52
|
+
<span class="k-list-item-text">Item 1.1</span>
|
|
53
|
+
</li>
|
|
54
|
+
<li class="k-list-item">
|
|
55
|
+
<span class="k-list-item-text">Item 1.2</span>
|
|
56
|
+
</li>
|
|
57
|
+
<li class="k-list-group-item">
|
|
58
|
+
<span class="k-list-item-text">Group 2</span>
|
|
59
|
+
</li>
|
|
60
|
+
<li class="k-list-item">
|
|
61
|
+
<span class="k-list-item-text">Item 2.1</span>
|
|
62
|
+
</li>
|
|
63
|
+
<li class="k-list-item">
|
|
64
|
+
<span class="k-list-item-text">Item 2.2</span>
|
|
37
65
|
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- angular / blazor rendering w/ virtualization -->
|
|
71
|
+
<div class="k-list k-virtual-list k-list-md">
|
|
72
|
+
<div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
|
|
73
|
+
<div class="k-list-content">
|
|
74
|
+
<ul class="k-list-ul">
|
|
38
75
|
<li class="k-list-item">
|
|
39
|
-
<span class="k-list-item-text">Item
|
|
76
|
+
<span class="k-list-item-text">Item 1.1</span>
|
|
40
77
|
</li>
|
|
41
78
|
<li class="k-list-item">
|
|
42
|
-
<span class="k-list-item-text">Item
|
|
79
|
+
<span class="k-list-item-text">Item 1.2</span>
|
|
80
|
+
</li>
|
|
81
|
+
<li class="k-list-group-item">
|
|
82
|
+
<span class="k-list-item-text">Group 2</span>
|
|
43
83
|
</li>
|
|
44
|
-
<li class="k-list-group-header">Normal Group Header</li>
|
|
45
84
|
<li class="k-list-item">
|
|
46
|
-
<span class="k-list-item-text">Item
|
|
85
|
+
<span class="k-list-item-text">Item 2.1</span>
|
|
47
86
|
</li>
|
|
48
87
|
<li class="k-list-item">
|
|
49
|
-
<span class="k-list-item-text">Item
|
|
88
|
+
<span class="k-list-item-text">Item 2.2</span>
|
|
50
89
|
</li>
|
|
51
90
|
</ul>
|
|
52
|
-
<div class="k-height-container">
|
|
53
|
-
<div></div>
|
|
54
|
-
</div>
|
|
55
91
|
</div>
|
|
56
|
-
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<!-- filter -->
|
|
95
|
+
<div class="k-list-filter">
|
|
96
|
+
<span class="k-searchbox k-input k-input-md k-rounded-md k-input-solid" type="text" autocomplete="off">
|
|
97
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
98
|
+
<input type="text" class="k-input-inner" placeholder="Filter..." autocomplete="off">
|
|
99
|
+
</span>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<!-- no data template -->
|
|
103
|
+
<div class="k-list k-list-md">
|
|
104
|
+
<div class="k-no-data">No data found.</div>
|
|
57
105
|
</div>
|
|
58
106
|
```
|
|
107
|
+
|
package/src/list/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from './list.jsx';
|
|
2
|
-
export * from './list-group-header.jsx';
|
|
3
2
|
export * from './list-header.jsx';
|
|
4
|
-
export * from './list-footer.jsx';
|
|
5
3
|
export * from './list-content.jsx';
|
|
6
4
|
export * from './list-item.jsx';
|
|
7
|
-
export * from './list-item
|
|
5
|
+
export * from './list-group-item.jsx';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, globalDefaultProps } from '../component';
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
2
|
|
|
3
3
|
class ListContent extends Component {
|
|
4
4
|
render() {
|
|
@@ -10,10 +10,10 @@ function ListContentStatic(props) {
|
|
|
10
10
|
const {
|
|
11
11
|
className: ownClassName,
|
|
12
12
|
|
|
13
|
-
virtualization,
|
|
14
|
-
|
|
15
13
|
children,
|
|
16
14
|
|
|
15
|
+
virtualization,
|
|
16
|
+
|
|
17
17
|
aria,
|
|
18
18
|
legacy,
|
|
19
19
|
|
|
@@ -22,97 +22,73 @@ function ListContentStatic(props) {
|
|
|
22
22
|
|
|
23
23
|
let listContentClasses = [
|
|
24
24
|
ownClassName,
|
|
25
|
-
'k-list-content'
|
|
26
|
-
{
|
|
27
|
-
'k-list-scroller': virtualization === false,
|
|
28
|
-
'k-virtual-content': virtualization === true
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
let legacyListContentClasses = [
|
|
33
|
-
ownClassName,
|
|
34
|
-
{
|
|
35
|
-
'k-list-scroller': virtualization === false,
|
|
36
|
-
'k-virtual-content': virtualization === true
|
|
37
|
-
}
|
|
25
|
+
'k-list-content'
|
|
38
26
|
];
|
|
39
27
|
|
|
40
28
|
let listULClasses = [
|
|
41
29
|
'k-list-ul'
|
|
42
30
|
];
|
|
43
31
|
|
|
44
|
-
let legacyListULClasses = [
|
|
45
|
-
'k-list',
|
|
46
|
-
'k-reset',
|
|
47
|
-
{
|
|
48
|
-
'k-virtual-list': virtualization === true
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
|
|
52
32
|
let ariaAttr = aria
|
|
53
33
|
? {}
|
|
54
34
|
: {};
|
|
55
35
|
|
|
56
36
|
if (legacy) {
|
|
57
|
-
if (virtualization) {
|
|
58
|
-
return (
|
|
59
|
-
<div className={legacyListContentClasses} {...ariaAttr} {...htmlAttributes}>
|
|
60
|
-
<ul className={legacyListULClasses}>
|
|
61
|
-
{children}
|
|
62
|
-
</ul>
|
|
63
|
-
<div className="k-height-container">
|
|
64
|
-
<div></div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
} else {
|
|
69
|
-
return (
|
|
70
|
-
<div className={legacyListContentClasses} {...ariaAttr} {...htmlAttributes}>
|
|
71
|
-
<ul className={legacyListULClasses}>
|
|
72
|
-
{children}
|
|
73
|
-
</ul>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
37
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
38
|
+
let legacyListContentClasses = [
|
|
39
|
+
ownClassName,
|
|
40
|
+
'k-list-content',
|
|
41
|
+
{
|
|
42
|
+
'k-list-scroller': virtualization === false || virtualization === undefined,
|
|
43
|
+
'k-virtual-content': virtualization === true
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
let legacyListULClasses = [
|
|
48
|
+
'k-list',
|
|
49
|
+
'k-reset',
|
|
50
|
+
{
|
|
51
|
+
'k-virtual-list': virtualization === true
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
|
|
91
55
|
return (
|
|
92
|
-
<div className={
|
|
93
|
-
<ul className={
|
|
56
|
+
<div className={legacyListContentClasses} {...ariaAttr} {...htmlAttributes}>
|
|
57
|
+
<ul className={legacyListULClasses}>
|
|
94
58
|
{children}
|
|
95
59
|
</ul>
|
|
60
|
+
{ virtualization && <div className="k-height-container"><div></div></div> }
|
|
96
61
|
</div>
|
|
97
62
|
);
|
|
98
63
|
}
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div className={listContentClasses} {...ariaAttr} {...htmlAttributes}>
|
|
67
|
+
<ul className={listULClasses}>
|
|
68
|
+
{children}
|
|
69
|
+
</ul>
|
|
70
|
+
{ virtualization && <div className="k-height-container"><div></div></div> }
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
99
73
|
}
|
|
100
74
|
|
|
101
75
|
ListContentStatic.defaultProps = {
|
|
102
76
|
...globalDefaultProps,
|
|
103
77
|
|
|
104
|
-
|
|
78
|
+
children: [],
|
|
105
79
|
|
|
106
80
|
virtualization: false
|
|
107
81
|
};
|
|
108
82
|
|
|
109
83
|
ListContentStatic.propTypes = {
|
|
84
|
+
children: typeof [],
|
|
85
|
+
className: typeof '',
|
|
86
|
+
|
|
110
87
|
virtualization: typeof false,
|
|
111
88
|
|
|
112
89
|
aria: typeof false,
|
|
113
90
|
legacy: typeof false,
|
|
114
91
|
|
|
115
|
-
className: typeof '',
|
|
116
92
|
htmlAttributes: typeof []
|
|
117
93
|
};
|
|
118
94
|
|