ketekny-ui-kit 1.0.71 → 1.0.72

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ketekny-ui-kit",
3
3
  "type": "module",
4
- "version": "1.0.71",
4
+ "version": "1.0.72",
5
5
  "description": "A Vue 3 UI component library with Tailwind CSS styling",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -270,7 +270,6 @@
270
270
  import { h } from "vue";
271
271
  import kButton from "../ui/kButton.vue";
272
272
  import kIcon from "../ui/kIcon.vue";
273
- import { RouterLink } from "vue-router";
274
273
 
275
274
  const SidebarIconLink = {
276
275
  props: {
@@ -289,20 +288,24 @@ const SidebarIconLink = {
289
288
  methods: {
290
289
  handleClick(event) {
291
290
  if (this.onClick) this.onClick(event);
291
+
292
+ if (this.to && this.$router) {
293
+ event?.preventDefault?.();
294
+ this.$router.push(this.to);
295
+ }
292
296
  },
293
297
  },
294
298
  render() {
295
299
  const isLink = Boolean(this.to);
296
- const tag = isLink ? RouterLink : this.isExternal ? "a" : "button";
300
+ const tag = this.isExternal ? "a" : "button";
297
301
 
298
302
  return h(
299
303
  tag,
300
304
  {
301
- to: this.to,
302
305
  href: this.href,
303
306
  target: this.isExternal ? this.target : null,
304
307
  rel: this.isExternal ? this.rel : null,
305
- type: isLink || this.isExternal ? null : "button",
308
+ type: this.isExternal ? null : "button",
306
309
  title: this.title,
307
310
  class: [
308
311
  "group relative flex h-14 w-14 items-center justify-center rounded-xl border border-white/15 transition",
@@ -310,7 +313,8 @@ const SidebarIconLink = {
310
313
  ? "bg-slate-950 text-white"
311
314
  : this.warning
312
315
  ? "bg-[#d97706] text-white hover:bg-[#b45309]"
313
- : "bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10",
316
+ : "bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10",
317
+ isLink ? "cursor-pointer" : "",
314
318
  ],
315
319
  onClick: this.handleClick,
316
320
  },
@@ -325,7 +329,6 @@ export default {
325
329
  components: {
326
330
  kButton,
327
331
  kIcon,
328
- RouterLink,
329
332
  SidebarIconLink,
330
333
  },
331
334
  emits: ["logo-click", "signin", "signup", "signout", "edit-profile"],