@progress/kendo-themes-html 4.42.1-dev.0 → 5.0.0-alpha.0

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.
@@ -257,6 +257,10 @@ function renderDOM( jsxNode, container = null ) {
257
257
  element.append( children );
258
258
  } else {
259
259
  children.forEach( child => {
260
+ if (child === null) {
261
+ return;
262
+ }
263
+
260
264
  renderDOM( child, element );
261
265
  });
262
266
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-themes-html",
3
3
  "description": "A collection of HTML helpers used for developing Kendo UI themes",
4
- "version": "4.42.1-dev.0",
4
+ "version": "5.0.0-alpha.0",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -42,5 +42,5 @@
42
42
  "@rollup/plugin-node-resolve": "^13.0.5",
43
43
  "rollup": "^2.58.0"
44
44
  },
45
- "gitHead": "8575a79ff8c17831e06014204962beb77190180b"
45
+ "gitHead": "3fd060a3f688d79324c6e976857536557f71dc11"
46
46
  }
@@ -1,6 +1,6 @@
1
1
  import { globalDefaultProps } from '../component';
2
2
  import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
3
- import { IconStatic } from '../icon/index';
3
+ import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
4
4
 
5
5
  class Autocomplete extends Input {
6
6
  render() {
@@ -18,8 +18,6 @@ function AutocompleteStatic(props) {
18
18
  placeholder,
19
19
  autocomplete,
20
20
 
21
- showClearButton,
22
-
23
21
  prefix,
24
22
  suffix,
25
23
 
@@ -86,10 +84,10 @@ function AutocompleteStatic(props) {
86
84
 
87
85
  return (
88
86
  <InputStatic className={legacyClasses} {...htmlAttributes}>
89
- {prefix}
90
87
  <input type={type} className="k-input" {...inputAttributes} />
91
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
92
- {suffix}
88
+ <InputValidationIconStatic {...props} />
89
+ <InputLoadingIconStatic {...props} />
90
+ <InputClearValueStatic {...props} />
93
91
  </InputStatic>
94
92
  );
95
93
  }
@@ -98,8 +96,10 @@ function AutocompleteStatic(props) {
98
96
  <InputStatic className={autocompleteClasses} {...ariaAttr} {...htmlAttributes}>
99
97
  {prefix}
100
98
  <InputInnerInputStatic {...inputAttributes} />
101
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
102
99
  {suffix}
100
+ <InputValidationIconStatic {...props} />
101
+ <InputLoadingIconStatic {...props} />
102
+ <InputClearValueStatic {...props} />
103
103
  </InputStatic>
104
104
  );
105
105
  }
@@ -112,6 +112,8 @@ AutocompleteStatic.defaultProps = {
112
112
  placeholder: '',
113
113
  autocomplete: 'off',
114
114
 
115
+ showValidationIcon: true,
116
+ showLoadingIcon: true,
115
117
  showClearButton: true,
116
118
 
117
119
  size: 'medium',
@@ -129,6 +131,8 @@ AutocompleteStatic.propTypes = {
129
131
  placeholder: typeof '',
130
132
  autocomplete: typeof [ 'on', 'off' ],
131
133
 
134
+ showValidationIcon: typeof true,
135
+ showLoadingIcon: typeof true,
132
136
  showClearButton: typeof true,
133
137
 
134
138
  prefix: typeof '#fragment',
@@ -143,6 +147,7 @@ AutocompleteStatic.propTypes = {
143
147
  focus: typeof false,
144
148
  valid: typeof false,
145
149
  invalid: typeof false,
150
+ loading: typeof false,
146
151
  required: typeof false,
147
152
  disabled: typeof false,
148
153
 
@@ -82,9 +82,7 @@ function ColorpickerStatic(props) {
82
82
  return (
83
83
  <PickerStatic className={legacyClasses} {...htmlAttributes}>
84
84
  <span className={legacyWrapClasses}>
85
- {prefix}
86
85
  <ColorPreviewStatic color={value} iconName={iconName} />
87
- {suffix}
88
86
  <span className="k-select"><IconStatic name="arrow-s" /></span>
89
87
  </span>
90
88
  </PickerStatic>
@@ -94,8 +92,7 @@ function ColorpickerStatic(props) {
94
92
  return (
95
93
  <PickerStatic className={colorpickerClasses} {...ariaAttr} {...htmlAttributes}>
96
94
  {prefix}
97
- <ColorPreviewStatic color={value} iconName={iconName} />
98
- {false && <InputInnerSpanStatic value={value} />}
95
+ <InputInnerSpanStatic showValue={false} valueIcon={<ColorPreviewStatic className="k-icon k-value-icon" color={value} iconName={iconName} />} />
99
96
  {suffix}
100
97
  <ButtonStatic className="k-input-button" icon="arrow-s" rounded="none" size={size} fillMode={fillMode}></ButtonStatic>
101
98
  </PickerStatic>
@@ -112,6 +109,8 @@ ColorpickerStatic.defaultProps = {
112
109
 
113
110
  iconName: '',
114
111
 
112
+ valueIcon: null,
113
+
115
114
  size: 'medium',
116
115
  rounded: 'medium',
117
116
 
@@ -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 { ButtonStatic } from '../button/index';
4
5
  import { IconStatic } from '../icon/index';
5
6
 
@@ -19,8 +20,6 @@ function ComboboxStatic(props) {
19
20
  placeholder,
20
21
  autocomplete,
21
22
 
22
- showClearButton,
23
-
24
23
  prefix,
25
24
  suffix,
26
25
 
@@ -93,10 +92,10 @@ function ComboboxStatic(props) {
93
92
  return (
94
93
  <InputStatic className={legacyClasses} {...htmlAttributes}>
95
94
  <span className={legacyWrapClasses}>
96
- {prefix}
97
95
  <input type={type} className="k-input" {...inputAttributes} />
98
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
99
- {suffix}
96
+ <InputValidationIconStatic {...props} />
97
+ <InputLoadingIconStatic {...props} />
98
+ <InputClearValueStatic {...props} />
100
99
  <span className="k-select"><IconStatic name="arrow-s" /></span>
101
100
  </span>
102
101
  </InputStatic>
@@ -107,8 +106,10 @@ function ComboboxStatic(props) {
107
106
  <InputStatic className={comboboxClasses} {...ariaAttr} {...htmlAttributes}>
108
107
  {prefix}
109
108
  <InputInnerInputStatic {...inputAttributes} />
110
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
111
109
  {suffix}
110
+ <InputValidationIconStatic {...props} />
111
+ <InputLoadingIconStatic {...props} />
112
+ <InputClearValueStatic {...props} />
112
113
  <ButtonStatic className="k-input-button" icon="arrow-s" rounded="none" size={size} fillMode={fillMode}></ButtonStatic>
113
114
  </InputStatic>
114
115
  );
@@ -122,6 +123,8 @@ ComboboxStatic.defaultProps = {
122
123
  placeholder: '',
123
124
  autocomplete: 'off',
124
125
 
126
+ showValidationIcon: true,
127
+ showLoadingIcon: true,
125
128
  showClearButton: true,
126
129
 
127
130
  size: 'medium',
@@ -139,6 +142,8 @@ ComboboxStatic.propTypes = {
139
142
  placeholder: typeof '',
140
143
  autocomplete: typeof [ 'on', 'off' ],
141
144
 
145
+ showValidationIcon: typeof true,
146
+ showLoadingIcon: typeof true,
142
147
  showClearButton: typeof true,
143
148
 
144
149
  prefix: typeof '#fragment',
package/src/component.js CHANGED
@@ -2,7 +2,7 @@ import { isFunction } from '../utils/object';
2
2
  import { renderDOM, htmlToProps } from '../lib/jsx-runtime';
3
3
 
4
4
  const globalDefaultProps = {
5
- legacy: true,
5
+ legacy: false,
6
6
 
7
7
  className: '',
8
8
 
@@ -1,5 +1,6 @@
1
1
  import { globalDefaultProps } from '../component';
2
2
  import { Picker, PickerStatic, InputInnerSpanStatic } from '../input/index';
3
+ import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
3
4
  import { ButtonStatic } from '../button/index';
4
5
  import { IconStatic } from '../icon/index';
5
6
 
@@ -24,8 +25,6 @@ function DropdownListStatic(props) {
24
25
  valueIconName,
25
26
  arrowIconName,
26
27
 
27
- showClearButton,
28
-
29
28
  prefix,
30
29
  suffix,
31
30
 
@@ -102,10 +101,10 @@ function DropdownListStatic(props) {
102
101
  return (
103
102
  <PickerStatic className={legacyClasses} {...htmlAttributes}>
104
103
  <span className={legacyWrapClasses}>
105
- {prefix}
106
104
  <InputInnerSpanStatic {...inputAttributes} />
107
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
108
- {suffix}
105
+ <InputValidationIconStatic {...props} />
106
+ <InputLoadingIconStatic {...props} />
107
+ <InputClearValueStatic {...props} />
109
108
  <span className="k-select"><IconStatic name={arrowIconName} /></span>
110
109
  </span>
111
110
  </PickerStatic>
@@ -116,8 +115,10 @@ function DropdownListStatic(props) {
116
115
  <PickerStatic className={dropdownListClasses} {...ariaAttr} {...htmlAttributes}>
117
116
  {prefix}
118
117
  <InputInnerSpanStatic {...inputAttributes} />
119
- {!disabled && showClearButton && value !== '' && <span className="k-clear-value"><IconStatic name="x" /></span>}
120
118
  {suffix}
119
+ <InputValidationIconStatic {...props} />
120
+ <InputLoadingIconStatic {...props} />
121
+ <InputClearValueStatic {...props} />
121
122
  <ButtonStatic className="k-input-button" icon={arrowIconName} rounded="none" size={size} fillMode={fillMode}></ButtonStatic>
122
123
  </PickerStatic>
123
124
  );
@@ -132,9 +133,12 @@ DropdownListStatic.defaultProps = {
132
133
  autocomplete: 'off',
133
134
 
134
135
  showValue: true,
136
+ valueIcon: null,
135
137
  valueIconName: '',
136
138
  arrowIconName: 'arrow-s',
137
139
 
140
+ showValidationIcon: true,
141
+ showLoadingIcon: true,
138
142
  showClearButton: false,
139
143
 
140
144
  size: 'medium',
@@ -157,6 +161,8 @@ DropdownListStatic.propTypes = {
157
161
  valueIconName: typeof '',
158
162
  arrowIconName: typeof '',
159
163
 
164
+ showValidationIcon: typeof true,
165
+ showLoadingIcon: typeof true,
160
166
  showClearButton: typeof true,
161
167
 
162
168
  prefix: typeof '#fragment',
@@ -171,6 +177,7 @@ DropdownListStatic.propTypes = {
171
177
  focus: typeof false,
172
178
  valid: typeof false,
173
179
  invalid: typeof false,
180
+ loading: typeof false,
174
181
  required: typeof false,
175
182
  disabled: typeof false,
176
183
 
@@ -3,3 +3,6 @@ export * from './picker.jsx';
3
3
  export * from './input-inner.jsx';
4
4
  export * from './input-prefix.jsx';
5
5
  export * from './input-suffix.jsx';
6
+ export * from './input-validation-icon.jsx';
7
+ export * from './input-loading-icon.jsx';
8
+ export * from './input-clear-value.jsx';
@@ -0,0 +1,30 @@
1
+ import { IconStatic } from '../icon/index';
2
+
3
+ function InputClearValueStatic(inputProps) {
4
+
5
+ const {
6
+ value,
7
+
8
+ showClearButton,
9
+
10
+ loading,
11
+ disabled,
12
+
13
+ aria
14
+ } = inputProps;
15
+
16
+ if (disabled || loading || !showClearButton || value === '' ) {
17
+ return <></>;
18
+ }
19
+
20
+ let ariaAttr = aria
21
+ ? {}
22
+ : {};
23
+
24
+ return (
25
+ <span className="k-clear-value" {...ariaAttr}><IconStatic name="x" /></span>
26
+ );
27
+
28
+ }
29
+
30
+ export { InputClearValueStatic };
@@ -43,19 +43,19 @@ function InputInnerSpanStatic(props) {
43
43
 
44
44
  return (
45
45
  <span className={legacyClasses} {...htmlAttributes}>
46
- {false && valueIcon}
47
- <IconStatic className="k-value-icon" name={valueIconName} />
48
- {value === '' && placeholder}
49
- {showValue && value && <span className="k-value-text">{value}</span>}
46
+ {valueIcon}
47
+ {valueIcon === null && <IconStatic className="k-icon k-input-value-icon" name={valueIconName} />}
48
+ {showValue && value === '' && placeholder}
49
+ {showValue && value && <span className="k-input-value-text">{value}</span>}
50
50
  </span>
51
51
  );
52
52
  }
53
53
 
54
54
  return (
55
55
  <span className={inputClasses} {...ariaAttr} {...htmlAttributes}>
56
- {false && valueIcon}
57
- <IconStatic className="k-value-icon" name={valueIconName} />
58
- {value === '' && placeholder}
56
+ {valueIcon}
57
+ {valueIcon === null && <IconStatic className="k-icon k-input-value-icon" name={valueIconName} />}
58
+ {showValue && value === '' && placeholder}
59
59
  {showValue && value && <span className="k-value-text">{value}</span>}
60
60
  </span>
61
61
  );
@@ -68,7 +68,8 @@ InputInnerSpanStatic.defaultProps = {
68
68
  placeholder: '',
69
69
 
70
70
  showValue: true,
71
- valueIconName: null,
71
+ valueIcon: null,
72
+ valueIconName: '',
72
73
  };
73
74
 
74
75
  InputInnerSpanStatic.propTypes = {
@@ -0,0 +1,28 @@
1
+ import { IconStatic } from '../icon/index';
2
+
3
+ function InputLoadingIconStatic(inputProps) {
4
+
5
+ const {
6
+ showLoadingIcon,
7
+
8
+ loading,
9
+ disabled,
10
+
11
+ aria
12
+ } = inputProps;
13
+
14
+ if (disabled || !showLoadingIcon || !loading) {
15
+ return <></>;
16
+ }
17
+
18
+ let ariaAttr = aria
19
+ ? {}
20
+ : {};
21
+
22
+ return (
23
+ <IconStatic name="loading" className="k-input-loading-icon" {...ariaAttr} />
24
+ );
25
+
26
+ }
27
+
28
+ export { InputLoadingIconStatic };
@@ -0,0 +1,37 @@
1
+ import { IconStatic } from '../icon/index';
2
+
3
+ function InputValidationIconStatic(inputProps) {
4
+
5
+ const {
6
+ showValidationIcon,
7
+
8
+ valid,
9
+ invalid,
10
+ loading,
11
+ disabled,
12
+
13
+ aria
14
+ } = inputProps;
15
+
16
+ if (disabled || loading || !showValidationIcon ) {
17
+ return <></>;
18
+ }
19
+
20
+ let iconName = invalid ? 'warning' : 'check';
21
+ let renderValidationIcon = Boolean( valid || invalid );
22
+
23
+ let ariaAttr = aria
24
+ ? {}
25
+ : {};
26
+
27
+ if (renderValidationIcon === false) {
28
+ return <></>;
29
+ }
30
+
31
+ return (
32
+ <IconStatic name={iconName} className="k-input-validation-icon" {...ariaAttr} />
33
+ );
34
+
35
+ }
36
+
37
+ export { InputValidationIconStatic };
@@ -49,6 +49,7 @@ function InputStatic(props) {
49
49
 
50
50
  hover,
51
51
  focus,
52
+ valid,
52
53
  invalid,
53
54
  required,
54
55
  disabled,
@@ -68,6 +69,7 @@ function InputStatic(props) {
68
69
  {
69
70
  'k-hover': hover === true,
70
71
  'k-focus': focus === true,
72
+ 'k-valid': valid === true,
71
73
  'k-invalid': invalid === true,
72
74
  'k-required': required === true,
73
75
  'k-disabled': disabled === true
@@ -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 = invalid;
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
- {valid && <IconStatic className="k-input-icon" name="check" />}
98
- {invalid && <IconStatic className="k-input-icon" name="warning" />}
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
 
@@ -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 = invalid;
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
- {invalid && <IconStatic name="warning" />}
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
- {valid && <IconStatic className="k-input-icon" name="check" />}
111
- {invalid && <IconStatic className="k-input-icon" name="warning" />}
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
 
@@ -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
- {prefix}
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
- {showIcon && iconPosition === 'trailing' && <IconStatic name={iconName} className="k-input-icon" />}
94
- {suffix}
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: 'Search...',
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
 
@@ -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,6 +148,7 @@ 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,
137
153
  disabled: typeof false,
138
154