@knitify/vue 0.0.7 → 0.0.9
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 +198 -98
- package/dist/index.umd.js +1 -1
- package/dist/types/components/Button/KButton.vue.d.ts +11 -0
- package/dist/types/components/Button/types.d.ts +17 -0
- package/dist/types/components/Input/KInput.vue.d.ts +20 -0
- package/dist/types/components/Input/types.d.ts +13 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/types.d.ts +2 -0
- package/dist/types/stories/KBadge.stories.d.ts +104 -0
- package/dist/types/stories/KButton.stories.d.ts +117 -0
- package/dist/types/stories/KContainer.stories.d.ts +84 -0
- package/dist/types/stories/KInput.stories.d.ts +172 -0
- package/dist/types/stories/KNavbar.stories.d.ts +67 -0
- package/dist/types/stories/KNavbarMenu.stories.d.ts +99 -0
- package/dist/types/utils/capitalize.d.ts +1 -0
- package/package.json +8 -4
package/dist/index.es.js
CHANGED
|
@@ -1,34 +1,131 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as K, computed as b, openBlock as o, createBlock as m, resolveDynamicComponent as V, normalizeClass as l, withCtx as h, renderSlot as u, createElementBlock as s, createElementVNode as c, useModel as k, useSlots as x, createCommentVNode as f, withDirectives as j, vModelDynamic as z, mergeModels as B, resolveComponent as p, Fragment as O, renderList as A, createVNode as g, unref as D, withModifiers as L, createTextVNode as T, toDisplayString as C } from "vue";
|
|
2
|
+
import { useLink as w, RouterLink as U } from "vue-router";
|
|
3
|
+
function N(e) {
|
|
4
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
5
|
+
}
|
|
6
|
+
const E = /* @__PURE__ */ K({
|
|
7
|
+
__name: "KButton",
|
|
8
|
+
props: {
|
|
9
|
+
disabled: { type: Boolean, default: !1 },
|
|
10
|
+
expanded: { type: Boolean, default: !1 },
|
|
11
|
+
ghost: { type: Boolean, default: !1 },
|
|
12
|
+
href: {},
|
|
13
|
+
outline: { type: Boolean, default: !1 },
|
|
14
|
+
rounded: { type: Boolean, default: !1 },
|
|
15
|
+
to: {},
|
|
16
|
+
type: { default: "button" },
|
|
17
|
+
variant: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const { href: a, navigate: n } = w({
|
|
21
|
+
to: b(() => e.to ?? "/")
|
|
22
|
+
}), d = b(() => e.to || e.href ? "a" : "button"), r = b(() => {
|
|
23
|
+
if (e.to)
|
|
24
|
+
return a.value;
|
|
25
|
+
if (e.href)
|
|
26
|
+
return e.href;
|
|
27
|
+
}), i = b(() => [
|
|
28
|
+
"KButton",
|
|
29
|
+
e.variant ? e.ghost ? `KButton--ghost${N(e.variant)}` : e.outline ? `KButton--outline${N(e.variant)}` : `KButton--${e.variant}` : null,
|
|
30
|
+
!e.variant && e.outline && "KButton--outline",
|
|
31
|
+
!e.variant && e.ghost && "KButton--ghost",
|
|
32
|
+
e.rounded && "KButton--rounded",
|
|
33
|
+
e.expanded && "KButton--expanded"
|
|
34
|
+
]);
|
|
35
|
+
function t(v) {
|
|
36
|
+
e.to && n(v);
|
|
37
|
+
}
|
|
38
|
+
return (v, y) => (o(), m(V(d.value), {
|
|
39
|
+
href: r.value,
|
|
40
|
+
type: d.value === "button" ? e.type : void 0,
|
|
41
|
+
disabled: d.value === "button" ? e.disabled : void 0,
|
|
42
|
+
class: l(i.value),
|
|
43
|
+
onClick: t
|
|
44
|
+
}, {
|
|
45
|
+
default: h(() => [
|
|
46
|
+
u(v.$slots, "default")
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["href", "type", "disabled", "class"]));
|
|
50
|
+
}
|
|
51
|
+
}), H = /* @__PURE__ */ K({
|
|
4
52
|
__name: "KContainer",
|
|
5
53
|
props: {
|
|
6
54
|
glassy: { type: Boolean }
|
|
7
55
|
},
|
|
8
56
|
setup(e) {
|
|
9
|
-
return (
|
|
10
|
-
class:
|
|
57
|
+
return (a, n) => (o(), s("div", {
|
|
58
|
+
class: l(["KContainer", e.glassy && "KContainer--glassy"])
|
|
11
59
|
}, [
|
|
12
|
-
|
|
60
|
+
u(a.$slots, "default")
|
|
13
61
|
], 2));
|
|
14
62
|
}
|
|
15
|
-
}),
|
|
63
|
+
}), F = {
|
|
16
64
|
class: "KIcon",
|
|
17
65
|
title: "icon",
|
|
18
66
|
role: "img"
|
|
19
|
-
},
|
|
67
|
+
}, P = ["href"], R = /* @__PURE__ */ K({
|
|
20
68
|
__name: "KIcon",
|
|
21
69
|
props: {
|
|
22
70
|
href: { default: "" }
|
|
23
71
|
},
|
|
24
72
|
setup(e) {
|
|
25
|
-
return (
|
|
26
|
-
|
|
73
|
+
return (a, n) => (o(), s("svg", F, [
|
|
74
|
+
c("use", {
|
|
27
75
|
href: `#${e.href.replace(/^#/, "")}`
|
|
28
|
-
}, null, 8,
|
|
76
|
+
}, null, 8, P)
|
|
29
77
|
]));
|
|
30
78
|
}
|
|
31
|
-
}),
|
|
79
|
+
}), q = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "KInput-addon"
|
|
82
|
+
}, G = ["disabled", "placeholder", "type"], J = {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: "KInput-addon"
|
|
85
|
+
}, Q = /* @__PURE__ */ K({
|
|
86
|
+
__name: "KInput",
|
|
87
|
+
props: /* @__PURE__ */ B({
|
|
88
|
+
disabled: { type: Boolean, default: !1 },
|
|
89
|
+
ghost: { type: Boolean, default: !1 },
|
|
90
|
+
placeholder: {},
|
|
91
|
+
rounded: { type: Boolean, default: !1 },
|
|
92
|
+
sunken: { type: Boolean, default: !1 },
|
|
93
|
+
transparent: { type: Boolean, default: !1 },
|
|
94
|
+
type: { default: "text" }
|
|
95
|
+
}, {
|
|
96
|
+
modelValue: {},
|
|
97
|
+
modelModifiers: {}
|
|
98
|
+
}),
|
|
99
|
+
emits: ["update:modelValue"],
|
|
100
|
+
setup(e) {
|
|
101
|
+
const a = k(e, "modelValue"), n = x(), d = b(() => [
|
|
102
|
+
"KInput",
|
|
103
|
+
e.disabled && "KInput--disabled",
|
|
104
|
+
e.ghost && "KInput--ghost",
|
|
105
|
+
e.rounded && "KInput--rounded",
|
|
106
|
+
e.sunken && "KInput--sunken",
|
|
107
|
+
e.transparent && "KInput--transparent"
|
|
108
|
+
]);
|
|
109
|
+
return (r, i) => (o(), s("div", {
|
|
110
|
+
class: l(d.value)
|
|
111
|
+
}, [
|
|
112
|
+
n.prefix ? (o(), s("div", q, [
|
|
113
|
+
u(r.$slots, "prefix")
|
|
114
|
+
])) : f("", !0),
|
|
115
|
+
j(c("input", {
|
|
116
|
+
"onUpdate:modelValue": i[0] || (i[0] = (t) => a.value = t),
|
|
117
|
+
disabled: e.disabled,
|
|
118
|
+
placeholder: e.placeholder,
|
|
119
|
+
type: e.type
|
|
120
|
+
}, null, 8, G), [
|
|
121
|
+
[z, a.value]
|
|
122
|
+
]),
|
|
123
|
+
n.suffix ? (o(), s("div", J, [
|
|
124
|
+
u(r.$slots, "suffix")
|
|
125
|
+
])) : f("", !0)
|
|
126
|
+
], 2));
|
|
127
|
+
}
|
|
128
|
+
}), W = /* @__PURE__ */ K({
|
|
32
129
|
__name: "KBadge",
|
|
33
130
|
props: {
|
|
34
131
|
pill: { type: Boolean },
|
|
@@ -37,8 +134,8 @@ const z = /* @__PURE__ */ b({
|
|
|
37
134
|
variant: {}
|
|
38
135
|
},
|
|
39
136
|
setup(e) {
|
|
40
|
-
return (
|
|
41
|
-
class:
|
|
137
|
+
return (a, n) => (o(), s("div", {
|
|
138
|
+
class: l([
|
|
42
139
|
"KBadge",
|
|
43
140
|
e.pill && "KBadge--pill",
|
|
44
141
|
e.size && `KBadge--${e.size}`,
|
|
@@ -46,76 +143,77 @@ const z = /* @__PURE__ */ b({
|
|
|
46
143
|
e.variant && `KBadge--${e.variant}`
|
|
47
144
|
])
|
|
48
145
|
}, [
|
|
49
|
-
|
|
146
|
+
u(a.$slots, "default")
|
|
50
147
|
], 2));
|
|
51
148
|
}
|
|
52
|
-
}),
|
|
149
|
+
}), X = { class: "KNavbar-menu" }, Y = ["href", "onClick"], Z = {
|
|
53
150
|
key: 0,
|
|
54
|
-
class: /* @__PURE__ */
|
|
151
|
+
class: /* @__PURE__ */ l(["KNavbar-caret", "KCollapse-toggle"]),
|
|
55
152
|
"data-kt-collapse-toggle": ""
|
|
56
|
-
},
|
|
153
|
+
}, I = /* @__PURE__ */ K({
|
|
57
154
|
__name: "KNavbarMenu",
|
|
58
155
|
props: {
|
|
59
156
|
items: { default: () => [] }
|
|
60
157
|
},
|
|
61
158
|
setup(e) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
159
|
+
const a = b(() => e.items.filter(({ hidden: n }) => !n));
|
|
160
|
+
return (n, d) => {
|
|
161
|
+
const r = p("KIcon"), i = p("KNavbarMenu", !0);
|
|
162
|
+
return o(), s("ul", X, [
|
|
163
|
+
(o(!0), s(O, null, A(a.value, (t, v) => u(n.$slots, "item", {
|
|
164
|
+
key: `navbar-menu-item-${v}`,
|
|
165
|
+
item: t
|
|
68
166
|
}, () => [
|
|
69
|
-
|
|
70
|
-
to:
|
|
167
|
+
g(D(U), {
|
|
168
|
+
to: t.route ?? "/",
|
|
71
169
|
custom: ""
|
|
72
170
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
|
|
75
|
-
class:
|
|
171
|
+
default: h(({ isActive: y, href: M, navigate: S }) => [
|
|
172
|
+
c("li", {
|
|
173
|
+
class: l([
|
|
76
174
|
"KNavbar-item",
|
|
77
175
|
"KCollapse is-collapsed",
|
|
78
|
-
|
|
176
|
+
y && "KNavbar-item-is-active"
|
|
79
177
|
]),
|
|
80
178
|
"data-kt-collapse": ""
|
|
81
179
|
}, [
|
|
82
|
-
|
|
83
|
-
class:
|
|
84
|
-
href:
|
|
85
|
-
onClick:
|
|
180
|
+
c("a", {
|
|
181
|
+
class: l(["KNavbar-link"]),
|
|
182
|
+
href: t.route ? M : void 0,
|
|
183
|
+
onClick: L((ee) => t.route ? S() : t.onClick?.(), ["prevent"])
|
|
86
184
|
}, [
|
|
87
|
-
|
|
88
|
-
class:
|
|
185
|
+
c("span", {
|
|
186
|
+
class: l(["KNavbar-icon", t.iconClass])
|
|
89
187
|
}, [
|
|
90
|
-
|
|
91
|
-
href:
|
|
188
|
+
g(r, {
|
|
189
|
+
href: t.icon
|
|
92
190
|
}, null, 8, ["href"])
|
|
93
191
|
], 2),
|
|
94
|
-
|
|
192
|
+
t.badge ? (o(), m(W, {
|
|
95
193
|
key: 0,
|
|
96
|
-
class:
|
|
194
|
+
class: l(["KNavbar-badge", t.badgeClass]),
|
|
97
195
|
pill: "",
|
|
98
196
|
size: "sm",
|
|
99
197
|
variant: "danger"
|
|
100
198
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
199
|
+
default: h(() => [
|
|
200
|
+
T(C(t.badge), 1)
|
|
103
201
|
]),
|
|
104
202
|
_: 2
|
|
105
|
-
}, 1032, ["class"])) :
|
|
106
|
-
|
|
107
|
-
class:
|
|
108
|
-
},
|
|
109
|
-
], 8,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
])) :
|
|
113
|
-
|
|
203
|
+
}, 1032, ["class"])) : f("", !0),
|
|
204
|
+
c("span", {
|
|
205
|
+
class: l(["KNavbar-text", t.textClass])
|
|
206
|
+
}, C(t.text), 3)
|
|
207
|
+
], 8, Y),
|
|
208
|
+
t.children ? (o(), s("span", Z, [
|
|
209
|
+
g(r, { href: "#caretUp" })
|
|
210
|
+
])) : f("", !0),
|
|
211
|
+
t.children ? (o(), m(i, {
|
|
114
212
|
key: 1,
|
|
115
|
-
items:
|
|
213
|
+
items: t.children,
|
|
116
214
|
class: "KCollapse-content",
|
|
117
215
|
"data-kt-collapse-content": ""
|
|
118
|
-
}, null, 8, ["items"])) :
|
|
216
|
+
}, null, 8, ["items"])) : f("", !0)
|
|
119
217
|
], 2)
|
|
120
218
|
]),
|
|
121
219
|
_: 2
|
|
@@ -124,9 +222,9 @@ const z = /* @__PURE__ */ b({
|
|
|
124
222
|
]);
|
|
125
223
|
};
|
|
126
224
|
}
|
|
127
|
-
}),
|
|
225
|
+
}), _ = /* @__PURE__ */ K({
|
|
128
226
|
__name: "KNavbar",
|
|
129
|
-
props: /* @__PURE__ */
|
|
227
|
+
props: /* @__PURE__ */ B({
|
|
130
228
|
items: {},
|
|
131
229
|
bodyClass: { type: [Boolean, null, String, Object, Array] },
|
|
132
230
|
brandClass: { type: [Boolean, null, String, Object, Array] },
|
|
@@ -139,75 +237,77 @@ const z = /* @__PURE__ */ b({
|
|
|
139
237
|
expanded: { type: Boolean, default: !1 },
|
|
140
238
|
expandedModifiers: {}
|
|
141
239
|
}),
|
|
142
|
-
emits: /* @__PURE__ */
|
|
143
|
-
setup(e, { emit:
|
|
144
|
-
const
|
|
145
|
-
|
|
240
|
+
emits: /* @__PURE__ */ B(["toggle"], ["update:expanded"]),
|
|
241
|
+
setup(e, { emit: a }) {
|
|
242
|
+
const n = k(e, "expanded"), d = a, r = x(), i = () => {
|
|
243
|
+
n.value = !n.value, d("toggle", n.value);
|
|
146
244
|
};
|
|
147
|
-
return (
|
|
148
|
-
const
|
|
149
|
-
return
|
|
150
|
-
class:
|
|
245
|
+
return (t, v) => {
|
|
246
|
+
const y = p("KIcon");
|
|
247
|
+
return o(), s("aside", {
|
|
248
|
+
class: l([
|
|
151
249
|
"KNavbar",
|
|
152
|
-
|
|
250
|
+
n.value && "KNavbar-is-expanded",
|
|
153
251
|
e.fixed && "KNavbar-is-fixed"
|
|
154
252
|
])
|
|
155
253
|
}, [
|
|
156
|
-
|
|
157
|
-
class:
|
|
254
|
+
c("div", {
|
|
255
|
+
class: l(["KNavbar-inner", e.innerClass])
|
|
158
256
|
}, [
|
|
159
|
-
|
|
257
|
+
r.brand ? (o(), s("div", {
|
|
160
258
|
key: 0,
|
|
161
|
-
class:
|
|
259
|
+
class: l(["KNavbar-brand", e.brandClass])
|
|
162
260
|
}, [
|
|
163
|
-
|
|
164
|
-
], 2)) :
|
|
165
|
-
|
|
166
|
-
class:
|
|
261
|
+
u(t.$slots, "brand")
|
|
262
|
+
], 2)) : f("", !0),
|
|
263
|
+
c("nav", {
|
|
264
|
+
class: l(["KNavbar-body", e.bodyClass])
|
|
167
265
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
items: e.items.filter(({ hidden: K }) => !K)
|
|
171
|
-
}, null, 8, ["items"])
|
|
266
|
+
u(t.$slots, "default", {}, () => [
|
|
267
|
+
g(I, { items: e.items }, null, 8, ["items"])
|
|
172
268
|
])
|
|
173
269
|
], 2),
|
|
174
|
-
|
|
270
|
+
r.footer ? (o(), s("div", {
|
|
175
271
|
key: 1,
|
|
176
|
-
class:
|
|
272
|
+
class: l(["KNavbar-footer", e.footerClass])
|
|
177
273
|
}, [
|
|
178
|
-
|
|
179
|
-
], 2)) :
|
|
274
|
+
u(t.$slots, "footer")
|
|
275
|
+
], 2)) : f("", !0)
|
|
180
276
|
], 2),
|
|
181
|
-
e.hideToggle ?
|
|
277
|
+
e.hideToggle ? f("", !0) : (o(), s("button", {
|
|
182
278
|
key: 0,
|
|
183
279
|
type: "button",
|
|
184
|
-
class:
|
|
185
|
-
onClick:
|
|
280
|
+
class: l(["KNavbar-toggle", e.toggleClass]),
|
|
281
|
+
onClick: i
|
|
186
282
|
}, [
|
|
187
|
-
|
|
283
|
+
g(y, { href: "#caretLeft" })
|
|
188
284
|
], 2))
|
|
189
285
|
], 2);
|
|
190
286
|
};
|
|
191
287
|
}
|
|
192
|
-
}),
|
|
288
|
+
}), $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
193
289
|
__proto__: null,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
290
|
+
KButton: E,
|
|
291
|
+
KContainer: H,
|
|
292
|
+
KIcon: R,
|
|
293
|
+
KInput: Q,
|
|
294
|
+
KNavbar: _,
|
|
295
|
+
KNavbarMenu: I
|
|
296
|
+
}, Symbol.toStringTag, { value: "Module" })), ne = {
|
|
199
297
|
install(e) {
|
|
200
|
-
for (const
|
|
298
|
+
for (const a in $)
|
|
201
299
|
e.component(
|
|
202
|
-
|
|
203
|
-
|
|
300
|
+
a,
|
|
301
|
+
$[a]
|
|
204
302
|
);
|
|
205
303
|
}
|
|
206
304
|
};
|
|
207
305
|
export {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
306
|
+
E as KButton,
|
|
307
|
+
H as KContainer,
|
|
308
|
+
R as KIcon,
|
|
309
|
+
Q as KInput,
|
|
310
|
+
_ as KNavbar,
|
|
311
|
+
I as KNavbarMenu,
|
|
312
|
+
ne as default
|
|
213
313
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,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):(l=typeof globalThis<"u"?globalThis:l||self,e(l["knitify-vue"]={},l.Vue,l.vueRouter))})(this,(function(l,e,f){"use strict";function u(t){return t.charAt(0).toUpperCase()+t.slice(1)}const B=e.defineComponent({__name:"KButton",props:{disabled:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},href:{},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},to:{},type:{default:"button"},variant:{}},setup(t){const{href:a,navigate:o}=f.useLink({to:e.computed(()=>t.to??"/")}),r=e.computed(()=>t.to||t.href?"a":"button"),s=e.computed(()=>{if(t.to)return a.value;if(t.href)return t.href}),d=e.computed(()=>["KButton",t.variant?t.ghost?`KButton--ghost${u(t.variant)}`:t.outline?`KButton--outline${u(t.variant)}`:`KButton--${t.variant}`:null,!t.variant&&t.outline&&"KButton--outline",!t.variant&&t.ghost&&"KButton--ghost",t.rounded&&"KButton--rounded",t.expanded&&"KButton--expanded"]);function n(c){t.to&&o(c)}return(c,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{href:s.value,type:r.value==="button"?t.type:void 0,disabled:r.value==="button"?t.disabled:void 0,class:e.normalizeClass(d.value),onClick:n},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["href","type","disabled","class"]))}}),C=e.defineComponent({__name:"KContainer",props:{glassy:{type:Boolean}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["KContainer",t.glassy&&"KContainer--glassy"])},[e.renderSlot(a.$slots,"default")],2))}}),g={class:"KIcon",title:"icon",role:"img"},h=["href"],K=e.defineComponent({__name:"KIcon",props:{href:{default:""}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("use",{href:`#${t.href.replace(/^#/,"")}`},null,8,h)]))}}),k={key:0,class:"KInput-addon"},N=["disabled","placeholder","type"],$={key:1,class:"KInput-addon"},p=e.defineComponent({__name:"KInput",props:e.mergeModels({disabled:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},placeholder:{},rounded:{type:Boolean,default:!1},sunken:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},type:{default:"text"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const a=e.useModel(t,"modelValue"),o=e.useSlots(),r=e.computed(()=>["KInput",t.disabled&&"KInput--disabled",t.ghost&&"KInput--ghost",t.rounded&&"KInput--rounded",t.sunken&&"KInput--sunken",t.transparent&&"KInput--transparent"]);return(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value)},[o.prefix?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(s.$slots,"prefix")])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=n=>a.value=n),disabled:t.disabled,placeholder:t.placeholder,type:t.type},null,8,N),[[e.vModelDynamic,a.value]]),o.suffix?(e.openBlock(),e.createElementBlock("div",$,[e.renderSlot(s.$slots,"suffix")])):e.createCommentVNode("",!0)],2))}}),V=e.defineComponent({__name:"KBadge",props:{pill:{type:Boolean},size:{},subtle:{type:Boolean},variant:{}},setup(t){return(a,o)=>(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(a.$slots,"default")],2))}}),z={class:"KNavbar-menu"},S=["href","onClick"],E={key:0,class:e.normalizeClass(["KNavbar-caret","KCollapse-toggle"]),"data-kt-collapse-toggle":""},m=e.defineComponent({__name:"KNavbarMenu",props:{items:{default:()=>[]}},setup(t){const a=e.computed(()=>t.items.filter(({hidden:o})=>!o));return(o,r)=>{const s=e.resolveComponent("KIcon"),d=e.resolveComponent("KNavbarMenu",!0);return e.openBlock(),e.createElementBlock("ul",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(n,c)=>e.renderSlot(o.$slots,"item",{key:`navbar-menu-item-${c}`,item:n},()=>[e.createVNode(e.unref(f.RouterLink),{to:n.route??"/",custom:""},{default:e.withCtx(({isActive:i,href:x,navigate:M})=>[e.createElementVNode("li",{class:e.normalizeClass(["KNavbar-item","KCollapse is-collapsed",i&&"KNavbar-item-is-active"]),"data-kt-collapse":""},[e.createElementVNode("a",{class:e.normalizeClass(["KNavbar-link"]),href:n.route?x:void 0,onClick:e.withModifiers(j=>n.route?M():n.onClick?.(),["prevent"])},[e.createElementVNode("span",{class:e.normalizeClass(["KNavbar-icon",n.iconClass])},[e.createVNode(s,{href:n.icon},null,8,["href"])],2),n.badge?(e.openBlock(),e.createBlock(V,{key:0,class:e.normalizeClass(["KNavbar-badge",n.badgeClass]),pill:"",size:"sm",variant:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.badge),1)]),_:2},1032,["class"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["KNavbar-text",n.textClass])},e.toDisplayString(n.text),3)],8,S),n.children?(e.openBlock(),e.createElementBlock("span",E,[e.createVNode(s,{href:"#caretUp"})])):e.createCommentVNode("",!0),n.children?(e.openBlock(),e.createBlock(d,{key:1,items:n.children,class:"KCollapse-content","data-kt-collapse-content":""},null,8,["items"])):e.createCommentVNode("",!0)],2)]),_:2},1032,["to"])])),128))])}}}),b=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:a}){const o=e.useModel(t,"expanded"),r=a,s=e.useSlots(),d=()=>{o.value=!o.value,r("toggle",o.value)};return(n,c)=>{const i=e.resolveComponent("KIcon");return e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(["KNavbar",o.value&&"KNavbar-is-expanded",t.fixed&&"KNavbar-is-fixed"])},[e.createElementVNode("div",{class:e.normalizeClass(["KNavbar-inner",t.innerClass])},[s.brand?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["KNavbar-brand",t.brandClass])},[e.renderSlot(n.$slots,"brand")],2)):e.createCommentVNode("",!0),e.createElementVNode("nav",{class:e.normalizeClass(["KNavbar-body",t.bodyClass])},[e.renderSlot(n.$slots,"default",{},()=>[e.createVNode(m,{items:t.items},null,8,["items"])])],2),s.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["KNavbar-footer",t.footerClass])},[e.renderSlot(n.$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:d},[e.createVNode(i,{href:"#caretLeft"})],2))],2)}}}),y=Object.freeze(Object.defineProperty({__proto__:null,KButton:B,KContainer:C,KIcon:K,KInput:p,KNavbar:b,KNavbarMenu:m},Symbol.toStringTag,{value:"Module"})),I={install(t){for(const a in y)t.component(a,y[a])}};l.KButton=B,l.KContainer=C,l.KIcon=K,l.KInput=p,l.KNavbar=b,l.KNavbarMenu=m,l.default=I,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KButtonProps, KButtonSlots } from './types';
|
|
2
|
+
type __VLS_Slots = KButtonSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<KButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import type { Variant } from '../../types';
|
|
3
|
+
export type KButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
+
export type KButtonProps = {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
ghost?: boolean;
|
|
8
|
+
href?: string;
|
|
9
|
+
outline?: boolean;
|
|
10
|
+
rounded?: boolean;
|
|
11
|
+
to?: RouteLocationRaw;
|
|
12
|
+
type?: KButtonType;
|
|
13
|
+
variant?: Variant;
|
|
14
|
+
};
|
|
15
|
+
export type KButtonSlots = {
|
|
16
|
+
default?(): any;
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { KInputProps, KInputSlots } from './types';
|
|
2
|
+
type __VLS_Props = KInputProps;
|
|
3
|
+
type __VLS_Slots = KInputSlots;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type KInputSlots = {
|
|
2
|
+
prefix?(): any;
|
|
3
|
+
suffix?(): any;
|
|
4
|
+
};
|
|
5
|
+
export type KInputProps = {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
ghost?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
rounded?: boolean;
|
|
10
|
+
sunken?: boolean;
|
|
11
|
+
transparent?: boolean;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { default as KButton } from './Button/KButton.vue';
|
|
1
2
|
export { default as KContainer } from './Container/KContainer.vue';
|
|
2
3
|
export { default as KIcon } from './Icon/KIcon.vue';
|
|
4
|
+
export { default as KInput } from './Input/KInput.vue';
|
|
3
5
|
export { default as KNavbar } from './Navbar/KNavbar.vue';
|
|
4
6
|
export { default as KNavbarMenu } from './Navbar/KNavbarMenu.vue';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
6
|
+
P: {};
|
|
7
|
+
B: {};
|
|
8
|
+
D: {};
|
|
9
|
+
C: {};
|
|
10
|
+
M: {};
|
|
11
|
+
Defaults: {};
|
|
12
|
+
}, Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
13
|
+
__isFragment?: never;
|
|
14
|
+
__isTeleport?: never;
|
|
15
|
+
__isSuspense?: never;
|
|
16
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
17
|
+
$slots: {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
tags: string[];
|
|
22
|
+
argTypes: {
|
|
23
|
+
variant: {
|
|
24
|
+
control: "select";
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
control: "select";
|
|
29
|
+
options: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
render: (args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
33
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
34
|
+
P: {};
|
|
35
|
+
B: {};
|
|
36
|
+
D: {};
|
|
37
|
+
C: {};
|
|
38
|
+
M: {};
|
|
39
|
+
Defaults: {};
|
|
40
|
+
}, Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
41
|
+
__isFragment?: never;
|
|
42
|
+
__isTeleport?: never;
|
|
43
|
+
__isSuspense?: never;
|
|
44
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
45
|
+
$slots: {
|
|
46
|
+
default?: (props: {}) => any;
|
|
47
|
+
};
|
|
48
|
+
})>) => {
|
|
49
|
+
components: {
|
|
50
|
+
KBadge: {
|
|
51
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
52
|
+
P: {};
|
|
53
|
+
B: {};
|
|
54
|
+
D: {};
|
|
55
|
+
C: {};
|
|
56
|
+
M: {};
|
|
57
|
+
Defaults: {};
|
|
58
|
+
}, Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
59
|
+
__isFragment?: never;
|
|
60
|
+
__isTeleport?: never;
|
|
61
|
+
__isSuspense?: never;
|
|
62
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
63
|
+
$slots: {
|
|
64
|
+
default?: (props: {}) => any;
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
setup(this: void): {
|
|
69
|
+
args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
70
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
71
|
+
P: {};
|
|
72
|
+
B: {};
|
|
73
|
+
D: {};
|
|
74
|
+
C: {};
|
|
75
|
+
M: {};
|
|
76
|
+
Defaults: {};
|
|
77
|
+
}, Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
78
|
+
__isFragment?: never;
|
|
79
|
+
__isTeleport?: never;
|
|
80
|
+
__isSuspense?: never;
|
|
81
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../components/Badge/types.js").KBadgeProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
82
|
+
$slots: {
|
|
83
|
+
default?: (props: {}) => any;
|
|
84
|
+
};
|
|
85
|
+
})>;
|
|
86
|
+
};
|
|
87
|
+
template: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export default meta;
|
|
91
|
+
type Story = StoryObj<typeof meta>;
|
|
92
|
+
export declare const Default: Story;
|
|
93
|
+
export declare const Brand: Story;
|
|
94
|
+
export declare const Success: Story;
|
|
95
|
+
export declare const Info: Story;
|
|
96
|
+
export declare const Attention: Story;
|
|
97
|
+
export declare const Danger: Story;
|
|
98
|
+
export declare const Pill: Story;
|
|
99
|
+
export declare const Subtle: Story;
|
|
100
|
+
export declare const SubtlePill: Story;
|
|
101
|
+
export declare const Small: Story;
|
|
102
|
+
export declare const Large: Story;
|
|
103
|
+
export declare const AllVariants: Story;
|
|
104
|
+
export declare const AllVariantsSubtle: Story;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
6
|
+
P: {};
|
|
7
|
+
B: {};
|
|
8
|
+
D: {};
|
|
9
|
+
C: {};
|
|
10
|
+
M: {};
|
|
11
|
+
Defaults: {};
|
|
12
|
+
}, Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
13
|
+
__isFragment?: never;
|
|
14
|
+
__isTeleport?: never;
|
|
15
|
+
__isSuspense?: never;
|
|
16
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
17
|
+
$slots: import("../index.js").KButtonSlots;
|
|
18
|
+
});
|
|
19
|
+
tags: string[];
|
|
20
|
+
argTypes: {
|
|
21
|
+
variant: {
|
|
22
|
+
control: "select";
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
control: "select";
|
|
27
|
+
options: string[];
|
|
28
|
+
};
|
|
29
|
+
outline: {
|
|
30
|
+
control: "boolean";
|
|
31
|
+
};
|
|
32
|
+
ghost: {
|
|
33
|
+
control: "boolean";
|
|
34
|
+
};
|
|
35
|
+
rounded: {
|
|
36
|
+
control: "boolean";
|
|
37
|
+
};
|
|
38
|
+
expanded: {
|
|
39
|
+
control: "boolean";
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
control: "boolean";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
render: (args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
46
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
47
|
+
P: {};
|
|
48
|
+
B: {};
|
|
49
|
+
D: {};
|
|
50
|
+
C: {};
|
|
51
|
+
M: {};
|
|
52
|
+
Defaults: {};
|
|
53
|
+
}, Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
54
|
+
__isFragment?: never;
|
|
55
|
+
__isTeleport?: never;
|
|
56
|
+
__isSuspense?: never;
|
|
57
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
58
|
+
$slots: import("../index.js").KButtonSlots;
|
|
59
|
+
})>) => {
|
|
60
|
+
components: {
|
|
61
|
+
KButton: {
|
|
62
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
63
|
+
P: {};
|
|
64
|
+
B: {};
|
|
65
|
+
D: {};
|
|
66
|
+
C: {};
|
|
67
|
+
M: {};
|
|
68
|
+
Defaults: {};
|
|
69
|
+
}, Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
70
|
+
__isFragment?: never;
|
|
71
|
+
__isTeleport?: never;
|
|
72
|
+
__isSuspense?: never;
|
|
73
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
74
|
+
$slots: import("../index.js").KButtonSlots;
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
setup(this: void): {
|
|
78
|
+
args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
79
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
80
|
+
P: {};
|
|
81
|
+
B: {};
|
|
82
|
+
D: {};
|
|
83
|
+
C: {};
|
|
84
|
+
M: {};
|
|
85
|
+
Defaults: {};
|
|
86
|
+
}, Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
87
|
+
__isFragment?: never;
|
|
88
|
+
__isTeleport?: never;
|
|
89
|
+
__isSuspense?: never;
|
|
90
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KButtonProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
91
|
+
$slots: import("../index.js").KButtonSlots;
|
|
92
|
+
})>;
|
|
93
|
+
};
|
|
94
|
+
template: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export default meta;
|
|
98
|
+
type Story = StoryObj<typeof meta>;
|
|
99
|
+
export declare const Default: Story;
|
|
100
|
+
export declare const Brand: Story;
|
|
101
|
+
export declare const Success: Story;
|
|
102
|
+
export declare const Info: Story;
|
|
103
|
+
export declare const Attention: Story;
|
|
104
|
+
export declare const Danger: Story;
|
|
105
|
+
export declare const Outline: Story;
|
|
106
|
+
export declare const OutlineBrand: Story;
|
|
107
|
+
export declare const Ghost: Story;
|
|
108
|
+
export declare const GhostBrand: Story;
|
|
109
|
+
export declare const Rounded: Story;
|
|
110
|
+
export declare const Expanded: Story;
|
|
111
|
+
export declare const Disabled: Story;
|
|
112
|
+
export declare const AsLink: Story;
|
|
113
|
+
export declare const AsRouterLink: Story;
|
|
114
|
+
export declare const AllVariants: Story;
|
|
115
|
+
export declare const AllVariantsOutline: Story;
|
|
116
|
+
export declare const AllVariantsGhost: Story;
|
|
117
|
+
export declare const AllStyles: Story;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
6
|
+
P: {};
|
|
7
|
+
B: {};
|
|
8
|
+
D: {};
|
|
9
|
+
C: {};
|
|
10
|
+
M: {};
|
|
11
|
+
Defaults: {};
|
|
12
|
+
}, Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
13
|
+
__isFragment?: never;
|
|
14
|
+
__isTeleport?: never;
|
|
15
|
+
__isSuspense?: never;
|
|
16
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
17
|
+
$slots: {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
tags: string[];
|
|
22
|
+
render: (args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
23
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
24
|
+
P: {};
|
|
25
|
+
B: {};
|
|
26
|
+
D: {};
|
|
27
|
+
C: {};
|
|
28
|
+
M: {};
|
|
29
|
+
Defaults: {};
|
|
30
|
+
}, Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
31
|
+
__isFragment?: never;
|
|
32
|
+
__isTeleport?: never;
|
|
33
|
+
__isSuspense?: never;
|
|
34
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
35
|
+
$slots: {
|
|
36
|
+
default?: (props: {}) => any;
|
|
37
|
+
};
|
|
38
|
+
})>) => {
|
|
39
|
+
components: {
|
|
40
|
+
KContainer: {
|
|
41
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
42
|
+
P: {};
|
|
43
|
+
B: {};
|
|
44
|
+
D: {};
|
|
45
|
+
C: {};
|
|
46
|
+
M: {};
|
|
47
|
+
Defaults: {};
|
|
48
|
+
}, Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
49
|
+
__isFragment?: never;
|
|
50
|
+
__isTeleport?: never;
|
|
51
|
+
__isSuspense?: never;
|
|
52
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
53
|
+
$slots: {
|
|
54
|
+
default?: (props: {}) => any;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
setup(this: void): {
|
|
59
|
+
args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
60
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
61
|
+
P: {};
|
|
62
|
+
B: {};
|
|
63
|
+
D: {};
|
|
64
|
+
C: {};
|
|
65
|
+
M: {};
|
|
66
|
+
Defaults: {};
|
|
67
|
+
}, Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
68
|
+
__isFragment?: never;
|
|
69
|
+
__isTeleport?: never;
|
|
70
|
+
__isSuspense?: never;
|
|
71
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KContainerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
72
|
+
$slots: {
|
|
73
|
+
default?: (props: {}) => any;
|
|
74
|
+
};
|
|
75
|
+
})>;
|
|
76
|
+
};
|
|
77
|
+
template: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export default meta;
|
|
81
|
+
type Story = StoryObj<typeof meta>;
|
|
82
|
+
export declare const Default: Story;
|
|
83
|
+
export declare const Glassy: Story;
|
|
84
|
+
export declare const WithRichContent: Story;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KInputProps & {
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
11
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
12
|
+
P: {};
|
|
13
|
+
B: {};
|
|
14
|
+
D: {};
|
|
15
|
+
C: {};
|
|
16
|
+
M: {};
|
|
17
|
+
Defaults: {};
|
|
18
|
+
}, Readonly<import("../index.js").KInputProps & {
|
|
19
|
+
modelValue?: string;
|
|
20
|
+
}> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, {}>;
|
|
23
|
+
__isFragment?: never;
|
|
24
|
+
__isTeleport?: never;
|
|
25
|
+
__isSuspense?: never;
|
|
26
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KInputProps & {
|
|
27
|
+
modelValue?: string;
|
|
28
|
+
}> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
32
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
33
|
+
$slots: import("../index.js").KInputSlots;
|
|
34
|
+
});
|
|
35
|
+
tags: string[];
|
|
36
|
+
argTypes: {
|
|
37
|
+
type: {
|
|
38
|
+
control: "text";
|
|
39
|
+
};
|
|
40
|
+
disabled: {
|
|
41
|
+
control: "boolean";
|
|
42
|
+
};
|
|
43
|
+
rounded: {
|
|
44
|
+
control: "boolean";
|
|
45
|
+
};
|
|
46
|
+
sunken: {
|
|
47
|
+
control: "boolean";
|
|
48
|
+
};
|
|
49
|
+
ghost: {
|
|
50
|
+
control: "boolean";
|
|
51
|
+
};
|
|
52
|
+
transparent: {
|
|
53
|
+
control: "boolean";
|
|
54
|
+
};
|
|
55
|
+
'onUpdate:modelValue': {
|
|
56
|
+
action: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
render: (args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
60
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KInputProps & {
|
|
61
|
+
modelValue?: string;
|
|
62
|
+
}> & Readonly<{
|
|
63
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
64
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
65
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
66
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
67
|
+
P: {};
|
|
68
|
+
B: {};
|
|
69
|
+
D: {};
|
|
70
|
+
C: {};
|
|
71
|
+
M: {};
|
|
72
|
+
Defaults: {};
|
|
73
|
+
}, Readonly<import("../index.js").KInputProps & {
|
|
74
|
+
modelValue?: string;
|
|
75
|
+
}> & Readonly<{
|
|
76
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
77
|
+
}>, {}, {}, {}, {}, {}>;
|
|
78
|
+
__isFragment?: never;
|
|
79
|
+
__isTeleport?: never;
|
|
80
|
+
__isSuspense?: never;
|
|
81
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KInputProps & {
|
|
82
|
+
modelValue?: string;
|
|
83
|
+
}> & Readonly<{
|
|
84
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
85
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
86
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
87
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
88
|
+
$slots: import("../index.js").KInputSlots;
|
|
89
|
+
})>) => {
|
|
90
|
+
components: {
|
|
91
|
+
KInput: {
|
|
92
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KInputProps & {
|
|
93
|
+
modelValue?: string;
|
|
94
|
+
}> & Readonly<{
|
|
95
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
96
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
97
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
98
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
99
|
+
P: {};
|
|
100
|
+
B: {};
|
|
101
|
+
D: {};
|
|
102
|
+
C: {};
|
|
103
|
+
M: {};
|
|
104
|
+
Defaults: {};
|
|
105
|
+
}, Readonly<import("../index.js").KInputProps & {
|
|
106
|
+
modelValue?: string;
|
|
107
|
+
}> & Readonly<{
|
|
108
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
109
|
+
}>, {}, {}, {}, {}, {}>;
|
|
110
|
+
__isFragment?: never;
|
|
111
|
+
__isTeleport?: never;
|
|
112
|
+
__isSuspense?: never;
|
|
113
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KInputProps & {
|
|
114
|
+
modelValue?: string;
|
|
115
|
+
}> & Readonly<{
|
|
116
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
117
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
118
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
119
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
120
|
+
$slots: import("../index.js").KInputSlots;
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
setup(this: void): {
|
|
124
|
+
args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
125
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KInputProps & {
|
|
126
|
+
modelValue?: string;
|
|
127
|
+
}> & Readonly<{
|
|
128
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
129
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
130
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
131
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
132
|
+
P: {};
|
|
133
|
+
B: {};
|
|
134
|
+
D: {};
|
|
135
|
+
C: {};
|
|
136
|
+
M: {};
|
|
137
|
+
Defaults: {};
|
|
138
|
+
}, Readonly<import("../index.js").KInputProps & {
|
|
139
|
+
modelValue?: string;
|
|
140
|
+
}> & Readonly<{
|
|
141
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
142
|
+
}>, {}, {}, {}, {}, {}>;
|
|
143
|
+
__isFragment?: never;
|
|
144
|
+
__isTeleport?: never;
|
|
145
|
+
__isSuspense?: never;
|
|
146
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KInputProps & {
|
|
147
|
+
modelValue?: string;
|
|
148
|
+
}> & Readonly<{
|
|
149
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
150
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
151
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
152
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
153
|
+
$slots: import("../index.js").KInputSlots;
|
|
154
|
+
})>;
|
|
155
|
+
value: import("vue").Ref<string, string>;
|
|
156
|
+
};
|
|
157
|
+
template: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export default meta;
|
|
161
|
+
type Story = StoryObj<typeof meta>;
|
|
162
|
+
export declare const Default: Story;
|
|
163
|
+
export declare const WithPlaceholder: Story;
|
|
164
|
+
export declare const Disabled: Story;
|
|
165
|
+
export declare const Rounded: Story;
|
|
166
|
+
export declare const Sunken: Story;
|
|
167
|
+
export declare const Ghost: Story;
|
|
168
|
+
export declare const Transparent: Story;
|
|
169
|
+
export declare const WithPrefix: Story;
|
|
170
|
+
export declare const WithSuffix: Story;
|
|
171
|
+
export declare const WithBothAddons: Story;
|
|
172
|
+
export declare const AllVariants: Story;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KNavbarProps & {
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
onToggle?: ((value: boolean) => any) | undefined;
|
|
9
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:expanded": (value: boolean) => any;
|
|
12
|
+
} & {
|
|
13
|
+
toggle: (value: boolean) => any;
|
|
14
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
15
|
+
P: {};
|
|
16
|
+
B: {};
|
|
17
|
+
D: {};
|
|
18
|
+
C: {};
|
|
19
|
+
M: {};
|
|
20
|
+
Defaults: {};
|
|
21
|
+
}, Readonly<import("../index.js").KNavbarProps & {
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
}> & Readonly<{
|
|
24
|
+
onToggle?: ((value: boolean) => any) | undefined;
|
|
25
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, {}>;
|
|
27
|
+
__isFragment?: never;
|
|
28
|
+
__isTeleport?: never;
|
|
29
|
+
__isSuspense?: never;
|
|
30
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KNavbarProps & {
|
|
31
|
+
expanded?: boolean;
|
|
32
|
+
}> & Readonly<{
|
|
33
|
+
onToggle?: ((value: boolean) => any) | undefined;
|
|
34
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
"update:expanded": (value: boolean) => any;
|
|
37
|
+
} & {
|
|
38
|
+
toggle: (value: boolean) => any;
|
|
39
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
40
|
+
$slots: import("../index.js").KNavbarSlots;
|
|
41
|
+
});
|
|
42
|
+
tags: string[];
|
|
43
|
+
argTypes: {
|
|
44
|
+
fixed: {
|
|
45
|
+
control: "boolean";
|
|
46
|
+
};
|
|
47
|
+
hideToggle: {
|
|
48
|
+
control: "boolean";
|
|
49
|
+
};
|
|
50
|
+
'onUpdate:expanded': {
|
|
51
|
+
action: string;
|
|
52
|
+
};
|
|
53
|
+
onToggle: {
|
|
54
|
+
action: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
parameters: {
|
|
58
|
+
layout: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export default meta;
|
|
62
|
+
type Story = StoryObj<typeof meta>;
|
|
63
|
+
export declare const Default: Story;
|
|
64
|
+
export declare const Expanded: Story;
|
|
65
|
+
export declare const WithBrandSlot: Story;
|
|
66
|
+
export declare const WithFooterSlot: Story;
|
|
67
|
+
export declare const NoToggle: Story;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import type { MenuItem } from '../components/Navbar/types';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
7
|
+
P: {};
|
|
8
|
+
B: {};
|
|
9
|
+
D: {};
|
|
10
|
+
C: {};
|
|
11
|
+
M: {};
|
|
12
|
+
Defaults: {};
|
|
13
|
+
}, Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
14
|
+
__isFragment?: never;
|
|
15
|
+
__isTeleport?: never;
|
|
16
|
+
__isSuspense?: never;
|
|
17
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
18
|
+
$slots: {
|
|
19
|
+
item?: (props: {
|
|
20
|
+
item: MenuItem;
|
|
21
|
+
}) => any;
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
tags: string[];
|
|
25
|
+
parameters: {
|
|
26
|
+
layout: string;
|
|
27
|
+
};
|
|
28
|
+
render: (args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
29
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
30
|
+
P: {};
|
|
31
|
+
B: {};
|
|
32
|
+
D: {};
|
|
33
|
+
C: {};
|
|
34
|
+
M: {};
|
|
35
|
+
Defaults: {};
|
|
36
|
+
}, Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
37
|
+
__isFragment?: never;
|
|
38
|
+
__isTeleport?: never;
|
|
39
|
+
__isSuspense?: never;
|
|
40
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
41
|
+
$slots: {
|
|
42
|
+
item?: (props: {
|
|
43
|
+
item: MenuItem;
|
|
44
|
+
}) => any;
|
|
45
|
+
};
|
|
46
|
+
})>) => {
|
|
47
|
+
components: {
|
|
48
|
+
KNavbarMenu: {
|
|
49
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
50
|
+
P: {};
|
|
51
|
+
B: {};
|
|
52
|
+
D: {};
|
|
53
|
+
C: {};
|
|
54
|
+
M: {};
|
|
55
|
+
Defaults: {};
|
|
56
|
+
}, Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
57
|
+
__isFragment?: never;
|
|
58
|
+
__isTeleport?: never;
|
|
59
|
+
__isSuspense?: never;
|
|
60
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
61
|
+
$slots: {
|
|
62
|
+
item?: (props: {
|
|
63
|
+
item: MenuItem;
|
|
64
|
+
}) => any;
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
setup(this: void): {
|
|
69
|
+
args: import("@storybook/vue3-vite").ComponentPropsAndSlots<{
|
|
70
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
71
|
+
P: {};
|
|
72
|
+
B: {};
|
|
73
|
+
D: {};
|
|
74
|
+
C: {};
|
|
75
|
+
M: {};
|
|
76
|
+
Defaults: {};
|
|
77
|
+
}, Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
78
|
+
__isFragment?: never;
|
|
79
|
+
__isTeleport?: never;
|
|
80
|
+
__isSuspense?: never;
|
|
81
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").KNavbarMenuProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
82
|
+
$slots: {
|
|
83
|
+
item?: (props: {
|
|
84
|
+
item: MenuItem;
|
|
85
|
+
}) => any;
|
|
86
|
+
};
|
|
87
|
+
})>;
|
|
88
|
+
};
|
|
89
|
+
template: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export default meta;
|
|
93
|
+
type Story = StoryObj<typeof meta>;
|
|
94
|
+
export declare const Default: Story;
|
|
95
|
+
export declare const FlatItems: Story;
|
|
96
|
+
export declare const WithBadges: Story;
|
|
97
|
+
export declare const NestedItems: Story;
|
|
98
|
+
export declare const NoIcons: Story;
|
|
99
|
+
export declare const ClickHandlers: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function capitalize(value: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knitify/vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -12,16 +12,18 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"devDependencies": {
|
|
15
|
+
"@storybook/vue3-vite": "^10.4.0",
|
|
15
16
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
17
|
+
"storybook": "^10.4.0",
|
|
16
18
|
"typescript": "^5.9.3",
|
|
17
19
|
"vite": "^7.3.1",
|
|
18
20
|
"vue": "^3.5.12",
|
|
19
21
|
"vue-router": "^4.0.3",
|
|
20
22
|
"vue-tsc": "^3.2.5",
|
|
21
|
-
"@knitify/core": "1.0.
|
|
23
|
+
"@knitify/core": "1.0.11"
|
|
22
24
|
},
|
|
23
25
|
"peerDependencies": {
|
|
24
|
-
"@knitify/core": "^1.0.
|
|
26
|
+
"@knitify/core": "^1.0.10",
|
|
25
27
|
"vue": "^3.5.12",
|
|
26
28
|
"vue-router": "^4.0.3"
|
|
27
29
|
},
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
"scripts": {
|
|
32
34
|
"dev": "vite --mode development",
|
|
33
35
|
"build": "vite build",
|
|
34
|
-
"compile": "vite build && vue-tsc --declaration --emitDeclarationOnly"
|
|
36
|
+
"compile": "vite build && vue-tsc --declaration --emitDeclarationOnly",
|
|
37
|
+
"storybook": "storybook dev -p 6006",
|
|
38
|
+
"storybook:build": "storybook build"
|
|
35
39
|
}
|
|
36
40
|
}
|