@progress/kendo-vue-layout 6.0.0-develop.2 → 6.0.0-develop.4

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,12 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as f, createVNode as n, h as T } from "vue";
8
+ import { defineComponent as f, createVNode as n, h as g } from "vue";
9
9
  import { TabStripNavigation as o } from "./TabStripNavigation.mjs";
10
- import { TabStripContent as g } from "./TabStripContent.mjs";
11
- import { templateRendering as l, getListeners as h, Keys as s, validatePackage as k, shouldShowValidationUI as v, classNames as y, WatermarkOverlay as w, getDefaultSlots as S } from "@progress/kendo-vue-common";
10
+ import { TabStripContent as T } from "./TabStripContent.mjs";
11
+ import { templateRendering as l, getListeners as h, Keys as i, validatePackage as k, shouldShowValidationUI as v, classNames as y, WatermarkOverlay as w, getDefaultSlots as S } from "@progress/kendo-vue-common";
12
12
  import { packageMetadata as d } from "../package-metadata.mjs";
13
- const B = /* @__PURE__ */ f({
13
+ const K = /* @__PURE__ */ f({
14
14
  name: "KendoTabStrip",
15
15
  emits: {
16
16
  select: null
@@ -25,6 +25,10 @@ const B = /* @__PURE__ */ f({
25
25
  type: String,
26
26
  default: "top"
27
27
  },
28
+ tabAlignment: {
29
+ type: String,
30
+ default: "start"
31
+ },
28
32
  tabs: {
29
33
  type: Array,
30
34
  default: void 0
@@ -42,11 +46,11 @@ const B = /* @__PURE__ */ f({
42
46
  computed: {
43
47
  compTabs() {
44
48
  return this.tabs !== void 0 ? this.tabs.map(function(t) {
45
- const e = l.call(this, t.content, h.call(this)), i = l.call(this, t.titleRender, h.call(this));
49
+ const e = l.call(this, t.content, h.call(this)), s = l.call(this, t.titleRender, h.call(this));
46
50
  return {
47
51
  ...t,
48
52
  content: e,
49
- titleRender: i
53
+ titleRender: s
50
54
  };
51
55
  }, this) : this.currentTabs;
52
56
  }
@@ -60,12 +64,12 @@ const B = /* @__PURE__ */ f({
60
64
  },
61
65
  created() {
62
66
  this.keyBinding = {
63
- [s.left]: () => this.prevNavigatableTab(),
64
- [s.right]: () => this.nextNavigatableTab(),
65
- [s.down]: () => this.nextNavigatableTab(),
66
- [s.up]: () => this.prevNavigatableTab(),
67
- [s.home]: () => 0,
68
- [s.end]: () => this.compTabs.length - 1
67
+ [i.left]: () => this.prevNavigatableTab(),
68
+ [i.right]: () => this.nextNavigatableTab(),
69
+ [i.down]: () => this.nextNavigatableTab(),
70
+ [i.up]: () => this.prevNavigatableTab(),
71
+ [i.home]: () => 0,
72
+ [i.end]: () => this.compTabs.length - 1
69
73
  }, k(d), this.showLicenseWatermark = v(d);
70
74
  },
71
75
  watch: {
@@ -77,14 +81,14 @@ const B = /* @__PURE__ */ f({
77
81
  },
78
82
  methods: {
79
83
  addRenderTitle(t, e) {
80
- const i = this.compTabs.findIndex((a) => a.tabId === t);
81
- this.compTabs[i].titleRender = e;
84
+ const s = this.compTabs.findIndex((a) => a.tabId === t);
85
+ this.compTabs[s].titleRender = e;
82
86
  },
83
87
  addTab(t) {
84
88
  this.currentTabs.push(t);
85
89
  },
86
90
  removeTab(t) {
87
- const e = this.currentTabs.findIndex((i) => i.tabId === t);
91
+ const e = this.currentTabs.findIndex((s) => s.tabId === t);
88
92
  this.currentTabs.splice(e, 1);
89
93
  },
90
94
  onSelect(t) {
@@ -95,23 +99,23 @@ const B = /* @__PURE__ */ f({
95
99
  onKeyDown(t) {
96
100
  let e;
97
101
  switch (t.keyCode) {
98
- case s.left:
99
- e = this.keyBinding[this.invertKeys(s.left, s.right)];
102
+ case i.left:
103
+ e = this.keyBinding[this.invertKeys(i.left, i.right)];
100
104
  break;
101
- case s.right:
102
- e = this.keyBinding[this.invertKeys(s.right, s.left)];
105
+ case i.right:
106
+ e = this.keyBinding[this.invertKeys(i.right, i.left)];
103
107
  break;
104
- case s.up:
105
- e = this.keyBinding[s.up];
108
+ case i.up:
109
+ e = this.keyBinding[i.up];
106
110
  break;
107
- case s.down:
108
- e = this.keyBinding[s.down];
111
+ case i.down:
112
+ e = this.keyBinding[i.down];
109
113
  break;
110
- case s.home:
111
- e = this.keyBinding[s.home];
114
+ case i.home:
115
+ e = this.keyBinding[i.home];
112
116
  break;
113
- case s.end:
114
- e = this.keyBinding[s.end];
117
+ case i.end:
118
+ e = this.keyBinding[i.end];
115
119
  break;
116
120
  }
117
121
  e && (t.preventDefault(), this.onSelect(e()));
@@ -138,11 +142,11 @@ const B = /* @__PURE__ */ f({
138
142
  prevNavigatableTab() {
139
143
  const t = this.compTabs.length, {
140
144
  selected: e
141
- } = this.$props, i = e ? e - 1 : -1;
142
- if (i < 0)
145
+ } = this.$props, s = e ? e - 1 : -1;
146
+ if (s < 0)
143
147
  return this.lastNavigatableTab();
144
148
  if (t)
145
- for (let a = i; a > -1; a--) {
149
+ for (let a = s; a > -1; a--) {
146
150
  if (!this.compTabs[a].disabled)
147
151
  return a;
148
152
  if (a === 0)
@@ -152,11 +156,11 @@ const B = /* @__PURE__ */ f({
152
156
  nextNavigatableTab() {
153
157
  const t = this.compTabs.length, {
154
158
  selected: e
155
- } = this.$props, i = e ? e + 1 : 1;
156
- if (i >= t)
159
+ } = this.$props, s = e ? e + 1 : 1;
160
+ if (s >= t)
157
161
  return this.firstNavigatableTab();
158
162
  if (t)
159
- for (let a = i; a < t; a++) {
163
+ for (let a = s; a < t; a++) {
160
164
  if (!this.compTabs[a].disabled)
161
165
  return a;
162
166
  if (a + 1 === t)
@@ -168,7 +172,7 @@ const B = /* @__PURE__ */ f({
168
172
  const {
169
173
  tabPosition: t,
170
174
  tabIndex: e = 0
171
- } = this.$props, i = t === "bottom", a = y("k-widget", "k-pos-relative", "k-tabstrip", {
175
+ } = this.$props, s = t === "bottom", a = y("k-widget", "k-pos-relative", "k-tabstrip", {
172
176
  "k-tabstrip-left": t === "left",
173
177
  "k-tabstrip-right": t === "right",
174
178
  "k-tabstrip-bottom": t === "bottom",
@@ -184,21 +188,23 @@ const B = /* @__PURE__ */ f({
184
188
  selected: r,
185
189
  showAll: this.currentShowAll
186
190
  };
187
- return T(g, {
191
+ return g(T, {
188
192
  ...u
189
193
  }, m);
190
194
  };
191
195
  return n("div", {
192
196
  dir: this.$props.dir,
193
197
  class: a
194
- }, [!i && n(o, {
198
+ }, [!s && n(o, {
195
199
  tabs: this.compTabs,
196
200
  selected: this.$props.selected,
201
+ tabAlignment: this.$props.tabAlignment,
197
202
  onSelect: this.onSelect,
198
203
  onKeydown: this.onKeyDown,
199
204
  tabIndex: e
200
- }, null), b.call(this, this.$props), i && n(o, {
205
+ }, null), b.call(this, this.$props), s && n(o, {
201
206
  tabs: this.compTabs,
207
+ tabAlignment: this.$props.tabAlignment,
202
208
  selected: this.$props.selected,
203
209
  onSelect: this.onSelect,
204
210
  onKeydown: this.onKeyDown,
@@ -207,5 +213,5 @@ const B = /* @__PURE__ */ f({
207
213
  }
208
214
  });
209
215
  export {
210
- B as TabStrip
216
+ K as TabStrip
211
217
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),r=require("./TabStripNavigationItem.js"),l=t=>Array.apply(null,Array(t)),p=s.defineComponent({name:"KendoTabStripNavigation",emits:{select:null,keydown:null},props:{tabs:Array,selected:Number,tabIndex:Number,tabPosition:String,onSelect:Function,onKeydown:Function},computed:{wrapperNavClasses(){return{"k-tabstrip-items-wrapper":!0,"k-hstack":this.$props.tabPosition==="top"||this.$props.tabPosition==="bottom","k-vstack":this.$props.tabPosition==="left"||this.$props.tabPosition==="right"}},navClasses(){return{"k-tabstrip-items":!0,"k-reset":!0}}},render(){const{tabs:t,selected:i}=this.$props,o=t.length,a=function(){return l(o).map(function(c,e,n){return s.createVNode(r.TabStripNavigationItem,{key:e,active:i===e,disabled:t[e].disabled,index:e,title:t[e].title,id:t[e].id,titleRender:t[e].titleRender,first:e===0,last:e===n.length-1,onSelect:this.onNavigationItemSelect},null)},this)};return s.createVNode("div",{class:this.wrapperNavClasses},[s.createVNode("ul",{class:this.navClasses,role:"tablist",tabindex:this.$props.tabIndex,onKeydown:this.onKeyDown},[a.call(this)])])},methods:{onKeyDown(t){this.$emit("keydown",t)},onNavigationItemSelect(t){this.$emit("select",t)}}});exports.TabStripNavigation=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),o=require("./TabStripNavigationItem.js"),p=require("@progress/kendo-vue-common"),l=t=>Array.apply(null,Array(t)),b=s.defineComponent({name:"KendoTabStripNavigation",emits:{select:null,keydown:null},props:{tabs:Array,selected:Number,tabIndex:Number,tabPosition:String,tabAlignment:String,onSelect:Function,onKeydown:Function},computed:{wrapperNavClasses(){return{"k-tabstrip-items-wrapper":!0,"k-hstack":this.$props.tabPosition==="top"||this.$props.tabPosition==="bottom","k-vstack":this.$props.tabPosition==="left"||this.$props.tabPosition==="right"}},navClasses(){return p.classNames("k-tabstrip-items",{"k-tabstrip-items-start":this.$props.tabAlignment==="start","k-tabstrip-items-center":this.$props.tabAlignment==="center","k-tabstrip-items-end":this.$props.tabAlignment==="end","k-tabstrip-items-stretched":this.$props.tabAlignment==="stretched","k-tabstrip-items-justify":this.$props.tabAlignment==="justify"},"k-reset")}},render(){const{tabs:t,selected:i}=this.$props,n=t.length,a=function(){return l(n).map(function(c,e,r){return s.createVNode(o.TabStripNavigationItem,{key:e,active:i===e,disabled:t[e].disabled,index:e,title:t[e].title,id:t[e].id,titleRender:t[e].titleRender,first:e===0,last:e===r.length-1,onSelect:this.onNavigationItemSelect},null)},this)};return s.createVNode("div",{class:this.wrapperNavClasses},[s.createVNode("ul",{class:this.navClasses,role:"tablist",tabindex:this.$props.tabIndex,onKeydown:this.onKeyDown},[a.call(this)])])},methods:{onKeyDown(t){this.$emit("keydown",t)},onNavigationItemSelect(t){this.$emit("select",t)}}});exports.TabStripNavigation=b;
@@ -5,9 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as a, createVNode as s } from "vue";
9
- import { TabStripNavigationItem as l } from "./TabStripNavigationItem.mjs";
10
- const p = (t) => Array.apply(null, Array(t)), u = /* @__PURE__ */ a({
8
+ import { defineComponent as o, createVNode as s } from "vue";
9
+ import { TabStripNavigationItem as p } from "./TabStripNavigationItem.mjs";
10
+ import { classNames as l } from "@progress/kendo-vue-common";
11
+ const m = (t) => Array.apply(null, Array(t)), u = /* @__PURE__ */ o({
11
12
  name: "KendoTabStripNavigation",
12
13
  emits: {
13
14
  select: null,
@@ -18,6 +19,7 @@ const p = (t) => Array.apply(null, Array(t)), u = /* @__PURE__ */ a({
18
19
  selected: Number,
19
20
  tabIndex: Number,
20
21
  tabPosition: String,
22
+ tabAlignment: String,
21
23
  onSelect: Function,
22
24
  onKeydown: Function
23
25
  },
@@ -30,28 +32,31 @@ const p = (t) => Array.apply(null, Array(t)), u = /* @__PURE__ */ a({
30
32
  };
31
33
  },
32
34
  navClasses() {
33
- return {
34
- "k-tabstrip-items": !0,
35
- "k-reset": !0
36
- };
35
+ return l("k-tabstrip-items", {
36
+ "k-tabstrip-items-start": this.$props.tabAlignment === "start",
37
+ "k-tabstrip-items-center": this.$props.tabAlignment === "center",
38
+ "k-tabstrip-items-end": this.$props.tabAlignment === "end",
39
+ "k-tabstrip-items-stretched": this.$props.tabAlignment === "stretched",
40
+ "k-tabstrip-items-justify": this.$props.tabAlignment === "justify"
41
+ }, "k-reset");
37
42
  }
38
43
  },
39
44
  render() {
40
45
  const {
41
46
  tabs: t,
42
- selected: o
43
- } = this.$props, i = t.length, n = function() {
44
- return p(i).map(function(c, e, r) {
45
- return s(l, {
47
+ selected: i
48
+ } = this.$props, n = t.length, r = function() {
49
+ return m(n).map(function(b, e, a) {
50
+ return s(p, {
46
51
  key: e,
47
- active: o === e,
52
+ active: i === e,
48
53
  disabled: t[e].disabled,
49
54
  index: e,
50
55
  title: t[e].title,
51
56
  id: t[e].id,
52
57
  titleRender: t[e].titleRender,
53
58
  first: e === 0,
54
- last: e === r.length - 1,
59
+ last: e === a.length - 1,
55
60
  onSelect: this.onNavigationItemSelect
56
61
  }, null);
57
62
  }, this);
@@ -63,7 +68,7 @@ const p = (t) => Array.apply(null, Array(t)), u = /* @__PURE__ */ a({
63
68
  role: "tablist",
64
69
  tabindex: this.$props.tabIndex,
65
70
  onKeydown: this.onKeyDown
66
- }, [n.call(this)])]);
71
+ }, [r.call(this)])]);
67
72
  },
68
73
  methods: {
69
74
  onKeyDown(t) {