@progress/kendo-themes-html 5.0.0-alpha.3 → 5.0.0-beta.3
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 +48 -3
- package/package.json +7 -7
- package/src/autocomplete/autocomplete.jsx +4 -4
- package/src/avatar/README.md +21 -0
- package/src/avatar/avatar.jsx +113 -0
- package/src/avatar/index.js +1 -0
- package/src/button/button.jsx +7 -7
- package/src/checkbox/checkbox.jsx +3 -3
- package/src/chip/README.md +47 -0
- package/src/chip/chip-actions.jsx +80 -0
- package/src/chip/chip-avatar.jsx +13 -0
- package/src/chip/chip-list.jsx +84 -0
- package/src/chip/chip.jsx +180 -0
- package/src/chip/index.js +4 -0
- package/src/colorpicker/README.md +24 -15
- package/src/colorpicker/color-preview.jsx +33 -22
- package/src/colorpicker/colorpicker.jsx +12 -13
- package/src/combobox/combobox.jsx +9 -11
- package/src/{component.js → component/component.jsx} +4 -2
- package/src/component/index.js +1 -0
- package/src/dateinput/dateinput.jsx +9 -11
- package/src/datepicker/datepicker.jsx +9 -11
- package/src/datetimepicker/datetimepicker.jsx +9 -11
- package/src/dropdownbutton/README.md +60 -0
- package/src/dropdownbutton/dropdownbutton.jsx +145 -0
- package/src/dropdownbutton/index.js +1 -0
- package/src/dropdownlist/dropdownlist.jsx +13 -12
- 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 +47 -4
- package/src/input/input-clear-value.jsx +1 -1
- package/src/input/input-inner-input.jsx +1 -1
- package/src/input/input-inner-span.jsx +1 -1
- 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 +4 -4
- package/src/input/picker.jsx +6 -6
- package/src/list/README.md +107 -0
- package/src/list/index.js +5 -0
- package/src/list/list-content.jsx +95 -0
- package/src/list/list-group-item.jsx +66 -0
- package/src/list/list-header.jsx +67 -0
- package/src/list/list-item.jsx +117 -0
- package/src/list/list.jsx +182 -0
- package/src/maskedtextbox/maskedtextbox.jsx +11 -14
- 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/menulist/menulist.jsx +67 -0
- package/src/multiselect/README.md +37 -0
- package/src/multiselect/index.js +2 -0
- package/src/multiselect/multiselect-chip-list.jsx +55 -0
- package/src/multiselect/multiselect.jsx +189 -0
- package/src/nodata/index.js +1 -0
- package/src/nodata/nodata.jsx +64 -0
- package/src/numerictextbox/numerictextbox.jsx +5 -5
- 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 +2 -2
- package/src/searchbar/searchbar.jsx +1 -1
- package/src/searchbox/searchbox.jsx +4 -4
- package/src/spinbutton/spinbutton.jsx +9 -3
- package/src/splitbutton/README.md +76 -0
- package/src/splitbutton/index.js +1 -0
- package/src/splitbutton/splitbutton.jsx +152 -0
- package/src/switch/README.md +3 -3
- package/src/switch/switch.jsx +6 -6
- package/src/textarea/textarea.jsx +4 -4
- package/src/textbox/textbox.jsx +4 -4
- package/src/timepicker/timepicker.jsx +9 -11
- 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 +23 -5
|
@@ -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,67 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component';
|
|
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
|
+
|
|
14
|
+
size,
|
|
15
|
+
|
|
16
|
+
aria,
|
|
17
|
+
legacy,
|
|
18
|
+
|
|
19
|
+
...htmlAttributes
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
let menuListClasses = [
|
|
23
|
+
ownClassName,
|
|
24
|
+
'k-group k-menu-group k-reset',
|
|
25
|
+
styles.sizeClass( size, 'k-menu-group' ),
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
let legacyMenuListClasses = [
|
|
30
|
+
ownClassName,
|
|
31
|
+
'k-group k-menu-group k-reset',
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
let ariaAttr = aria
|
|
35
|
+
? {}
|
|
36
|
+
: {};
|
|
37
|
+
|
|
38
|
+
if (legacy) {
|
|
39
|
+
return (
|
|
40
|
+
<ul className={legacyMenuListClasses} {...ariaAttr} {...htmlAttributes} />
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<ul className={menuListClasses} {...ariaAttr} {...htmlAttributes} />
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
MenuListStatic.defaultProps = {
|
|
50
|
+
...globalDefaultProps,
|
|
51
|
+
|
|
52
|
+
className: '',
|
|
53
|
+
|
|
54
|
+
size: 'medium'
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
MenuListStatic.propTypes = {
|
|
58
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
59
|
+
|
|
60
|
+
aria: typeof false,
|
|
61
|
+
legacy: typeof false,
|
|
62
|
+
|
|
63
|
+
className: typeof '',
|
|
64
|
+
htmlAttributes: typeof []
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { MenuList, MenuListStatic };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
```html
|
|
2
|
+
<!-- default rendering -->
|
|
3
|
+
<span class="k-multiselect k-input k-input-md k-rounded-md k-input-solid">
|
|
4
|
+
<input type="text" class="k-input-inner" placeholder="..." autocomplete="..."/>
|
|
5
|
+
</span>
|
|
6
|
+
|
|
7
|
+
<!-- canonical rendering -->
|
|
8
|
+
<span class="
|
|
9
|
+
k-multiselect
|
|
10
|
+
k-input
|
|
11
|
+
k-input-{size}
|
|
12
|
+
k-rounded-{rounded}
|
|
13
|
+
k-input-{fillMode}
|
|
14
|
+
|
|
15
|
+
{valid && 'k-valid'}
|
|
16
|
+
{invalid && 'k-invalid'}
|
|
17
|
+
{loading && 'k-loading'}
|
|
18
|
+
{required && 'k-required'}
|
|
19
|
+
{disabled && 'k-disabled'}
|
|
20
|
+
">
|
|
21
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-icon k-i-{inputIconName}"></span>}
|
|
22
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
23
|
+
<div class="k-input-values k-chip-list k-chip-list-md k-selection-multiple">
|
|
24
|
+
{value}
|
|
25
|
+
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
26
|
+
</div>
|
|
27
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
28
|
+
{showValidationIcon && valid && <span class="k-input-validation-icon k-icon k-i-check"></span>}
|
|
29
|
+
{showValidationIcon && invalid && <span class="k-input-validation-icon k-icon k-i-warning"></span>}
|
|
30
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
31
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
32
|
+
{showArrowButton &&
|
|
33
|
+
<button type="button" class="k-input-button k-button k-icon-button k-button-{size} k-button-{fillMode} k-button-{fillMode}-base">
|
|
34
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
35
|
+
</button>}
|
|
36
|
+
</span>
|
|
37
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
import { ChipListStatic } from '../chip/index';
|
|
3
|
+
|
|
4
|
+
class MultiSelectChipList extends Component {
|
|
5
|
+
render() {
|
|
6
|
+
return <MultiSelectChipListStatic {...this.props} />;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function MultiSelectChipListStatic(props) {
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
className: ownClassName,
|
|
14
|
+
|
|
15
|
+
children,
|
|
16
|
+
|
|
17
|
+
size,
|
|
18
|
+
|
|
19
|
+
...htmlAttributes
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
let inputValuesClasses = [
|
|
23
|
+
ownClassName,
|
|
24
|
+
'k-input-values'
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
if (children.length === 0) {
|
|
28
|
+
return <></>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ChipListStatic selection="multiple" size={size} className={inputValuesClasses} {...htmlAttributes}>
|
|
33
|
+
{children}
|
|
34
|
+
</ChipListStatic>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
MultiSelectChipListStatic.defaultProps = {
|
|
39
|
+
...globalDefaultProps,
|
|
40
|
+
|
|
41
|
+
size: 'medium',
|
|
42
|
+
|
|
43
|
+
children: []
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
MultiSelectChipListStatic.propTypes = {
|
|
47
|
+
children: typeof [],
|
|
48
|
+
className: typeof '',
|
|
49
|
+
|
|
50
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
51
|
+
|
|
52
|
+
htmlAttributes: typeof []
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { MultiSelectChipList, MultiSelectChipListStatic };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { globalDefaultProps } from '../component/index';
|
|
2
|
+
import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
|
+
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
4
|
+
import { ButtonStatic } from '../button/index';
|
|
5
|
+
import { MultiSelectChipListStatic } from './index';
|
|
6
|
+
|
|
7
|
+
class MultiSelect extends Input {
|
|
8
|
+
|
|
9
|
+
init() {
|
|
10
|
+
let value = <></>;
|
|
11
|
+
let children = this._props.children;
|
|
12
|
+
let newChildren = [];
|
|
13
|
+
|
|
14
|
+
children.forEach( child => {
|
|
15
|
+
let component = child._component;
|
|
16
|
+
|
|
17
|
+
if (component === 'MultiSelectChipList') {
|
|
18
|
+
value.props.children.push.apply(value.props.children, child.props.children);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
newChildren.push( child );
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
this._props.value = value;
|
|
26
|
+
this._props.children = newChildren;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
render() {
|
|
30
|
+
return <MultiSelectStatic {...this.props} />;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function MultiSelectStatic(props) {
|
|
35
|
+
|
|
36
|
+
const {
|
|
37
|
+
className: ownClassName,
|
|
38
|
+
|
|
39
|
+
type,
|
|
40
|
+
placeholder,
|
|
41
|
+
autocomplete,
|
|
42
|
+
|
|
43
|
+
prefix,
|
|
44
|
+
suffix,
|
|
45
|
+
value,
|
|
46
|
+
|
|
47
|
+
size,
|
|
48
|
+
rounded,
|
|
49
|
+
|
|
50
|
+
fillMode,
|
|
51
|
+
|
|
52
|
+
showArrowButton,
|
|
53
|
+
|
|
54
|
+
hover,
|
|
55
|
+
focus,
|
|
56
|
+
valid,
|
|
57
|
+
invalid,
|
|
58
|
+
required,
|
|
59
|
+
disabled,
|
|
60
|
+
|
|
61
|
+
aria,
|
|
62
|
+
legacy,
|
|
63
|
+
|
|
64
|
+
...htmlAttributes
|
|
65
|
+
} = props;
|
|
66
|
+
|
|
67
|
+
htmlAttributes.size = size;
|
|
68
|
+
htmlAttributes.rounded = rounded;
|
|
69
|
+
htmlAttributes.fillMode = fillMode;
|
|
70
|
+
htmlAttributes.hover = hover;
|
|
71
|
+
htmlAttributes.focus = focus;
|
|
72
|
+
htmlAttributes.valid = valid;
|
|
73
|
+
htmlAttributes.invalid = invalid;
|
|
74
|
+
htmlAttributes.required = required;
|
|
75
|
+
htmlAttributes.disabled = disabled;
|
|
76
|
+
|
|
77
|
+
const inputAttributes = {
|
|
78
|
+
type,
|
|
79
|
+
placeholder,
|
|
80
|
+
autocomplete,
|
|
81
|
+
|
|
82
|
+
disabled
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
let multiselectClasses = [
|
|
86
|
+
ownClassName,
|
|
87
|
+
'k-multiselect'
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
let ariaAttr = aria
|
|
91
|
+
? {}
|
|
92
|
+
: {};
|
|
93
|
+
|
|
94
|
+
if (legacy) {
|
|
95
|
+
|
|
96
|
+
let legacyClasses = [
|
|
97
|
+
ownClassName,
|
|
98
|
+
'k-widget',
|
|
99
|
+
'k-multiselect',
|
|
100
|
+
{
|
|
101
|
+
'k-state-hover': hover === true,
|
|
102
|
+
'k-state-focused': focus === true,
|
|
103
|
+
'k-state-invalid': invalid === true,
|
|
104
|
+
'k-state-required': required === true,
|
|
105
|
+
'k-state-disabled': disabled === true
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<InputStatic className={legacyClasses} {...htmlAttributes}>
|
|
111
|
+
<input type={type} className="k-input" {...inputAttributes} />
|
|
112
|
+
<InputValidationIconStatic {...props} />
|
|
113
|
+
<InputLoadingIconStatic {...props} />
|
|
114
|
+
<InputClearValueStatic {...props} />
|
|
115
|
+
</InputStatic>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<InputStatic className={multiselectClasses} {...ariaAttr} {...htmlAttributes}>
|
|
121
|
+
{prefix}
|
|
122
|
+
<MultiSelectChipListStatic {...props}>
|
|
123
|
+
{value}
|
|
124
|
+
<InputInnerInputStatic {...inputAttributes} />
|
|
125
|
+
</MultiSelectChipListStatic>
|
|
126
|
+
{suffix}
|
|
127
|
+
<InputValidationIconStatic {...props} />
|
|
128
|
+
<InputLoadingIconStatic {...props} />
|
|
129
|
+
<InputClearValueStatic {...props} />
|
|
130
|
+
{showArrowButton && <ButtonStatic className="k-input-button" icon="arrow-s" shape={null} rounded={null} size={size} fillMode={fillMode}></ButtonStatic>}
|
|
131
|
+
</InputStatic>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
MultiSelectStatic.defaultProps = {
|
|
136
|
+
...globalDefaultProps,
|
|
137
|
+
|
|
138
|
+
type: 'text',
|
|
139
|
+
placeholder: '',
|
|
140
|
+
autocomplete: 'off',
|
|
141
|
+
|
|
142
|
+
showValidationIcon: true,
|
|
143
|
+
showLoadingIcon: true,
|
|
144
|
+
showClearButton: true,
|
|
145
|
+
showArrowButton: false,
|
|
146
|
+
|
|
147
|
+
size: 'medium',
|
|
148
|
+
rounded: 'medium',
|
|
149
|
+
|
|
150
|
+
fillMode: 'solid'
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
MultiSelectStatic.propTypes = {
|
|
154
|
+
children: typeof [],
|
|
155
|
+
className: typeof '',
|
|
156
|
+
|
|
157
|
+
type: typeof [ 'text', 'password' ],
|
|
158
|
+
placeholder: typeof '',
|
|
159
|
+
autocomplete: typeof [ 'on', 'off' ],
|
|
160
|
+
|
|
161
|
+
showValidationIcon: typeof true,
|
|
162
|
+
showLoadingIcon: typeof true,
|
|
163
|
+
showClearButton: typeof true,
|
|
164
|
+
showArrowButton: typeof true,
|
|
165
|
+
|
|
166
|
+
prefix: typeof '#fragment',
|
|
167
|
+
suffix: typeof '#fragment',
|
|
168
|
+
value: typeof '#fragment',
|
|
169
|
+
|
|
170
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
171
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
172
|
+
|
|
173
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
174
|
+
|
|
175
|
+
hover: typeof false,
|
|
176
|
+
focus: typeof false,
|
|
177
|
+
valid: typeof false,
|
|
178
|
+
invalid: typeof false,
|
|
179
|
+
loading: typeof false,
|
|
180
|
+
required: typeof false,
|
|
181
|
+
disabled: typeof false,
|
|
182
|
+
|
|
183
|
+
aria: typeof false,
|
|
184
|
+
legacy: typeof false,
|
|
185
|
+
|
|
186
|
+
htmlAttributes: typeof []
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export { MultiSelect, MultiSelectStatic };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './nodata.jsx';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
|
|
3
|
+
class NoData extends Component {
|
|
4
|
+
render() {
|
|
5
|
+
return <NoDataStatic {...this.props} />;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function NoDataStatic(props) {
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
className: ownClassName,
|
|
13
|
+
// eslint-disable-next-line no-unused-vars
|
|
14
|
+
children,
|
|
15
|
+
|
|
16
|
+
aria,
|
|
17
|
+
legacy,
|
|
18
|
+
|
|
19
|
+
...htmlAttributes
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
let noDataClasses = [
|
|
23
|
+
ownClassName,
|
|
24
|
+
'k-no-data'
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
let ariaAttr = aria
|
|
28
|
+
? {}
|
|
29
|
+
: {};
|
|
30
|
+
|
|
31
|
+
if (legacy) {
|
|
32
|
+
|
|
33
|
+
let legacyClasses = [
|
|
34
|
+
ownClassName,
|
|
35
|
+
'k-nodata'
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div className={legacyClasses} {...ariaAttr} {...htmlAttributes}>No data found.</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className={noDataClasses} {...ariaAttr} {...htmlAttributes}>No data found.</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
NoDataStatic.defaultProps = {
|
|
49
|
+
...globalDefaultProps,
|
|
50
|
+
|
|
51
|
+
children: []
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
NoDataStatic.propTypes = {
|
|
55
|
+
children: typeof [],
|
|
56
|
+
className: typeof '',
|
|
57
|
+
|
|
58
|
+
aria: typeof false,
|
|
59
|
+
legacy: typeof false,
|
|
60
|
+
|
|
61
|
+
htmlAttributes: typeof []
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { NoData, NoDataStatic };
|
|
@@ -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
|
import { SpinButtonStatic } from '../spinbutton/index';
|
|
@@ -112,7 +112,7 @@ function NumericTextboxStatic(props) {
|
|
|
112
112
|
<InputValidationIconStatic {...props} />
|
|
113
113
|
<InputLoadingIconStatic {...props} />
|
|
114
114
|
<InputClearValueStatic {...props} />
|
|
115
|
-
{showSpinButton === true && <SpinButtonStatic className="k-input-spinner" />}
|
|
115
|
+
{showSpinButton === true && <SpinButtonStatic className="k-input-spinner" size={size} fillMode={fillMode} />}
|
|
116
116
|
</InputStatic>
|
|
117
117
|
);
|
|
118
118
|
}
|
|
@@ -148,10 +148,10 @@ NumericTextboxStatic.propTypes = {
|
|
|
148
148
|
showLoadingIcon: typeof true,
|
|
149
149
|
showClearButton: typeof true,
|
|
150
150
|
|
|
151
|
-
size: typeof [
|
|
152
|
-
rounded: typeof [
|
|
151
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
152
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
153
153
|
|
|
154
|
-
fillMode: typeof [
|
|
154
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
155
155
|
|
|
156
156
|
hover: typeof false,
|
|
157
157
|
focus: typeof false,
|