@cloudron/pankow 3.6.5 → 3.6.6
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/components/SideBar.vue +51 -9
- package/package.json +2 -2
- package/tooltip.js +11 -9
package/components/SideBar.vue
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
import { ref, useTemplateRef, onMounted } from 'vue';
|
|
4
4
|
import { onSwipe } from '../gestures.js';
|
|
5
5
|
|
|
6
|
+
defineProps({
|
|
7
|
+
showOpenAction: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: true
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
6
13
|
const sideBar = useTemplateRef('sideBar');
|
|
7
14
|
const isVisible = ref(false);
|
|
8
15
|
|
|
@@ -25,23 +32,33 @@ defineExpose({ open, close });
|
|
|
25
32
|
</script>
|
|
26
33
|
|
|
27
34
|
<template>
|
|
28
|
-
<div class="pankow-sidebar"
|
|
29
|
-
<Transition name="pankow-
|
|
30
|
-
<div class="pankow-sidebar-
|
|
31
|
-
<div class="pankow-sidebar-open-action" v-else @click="open()"><i class="fa-solid fa-bars"></i></div>
|
|
35
|
+
<div class="pankow-sidebar-container" :class="{ 'pankow-sidebar-open': isVisible }">
|
|
36
|
+
<Transition name="pankow-fade">
|
|
37
|
+
<div class="pankow-sidebar-backdrop" @click="close"></div>
|
|
32
38
|
</Transition>
|
|
33
|
-
<div class="pankow-sidebar-
|
|
34
|
-
<
|
|
39
|
+
<div class="pankow-sidebar" ref="sideBar" :class="{ 'pankow-sidebar-closed': !isVisible }">
|
|
40
|
+
<Transition name="pankow-scale">
|
|
41
|
+
<div class="pankow-sidebar-close-action" v-if="isVisible" @click="close()"><i class="fa-solid fa-xmark"></i></div>
|
|
42
|
+
<div class="pankow-sidebar-open-action" v-else-if="showOpenAction" @click="open()"><i class="fa-solid fa-bars"></i></div>
|
|
43
|
+
</Transition>
|
|
44
|
+
<div class="pankow-sidebar-inner">
|
|
45
|
+
<slot></slot>
|
|
46
|
+
</div>
|
|
35
47
|
</div>
|
|
36
48
|
</div>
|
|
37
49
|
</template>
|
|
38
50
|
|
|
39
51
|
<style>
|
|
40
52
|
|
|
41
|
-
.pankow-sidebar {
|
|
53
|
+
.pankow-sidebar-container {
|
|
42
54
|
display: block;
|
|
43
55
|
height: 100%;
|
|
44
56
|
min-width: 220px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pankow-sidebar {
|
|
60
|
+
display: block;
|
|
61
|
+
height: 100%;
|
|
45
62
|
overflow: auto;
|
|
46
63
|
}
|
|
47
64
|
|
|
@@ -72,17 +89,42 @@ defineExpose({ open, close });
|
|
|
72
89
|
cursor: pointer;
|
|
73
90
|
}
|
|
74
91
|
|
|
92
|
+
.pankow-sidebar-backdrop {
|
|
93
|
+
display: none;
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
bottom: 0;
|
|
97
|
+
left: 0;
|
|
98
|
+
right: 0;
|
|
99
|
+
background-color: #000000aa;
|
|
100
|
+
}
|
|
101
|
+
|
|
75
102
|
@media (max-width: 576px) {
|
|
76
|
-
.pankow-sidebar {
|
|
103
|
+
.pankow-sidebar-container {
|
|
77
104
|
position: fixed;
|
|
78
105
|
left: 0;
|
|
79
106
|
top: 0;
|
|
80
|
-
width:
|
|
107
|
+
width: 0;
|
|
108
|
+
min-width: 0;
|
|
81
109
|
height: 100%;
|
|
82
110
|
z-index: 2000;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.pankow-sidebar-open {
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.pankow-sidebar {
|
|
118
|
+
position: absolute;
|
|
119
|
+
width: calc(70%);
|
|
120
|
+
left: 0;
|
|
83
121
|
transition: left 250ms ease-in-out;
|
|
84
122
|
}
|
|
85
123
|
|
|
124
|
+
.pankow-sidebar-open .pankow-sidebar-backdrop {
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
|
|
86
128
|
.pankow-sidebar-closed {
|
|
87
129
|
position: fixed;
|
|
88
130
|
left: -600px; /* depends on media query */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudron/pankow",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.6",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "types/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
33
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.4",
|
|
34
34
|
"highlight.js": "^11.11.1",
|
|
35
35
|
"typescript": "^5.9.3",
|
|
36
36
|
"vite": "^7.3.1",
|
package/tooltip.js
CHANGED
|
@@ -75,9 +75,9 @@ function update(target, modifiers, key) {
|
|
|
75
75
|
|
|
76
76
|
function mounted(el, binding, vnode) {
|
|
77
77
|
// generate running unique id
|
|
78
|
-
|
|
78
|
+
el.__pankow_id = id++;
|
|
79
79
|
|
|
80
|
-
const key =
|
|
80
|
+
const key = el.__pankow_id;
|
|
81
81
|
tooltips[key] = {
|
|
82
82
|
element: null,
|
|
83
83
|
value: binding.value
|
|
@@ -113,19 +113,21 @@ function mounted(el, binding, vnode) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
function updated(el, binding, vnode) {
|
|
116
|
-
if (!tooltips[
|
|
117
|
-
if (!binding.value) return remove(vnode.__pankow_id, el);
|
|
116
|
+
if (!tooltips[el.__pankow_id]) return;
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
// still have to update the value of the tooltip in case it is cleared
|
|
119
|
+
tooltips[el.__pankow_id].value = binding.value;
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
if (!binding.value) return remove(el.__pankow_id, el);
|
|
122
|
+
|
|
123
|
+
update(el, binding.modifiers, el.__pankow_id);
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
function beforeUnmount(el, binding, vnode) {
|
|
125
|
-
if (!tooltips[
|
|
127
|
+
if (!tooltips[el.__pankow_id]) return;
|
|
126
128
|
|
|
127
|
-
remove(
|
|
128
|
-
delete tooltips[
|
|
129
|
+
remove(el.__pankow_id, el);
|
|
130
|
+
delete tooltips[el.__pankow_id];
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
const tooltip = {
|