ketekny-ui-kit 1.0.107 → 1.0.108

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.107",
4
+ "version": "1.0.108",
5
5
  "description": "A Vue 3 UI component library with Tailwind CSS styling",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -117,12 +117,15 @@ export default {
117
117
  const words = this.title.trim().split(/\s+/).filter(Boolean)
118
118
  return words.slice(0, 3).map(word => word.charAt(0)).join('').toUpperCase()
119
119
  },
120
+ hasAccount() {
121
+ return Boolean(this.account)
122
+ },
120
123
  accountDisplayName() {
121
- if (!this.account) return 'Ava Mitchell'
124
+ if (!this.account) return ''
122
125
  return [this.account.firstName, this.account.lastName].filter(Boolean).join(' ') || 'Account'
123
126
  },
124
127
  accountEmail() {
125
- return this.account?.email || 'ava@nimbus.io'
128
+ return this.account?.email || ''
126
129
  },
127
130
  filteredMenu() {
128
131
  const q = this.query.trim().toLowerCase()
@@ -186,6 +189,7 @@ export default {
186
189
  return this.footerLinks.filter(link => link.id !== 'my-profile')
187
190
  },
188
191
  accountMenuLinks() {
192
+ if (!this.hasAccount) return []
189
193
  return [
190
194
  {
191
195
  label: 'Το προφίλ μου',
@@ -561,7 +565,10 @@ export default {
561
565
  >
562
566
  <template v-if="collapsed">
563
567
  <button
564
- v-for="link in footerLinks"
568
+ v-for="link in hasAccount ? footerLinks : [
569
+ { id: 'signin', label: 'Σύνδεση', icon: 'CircleUser' },
570
+ { id: 'signup', label: 'Εγγραφή', icon: 'UserRound' },
571
+ ]"
565
572
  :key="link.id"
566
573
  type="button"
567
574
  v-tooltip.right="link.label"
@@ -575,7 +582,7 @@ export default {
575
582
  : 'text-[var(--sidebar-text-soft)] hover:bg-[var(--sidebar-hover)] hover:text-[var(--sidebar-text)]',
576
583
  ]"
577
584
  :aria-label="link.label"
578
- @click="handleFooterSelect(link.id)"
585
+ @click="hasAccount ? handleFooterSelect(link.id) : $emit(link.id)"
579
586
  >
580
587
  <component
581
588
  :is="link.icon"
@@ -591,7 +598,7 @@ export default {
591
598
  />
592
599
  </button>
593
600
  </template>
594
- <template v-else>
601
+ <template v-else-if="hasAccount">
595
602
  <kMenu
596
603
  class="block w-full"
597
604
  :links="accountMenuLinks"
@@ -621,6 +628,26 @@ export default {
621
628
  </template>
622
629
  </kMenu>
623
630
  </template>
631
+ <template v-else>
632
+ <div class="flex items-center gap-2">
633
+ <button
634
+ type="button"
635
+ class="flex min-h-[44px] flex-1 items-center justify-center rounded-lg bg-brand px-3 py-2 text-sm font-semibold text-brand-foreground transition-opacity hover:opacity-90"
636
+ @click="$emit('signin')"
637
+ >
638
+ <CircleUser class="mr-2 size-4 shrink-0" :stroke-width="2" />
639
+ Σύνδεση
640
+ </button>
641
+ <button
642
+ type="button"
643
+ class="flex min-h-[44px] flex-1 items-center justify-center rounded-lg border border-[var(--sidebar-border)] bg-[var(--sidebar-surface)] px-3 py-2 text-sm font-semibold text-[var(--sidebar-text)] transition-colors hover:bg-[var(--sidebar-hover)]"
644
+ @click="$emit('signup')"
645
+ >
646
+ <UserRound class="mr-2 size-4 shrink-0" :stroke-width="2" />
647
+ Εγγραφή
648
+ </button>
649
+ </div>
650
+ </template>
624
651
  </div>
625
652
 
626
653
  <div