@bagelink/vue 1.6.51 → 1.6.53
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/dist/components/Menu.vue.d.ts +2 -8
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts +0 -1
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +15 -15
- package/dist/style.css +1 -1
- package/dist/types/NavLink.d.ts +1 -1
- package/dist/types/NavLink.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Menu.vue +8 -15
- package/src/components/NavBar.vue +2 -2
- package/src/components/layout/AppSidebar.vue +1 -2
- package/src/components/layout/BottomMenu.vue +1 -1
- package/src/components/layout/SidebarMenu.vue +1 -1
- package/src/types/NavLink.ts +1 -1
package/dist/types/NavLink.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavLink.d.ts","sourceRoot":"","sources":["../../src/types/NavLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,
|
|
1
|
+
{"version":3,"file":"NavLink.d.ts","sourceRoot":"","sources":["../../src/types/NavLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB"}
|
package/package.json
CHANGED
package/src/components/Menu.vue
CHANGED
|
@@ -1,45 +1,38 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { NavLink } from '@bagelink/vue'
|
|
3
3
|
import { Btn, Icon, Dropdown } from '@bagelink/vue'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
icon: IconType
|
|
7
|
-
value: string
|
|
8
|
-
to: string
|
|
9
|
-
items?: MenuItem[]
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
defineProps<{ items: MenuItem[] }>()
|
|
5
|
+
defineProps<{ items: NavLink[] }>()
|
|
13
6
|
</script>
|
|
14
7
|
|
|
15
8
|
<template>
|
|
16
9
|
<div class="flex space-between m_w-100vw overflow m_-ms-1 m_px-05 m_py-025 bglTopMenu">
|
|
17
10
|
<div class="flex gap-025 m_gap-05">
|
|
18
|
-
<template v-for="item in items" :key="item.
|
|
19
|
-
<Dropdown v-if="item.
|
|
11
|
+
<template v-for="item in items" :key="item.label">
|
|
12
|
+
<Dropdown v-if="item.children" :value="item.label" iconEnd="keyboard_arrow_down">
|
|
20
13
|
<template #trigger="{ show }">
|
|
21
14
|
<Btn thin flat @click="show()">
|
|
22
15
|
<Icon :name="item.icon" size="0.8" style="margin-bottom: -0.1rem" />
|
|
23
16
|
<p class="-ms-025">
|
|
24
|
-
{{ item.
|
|
17
|
+
{{ item.label }}
|
|
25
18
|
</p>
|
|
26
19
|
<Icon name="keyboard_arrow_down" size="0.8" style="margin-bottom: -0.1rem" />
|
|
27
20
|
</Btn>
|
|
28
21
|
</template>
|
|
29
22
|
<Btn
|
|
30
|
-
v-for="subItem in item.
|
|
23
|
+
v-for="subItem in item.children" :key="subItem.label" thin flat :to="subItem.to"
|
|
31
24
|
class="block m_px-025"
|
|
32
25
|
>
|
|
33
26
|
<Icon :name="subItem.icon" size="0.8" style="margin-bottom: -0.1rem" />
|
|
34
27
|
<p class="-ms-025">
|
|
35
|
-
{{ subItem.
|
|
28
|
+
{{ subItem.label }}
|
|
36
29
|
</p>
|
|
37
30
|
</Btn>
|
|
38
31
|
</Dropdown>
|
|
39
32
|
<Btn v-else thin flat :to="item.to" class="m_px-025">
|
|
40
33
|
<Icon :name="item.icon" size="0.9" style="margin-bottom: -0.1rem" />
|
|
41
34
|
<p class="-ms-025">
|
|
42
|
-
{{ item.
|
|
35
|
+
{{ item.label }}
|
|
43
36
|
</p>
|
|
44
37
|
</Btn>
|
|
45
38
|
</template>
|
|
@@ -60,7 +60,7 @@ onMounted(calcIsOpen)
|
|
|
60
60
|
:key="link.label"
|
|
61
61
|
class="nav-button"
|
|
62
62
|
:to="link.to"
|
|
63
|
-
@click="link.
|
|
63
|
+
@click="link.action?.()"
|
|
64
64
|
>
|
|
65
65
|
<Icon :icon="link.icon" />
|
|
66
66
|
<div class="tooltip">
|
|
@@ -77,7 +77,7 @@ onMounted(calcIsOpen)
|
|
|
77
77
|
:key="link.label"
|
|
78
78
|
class="nav-button"
|
|
79
79
|
:to="link.to"
|
|
80
|
-
@click="link.
|
|
80
|
+
@click="link.action?.()"
|
|
81
81
|
>
|
|
82
82
|
<Icon :icon="link.icon" />
|
|
83
83
|
<div class="tooltip">
|
|
@@ -4,9 +4,8 @@ import { Btn, Icon } from '@bagelink/vue'
|
|
|
4
4
|
import { inject, computed, ref, watch } from 'vue'
|
|
5
5
|
import { useRoute } from 'vue-router'
|
|
6
6
|
|
|
7
|
-
// Extended interface for links
|
|
7
|
+
// Extended interface for links with active route tracking
|
|
8
8
|
interface LinkWithAction extends NavLink {
|
|
9
|
-
action?: () => void
|
|
10
9
|
activeRoutes?: string[] // נתיבים שצריכים להיות מסומנים כאקטיביים עבור הלינק הזה
|
|
11
10
|
}
|
|
12
11
|
|
|
@@ -20,7 +20,7 @@ defineProps<{
|
|
|
20
20
|
<slot name="brand" />
|
|
21
21
|
<Btn
|
|
22
22
|
v-for="(nav, i) in navLinks" :key="i" :to="nav.to" class="m_h-auto"
|
|
23
|
-
@click="nav.
|
|
23
|
+
@click="nav.action"
|
|
24
24
|
>
|
|
25
25
|
<Icon :icon="nav.icon" :size="1.4" class="m-0 line-height-14" />
|
|
26
26
|
<p class="m-0 pb-025 txt10 line-height-1 w60 menu-text">
|
|
@@ -47,7 +47,7 @@ const toggleMenu = useDebounceFn(() => {
|
|
|
47
47
|
v-bind="{
|
|
48
48
|
...(nav.to && { to: nav.to }),
|
|
49
49
|
...(nav.href && { href: nav.href }),
|
|
50
|
-
...(nav.
|
|
50
|
+
...(nav.action && { onClick: nav.action }),
|
|
51
51
|
}"
|
|
52
52
|
class="nav-button px-075 me-auto w-100"
|
|
53
53
|
>
|
package/src/types/NavLink.ts
CHANGED