lkt-tabs 1.0.7 → 1.1.0
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.
- package/dist/lkt-tabs.es.js +100 -96
- package/dist/lkt-tabs.umd.js +1 -1
- package/dist/src/components/LktTab.vue.d.ts +121 -0
- package/dist/src/lib-components/LktTabs.vue.d.ts +72 -0
- package/dist/vite.config.d.ts +9 -9
- package/package.json +17 -12
- package/src/components/LktTab.vue +1 -9
- package/src/lib-components/LktTabs.vue +43 -43
- package/dist/types/components/LktTab.vue.d.ts +0 -155
- package/dist/types/lib-components/LktTabs.vue.d.ts +0 -194
- /package/dist/{style.css → lkt-tabs.css} +0 -0
- /package/dist/{types → src}/constants.d.ts +0 -0
- /package/dist/{types → src}/functions/functions.d.ts +0 -0
- /package/dist/{types → src}/index.d.ts +0 -0
package/dist/lkt-tabs.es.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as H, ref as $, computed as c, watch as k, createElementBlock as u, createCommentVNode as A, openBlock as i, renderSlot as v, getCurrentInstance as P, useSlots as j, nextTick as q, normalizeClass as C, withDirectives as y, createElementVNode as L, Fragment as S, renderList as g, withModifiers as V, vShow as F, normalizeStyle as z, createBlock as D, withCtx as E } from "vue";
|
|
2
|
+
import { getSessionStorage as K, setSessionStorage as N } from "lkt-session";
|
|
3
|
+
function U(a = 10) {
|
|
4
|
+
let r = "";
|
|
5
|
+
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", d = t.length;
|
|
6
|
+
for (let s = 0; s < a; s++)
|
|
7
|
+
r += t.charAt(Math.floor(Math.random() * d));
|
|
8
|
+
return r;
|
|
9
|
+
}
|
|
10
|
+
function Y(a) {
|
|
11
|
+
return typeof a == "string";
|
|
12
|
+
}
|
|
13
|
+
const G = ["id"], J = /* @__PURE__ */ H({
|
|
14
|
+
__name: "LktTab",
|
|
12
15
|
props: {
|
|
13
16
|
id: { type: String, default: "" },
|
|
14
17
|
name: { type: String, required: !0 },
|
|
@@ -17,128 +20,129 @@ const B = (a) => `lkt-tabs.${window.location.host}${window.location.pathname}.${
|
|
|
17
20
|
isDisabled: { type: Boolean, default: !1 }
|
|
18
21
|
},
|
|
19
22
|
emits: ["is-active"],
|
|
20
|
-
setup(a, { emit:
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
+
setup(a, { emit: r }) {
|
|
24
|
+
const t = a, d = r, s = $(!1), p = $(U(8)), o = c(() => t.id ? t.id : Y(t.name) && t.name.length > 0 ? t.name.toLowerCase().replace(/ /g, "-") : p.value), h = () => {
|
|
25
|
+
s.value = t.activeHash === t.hash, d("is-active", s.value);
|
|
23
26
|
};
|
|
24
|
-
return
|
|
27
|
+
return k(() => t.activeHash, h), h(), (m, f) => s.value ? (i(), u("section", {
|
|
25
28
|
key: 0,
|
|
26
29
|
"data-lkt": "tab-content",
|
|
27
|
-
id:
|
|
30
|
+
id: o.value,
|
|
28
31
|
role: "tabpanel"
|
|
29
32
|
}, [
|
|
30
|
-
|
|
31
|
-
], 8,
|
|
33
|
+
v(m.$slots, "default")
|
|
34
|
+
], 8, G)) : A("", !0);
|
|
32
35
|
}
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
components: { LktTab: A }
|
|
38
|
-
}, st = /* @__PURE__ */ H({
|
|
39
|
-
...et,
|
|
36
|
+
}), B = (a) => `lkt-tabs.${window.location.host}${window.location.pathname}.${a}`, Q = (a) => K(B(a)), R = (a, r, t) => {
|
|
37
|
+
N(B(a), r, t * 60);
|
|
38
|
+
}, W = { class: "lkt-tabs__list" }, X = ["href", "onClick"], Z = ["innerHTML", "onClick", "href"], ee = { "data-lkt": "tab" }, te = /* @__PURE__ */ H({
|
|
39
|
+
__name: "LktTabs",
|
|
40
40
|
props: {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
modelValue: { default: "" },
|
|
42
|
+
id: { default: "" },
|
|
43
43
|
useSession: { type: Boolean, default: !1 },
|
|
44
|
-
cacheLifetime: {
|
|
45
|
-
contentPad: {
|
|
46
|
-
|
|
47
|
-
titles: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default() {
|
|
50
|
-
return {};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
44
|
+
cacheLifetime: { default: 5 },
|
|
45
|
+
contentPad: { default: "" },
|
|
46
|
+
titles: { default: () => ({}) }
|
|
53
47
|
},
|
|
54
|
-
emits: [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
emits: [
|
|
49
|
+
"update:modelValue"
|
|
50
|
+
],
|
|
51
|
+
setup(a, { emit: r }) {
|
|
52
|
+
const { ctx: t } = P(), d = j(), s = a, p = r, o = $("");
|
|
53
|
+
if (s.useSession) {
|
|
54
|
+
s.id || console.warn("[LKT Tabs] You're trying to use session provided tabs without the required id. Please, add id attr");
|
|
55
|
+
let e = Q(s.id);
|
|
56
|
+
e && (o.value = e);
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
typeof
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}),
|
|
58
|
+
k(() => s.modelValue, (e, l) => {
|
|
59
|
+
typeof e == "string" && (o.value = e);
|
|
60
|
+
}), k(o, (e, l) => {
|
|
61
|
+
p("update:modelValue"), q(() => {
|
|
62
|
+
t.$forceUpdate();
|
|
63
|
+
}), s.useSession && R(t.id, e, s.cacheLifetime);
|
|
68
64
|
});
|
|
69
|
-
const m =
|
|
70
|
-
let
|
|
71
|
-
return
|
|
72
|
-
}),
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return
|
|
80
|
-
}),
|
|
81
|
-
|
|
65
|
+
const h = c(() => [].join(" ")), m = c(() => {
|
|
66
|
+
let e = [];
|
|
67
|
+
return s.contentPad && e.push(`padding: ${s.contentPad}`), e.join(";");
|
|
68
|
+
}), f = c(() => {
|
|
69
|
+
let e = [];
|
|
70
|
+
for (let l in d) l.indexOf("tab-") !== -1 && e.push(l);
|
|
71
|
+
return e;
|
|
72
|
+
}), x = c(() => {
|
|
73
|
+
let e = [];
|
|
74
|
+
for (let l in d) l.indexOf("title-") !== -1 && e.push(l);
|
|
75
|
+
return e;
|
|
76
|
+
}), I = c(() => {
|
|
77
|
+
let e = [];
|
|
78
|
+
for (let l in d) l.indexOf("li-") !== -1 && e.push(l);
|
|
79
|
+
return e;
|
|
80
|
+
}), b = c(() => {
|
|
81
|
+
let e = {};
|
|
82
|
+
for (let l in t.$refs)
|
|
83
|
+
e[l] = t.$refs[l].hash;
|
|
84
|
+
return e;
|
|
85
|
+
}), M = c(() => Object.keys(f.value).length > 1), T = (e = "") => b.value.length > 0 && b.value[e] ? "#" + b.value[e] : "#", w = (e = "") => s.titles && s.titles[e] ? s.titles[e] : e, O = () => {
|
|
86
|
+
t.$forceUpdate();
|
|
82
87
|
};
|
|
83
|
-
for (let
|
|
84
|
-
o.value === "" && (o.value =
|
|
85
|
-
return (
|
|
86
|
-
class: C(["lkt-tabs",
|
|
88
|
+
for (let e in f.value)
|
|
89
|
+
o.value === "" && (o.value = e);
|
|
90
|
+
return (e, l) => (i(), u("div", {
|
|
91
|
+
class: C(["lkt-tabs", h.value])
|
|
87
92
|
}, [
|
|
88
|
-
|
|
89
|
-
(
|
|
90
|
-
key:
|
|
91
|
-
class: C(["lkt-tab", { "is-active":
|
|
93
|
+
y(L("ul", W, [
|
|
94
|
+
(i(!0), u(S, null, g(f.value, (n) => (i(), u("li", {
|
|
95
|
+
key: n,
|
|
96
|
+
class: C(["lkt-tab", { "is-active": n === o.value }]),
|
|
92
97
|
role: "presentation"
|
|
93
98
|
}, [
|
|
94
|
-
|
|
99
|
+
x.value.includes(n) ? (i(), u("a", {
|
|
95
100
|
key: 0,
|
|
96
|
-
href:
|
|
97
|
-
onClick: V((
|
|
101
|
+
href: T(n),
|
|
102
|
+
onClick: V((_) => o.value = n, ["prevent"]),
|
|
98
103
|
role: "tab"
|
|
99
104
|
}, [
|
|
100
|
-
|
|
101
|
-
], 8, X)) : (
|
|
105
|
+
v(e.$slots, "title-" + n)
|
|
106
|
+
], 8, X)) : (i(), u("a", {
|
|
102
107
|
key: 1,
|
|
103
|
-
innerHTML: w(
|
|
104
|
-
onClick: V((
|
|
105
|
-
href:
|
|
108
|
+
innerHTML: w(n),
|
|
109
|
+
onClick: V((_) => o.value = n, ["prevent"]),
|
|
110
|
+
href: T(n),
|
|
106
111
|
role: "tab"
|
|
107
112
|
}, null, 8, Z))
|
|
108
113
|
], 2))), 128)),
|
|
109
|
-
(
|
|
110
|
-
|
|
114
|
+
(i(!0), u(S, null, g(I.value, (n, _) => (i(), u("li", ee, [
|
|
115
|
+
v(e.$slots, "li-" + _)
|
|
111
116
|
]))), 256))
|
|
112
117
|
], 512), [
|
|
113
|
-
[
|
|
118
|
+
[F, M.value]
|
|
114
119
|
]),
|
|
115
|
-
|
|
120
|
+
L("div", {
|
|
116
121
|
class: "lkt-tabs__content",
|
|
117
|
-
style:
|
|
122
|
+
style: z(m.value)
|
|
118
123
|
}, [
|
|
119
|
-
(
|
|
124
|
+
(i(!0), u(S, null, g(f.value, (n) => (i(), D(J, {
|
|
120
125
|
ref_for: !0,
|
|
121
|
-
ref:
|
|
122
|
-
hash:
|
|
123
|
-
id:
|
|
124
|
-
name: w(
|
|
126
|
+
ref: n,
|
|
127
|
+
hash: n,
|
|
128
|
+
id: n,
|
|
129
|
+
name: w(n),
|
|
125
130
|
"active-hash": o.value,
|
|
126
|
-
onIsActive:
|
|
131
|
+
onIsActive: O
|
|
127
132
|
}, {
|
|
128
|
-
default:
|
|
129
|
-
|
|
133
|
+
default: E(() => [
|
|
134
|
+
v(e.$slots, "tab-" + n)
|
|
130
135
|
]),
|
|
131
136
|
_: 2
|
|
132
137
|
}, 1032, ["hash", "id", "name", "active-hash"]))), 256))
|
|
133
138
|
], 4)
|
|
134
139
|
], 2));
|
|
135
140
|
}
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
a.component("lkt-tabs", st);
|
|
141
|
+
}), ae = {
|
|
142
|
+
install: (a, r) => {
|
|
143
|
+
a.component("lkt-tabs", te);
|
|
140
144
|
}
|
|
141
145
|
};
|
|
142
146
|
export {
|
|
143
|
-
|
|
147
|
+
ae as default
|
|
144
148
|
};
|
package/dist/lkt-tabs.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue"),require("lkt-session")):typeof define=="function"&&define.amd?define(["vue","lkt-session"],d):(e=typeof globalThis<"u"?globalThis:e||self,e.LktTabs=d(e.Vue,e.LktSession))})(this,function(e,d){"use strict";function B(l=10){let i="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",c=n.length;for(let o=0;o<l;o++)i+=n.charAt(Math.floor(Math.random()*c));return i}function g(l){return typeof l=="string"}const T=["id"],L=e.defineComponent({__name:"LktTab",props:{id:{type:String,default:""},name:{type:String,required:!0},hash:{type:String,default:""},activeHash:{type:String,default:""},isDisabled:{type:Boolean,default:!1}},emits:["is-active"],setup(l,{emit:i}){const n=l,c=i,o=e.ref(!1),p=e.ref(B(8)),r=e.computed(()=>n.id?n.id:g(n.name)&&n.name.length>0?n.name.toLowerCase().replace(/ /g,"-"):p.value),u=()=>{o.value=n.activeHash===n.hash,c("is-active",o.value)};return e.watch(()=>n.activeHash,u),u(),(m,f)=>o.value?(e.openBlock(),e.createElementBlock("section",{key:0,"data-lkt":"tab-content",id:r.value,role:"tabpanel"},[e.renderSlot(m.$slots,"default")],8,T)):e.createCommentVNode("",!0)}}),b=l=>`lkt-tabs.${window.location.host}${window.location.pathname}.${l}`,$=l=>d.getSessionStorage(b(l)),w=(l,i,n)=>{d.setSessionStorage(b(l),i,n*60)},C={class:"lkt-tabs__list"},E=["href","onClick"],V=["innerHTML","onClick","href"],H={"data-lkt":"tab"},x=e.defineComponent({__name:"LktTabs",props:{modelValue:{default:""},id:{default:""},useSession:{type:Boolean,default:!1},cacheLifetime:{default:5},contentPad:{default:""},titles:{default:()=>({})}},emits:["update:modelValue"],setup(l,{emit:i}){const{ctx:n}=e.getCurrentInstance(),c=e.useSlots(),o=l,p=i,r=e.ref("");if(o.useSession){o.id||console.warn("[LKT Tabs] You're trying to use session provided tabs without the required id. Please, add id attr");let t=$(o.id);t&&(r.value=t)}e.watch(()=>o.modelValue,(t,a)=>{typeof t=="string"&&(r.value=t)}),e.watch(r,(t,a)=>{p("update:modelValue"),e.nextTick(()=>{n.$forceUpdate()}),o.useSession&&w(n.id,t,o.cacheLifetime)});const u=e.computed(()=>[].join(" ")),m=e.computed(()=>{let t=[];return o.contentPad&&t.push(`padding: ${o.contentPad}`),t.join(";")}),f=e.computed(()=>{let t=[];for(let a in c)a.indexOf("tab-")!==-1&&t.push(a);return t}),M=e.computed(()=>{let t=[];for(let a in c)a.indexOf("title-")!==-1&&t.push(a);return t}),q=e.computed(()=>{let t=[];for(let a in c)a.indexOf("li-")!==-1&&t.push(a);return t}),h=e.computed(()=>{let t={};for(let a in n.$refs)t[a]=n.$refs[a].hash;return t}),y=e.computed(()=>Object.keys(f.value).length>1),S=(t="")=>h.value.length>0&&h.value[t]?"#"+h.value[t]:"#",_=(t="")=>o.titles&&o.titles[t]?o.titles[t]:t,F=()=>{n.$forceUpdate()};for(let t in f.value)r.value===""&&(r.value=t);return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["lkt-tabs",u.value])},[e.withDirectives(e.createElementVNode("ul",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,s=>(e.openBlock(),e.createElementBlock("li",{key:s,class:e.normalizeClass(["lkt-tab",{"is-active":s===r.value}]),role:"presentation"},[M.value.includes(s)?(e.openBlock(),e.createElementBlock("a",{key:0,href:S(s),onClick:e.withModifiers(k=>r.value=s,["prevent"]),role:"tab"},[e.renderSlot(t.$slots,"title-"+s)],8,E)):(e.openBlock(),e.createElementBlock("a",{key:1,innerHTML:_(s),onClick:e.withModifiers(k=>r.value=s,["prevent"]),href:S(s),role:"tab"},null,8,V))],2))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(s,k)=>(e.openBlock(),e.createElementBlock("li",H,[e.renderSlot(t.$slots,"li-"+k)]))),256))],512),[[e.vShow,y.value]]),e.createElementVNode("div",{class:"lkt-tabs__content",style:e.normalizeStyle(m.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,s=>(e.openBlock(),e.createBlock(L,{ref_for:!0,ref:s,hash:s,id:s,name:_(s),"active-hash":r.value,onIsActive:F},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"tab-"+s)]),_:2},1032,["hash","id","name","active-hash"]))),256))],4)],2))}});return{install:(l,i)=>{l.component("lkt-tabs",x)}}});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
declare const isActive: import("vue").Ref<boolean, boolean>;
|
|
2
|
+
declare const computedId: import("vue").ComputedRef<string>;
|
|
3
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
}>;
|
|
8
|
+
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
id: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
hash: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
activeHash: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
isDisabled: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
30
|
+
isActive: typeof isActive;
|
|
31
|
+
computedId: typeof computedId;
|
|
32
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"is-active": (...args: any[]) => void;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
id: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
name: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
hash: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
activeHash: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
isDisabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{
|
|
56
|
+
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
id: string;
|
|
59
|
+
hash: string;
|
|
60
|
+
activeHash: string;
|
|
61
|
+
isDisabled: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
64
|
+
id: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
name: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
required: true;
|
|
71
|
+
};
|
|
72
|
+
hash: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
activeHash: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
isDisabled: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
|
+
"is-active": (...args: any[]) => void;
|
|
86
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
|
+
id: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
name: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
required: true;
|
|
94
|
+
};
|
|
95
|
+
hash: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
activeHash: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
isDisabled: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
}>> & Readonly<{
|
|
108
|
+
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
109
|
+
}>, {
|
|
110
|
+
id: string;
|
|
111
|
+
hash: string;
|
|
112
|
+
activeHash: string;
|
|
113
|
+
isDisabled: boolean;
|
|
114
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
115
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
116
|
+
export default _default;
|
|
117
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
118
|
+
new (): {
|
|
119
|
+
$slots: S;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import LktTab from "../components/LktTab.vue";
|
|
2
|
+
import { LktObject } from "lkt-vue-kernel";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue: string | number;
|
|
5
|
+
id?: string;
|
|
6
|
+
useSession?: boolean;
|
|
7
|
+
cacheLifetime?: number;
|
|
8
|
+
contentPad?: string;
|
|
9
|
+
titles?: LktObject;
|
|
10
|
+
};
|
|
11
|
+
declare const Value: import("vue").Ref<string, string>;
|
|
12
|
+
declare const classes: import("vue").ComputedRef<string>;
|
|
13
|
+
declare const contentStyles: import("vue").ComputedRef<string>;
|
|
14
|
+
declare const tabsSlots: import("vue").ComputedRef<string[]>;
|
|
15
|
+
declare const titlesSlots: import("vue").ComputedRef<string[]>;
|
|
16
|
+
declare const liSlots: import("vue").ComputedRef<string[]>;
|
|
17
|
+
declare const displayButtons: import("vue").ComputedRef<boolean>;
|
|
18
|
+
declare const getTabHref: (key?: string | number) => string;
|
|
19
|
+
declare const getTabTitle: (key?: string | number) => any;
|
|
20
|
+
declare const refresh: () => void;
|
|
21
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
22
|
+
declare var __VLS_2: string, __VLS_3: {}, __VLS_6: string, __VLS_7: {}, __VLS_17: string, __VLS_18: {};
|
|
23
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
24
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
25
|
+
} & {
|
|
26
|
+
[K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
|
|
27
|
+
} & {
|
|
28
|
+
[K in NonNullable<typeof __VLS_17>]?: (props: typeof __VLS_18) => any;
|
|
29
|
+
}>;
|
|
30
|
+
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
31
|
+
LktTab: typeof LktTab;
|
|
32
|
+
Value: typeof Value;
|
|
33
|
+
classes: typeof classes;
|
|
34
|
+
contentStyles: typeof contentStyles;
|
|
35
|
+
tabsSlots: typeof tabsSlots;
|
|
36
|
+
titlesSlots: typeof titlesSlots;
|
|
37
|
+
liSlots: typeof liSlots;
|
|
38
|
+
displayButtons: typeof displayButtons;
|
|
39
|
+
getTabHref: typeof getTabHref;
|
|
40
|
+
getTabTitle: typeof getTabTitle;
|
|
41
|
+
refresh: typeof refresh;
|
|
42
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
"update:modelValue": (...args: any[]) => void;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
45
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
id: string;
|
|
48
|
+
modelValue: string | number;
|
|
49
|
+
useSession: boolean;
|
|
50
|
+
cacheLifetime: number;
|
|
51
|
+
contentPad: string;
|
|
52
|
+
titles: LktObject;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
55
|
+
"update:modelValue": (...args: any[]) => void;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
57
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
}>, {
|
|
59
|
+
id: string;
|
|
60
|
+
modelValue: string | number;
|
|
61
|
+
useSession: boolean;
|
|
62
|
+
cacheLifetime: number;
|
|
63
|
+
contentPad: string;
|
|
64
|
+
titles: LktObject;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
package/dist/vite.config.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
|
|
2
|
+
let plugins: import("vite").Plugin<import("@vitejs/plugin-vue").Api>[];
|
|
3
3
|
namespace resolve {
|
|
4
|
-
|
|
4
|
+
let alias: {
|
|
5
5
|
'@': string;
|
|
6
6
|
'@test': string;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
namespace build {
|
|
10
10
|
export namespace lib {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
let entry: string;
|
|
12
|
+
let name: string;
|
|
13
13
|
function fileName(format: any): string;
|
|
14
14
|
}
|
|
15
15
|
export { outDir };
|
|
16
|
-
export
|
|
16
|
+
export let minify: boolean;
|
|
17
17
|
export namespace rollupOptions {
|
|
18
|
-
|
|
18
|
+
let external: string[];
|
|
19
19
|
namespace output {
|
|
20
|
-
|
|
20
|
+
let globals: {
|
|
21
21
|
vue: string;
|
|
22
22
|
"lkt-tools": string;
|
|
23
23
|
"lkt-events": string;
|
|
24
24
|
"lkt-session": string;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
let sourcemapExcludeSources: boolean;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
namespace test {
|
|
31
31
|
namespace coverage {
|
|
32
|
-
|
|
32
|
+
let reporter: string[];
|
|
33
33
|
}
|
|
34
34
|
function resolveSnapshotPath(testPath: any, snapExtension: any): string;
|
|
35
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lkt-tabs",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"module": "src/index.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"import": "./dist/lkt-tabs.es.js",
|
|
16
16
|
"require": "./dist/lkt-tabs.umd.js"
|
|
17
17
|
},
|
|
18
|
-
"./dist/style.css": "./dist/
|
|
18
|
+
"./dist/style.css": "./dist/lkt-tabs.css",
|
|
19
19
|
"./theme": "./theme/default.css",
|
|
20
20
|
"./theme/default": "./theme/default.css"
|
|
21
21
|
},
|
|
@@ -29,19 +29,24 @@
|
|
|
29
29
|
"test-coverage": "vitest run --coverage"
|
|
30
30
|
},
|
|
31
31
|
"author": "Antonio Ibáñez",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18"
|
|
34
|
+
},
|
|
32
35
|
"devDependencies": {
|
|
33
|
-
"@babel/types": "^7.
|
|
34
|
-
"@types/node": "^
|
|
35
|
-
"@
|
|
36
|
-
"vue
|
|
36
|
+
"@babel/types": "^7.23.6",
|
|
37
|
+
"@types/node": "^20.11.19",
|
|
38
|
+
"@types/rollup": "^0.54.0",
|
|
39
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
40
|
+
"rollup": "^4.34.8",
|
|
41
|
+
"typescript": "^5.7.3",
|
|
42
|
+
"vite": "^6.1.1",
|
|
43
|
+
"vue": "^3.3.0",
|
|
44
|
+
"vue-tsc": "^2.2.0"
|
|
37
45
|
},
|
|
38
|
-
"
|
|
39
|
-
"lkt-events": "^1.0.4",
|
|
46
|
+
"peerDependencies": {
|
|
40
47
|
"lkt-session": "^1.0.6",
|
|
41
|
-
"lkt-tools": "^1.0.
|
|
48
|
+
"lkt-string-tools": "^1.0.8",
|
|
49
|
+
"lkt-vue-kernel": "^1.0.32",
|
|
42
50
|
"vue": "^3.0.5"
|
|
43
|
-
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=12"
|
|
46
51
|
}
|
|
47
52
|
}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export default {
|
|
3
|
-
name: "LktTab",
|
|
4
|
-
inheritAttrs: false,
|
|
5
|
-
customOptions: {},
|
|
6
|
-
};
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
1
|
<script lang="ts" setup>
|
|
10
2
|
import {computed, ref, watch} from "vue";
|
|
11
|
-
import {generateRandomString, isString} from "lkt-tools";
|
|
3
|
+
import {generateRandomString, isString} from "lkt-string-tools";
|
|
12
4
|
|
|
13
5
|
const props = defineProps({
|
|
14
6
|
id: {type: String, default: ''},
|
|
@@ -1,46 +1,41 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import LktTab from "../components/LktTab.vue";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
name: 'LktTabs',
|
|
6
|
-
inheritAttrs: false,
|
|
7
|
-
customOptions: {},
|
|
8
|
-
components: {LktTab}
|
|
9
|
-
};
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
1
|
<script lang="ts" setup>
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
2
|
+
import LktTab from "../components/LktTab.vue";
|
|
3
|
+
import {computed, getCurrentInstance, nextTick, ref, useSlots, watch} from 'vue';
|
|
15
4
|
import {loadSelectedTabFromSession, setSelectedTabFromSession} from "../functions/functions";
|
|
5
|
+
import {LktObject} from "lkt-vue-kernel";
|
|
16
6
|
|
|
17
7
|
const {ctx: _this}: any = getCurrentInstance();
|
|
18
8
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
9
|
+
const slots = useSlots();
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<{
|
|
12
|
+
modelValue: string|number
|
|
13
|
+
id?: string
|
|
14
|
+
useSession?: boolean
|
|
15
|
+
cacheLifetime?: number
|
|
16
|
+
contentPad?: string
|
|
17
|
+
titles?: LktObject
|
|
18
|
+
}>(), {
|
|
19
|
+
modelValue: '',
|
|
20
|
+
id: '',
|
|
21
|
+
useSession: false,
|
|
22
|
+
cacheLifetime: 5,
|
|
23
|
+
contentPad: '',
|
|
24
|
+
titles: () => ({}),
|
|
32
25
|
});
|
|
33
26
|
|
|
34
|
-
const emit = defineEmits([
|
|
27
|
+
const emit = defineEmits([
|
|
28
|
+
'update:modelValue'
|
|
29
|
+
])
|
|
35
30
|
|
|
36
31
|
const Value = ref('');
|
|
37
32
|
|
|
38
33
|
if (props.useSession) {
|
|
39
|
-
if (!
|
|
34
|
+
if (!props.id) {
|
|
40
35
|
console.warn('[LKT Tabs] You\'re trying to use session provided tabs without the required id. Please, add id attr');
|
|
41
36
|
}
|
|
42
37
|
|
|
43
|
-
let sessionVal = loadSelectedTabFromSession(
|
|
38
|
+
let sessionVal = loadSelectedTabFromSession(props.id);
|
|
44
39
|
if (sessionVal) Value.value = sessionVal;
|
|
45
40
|
}
|
|
46
41
|
|
|
@@ -52,7 +47,7 @@ watch(() => props.modelValue, (newVal, oldVal) => {
|
|
|
52
47
|
|
|
53
48
|
watch(Value, (newVal, oldVal) => {
|
|
54
49
|
emit('update:modelValue');
|
|
55
|
-
|
|
50
|
+
nextTick(() => {
|
|
56
51
|
_this.$forceUpdate()
|
|
57
52
|
});
|
|
58
53
|
if (props.useSession) {
|
|
@@ -61,8 +56,7 @@ watch(Value, (newVal, oldVal) => {
|
|
|
61
56
|
})
|
|
62
57
|
|
|
63
58
|
const classes = computed(() => {
|
|
64
|
-
let r = [];
|
|
65
|
-
if (!!props.palette) r.push(`lkt-tabs--${props.palette}`);
|
|
59
|
+
let r: Array<string> = [];
|
|
66
60
|
return r.join(' ');
|
|
67
61
|
});
|
|
68
62
|
|
|
@@ -73,19 +67,25 @@ const contentStyles = computed(() => {
|
|
|
73
67
|
});
|
|
74
68
|
|
|
75
69
|
const tabsSlots = computed(() => {
|
|
76
|
-
|
|
70
|
+
let r: string[] = [];
|
|
71
|
+
for (let k in slots) if (k.indexOf('tab-') !== -1) r.push(k);
|
|
72
|
+
return r;
|
|
77
73
|
});
|
|
78
74
|
|
|
79
75
|
const titlesSlots = computed(() => {
|
|
80
|
-
|
|
76
|
+
let r: string[] = [];
|
|
77
|
+
for (let k in slots) if (k.indexOf('title-') !== -1) r.push(k);
|
|
78
|
+
return r;
|
|
81
79
|
});
|
|
82
80
|
|
|
83
81
|
const liSlots = computed(() => {
|
|
84
|
-
|
|
82
|
+
let r: string[] = [];
|
|
83
|
+
for (let k in slots) if (k.indexOf('li-') !== -1) r.push(k);
|
|
84
|
+
return r;
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
const tabsHref = computed(() => {
|
|
88
|
-
let r:
|
|
88
|
+
let r: LktObject = {};
|
|
89
89
|
for (let k in _this.$refs) {
|
|
90
90
|
r[k] = _this.$refs[k].hash;
|
|
91
91
|
}
|
|
@@ -97,14 +97,14 @@ const displayButtons = computed(() => {
|
|
|
97
97
|
return Object.keys(tabsSlots.value).length > 1;
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
-
const getTabHref = (key: string = '') => {
|
|
100
|
+
const getTabHref = (key: string|number = '') => {
|
|
101
101
|
if (tabsHref.value.length > 0 && tabsHref.value[key]) {
|
|
102
102
|
return '#' + tabsHref.value[key];
|
|
103
103
|
}
|
|
104
104
|
return '#';
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
const getTabTitle = (key: string = '') => {
|
|
107
|
+
const getTabTitle = (key: string|number = '') => {
|
|
108
108
|
if (props.titles && props.titles[key]) return props.titles[key];
|
|
109
109
|
return key;
|
|
110
110
|
}
|
|
@@ -123,18 +123,18 @@ for (let k in tabsSlots.value) {
|
|
|
123
123
|
<div class="lkt-tabs" v-bind:class="classes">
|
|
124
124
|
<ul class="lkt-tabs__list" v-show="displayButtons">
|
|
125
125
|
<li
|
|
126
|
-
v-for="
|
|
126
|
+
v-for="key in tabsSlots"
|
|
127
127
|
v-bind:key="key"
|
|
128
128
|
class="lkt-tab"
|
|
129
129
|
v-bind:class="{'is-active': key === Value}"
|
|
130
130
|
role="presentation"
|
|
131
131
|
>
|
|
132
|
-
<template v-if="
|
|
132
|
+
<template v-if="titlesSlots.includes(key)">
|
|
133
133
|
<a v-bind:href="getTabHref(key)"
|
|
134
134
|
v-on:click.prevent="Value = key"
|
|
135
135
|
role="tab"
|
|
136
136
|
>
|
|
137
|
-
<slot v-bind:name="'title-' + key"
|
|
137
|
+
<slot v-bind:name="'title-' + key"/>
|
|
138
138
|
</a>
|
|
139
139
|
</template>
|
|
140
140
|
<template v-else>
|
|
@@ -151,7 +151,7 @@ for (let k in tabsSlots.value) {
|
|
|
151
151
|
</ul>
|
|
152
152
|
<div class="lkt-tabs__content" v-bind:style="contentStyles">
|
|
153
153
|
<lkt-tab
|
|
154
|
-
v-for="
|
|
154
|
+
v-for="key in tabsSlots"
|
|
155
155
|
v-bind:ref="key"
|
|
156
156
|
v-bind:hash="key"
|
|
157
157
|
v-bind:id="key"
|
|
@@ -159,7 +159,7 @@ for (let k in tabsSlots.value) {
|
|
|
159
159
|
v-bind:active-hash="Value"
|
|
160
160
|
v-on:is-active="refresh"
|
|
161
161
|
>
|
|
162
|
-
<slot v-bind:name="'tab-' + key"
|
|
162
|
+
<slot v-bind:name="'tab-' + key"/>
|
|
163
163
|
</lkt-tab>
|
|
164
164
|
</div>
|
|
165
165
|
</div>
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
new (...args: any[]): {
|
|
3
|
-
$: import("vue").ComponentInternalInstance;
|
|
4
|
-
$data: {};
|
|
5
|
-
$props: Partial<{
|
|
6
|
-
id: string;
|
|
7
|
-
hash: string;
|
|
8
|
-
activeHash: string;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
id: {
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
name: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
hash: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
activeHash: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
isDisabled: {
|
|
28
|
-
type: BooleanConstructor;
|
|
29
|
-
default: boolean;
|
|
30
|
-
};
|
|
31
|
-
}>> & {
|
|
32
|
-
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "id" | "hash" | "activeHash" | "isDisabled">;
|
|
34
|
-
$attrs: {
|
|
35
|
-
[x: string]: unknown;
|
|
36
|
-
};
|
|
37
|
-
$refs: {
|
|
38
|
-
[x: string]: unknown;
|
|
39
|
-
};
|
|
40
|
-
$slots: Readonly<{
|
|
41
|
-
[name: string]: import("vue").Slot | undefined;
|
|
42
|
-
}>;
|
|
43
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
44
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
45
|
-
$emit: (event: "is-active", ...args: any[]) => void;
|
|
46
|
-
$el: any;
|
|
47
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
-
id: {
|
|
49
|
-
type: StringConstructor;
|
|
50
|
-
default: string;
|
|
51
|
-
};
|
|
52
|
-
name: {
|
|
53
|
-
type: StringConstructor;
|
|
54
|
-
required: true;
|
|
55
|
-
};
|
|
56
|
-
hash: {
|
|
57
|
-
type: StringConstructor;
|
|
58
|
-
default: string;
|
|
59
|
-
};
|
|
60
|
-
activeHash: {
|
|
61
|
-
type: StringConstructor;
|
|
62
|
-
default: string;
|
|
63
|
-
};
|
|
64
|
-
isDisabled: {
|
|
65
|
-
type: BooleanConstructor;
|
|
66
|
-
default: boolean;
|
|
67
|
-
};
|
|
68
|
-
}>> & {
|
|
69
|
-
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
70
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "is-active"[], string, {
|
|
71
|
-
id: string;
|
|
72
|
-
hash: string;
|
|
73
|
-
activeHash: string;
|
|
74
|
-
isDisabled: boolean;
|
|
75
|
-
}> & {
|
|
76
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
77
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
78
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
79
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
80
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
81
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
82
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
83
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
84
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
85
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
86
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
87
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
88
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
89
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
90
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
91
|
-
};
|
|
92
|
-
$forceUpdate: () => void;
|
|
93
|
-
$nextTick: typeof import("vue").nextTick;
|
|
94
|
-
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
95
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
96
|
-
id: {
|
|
97
|
-
type: StringConstructor;
|
|
98
|
-
default: string;
|
|
99
|
-
};
|
|
100
|
-
name: {
|
|
101
|
-
type: StringConstructor;
|
|
102
|
-
required: true;
|
|
103
|
-
};
|
|
104
|
-
hash: {
|
|
105
|
-
type: StringConstructor;
|
|
106
|
-
default: string;
|
|
107
|
-
};
|
|
108
|
-
activeHash: {
|
|
109
|
-
type: StringConstructor;
|
|
110
|
-
default: string;
|
|
111
|
-
};
|
|
112
|
-
isDisabled: {
|
|
113
|
-
type: BooleanConstructor;
|
|
114
|
-
default: boolean;
|
|
115
|
-
};
|
|
116
|
-
}>> & {
|
|
117
|
-
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
118
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
119
|
-
__isFragment?: undefined;
|
|
120
|
-
__isTeleport?: undefined;
|
|
121
|
-
__isSuspense?: undefined;
|
|
122
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
-
id: {
|
|
124
|
-
type: StringConstructor;
|
|
125
|
-
default: string;
|
|
126
|
-
};
|
|
127
|
-
name: {
|
|
128
|
-
type: StringConstructor;
|
|
129
|
-
required: true;
|
|
130
|
-
};
|
|
131
|
-
hash: {
|
|
132
|
-
type: StringConstructor;
|
|
133
|
-
default: string;
|
|
134
|
-
};
|
|
135
|
-
activeHash: {
|
|
136
|
-
type: StringConstructor;
|
|
137
|
-
default: string;
|
|
138
|
-
};
|
|
139
|
-
isDisabled: {
|
|
140
|
-
type: BooleanConstructor;
|
|
141
|
-
default: boolean;
|
|
142
|
-
};
|
|
143
|
-
}>> & {
|
|
144
|
-
"onIs-active"?: ((...args: any[]) => any) | undefined;
|
|
145
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "is-active"[], "is-active", {
|
|
146
|
-
id: string;
|
|
147
|
-
hash: string;
|
|
148
|
-
activeHash: string;
|
|
149
|
-
isDisabled: boolean;
|
|
150
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
151
|
-
$slots: {
|
|
152
|
-
default: (_: {}) => any;
|
|
153
|
-
};
|
|
154
|
-
});
|
|
155
|
-
export default _default;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
new (...args: any[]): {
|
|
3
|
-
$: import("vue").ComponentInternalInstance;
|
|
4
|
-
$data: {};
|
|
5
|
-
$props: Partial<{
|
|
6
|
-
id: string;
|
|
7
|
-
modelValue: string | number;
|
|
8
|
-
useSession: boolean;
|
|
9
|
-
cacheLifetime: number;
|
|
10
|
-
contentPad: string;
|
|
11
|
-
palette: string;
|
|
12
|
-
titles: Record<string, any>;
|
|
13
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
-
id: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
default: string;
|
|
17
|
-
};
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
20
|
-
default: string;
|
|
21
|
-
};
|
|
22
|
-
useSession: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
cacheLifetime: {
|
|
27
|
-
type: NumberConstructor;
|
|
28
|
-
default: number;
|
|
29
|
-
};
|
|
30
|
-
contentPad: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
default: undefined;
|
|
33
|
-
};
|
|
34
|
-
palette: {
|
|
35
|
-
type: StringConstructor;
|
|
36
|
-
default: undefined;
|
|
37
|
-
};
|
|
38
|
-
titles: {
|
|
39
|
-
type: ObjectConstructor;
|
|
40
|
-
default(): {};
|
|
41
|
-
};
|
|
42
|
-
}>> & {
|
|
43
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "id" | "modelValue" | "useSession" | "cacheLifetime" | "contentPad" | "palette" | "titles">;
|
|
45
|
-
$attrs: {
|
|
46
|
-
[x: string]: unknown;
|
|
47
|
-
};
|
|
48
|
-
$refs: {
|
|
49
|
-
[x: string]: unknown;
|
|
50
|
-
};
|
|
51
|
-
$slots: Readonly<{
|
|
52
|
-
[name: string]: import("vue").Slot | undefined;
|
|
53
|
-
}>;
|
|
54
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
55
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
56
|
-
$emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
57
|
-
$el: any;
|
|
58
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
-
id: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default: string;
|
|
62
|
-
};
|
|
63
|
-
modelValue: {
|
|
64
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
65
|
-
default: string;
|
|
66
|
-
};
|
|
67
|
-
useSession: {
|
|
68
|
-
type: BooleanConstructor;
|
|
69
|
-
default: boolean;
|
|
70
|
-
};
|
|
71
|
-
cacheLifetime: {
|
|
72
|
-
type: NumberConstructor;
|
|
73
|
-
default: number;
|
|
74
|
-
};
|
|
75
|
-
contentPad: {
|
|
76
|
-
type: StringConstructor;
|
|
77
|
-
default: undefined;
|
|
78
|
-
};
|
|
79
|
-
palette: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: undefined;
|
|
82
|
-
};
|
|
83
|
-
titles: {
|
|
84
|
-
type: ObjectConstructor;
|
|
85
|
-
default(): {};
|
|
86
|
-
};
|
|
87
|
-
}>> & {
|
|
88
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
89
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], string, {
|
|
90
|
-
id: string;
|
|
91
|
-
modelValue: string | number;
|
|
92
|
-
useSession: boolean;
|
|
93
|
-
cacheLifetime: number;
|
|
94
|
-
contentPad: string;
|
|
95
|
-
palette: string;
|
|
96
|
-
titles: Record<string, any>;
|
|
97
|
-
}> & {
|
|
98
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
99
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
100
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
101
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
102
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
103
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
104
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
105
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
106
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
107
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
108
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
109
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
110
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
111
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
112
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
113
|
-
};
|
|
114
|
-
$forceUpdate: () => void;
|
|
115
|
-
$nextTick: typeof import("vue").nextTick;
|
|
116
|
-
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
117
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
118
|
-
id: {
|
|
119
|
-
type: StringConstructor;
|
|
120
|
-
default: string;
|
|
121
|
-
};
|
|
122
|
-
modelValue: {
|
|
123
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
124
|
-
default: string;
|
|
125
|
-
};
|
|
126
|
-
useSession: {
|
|
127
|
-
type: BooleanConstructor;
|
|
128
|
-
default: boolean;
|
|
129
|
-
};
|
|
130
|
-
cacheLifetime: {
|
|
131
|
-
type: NumberConstructor;
|
|
132
|
-
default: number;
|
|
133
|
-
};
|
|
134
|
-
contentPad: {
|
|
135
|
-
type: StringConstructor;
|
|
136
|
-
default: undefined;
|
|
137
|
-
};
|
|
138
|
-
palette: {
|
|
139
|
-
type: StringConstructor;
|
|
140
|
-
default: undefined;
|
|
141
|
-
};
|
|
142
|
-
titles: {
|
|
143
|
-
type: ObjectConstructor;
|
|
144
|
-
default(): {};
|
|
145
|
-
};
|
|
146
|
-
}>> & {
|
|
147
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
149
|
-
__isFragment?: undefined;
|
|
150
|
-
__isTeleport?: undefined;
|
|
151
|
-
__isSuspense?: undefined;
|
|
152
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
153
|
-
id: {
|
|
154
|
-
type: StringConstructor;
|
|
155
|
-
default: string;
|
|
156
|
-
};
|
|
157
|
-
modelValue: {
|
|
158
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
159
|
-
default: string;
|
|
160
|
-
};
|
|
161
|
-
useSession: {
|
|
162
|
-
type: BooleanConstructor;
|
|
163
|
-
default: boolean;
|
|
164
|
-
};
|
|
165
|
-
cacheLifetime: {
|
|
166
|
-
type: NumberConstructor;
|
|
167
|
-
default: number;
|
|
168
|
-
};
|
|
169
|
-
contentPad: {
|
|
170
|
-
type: StringConstructor;
|
|
171
|
-
default: undefined;
|
|
172
|
-
};
|
|
173
|
-
palette: {
|
|
174
|
-
type: StringConstructor;
|
|
175
|
-
default: undefined;
|
|
176
|
-
};
|
|
177
|
-
titles: {
|
|
178
|
-
type: ObjectConstructor;
|
|
179
|
-
default(): {};
|
|
180
|
-
};
|
|
181
|
-
}>> & {
|
|
182
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
183
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", {
|
|
184
|
-
id: string;
|
|
185
|
-
modelValue: string | number;
|
|
186
|
-
useSession: boolean;
|
|
187
|
-
cacheLifetime: number;
|
|
188
|
-
contentPad: string;
|
|
189
|
-
palette: string;
|
|
190
|
-
titles: Record<string, any>;
|
|
191
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
192
|
-
$slots: Record<string, {}> & Record<string, {}> & Record<string, {}>;
|
|
193
|
-
});
|
|
194
|
-
export default _default;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|