ketekny-ui-kit 1.0.65 → 1.0.67

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.65",
4
+ "version": "1.0.67",
5
5
  "description": "A Vue 3 UI component library with Tailwind CSS styling",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -25,22 +25,37 @@
25
25
  >
26
26
  <div class="relative border-b border-white/10">
27
27
  <button
28
- v-if="logoSrc || title"
28
+ v-if="logoSrc"
29
29
  type="button"
30
30
  class="block w-full text-left"
31
31
  v-tooltip.right.html="isSidebarCollapsed ? collapsedContactTooltip : logoAlt"
32
32
  @click="$emit('logo-click')"
33
33
  >
34
34
  <img
35
- v-if="logoSrc"
36
35
  :alt="logoAlt"
37
36
  :src="isSidebarCollapsed ? collapsedLogoSrc : logoSrc"
38
37
  class="cursor-pointer px-4 py-4 transition-all duration-300"
39
38
  />
40
- <div v-if="title && !isSidebarCollapsed" class="py-3 mt-3 text-lg text-center bg-white/10">
41
- {{ title }}
42
- </div>
43
39
  </button>
40
+ <div v-if="title && !isSidebarCollapsed" class="py-3 mt-3 text-lg text-center bg-[#da0000]">
41
+ {{ title }}
42
+ </div>
43
+ <div v-if="showSponsors && !isSidebarCollapsed" class="flex flex-col gap-3 px-4 py-4 bg-[#0f4e8d]">
44
+ <div>
45
+ <img
46
+ src="https://s3.ketekny.gr/public/web-apps/sponsors/Greece 2.0_NextGeneration_White_gr.png"
47
+ alt="Tameio Anakampsis"
48
+ class="mx-auto max-h-16 w-auto object-contain"
49
+ />
50
+ </div>
51
+ <div>
52
+ <img
53
+ src="https://s3.ketekny.gr/public/web-apps/sponsors/yp_ygeias_dark.png"
54
+ alt="Ypourgeio Ygeias"
55
+ class="mx-auto max-h-16 w-auto object-contain"
56
+ />
57
+ </div>
58
+ </div>
44
59
 
45
60
  <slot name="sidebar-header" />
46
61
 
@@ -126,8 +141,8 @@
126
141
  <p v-if="account.loggedIn" class="mt-2 truncate text-lg font-semibold text-white">
127
142
  {{ accountDisplayName }}
128
143
  </p>
129
- <p v-if="account.loggedIn && account.email" class="truncate text-sm text-slate-300">
130
- {{ account.email }}
144
+ <p v-if="account.loggedIn && displayEmail" class="truncate text-sm text-slate-300">
145
+ {{ displayEmail }}
131
146
  </p>
132
147
  </div>
133
148
  <div class="flex flex-wrap gap-2">
@@ -176,8 +191,8 @@
176
191
  <span class="whitespace-nowrap">Βερανζέρου 13, 10677, Αθήνα</span>
177
192
  <span class="whitespace-nowrap">210 3648 337</span>
178
193
  <span class="whitespace-nowrap">
179
- <a href="mailto:grammateia@ketekny.gr" class="whitespace-nowrap hover:underline">
180
- grammateia@ketekny.gr
194
+ <a :href="`mailto:${contactEmail}`" class="whitespace-nowrap hover:underline">
195
+ {{ contactEmail }}
181
196
  </a>
182
197
  </span>
183
198
  <a
@@ -203,6 +218,7 @@
203
218
  </template>
204
219
 
205
220
  <script>
221
+ import { h } from 'vue'
206
222
  import kButton from '../ui/kButton.vue'
207
223
  import kIcon from '../ui/kIcon.vue'
208
224
  import { RouterLink } from 'vue-router'
@@ -226,23 +242,32 @@ const SidebarIconLink = {
226
242
  if (this.onClick) this.onClick(event)
227
243
  },
228
244
  },
229
- template: `
230
- <component
231
- :is="to ? RouterLink : isExternal ? 'a' : 'button'"
232
- :to="to"
233
- :href="href"
234
- :target="isExternal ? target : null"
235
- :rel="isExternal ? rel : null"
236
- :type="to || isExternal ? null : 'button'"
237
- :title="title"
238
- class="group relative flex h-14 w-14 items-center justify-center rounded-xl border border-white/15 transition"
239
- :class="active ? 'bg-slate-950 text-white' : warning ? 'bg-[#d97706] text-white hover:bg-[#b45309]' : 'bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10'"
240
- @click="handleClick"
241
- >
242
- <kIcon :name="icon" size="20" class="text-current" />
243
- </component>
244
- `,
245
- components: { RouterLink, kIcon },
245
+ render() {
246
+ const isLink = Boolean(this.to)
247
+ const tag = isLink ? RouterLink : this.isExternal ? 'a' : 'button'
248
+
249
+ return h(
250
+ tag,
251
+ {
252
+ to: this.to,
253
+ href: this.href,
254
+ target: this.isExternal ? this.target : null,
255
+ rel: this.isExternal ? this.rel : null,
256
+ type: isLink || this.isExternal ? null : 'button',
257
+ title: this.title,
258
+ class: [
259
+ 'group relative flex h-14 w-14 items-center justify-center rounded-xl border border-white/15 transition',
260
+ this.active
261
+ ? 'bg-slate-950 text-white'
262
+ : this.warning
263
+ ? 'bg-[#d97706] text-white hover:bg-[#b45309]'
264
+ : 'bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10',
265
+ ],
266
+ onClick: this.handleClick,
267
+ },
268
+ [h(kIcon, { name: this.icon, size: '20', color: '#ffffff' })]
269
+ )
270
+ },
246
271
  }
247
272
 
248
273
  const DEFAULT_STORAGE_KEY = 'two-col-layout-sidebar-collapsed'
@@ -267,11 +292,13 @@ export default {
267
292
  expandLabel: { type: String, default: 'Expand sidebar' },
268
293
  collapseIcon: { type: String, default: 'ArrowLeftToLine' },
269
294
  expandIcon: { type: String, default: 'ArrowRightToLine' },
295
+ showSponsors: { type: Boolean, default: false },
270
296
  storageKey: { type: String, default: DEFAULT_STORAGE_KEY },
271
- defaultCollapsed: { type: Boolean, default: false },
272
- mainMenu: { type: Array, default: () => [] },
273
- showContactInfo: { type: Boolean, default: false },
274
- account: { type: Object, default: null },
297
+ defaultCollapsed: { type: Boolean, default: false },
298
+ mainMenu: { type: Array, default: () => [] },
299
+ showContactInfo: { type: Boolean, default: false },
300
+ account: { type: Object, default: null },
301
+ contactEmail: { type: String, default: 'grammateia@ketekny.gr' },
275
302
  },
276
303
  data() {
277
304
  return {
@@ -373,6 +400,9 @@ export default {
373
400
  if (!this.account) return ''
374
401
  return [this.account.firstName, this.account.lastName].filter(Boolean).join(' ').trim() || 'Account'
375
402
  },
403
+ displayEmail() {
404
+ return this.account?.email || ''
405
+ },
376
406
  collapsedContactTooltip() {
377
407
  return `
378
408
  <div style="min-width: 220px;">
@@ -382,7 +412,7 @@ export default {
382
412
  <div style="display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.4; color: rgba(255,255,255,0.9);">
383
413
  <div>Βερανζέρου 13, 10677, Αθήνα</div>
384
414
  <div>210 3648 337</div>
385
- <div>grammateia@ketekny.gr</div>
415
+ <div>${this.contactEmail}</div>
386
416
  <div>https://ketekny.gr</div>
387
417
  </div>
388
418
  </div>