@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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
```html
|
|
2
2
|
<!-- default rendering -->
|
|
3
3
|
<div class="k-dropdown-button">
|
|
4
|
-
<button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base">
|
|
4
|
+
<button type="button" class="k-menu-button k-button k-button-md k-rounded-md k-button-solid k-button-solid-base">
|
|
5
5
|
<span class="k-button-text">Text</span>
|
|
6
|
+
<span class="k-button-arrow"><span class="k-icon k-i-arrow-s"></span></span>
|
|
6
7
|
</button>
|
|
7
8
|
</div>
|
|
8
9
|
|
|
@@ -10,20 +11,19 @@
|
|
|
10
11
|
<div class="k-dropdown-button">
|
|
11
12
|
<button class="
|
|
12
13
|
k-button
|
|
13
|
-
|
|
14
|
-
k-button
|
|
15
|
-
k-button
|
|
16
|
-
k-rounded
|
|
17
|
-
k-button
|
|
18
|
-
k-button
|
|
19
|
-
k
|
|
20
|
-
|
|
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'}
|
|
21
22
|
" type={type} disabled={disabled}>
|
|
22
|
-
{icon !== '' && <span class="k-button-icon k-icon k-i
|
|
23
|
-
{text !== '' && <span class="k-button-text">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</span>}
|
|
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
27
|
</button>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
<!-- popup menu items canonical rendering -->
|
|
44
44
|
<div class="k-animation-container k-animation-container-fixed k-animation-container-shown">
|
|
45
45
|
<div class="k-popup k-menu-popup">
|
|
46
|
-
<ul class="k-group k-menu-group k-reset k-menu-group
|
|
46
|
+
<ul class="k-group k-menu-group k-reset k-menu-group-{size}">
|
|
47
47
|
<li class="k-item k-menu-item">
|
|
48
|
-
<span class="k-link k-menu-link k
|
|
49
|
-
{icon !== '' && <span class="k-icon k-i
|
|
48
|
+
<span class="k-link k-menu-link k-{state}">
|
|
49
|
+
{icon !== '' && <span class="k-icon k-i-{icon}"></span>}
|
|
50
50
|
{text !== '' && <span class="k-menu-link-text">Text</span>}
|
|
51
|
-
{hasChildren
|
|
52
|
-
<span class="k-menu-expand-arrow k-icon k-i
|
|
53
|
-
<span class="k-menu-expand-arrow k-icon k-i-none"></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
54
|
}
|
|
55
55
|
</span>
|
|
56
56
|
</li>
|
|
@@ -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 };
|
|
@@ -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
|
+
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { globalDefaultProps } from '../component';
|
|
1
|
+
import { globalDefaultProps } from '../component/index';
|
|
2
2
|
import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
3
|
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
4
|
+
import { ButtonStatic } from '../button/index';
|
|
4
5
|
import { MultiSelectChipListStatic } from './index';
|
|
5
6
|
|
|
6
7
|
class MultiSelect extends Input {
|
|
@@ -48,6 +49,8 @@ function MultiSelectStatic(props) {
|
|
|
48
49
|
|
|
49
50
|
fillMode,
|
|
50
51
|
|
|
52
|
+
showArrowButton,
|
|
53
|
+
|
|
51
54
|
hover,
|
|
52
55
|
focus,
|
|
53
56
|
valid,
|
|
@@ -124,6 +127,7 @@ function MultiSelectStatic(props) {
|
|
|
124
127
|
<InputValidationIconStatic {...props} />
|
|
125
128
|
<InputLoadingIconStatic {...props} />
|
|
126
129
|
<InputClearValueStatic {...props} />
|
|
130
|
+
{showArrowButton && <ButtonStatic className="k-input-button" icon="arrow-s" shape={null} rounded={null} size={size} fillMode={fillMode}></ButtonStatic>}
|
|
127
131
|
</InputStatic>
|
|
128
132
|
);
|
|
129
133
|
}
|
|
@@ -138,6 +142,7 @@ MultiSelectStatic.defaultProps = {
|
|
|
138
142
|
showValidationIcon: true,
|
|
139
143
|
showLoadingIcon: true,
|
|
140
144
|
showClearButton: true,
|
|
145
|
+
showArrowButton: false,
|
|
141
146
|
|
|
142
147
|
size: 'medium',
|
|
143
148
|
rounded: 'medium',
|
|
@@ -156,15 +161,16 @@ MultiSelectStatic.propTypes = {
|
|
|
156
161
|
showValidationIcon: typeof true,
|
|
157
162
|
showLoadingIcon: typeof true,
|
|
158
163
|
showClearButton: typeof true,
|
|
164
|
+
showArrowButton: typeof true,
|
|
159
165
|
|
|
160
166
|
prefix: typeof '#fragment',
|
|
161
167
|
suffix: typeof '#fragment',
|
|
162
168
|
value: typeof '#fragment',
|
|
163
169
|
|
|
164
|
-
size: typeof [
|
|
165
|
-
rounded: typeof [
|
|
170
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
171
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
166
172
|
|
|
167
|
-
fillMode: typeof [
|
|
173
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
168
174
|
|
|
169
175
|
hover: typeof false,
|
|
170
176
|
focus: typeof false,
|
|
@@ -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';
|
|
@@ -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 = [
|
|
@@ -149,7 +147,7 @@ NumericTextboxStatic.propTypes = {
|
|
|
149
147
|
showClearButton: typeof true,
|
|
150
148
|
|
|
151
149
|
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
152
|
-
rounded: typeof [ null, 'small', 'medium', 'large', '
|
|
150
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
153
151
|
|
|
154
152
|
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
155
153
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './popup.jsx';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
2
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
3
|
+
|
|
4
|
+
class Popup extends Component {
|
|
5
|
+
render() {
|
|
6
|
+
return <PopupStatic {...this.props} />;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function PopupStatic(props) {
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
className: ownClassName,
|
|
14
|
+
|
|
15
|
+
children,
|
|
16
|
+
|
|
17
|
+
size,
|
|
18
|
+
rounded,
|
|
19
|
+
|
|
20
|
+
aria,
|
|
21
|
+
legacy,
|
|
22
|
+
|
|
23
|
+
...htmlAttributes
|
|
24
|
+
} = props;
|
|
25
|
+
|
|
26
|
+
let PopupClasses = [
|
|
27
|
+
ownClassName,
|
|
28
|
+
'k-popup',
|
|
29
|
+
styles.sizeClass( size, 'k-popup' ),
|
|
30
|
+
styles.roundedClass( rounded )
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
let ariaAttr = aria
|
|
34
|
+
? {}
|
|
35
|
+
: {};
|
|
36
|
+
|
|
37
|
+
if (legacy) {
|
|
38
|
+
|
|
39
|
+
let legacyClasses = [
|
|
40
|
+
ownClassName,
|
|
41
|
+
'k-popup'
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div className={legacyClasses} {...htmlAttributes}>
|
|
46
|
+
{children}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div className={PopupClasses} {...ariaAttr} {...htmlAttributes}>
|
|
53
|
+
{children}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
PopupStatic.defaultProps = {
|
|
59
|
+
...globalDefaultProps,
|
|
60
|
+
|
|
61
|
+
children: [],
|
|
62
|
+
|
|
63
|
+
size: 'medium',
|
|
64
|
+
rounded: 'medium'
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
PopupStatic.propTypes = {
|
|
68
|
+
children: typeof [],
|
|
69
|
+
className: typeof '',
|
|
70
|
+
|
|
71
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
72
|
+
rounded: typeof [ null, 'small', 'medium', 'large' ],
|
|
73
|
+
|
|
74
|
+
aria: typeof false,
|
|
75
|
+
legacy: typeof false,
|
|
76
|
+
|
|
77
|
+
htmlAttributes: typeof []
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { Popup, PopupStatic };
|
package/src/radio/radio.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 Radio extends Component {
|
|
5
5
|
render() {
|
|
@@ -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 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { globalDefaultProps } from '../component';
|
|
1
|
+
import { globalDefaultProps } from '../component/index';
|
|
2
2
|
import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
3
|
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
4
4
|
import { IconStatic } from '../icon/index';
|
|
@@ -150,7 +150,7 @@ SearchboxInner.propTypes = {
|
|
|
150
150
|
suffix: typeof '#fragment',
|
|
151
151
|
|
|
152
152
|
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
153
|
-
rounded: typeof [ null, 'small', 'medium', 'large', '
|
|
153
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
154
154
|
|
|
155
155
|
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
156
156
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
```html
|
|
2
2
|
<!-- default rendering -->
|
|
3
|
-
<div class="k-split-button k-button-group">
|
|
3
|
+
<div class="k-split-button k-button-group k-rounded-md">
|
|
4
4
|
<button
|
|
5
5
|
class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
6
6
|
type="button"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<!-- canonical rendering -->
|
|
16
|
-
<div class="k-split-button k-button-group">
|
|
16
|
+
<div class="k-split-button k-button-group k-rounded-${rounded}">
|
|
17
17
|
<button class="
|
|
18
18
|
k-button
|
|
19
19
|
${text === '' && icon !== '' && 'k-icon-button'}
|