ketekny-ui-kit 1.0.71 → 1.0.73
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 -1
- package/src/layout/twoColLayout.vue +30 -12
package/package.json
CHANGED
|
@@ -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,7 +260,7 @@
|
|
|
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";
|
|
@@ -298,7 +292,7 @@ const SidebarIconLink = {
|
|
|
298
292
|
return h(
|
|
299
293
|
tag,
|
|
300
294
|
{
|
|
301
|
-
to: this.to,
|
|
295
|
+
to: isLink ? this.to : undefined,
|
|
302
296
|
href: this.href,
|
|
303
297
|
target: this.isExternal ? this.target : null,
|
|
304
298
|
rel: this.isExternal ? this.rel : null,
|
|
@@ -310,7 +304,8 @@ const SidebarIconLink = {
|
|
|
310
304
|
? "bg-slate-950 text-white"
|
|
311
305
|
: this.warning
|
|
312
306
|
? "bg-[#d97706] text-white hover:bg-[#b45309]"
|
|
313
|
-
|
|
307
|
+
: "bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10",
|
|
308
|
+
isLink ? "cursor-pointer" : "",
|
|
314
309
|
],
|
|
315
310
|
onClick: this.handleClick,
|
|
316
311
|
},
|
|
@@ -415,8 +410,8 @@ export default {
|
|
|
415
410
|
this.persistSidebarState();
|
|
416
411
|
},
|
|
417
412
|
menuItemTag(item) {
|
|
418
|
-
if (item?.
|
|
419
|
-
if (item?.
|
|
413
|
+
if (item?.to) return RouterLink;
|
|
414
|
+
if (item?.href) return "a";
|
|
420
415
|
return "button";
|
|
421
416
|
},
|
|
422
417
|
},
|
|
@@ -458,6 +453,29 @@ export default {
|
|
|
458
453
|
};
|
|
459
454
|
});
|
|
460
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
|
+
},
|
|
461
479
|
accountDisplayName() {
|
|
462
480
|
if (!this.account) return "";
|
|
463
481
|
return (
|