@progress/kendo-themes-html 4.42.1-dev.0 → 4.42.1-dev.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 +5 -0
- package/package.json +8 -8
- package/src/autocomplete/README.md +15 -9
- package/src/autocomplete/autocomplete.jsx +12 -7
- package/src/button/README.md +8 -8
- package/src/checkbox/README.md +8 -8
- package/src/colorpicker/colorpicker.jsx +3 -4
- package/src/combobox/README.md +15 -9
- package/src/combobox/combobox.jsx +11 -6
- package/src/dateinput/README.md +48 -0
- package/src/dateinput/dateinput.jsx +170 -0
- package/src/dateinput/index.js +1 -0
- package/src/datepicker/README.md +36 -0
- package/src/datepicker/datepicker.jsx +170 -0
- package/src/datepicker/index.js +1 -0
- package/src/datetimepicker/README.md +36 -0
- package/src/datetimepicker/datetimepicker.jsx +170 -0
- package/src/datetimepicker/index.js +1 -0
- package/src/dropdownlist/README.md +23 -14
- package/src/dropdownlist/dropdownlist.jsx +13 -6
- package/src/index.js +4 -1
- package/src/input/index.js +3 -0
- package/src/input/input-clear-value.jsx +31 -0
- package/src/input/input-inner-span.jsx +9 -8
- package/src/input/input-loading-icon.jsx +28 -0
- package/src/input/input-validation-icon.jsx +37 -0
- package/src/input/input.jsx +2 -0
- package/src/maskedtextbox/README.md +15 -9
- package/src/maskedtextbox/maskedtextbox.jsx +18 -5
- package/src/numerictextbox/README.md +15 -9
- package/src/numerictextbox/numerictextbox.jsx +16 -5
- package/src/radio/README.md +7 -7
- package/src/searchbox/README.md +16 -12
- package/src/searchbox/searchbox.jsx +19 -10
- package/src/textarea/README.md +17 -11
- package/src/textbox/README.md +15 -9
- package/src/textbox/textbox.jsx +17 -0
- package/src/timepicker/README.md +36 -0
- package/src/timepicker/index.js +1 -0
- package/src/timepicker/timepicker.jsx +170 -0
|
@@ -8,17 +8,23 @@
|
|
|
8
8
|
<span class="
|
|
9
9
|
k-maskedtextbox
|
|
10
10
|
k-input
|
|
11
|
-
k-input
|
|
12
|
-
k-rounded
|
|
13
|
-
k-input
|
|
11
|
+
k-input-{size}
|
|
12
|
+
k-rounded-{rounded}
|
|
13
|
+
k-input-{fillMode}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
{valid && 'k-valid'}
|
|
16
|
+
{invalid && 'k-invalid'}
|
|
17
|
+
{loading && 'k-loading'}
|
|
18
|
+
{required && 'k-required'}
|
|
19
|
+
{disabled && 'k-disabled'}
|
|
19
20
|
">
|
|
21
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
22
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
20
23
|
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
21
|
-
{
|
|
22
|
-
{
|
|
24
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
25
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
26
|
+
{showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
|
|
27
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
28
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
23
29
|
</span>
|
|
24
30
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
import { IconStatic } from '../icon/index';
|
|
3
2
|
import { InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
|
+
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
4
4
|
|
|
5
5
|
class MaskedTextbox extends Component {
|
|
6
6
|
render() {
|
|
@@ -16,6 +16,7 @@ function MaskedTextboxStatic(props) {
|
|
|
16
16
|
type,
|
|
17
17
|
value,
|
|
18
18
|
placeholder,
|
|
19
|
+
autocomplete,
|
|
19
20
|
|
|
20
21
|
size,
|
|
21
22
|
rounded,
|
|
@@ -41,7 +42,7 @@ function MaskedTextboxStatic(props) {
|
|
|
41
42
|
htmlAttributes.fillMode = fillMode;
|
|
42
43
|
htmlAttributes.hover = hover;
|
|
43
44
|
htmlAttributes.focus = focus;
|
|
44
|
-
htmlAttributes.valid =
|
|
45
|
+
htmlAttributes.valid = valid;
|
|
45
46
|
htmlAttributes.invalid = invalid;
|
|
46
47
|
htmlAttributes.required = required;
|
|
47
48
|
htmlAttributes.disabled = disabled;
|
|
@@ -50,6 +51,7 @@ function MaskedTextboxStatic(props) {
|
|
|
50
51
|
type,
|
|
51
52
|
value,
|
|
52
53
|
placeholder,
|
|
54
|
+
autocomplete,
|
|
53
55
|
|
|
54
56
|
disabled
|
|
55
57
|
};
|
|
@@ -86,7 +88,6 @@ function MaskedTextboxStatic(props) {
|
|
|
86
88
|
return (
|
|
87
89
|
<InputStatic className={legacyClasses} {...htmlAttributes}>
|
|
88
90
|
<input type={type} className={legacyInputClasses} {...inputAttributes} />
|
|
89
|
-
{invalid && <IconStatic name="warning" />}
|
|
90
91
|
</InputStatic>
|
|
91
92
|
);
|
|
92
93
|
}
|
|
@@ -94,8 +95,9 @@ function MaskedTextboxStatic(props) {
|
|
|
94
95
|
return (
|
|
95
96
|
<InputStatic className={maskedClasses} {...ariaAttr} {...htmlAttributes}>
|
|
96
97
|
<InputInnerInputStatic {...inputAttributes} />
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
<InputValidationIconStatic {...props} />
|
|
99
|
+
<InputLoadingIconStatic {...props} />
|
|
100
|
+
<InputClearValueStatic {...props} />
|
|
99
101
|
</InputStatic>
|
|
100
102
|
);
|
|
101
103
|
}
|
|
@@ -106,6 +108,11 @@ MaskedTextboxStatic.defaultProps = {
|
|
|
106
108
|
type: 'text',
|
|
107
109
|
value: '',
|
|
108
110
|
placeholder: '',
|
|
111
|
+
autocomplete: 'off',
|
|
112
|
+
|
|
113
|
+
showValidationIcon: true,
|
|
114
|
+
showLoadingIcon: true,
|
|
115
|
+
showClearButton: true,
|
|
109
116
|
|
|
110
117
|
size: 'medium',
|
|
111
118
|
rounded: 'medium',
|
|
@@ -119,6 +126,11 @@ MaskedTextboxStatic.propTypes = {
|
|
|
119
126
|
type: typeof [ 'text' ],
|
|
120
127
|
value: typeof '',
|
|
121
128
|
placeholder: typeof '',
|
|
129
|
+
autocomplete: typeof [ 'on', 'off' ],
|
|
130
|
+
|
|
131
|
+
showValidationIcon: typeof true,
|
|
132
|
+
showLoadingIcon: typeof true,
|
|
133
|
+
showClearButton: typeof true,
|
|
122
134
|
|
|
123
135
|
size: typeof [ 'none', 'small', 'medium', 'large' ],
|
|
124
136
|
rounded: typeof [ 'none', 'small', 'medium', 'large', 'pill' ],
|
|
@@ -129,6 +141,7 @@ MaskedTextboxStatic.propTypes = {
|
|
|
129
141
|
focus: typeof false,
|
|
130
142
|
valid: typeof false,
|
|
131
143
|
invalid: typeof false,
|
|
144
|
+
loading: typeof false,
|
|
132
145
|
required: typeof false,
|
|
133
146
|
disabled: typeof false,
|
|
134
147
|
|
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
<span class="
|
|
17
17
|
k-numerictextbox
|
|
18
18
|
k-input
|
|
19
|
-
k-input
|
|
20
|
-
k-rounded
|
|
21
|
-
k-input
|
|
19
|
+
k-input-{size}
|
|
20
|
+
k-rounded-{rounded}
|
|
21
|
+
k-input-{fillMode}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
{valid && 'k-valid'}
|
|
24
|
+
{invalid && 'k-invalid'}
|
|
25
|
+
{loading && 'k-loading'}
|
|
26
|
+
{required && 'k-required'}
|
|
27
|
+
{disabled && 'k-disabled'}
|
|
27
28
|
">
|
|
29
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
30
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
28
31
|
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
29
|
-
{
|
|
30
|
-
{
|
|
32
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
33
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
34
|
+
{showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
|
|
35
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
36
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
31
37
|
{showSpinButton &&
|
|
32
38
|
<span class="k-input-spinner k-spin-button">
|
|
33
39
|
<button class="k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, globalDefaultProps } from '../component';
|
|
2
|
-
import { IconStatic } from '../icon/index';
|
|
3
2
|
import { InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
|
+
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
4
4
|
import { SpinButtonStatic } from '../spinbutton/index';
|
|
5
5
|
|
|
6
6
|
class NumericTextbox extends Component {
|
|
@@ -45,7 +45,7 @@ function NumericTextboxStatic(props) {
|
|
|
45
45
|
htmlAttributes.fillMode = fillMode;
|
|
46
46
|
htmlAttributes.hover = hover;
|
|
47
47
|
htmlAttributes.focus = focus;
|
|
48
|
-
htmlAttributes.valid =
|
|
48
|
+
htmlAttributes.valid = valid;
|
|
49
49
|
htmlAttributes.invalid = invalid;
|
|
50
50
|
htmlAttributes.required = required;
|
|
51
51
|
htmlAttributes.disabled = disabled;
|
|
@@ -97,7 +97,9 @@ function NumericTextboxStatic(props) {
|
|
|
97
97
|
<InputStatic className={legacyClasses} {...htmlAttributes}>
|
|
98
98
|
<span className={legacyWrapClasses}>
|
|
99
99
|
<input type={type} className={legacyInputClasses} {...inputAttributes} />
|
|
100
|
-
|
|
100
|
+
<InputValidationIconStatic {...props} />
|
|
101
|
+
<InputLoadingIconStatic {...props} />
|
|
102
|
+
<InputClearValueStatic {...props} />
|
|
101
103
|
{showSpinButton === true && <SpinButtonStatic />}
|
|
102
104
|
</span>
|
|
103
105
|
</InputStatic>
|
|
@@ -107,8 +109,9 @@ function NumericTextboxStatic(props) {
|
|
|
107
109
|
return (
|
|
108
110
|
<InputStatic className={numericClasses} {...ariaAttr} {...htmlAttributes}>
|
|
109
111
|
<InputInnerInputStatic {...inputAttributes} />
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
<InputValidationIconStatic {...props} />
|
|
113
|
+
<InputLoadingIconStatic {...props} />
|
|
114
|
+
<InputClearValueStatic {...props} />
|
|
112
115
|
{showSpinButton === true && <SpinButtonStatic className="k-input-spinner" />}
|
|
113
116
|
</InputStatic>
|
|
114
117
|
);
|
|
@@ -123,6 +126,10 @@ NumericTextboxStatic.defaultProps = {
|
|
|
123
126
|
|
|
124
127
|
showSpinButton: true,
|
|
125
128
|
|
|
129
|
+
showValidationIcon: true,
|
|
130
|
+
showLoadingIcon: true,
|
|
131
|
+
showClearButton: true,
|
|
132
|
+
|
|
126
133
|
size: 'medium',
|
|
127
134
|
rounded: 'medium',
|
|
128
135
|
|
|
@@ -137,6 +144,10 @@ NumericTextboxStatic.propTypes = {
|
|
|
137
144
|
|
|
138
145
|
showSpinButton: typeof true,
|
|
139
146
|
|
|
147
|
+
showValidationIcon: typeof true,
|
|
148
|
+
showLoadingIcon: typeof true,
|
|
149
|
+
showClearButton: typeof true,
|
|
150
|
+
|
|
140
151
|
size: typeof [ 'none', 'small', 'medium', 'large' ],
|
|
141
152
|
rounded: typeof [ 'none', 'small', 'medium', 'large', 'pill' ],
|
|
142
153
|
|
package/src/radio/README.md
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
<input type="radio"
|
|
7
7
|
class="
|
|
8
8
|
k-radio
|
|
9
|
-
k-radio
|
|
10
|
-
k-rounded
|
|
9
|
+
k-radio-{size}
|
|
10
|
+
k-rounded-{rounded}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
{checked && 'k-checked'}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
{valid && 'k-valid'}
|
|
15
|
+
{invalid && 'k-invalid'}
|
|
16
|
+
{required && 'k-required'}
|
|
17
|
+
{disabled && 'k-disabled'}
|
|
18
18
|
"
|
|
19
19
|
disabled={disabled}
|
|
20
20
|
/>
|
package/src/searchbox/README.md
CHANGED
|
@@ -2,25 +2,29 @@
|
|
|
2
2
|
<!-- default rendering -->
|
|
3
3
|
<span class="k-searchbox k-input k-input-md k-rounded-md k-input-solid">
|
|
4
4
|
<input type="text" class="k-input-inner" value="..." placeholder="..." />
|
|
5
|
-
<span class="k-input-icon k-icon k-i-search"></span>
|
|
6
5
|
</span>
|
|
7
6
|
|
|
8
7
|
<!-- canonical rendering -->
|
|
9
8
|
<span class="
|
|
10
9
|
k-searchbox
|
|
11
10
|
k-input
|
|
12
|
-
k-input
|
|
13
|
-
k-rounded
|
|
14
|
-
k-input
|
|
11
|
+
k-input-{size}
|
|
12
|
+
k-rounded-{rounded}
|
|
13
|
+
k-input-{fillMode}
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
{valid && 'k-valid'}
|
|
16
|
+
{invalid && 'k-invalid'}
|
|
17
|
+
{loading && 'k-loading'}
|
|
18
|
+
{required && 'k-required'}
|
|
19
|
+
{disabled && 'k-disabled'}
|
|
20
20
|
">
|
|
21
|
-
{
|
|
22
|
-
<
|
|
23
|
-
{
|
|
24
|
-
{
|
|
21
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
22
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
23
|
+
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
24
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
25
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
26
|
+
{showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
|
|
27
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
28
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
25
29
|
</span>
|
|
26
30
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { globalDefaultProps } from '../component';
|
|
2
2
|
import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
|
+
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
3
4
|
import { IconStatic } from '../icon/index';
|
|
4
5
|
|
|
5
6
|
class Searchbox extends Input {
|
|
@@ -19,7 +20,6 @@ function SearchboxInner(props) {
|
|
|
19
20
|
autocomplete,
|
|
20
21
|
|
|
21
22
|
showIcon,
|
|
22
|
-
iconPosition,
|
|
23
23
|
iconName,
|
|
24
24
|
|
|
25
25
|
prefix,
|
|
@@ -87,22 +87,24 @@ function SearchboxInner(props) {
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<InputStatic className={legacyClasses} {...htmlAttributes}>
|
|
90
|
-
{
|
|
91
|
-
{showIcon && iconPosition === 'leading' && <IconStatic name={iconName} className="k-input-icon" />}
|
|
90
|
+
{showIcon && <IconStatic name={iconName} className="k-input-icon" />}
|
|
92
91
|
<input type={type} className="k-input" {...inputAttributes} />
|
|
93
|
-
|
|
94
|
-
{
|
|
92
|
+
<InputValidationIconStatic {...props} />
|
|
93
|
+
<InputLoadingIconStatic {...props} />
|
|
94
|
+
<InputClearValueStatic {...props} />
|
|
95
95
|
</InputStatic>
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
100
|
<InputStatic className={searchBoxClasses} {...ariaAttr} {...htmlAttributes}>
|
|
101
|
+
{showIcon && <IconStatic name={iconName} className="k-input-icon" />}
|
|
101
102
|
{prefix}
|
|
102
|
-
{showIcon && iconPosition === 'leading' && <IconStatic name={iconName} className="k-input-icon" />}
|
|
103
103
|
<InputInnerInputStatic {...inputAttributes} />
|
|
104
|
-
{showIcon && iconPosition === 'trailing' && <IconStatic name={iconName} className="k-input-icon" />}
|
|
105
104
|
{suffix}
|
|
105
|
+
<InputValidationIconStatic {...props} />
|
|
106
|
+
<InputLoadingIconStatic {...props} />
|
|
107
|
+
<InputClearValueStatic {...props} />
|
|
106
108
|
</InputStatic>
|
|
107
109
|
);
|
|
108
110
|
}
|
|
@@ -112,13 +114,16 @@ SearchboxInner.defaultProps = {
|
|
|
112
114
|
|
|
113
115
|
type: 'text',
|
|
114
116
|
value: '',
|
|
115
|
-
placeholder: '
|
|
117
|
+
placeholder: '',
|
|
116
118
|
autocomplete: 'off',
|
|
117
119
|
|
|
118
120
|
showIcon: true,
|
|
119
|
-
iconPosition: 'leading',
|
|
120
121
|
iconName: 'search',
|
|
121
122
|
|
|
123
|
+
showValidationIcon: true,
|
|
124
|
+
showLoadingIcon: true,
|
|
125
|
+
showClearButton: true,
|
|
126
|
+
|
|
122
127
|
size: 'medium',
|
|
123
128
|
rounded: 'medium',
|
|
124
129
|
|
|
@@ -135,9 +140,12 @@ SearchboxInner.propTypes = {
|
|
|
135
140
|
autocomplete: typeof [ 'on', 'off' ],
|
|
136
141
|
|
|
137
142
|
showIcon: typeof true,
|
|
138
|
-
iconPosition: typeof [ 'leading', 'trailing' ],
|
|
139
143
|
iconName: typeof '',
|
|
140
144
|
|
|
145
|
+
showValidationIcon: typeof true,
|
|
146
|
+
showLoadingIcon: typeof true,
|
|
147
|
+
showClearButton: typeof true,
|
|
148
|
+
|
|
141
149
|
prefix: typeof '#fragment',
|
|
142
150
|
suffix: typeof '#fragment',
|
|
143
151
|
|
|
@@ -150,6 +158,7 @@ SearchboxInner.propTypes = {
|
|
|
150
158
|
focus: typeof false,
|
|
151
159
|
valid: typeof false,
|
|
152
160
|
invalid: typeof false,
|
|
161
|
+
loading: typeof false,
|
|
153
162
|
required: typeof false,
|
|
154
163
|
disabled: typeof false,
|
|
155
164
|
|
package/src/textarea/README.md
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
```html
|
|
2
2
|
<!-- default rendering -->
|
|
3
3
|
<span class="k-textarea k-input k-input-md k-rounded-md k-input-solid">
|
|
4
|
-
<textarea
|
|
4
|
+
<textarea class="k-input-inner" placeholder="...">...</textarea>
|
|
5
5
|
</span>
|
|
6
6
|
|
|
7
7
|
<!-- canonical rendering -->
|
|
8
8
|
<span class="
|
|
9
9
|
k-textarea
|
|
10
10
|
k-input
|
|
11
|
-
k-input
|
|
12
|
-
k-rounded
|
|
13
|
-
k-input
|
|
11
|
+
k-input-{size}
|
|
12
|
+
k-rounded-{rounded}
|
|
13
|
+
k-input-{fillMode}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
{valid && 'k-valid'}
|
|
16
|
+
{invalid && 'k-invalid'}
|
|
17
|
+
{loading && 'k-loading'}
|
|
18
|
+
{required && 'k-required'}
|
|
19
|
+
{disabled && 'k-disabled'}
|
|
19
20
|
">
|
|
20
|
-
<
|
|
21
|
-
{
|
|
22
|
-
|
|
21
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
22
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
23
|
+
<textarea class="k-input-inner" placeholder="{placeholder}" disabled={disabled}>{value}</textarea>
|
|
24
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
25
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
26
|
+
{showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
|
|
27
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
28
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
23
29
|
</span>
|
|
24
30
|
```
|
package/src/textbox/README.md
CHANGED
|
@@ -8,17 +8,23 @@
|
|
|
8
8
|
<span class="
|
|
9
9
|
k-textbox
|
|
10
10
|
k-input
|
|
11
|
-
k-input
|
|
12
|
-
k-rounded
|
|
13
|
-
k-input
|
|
11
|
+
k-input-{size}
|
|
12
|
+
k-rounded-{rounded}
|
|
13
|
+
k-input-{fillMode}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
{valid && 'k-valid'}
|
|
16
|
+
{invalid && 'k-invalid'}
|
|
17
|
+
{loading && 'k-loading'}
|
|
18
|
+
{required && 'k-required'}
|
|
19
|
+
{disabled && 'k-disabled'}
|
|
19
20
|
">
|
|
21
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
22
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
20
23
|
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
21
|
-
{
|
|
22
|
-
{
|
|
24
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
25
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
26
|
+
{showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
|
|
27
|
+
{showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
|
|
28
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
23
29
|
</span>
|
|
24
30
|
```
|
package/src/textbox/textbox.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { globalDefaultProps } from '../component';
|
|
2
2
|
import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
|
|
3
|
+
import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
|
|
3
4
|
|
|
4
5
|
class Textbox extends Input {
|
|
5
6
|
render() {
|
|
@@ -85,6 +86,9 @@ function TextboxStatic(props) {
|
|
|
85
86
|
{prefix}
|
|
86
87
|
<input type={type} className="k-input" {...inputAttributes} />
|
|
87
88
|
{suffix}
|
|
89
|
+
<InputValidationIconStatic {...props} />
|
|
90
|
+
<InputLoadingIconStatic {...props} />
|
|
91
|
+
<InputClearValueStatic {...props} />
|
|
88
92
|
</InputStatic>
|
|
89
93
|
);
|
|
90
94
|
}
|
|
@@ -94,6 +98,9 @@ function TextboxStatic(props) {
|
|
|
94
98
|
{prefix}
|
|
95
99
|
<InputInnerInputStatic {...inputAttributes} />
|
|
96
100
|
{suffix}
|
|
101
|
+
<InputValidationIconStatic {...props} />
|
|
102
|
+
<InputLoadingIconStatic {...props} />
|
|
103
|
+
<InputClearValueStatic {...props} />
|
|
97
104
|
</InputStatic>
|
|
98
105
|
);
|
|
99
106
|
}
|
|
@@ -106,6 +113,10 @@ TextboxStatic.defaultProps = {
|
|
|
106
113
|
placeholder: '',
|
|
107
114
|
autocomplete: 'off',
|
|
108
115
|
|
|
116
|
+
showValidationIcon: true,
|
|
117
|
+
showLoadingIcon: true,
|
|
118
|
+
showClearButton: true,
|
|
119
|
+
|
|
109
120
|
size: 'medium',
|
|
110
121
|
rounded: 'medium',
|
|
111
122
|
|
|
@@ -121,6 +132,10 @@ TextboxStatic.propTypes = {
|
|
|
121
132
|
placeholder: typeof '',
|
|
122
133
|
autocomplete: typeof [ 'on', 'off' ],
|
|
123
134
|
|
|
135
|
+
showValidationIcon: typeof true,
|
|
136
|
+
showLoadingIcon: typeof true,
|
|
137
|
+
showClearButton: typeof true,
|
|
138
|
+
|
|
124
139
|
prefix: typeof '#fragment',
|
|
125
140
|
suffix: typeof '#fragment',
|
|
126
141
|
|
|
@@ -133,7 +148,9 @@ TextboxStatic.propTypes = {
|
|
|
133
148
|
focus: typeof false,
|
|
134
149
|
valid: typeof false,
|
|
135
150
|
invalid: typeof false,
|
|
151
|
+
loading: typeof false,
|
|
136
152
|
required: typeof false,
|
|
153
|
+
readonly: typeof false,
|
|
137
154
|
disabled: typeof false,
|
|
138
155
|
|
|
139
156
|
aria: typeof false,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
```html
|
|
2
|
+
<!-- default rendering -->
|
|
3
|
+
<span class="k-timepicker k-input k-input-md k-rounded-md k-input-solid">
|
|
4
|
+
<input type="text" class="k-input-inner" value="..." placeholder="..." />
|
|
5
|
+
<button type="button" class="k-input-button k-button k-icon-button k-button-md k-button-solid k-button-solid-base">
|
|
6
|
+
<span class="k-button-icon k-icon k-i-clock"></span>
|
|
7
|
+
</button>
|
|
8
|
+
</span>
|
|
9
|
+
|
|
10
|
+
<!-- canonical rendering -->
|
|
11
|
+
<span class="
|
|
12
|
+
k-timepicker
|
|
13
|
+
k-input
|
|
14
|
+
k-input-{size}
|
|
15
|
+
k-rounded-{rounded}
|
|
16
|
+
k-input-{fillMode}
|
|
17
|
+
|
|
18
|
+
{valid && 'k-valid'}
|
|
19
|
+
{invalid && 'k-invalid'}
|
|
20
|
+
{loading && 'k-loading'}
|
|
21
|
+
{required && 'k-required'}
|
|
22
|
+
{disabled && 'k-disabled'}
|
|
23
|
+
">
|
|
24
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
25
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
26
|
+
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
27
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
28
|
+
{showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
|
|
29
|
+
{showValidationIcon && invalid && <span class="k-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
|
+
<button type="button" class="k-input-button k-button k-icon-button k-button-{size} k-button-{fillMode} k-button-{fillMode}-base">
|
|
33
|
+
<span class="k-button-icon k-icon k-i-clock"></span>
|
|
34
|
+
</button>
|
|
35
|
+
</span>
|
|
36
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './timepicker.jsx';
|