@cloudron/pankow 3.6.2 → 3.6.4

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.
@@ -71,7 +71,6 @@ function onClick(event) {
71
71
  user-select: none;
72
72
  white-space: nowrap;
73
73
  text-align: center;
74
- border: none;
75
74
  padding: var(--pankow-input-vertial-padding) max(12px, var(--pankow-input-horizontal-padding));
76
75
  border-radius: var(--pankow-border-radius);
77
76
  text-decoration: none;
@@ -15,6 +15,10 @@ const props = defineProps({
15
15
  type: Boolean,
16
16
  default: false,
17
17
  },
18
+ showTrack: {
19
+ type: Boolean,
20
+ default: true,
21
+ },
18
22
  busy: {
19
23
  type: Boolean,
20
24
  default: false,
@@ -33,10 +37,12 @@ const normalizedValue = computed(() => {
33
37
  <template>
34
38
  <div class="pankow-progress-bar">
35
39
  <div class="pankow-progress-bar-label" v-show="showLabel"><slot>{{ value + ' %' }}</slot></div>
36
- <div v-if="mode !== 'indeterminate'" class="pankow-progress-bar-filled" :style="{ width: normalizedValue+'%', height: slim ? '2px' : '6px' }">
37
- <div v-if="busy" class="pankow-progress-bar-glow" :style="{ height: slim ? '2px' : '6px' }"></div>
40
+ <div :class="{ 'pankow-progress-bar-background': showTrack }">
41
+ <div v-if="mode !== 'indeterminate'" class="pankow-progress-bar-filled" :style="{ width: normalizedValue+'%', height: slim ? '2px' : '6px' }">
42
+ <div v-if="busy" class="pankow-progress-bar-glow" :style="{ height: slim ? '2px' : '6px' }"></div>
43
+ </div>
44
+ <div v-else class="pankow-progress-bar-indeterminate" :style="{ height: slim ? '2px' : '6px' }"></div>
38
45
  </div>
39
- <div v-else class="pankow-progress-bar-indeterminate" :style="{ height: slim ? '2px' : '6px' }"></div>
40
46
  </div>
41
47
  </template>
42
48
 
@@ -54,6 +60,17 @@ const normalizedValue = computed(() => {
54
60
  padding-bottom: 3px;
55
61
  }
56
62
 
63
+ .pankow-progress-bar-background {
64
+ border-radius: var(--pankow-border-radius);
65
+ background-color: var(--pankow-color-light-dark);
66
+ }
67
+
68
+ @media (prefers-color-scheme: dark) {
69
+ .pankow-progress-bar-background {
70
+ background-color: var(--pankow-input-background-color);
71
+ }
72
+ }
73
+
57
74
  .pankow-progress-bar-filled {
58
75
  position: relative;
59
76
  background-color: var(--pankow-color-primary);
@@ -89,7 +106,6 @@ const normalizedValue = computed(() => {
89
106
  height: 6px;
90
107
  display: block;
91
108
  position: relative;
92
- background: rgba(255, 255, 255, 0.15);
93
109
  overflow: hidden;
94
110
  border-radius: calc(var(--pankow-border-radius) / 1.5);
95
111
  }
@@ -114,7 +114,7 @@ onMounted(() => {
114
114
  <tbody>
115
115
  <tr v-if="busy">
116
116
  <td :colspan="Object.keys(columns).length" style="text-align: center; padding: 20px;">
117
- <ProgressBar mode="indeterminate" :show-label="false" :slim="true" v-show="finalBusy"/>
117
+ <ProgressBar mode="indeterminate" :show-track="false" :show-label="false" :slim="true" v-show="finalBusy"/>
118
118
  </td>
119
119
  </tr>
120
120
  <tr v-else-if="!busy && sortedItems.length === 0">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.6.2",
4
+ "version": "3.6.4",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
package/tooltip.js CHANGED
@@ -38,6 +38,8 @@ function isElementHidden(element) {
38
38
  }
39
39
 
40
40
  function remove(key, target) {
41
+ if (!tooltips[key]) return;
42
+
41
43
  if (tooltips[key].element) tooltips[key].element.remove();
42
44
 
43
45
  tooltips[key].element = null;
@@ -77,6 +79,7 @@ function mounted(el, binding, vnode) {
77
79
  };
78
80
 
79
81
  el.addEventListener('mouseenter', () => {
82
+ if (!tooltips[key]) return;
80
83
  if (!tooltips[key].value) return;
81
84
 
82
85
  const element = document.createElement('div');
@@ -105,7 +108,8 @@ function mounted(el, binding, vnode) {
105
108
  }
106
109
 
107
110
  function updated(el, binding, vnode) {
108
- if (!binding.value) remove(vnode.ctx.uid, el);
111
+ if (!tooltips[vnode.ctx.uid]) return;
112
+ if (!binding.value) return remove(vnode.ctx.uid, el);
109
113
 
110
114
  tooltips[vnode.ctx.uid].value = binding.value;
111
115