@progress/kendo-vue-layout 3.2.0 → 3.2.1

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.
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-layout',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1649822873,
8
+ publishDate: 1650007910,
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
  };
@@ -49,6 +49,10 @@ export interface TabStripProps extends TabStripEmits {
49
49
  * - `"right"`—Renders the `TabStripNavigation` components to the right of the TabStrip.
50
50
  */
51
51
  tabPosition?: string;
52
+ /**
53
+ * Sets the array of tabs.
54
+ */
55
+ tabs?: TabStripTabProperties[];
52
56
  /**
53
57
  * Sets the `tabIndex` of the TabStripNavigation.
54
58
  */
@@ -22,7 +22,7 @@ var ref = allVue.ref;
22
22
  var inject = allVue.inject;
23
23
  import { TabStripNavigation } from './TabStripNavigation';
24
24
  import { TabStripContent } from './TabStripContent';
25
- import { Keys, classNames, getDefaultSlots, validatePackage } from '@progress/kendo-vue-common';
25
+ import { Keys, classNames, getDefaultSlots, validatePackage, templateRendering, getListeners } from '@progress/kendo-vue-common';
26
26
  import { packageMetadata } from '../package-metadata';
27
27
  /**
28
28
  * Represents the default `TabStrip` component.
@@ -45,6 +45,10 @@ var TabStripVue2 = {
45
45
  type: String,
46
46
  default: 'top'
47
47
  },
48
+ tabs: {
49
+ type: Array,
50
+ default: undefined
51
+ },
48
52
  tabIndex: Number,
49
53
  dir: String
50
54
  },
@@ -54,6 +58,16 @@ var TabStripVue2 = {
54
58
  currentTabs: []
55
59
  };
56
60
  },
61
+ computed: {
62
+ compTabs: function compTabs() {
63
+ return this.tabs !== undefined ? this.tabs.map(function (tab) {
64
+ var content = templateRendering.call(this, tab.content, getListeners.call(this));
65
+ return __assign(__assign({}, tab), {
66
+ content: content
67
+ });
68
+ }, this) : this.currentTabs;
69
+ }
70
+ },
57
71
  provide: function provide() {
58
72
  return {
59
73
  addRenderTitle: this.addRenderTitle,
@@ -77,7 +91,7 @@ var TabStripVue2 = {
77
91
  }, _a[Keys.home] = function () {
78
92
  return 0;
79
93
  }, _a[Keys.end] = function () {
80
- return _this.currentTabs.length - 1;
94
+ return _this.compTabs.length - 1;
81
95
  }, _a);
82
96
  validatePackage(packageMetadata);
83
97
  },
@@ -93,14 +107,14 @@ var TabStripVue2 = {
93
107
  },
94
108
  methods: {
95
109
  addRenderTitle: function addRenderTitle(currentId, titleTemplate) {
96
- var indexToUpdate = this.currentTabs.findIndex(function (e) {
110
+ var indexToUpdate = this.compTabs.findIndex(function (e) {
97
111
  return e.id === currentId;
98
112
  });
99
113
 
100
114
  if (this.v3) {
101
- this.currentTabs[indexToUpdate].titleRender = titleTemplate;
115
+ this.compTabs[indexToUpdate].titleRender = titleTemplate;
102
116
  } else {
103
- this.currentTabs[indexToUpdate] = __assign(__assign({}, this.currentTabs[indexToUpdate]), {
117
+ this.compTabs[indexToUpdate] = __assign(__assign({}, this.compTabs[indexToUpdate]), {
104
118
  titleRender: titleTemplate
105
119
  });
106
120
  }
@@ -163,29 +177,29 @@ var TabStripVue2 = {
163
177
  return rtl ? inverted : original;
164
178
  },
165
179
  firstNavigatableTab: function firstNavigatableTab() {
166
- var length = this.currentTabs.length;
180
+ var length = this.compTabs.length;
167
181
 
168
182
  if (length) {
169
183
  for (var i = 0; i < length; i++) {
170
- if (!this.currentTabs[i].disabled) {
184
+ if (!this.compTabs[i].disabled) {
171
185
  return i;
172
186
  }
173
187
  }
174
188
  }
175
189
  },
176
190
  lastNavigatableTab: function lastNavigatableTab() {
177
- var length = this.currentTabs.length;
191
+ var length = this.compTabs.length;
178
192
 
179
193
  if (length) {
180
194
  for (var i = length - 1; i > 0; i--) {
181
- if (!this.currentTabs[i].disabled) {
195
+ if (!this.compTabs[i].disabled) {
182
196
  return i;
183
197
  }
184
198
  }
185
199
  }
186
200
  },
187
201
  prevNavigatableTab: function prevNavigatableTab() {
188
- var length = this.currentTabs.length;
202
+ var length = this.compTabs.length;
189
203
  var selected = this.$props.selected;
190
204
  var index = selected ? selected - 1 : -1;
191
205
 
@@ -195,7 +209,7 @@ var TabStripVue2 = {
195
209
 
196
210
  if (length) {
197
211
  for (var i = index; i > -1; i--) {
198
- if (!this.currentTabs[i].disabled) {
212
+ if (!this.compTabs[i].disabled) {
199
213
  return i;
200
214
  }
201
215
 
@@ -206,7 +220,7 @@ var TabStripVue2 = {
206
220
  }
207
221
  },
208
222
  nextNavigatableTab: function nextNavigatableTab() {
209
- var length = this.currentTabs.length;
223
+ var length = this.compTabs.length;
210
224
  var selected = this.$props.selected;
211
225
  var index = selected ? selected + 1 : 1;
212
226
 
@@ -216,7 +230,7 @@ var TabStripVue2 = {
216
230
 
217
231
  if (length) {
218
232
  for (var i = index; i < length; i++) {
219
- if (!this.currentTabs[i].disabled) {
233
+ if (!this.compTabs[i].disabled) {
220
234
  return i;
221
235
  }
222
236
 
@@ -238,12 +252,10 @@ var TabStripVue2 = {
238
252
  var _a;
239
253
 
240
254
  var h = gh || createElement;
241
-
242
- var tabProps = __assign({}, this.$props);
243
-
244
- var tabPosition = tabProps.tabPosition,
245
- _b = tabProps.tabIndex,
246
- tabIndex = _b === void 0 ? 0 : _b;
255
+ var _b = this.$props,
256
+ tabPosition = _b.tabPosition,
257
+ _c = _b.tabIndex,
258
+ tabIndex = _c === void 0 ? 0 : _c;
247
259
  var bottom = tabPosition === 'bottom';
248
260
  var componentClasses = classNames('k-widget', 'k-header', 'k-floatwrap', 'k-tabstrip', (_a = {}, _a['k-tabstrip-left'] = tabPosition === 'left', _a['k-tabstrip-right'] = tabPosition === 'right', _a['k-tabstrip-bottom'] = tabPosition === 'bottom', _a['k-tabstrip-top'] = tabPosition === 'top', _a));
249
261
 
@@ -254,7 +266,8 @@ var TabStripVue2 = {
254
266
  var tabContentProps = {
255
267
  index: selected,
256
268
  animation: this.$props.animation,
257
- tabs: this.currentTabs,
269
+ tabs: this.compTabs,
270
+ hasTabs: this.tabs !== undefined,
258
271
  selected: selected,
259
272
  tabContentStyle: tabContentStyle,
260
273
  showAll: this.currentShowAll
@@ -274,15 +287,15 @@ var TabStripVue2 = {
274
287
  "class": componentClasses
275
288
  }, [!bottom && // @ts-ignore function children
276
289
  h(TabStripNavigation, {
277
- tabs: this.currentTabs,
290
+ tabs: this.compTabs,
278
291
  attrs: this.v3 ? undefined : {
279
- tabs: this.currentTabs,
280
- selected: tabProps.selected,
281
- tabContentStyle: tabProps.tabContentStyle,
292
+ tabs: this.compTabs,
293
+ selected: this.$props.selected,
294
+ tabContentStyle: this.$props.tabContentStyle,
282
295
  tabIndex: tabIndex
283
296
  },
284
- selected: tabProps.selected,
285
- tabContentStyle: tabProps.tabContentStyle,
297
+ selected: this.$props.selected,
298
+ tabContentStyle: this.$props.tabContentStyle,
286
299
  onSelect: this.onSelect,
287
300
  on: this.v3 ? undefined : {
288
301
  "select": this.onSelect,
@@ -290,17 +303,17 @@ var TabStripVue2 = {
290
303
  },
291
304
  onKeydown: this.onKeyDown,
292
305
  tabIndex: tabIndex
293
- }), renderContent.call(this, tabProps), bottom && // @ts-ignore function children
306
+ }), renderContent.call(this, this.$props), bottom && // @ts-ignore function children
294
307
  h(TabStripNavigation, {
295
- tabs: this.currentTabs,
308
+ tabs: this.compTabs,
296
309
  attrs: this.v3 ? undefined : {
297
- tabs: this.currentTabs,
298
- selected: tabProps.selected,
299
- tabContentStyle: tabProps.tabContentStyle,
310
+ tabs: this.compTabs,
311
+ selected: this.$props.selected,
312
+ tabContentStyle: this.$props.tabContentStyle,
300
313
  tabIndex: tabIndex
301
314
  },
302
- selected: tabProps.selected,
303
- tabContentStyle: tabProps.tabContentStyle,
315
+ selected: this.$props.selected,
316
+ tabContentStyle: this.$props.tabContentStyle,
304
317
  onSelect: this.onSelect,
305
318
  on: this.v3 ? undefined : {
306
319
  "select": this.onSelect,
@@ -31,6 +31,10 @@ export interface TabStripContentProps {
31
31
  * @hidden
32
32
  */
33
33
  keepTabsMounted?: boolean;
34
+ /**
35
+ * @hidden
36
+ */
37
+ hasTabs?: boolean;
34
38
  }
35
39
  /**
36
40
  * @hidden
@@ -5,7 +5,7 @@ var gh = allVue.h;
5
5
  var ref = allVue.ref;
6
6
  var inject = allVue.inject;
7
7
  import { Fade } from '@progress/kendo-vue-animation';
8
- import { classNames, guid, getDefaultSlots } from '@progress/kendo-vue-common';
8
+ import { classNames, guid, getDefaultSlots, getTemplate } from '@progress/kendo-vue-common';
9
9
  import { getTabs } from './utils';
10
10
  /**
11
11
  * Represents the default `TabStripContent` component.
@@ -17,7 +17,8 @@ var TabStripContentVue2 = {
17
17
  showAll: Boolean,
18
18
  animation: Boolean,
19
19
  tabs: Array,
20
- selected: Number
20
+ selected: Number,
21
+ hasTabs: Boolean
21
22
  },
22
23
  created: function created() {
23
24
  this.contentId = guid();
@@ -29,15 +30,33 @@ var TabStripContentVue2 = {
29
30
  v3: v3
30
31
  };
31
32
  },
33
+ data: function data() {
34
+ return {
35
+ midAnimation: false
36
+ };
37
+ },
38
+ computed: {
39
+ animationClass: function animationClass() {
40
+ var that = this;
41
+ return this.tabs.map(function (_t, idx) {
42
+ var visible = idx === that.$props.selected;
43
+ return {
44
+ 'k-fade-appear': that.animation && !visible,
45
+ 'k-fade-enter-active': that.animation && visible
46
+ };
47
+ });
48
+ }
49
+ },
32
50
  render: function render(createElement) {
33
51
  var h = gh || createElement;
34
52
  var _a = this.$props,
35
53
  tabs = _a.tabs,
36
54
  selected = _a.selected,
37
- showAll = _a.showAll;
55
+ showAll = _a.showAll,
56
+ hasTabs = _a.hasTabs;
38
57
  var selectedTab = tabs && typeof selected === 'number' && tabs[selected];
39
58
  var defaultSlots = getDefaultSlots(this);
40
- var innerTabs = getTabs.call(this, [], defaultSlots);
59
+ var innerTabs = hasTabs ? tabs : getTabs.call(this, [], defaultSlots || []);
41
60
  var tabStyles = selected < innerTabs.length && selected > -1;
42
61
  var contentClasses = classNames({
43
62
  'k-content': tabStyles
@@ -51,8 +70,14 @@ var TabStripContentVue2 = {
51
70
  var visible = idx === this.$props.selected;
52
71
  var animationStyle = {
53
72
  position: 'initial',
54
- display: visible ? undefined : 'none'
73
+ height: visible ? undefined : '0px',
74
+ width: visible ? undefined : '0px'
55
75
  };
76
+ var content = hasTabs ? getTemplate.call(this, {
77
+ h: h,
78
+ template: tab.content,
79
+ defaultRendering: null
80
+ }) : tab;
56
81
  return (// @ts-ignore function children
57
82
  h(Fade, {
58
83
  appear: this.v3 ? true : visible,
@@ -62,6 +87,7 @@ var TabStripContentVue2 = {
62
87
  exit: this.$props.keepTabsMounted
63
88
  },
64
89
  key: idx,
90
+ "class": this.animationClass[idx],
65
91
  enter: this.$props.animation,
66
92
  exit: this.$props.keepTabsMounted,
67
93
  style: animationStyle
@@ -76,7 +102,10 @@ var TabStripContentVue2 = {
76
102
  "aria-expanded": true,
77
103
  id: String(_this.contentId + idx),
78
104
  key: idx
79
- }, [tab])];
105
+ }, [// hasTabs ?
106
+ // visible ? content : null
107
+ // :
108
+ content])];
80
109
  } : [h("div", {
81
110
  role: 'tabpanel',
82
111
  attrs: _this.v3 ? undefined : {
@@ -87,12 +116,12 @@ var TabStripContentVue2 = {
87
116
  "aria-expanded": true,
88
117
  id: String(_this.contentId + idx),
89
118
  key: idx
90
- }, [tab])])
119
+ }, [content])])
91
120
  );
92
121
  };
93
122
 
94
123
  var renderContent = function renderContent() {
95
- return showAll && innerTabs.map(function (tab, idx) {
124
+ return innerTabs.map(function (tab, idx) {
96
125
  return renderChild.call(this, tab, idx);
97
126
  }, this);
98
127
  };
@@ -8,6 +8,7 @@ export interface TabStripTabProperties {
8
8
  id: string;
9
9
  title?: string;
10
10
  titleRender?: any;
11
+ content?: any;
11
12
  contentClassName?: string;
12
13
  }
13
14
  /**
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-layout',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1649822873,
11
+ publishDate: 1650007910,
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
  };
@@ -49,6 +49,10 @@ export interface TabStripProps extends TabStripEmits {
49
49
  * - `"right"`&mdash;Renders the `TabStripNavigation` components to the right of the TabStrip.
50
50
  */
51
51
  tabPosition?: string;
52
+ /**
53
+ * Sets the array of tabs.
54
+ */
55
+ tabs?: TabStripTabProperties[];
52
56
  /**
53
57
  * Sets the `tabIndex` of the TabStripNavigation.
54
58
  */
@@ -57,6 +57,10 @@ var TabStripVue2 = {
57
57
  type: String,
58
58
  default: 'top'
59
59
  },
60
+ tabs: {
61
+ type: Array,
62
+ default: undefined
63
+ },
60
64
  tabIndex: Number,
61
65
  dir: String
62
66
  },
@@ -66,6 +70,16 @@ var TabStripVue2 = {
66
70
  currentTabs: []
67
71
  };
68
72
  },
73
+ computed: {
74
+ compTabs: function compTabs() {
75
+ return this.tabs !== undefined ? this.tabs.map(function (tab) {
76
+ var content = kendo_vue_common_1.templateRendering.call(this, tab.content, kendo_vue_common_1.getListeners.call(this));
77
+ return __assign(__assign({}, tab), {
78
+ content: content
79
+ });
80
+ }, this) : this.currentTabs;
81
+ }
82
+ },
69
83
  provide: function provide() {
70
84
  return {
71
85
  addRenderTitle: this.addRenderTitle,
@@ -89,7 +103,7 @@ var TabStripVue2 = {
89
103
  }, _a[kendo_vue_common_1.Keys.home] = function () {
90
104
  return 0;
91
105
  }, _a[kendo_vue_common_1.Keys.end] = function () {
92
- return _this.currentTabs.length - 1;
106
+ return _this.compTabs.length - 1;
93
107
  }, _a);
94
108
  kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
95
109
  },
@@ -105,14 +119,14 @@ var TabStripVue2 = {
105
119
  },
106
120
  methods: {
107
121
  addRenderTitle: function addRenderTitle(currentId, titleTemplate) {
108
- var indexToUpdate = this.currentTabs.findIndex(function (e) {
122
+ var indexToUpdate = this.compTabs.findIndex(function (e) {
109
123
  return e.id === currentId;
110
124
  });
111
125
 
112
126
  if (this.v3) {
113
- this.currentTabs[indexToUpdate].titleRender = titleTemplate;
127
+ this.compTabs[indexToUpdate].titleRender = titleTemplate;
114
128
  } else {
115
- this.currentTabs[indexToUpdate] = __assign(__assign({}, this.currentTabs[indexToUpdate]), {
129
+ this.compTabs[indexToUpdate] = __assign(__assign({}, this.compTabs[indexToUpdate]), {
116
130
  titleRender: titleTemplate
117
131
  });
118
132
  }
@@ -175,29 +189,29 @@ var TabStripVue2 = {
175
189
  return rtl ? inverted : original;
176
190
  },
177
191
  firstNavigatableTab: function firstNavigatableTab() {
178
- var length = this.currentTabs.length;
192
+ var length = this.compTabs.length;
179
193
 
180
194
  if (length) {
181
195
  for (var i = 0; i < length; i++) {
182
- if (!this.currentTabs[i].disabled) {
196
+ if (!this.compTabs[i].disabled) {
183
197
  return i;
184
198
  }
185
199
  }
186
200
  }
187
201
  },
188
202
  lastNavigatableTab: function lastNavigatableTab() {
189
- var length = this.currentTabs.length;
203
+ var length = this.compTabs.length;
190
204
 
191
205
  if (length) {
192
206
  for (var i = length - 1; i > 0; i--) {
193
- if (!this.currentTabs[i].disabled) {
207
+ if (!this.compTabs[i].disabled) {
194
208
  return i;
195
209
  }
196
210
  }
197
211
  }
198
212
  },
199
213
  prevNavigatableTab: function prevNavigatableTab() {
200
- var length = this.currentTabs.length;
214
+ var length = this.compTabs.length;
201
215
  var selected = this.$props.selected;
202
216
  var index = selected ? selected - 1 : -1;
203
217
 
@@ -207,7 +221,7 @@ var TabStripVue2 = {
207
221
 
208
222
  if (length) {
209
223
  for (var i = index; i > -1; i--) {
210
- if (!this.currentTabs[i].disabled) {
224
+ if (!this.compTabs[i].disabled) {
211
225
  return i;
212
226
  }
213
227
 
@@ -218,7 +232,7 @@ var TabStripVue2 = {
218
232
  }
219
233
  },
220
234
  nextNavigatableTab: function nextNavigatableTab() {
221
- var length = this.currentTabs.length;
235
+ var length = this.compTabs.length;
222
236
  var selected = this.$props.selected;
223
237
  var index = selected ? selected + 1 : 1;
224
238
 
@@ -228,7 +242,7 @@ var TabStripVue2 = {
228
242
 
229
243
  if (length) {
230
244
  for (var i = index; i < length; i++) {
231
- if (!this.currentTabs[i].disabled) {
245
+ if (!this.compTabs[i].disabled) {
232
246
  return i;
233
247
  }
234
248
 
@@ -250,12 +264,10 @@ var TabStripVue2 = {
250
264
  var _a;
251
265
 
252
266
  var h = gh || createElement;
253
-
254
- var tabProps = __assign({}, this.$props);
255
-
256
- var tabPosition = tabProps.tabPosition,
257
- _b = tabProps.tabIndex,
258
- tabIndex = _b === void 0 ? 0 : _b;
267
+ var _b = this.$props,
268
+ tabPosition = _b.tabPosition,
269
+ _c = _b.tabIndex,
270
+ tabIndex = _c === void 0 ? 0 : _c;
259
271
  var bottom = tabPosition === 'bottom';
260
272
  var componentClasses = kendo_vue_common_1.classNames('k-widget', 'k-header', 'k-floatwrap', 'k-tabstrip', (_a = {}, _a['k-tabstrip-left'] = tabPosition === 'left', _a['k-tabstrip-right'] = tabPosition === 'right', _a['k-tabstrip-bottom'] = tabPosition === 'bottom', _a['k-tabstrip-top'] = tabPosition === 'top', _a));
261
273
 
@@ -266,7 +278,8 @@ var TabStripVue2 = {
266
278
  var tabContentProps = {
267
279
  index: selected,
268
280
  animation: this.$props.animation,
269
- tabs: this.currentTabs,
281
+ tabs: this.compTabs,
282
+ hasTabs: this.tabs !== undefined,
270
283
  selected: selected,
271
284
  tabContentStyle: tabContentStyle,
272
285
  showAll: this.currentShowAll
@@ -286,15 +299,15 @@ var TabStripVue2 = {
286
299
  "class": componentClasses
287
300
  }, [!bottom && // @ts-ignore function children
288
301
  h(TabStripNavigation_1.TabStripNavigation, {
289
- tabs: this.currentTabs,
302
+ tabs: this.compTabs,
290
303
  attrs: this.v3 ? undefined : {
291
- tabs: this.currentTabs,
292
- selected: tabProps.selected,
293
- tabContentStyle: tabProps.tabContentStyle,
304
+ tabs: this.compTabs,
305
+ selected: this.$props.selected,
306
+ tabContentStyle: this.$props.tabContentStyle,
294
307
  tabIndex: tabIndex
295
308
  },
296
- selected: tabProps.selected,
297
- tabContentStyle: tabProps.tabContentStyle,
309
+ selected: this.$props.selected,
310
+ tabContentStyle: this.$props.tabContentStyle,
298
311
  onSelect: this.onSelect,
299
312
  on: this.v3 ? undefined : {
300
313
  "select": this.onSelect,
@@ -302,17 +315,17 @@ var TabStripVue2 = {
302
315
  },
303
316
  onKeydown: this.onKeyDown,
304
317
  tabIndex: tabIndex
305
- }), renderContent.call(this, tabProps), bottom && // @ts-ignore function children
318
+ }), renderContent.call(this, this.$props), bottom && // @ts-ignore function children
306
319
  h(TabStripNavigation_1.TabStripNavigation, {
307
- tabs: this.currentTabs,
320
+ tabs: this.compTabs,
308
321
  attrs: this.v3 ? undefined : {
309
- tabs: this.currentTabs,
310
- selected: tabProps.selected,
311
- tabContentStyle: tabProps.tabContentStyle,
322
+ tabs: this.compTabs,
323
+ selected: this.$props.selected,
324
+ tabContentStyle: this.$props.tabContentStyle,
312
325
  tabIndex: tabIndex
313
326
  },
314
- selected: tabProps.selected,
315
- tabContentStyle: tabProps.tabContentStyle,
327
+ selected: this.$props.selected,
328
+ tabContentStyle: this.$props.tabContentStyle,
316
329
  onSelect: this.onSelect,
317
330
  on: this.v3 ? undefined : {
318
331
  "select": this.onSelect,
@@ -31,6 +31,10 @@ export interface TabStripContentProps {
31
31
  * @hidden
32
32
  */
33
33
  keepTabsMounted?: boolean;
34
+ /**
35
+ * @hidden
36
+ */
37
+ hasTabs?: boolean;
34
38
  }
35
39
  /**
36
40
  * @hidden
@@ -28,7 +28,8 @@ var TabStripContentVue2 = {
28
28
  showAll: Boolean,
29
29
  animation: Boolean,
30
30
  tabs: Array,
31
- selected: Number
31
+ selected: Number,
32
+ hasTabs: Boolean
32
33
  },
33
34
  created: function created() {
34
35
  this.contentId = kendo_vue_common_1.guid();
@@ -40,15 +41,33 @@ var TabStripContentVue2 = {
40
41
  v3: v3
41
42
  };
42
43
  },
44
+ data: function data() {
45
+ return {
46
+ midAnimation: false
47
+ };
48
+ },
49
+ computed: {
50
+ animationClass: function animationClass() {
51
+ var that = this;
52
+ return this.tabs.map(function (_t, idx) {
53
+ var visible = idx === that.$props.selected;
54
+ return {
55
+ 'k-fade-appear': that.animation && !visible,
56
+ 'k-fade-enter-active': that.animation && visible
57
+ };
58
+ });
59
+ }
60
+ },
43
61
  render: function render(createElement) {
44
62
  var h = gh || createElement;
45
63
  var _a = this.$props,
46
64
  tabs = _a.tabs,
47
65
  selected = _a.selected,
48
- showAll = _a.showAll;
66
+ showAll = _a.showAll,
67
+ hasTabs = _a.hasTabs;
49
68
  var selectedTab = tabs && typeof selected === 'number' && tabs[selected];
50
69
  var defaultSlots = kendo_vue_common_1.getDefaultSlots(this);
51
- var innerTabs = utils_1.getTabs.call(this, [], defaultSlots);
70
+ var innerTabs = hasTabs ? tabs : utils_1.getTabs.call(this, [], defaultSlots || []);
52
71
  var tabStyles = selected < innerTabs.length && selected > -1;
53
72
  var contentClasses = kendo_vue_common_1.classNames({
54
73
  'k-content': tabStyles
@@ -62,8 +81,14 @@ var TabStripContentVue2 = {
62
81
  var visible = idx === this.$props.selected;
63
82
  var animationStyle = {
64
83
  position: 'initial',
65
- display: visible ? undefined : 'none'
84
+ height: visible ? undefined : '0px',
85
+ width: visible ? undefined : '0px'
66
86
  };
87
+ var content = hasTabs ? kendo_vue_common_1.getTemplate.call(this, {
88
+ h: h,
89
+ template: tab.content,
90
+ defaultRendering: null
91
+ }) : tab;
67
92
  return (// @ts-ignore function children
68
93
  h(kendo_vue_animation_1.Fade, {
69
94
  appear: this.v3 ? true : visible,
@@ -73,6 +98,7 @@ var TabStripContentVue2 = {
73
98
  exit: this.$props.keepTabsMounted
74
99
  },
75
100
  key: idx,
101
+ "class": this.animationClass[idx],
76
102
  enter: this.$props.animation,
77
103
  exit: this.$props.keepTabsMounted,
78
104
  style: animationStyle
@@ -87,7 +113,10 @@ var TabStripContentVue2 = {
87
113
  "aria-expanded": true,
88
114
  id: String(_this.contentId + idx),
89
115
  key: idx
90
- }, [tab])];
116
+ }, [// hasTabs ?
117
+ // visible ? content : null
118
+ // :
119
+ content])];
91
120
  } : [h("div", {
92
121
  role: 'tabpanel',
93
122
  attrs: _this.v3 ? undefined : {
@@ -98,12 +127,12 @@ var TabStripContentVue2 = {
98
127
  "aria-expanded": true,
99
128
  id: String(_this.contentId + idx),
100
129
  key: idx
101
- }, [tab])])
130
+ }, [content])])
102
131
  );
103
132
  };
104
133
 
105
134
  var renderContent = function renderContent() {
106
- return showAll && innerTabs.map(function (tab, idx) {
135
+ return innerTabs.map(function (tab, idx) {
107
136
  return renderChild.call(this, tab, idx);
108
137
  }, this);
109
138
  };
@@ -8,6 +8,7 @@ export interface TabStripTabProperties {
8
8
  id: string;
9
9
  title?: string;
10
10
  titleRender?: any;
11
+ content?: any;
11
12
  contentClassName?: string;
12
13
  }
13
14
  /**