@progress/kendo-vue-dropdowns 2.7.3-dev.202201070829 → 2.8.0-dev.202201131525

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 (70) hide show
  1. package/dist/cdn/js/kendo-vue-dropdowns.js +1 -1
  2. package/dist/es/AutoComplete/AutoComplete.d.ts +5 -6
  3. package/dist/es/AutoComplete/AutoComplete.js +63 -29
  4. package/dist/es/AutoComplete/AutoCompleteProps.d.ts +39 -0
  5. package/dist/es/ComboBox/ComboBox.d.ts +5 -6
  6. package/dist/es/ComboBox/ComboBox.js +96 -78
  7. package/dist/es/ComboBox/ComboBoxProps.d.ts +39 -0
  8. package/dist/es/DropDownList/DropDownList.d.ts +5 -6
  9. package/dist/es/DropDownList/DropDownList.js +182 -153
  10. package/dist/es/DropDownList/DropDownListProps.d.ts +43 -0
  11. package/dist/es/MultiSelect/MultiSelect.d.ts +5 -6
  12. package/dist/es/MultiSelect/MultiSelect.js +106 -78
  13. package/dist/es/MultiSelect/MultiSelectProps.d.ts +53 -0
  14. package/dist/es/MultiSelect/TagList.d.ts +8 -4
  15. package/dist/es/MultiSelect/TagList.js +60 -11
  16. package/dist/es/additionalTypes.ts +7 -1
  17. package/dist/es/common/ClearButton.d.ts +5 -6
  18. package/dist/es/common/ClearButton.js +7 -5
  19. package/dist/es/common/DropDownBase.d.ts +4 -5
  20. package/dist/es/common/List.d.ts +7 -4
  21. package/dist/es/common/List.js +21 -6
  22. package/dist/es/common/ListContainer.d.ts +5 -6
  23. package/dist/es/common/ListContainer.js +7 -4
  24. package/dist/es/common/ListDefaultItem.d.ts +5 -6
  25. package/dist/es/common/ListDefaultItem.js +7 -4
  26. package/dist/es/common/ListFilter.d.ts +8 -6
  27. package/dist/es/common/ListFilter.js +50 -7
  28. package/dist/es/common/ListItem.d.ts +5 -6
  29. package/dist/es/common/ListItem.js +17 -9
  30. package/dist/es/common/SearchBar.d.ts +6 -6
  31. package/dist/es/common/SearchBar.js +13 -13
  32. package/dist/es/common/VirtualScroll.js +6 -4
  33. package/dist/es/main.d.ts +5 -5
  34. package/dist/es/main.js +5 -5
  35. package/dist/es/package-metadata.js +1 -1
  36. package/dist/npm/AutoComplete/AutoComplete.d.ts +5 -6
  37. package/dist/npm/AutoComplete/AutoComplete.js +64 -30
  38. package/dist/npm/AutoComplete/AutoCompleteProps.d.ts +39 -0
  39. package/dist/npm/ComboBox/ComboBox.d.ts +5 -6
  40. package/dist/npm/ComboBox/ComboBox.js +99 -79
  41. package/dist/npm/ComboBox/ComboBoxProps.d.ts +39 -0
  42. package/dist/npm/DropDownList/DropDownList.d.ts +5 -6
  43. package/dist/npm/DropDownList/DropDownList.js +185 -154
  44. package/dist/npm/DropDownList/DropDownListProps.d.ts +43 -0
  45. package/dist/npm/MultiSelect/MultiSelect.d.ts +5 -6
  46. package/dist/npm/MultiSelect/MultiSelect.js +108 -79
  47. package/dist/npm/MultiSelect/MultiSelectProps.d.ts +53 -0
  48. package/dist/npm/MultiSelect/TagList.d.ts +8 -4
  49. package/dist/npm/MultiSelect/TagList.js +60 -10
  50. package/dist/npm/additionalTypes.ts +7 -1
  51. package/dist/npm/common/ClearButton.d.ts +5 -6
  52. package/dist/npm/common/ClearButton.js +9 -7
  53. package/dist/npm/common/DropDownBase.d.ts +4 -5
  54. package/dist/npm/common/List.d.ts +7 -4
  55. package/dist/npm/common/List.js +21 -5
  56. package/dist/npm/common/ListContainer.d.ts +5 -6
  57. package/dist/npm/common/ListContainer.js +9 -6
  58. package/dist/npm/common/ListDefaultItem.d.ts +5 -6
  59. package/dist/npm/common/ListDefaultItem.js +9 -6
  60. package/dist/npm/common/ListFilter.d.ts +8 -6
  61. package/dist/npm/common/ListFilter.js +54 -9
  62. package/dist/npm/common/ListItem.d.ts +5 -6
  63. package/dist/npm/common/ListItem.js +18 -10
  64. package/dist/npm/common/SearchBar.d.ts +6 -6
  65. package/dist/npm/common/SearchBar.js +15 -15
  66. package/dist/npm/common/VirtualScroll.js +6 -4
  67. package/dist/npm/main.d.ts +5 -5
  68. package/dist/npm/main.js +5 -5
  69. package/dist/npm/package-metadata.js +1 -1
  70. package/package.json +5 -4
@@ -1,4 +1,3 @@
1
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
2
1
  declare type DefaultData<V> = object | ((this: V) => AutoCompleteData);
3
2
  declare type DefaultMethods<V> = {
4
3
  [key: string]: (this: V, ...args: any[]) => any;
@@ -6,7 +5,7 @@ declare type DefaultMethods<V> = {
6
5
  import { AutoCompleteProps } from './AutoCompleteProps';
7
6
  import { DropDownStateBase, InternalState } from './../common/settings';
8
7
  import { FormComponentValidity } from '@progress/kendo-vue-common';
9
- import { DefineComponent } from '../additionalTypes';
8
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
10
9
  /**
11
10
  * @hidden
12
11
  */
@@ -95,11 +94,11 @@ export interface AutoCompleteComputed {
95
94
  /**
96
95
  * @hidden
97
96
  */
98
- export interface AutoCompleteAll extends AutoCompleteMethods, AutoCompleteState, AutoCompleteData, AutoCompleteComputed, Vue {
97
+ export interface AutoCompleteAll extends AutoCompleteMethods, AutoCompleteState, AutoCompleteData, AutoCompleteComputed, Vue2type {
99
98
  }
100
99
  /**
101
100
  * Represents the default `AutoComplete` component.
102
101
  */
103
- declare let AutoComplete: ComponentOptions<Vue, DefaultData<AutoCompleteData>, DefaultMethods<AutoCompleteAll>, AutoCompleteComputed, RecordPropsDefinition<AutoCompleteProps>>;
104
- declare const AutoCompleteVue3: DefineComponent<AutoCompleteProps, any, AutoCompleteData, AutoCompleteComputed, AutoCompleteMethods, {}, {}, {}, string, AutoCompleteProps, AutoCompleteProps, {}>;
105
- export { AutoComplete, AutoCompleteVue3 };
102
+ declare let AutoCompleteVue2: ComponentOptions<Vue2type, DefaultData<AutoCompleteData>, DefaultMethods<AutoCompleteAll>, AutoCompleteComputed, RecordPropsDefinition<AutoCompleteProps>>;
103
+ declare const AutoComplete: DefineComponent<AutoCompleteProps, any, AutoCompleteData, AutoCompleteComputed, AutoCompleteMethods, {}, {}, {}, string, AutoCompleteProps, AutoCompleteProps, {}>;
104
+ export { AutoComplete, AutoCompleteVue2 };
@@ -25,13 +25,15 @@ import { List } from './../common/List';
25
25
  import DropDownBase from '../common/DropDownBase';
26
26
  import { ClearButton } from '../common/ClearButton';
27
27
  import { itemIndexStartsWith, getItemValue, areSame, getFocusedItem } from '../common/utils';
28
- import { guid, Keys, classNames, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
28
+ import { guid, Keys, classNames, templateRendering, getListeners, getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
29
+ var sizeMap = kendoThemeMaps.sizeMap,
30
+ roundedMap = kendoThemeMaps.roundedMap;
29
31
  var VALIDATION_MESSAGE = 'Please enter a valid value!';
30
32
  /**
31
33
  * Represents the default `AutoComplete` component.
32
34
  */
33
35
 
34
- var AutoComplete = {
36
+ var AutoCompleteVue2 = {
35
37
  name: 'KendoAutoComplete',
36
38
  model: {
37
39
  event: 'changemodel'
@@ -88,7 +90,6 @@ var AutoComplete = {
88
90
  accessKey: String,
89
91
  dataItems: Array,
90
92
  textField: String,
91
- className: String,
92
93
  loading: Boolean,
93
94
  popupSettings: {
94
95
  type: Object,
@@ -109,7 +110,28 @@ var AutoComplete = {
109
110
  default: false
110
111
  },
111
112
  ariaLabelledBy: String,
112
- ariaDescribedBy: String
113
+ ariaDescribedBy: String,
114
+ rounded: {
115
+ type: String,
116
+ default: 'medium',
117
+ validator: function validator(value) {
118
+ return ['small', 'medium', 'large', 'full'].includes(value);
119
+ }
120
+ },
121
+ fillMode: {
122
+ type: String,
123
+ default: 'solid',
124
+ validator: function validator(value) {
125
+ return ['solid', 'flat', 'outline'].includes(value);
126
+ }
127
+ },
128
+ size: {
129
+ type: String,
130
+ default: 'medium',
131
+ validator: function validator(value) {
132
+ return ['small', 'medium', 'large'].includes(value);
133
+ }
134
+ }
113
135
  },
114
136
  data: function data() {
115
137
  return {
@@ -201,10 +223,10 @@ var AutoComplete = {
201
223
  get: function get() {
202
224
  var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
203
225
  return {
204
- 'k-textbox-container': true,
205
- 'k-state-focused': this.currentFocused,
206
- 'k-state-empty': !this.computedValue(),
207
- 'k-state-invalid': !isValid && isValid !== undefined,
226
+ 'k-floating-label-container': true,
227
+ 'k-focus': this.currentFocused,
228
+ 'k-empty': !this.computedValue(),
229
+ 'k-invalid': !isValid && isValid !== undefined,
208
230
  'k-rtl': this.$props.dir === 'rtl'
209
231
  };
210
232
  }
@@ -463,17 +485,21 @@ var AutoComplete = {
463
485
  }
464
486
  },
465
487
  render: function render(createElement) {
488
+ var _a;
489
+
466
490
  var _this = this;
467
491
 
468
492
  var h = gh || createElement;
469
- var _a = this.$props,
470
- dir = _a.dir,
471
- disabled = _a.disabled,
472
- label = _a.label,
473
- className = _a.className,
474
- style = _a.style,
475
- loading = _a.loading,
476
- suggest = _a.suggest;
493
+ var _b = this.$props,
494
+ dir = _b.dir,
495
+ disabled = _b.disabled,
496
+ label = _b.label,
497
+ size = _b.size,
498
+ rounded = _b.rounded,
499
+ fillMode = _b.fillMode,
500
+ style = _b.style,
501
+ loading = _b.loading,
502
+ suggest = _b.suggest;
477
503
  var isValid = !this.$props.validityStyles || this.validity().valid;
478
504
  var focused = this.currentFocused;
479
505
  var base = this.base;
@@ -574,7 +600,7 @@ var AutoComplete = {
574
600
  wrapperStyle: {
575
601
  maxHeight: popupSettings.height
576
602
  },
577
- wrapperCssClass: "k-list-scroller",
603
+ wrapperCssClass: "k-list-content",
578
604
  itemRender: itemRender,
579
605
  noDataRender: listNoDataRender
580
606
  },
@@ -590,7 +616,7 @@ var AutoComplete = {
590
616
  wrapperStyle: {
591
617
  maxHeight: popupSettings.height
592
618
  },
593
- wrapperCssClass: "k-list-scroller",
619
+ wrapperCssClass: "k-list-content",
594
620
  onListclick: this.handleItemClick,
595
621
  on: this.v3 ? undefined : {
596
622
  "listclick": this.handleItemClick
@@ -604,6 +630,8 @@ var AutoComplete = {
604
630
  var renderListContainer = function renderListContainer() {
605
631
  var _this2 = this;
606
632
 
633
+ var _a;
634
+
607
635
  var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
608
636
  var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
609
637
  var header = getTemplate.call(this, {
@@ -633,7 +661,8 @@ var AutoComplete = {
633
661
  animate: popupSettings.animate,
634
662
  anchor: this.anchor,
635
663
  show: opened,
636
- className: classNames('k-list-container k-reset', popupSettings.className),
664
+ popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
665
+ className: popupSettings.className,
637
666
  appendTo: popupSettings.appendTo
638
667
  },
639
668
  dir: dir !== undefined ? dir : this.base.dirCalculated
@@ -643,13 +672,22 @@ var AutoComplete = {
643
672
  animate: popupSettings.animate,
644
673
  anchor: this.anchor,
645
674
  show: opened,
646
- className: classNames('k-list-container k-reset', popupSettings.className),
675
+ popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
676
+ className: popupSettings.className,
647
677
  appendTo: popupSettings.appendTo
648
678
  },
649
679
  dir: dir !== undefined ? dir : this.base.dirCalculated
650
680
  }, this.v3 ? function () {
651
- return [header, renderList.call(_this2), footer];
652
- } : [header, renderList.call(_this2), footer])
681
+ return [header && h("div", {
682
+ "class": "k-list-header"
683
+ }, [header]), renderList.call(_this2), footer && h("div", {
684
+ "class": "k-list-footer"
685
+ }, [footer])];
686
+ } : [header && h("div", {
687
+ "class": "k-list-header"
688
+ }, [header]), renderList.call(_this2), footer && h("div", {
689
+ "class": "k-list-footer"
690
+ }, [footer])])
653
691
  );
654
692
  };
655
693
 
@@ -679,11 +717,7 @@ var AutoComplete = {
679
717
  };
680
718
 
681
719
  var autoComplete = h("span", {
682
- "class": classNames('k-widget k-autocomplete', className, {
683
- 'k-state-disabled': disabled,
684
- 'k-state-focused': focused && !disabled,
685
- 'k-state-invalid': !isValid
686
- }),
720
+ "class": classNames('k-autocomplete k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-focus'] = focused && !disabled, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a)),
687
721
  ref: this.v3 ? function (el) {
688
722
  _this.kendoAnchorRef = el;
689
723
  } : this.anchor,
@@ -712,5 +746,5 @@ var AutoComplete = {
712
746
  }, [this.$props.label]) : null]) : autoComplete;
713
747
  }
714
748
  };
715
- var AutoCompleteVue3 = AutoComplete;
716
- export { AutoComplete, AutoCompleteVue3 };
749
+ var AutoComplete = AutoCompleteVue2;
750
+ export { AutoComplete, AutoCompleteVue2 };
@@ -165,4 +165,43 @@ export interface AutoCompleteProps extends FormComponentProps {
165
165
  * Sets the footer component of the AutoComplete ([see example]({% slug customrendering_autocomplete %}#toc-headers-and-footers)).
166
166
  */
167
167
  footer?: any;
168
+ /**
169
+ * Configures the `size` of the AutoComnplete.
170
+ *
171
+ * The available options are:
172
+ * - small
173
+ * - medium
174
+ * - large
175
+ * - null&mdash;Does not set a size `class`.
176
+ *
177
+ * @default `medium`
178
+ */
179
+ size?: null | 'small' | 'medium' | 'large' | string;
180
+ /**
181
+ * Configures the `roundness` of the AutoComnplete.
182
+ *
183
+ * The available options are:
184
+ * - small
185
+ * - medium
186
+ * - large
187
+ * - circle
188
+ * - full
189
+ * - null&mdash;Does not set a rounded `class`.
190
+ *
191
+ * @default `medium`
192
+ */
193
+ rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
194
+ /**
195
+ * Configures the `fillMode` of the AutoComnplete.
196
+ *
197
+ * The available options are:
198
+ * - solid
199
+ * - outline
200
+ * - flat
201
+ * - link
202
+ * - null&mdash;Does not set a fillMode `class`.
203
+ *
204
+ * @default `solid`
205
+ */
206
+ fillMode?: null | 'solid' | 'outline' | 'flat' | string;
168
207
  }
@@ -1,4 +1,3 @@
1
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
2
1
  declare type DefaultData<V> = object | ((this: V) => ComboBoxData);
3
2
  declare type DefaultMethods<V> = {
4
3
  [key: string]: (this: V, ...args: any[]) => any;
@@ -6,7 +5,7 @@ declare type DefaultMethods<V> = {
6
5
  import { ComboBoxProps } from './ComboBoxProps';
7
6
  import { DropDownStateBase, InternalState } from './../common/settings';
8
7
  import { FormComponentValidity } from '@progress/kendo-vue-common';
9
- import { DefineComponent } from '../additionalTypes';
8
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
10
9
  /**
11
10
  * @hidden
12
11
  */
@@ -88,11 +87,11 @@ export interface ComboBoxComputed {
88
87
  /**
89
88
  * @hidden
90
89
  */
91
- export interface ComboBoxAll extends ComboBoxMethods, ComboBoxState, ComboBoxData, ComboBoxComputed, Vue {
90
+ export interface ComboBoxAll extends ComboBoxMethods, ComboBoxState, ComboBoxData, ComboBoxComputed, Vue2type {
92
91
  }
93
92
  /**
94
93
  * Represents the default `ComboBox` component.
95
94
  */
96
- declare let ComboBox: ComponentOptions<Vue, DefaultData<ComboBoxData>, DefaultMethods<ComboBoxAll>, ComboBoxComputed, RecordPropsDefinition<ComboBoxProps>>;
97
- declare const ComboBoxVue3: DefineComponent<ComboBoxProps, any, ComboBoxData, ComboBoxComputed, ComboBoxMethods, {}, {}, {}, string, ComboBoxProps, ComboBoxProps, {}>;
98
- export { ComboBox, ComboBoxVue3 };
95
+ declare let ComboBoxVue2: ComponentOptions<Vue2type, DefaultData<ComboBoxData>, DefaultMethods<ComboBoxAll>, ComboBoxComputed, RecordPropsDefinition<ComboBoxProps>>;
96
+ declare const ComboBox: DefineComponent<ComboBoxProps, any, ComboBoxData, ComboBoxComputed, ComboBoxMethods, {}, {}, {}, string, ComboBoxProps, ComboBoxProps, {}>;
97
+ export { ComboBox, ComboBoxVue2 };
@@ -20,7 +20,10 @@ var allVue = Vue;
20
20
  var gh = allVue.h;
21
21
  var ref = allVue.ref;
22
22
  import DropDownBase from '../common/DropDownBase';
23
- import { guid, classNames, Keys, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
23
+ import { guid, classNames, Keys, templateRendering, getListeners, getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
24
+ import { Button as KButton } from '@progress/kendo-vue-buttons';
25
+ var sizeMap = kendoThemeMaps.sizeMap,
26
+ roundedMap = kendoThemeMaps.roundedMap;
24
27
  import { areSame, itemIndexStartsWith, getItemIndexByText, getItemValue, isPresent, suggestValue as _suggestValue } from '../common/utils';
25
28
  import { SearchBar } from '../common/SearchBar';
26
29
  import { ListContainer } from '../common/ListContainer';
@@ -31,7 +34,7 @@ var VALIDATION_MESSAGE = 'Please enter a valid value!';
31
34
  * Represents the default `ComboBox` component.
32
35
  */
33
36
 
34
- var ComboBox = {
37
+ var ComboBoxVue2 = {
35
38
  name: 'KendoComboBox',
36
39
  model: {
37
40
  event: 'changemodel'
@@ -140,7 +143,28 @@ var ComboBox = {
140
143
  default: true
141
144
  },
142
145
  ariaLabelledBy: String,
143
- ariaDescribedBy: String
146
+ ariaDescribedBy: String,
147
+ rounded: {
148
+ type: String,
149
+ default: 'medium',
150
+ validator: function validator(value) {
151
+ return ['small', 'medium', 'large', 'full'].includes(value);
152
+ }
153
+ },
154
+ fillMode: {
155
+ type: String,
156
+ default: 'solid',
157
+ validator: function validator(value) {
158
+ return ['solid', 'flat', 'outline'].includes(value);
159
+ }
160
+ },
161
+ size: {
162
+ type: String,
163
+ default: 'medium',
164
+ validator: function validator(value) {
165
+ return ['small', 'medium', 'large'].includes(value);
166
+ }
167
+ }
144
168
  },
145
169
  data: function data() {
146
170
  return {
@@ -186,8 +210,8 @@ var ComboBox = {
186
210
  this.hasMounted = true; // @ts-ignore
187
211
 
188
212
  this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
189
- this.base.wrapper = this.v3 ? this.baseWrapperRef : this.$refs.baseWrapper;
190
- this.element = this.v3 ? this.elementRef : this.$refs.element;
213
+ this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
214
+ this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
191
215
  this.base.didMount();
192
216
  this.setValidity();
193
217
  },
@@ -203,7 +227,6 @@ var ComboBox = {
203
227
  var closing = prevOpened && !opened;
204
228
  var list = this.$refs.list;
205
229
  var scrollElement = this.$refs.scrollElement;
206
- var scroller = this.$refs.scroller;
207
230
  var selectedItem = this.computedValue();
208
231
  this.valueOnDidUpdate = selectedItem;
209
232
 
@@ -218,8 +241,9 @@ var ComboBox = {
218
241
  this.base.vs.scrollElement = scrollElement;
219
242
  }
220
243
 
221
- if (scroller) {
222
- this.base.vs.scrollerRef(scroller);
244
+ if (list && dataItems.length) {
245
+ // @ts-ignore
246
+ this.base.vs.scrollerRef(list.$el);
223
247
  } // @ts-ignore
224
248
 
225
249
 
@@ -290,10 +314,10 @@ var ComboBox = {
290
314
  get: function get() {
291
315
  var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
292
316
  return {
293
- 'k-textbox-container': true,
294
- 'k-state-focused': this.currentFocused,
295
- 'k-state-empty': !this.computedValue(),
296
- 'k-state-invalid': !isValid && isValid !== undefined,
317
+ 'k-floating-label-container': true,
318
+ 'k-focus': this.currentFocused,
319
+ 'k-empty': !this.computedValue(),
320
+ 'k-invalid': !isValid && isValid !== undefined,
297
321
  'k-rtl': this.$props.dir === 'rtl'
298
322
  };
299
323
  }
@@ -681,20 +705,25 @@ var ComboBox = {
681
705
  }
682
706
  },
683
707
  render: function render(createElement) {
708
+ var _a;
709
+
684
710
  var _this = this;
685
711
 
686
712
  var h = gh || createElement;
687
- var _a = this.$props,
688
- dir = _a.dir,
689
- disabled = _a.disabled,
690
- clearButton = _a.clearButton,
691
- label = _a.label,
692
- textField = _a.textField,
693
- className = _a.className,
694
- style = _a.style,
695
- loading = _a.loading,
696
- iconClassName = _a.iconClassName,
697
- virtual = _a.virtual;
713
+ var _b = this.$props,
714
+ dir = _b.dir,
715
+ disabled = _b.disabled,
716
+ clearButton = _b.clearButton,
717
+ label = _b.label,
718
+ textField = _b.textField,
719
+ className = _b.className,
720
+ style = _b.style,
721
+ loading = _b.loading,
722
+ iconClassName = _b.iconClassName,
723
+ virtual = _b.virtual,
724
+ size = _b.size,
725
+ fillMode = _b.fillMode,
726
+ rounded = _b.rounded;
698
727
  var focused = this.currentFocused;
699
728
  var isValid = !this.$props.validityStyles || this.validity().valid;
700
729
  var text = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
@@ -747,13 +776,10 @@ var ComboBox = {
747
776
  textField: textField,
748
777
  valueField: dataItemKey,
749
778
  optionsGuid: base.guid,
750
- wrapperStyle: !vs.enabled ? {
779
+ wrapperStyle: {
751
780
  maxHeight: popupSettings.height
752
- } : {
753
- float: 'left',
754
- width: '100%'
755
781
  },
756
- wrapperCssClass: !vs.enabled ? 'k-list-scroller' : undefined,
782
+ wrapperCssClass: 'k-list-content',
757
783
  listStyle: vs.enabled ? {
758
784
  transform: translate
759
785
  } : undefined,
@@ -769,13 +795,10 @@ var ComboBox = {
769
795
  valueField: dataItemKey,
770
796
  optionsGuid: base.guid,
771
797
  ref: 'list',
772
- wrapperStyle: !vs.enabled ? {
798
+ wrapperStyle: {
773
799
  maxHeight: popupSettings.height
774
- } : {
775
- float: 'left',
776
- width: '100%'
777
800
  },
778
- wrapperCssClass: !vs.enabled ? 'k-list-scroller' : undefined,
801
+ wrapperCssClass: 'k-list-content',
779
802
  listStyle: vs.enabled ? {
780
803
  transform: translate
781
804
  } : undefined,
@@ -783,27 +806,14 @@ var ComboBox = {
783
806
  skip: skip,
784
807
  onListclick: this.handleItemClick,
785
808
  on: this.v3 ? undefined : {
786
- "listclick": this.handleItemClick
809
+ "listclick": this.handleItemClick,
810
+ "scroll": vs.scrollHandler
787
811
  },
788
812
  itemRender: itemRender,
789
- noDataRender: listNoDataRender
790
- })
813
+ noDataRender: listNoDataRender,
814
+ onScroll: vs.scrollHandler
815
+ }, [renderScrollElement.call(this)])
791
816
  );
792
- }; // Common rendering
793
-
794
-
795
- var renderScrollWrapper = function renderScrollWrapper(children) {
796
- return vs.enabled ? h("div", {
797
- onScroll: vs.scrollHandler,
798
- on: this.v3 ? undefined : {
799
- "scroll": vs.scrollHandler
800
- },
801
- ref: 'scroller',
802
- style: {
803
- height: popupSettings.height,
804
- overflowY: 'scroll'
805
- }
806
- }, [children]) : children;
807
817
  };
808
818
 
809
819
  var renderScrollElement = function renderScrollElement() {
@@ -816,6 +826,8 @@ var ComboBox = {
816
826
  var renderListContainer = function renderListContainer() {
817
827
  var _this2 = this;
818
828
 
829
+ var _a;
830
+
819
831
  var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
820
832
  var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
821
833
  var header = getTemplate.call(this, {
@@ -845,7 +857,8 @@ var ComboBox = {
845
857
  animate: popupSettings.animate,
846
858
  anchor: this.anchor,
847
859
  show: opened,
848
- className: classNames('k-list-container k-reset', popupSettings.className),
860
+ popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
861
+ className: popupSettings.className,
849
862
  appendTo: popupSettings.appendTo
850
863
  },
851
864
  dir: dir !== undefined ? dir : this.base.dirCalculated
@@ -854,13 +867,22 @@ var ComboBox = {
854
867
  animate: popupSettings.animate,
855
868
  anchor: this.anchor,
856
869
  show: opened,
857
- className: classNames('k-list-container k-reset', popupSettings.className),
870
+ popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
871
+ className: popupSettings.className,
858
872
  appendTo: popupSettings.appendTo
859
873
  },
860
874
  dir: dir !== undefined ? dir : this.base.dirCalculated
861
875
  }, this.v3 ? function () {
862
- return [header, renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer];
863
- } : [header, renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer])
876
+ return [header && h("div", {
877
+ "class": "k-list-header"
878
+ }, [header]), renderList.call(_this2), footer && h("div", {
879
+ "class": "k-list-footer"
880
+ }, [footer])];
881
+ } : [header && h("div", {
882
+ "class": "k-list-header"
883
+ }, [header]), renderList.call(_this2), footer && h("div", {
884
+ "class": "k-list-footer"
885
+ }, [footer])])
864
886
  );
865
887
  };
866
888
 
@@ -936,10 +958,7 @@ var ComboBox = {
936
958
  };
937
959
 
938
960
  var combobox = h("span", {
939
- "class": classNames('k-widget k-combobox', {
940
- 'k-combobox-clearable': clearButton,
941
- 'k-state-invalid': !isValid
942
- }, className),
961
+ "class": classNames('k-combobox k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a['k-focus'] = focused && !disabled, _a), className),
943
962
  ref: this.v3 ? function (el) {
944
963
  _this.kendoAnchorRef = el;
945
964
  } : this.anchor,
@@ -950,23 +969,27 @@ var ComboBox = {
950
969
  attrs: this.v3 ? undefined : {
951
970
  dir: dir
952
971
  }
953
- }, [h("span", {
954
- ref: this.v3 ? function (el) {
955
- _this.baseWrapperRef = el;
956
- } : 'baseWrapper',
957
- "class": classNames('k-dropdown-wrap', {
958
- 'k-state-disabled': disabled,
959
- 'k-state-focused': focused && !disabled
960
- })
961
- }, [renderSearchBar.call(this, inputText || '', id), renderClearButton && // @ts-ignore function children
972
+ }, [renderSearchBar.call(this, inputText || '', id), renderClearButton && !loading && // @ts-ignore function children
962
973
  h(ClearButton, {
963
974
  onClearclick: this.clearButtonClick,
964
975
  on: this.v3 ? undefined : {
965
976
  "clearclick": this.clearButtonClick
966
977
  },
967
978
  key: "clearbutton"
968
- }), h("span", {
969
- "class": "k-select",
979
+ }), loading && h("span", {
980
+ "class": "k-icon k-i-loading",
981
+ key: "loading"
982
+ }), // @ts-ignore
983
+ h(KButton, {
984
+ size: size,
985
+ attrs: this.v3 ? undefined : {
986
+ size: size,
987
+ fillMode: fillMode,
988
+ iconClass: classNames('k-icon k-i-arrow-s', iconClassName)
989
+ },
990
+ fillMode: fillMode,
991
+ "class": 'k-input-button',
992
+ iconClass: classNames('k-icon k-i-arrow-s', iconClassName),
970
993
  onClick: this.toggleBtnClick,
971
994
  on: this.v3 ? undefined : {
972
995
  "click": this.toggleBtnClick,
@@ -977,12 +1000,7 @@ var ComboBox = {
977
1000
  onMousedown: function mousedown(e) {
978
1001
  return e.preventDefault();
979
1002
  }
980
- }, [h("span", {
981
- "class": classNames('k-icon', iconClassName, {
982
- 'k-i-arrow-s': !loading && !iconClassName,
983
- 'k-i-loading': loading && !iconClassName
984
- })
985
- })])]), renderListContainer.call(this)]);
1003
+ }), renderListContainer.call(this)]);
986
1004
  return label ? h("span", {
987
1005
  "class": this.spanClassNames,
988
1006
  onFocusin: this.handleFocus,
@@ -1004,5 +1022,5 @@ var ComboBox = {
1004
1022
  }, [this.$props.label]) : null]) : combobox;
1005
1023
  }
1006
1024
  };
1007
- var ComboBoxVue3 = ComboBox;
1008
- export { ComboBox, ComboBoxVue3 };
1025
+ var ComboBox = ComboBoxVue2;
1026
+ export { ComboBox, ComboBoxVue2 };
@@ -195,4 +195,43 @@ export interface ComboBoxProps extends FormComponentProps {
195
195
  * Sets the footer component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)).
196
196
  */
197
197
  footer?: any;
198
+ /**
199
+ * Configures the `size` of the ComboBox.
200
+ *
201
+ * The available options are:
202
+ * - small
203
+ * - medium
204
+ * - large
205
+ * - null&mdash;Does not set a size `class`.
206
+ *
207
+ * @default `medium`
208
+ */
209
+ size?: null | 'small' | 'medium' | 'large' | string;
210
+ /**
211
+ * Configures the `roundness` of the ComboBox.
212
+ *
213
+ * The available options are:
214
+ * - small
215
+ * - medium
216
+ * - large
217
+ * - circle
218
+ * - full
219
+ * - null&mdash;Does not set a rounded `class`.
220
+ *
221
+ * @default `medium`
222
+ */
223
+ rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
224
+ /**
225
+ * Configures the `fillMode` of the ComboBox.
226
+ *
227
+ * The available options are:
228
+ * - solid
229
+ * - outline
230
+ * - flat
231
+ * - link
232
+ * - null&mdash;Does not set a fillMode `class`.
233
+ *
234
+ * @default `solid`
235
+ */
236
+ fillMode?: null | 'solid' | 'outline' | 'flat' | string;
198
237
  }
@@ -1,10 +1,9 @@
1
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
2
1
  declare type DefaultData<V> = object | ((this: V) => DropDownListData);
3
2
  declare type DefaultMethods<V> = {
4
3
  [key: string]: (this: V, ...args: any[]) => any;
5
4
  };
6
5
  import { FormComponentValidity } from '@progress/kendo-vue-common';
7
- import { DefineComponent } from '../additionalTypes';
6
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
8
7
  import { DropDownListProps } from './DropDownListProps';
9
8
  import { DropDownStateBase, InternalState } from './../common/settings';
10
9
  /**
@@ -89,11 +88,11 @@ export interface DropDownListComputed {
89
88
  /**
90
89
  * @hidden
91
90
  */
92
- export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed, Vue {
91
+ export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed, Vue2type {
93
92
  }
94
93
  /**
95
94
  * Represents the default `DropDownList` component.
96
95
  */
97
- declare let DropDownList: ComponentOptions<Vue, DefaultData<DropDownListData>, DefaultMethods<DropDownListAll>, DropDownListComputed, RecordPropsDefinition<DropDownListProps>>;
98
- declare let DropDownListVue3: DefineComponent<DropDownListProps, any, DropDownListData, DropDownListComputed, DropDownListMethods, {}, {}, {}, string, DropDownListProps, DropDownListProps, {}>;
99
- export { DropDownList, DropDownListVue3 };
96
+ declare let DropDownListVue2: ComponentOptions<Vue2type, DefaultData<DropDownListData>, DefaultMethods<DropDownListAll>, DropDownListComputed, RecordPropsDefinition<DropDownListProps>>;
97
+ declare let DropDownList: DefineComponent<DropDownListProps, any, DropDownListData, DropDownListComputed, DropDownListMethods, {}, {}, {}, string, DropDownListProps, DropDownListProps, {}>;
98
+ export { DropDownList, DropDownListVue2 };