@progress/kendo-vue-inputs 3.1.2 → 3.1.3-dev.202203311441

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.
@@ -17,6 +17,7 @@ export interface InputProps extends FormComponentProps {
17
17
  value?: string | string[] | number;
18
18
  modelValue?: string | number;
19
19
  defaultValue?: string | string[] | number | undefined;
20
+ disabled?: boolean;
20
21
  validate?: boolean;
21
22
  /**
22
23
  * Configures the `size` of the MaskedTextBox.
@@ -43,6 +43,7 @@ var InputVue2 = {
43
43
  type: [String, Number],
44
44
  default: undefined
45
45
  },
46
+ disabled: Boolean,
46
47
  defaultValue: {
47
48
  type: [String, Number],
48
49
  default: ''
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-inputs',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1647961629,
8
+ publishDate: 1648737194,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -14,11 +14,17 @@ var RadioButtonVue2 = {
14
14
  checked: Boolean,
15
15
  disabled: Boolean,
16
16
  className: String,
17
+ content: [String, Number, Boolean, Object],
17
18
  id: String,
18
19
  label: String,
19
20
  labelRender: [String, Number, Boolean, Object],
21
+ item: [String, Number, Boolean, Object],
20
22
  labelPlacement: String,
21
23
  name: String,
24
+ tag: {
25
+ type: String,
26
+ default: 'div'
27
+ },
22
28
  size: {
23
29
  type: String,
24
30
  default: 'medium',
@@ -102,7 +108,8 @@ var RadioButtonVue2 = {
102
108
  labelPlacement = _a.labelPlacement,
103
109
  name = _a.name,
104
110
  tabIndex = _a.tabIndex,
105
- value = _a.value;
111
+ value = _a.value,
112
+ tag = _a.tag;
106
113
  var renderedLabel = label;
107
114
 
108
115
  if (labelRender) {
@@ -113,6 +120,10 @@ var RadioButtonVue2 = {
113
120
  });
114
121
  }
115
122
 
123
+ var content = getTemplate.call(this, {
124
+ h: h,
125
+ template: this.$props.content
126
+ });
116
127
  var radioButtonLabel = renderedLabel !== undefined ? h("label", {
117
128
  "class": 'k-radio-label',
118
129
  "for": id || this.calculatedId,
@@ -160,7 +171,19 @@ var RadioButtonVue2 = {
160
171
  onFocus: this.handleFocus,
161
172
  onBlur: this.handleBlur
162
173
  });
163
- return labelPlacement === 'before' ? h("div", [radioButtonLabel, radio, defaultSlot]) : h("div", [radio, radioButtonLabel, defaultSlot]);
174
+ var defaultRendering = labelPlacement === 'before' ? h(tag, [radioButtonLabel, radio, content, defaultSlot]) : h(tag, [radio, radioButtonLabel, content, defaultSlot]);
175
+ return getTemplate.call(this, {
176
+ h: h,
177
+ template: this.$props.item,
178
+ defaultRendering: defaultRendering,
179
+ defaultSlots: defaultSlot,
180
+ additionalListeners: {
181
+ change: this.handleChange,
182
+ focus: this.handleFocus,
183
+ blur: this.handleBlur
184
+ },
185
+ additionalProps: {}
186
+ });
164
187
  }
165
188
  };
166
189
  var RadioButton = RadioButtonVue2;
@@ -5,7 +5,7 @@ var gh = allVue.h;
5
5
  var ref = allVue.ref;
6
6
  var inject = allVue.inject;
7
7
  import { RadioButton } from './RadioButton';
8
- import { guid, classNames, focusFirstFocusableChild, validatePackage, isRtl } from '@progress/kendo-vue-common';
8
+ import { guid, classNames, focusFirstFocusableChild, validatePackage, isRtl, templateRendering, getListeners } from '@progress/kendo-vue-common';
9
9
  import { packageMetadata } from '../package-metadata';
10
10
  var RadioGroupVue2 = {
11
11
  name: 'KendoRadioGroup',
@@ -19,7 +19,7 @@ var RadioGroupVue2 = {
19
19
  labelPlacement: String,
20
20
  item: {
21
21
  type: String,
22
- default: 'li'
22
+ default: undefined
23
23
  },
24
24
  layout: {
25
25
  type: String,
@@ -141,19 +141,32 @@ var RadioGroupVue2 = {
141
141
  var radioOptions = dataItems && dataItems.map(function (option, index) {
142
142
  var isCurrentlyChecked = this.checkedRadioValue === option.value;
143
143
  var noOptionChecked = this.checkedRadioValue === null || this.checkedRadioValue === undefined;
144
- return h("li", {
145
- "class": classNames('k-radio-item', {
146
- 'k-state-disabled': option.disabled || disabled
147
- }),
148
- key: index,
149
- role: 'radio',
150
- attrs: this.v3 ? undefined : {
151
- role: 'radio'
152
- }
153
- }, [// @ts-ignore function children
154
- h(RadioButton, {
155
- valid: valid,
156
- attrs: this.v3 ? undefined : {
144
+ var item = templateRendering.call(this, this.$props.item || option.item, getListeners.call(this));
145
+ return (// @ts-ignore function children
146
+ h(RadioButton, {
147
+ "class": classNames('k-radio-item', {
148
+ 'k-state-disabled': option.disabled || disabled
149
+ }),
150
+ style: option.style,
151
+ key: index,
152
+ item: item,
153
+ attrs: this.v3 ? undefined : {
154
+ item: item,
155
+ role: 'radio',
156
+ tag: 'li',
157
+ valid: valid,
158
+ className: option.className,
159
+ label: option.label,
160
+ value: option.value,
161
+ checked: isCurrentlyChecked,
162
+ disabled: option.disabled || disabled ? true : false,
163
+ labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
164
+ tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
165
+ index: index,
166
+ name: name || option.name || this.radioGroupName
167
+ },
168
+ role: 'radio',
169
+ tag: 'li',
157
170
  valid: valid,
158
171
  className: option.className,
159
172
  label: option.label,
@@ -163,26 +176,19 @@ var RadioGroupVue2 = {
163
176
  labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
164
177
  tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
165
178
  index: index,
166
- name: name || option.name || this.radioGroupName
167
- },
168
- className: option.className,
169
- label: option.label,
170
- value: option.value,
171
- checked: isCurrentlyChecked,
172
- disabled: option.disabled || disabled ? true : false,
173
- labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
174
- tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
175
- index: index,
176
- name: name || option.name || this.radioGroupName,
177
- onChange: this.handleChange,
178
- on: this.v3 ? undefined : {
179
- "change": this.handleChange,
180
- "focus": this.handleFocus,
181
- "blur": this.handleBlur
182
- },
183
- onFocus: this.handleFocus,
184
- onBlur: this.handleBlur
185
- })]);
179
+ name: name || option.name || this.radioGroupName,
180
+ onChange: this.handleChange,
181
+ on: this.v3 ? undefined : {
182
+ "change": this.handleChange,
183
+ "focus": this.handleFocus,
184
+ "blur": this.handleBlur
185
+ },
186
+ onFocus: this.handleFocus,
187
+ onBlur: this.handleBlur
188
+ }, this.v3 ? function () {
189
+ return [option.content];
190
+ } : [option.content])
191
+ );
186
192
  }, this);
187
193
  return h("ul", {
188
194
  role: "radiogroup",
@@ -41,6 +41,16 @@ export interface RadioButtonProps {
41
41
  * Accepts a slot name, a `render` function, or a Vue component.
42
42
  */
43
43
  labelRender?: any;
44
+ /**
45
+ * Sets the item content template of the Radio button component.
46
+ * Accepts a slot name, a `render` function, or a Vue component.
47
+ */
48
+ content?: any;
49
+ /**
50
+ * Sets the item render template of the Radio button component.
51
+ * Accepts a slot name, a `render` function, or a Vue component.
52
+ */
53
+ item?: any;
44
54
  /**
45
55
  * Sets the label position of the Radio button ([see example]({% slug labels_radiobutton %})).
46
56
  * Accepts two options: `before` or `after`. Defaults to `after`.
@@ -50,6 +60,10 @@ export interface RadioButtonProps {
50
60
  * Sets the `name` property of the Radio button.
51
61
  */
52
62
  name?: string;
63
+ /**
64
+ * Sets the `tag` property of the Radio button wrapping element.
65
+ */
66
+ tag?: string;
53
67
  /**
54
68
  * Configures the `size` of the RadioButton.
55
69
  *
@@ -51,6 +51,7 @@ var TextAreaVue2 = {
51
51
  rows: Number,
52
52
  id: String,
53
53
  name: String,
54
+ validationMessage: String,
54
55
  size: {
55
56
  type: String,
56
57
  default: 'medium',
@@ -17,6 +17,7 @@ export interface InputProps extends FormComponentProps {
17
17
  value?: string | string[] | number;
18
18
  modelValue?: string | number;
19
19
  defaultValue?: string | string[] | number | undefined;
20
+ disabled?: boolean;
20
21
  validate?: boolean;
21
22
  /**
22
23
  * Configures the `size` of the MaskedTextBox.
@@ -54,6 +54,7 @@ var InputVue2 = {
54
54
  type: [String, Number],
55
55
  default: undefined
56
56
  },
57
+ disabled: Boolean,
57
58
  defaultValue: {
58
59
  type: [String, Number],
59
60
  default: ''
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-inputs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1647961629,
11
+ publishDate: 1648737194,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
@@ -25,11 +25,17 @@ var RadioButtonVue2 = {
25
25
  checked: Boolean,
26
26
  disabled: Boolean,
27
27
  className: String,
28
+ content: [String, Number, Boolean, Object],
28
29
  id: String,
29
30
  label: String,
30
31
  labelRender: [String, Number, Boolean, Object],
32
+ item: [String, Number, Boolean, Object],
31
33
  labelPlacement: String,
32
34
  name: String,
35
+ tag: {
36
+ type: String,
37
+ default: 'div'
38
+ },
33
39
  size: {
34
40
  type: String,
35
41
  default: 'medium',
@@ -113,7 +119,8 @@ var RadioButtonVue2 = {
113
119
  labelPlacement = _a.labelPlacement,
114
120
  name = _a.name,
115
121
  tabIndex = _a.tabIndex,
116
- value = _a.value;
122
+ value = _a.value,
123
+ tag = _a.tag;
117
124
  var renderedLabel = label;
118
125
 
119
126
  if (labelRender) {
@@ -124,6 +131,10 @@ var RadioButtonVue2 = {
124
131
  });
125
132
  }
126
133
 
134
+ var content = kendo_vue_common_1.getTemplate.call(this, {
135
+ h: h,
136
+ template: this.$props.content
137
+ });
127
138
  var radioButtonLabel = renderedLabel !== undefined ? h("label", {
128
139
  "class": 'k-radio-label',
129
140
  "for": id || this.calculatedId,
@@ -171,7 +182,19 @@ var RadioButtonVue2 = {
171
182
  onFocus: this.handleFocus,
172
183
  onBlur: this.handleBlur
173
184
  });
174
- return labelPlacement === 'before' ? h("div", [radioButtonLabel, radio, defaultSlot]) : h("div", [radio, radioButtonLabel, defaultSlot]);
185
+ var defaultRendering = labelPlacement === 'before' ? h(tag, [radioButtonLabel, radio, content, defaultSlot]) : h(tag, [radio, radioButtonLabel, content, defaultSlot]);
186
+ return kendo_vue_common_1.getTemplate.call(this, {
187
+ h: h,
188
+ template: this.$props.item,
189
+ defaultRendering: defaultRendering,
190
+ defaultSlots: defaultSlot,
191
+ additionalListeners: {
192
+ change: this.handleChange,
193
+ focus: this.handleFocus,
194
+ blur: this.handleBlur
195
+ },
196
+ additionalProps: {}
197
+ });
175
198
  }
176
199
  };
177
200
  exports.RadioButtonVue2 = RadioButtonVue2;
@@ -30,7 +30,7 @@ var RadioGroupVue2 = {
30
30
  labelPlacement: String,
31
31
  item: {
32
32
  type: String,
33
- default: 'li'
33
+ default: undefined
34
34
  },
35
35
  layout: {
36
36
  type: String,
@@ -152,19 +152,32 @@ var RadioGroupVue2 = {
152
152
  var radioOptions = dataItems && dataItems.map(function (option, index) {
153
153
  var isCurrentlyChecked = this.checkedRadioValue === option.value;
154
154
  var noOptionChecked = this.checkedRadioValue === null || this.checkedRadioValue === undefined;
155
- return h("li", {
156
- "class": kendo_vue_common_1.classNames('k-radio-item', {
157
- 'k-state-disabled': option.disabled || disabled
158
- }),
159
- key: index,
160
- role: 'radio',
161
- attrs: this.v3 ? undefined : {
162
- role: 'radio'
163
- }
164
- }, [// @ts-ignore function children
165
- h(RadioButton_1.RadioButton, {
166
- valid: valid,
167
- attrs: this.v3 ? undefined : {
155
+ var item = kendo_vue_common_1.templateRendering.call(this, this.$props.item || option.item, kendo_vue_common_1.getListeners.call(this));
156
+ return (// @ts-ignore function children
157
+ h(RadioButton_1.RadioButton, {
158
+ "class": kendo_vue_common_1.classNames('k-radio-item', {
159
+ 'k-state-disabled': option.disabled || disabled
160
+ }),
161
+ style: option.style,
162
+ key: index,
163
+ item: item,
164
+ attrs: this.v3 ? undefined : {
165
+ item: item,
166
+ role: 'radio',
167
+ tag: 'li',
168
+ valid: valid,
169
+ className: option.className,
170
+ label: option.label,
171
+ value: option.value,
172
+ checked: isCurrentlyChecked,
173
+ disabled: option.disabled || disabled ? true : false,
174
+ labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
175
+ tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
176
+ index: index,
177
+ name: name || option.name || this.radioGroupName
178
+ },
179
+ role: 'radio',
180
+ tag: 'li',
168
181
  valid: valid,
169
182
  className: option.className,
170
183
  label: option.label,
@@ -174,26 +187,19 @@ var RadioGroupVue2 = {
174
187
  labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
175
188
  tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
176
189
  index: index,
177
- name: name || option.name || this.radioGroupName
178
- },
179
- className: option.className,
180
- label: option.label,
181
- value: option.value,
182
- checked: isCurrentlyChecked,
183
- disabled: option.disabled || disabled ? true : false,
184
- labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
185
- tabIndex: option.tabIndex ? option.tabIndex : noOptionChecked && index === 0 || isCurrentlyChecked ? 0 : -1,
186
- index: index,
187
- name: name || option.name || this.radioGroupName,
188
- onChange: this.handleChange,
189
- on: this.v3 ? undefined : {
190
- "change": this.handleChange,
191
- "focus": this.handleFocus,
192
- "blur": this.handleBlur
193
- },
194
- onFocus: this.handleFocus,
195
- onBlur: this.handleBlur
196
- })]);
190
+ name: name || option.name || this.radioGroupName,
191
+ onChange: this.handleChange,
192
+ on: this.v3 ? undefined : {
193
+ "change": this.handleChange,
194
+ "focus": this.handleFocus,
195
+ "blur": this.handleBlur
196
+ },
197
+ onFocus: this.handleFocus,
198
+ onBlur: this.handleBlur
199
+ }, this.v3 ? function () {
200
+ return [option.content];
201
+ } : [option.content])
202
+ );
197
203
  }, this);
198
204
  return h("ul", {
199
205
  role: "radiogroup",
@@ -41,6 +41,16 @@ export interface RadioButtonProps {
41
41
  * Accepts a slot name, a `render` function, or a Vue component.
42
42
  */
43
43
  labelRender?: any;
44
+ /**
45
+ * Sets the item content template of the Radio button component.
46
+ * Accepts a slot name, a `render` function, or a Vue component.
47
+ */
48
+ content?: any;
49
+ /**
50
+ * Sets the item render template of the Radio button component.
51
+ * Accepts a slot name, a `render` function, or a Vue component.
52
+ */
53
+ item?: any;
44
54
  /**
45
55
  * Sets the label position of the Radio button ([see example]({% slug labels_radiobutton %})).
46
56
  * Accepts two options: `before` or `after`. Defaults to `after`.
@@ -50,6 +60,10 @@ export interface RadioButtonProps {
50
60
  * Sets the `name` property of the Radio button.
51
61
  */
52
62
  name?: string;
63
+ /**
64
+ * Sets the `tag` property of the Radio button wrapping element.
65
+ */
66
+ tag?: string;
53
67
  /**
54
68
  * Configures the `size` of the RadioButton.
55
69
  *
@@ -60,6 +60,7 @@ var TextAreaVue2 = {
60
60
  rows: Number,
61
61
  id: String,
62
62
  name: String,
63
+ validationMessage: String,
63
64
  size: {
64
65
  type: String,
65
66
  default: 'medium',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-inputs",
3
3
  "description": "Kendo UI for Vue Input package",
4
- "version": "3.1.2",
4
+ "version": "3.1.3-dev.202203311441",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -38,21 +38,21 @@
38
38
  "vue": "^2.6.12 || ^3.0.2"
39
39
  },
40
40
  "dependencies": {
41
- "@progress/kendo-vue-buttons": "3.1.2",
42
- "@progress/kendo-vue-common": "3.1.2",
43
- "@progress/kendo-vue-labels": "3.1.2",
44
- "@progress/kendo-vue-popup": "3.1.2"
41
+ "@progress/kendo-vue-buttons": "3.1.3-dev.202203311441",
42
+ "@progress/kendo-vue-common": "3.1.3-dev.202203311441",
43
+ "@progress/kendo-vue-labels": "3.1.3-dev.202203311441",
44
+ "@progress/kendo-vue-popup": "3.1.3-dev.202203311441"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@progress/kendo-data-query": "^1.5.5",
48
48
  "@progress/kendo-date-math": "^1.5.4",
49
49
  "@progress/kendo-drawing": "^1.8.0",
50
50
  "@progress/kendo-licensing": "^1.1.0",
51
- "@progress/kendo-vue-buttons": "3.1.2",
52
- "@progress/kendo-vue-form": "3.1.2",
53
- "@progress/kendo-vue-intl": "3.1.2",
54
- "@progress/kendo-vue-labels": "3.1.2",
55
- "@progress/kendo-vue-tooltip": "3.1.2",
51
+ "@progress/kendo-vue-buttons": "3.1.3-dev.202203311441",
52
+ "@progress/kendo-vue-form": "3.1.3-dev.202203311441",
53
+ "@progress/kendo-vue-intl": "3.1.3-dev.202203311441",
54
+ "@progress/kendo-vue-labels": "3.1.3-dev.202203311441",
55
+ "@progress/kendo-vue-tooltip": "3.1.3-dev.202203311441",
56
56
  "cldr-core": "^34.0.0",
57
57
  "cldr-dates-full": "^34.0.0",
58
58
  "cldr-numbers-full": "^34.0.0"