ketekny-ui-kit 1.0.107 → 1.0.109
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,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<main class="flex min-h-
|
|
2
|
+
<main class="flex min-h-0 w-full max-w-none flex-1 flex-col overflow-y-auto bg-slate-100">
|
|
3
3
|
<div
|
|
4
4
|
v-if="showHeaderExtraBeforeTitle"
|
|
5
5
|
class="sticky z-30 border-b border-t border-slate-200 bg-slate-50 px-4 backdrop-blur sm:px-6 lg:px-8"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<main class="flex h-
|
|
2
|
+
<main class="flex min-h-0 w-full max-w-none flex-1 flex-col overflow-hidden bg-slate-100">
|
|
3
3
|
<section
|
|
4
4
|
v-if="hasTopSection"
|
|
5
5
|
class="shrink-0 bg-white px-4 pb-4 pb-0 pt-8 sm:px-6 lg:px-8"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
|
|
46
|
-
<div class="min-h-0 flex-1 overflow-hidden bg-slate-100 py-4">
|
|
47
|
-
<div class="mx-auto flex
|
|
46
|
+
<div class="flex min-h-0 flex-1 flex-col overflow-hidden bg-slate-100 py-4">
|
|
47
|
+
<div class="mx-auto flex min-h-0 w-full max-w-none flex-1 gap-2">
|
|
48
48
|
<aside class="ml-8 min-h-0 shrink-0 overflow-y-auto pr-4" :style="sidebarStyle">
|
|
49
49
|
<slot name="sidebar" />
|
|
50
50
|
</aside>
|
|
@@ -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 '
|
|
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 || '
|
|
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
|
|
@@ -26,14 +26,16 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
</MultilevelSidebar>
|
|
28
28
|
|
|
29
|
-
<main class="flex min-h-0 flex-1 flex-col overflow-
|
|
29
|
+
<main class="flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
30
30
|
<div
|
|
31
31
|
v-if="$slots.header"
|
|
32
32
|
class="sticky top-0 z-20 shrink-0"
|
|
33
33
|
>
|
|
34
34
|
<slot name="header" />
|
|
35
35
|
</div>
|
|
36
|
-
<
|
|
36
|
+
<div class="flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
37
|
+
<slot />
|
|
38
|
+
</div>
|
|
37
39
|
</main>
|
|
38
40
|
|
|
39
41
|
<button
|