@progress/kendo-themes-html 5.0.0-next.4 → 5.1.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.
Files changed (127) hide show
  1. package/lib/jsx-runtime.js +231 -14
  2. package/package.json +8 -8
  3. package/src/autocomplete/README.md +30 -0
  4. package/src/autocomplete/autocomplete.jsx +160 -0
  5. package/src/autocomplete/index.js +1 -0
  6. package/src/avatar/README.md +21 -0
  7. package/src/avatar/avatar.jsx +110 -0
  8. package/src/avatar/index.js +1 -0
  9. package/src/button/README.md +22 -0
  10. package/src/button/button.jsx +165 -0
  11. package/src/button/index.js +1 -0
  12. package/src/checkbox/README.md +22 -0
  13. package/src/checkbox/checkbox.jsx +123 -0
  14. package/src/checkbox/index.js +1 -0
  15. package/src/chip/README.md +47 -0
  16. package/src/chip/chip-actions.jsx +80 -0
  17. package/src/chip/chip-avatar.jsx +13 -0
  18. package/src/chip/chip-list.jsx +84 -0
  19. package/src/chip/chip.jsx +180 -0
  20. package/src/chip/index.js +4 -0
  21. package/src/colorpicker/README.md +39 -0
  22. package/src/colorpicker/color-preview.jsx +101 -0
  23. package/src/colorpicker/colorpicker.jsx +151 -0
  24. package/src/colorpicker/index.js +2 -0
  25. package/src/combobox/README.md +36 -0
  26. package/src/combobox/combobox.jsx +168 -0
  27. package/src/combobox/index.js +1 -0
  28. package/src/{component.js → component/component.jsx} +10 -7
  29. package/src/component/index.js +1 -0
  30. package/src/dateinput/README.md +48 -0
  31. package/src/dateinput/dateinput.jsx +168 -0
  32. package/src/dateinput/index.js +1 -0
  33. package/src/datepicker/README.md +36 -0
  34. package/src/datepicker/datepicker.jsx +168 -0
  35. package/src/datepicker/index.js +1 -0
  36. package/src/datetimepicker/README.md +36 -0
  37. package/src/datetimepicker/datetimepicker.jsx +168 -0
  38. package/src/datetimepicker/index.js +1 -0
  39. package/src/dropdownlist/README.md +39 -0
  40. package/src/dropdownlist/dropdownlist.jsx +191 -0
  41. package/src/dropdownlist/index.js +1 -0
  42. package/src/fab/README.md +19 -0
  43. package/src/fab/fab.jsx +150 -0
  44. package/src/fab/index.js +1 -0
  45. package/src/icon/README.md +0 -0
  46. package/src/icon/icon.jsx +59 -0
  47. package/src/icon/index.js +1 -0
  48. package/src/index.js +90 -8
  49. package/src/input/README.md +0 -0
  50. package/src/input/index.js +8 -0
  51. package/src/input/input-clear-value.jsx +31 -0
  52. package/src/input/input-inner-input.jsx +77 -0
  53. package/src/input/input-inner-span.jsx +91 -0
  54. package/src/input/input-inner-textarea.jsx +74 -0
  55. package/src/input/input-inner.jsx +3 -0
  56. package/src/input/input-loading-icon.jsx +28 -0
  57. package/src/input/input-prefix.jsx +48 -0
  58. package/src/input/input-suffix.jsx +48 -0
  59. package/src/input/input-validation-icon.jsx +37 -0
  60. package/src/input/input.jsx +147 -0
  61. package/src/input/picker.jsx +145 -0
  62. package/src/list/README.md +107 -0
  63. package/src/list/index.js +5 -0
  64. package/src/list/list-content.jsx +95 -0
  65. package/src/list/list-group-item.jsx +66 -0
  66. package/src/list/list-header.jsx +67 -0
  67. package/src/list/list-item.jsx +117 -0
  68. package/src/list/list.jsx +182 -0
  69. package/src/maskedtextbox/README.md +30 -0
  70. package/src/maskedtextbox/index.js +1 -0
  71. package/src/maskedtextbox/maskedtextbox.jsx +152 -0
  72. package/src/menu/README.md +40 -0
  73. package/src/menu/index.js +3 -0
  74. package/src/menu/menu-item-content.jsx +48 -0
  75. package/src/menu/menu-item.jsx +174 -0
  76. package/src/menu/menu-list.jsx +74 -0
  77. package/src/menubutton/README.md +60 -0
  78. package/src/menubutton/index.js +1 -0
  79. package/src/menubutton/menubutton.jsx +161 -0
  80. package/src/multiselect/README.md +37 -0
  81. package/src/multiselect/index.js +2 -0
  82. package/src/multiselect/multiselect-chip-list.jsx +55 -0
  83. package/src/multiselect/multiselect.jsx +189 -0
  84. package/src/nodata/index.js +1 -0
  85. package/src/nodata/nodata.jsx +64 -0
  86. package/src/numerictextbox/README.md +48 -0
  87. package/src/numerictextbox/index.js +1 -0
  88. package/src/numerictextbox/numerictextbox.jsx +169 -0
  89. package/src/popup/README.md +15 -0
  90. package/src/popup/index.js +1 -0
  91. package/src/popup/popup.jsx +80 -0
  92. package/src/radio/README.md +21 -0
  93. package/src/radio/index.js +1 -0
  94. package/src/radio/radio.jsx +107 -0
  95. package/src/searchbar/README.md +0 -0
  96. package/src/searchbar/index.js +1 -0
  97. package/src/searchbar/searchbar.jsx +55 -0
  98. package/src/searchbox/README.md +30 -0
  99. package/src/searchbox/index.js +1 -0
  100. package/src/searchbox/searchbox.jsx +171 -0
  101. package/src/spinbutton/README.md +0 -0
  102. package/src/spinbutton/index.js +1 -0
  103. package/src/spinbutton/spinbutton.jsx +71 -0
  104. package/src/splitbutton/README.md +76 -0
  105. package/src/splitbutton/index.js +1 -0
  106. package/src/splitbutton/splitbutton.jsx +176 -0
  107. package/src/switch/README.md +28 -0
  108. package/src/switch/index.js +1 -0
  109. package/src/switch/switch.jsx +132 -0
  110. package/src/textarea/README.md +30 -0
  111. package/src/textarea/index.js +1 -0
  112. package/src/textarea/textarea.jsx +137 -0
  113. package/src/textbox/README.md +30 -0
  114. package/src/textbox/index.js +1 -0
  115. package/src/textbox/textbox.jsx +162 -0
  116. package/src/timepicker/README.md +36 -0
  117. package/src/timepicker/index.js +1 -0
  118. package/src/timepicker/timepicker.jsx +168 -0
  119. package/src/treeview/README.md +0 -0
  120. package/src/treeview/index.js +4 -0
  121. package/src/treeview/treeview-group.jsx +70 -0
  122. package/src/treeview/treeview-item.jsx +142 -0
  123. package/src/treeview/treeview-leaf.jsx +99 -0
  124. package/src/treeview/treeview.jsx +125 -0
  125. package/utils/styles.js +52 -7
  126. package/src/button.jsx +0 -114
  127. package/src/icon.jsx +0 -37
@@ -0,0 +1,180 @@
1
+ import * as styles from '../../utils/styles';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
+ import { IconStatic } from '../icon/index';
4
+ import { ChipAvatarStatic } from './chip-avatar.jsx';
5
+ import { ChipActionsStatic } from './chip-actions.jsx';
6
+
7
+ class Chip extends Component {
8
+
9
+ init() {
10
+ let actions = this._props.actions;
11
+ let newActions = [];
12
+
13
+ if (actions === undefined) {
14
+ this._props.actions = [];
15
+ return;
16
+ }
17
+
18
+ if (Array.isArray(actions)) {
19
+ return;
20
+ }
21
+
22
+ actions.split(',').forEach(action => {
23
+ newActions.push(action.trim());
24
+ });
25
+
26
+ this._props.actions = newActions;
27
+ }
28
+
29
+ render() {
30
+ return <ChipStatic {...this.props} />;
31
+ }
32
+ }
33
+
34
+ function ChipStatic(props) {
35
+ const {
36
+ className: ownClassName,
37
+
38
+ children,
39
+
40
+ text,
41
+ icon,
42
+ actions,
43
+
44
+ showAvatar,
45
+
46
+ size,
47
+ rounded,
48
+
49
+ fillMode,
50
+ themeColor,
51
+
52
+ hover,
53
+ focus,
54
+ active,
55
+ selected,
56
+ disabled,
57
+
58
+ aria,
59
+ legacy,
60
+
61
+ ...htmlAttributes
62
+ } = props;
63
+
64
+ let chipClasses = [
65
+ ownClassName,
66
+ 'k-chip',
67
+ styles.sizeClass( size, 'k-chip' ),
68
+ styles.roundedClass( rounded ),
69
+ styles.fillModeClass( fillMode, 'k-chip' ),
70
+ styles.themeColorClass( fillMode, themeColor, 'k-chip' ),
71
+ {
72
+ 'k-hover': hover === true,
73
+ 'k-focus': focus === true,
74
+ 'k-active': active === true,
75
+ 'k-selected': selected === true,
76
+ 'k-disabled': disabled === true
77
+ }
78
+ ];
79
+
80
+ // Augment attributes
81
+ htmlAttributes.disabled = disabled;
82
+
83
+ let ariaAttr = aria
84
+ ? {}
85
+ : {};
86
+
87
+ if (legacy) {
88
+
89
+ let legacyClasses = [
90
+ ownClassName,
91
+ 'k-chip',
92
+ `k-chip-${themeColor}`,
93
+ {
94
+ 'k-chip-outline': fillMode === 'outline',
95
+ 'k-chip-solid': fillMode === 'solid',
96
+ 'k-state-hover': hover === true,
97
+ 'k-state-focus': focus === true,
98
+ 'k-state-active': active === true,
99
+ 'k-state-selected': selected === true,
100
+ 'k-state-disabled': disabled === true
101
+ }
102
+ ];
103
+
104
+ return (
105
+ <div className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
106
+ <IconStatic className="k-chip-icon" name={icon} />
107
+ {showAvatar && <ChipAvatarStatic {...props} />}
108
+ <span className="k-chip-content">
109
+ { children.length
110
+ ? children
111
+ : text && <span className="k-chip-label">{text}</span>
112
+ }
113
+ </span>
114
+ { actions.length > 0 && <ChipActionsStatic actions={actions} />}
115
+ </div>
116
+ );
117
+ }
118
+
119
+ return (
120
+ <div className={chipClasses} {...ariaAttr} {...htmlAttributes}>
121
+ <IconStatic className="k-chip-icon" name={icon} />
122
+ {showAvatar && <ChipAvatarStatic {...props} />}
123
+ <span className="k-chip-content">
124
+ { children.length
125
+ ? children
126
+ : text && <span className="k-chip-label k-text-ellipsis">{text}</span>
127
+ }
128
+ </span>
129
+ { actions.length > 0 && <ChipActionsStatic actions={actions} />}
130
+ </div>
131
+ );
132
+ }
133
+
134
+ ChipStatic.defaultProps = {
135
+ ...globalDefaultProps,
136
+
137
+ children: [],
138
+
139
+ text: '',
140
+ icon: '',
141
+ actions: [],
142
+ showAvatar: false,
143
+
144
+ className: '',
145
+
146
+ size: 'medium',
147
+ rounded: 'medium',
148
+
149
+ fillMode: 'solid',
150
+ themeColor: 'base'
151
+ };
152
+
153
+ ChipStatic.propTypes = {
154
+ className: typeof '',
155
+ children: typeof [],
156
+
157
+ text: typeof '',
158
+ icon: typeof '',
159
+ actions: typeof [],
160
+ showAvatar: typeof false,
161
+
162
+ size: typeof [ null, 'small', 'medium', 'large' ],
163
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
164
+
165
+ fillMode: typeof [ null, 'solid', 'outline' ],
166
+ themeColor: typeof [ null, 'base', 'error', 'warning', 'info', 'success' ],
167
+
168
+ hover: typeof false,
169
+ focus: typeof false,
170
+ active: typeof false,
171
+ selected: typeof false,
172
+ disabled: typeof false,
173
+
174
+ aria: typeof false,
175
+ legacy: typeof false,
176
+
177
+ htmlAttributes: typeof []
178
+ };
179
+
180
+ export { Chip, ChipStatic };
@@ -0,0 +1,4 @@
1
+ export * from './chip.jsx';
2
+ export * from './chip-avatar.jsx';
3
+ export * from './chip-actions.jsx';
4
+ export * from './chip-list.jsx';
@@ -0,0 +1,39 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <span class="k-colorpicker k-icon-picker k-picker k-picker-md k-rounded-md k-picker-solid">
4
+ <span class="k-input-inner">
5
+ <span class="k-value-icon k-color-preview k-no-color">
6
+ <span class="k-color-preview-mask" style="background-color: red;"></span>
7
+ </span>
8
+ </span>
9
+ <button type="button" class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
10
+ <span class="k-button-icon k-icon k-i-arrow-s"></span>
11
+ </button>
12
+ </span>
13
+
14
+ <!-- canonical rendering -->
15
+ <span class="
16
+ k-colorpicker
17
+ k-picker
18
+ k-icon-picker
19
+ k-picker-{size}
20
+ k-rounded-{rounded}
21
+ k-picker-{fillMode}
22
+
23
+ {valid && 'k-valid'}
24
+ {invalid && 'k-invalid'}
25
+ {required && 'k-required'}
26
+ {disabled && 'k-disabled'}
27
+ ">
28
+ {inputPrefix && <span class="k-input-prefix">...</span>}
29
+ <span class="k-input-inner">
30
+ <span class="k-value-icon k-color-preview k-no-color">
31
+ <span class="k-color-preview-mask" style={value}></span>
32
+ </span>
33
+ </span>
34
+ {inputSuffix && <span class="k-input-suffix">...</span>}
35
+ <button type="button" class="k-input-button k-button k-icon-button k-button-{size} k-button-{fillMode} k-button-{fillMode}-base">
36
+ <span class="k-button-icon k-icon k-i-arrow-s"></span>
37
+ </button>
38
+ </span>
39
+ ```
@@ -0,0 +1,101 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { IconStatic } from '../icon/index';
3
+
4
+ class ColorPreview extends Component {
5
+ render() {
6
+ return <ColorPreviewStatic {...this.props} />;
7
+ }
8
+ }
9
+
10
+ function ColorPreviewStatic(props) {
11
+ const {
12
+ className: ownClassName,
13
+
14
+ color,
15
+ iconName,
16
+
17
+ aria,
18
+ legacy,
19
+
20
+ ...htmlAttributes
21
+ } = props;
22
+
23
+ let colorPreviewClasses = [
24
+ ownClassName,
25
+ 'k-color-preview',
26
+ {
27
+ 'k-icon-color-preview': iconName !== '',
28
+ 'k-no-color': color === ''
29
+ }
30
+ ];
31
+
32
+ let styles = {
33
+ 'background-color': color
34
+ };
35
+
36
+ let ariaAttr = aria
37
+ ? {}
38
+ : {};
39
+
40
+ if (legacy) {
41
+
42
+ // let legacyClasses = [
43
+ // ownClassName,
44
+ // 'k-selected-color',
45
+ // {
46
+ // 'k-no-color': color === ''
47
+ // }
48
+ // ];
49
+
50
+ // let legacyStyles = {
51
+ // 'background-color': color
52
+ // };
53
+
54
+ // if (iconName === '') {
55
+ // return (
56
+ // <span className={legacyClasses} style={legacyStyles}></span>
57
+ // );
58
+ // }
59
+
60
+ // return (
61
+ // <IconStatic className="k-tool-icon" name={iconName}>
62
+ // <span className={legacyClasses} style={legacyStyles}></span>
63
+ // </IconStatic>
64
+ // );
65
+
66
+ return (
67
+ <span className={colorPreviewClasses} {...ariaAttr} {...htmlAttributes}>
68
+ {iconName && <IconStatic name={iconName} className="k-color-preview-icon" />}
69
+ <span className="k-color-preview-mask" style={styles}></span>
70
+ </span>
71
+ );
72
+
73
+ }
74
+
75
+ return (
76
+ <span className={colorPreviewClasses} {...ariaAttr} {...htmlAttributes}>
77
+ {iconName && <IconStatic name={iconName} className="k-color-preview-icon" />}
78
+ <span className="k-color-preview-mask" style={styles}></span>
79
+ </span>
80
+ );
81
+ }
82
+
83
+ ColorPreviewStatic.defaultProps = {
84
+ ...globalDefaultProps,
85
+
86
+ color: '',
87
+ iconName: ''
88
+ };
89
+ ColorPreviewStatic.propTypes = {
90
+ className: typeof '',
91
+
92
+ color: typeof '',
93
+ iconName: typeof '',
94
+
95
+ aria: typeof false,
96
+ legacy: typeof false,
97
+
98
+ htmlAttributes: typeof []
99
+ };
100
+
101
+ export { ColorPreview, ColorPreviewStatic };
@@ -0,0 +1,151 @@
1
+ import { globalDefaultProps } from '../component/index';
2
+ import { Picker, PickerStatic, InputInnerSpanStatic } from '../input/index';
3
+ import { ColorPreviewStatic } from './color-preview.jsx';
4
+ import { ButtonStatic } from '../button/index';
5
+ import { IconStatic } from '../icon/index';
6
+
7
+ class Colorpicker extends Picker {
8
+ render() {
9
+ return <ColorpickerStatic {...this.props} />;
10
+ }
11
+ }
12
+
13
+ function ColorpickerStatic(props) {
14
+
15
+ const {
16
+ className: ownClassName,
17
+
18
+ value,
19
+
20
+ iconName,
21
+
22
+ prefix,
23
+ suffix,
24
+
25
+ size,
26
+ rounded,
27
+
28
+ fillMode,
29
+
30
+ hover,
31
+ focus,
32
+ valid,
33
+ invalid,
34
+ required,
35
+ disabled,
36
+
37
+ aria,
38
+ legacy,
39
+
40
+ ...htmlAttributes
41
+ } = props;
42
+
43
+ htmlAttributes.size = size;
44
+ htmlAttributes.rounded = rounded;
45
+ htmlAttributes.fillMode = fillMode;
46
+ htmlAttributes.hover = hover;
47
+ htmlAttributes.focus = focus;
48
+ htmlAttributes.valid = valid;
49
+ htmlAttributes.invalid = invalid;
50
+ htmlAttributes.required = required;
51
+ htmlAttributes.disabled = disabled;
52
+
53
+ let colorpickerClasses = [
54
+ ownClassName,
55
+ 'k-colorpicker',
56
+ 'k-icon-picker'
57
+ ];
58
+
59
+ let ariaAttr = aria
60
+ ? {}
61
+ : {};
62
+
63
+ if (legacy) {
64
+
65
+ let legacyClasses = [
66
+ ownClassName,
67
+ 'k-widget',
68
+ 'k-colorpicker',
69
+ {
70
+ 'k-state-hover': hover === true,
71
+ 'k-state-focus': focus === true,
72
+ 'k-state-invalid': invalid === true,
73
+ 'k-state-disabled': disabled === true
74
+ }
75
+ ];
76
+
77
+ let legacyWrapClasses = [
78
+ 'k-picker-wrap'
79
+ ];
80
+
81
+ return (
82
+ <PickerStatic className={legacyClasses} {...htmlAttributes}>
83
+ <span className={legacyWrapClasses}>
84
+ <ColorPreviewStatic color={value} iconName={iconName} />
85
+ <span className="k-select"><IconStatic name="arrow-s" /></span>
86
+ </span>
87
+ </PickerStatic>
88
+ );
89
+ }
90
+
91
+ return (
92
+ <PickerStatic className={colorpickerClasses} {...ariaAttr} {...htmlAttributes}>
93
+ {prefix}
94
+ <InputInnerSpanStatic showValue={false} valueIcon={<ColorPreviewStatic className="k-value-icon" color={value} iconName={iconName} />} />
95
+ {suffix}
96
+ <ButtonStatic className="k-input-button" icon="arrow-s" shape={null} rounded={null} size={size} fillMode={fillMode}></ButtonStatic>
97
+ </PickerStatic>
98
+ );
99
+ }
100
+
101
+ ColorpickerStatic.defaultProps = {
102
+ ...globalDefaultProps,
103
+
104
+ type: 'text',
105
+ value: '',
106
+ placeholder: '',
107
+ autocomplete: 'off',
108
+
109
+ iconName: '',
110
+
111
+ valueIcon: null,
112
+
113
+ size: 'medium',
114
+ rounded: 'medium',
115
+
116
+ fillMode: 'solid'
117
+ };
118
+
119
+ ColorpickerStatic.propTypes = {
120
+ children: typeof [],
121
+ className: typeof '',
122
+
123
+ type: typeof [ 'text', 'password' ],
124
+ value: typeof '',
125
+ placeholder: typeof '',
126
+ autocomplete: typeof [ 'on', 'off' ],
127
+
128
+ iconName: typeof '',
129
+
130
+ prefix: typeof '#fragment',
131
+ suffix: typeof '#fragment',
132
+
133
+ size: typeof [ null, 'small', 'medium', 'large' ],
134
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
135
+
136
+ fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
137
+
138
+ hover: typeof false,
139
+ focus: typeof false,
140
+ valid: typeof false,
141
+ invalid: typeof false,
142
+ required: typeof false,
143
+ disabled: typeof false,
144
+
145
+ aria: typeof false,
146
+ legacy: typeof false,
147
+
148
+ htmlAttributes: typeof []
149
+ };
150
+
151
+ export { Colorpicker, ColorpickerStatic };
@@ -0,0 +1,2 @@
1
+ export * from './colorpicker.jsx';
2
+ export * from './color-preview.jsx';
@@ -0,0 +1,36 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <span class="k-combobox 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-arrow-s"></span>
7
+ </button>
8
+ </span>
9
+
10
+ <!-- canonical rendering -->
11
+ <span class="
12
+ k-combobox
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-arrow-s"></span>
34
+ </button>
35
+ </span>
36
+ ```
@@ -0,0 +1,168 @@
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 { IconStatic } from '../icon/index';
6
+
7
+ class Combobox extends Input {
8
+ render() {
9
+ return <ComboboxStatic {...this.props} />;
10
+ }
11
+ }
12
+
13
+ function ComboboxStatic(props) {
14
+
15
+ const {
16
+ className: ownClassName,
17
+
18
+ type,
19
+ value,
20
+ placeholder,
21
+ autocomplete,
22
+
23
+ prefix,
24
+ suffix,
25
+
26
+ size,
27
+ rounded,
28
+
29
+ fillMode,
30
+
31
+ hover,
32
+ focus,
33
+ valid,
34
+ invalid,
35
+ required,
36
+ disabled,
37
+
38
+ aria,
39
+ legacy,
40
+
41
+ ...htmlAttributes
42
+ } = props;
43
+
44
+ htmlAttributes.size = size;
45
+ htmlAttributes.rounded = rounded;
46
+ htmlAttributes.fillMode = fillMode;
47
+ htmlAttributes.hover = hover;
48
+ htmlAttributes.focus = focus;
49
+ htmlAttributes.valid = valid;
50
+ htmlAttributes.invalid = invalid;
51
+ htmlAttributes.required = required;
52
+ htmlAttributes.disabled = disabled;
53
+
54
+ const inputAttributes = {
55
+ type,
56
+ value,
57
+ placeholder,
58
+ autocomplete,
59
+
60
+ disabled
61
+ };
62
+
63
+ let comboboxClasses = [
64
+ ownClassName,
65
+ 'k-combobox'
66
+ ];
67
+
68
+ let ariaAttr = aria
69
+ ? {}
70
+ : {};
71
+
72
+ if (legacy) {
73
+
74
+ let legacyClasses = [
75
+ ownClassName,
76
+ 'k-widget',
77
+ 'k-combobox',
78
+ {
79
+ 'k-state-hover': hover === true,
80
+ 'k-state-focus': focus === true,
81
+ 'k-state-invalid': invalid === true,
82
+ 'k-state-disabled': disabled === true
83
+ }
84
+ ];
85
+
86
+ let legacyWrapClasses = [
87
+ 'k-dropdown-wrap'
88
+ ];
89
+
90
+ return (
91
+ <InputStatic className={legacyClasses} {...htmlAttributes}>
92
+ <span className={legacyWrapClasses}>
93
+ <input type={type} className="k-input" {...inputAttributes} />
94
+ <InputValidationIconStatic {...props} />
95
+ <InputLoadingIconStatic {...props} />
96
+ <InputClearValueStatic {...props} />
97
+ <span className="k-select"><IconStatic name="arrow-s" /></span>
98
+ </span>
99
+ </InputStatic>
100
+ );
101
+ }
102
+
103
+ return (
104
+ <InputStatic className={comboboxClasses} {...ariaAttr} {...htmlAttributes}>
105
+ {prefix}
106
+ <InputInnerInputStatic {...inputAttributes} />
107
+ {suffix}
108
+ <InputValidationIconStatic {...props} />
109
+ <InputLoadingIconStatic {...props} />
110
+ <InputClearValueStatic {...props} />
111
+ <ButtonStatic className="k-input-button" icon="arrow-s" shape={null} rounded={null} size={size} fillMode={fillMode}></ButtonStatic>
112
+ </InputStatic>
113
+ );
114
+ }
115
+
116
+ ComboboxStatic.defaultProps = {
117
+ ...globalDefaultProps,
118
+
119
+ type: 'text',
120
+ value: '',
121
+ placeholder: '',
122
+ autocomplete: 'off',
123
+
124
+ showValidationIcon: true,
125
+ showLoadingIcon: true,
126
+ showClearButton: true,
127
+
128
+ size: 'medium',
129
+ rounded: 'medium',
130
+
131
+ fillMode: 'solid'
132
+ };
133
+
134
+ ComboboxStatic.propTypes = {
135
+ children: typeof [],
136
+ className: typeof '',
137
+
138
+ type: typeof [ 'text', 'password' ],
139
+ value: typeof '',
140
+ placeholder: typeof '',
141
+ autocomplete: typeof [ 'on', 'off' ],
142
+
143
+ showValidationIcon: typeof true,
144
+ showLoadingIcon: typeof true,
145
+ showClearButton: typeof true,
146
+
147
+ prefix: typeof '#fragment',
148
+ suffix: typeof '#fragment',
149
+
150
+ size: typeof [ null, 'small', 'medium', 'large' ],
151
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
152
+
153
+ fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
154
+
155
+ hover: typeof false,
156
+ focus: typeof false,
157
+ valid: typeof false,
158
+ invalid: typeof false,
159
+ required: typeof false,
160
+ disabled: typeof false,
161
+
162
+ aria: typeof false,
163
+ legacy: typeof false,
164
+
165
+ htmlAttributes: typeof []
166
+ };
167
+
168
+ export { Combobox, ComboboxStatic };
@@ -0,0 +1 @@
1
+ export * from './combobox.jsx';