ketekny-ui-kit 1.0.72 → 1.0.74
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/package.json +1 -5
- package/src/layout/twoColLayout.vue +32 -17
- package/src/style/style.css +0 -3
- package/src/ui/kSpinner.vue +23 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ketekny-ui-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.74",
|
|
5
5
|
"description": "A Vue 3 UI component library with Tailwind CSS styling",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -38,16 +38,12 @@
|
|
|
38
38
|
"vite": "^6.3.5"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@primeuix/themes": "^1.1.1",
|
|
42
|
-
"@vuepic/vue-datepicker": "^11.0.2",
|
|
43
41
|
"class-variance-authority": "^0.7.1",
|
|
44
42
|
"clsx": "^2.1.1",
|
|
45
43
|
"dayjs": "1.11.19",
|
|
46
44
|
"element-plus": "^2.13.5",
|
|
47
45
|
"lucide-vue-next": "^0.511.0",
|
|
48
46
|
"moment": "^2.30.1",
|
|
49
|
-
"primeicons": "^7.0.0",
|
|
50
|
-
"primevue": "^4.3.4",
|
|
51
47
|
"reka-ui": "^2.8.2",
|
|
52
48
|
"simple-code-editor": "^2.0.9",
|
|
53
49
|
"tailwind-merge": "^3.5.0",
|
|
@@ -72,13 +72,7 @@
|
|
|
72
72
|
:key="item.key"
|
|
73
73
|
:icon="item.icon"
|
|
74
74
|
:active="item.active"
|
|
75
|
-
|
|
76
|
-
:href="item.href"
|
|
77
|
-
:title="item.title"
|
|
78
|
-
:is-external="item.isExternal"
|
|
79
|
-
:target="item.target"
|
|
80
|
-
:rel="item.rel"
|
|
81
|
-
:on-click="item.onClick"
|
|
75
|
+
v-bind="item.bindings"
|
|
82
76
|
v-tooltip.right="item.label"
|
|
83
77
|
/>
|
|
84
78
|
</div>
|
|
@@ -266,10 +260,11 @@
|
|
|
266
260
|
</div>
|
|
267
261
|
</template>
|
|
268
262
|
|
|
269
|
-
<script>
|
|
263
|
+
<script>
|
|
270
264
|
import { h } from "vue";
|
|
271
265
|
import kButton from "../ui/kButton.vue";
|
|
272
266
|
import kIcon from "../ui/kIcon.vue";
|
|
267
|
+
import { RouterLink } from "vue-router";
|
|
273
268
|
|
|
274
269
|
const SidebarIconLink = {
|
|
275
270
|
props: {
|
|
@@ -288,24 +283,20 @@ const SidebarIconLink = {
|
|
|
288
283
|
methods: {
|
|
289
284
|
handleClick(event) {
|
|
290
285
|
if (this.onClick) this.onClick(event);
|
|
291
|
-
|
|
292
|
-
if (this.to && this.$router) {
|
|
293
|
-
event?.preventDefault?.();
|
|
294
|
-
this.$router.push(this.to);
|
|
295
|
-
}
|
|
296
286
|
},
|
|
297
287
|
},
|
|
298
288
|
render() {
|
|
299
289
|
const isLink = Boolean(this.to);
|
|
300
|
-
const tag = this.isExternal ? "a" : "button";
|
|
290
|
+
const tag = isLink ? RouterLink : this.isExternal ? "a" : "button";
|
|
301
291
|
|
|
302
292
|
return h(
|
|
303
293
|
tag,
|
|
304
294
|
{
|
|
295
|
+
to: isLink ? this.to : undefined,
|
|
305
296
|
href: this.href,
|
|
306
297
|
target: this.isExternal ? this.target : null,
|
|
307
298
|
rel: this.isExternal ? this.rel : null,
|
|
308
|
-
type: this.isExternal ? null : "button",
|
|
299
|
+
type: isLink || this.isExternal ? null : "button",
|
|
309
300
|
title: this.title,
|
|
310
301
|
class: [
|
|
311
302
|
"group relative flex h-14 w-14 items-center justify-center rounded-xl border border-white/15 transition",
|
|
@@ -329,6 +320,7 @@ export default {
|
|
|
329
320
|
components: {
|
|
330
321
|
kButton,
|
|
331
322
|
kIcon,
|
|
323
|
+
RouterLink,
|
|
332
324
|
SidebarIconLink,
|
|
333
325
|
},
|
|
334
326
|
emits: ["logo-click", "signin", "signup", "signout", "edit-profile"],
|
|
@@ -418,8 +410,8 @@ export default {
|
|
|
418
410
|
this.persistSidebarState();
|
|
419
411
|
},
|
|
420
412
|
menuItemTag(item) {
|
|
421
|
-
if (item?.
|
|
422
|
-
if (item?.
|
|
413
|
+
if (item?.to) return RouterLink;
|
|
414
|
+
if (item?.href) return "a";
|
|
423
415
|
return "button";
|
|
424
416
|
},
|
|
425
417
|
},
|
|
@@ -461,6 +453,29 @@ export default {
|
|
|
461
453
|
};
|
|
462
454
|
});
|
|
463
455
|
},
|
|
456
|
+
menuItemBindings(item) {
|
|
457
|
+
if (item?.to) {
|
|
458
|
+
return {
|
|
459
|
+
to: item.to,
|
|
460
|
+
title: item.title || item.label,
|
|
461
|
+
"aria-current": item.active ? "page" : null,
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (item?.href) {
|
|
466
|
+
return {
|
|
467
|
+
href: item.href,
|
|
468
|
+
target: item.target || "_blank",
|
|
469
|
+
rel: item.rel || "noreferrer",
|
|
470
|
+
title: item.title || item.label,
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return {
|
|
475
|
+
type: "button",
|
|
476
|
+
title: item?.title || item?.label,
|
|
477
|
+
};
|
|
478
|
+
},
|
|
464
479
|
accountDisplayName() {
|
|
465
480
|
if (!this.account) return "";
|
|
466
481
|
return (
|
package/src/style/style.css
CHANGED
package/src/ui/kSpinner.vue
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex items-center justify-center w-16 space-x-1" v-if="type == 'line'">
|
|
3
|
-
<
|
|
3
|
+
<span class="spinner-ring spinner-ring--sm ml-1 text-primary dark:text-sky-200" aria-hidden="true" />
|
|
4
4
|
<div class="w-2 h-2 rounded-full bg-primary dark:bg-sky-200 animate-fade" :style="{ animationDelay: '0s' }"></div>
|
|
5
5
|
<div class="w-2 h-2 rounded-full bg-primary dark:bg-sky-200 animate-fade" :style="{ animationDelay: '0.15s' }"></div>
|
|
6
6
|
<div class="w-2 h-2 rounded-full bg-primary dark:bg-sky-200 animate-fade" :style="{ animationDelay: '0.3s' }"></div>
|
|
7
7
|
<div class="w-2 h-2 rounded-full bg-primary dark:bg-sky-200 animate-fade" :style="{ animationDelay: '0.45s' }"></div>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
<
|
|
10
|
+
<span class="spinner-ring mr-2 text-primary dark:text-sky-200" aria-hidden="true" v-else-if="type == 'circle'" />
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script setup>
|
|
14
|
-
import { Loader } from "lucide-vue-next";
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
13
|
<script>
|
|
18
14
|
export default {
|
|
19
15
|
name: "FourDotSpinner",
|
|
@@ -35,4 +31,25 @@ export default {
|
|
|
35
31
|
.animate-fade {
|
|
36
32
|
animation: fade 1s ease-in-out infinite;
|
|
37
33
|
}
|
|
34
|
+
|
|
35
|
+
.spinner-ring {
|
|
36
|
+
width: 1.5rem;
|
|
37
|
+
height: 1.5rem;
|
|
38
|
+
border-radius: 9999px;
|
|
39
|
+
border: 2px solid currentColor;
|
|
40
|
+
border-top-color: transparent;
|
|
41
|
+
animation: spin 1s linear infinite;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.spinner-ring--sm {
|
|
46
|
+
width: 1rem;
|
|
47
|
+
height: 1rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes spin {
|
|
51
|
+
to {
|
|
52
|
+
transform: rotate(360deg);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
38
55
|
</style>
|