@knitify/vue 0.0.5 → 0.0.6
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/index.es.js +36 -38
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as n, createElementBlock as
|
|
1
|
+
import { defineComponent as b, openBlock as n, createElementBlock as l, normalizeClass as t, renderSlot as c, createElementVNode as r, resolveComponent as p, Fragment as k, renderList as $, createVNode as u, unref as x, withCtx as y, withModifiers as M, createBlock as C, createTextVNode as S, toDisplayString as N, createCommentVNode as i, useModel as I, useSlots as j, mergeModels as h } from "vue";
|
|
2
2
|
import { RouterLink as O } from "vue-router";
|
|
3
3
|
const z = /* @__PURE__ */ b({
|
|
4
4
|
__name: "KContainer",
|
|
@@ -6,7 +6,7 @@ const z = /* @__PURE__ */ b({
|
|
|
6
6
|
glassy: { type: Boolean }
|
|
7
7
|
},
|
|
8
8
|
setup(e) {
|
|
9
|
-
return (s,
|
|
9
|
+
return (s, o) => (n(), l("div", {
|
|
10
10
|
class: t(["KContainer", e.glassy && "KContainer--glassy"])
|
|
11
11
|
}, [
|
|
12
12
|
c(s.$slots, "default")
|
|
@@ -22,7 +22,7 @@ const z = /* @__PURE__ */ b({
|
|
|
22
22
|
href: { default: "" }
|
|
23
23
|
},
|
|
24
24
|
setup(e) {
|
|
25
|
-
return (s,
|
|
25
|
+
return (s, o) => (n(), l("svg", A, [
|
|
26
26
|
r("use", {
|
|
27
27
|
href: `#${e.href.replace(/^#/, "")}`
|
|
28
28
|
}, null, 8, T)
|
|
@@ -37,7 +37,7 @@ const z = /* @__PURE__ */ b({
|
|
|
37
37
|
variant: {}
|
|
38
38
|
},
|
|
39
39
|
setup(e) {
|
|
40
|
-
return (s,
|
|
40
|
+
return (s, o) => (n(), l("div", {
|
|
41
41
|
class: t([
|
|
42
42
|
"KBadge",
|
|
43
43
|
e.pill && "KBadge--pill",
|
|
@@ -49,16 +49,20 @@ const z = /* @__PURE__ */ b({
|
|
|
49
49
|
c(s.$slots, "default")
|
|
50
50
|
], 2));
|
|
51
51
|
}
|
|
52
|
-
}), w = { class: "KNavbar-menu" }, E = ["href", "onClick"],
|
|
52
|
+
}), w = { class: "KNavbar-menu" }, E = ["href", "onClick"], D = {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: /* @__PURE__ */ t(["KNavbar-caret", "KCollapse-toggle"]),
|
|
55
|
+
"data-kt-collapse-toggle": ""
|
|
56
|
+
}, _ = /* @__PURE__ */ b({
|
|
53
57
|
__name: "KNavbarMenu",
|
|
54
58
|
props: {
|
|
55
59
|
items: { default: () => [] }
|
|
56
60
|
},
|
|
57
61
|
setup(e) {
|
|
58
|
-
return (s,
|
|
62
|
+
return (s, o) => {
|
|
59
63
|
const f = p("KIcon"), g = p("KNavbarMenu", !0);
|
|
60
|
-
return n(),
|
|
61
|
-
(n(!0),
|
|
64
|
+
return n(), l("ul", w, [
|
|
65
|
+
(n(!0), l(k, null, $(e.items, (a, d) => c(s.$slots, "item", {
|
|
62
66
|
key: `navbar-menu-item-${d}`,
|
|
63
67
|
item: a
|
|
64
68
|
}, () => [
|
|
@@ -73,12 +77,12 @@ const z = /* @__PURE__ */ b({
|
|
|
73
77
|
"KCollapse is-collapsed",
|
|
74
78
|
m && "KNavbar-item-is-active"
|
|
75
79
|
]),
|
|
76
|
-
"data-collapse": ""
|
|
80
|
+
"data-kt-collapse": ""
|
|
77
81
|
}, [
|
|
78
82
|
r("a", {
|
|
79
83
|
class: t(["KNavbar-link"]),
|
|
80
84
|
href: a.route ? v : void 0,
|
|
81
|
-
onClick: (
|
|
85
|
+
onClick: M((P) => a.route ? K() : a.onClick?.(), ["prevent"])
|
|
82
86
|
}, [
|
|
83
87
|
r("span", {
|
|
84
88
|
class: t(["KNavbar-icon", a.iconClass])
|
|
@@ -95,28 +99,22 @@ const z = /* @__PURE__ */ b({
|
|
|
95
99
|
variant: "danger"
|
|
96
100
|
}, {
|
|
97
101
|
default: y(() => [
|
|
98
|
-
|
|
102
|
+
S(N(a.badge), 1)
|
|
99
103
|
]),
|
|
100
104
|
_: 2
|
|
101
105
|
}, 1032, ["class"])) : i("", !0),
|
|
102
106
|
r("span", {
|
|
103
107
|
class: t(["KNavbar-text", a.textClass])
|
|
104
|
-
}, N(a.text), 3)
|
|
105
|
-
a.children ? (n(), o("span", {
|
|
106
|
-
key: 1,
|
|
107
|
-
class: t(["KNavbar-caret", "KCollapse-toggle"]),
|
|
108
|
-
"data-collapse-toggle": "",
|
|
109
|
-
onClick: l[0] || (l[0] = S(() => {
|
|
110
|
-
}, ["prevent"]))
|
|
111
|
-
}, [
|
|
112
|
-
u(f, { href: "#caretUp" })
|
|
113
|
-
])) : i("", !0)
|
|
108
|
+
}, N(a.text), 3)
|
|
114
109
|
], 8, E),
|
|
110
|
+
a.children ? (n(), l("span", D, [
|
|
111
|
+
u(f, { href: "#caretUp" })
|
|
112
|
+
])) : i("", !0),
|
|
115
113
|
a.children ? (n(), C(g, {
|
|
116
|
-
key:
|
|
114
|
+
key: 1,
|
|
117
115
|
items: a.children,
|
|
118
116
|
class: "KCollapse-content",
|
|
119
|
-
"data-collapse-content": ""
|
|
117
|
+
"data-kt-collapse-content": ""
|
|
120
118
|
}, null, 8, ["items"])) : i("", !0)
|
|
121
119
|
], 2)
|
|
122
120
|
]),
|
|
@@ -126,7 +124,7 @@ const z = /* @__PURE__ */ b({
|
|
|
126
124
|
]);
|
|
127
125
|
};
|
|
128
126
|
}
|
|
129
|
-
}),
|
|
127
|
+
}), F = /* @__PURE__ */ b({
|
|
130
128
|
__name: "KNavbar",
|
|
131
129
|
props: /* @__PURE__ */ h({
|
|
132
130
|
items: {},
|
|
@@ -143,22 +141,22 @@ const z = /* @__PURE__ */ b({
|
|
|
143
141
|
}),
|
|
144
142
|
emits: /* @__PURE__ */ h(["toggle"], ["update:expanded"]),
|
|
145
143
|
setup(e, { emit: s }) {
|
|
146
|
-
const
|
|
147
|
-
|
|
144
|
+
const o = I(e, "expanded"), f = s, g = j(), a = () => {
|
|
145
|
+
o.value = !o.value, f("toggle", o.value);
|
|
148
146
|
};
|
|
149
147
|
return (d, m) => {
|
|
150
148
|
const v = p("KIcon");
|
|
151
|
-
return n(),
|
|
149
|
+
return n(), l("aside", {
|
|
152
150
|
class: t([
|
|
153
151
|
"KNavbar",
|
|
154
|
-
|
|
152
|
+
o.value && "KNavbar-is-expanded",
|
|
155
153
|
e.fixed && "KNavbar-is-fixed"
|
|
156
154
|
])
|
|
157
155
|
}, [
|
|
158
156
|
r("div", {
|
|
159
157
|
class: t(["KNavbar-inner", e.innerClass])
|
|
160
158
|
}, [
|
|
161
|
-
g.brand ? (n(),
|
|
159
|
+
g.brand ? (n(), l("div", {
|
|
162
160
|
key: 0,
|
|
163
161
|
class: t(["KNavbar-brand", e.brandClass])
|
|
164
162
|
}, [
|
|
@@ -168,19 +166,19 @@ const z = /* @__PURE__ */ b({
|
|
|
168
166
|
class: t(["KNavbar-body", e.bodyClass])
|
|
169
167
|
}, [
|
|
170
168
|
c(d.$slots, "default", {}, () => [
|
|
171
|
-
u(
|
|
169
|
+
u(_, {
|
|
172
170
|
items: e.items.filter(({ hidden: K }) => !K)
|
|
173
171
|
}, null, 8, ["items"])
|
|
174
172
|
])
|
|
175
173
|
], 2),
|
|
176
|
-
g.footer ? (n(),
|
|
174
|
+
g.footer ? (n(), l("div", {
|
|
177
175
|
key: 1,
|
|
178
176
|
class: t(["KNavbar-footer", e.footerClass])
|
|
179
177
|
}, [
|
|
180
178
|
c(d.$slots, "footer")
|
|
181
179
|
], 2)) : i("", !0)
|
|
182
180
|
], 2),
|
|
183
|
-
e.hideToggle ? i("", !0) : (n(),
|
|
181
|
+
e.hideToggle ? i("", !0) : (n(), l("button", {
|
|
184
182
|
key: 0,
|
|
185
183
|
type: "button",
|
|
186
184
|
class: t(["KNavbar-toggle", e.toggleClass]),
|
|
@@ -195,9 +193,9 @@ const z = /* @__PURE__ */ b({
|
|
|
195
193
|
__proto__: null,
|
|
196
194
|
KContainer: z,
|
|
197
195
|
KIcon: V,
|
|
198
|
-
KNavbar:
|
|
199
|
-
KNavbarMenu:
|
|
200
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
196
|
+
KNavbar: F,
|
|
197
|
+
KNavbarMenu: _
|
|
198
|
+
}, Symbol.toStringTag, { value: "Module" })), q = {
|
|
201
199
|
install(e) {
|
|
202
200
|
for (const s in B)
|
|
203
201
|
e.component(
|
|
@@ -209,7 +207,7 @@ const z = /* @__PURE__ */ b({
|
|
|
209
207
|
export {
|
|
210
208
|
z as KContainer,
|
|
211
209
|
V as KIcon,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
F as KNavbar,
|
|
211
|
+
_ as KNavbarMenu,
|
|
212
|
+
q as default
|
|
215
213
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["knitify-vue"]={},n.Vue,n.vueRouter))})(this,(function(n,e,K){"use strict";const f=e.defineComponent({__name:"KContainer",props:{glassy:{type:Boolean}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["KContainer",t.glassy&&"KContainer--glassy"])},[e.renderSlot(o.$slots,"default")],2))}}),N={class:"KIcon",title:"icon",role:"img"},
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["knitify-vue"]={},n.Vue,n.vueRouter))})(this,(function(n,e,K){"use strict";const f=e.defineComponent({__name:"KContainer",props:{glassy:{type:Boolean}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["KContainer",t.glassy&&"KContainer--glassy"])},[e.renderSlot(o.$slots,"default")],2))}}),N={class:"KIcon",title:"icon",role:"img"},k=["href"],p=e.defineComponent({__name:"KIcon",props:{href:{default:""}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("svg",N,[e.createElementVNode("use",{href:`#${t.href.replace(/^#/,"")}`},null,8,k)]))}}),B=e.defineComponent({__name:"KBadge",props:{pill:{type:Boolean},size:{},subtle:{type:Boolean},variant:{}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["KBadge",t.pill&&"KBadge--pill",t.size&&`KBadge--${t.size}`,t.subtle&&"KBadge--subtle",t.variant&&`KBadge--${t.variant}`])},[e.renderSlot(o.$slots,"default")],2))}}),y={class:"KNavbar-menu"},h=["href","onClick"],_={key:0,class:e.normalizeClass(["KNavbar-caret","KCollapse-toggle"]),"data-kt-collapse-toggle":""},i=e.defineComponent({__name:"KNavbarMenu",props:{items:{default:()=>[]}},setup(t){return(o,l)=>{const r=e.resolveComponent("KIcon"),c=e.resolveComponent("KNavbarMenu",!0);return e.openBlock(),e.createElementBlock("ul",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(a,s)=>e.renderSlot(o.$slots,"item",{key:`navbar-menu-item-${s}`,item:a},()=>[e.createVNode(e.unref(K.RouterLink),{to:a.route??"/",custom:""},{default:e.withCtx(({isActive:g,href:d,navigate:m})=>[e.createElementVNode("li",{class:e.normalizeClass(["KNavbar-item","KCollapse is-collapsed",g&&"KNavbar-item-is-active"]),"data-kt-collapse":""},[e.createElementVNode("a",{class:e.normalizeClass(["KNavbar-link"]),href:a.route?d:void 0,onClick:e.withModifiers(z=>a.route?m():a.onClick?.(),["prevent"])},[e.createElementVNode("span",{class:e.normalizeClass(["KNavbar-icon",a.iconClass])},[e.createVNode(r,{href:a.icon},null,8,["href"])],2),a.badge?(e.openBlock(),e.createBlock(B,{key:0,class:e.normalizeClass(["KNavbar-badge",a.badgeClass]),pill:"",size:"sm",variant:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.badge),1)]),_:2},1032,["class"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["KNavbar-text",a.textClass])},e.toDisplayString(a.text),3)],8,h),a.children?(e.openBlock(),e.createElementBlock("span",_,[e.createVNode(r,{href:"#caretUp"})])):e.createCommentVNode("",!0),a.children?(e.openBlock(),e.createBlock(c,{key:1,items:a.children,class:"KCollapse-content","data-kt-collapse-content":""},null,8,["items"])):e.createCommentVNode("",!0)],2)]),_:2},1032,["to"])])),128))])}}}),C=e.defineComponent({__name:"KNavbar",props:e.mergeModels({items:{},bodyClass:{type:[Boolean,null,String,Object,Array]},brandClass:{type:[Boolean,null,String,Object,Array]},fixed:{type:Boolean,default:!1},footerClass:{type:[Boolean,null,String,Object,Array]},hideToggle:{type:Boolean},innerClass:{type:[Boolean,null,String,Object,Array]},toggleClass:{type:[Boolean,null,String,Object,Array]}},{expanded:{type:Boolean,default:!1},expandedModifiers:{}}),emits:e.mergeModels(["toggle"],["update:expanded"]),setup(t,{emit:o}){const l=e.useModel(t,"expanded"),r=o,c=e.useSlots(),a=()=>{l.value=!l.value,r("toggle",l.value)};return(s,g)=>{const d=e.resolveComponent("KIcon");return e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(["KNavbar",l.value&&"KNavbar-is-expanded",t.fixed&&"KNavbar-is-fixed"])},[e.createElementVNode("div",{class:e.normalizeClass(["KNavbar-inner",t.innerClass])},[c.brand?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["KNavbar-brand",t.brandClass])},[e.renderSlot(s.$slots,"brand")],2)):e.createCommentVNode("",!0),e.createElementVNode("nav",{class:e.normalizeClass(["KNavbar-body",t.bodyClass])},[e.renderSlot(s.$slots,"default",{},()=>[e.createVNode(i,{items:t.items.filter(({hidden:m})=>!m)},null,8,["items"])])],2),c.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["KNavbar-footer",t.footerClass])},[e.renderSlot(s.$slots,"footer")],2)):e.createCommentVNode("",!0)],2),t.hideToggle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["KNavbar-toggle",t.toggleClass]),onClick:a},[e.createVNode(d,{href:"#caretLeft"})],2))],2)}}}),b=Object.freeze(Object.defineProperty({__proto__:null,KContainer:f,KIcon:p,KNavbar:C,KNavbarMenu:i},Symbol.toStringTag,{value:"Module"})),V={install(t){for(const o in b)t.component(o,b[o])}};n.KContainer=f,n.KIcon=p,n.KNavbar=C,n.KNavbarMenu=i,n.default=V,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knitify/vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"vue": "^3.5.12",
|
|
19
19
|
"vue-router": "^4.0.3",
|
|
20
20
|
"vue-tsc": "^3.2.5",
|
|
21
|
-
"@knitify/core": "1.0.
|
|
21
|
+
"@knitify/core": "1.0.8"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@knitify/core": "^1.0.1",
|