@progress/kendo-vue-inputs 2.7.3 → 3.0.0-dev.202201141128

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 (74) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/additionalTypes.ts +7 -1
  3. package/dist/es/checkbox/Checkbox.d.ts +5 -6
  4. package/dist/es/checkbox/Checkbox.js +38 -22
  5. package/dist/es/checkbox/interfaces/CheckboxProps.d.ts +24 -0
  6. package/dist/es/colors/ColorPalette.d.ts +6 -6
  7. package/dist/es/colors/ColorPalette.js +12 -4
  8. package/dist/es/colors/ColorPicker.d.ts +5 -6
  9. package/dist/es/colors/ColorPicker.js +66 -58
  10. package/dist/es/colors/Picker.d.ts +5 -6
  11. package/dist/es/colors/Picker.js +3 -3
  12. package/dist/es/colors/interfaces/ColorPickerProps.d.ts +2 -2
  13. package/dist/es/input/Input.d.ts +43 -7
  14. package/dist/es/input/Input.js +46 -23
  15. package/dist/es/main.d.ts +1 -1
  16. package/dist/es/main.js +1 -1
  17. package/dist/es/maskedtextbox/MaskedTextBox.d.ts +5 -6
  18. package/dist/es/maskedtextbox/MaskedTextBox.js +37 -13
  19. package/dist/es/maskedtextbox/MaskedTextBoxProps.d.ts +37 -0
  20. package/dist/es/numerictextbox/NumericTextBox.d.ts +5 -6
  21. package/dist/es/numerictextbox/NumericTextBox.js +60 -36
  22. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +37 -0
  23. package/dist/es/package-metadata.js +1 -1
  24. package/dist/es/radiobutton/RadioButton.d.ts +5 -6
  25. package/dist/es/radiobutton/RadioButton.js +13 -8
  26. package/dist/es/radiobutton/RadioGroup.d.ts +5 -6
  27. package/dist/es/radiobutton/RadioGroup.js +3 -3
  28. package/dist/es/radiobutton/interfaces/RadioButtonProps.d.ts +12 -0
  29. package/dist/es/slider/Slider.d.ts +5 -6
  30. package/dist/es/slider/Slider.js +30 -25
  31. package/dist/es/slider/SliderLabel.d.ts +5 -6
  32. package/dist/es/slider/SliderLabel.js +3 -3
  33. package/dist/es/switch/Switch.d.ts +49 -6
  34. package/dist/es/switch/Switch.js +59 -27
  35. package/dist/es/textarea/TextArea.d.ts +5 -6
  36. package/dist/es/textarea/TextArea.js +40 -11
  37. package/dist/es/textarea/interfaces/TextAreaProps.d.ts +37 -0
  38. package/dist/npm/additionalTypes.ts +7 -1
  39. package/dist/npm/checkbox/Checkbox.d.ts +5 -6
  40. package/dist/npm/checkbox/Checkbox.js +39 -23
  41. package/dist/npm/checkbox/interfaces/CheckboxProps.d.ts +24 -0
  42. package/dist/npm/colors/ColorPalette.d.ts +6 -6
  43. package/dist/npm/colors/ColorPalette.js +13 -5
  44. package/dist/npm/colors/ColorPicker.d.ts +5 -6
  45. package/dist/npm/colors/ColorPicker.js +68 -60
  46. package/dist/npm/colors/Picker.d.ts +5 -6
  47. package/dist/npm/colors/Picker.js +5 -5
  48. package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +2 -2
  49. package/dist/npm/input/Input.d.ts +43 -7
  50. package/dist/npm/input/Input.js +47 -24
  51. package/dist/npm/main.d.ts +1 -1
  52. package/dist/npm/main.js +1 -0
  53. package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +5 -6
  54. package/dist/npm/maskedtextbox/MaskedTextBox.js +38 -14
  55. package/dist/npm/maskedtextbox/MaskedTextBoxProps.d.ts +37 -0
  56. package/dist/npm/numerictextbox/NumericTextBox.d.ts +5 -6
  57. package/dist/npm/numerictextbox/NumericTextBox.js +62 -37
  58. package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +37 -0
  59. package/dist/npm/package-metadata.js +1 -1
  60. package/dist/npm/radiobutton/RadioButton.d.ts +5 -6
  61. package/dist/npm/radiobutton/RadioButton.js +14 -9
  62. package/dist/npm/radiobutton/RadioGroup.d.ts +5 -6
  63. package/dist/npm/radiobutton/RadioGroup.js +5 -5
  64. package/dist/npm/radiobutton/interfaces/RadioButtonProps.d.ts +12 -0
  65. package/dist/npm/slider/Slider.d.ts +5 -6
  66. package/dist/npm/slider/Slider.js +33 -27
  67. package/dist/npm/slider/SliderLabel.d.ts +5 -6
  68. package/dist/npm/slider/SliderLabel.js +5 -5
  69. package/dist/npm/switch/Switch.d.ts +49 -6
  70. package/dist/npm/switch/Switch.js +60 -28
  71. package/dist/npm/textarea/TextArea.d.ts +5 -6
  72. package/dist/npm/textarea/TextArea.js +41 -12
  73. package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +37 -0
  74. package/package.json +10 -9
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -45,8 +44,8 @@ export interface RadioGroupComputed {
45
44
  /**
46
45
  * @hidden
47
46
  */
48
- export interface RadioGroupAll extends Vue, RadioGroupMethods, RadioGroupComputed, RadioGroupState, RadioGroupData {
47
+ export interface RadioGroupAll extends Vue2type, RadioGroupMethods, RadioGroupComputed, RadioGroupState, RadioGroupData {
49
48
  }
50
- declare let RadioGroup: ComponentOptions<RadioGroupAll, DefaultData<RadioGroupData>, DefaultMethods<RadioGroupAll>, RadioGroupComputed, RecordPropsDefinition<RadioGroupProps>>;
51
- declare let RadioGroupVue3: DefineComponent<RadioGroupProps, any, RadioGroupData, RadioGroupComputed, RadioGroupMethods, {}, {}, {}, string, RadioGroupProps, RadioGroupProps, {}>;
52
- export { RadioGroup, RadioGroupVue3 };
49
+ declare let RadioGroupVue2: ComponentOptions<RadioGroupAll, DefaultData<RadioGroupData>, DefaultMethods<RadioGroupAll>, RadioGroupComputed, RecordPropsDefinition<RadioGroupProps>>;
50
+ declare let RadioGroup: DefineComponent<RadioGroupProps, any, RadioGroupData, RadioGroupComputed, RadioGroupMethods, {}, {}, {}, string, RadioGroupProps, RadioGroupProps, {}>;
51
+ export { RadioGroup, RadioGroupVue2 };
@@ -7,7 +7,7 @@ var inject = allVue.inject;
7
7
  import { RadioButton } from './RadioButton';
8
8
  import { guid, classNames, focusFirstFocusableChild, validatePackage, isRtl } from '@progress/kendo-vue-common';
9
9
  import { packageMetadata } from '../package-metadata';
10
- var RadioGroup = {
10
+ var RadioGroupVue2 = {
11
11
  name: 'KendoRadioGroup',
12
12
  props: {
13
13
  ariaLabelledBy: String,
@@ -198,5 +198,5 @@ var RadioGroup = {
198
198
  }, [radioOptions]);
199
199
  }
200
200
  };
201
- var RadioGroupVue3 = RadioGroup;
202
- export { RadioGroup, RadioGroupVue3 };
201
+ var RadioGroup = RadioGroupVue2;
202
+ export { RadioGroup, RadioGroupVue2 };
@@ -50,6 +50,18 @@ export interface RadioButtonProps {
50
50
  * Sets the `name` property of the Radio button.
51
51
  */
52
52
  name?: string;
53
+ /**
54
+ * Configures the `size` of the RadioButton.
55
+ *
56
+ * The available options are:
57
+ * - small
58
+ * - medium
59
+ * - large
60
+ * - null&mdash;Does not set a size `class`.
61
+ *
62
+ * @default `medium`
63
+ */
64
+ size?: null | 'small' | 'medium' | 'large' | string;
53
65
  /**
54
66
  * Sets the `tabIndex` property of the Radio button.
55
67
  * Defaults to `0`.
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -124,8 +123,8 @@ export interface SliderComputed {
124
123
  /**
125
124
  * @hidden
126
125
  */
127
- export interface SliderAll extends Vue, SliderMethods, SliderComputed, SliderState, SliderData {
126
+ export interface SliderAll extends Vue2type, SliderMethods, SliderComputed, SliderState, SliderData {
128
127
  }
129
- declare let Slider: ComponentOptions<SliderAll, DefaultData<SliderData>, DefaultMethods<SliderAll>, SliderComputed, RecordPropsDefinition<SliderProps>>;
130
- declare const SliderVue3: DefineComponent<SliderProps, any, SliderData, SliderComputed, SliderMethods, {}, {}, {}, string, SliderProps, SliderProps, {}>;
131
- export { Slider, SliderVue3 };
128
+ declare let SliderVue2: ComponentOptions<SliderAll, DefaultData<SliderData>, DefaultMethods<SliderAll>, SliderComputed, RecordPropsDefinition<SliderProps>>;
129
+ declare const Slider: DefineComponent<SliderProps, any, SliderData, SliderComputed, SliderMethods, {}, {}, {}, string, SliderProps, SliderProps, {}>;
130
+ export { Slider, SliderVue2 };
@@ -20,13 +20,14 @@ var allVue = Vue;
20
20
  var gh = allVue.h;
21
21
  var ref = allVue.ref;
22
22
  var inject = allVue.inject;
23
+ import { Button } from '@progress/kendo-vue-buttons';
23
24
  import { getDefaultSlots } from '@progress/kendo-vue-common';
24
25
  import { Keys, classNames, Draggable, getTabIndex, validatePackage } from '@progress/kendo-vue-common';
25
26
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
26
27
  import { messages, sliderIncreaseValue, sliderDecreaseValue, sliderDragTitle } from './../messages';
27
28
  import { SLIDER_LABEL_ATTRIBUTE } from './SliderLabel';
28
29
  import { packageMetadata } from '../package-metadata';
29
- var Slider = {
30
+ var SliderVue2 = {
30
31
  name: 'KendoSlider',
31
32
  model: {
32
33
  event: 'changemodel'
@@ -206,25 +207,27 @@ var Slider = {
206
207
  position: 'relative',
207
208
  flexDirection: this.$props.vertical ? 'column-reverse' : 'row'
208
209
  }
209
- }, [this.$props.buttons && h("a", {
210
- "class": "k-button k-button-decrease",
210
+ }, [this.$props.buttons && // @ts-ignore
211
+ h(Button, {
212
+ tabIndex: -1,
213
+ attrs: this.v3 ? undefined : {
214
+ tabIndex: -1,
215
+ icon: this.$props.vertical ? 'arrow-s' : 'arrow-w',
216
+ rounded: 'full',
217
+ title: lS.toLanguageString(sliderDecreaseValue, messages[sliderDecreaseValue])
218
+ },
219
+ icon: this.$props.vertical ? 'arrow-s' : 'arrow-w',
211
220
  style: {
212
221
  position: 'relative'
213
222
  },
223
+ rounded: 'full',
224
+ "class": "k-button-decrease",
214
225
  title: lS.toLanguageString(sliderDecreaseValue, messages[sliderDecreaseValue]),
215
- attrs: this.v3 ? undefined : {
216
- title: lS.toLanguageString(sliderDecreaseValue, messages[sliderDecreaseValue])
217
- },
218
226
  onClick: this.decrement,
219
227
  on: this.v3 ? undefined : {
220
228
  "click": this.decrement
221
229
  }
222
- }, [h("span", {
223
- "class": classNames('k-icon', {
224
- 'k-i-arrow-s': this.$props.vertical,
225
- 'k-i-arrow-w': !this.$props.vertical
226
- })
227
- })]), // @ts-ignore function children
230
+ }), // @ts-ignore function children
228
231
  h(Draggable, {
229
232
  onDrag: this.dragOver,
230
233
  on: this.v3 ? undefined : {
@@ -307,25 +310,27 @@ var Slider = {
307
310
  bottom: 'calc(' + percentValue + '% - 8px)',
308
311
  zIndex: 1
309
312
  } : (_b = {}, _b[_this.currentDir === 'rtl' ? 'right' : 'left'] = 'calc(' + percentValue + '% - 8px)', _b.zIndex = 1, _b)
310
- })])])]), this.$props.buttons && h("a", {
311
- "class": "k-button k-button-increase",
313
+ })])])]), this.$props.buttons && // @ts-ignore
314
+ h(Button, {
315
+ tabIndex: -1,
316
+ attrs: this.v3 ? undefined : {
317
+ tabIndex: -1,
318
+ icon: this.$props.vertical ? 'arrow-n' : 'arrow-e',
319
+ rounded: 'full',
320
+ title: lS.toLanguageString(sliderIncreaseValue, messages[sliderIncreaseValue])
321
+ },
322
+ icon: this.$props.vertical ? 'arrow-n' : 'arrow-e',
323
+ rounded: 'full',
312
324
  style: {
313
325
  position: 'relative'
314
326
  },
327
+ "class": "k-button-increase",
315
328
  title: lS.toLanguageString(sliderIncreaseValue, messages[sliderIncreaseValue]),
316
- attrs: this.v3 ? undefined : {
317
- title: lS.toLanguageString(sliderIncreaseValue, messages[sliderIncreaseValue])
318
- },
319
329
  onClick: this.increment,
320
330
  on: this.v3 ? undefined : {
321
331
  "click": this.increment
322
332
  }
323
- }, [h("span", {
324
- "class": classNames('k-icon', {
325
- 'k-i-arrow-n': this.$props.vertical,
326
- 'k-i-arrow-e': !this.$props.vertical
327
- })
328
- })])])]);
333
+ })])]);
329
334
  },
330
335
  methods: {
331
336
  focus: function focus() {
@@ -416,5 +421,5 @@ var Slider = {
416
421
  }
417
422
  }
418
423
  };
419
- var SliderVue3 = Slider;
420
- export { Slider, SliderVue3 };
424
+ var Slider = SliderVue2;
425
+ export { Slider, SliderVue2 };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -51,8 +50,8 @@ export interface SliderLabelData {
51
50
  /**
52
51
  * @hidden
53
52
  */
54
- export interface SliderLabelAll extends Vue, SliderLabelMethods, SliderLabelData, SliderLabelState {
53
+ export interface SliderLabelAll extends Vue2type, SliderLabelMethods, SliderLabelData, SliderLabelState {
55
54
  }
56
- declare let SliderLabel: ComponentOptions<SliderLabelAll, DefaultData<SliderLabelData>, DefaultMethods<SliderLabelAll>, {}, RecordPropsDefinition<SliderLabelProps>>;
57
- declare const SliderLabelVue3: DefineComponent<SliderLabelProps, any, SliderLabelData, {}, SliderLabelMethods, {}, {}, {}, string, SliderLabelProps, SliderLabelProps, {}>;
58
- export { SliderLabel, SliderLabelVue3 };
55
+ declare let SliderLabelVue2: ComponentOptions<SliderLabelAll, DefaultData<SliderLabelData>, DefaultMethods<SliderLabelAll>, {}, RecordPropsDefinition<SliderLabelProps>>;
56
+ declare const SliderLabel: DefineComponent<SliderLabelProps, any, SliderLabelData, {}, SliderLabelMethods, {}, {}, {}, string, SliderLabelProps, SliderLabelProps, {}>;
57
+ export { SliderLabel, SliderLabelVue2 };
@@ -26,7 +26,7 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
26
26
 
27
27
  export var SLIDER_LABEL_ATTRIBUTE = 'data-slider-label'; // tslint:enable:max-line-length
28
28
 
29
- var SliderLabel = {
29
+ var SliderLabelVue2 = {
30
30
  name: 'KendoSliderLabel',
31
31
  // @ts-ignore
32
32
  emits: {
@@ -107,5 +107,5 @@ var SliderLabel = {
107
107
  }
108
108
  }
109
109
  };
110
- var SliderLabelVue3 = SliderLabel;
111
- export { SliderLabel, SliderLabelVue3 };
110
+ var SliderLabel = SliderLabelVue2;
111
+ export { SliderLabel, SliderLabelVue2 };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -20,6 +19,10 @@ export interface SwitchChangeEvent {
20
19
  * Represents the props of the [Kendo UI for Vue Switch component]({% slug overview_switch %}).
21
20
  */
22
21
  export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
22
+ /**
23
+ * Specifies the `name` of the Switch.
24
+ */
25
+ name?: string;
23
26
  /**
24
27
  * Specifies the `accessKey` of the Switch.
25
28
  */
@@ -52,6 +55,46 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
52
55
  * Sets the `id` of the Switch.
53
56
  */
54
57
  id?: string;
58
+ /**
59
+ * Configures the `size` of the Switch.
60
+ *
61
+ * The available options are:
62
+ * - small
63
+ * - medium
64
+ * - large
65
+ * - null&mdash;Does not set a size `className`.
66
+ *
67
+ * @default `medium`
68
+ */
69
+ size?: null | 'small' | 'medium' | 'large' | string;
70
+ /**
71
+ * Configures the `trackRounded` of the Switch.
72
+ *
73
+ * The available options are:
74
+ * - small
75
+ * - medium
76
+ * - large
77
+ * - full
78
+ * - circle
79
+ * - null&mdash;Does not set a trackRounded `className`.
80
+ *
81
+ * @default `full`
82
+ */
83
+ trackRounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
84
+ /**
85
+ * Configures the `thumbRounded` of the Switch.
86
+ *
87
+ * The available options are:
88
+ * - small
89
+ * - medium
90
+ * - large
91
+ * - full
92
+ * - circle
93
+ * - null&mdash;Does not set a thumbRounded `className`.
94
+ *
95
+ * @default `circle`
96
+ */
97
+ thumbRounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
55
98
  /**
56
99
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
57
100
  * For example these elements could contain error or hint message.
@@ -124,8 +167,8 @@ export interface SwitchData {
124
167
  /**
125
168
  * @hidden
126
169
  */
127
- export interface SwitchAll extends Vue, SwitchMethods, SwitchData, SwitchComputed, SwitchState {
170
+ export interface SwitchAll extends Vue2type, SwitchMethods, SwitchData, SwitchComputed, SwitchState {
128
171
  }
129
- declare let Switch: ComponentOptions<SwitchAll, DefaultData<SwitchData>, DefaultMethods<SwitchAll>, SwitchComputed, RecordPropsDefinition<SwitchProps>>;
130
- declare const SwitchVue3: DefineComponent<SwitchProps, any, SwitchData, SwitchComputed, SwitchMethods, {}, {}, {}, string, SwitchProps, SwitchProps, {}>;
131
- export { Switch, SwitchVue3 };
172
+ declare let SwitchVue2: ComponentOptions<SwitchAll, DefaultData<SwitchData>, DefaultMethods<SwitchAll>, SwitchComputed, RecordPropsDefinition<SwitchProps>>;
173
+ declare const Switch: DefineComponent<SwitchProps, any, SwitchData, SwitchComputed, SwitchMethods, {}, {}, {}, string, SwitchProps, SwitchProps, {}>;
174
+ export { Switch, SwitchVue2 };
@@ -2,16 +2,12 @@
2
2
  import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
- import { guid, noop, Keys, getTabIndex, validatePackage, isRtl } from '@progress/kendo-vue-common';
5
+ import { guid, noop, Keys, getTabIndex, validatePackage, isRtl, kendoThemeMaps } from '@progress/kendo-vue-common';
6
6
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
7
7
  import { messages, switchValidation } from './../messages';
8
- import { packageMetadata } from '../package-metadata';
9
- var SWITCH_CONTAINER = 'k-switch-container';
10
- var SWITCH_HANDLE = 'k-switch-handle';
11
- var SWITCH_LABEL_ON = 'k-switch-label-on';
12
- var SWITCH_LABEL_OFF = 'k-switch-label-off'; // tslint:enable:max-line-length
8
+ import { packageMetadata } from '../package-metadata'; // tslint:enable:max-line-length
13
9
 
14
- var Switch = {
10
+ var SwitchVue2 = {
15
11
  name: 'KendoSwitch',
16
12
  model: {
17
13
  event: 'changemodel'
@@ -25,6 +21,7 @@ var Switch = {
25
21
  'blur': null
26
22
  },
27
23
  props: {
24
+ name: String,
28
25
  accessKey: String,
29
26
  checked: {
30
27
  type: Boolean,
@@ -39,6 +36,27 @@ var Switch = {
39
36
  type: Boolean,
40
37
  default: false
41
38
  },
39
+ size: {
40
+ type: String,
41
+ default: 'medium',
42
+ validator: function validator(value) {
43
+ return [null, 'small', 'medium', 'large'].includes(value);
44
+ }
45
+ },
46
+ trackRounded: {
47
+ type: String,
48
+ default: 'full',
49
+ validator: function validator(value) {
50
+ return [null, 'small', 'medium', 'large', 'full'].includes(value);
51
+ }
52
+ },
53
+ thumbRounded: {
54
+ type: String,
55
+ default: 'full',
56
+ validator: function validator(value) {
57
+ return [null, 'small', 'medium', 'large', 'full'].includes(value);
58
+ }
59
+ },
42
60
  dir: String,
43
61
  id: String,
44
62
  ariaLabelledBy: String,
@@ -93,16 +111,26 @@ var Switch = {
93
111
  return this.valueDuringOnChange !== undefined ? this.valueDuringOnChange : this.$props.checked !== undefined ? this.$props.checked : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.currentChecked;
94
112
  },
95
113
  switchClassName: function switchClassName() {
114
+ var _a;
115
+
96
116
  var isValid = !this.validityStyles || this.validity().valid;
97
- return {
98
- 'k-widget': true,
99
- 'k-switch': true,
100
- 'k-switch-on': this.computedValue,
101
- 'k-switch-off': !this.computedValue,
102
- 'k-state-focused': this.focused,
103
- 'k-state-disabled': this.$props.disabled,
104
- 'k-state-invalid': !isValid
105
- };
117
+ return _a = {
118
+ 'k-switch': true
119
+ }, _a["k-switch-" + kendoThemeMaps.sizeMap[this.$props.size]] = true, _a["k-rounded-" + this.$props.trackRounded] = this.$props.trackRounded, _a['k-switch-on'] = this.computedValue, _a['k-switch-off'] = !this.computedValue, _a['k-focus'] = this.focused, _a['k-disabled'] = this.$props.disabled, _a['k-invalid'] = !isValid, _a;
120
+ },
121
+ switchTrackClass: function switchTrackClass() {
122
+ var _a;
123
+
124
+ return _a = {
125
+ 'k-switch-track': true
126
+ }, _a["k-rounded-" + this.$props.trackRounded] = this.$props.trackRounded, _a;
127
+ },
128
+ switchThumbClass: function switchThumbClass() {
129
+ var _a;
130
+
131
+ return _a = {
132
+ 'k-switch-thumb': true
133
+ }, _a["k-rounded-" + this.$props.thumbRounded] = this.$props.thumbRounded, _a;
106
134
  }
107
135
  },
108
136
  mounted: function mounted() {
@@ -131,7 +159,8 @@ var Switch = {
131
159
  id = _a.id,
132
160
  offLabel = _a.offLabel,
133
161
  onLabel = _a.onLabel,
134
- tabIndex = _a.tabIndex;
162
+ tabIndex = _a.tabIndex,
163
+ required = _a.required;
135
164
  return h("span", {
136
165
  "class": this.switchClassName,
137
166
  dir: this.currentDir,
@@ -149,7 +178,7 @@ var Switch = {
149
178
  onFocusout: this.handleWrapperBlur,
150
179
  onFocusin: this.handleWrapperFocus
151
180
  }, [h("span", {
152
- "class": SWITCH_CONTAINER,
181
+ "class": this.switchTrackClass,
153
182
  id: id || this._id,
154
183
  attrs: this.v3 ? undefined : {
155
184
  id: id || this._id,
@@ -176,6 +205,8 @@ var Switch = {
176
205
  attrs: this.v3 ? undefined : {
177
206
  type: "checkbox",
178
207
  tabIndex: -1,
208
+ name: this.$props.name,
209
+ required: required !== undefined ? required : false,
179
210
  "aria-hidden": true
180
211
  },
181
212
  checked: this.v3 ? this.$props.checked : null,
@@ -187,6 +218,8 @@ var Switch = {
187
218
  _this.inputRef = el;
188
219
  } : 'input',
189
220
  tabIndex: -1,
221
+ name: this.$props.name,
222
+ required: required !== undefined ? required : false,
190
223
  "aria-hidden": true,
191
224
  value: this.v3 ? this.computedValue : null,
192
225
  style: {
@@ -202,12 +235,14 @@ var Switch = {
202
235
  "change": noop
203
236
  }
204
237
  }), h("span", {
205
- "class": SWITCH_LABEL_ON
238
+ "class": 'k-switch-label-on'
206
239
  }, [onLabel]), h("span", {
207
- "class": SWITCH_LABEL_OFF
240
+ "class": 'k-switch-label-off'
208
241
  }, [offLabel]), h("span", {
209
- "class": SWITCH_HANDLE
210
- })])]);
242
+ "class": 'k-switch-thumb-wrap'
243
+ }, [h("span", {
244
+ "class": this.switchThumbClass
245
+ })])])]);
211
246
  },
212
247
  methods: {
213
248
  focus: function focus() {
@@ -218,9 +253,6 @@ var Switch = {
218
253
  element: function element() {
219
254
  return this._element;
220
255
  },
221
- name: function name() {
222
- return this.$props.name;
223
- },
224
256
  validity: function validity() {
225
257
  var customError = this.$props.validationMessage !== undefined;
226
258
  var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedValue ? true : false;
@@ -303,5 +335,5 @@ var Switch = {
303
335
  }
304
336
  }
305
337
  };
306
- var SwitchVue3 = Switch;
307
- export { Switch, SwitchVue3 };
338
+ var Switch = SwitchVue2;
339
+ export { Switch, SwitchVue2 };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -39,8 +38,8 @@ export interface TextAreaData {
39
38
  /**
40
39
  * @hidden
41
40
  */
42
- export interface TextAreaAll extends Vue, TextAreaMethods, TextAreaData, TextAreaComputed, TextAreaState {
41
+ export interface TextAreaAll extends Vue2type, TextAreaMethods, TextAreaData, TextAreaComputed, TextAreaState {
43
42
  }
44
- declare let TextArea: ComponentOptions<TextAreaAll, DefaultData<TextAreaData>, DefaultMethods<TextAreaAll>, TextAreaComputed, RecordPropsDefinition<TextAreaProps>>;
45
- declare const TextAreaVue3: DefineComponent<TextAreaProps, any, TextAreaData, TextAreaComputed, TextAreaMethods, {}, {}, {}, string, TextAreaProps, TextAreaProps, {}>;
46
- export { TextArea, TextAreaVue3 };
43
+ declare let TextAreaVue2: ComponentOptions<TextAreaAll, DefaultData<TextAreaData>, DefaultMethods<TextAreaAll>, TextAreaComputed, RecordPropsDefinition<TextAreaProps>>;
44
+ declare const TextArea: DefineComponent<TextAreaProps, any, TextAreaData, TextAreaComputed, TextAreaMethods, {}, {}, {}, string, TextAreaProps, TextAreaProps, {}>;
45
+ export { TextArea, TextAreaVue2 };
@@ -18,11 +18,11 @@ var __assign = this && this.__assign || function () {
18
18
  import * as Vue from 'vue';
19
19
  var allVue = Vue;
20
20
  var gh = allVue.h;
21
- import { guid, isRtl, getTabIndex, validatePackage // useDir,
21
+ import { guid, isRtl, getTabIndex, validatePackage, kendoThemeMaps // useDir,
22
22
  } from '@progress/kendo-vue-common';
23
23
  import { packageMetadata } from '../package-metadata'; // tslint:enable:max-line-length
24
24
 
25
- var TextArea = {
25
+ var TextAreaVue2 = {
26
26
  name: 'KendoTextArea',
27
27
  inheritAttrs: false,
28
28
  model: {
@@ -52,6 +52,27 @@ var TextArea = {
52
52
  rows: Number,
53
53
  id: String,
54
54
  name: String,
55
+ size: {
56
+ type: String,
57
+ default: 'medium',
58
+ validator: function validator(value) {
59
+ return [null, 'small', 'medium', 'large'].includes(value);
60
+ }
61
+ },
62
+ rounded: {
63
+ type: String,
64
+ default: 'medium',
65
+ validator: function validator(value) {
66
+ return [null, 'small', 'medium', 'large', 'full'].includes(value);
67
+ }
68
+ },
69
+ fillMode: {
70
+ type: String,
71
+ default: 'solid',
72
+ validator: function validator(value) {
73
+ return [null, 'solid', 'flat', 'outline'].includes(value);
74
+ }
75
+ },
55
76
  required: Boolean,
56
77
  placeholder: String,
57
78
  tabIndex: Number,
@@ -71,11 +92,18 @@ var TextArea = {
71
92
  },
72
93
  computed: {
73
94
  rootClassName: function rootClassName() {
74
- return {
75
- 'k-textarea': true,
76
- 'k-state-invalid': this.validityStyles === true ? !this.isValid : false,
77
- 'k-state-disabled': this.$props.disabled
78
- };
95
+ var _a;
96
+
97
+ var _b = this.$props,
98
+ size = _b.size,
99
+ fillMode = _b.fillMode,
100
+ rounded = _b.rounded,
101
+ required = _b.required;
102
+ var invalid = this.validityStyles === true ? !this.isValid : false;
103
+ return _a = {
104
+ 'k-input': true,
105
+ 'k-textarea': true
106
+ }, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-disabled'] = this.$props.disabled, _a['k-valid'] = !invalid, _a['k-invalid'] = invalid, _a['k-required'] = required, _a;
79
107
  },
80
108
  computedValue: function computedValue() {
81
109
  return this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.currentValue;
@@ -142,7 +170,7 @@ var TextArea = {
142
170
 
143
171
  var textarea = h('textarea', __assign(__assign({}, textAreaAttrs), {
144
172
  attrs: this.v3 ? undefined : textAreaAttrs,
145
- 'class': 'k-input',
173
+ 'class': 'k-input-inner',
146
174
  ref: this.v3 ? function (el) {
147
175
  _this.elementRef = el;
148
176
  } : 'element',
@@ -171,7 +199,8 @@ var TextArea = {
171
199
  dir: this.currentDir,
172
200
  attrs: this.v3 ? undefined : {
173
201
  dir: this.currentDir
174
- }
202
+ },
203
+ style: this.$attrs.style
175
204
  }, [textarea]);
176
205
  },
177
206
  methods: {
@@ -247,5 +276,5 @@ var TextArea = {
247
276
  }
248
277
  }
249
278
  };
250
- var TextAreaVue3 = TextArea;
251
- export { TextArea, TextAreaVue3 };
279
+ var TextArea = TextAreaVue2;
280
+ export { TextArea, TextAreaVue2 };
@@ -64,6 +64,43 @@ export interface TextAreaProps extends FormComponentProps {
64
64
  * Defaults to `0`.
65
65
  */
66
66
  tabIndex?: number;
67
+ /**
68
+ * Configures the `size` of the NumericTextBox.
69
+ *
70
+ * The available options are:
71
+ * - small
72
+ * - medium
73
+ * - large
74
+ * - null&mdash;Does not set a size `class`.
75
+ *
76
+ * @default `medium`
77
+ */
78
+ size?: null | 'small' | 'medium' | 'large' | string;
79
+ /**
80
+ * Configures the `roundness` of the NumericTextBox.
81
+ *
82
+ * The available options are:
83
+ * - small
84
+ * - medium
85
+ * - large
86
+ * - full
87
+ * - null&mdash;Does not set a rounded `class`.
88
+ *
89
+ * @default `medium`
90
+ */
91
+ rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
92
+ /**
93
+ * Configures the `fillMode` of the NumericTextBox.
94
+ *
95
+ * The available options are:
96
+ * - solid
97
+ * - outline
98
+ * - flat
99
+ * - null&mdash;Does not set a fillMode `class`.
100
+ *
101
+ * @default `solid`
102
+ */
103
+ fillMode?: null | 'solid' | 'flat' | 'outline' | string;
67
104
  /**
68
105
  * Sets the value to be submitted ([see example]({% slug controlled_textarea %})).
69
106
  */
@@ -1,3 +1,9 @@
1
1
  // @ts-ignore
2
2
  import { DefineComponent } from 'vue';
3
- export { DefineComponent };
3
+ // @ts-ignore
4
+ import * as Vue from 'vue';
5
+ // @ts-ignore
6
+ type Vue2type = Vue.default;
7
+ // @ts-ignore
8
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
9
+ export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -67,8 +66,8 @@ export interface CheckboxComputed {
67
66
  /**
68
67
  * @hidden
69
68
  */
70
- export interface CheckboxAll extends Vue, CheckboxMethods, CheckboxState, CheckboxData, CheckboxComputed {
69
+ export interface CheckboxAll extends Vue2type, CheckboxMethods, CheckboxState, CheckboxData, CheckboxComputed {
71
70
  }
72
- declare let Checkbox: ComponentOptions<CheckboxAll, DefaultData<CheckboxData>, DefaultMethods<CheckboxAll>, CheckboxComputed, RecordPropsDefinition<CheckboxProps>>;
73
- declare const CheckboxVue3: DefineComponent<CheckboxProps, any, CheckboxData, CheckboxComputed, CheckboxMethods, {}, {}, {}, string, CheckboxProps, CheckboxProps, {}>;
74
- export { Checkbox, CheckboxVue3 };
71
+ declare let CheckboxVue2: ComponentOptions<CheckboxAll, DefaultData<CheckboxData>, DefaultMethods<CheckboxAll>, CheckboxComputed, RecordPropsDefinition<CheckboxProps>>;
72
+ declare const Checkbox: DefineComponent<CheckboxProps, any, CheckboxData, CheckboxComputed, CheckboxMethods, {}, {}, {}, string, CheckboxProps, CheckboxProps, {}>;
73
+ export { Checkbox, CheckboxVue2 };