@cloudron/pankow 3.1.8 → 3.2.0

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.
@@ -39,6 +39,10 @@ const props = defineProps({
39
39
  type: Boolean,
40
40
  default: true
41
41
  },
42
+ center: {
43
+ type: Boolean,
44
+ default: false
45
+ },
42
46
  confirmLabel: String,
43
47
  rejectLabel: String,
44
48
  alternateLabel: String,
@@ -95,8 +99,8 @@ defineExpose({ open, close });
95
99
  <Transition name="pankow-fade">
96
100
  <div class="pankow-dialog-backdrop" @click="onDismiss" v-show="visible" :style="{ 'z-index': zIndex }"></div>
97
101
  </Transition>
98
- <Transition name="pankow-bounce-center">
99
- <div ref="dialog" class="pankow-dialog" @click.stop v-show="visible" @keydown.esc="onDismiss" tabindex="0" :style="{ 'z-index': zIndex+1 }">
102
+ <Transition name="pankow-bounce-center-top">
103
+ <div ref="dialog" class="pankow-dialog" :class="{ 'pankow-dialog-center': center }" @click.stop v-show="visible" @keydown.esc="onDismiss" tabindex="0" :style="{ 'z-index': zIndex+1 }">
100
104
  <div class="pankow-dialog-header" v-show="title">
101
105
  {{ title }}
102
106
  <Icon v-show="showX" icon="fa-solid fa-xmark" style="cursor: pointer;" @click="onReject"/>
@@ -133,20 +137,25 @@ defineExpose({ open, close });
133
137
  position: absolute;
134
138
  background-color: var(--pankow-dialog-background-color);
135
139
  min-width: min(95%, 450px);
136
- max-height: calc(100% - 20px);
137
140
  max-width: calc(100% - 20px);
141
+ max-height: calc(100% - 40px);
138
142
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
139
143
  z-index: 2002;
140
144
  border-radius: var(--pankow-border-radius);
141
145
  overflow: hidden;
142
146
  display: flex;
143
147
  flex-direction: column;
144
- top: 50%;
148
+ top: 20px;
145
149
  left: 50%;
146
- transform: translateX(-50%) translateY(-50%);
150
+ transform: translateX(-50%);
147
151
  outline: none;
148
152
  }
149
153
 
154
+ .pankow-dialog-center {
155
+ top: 50%;
156
+ transform: translateX(-50%) translateY(-50%);
157
+ }
158
+
150
159
  .pankow-dialog-header {
151
160
  font-size: 20px;
152
161
  padding: 15px;
@@ -157,6 +166,7 @@ defineExpose({ open, close });
157
166
  .pankow-dialog-body {
158
167
  padding: 0 15px;
159
168
  overflow: auto;
169
+ transition: all 250ms;
160
170
  }
161
171
 
162
172
  .pankow-dialog-body-no-header {
@@ -11,6 +11,10 @@ const props = defineProps({
11
11
  type: Boolean,
12
12
  default: true,
13
13
  },
14
+ slim: {
15
+ type: Boolean,
16
+ default: false,
17
+ },
14
18
  mode: String // only really "indeterminate" is supported
15
19
  });
16
20
 
@@ -25,9 +29,8 @@ const normalizedValue = computed(() => {
25
29
  <template>
26
30
  <div class="pankow-progress-bar">
27
31
  <div class="pankow-progress-bar-label" v-show="showLabel"><slot>{{ value + ' %' }}</slot></div>
28
- <div v-show="mode !== 'indeterminate'" class="pankow-progress-bar-filled" :style="{ width: normalizedValue+'%' }">
29
- </div>
30
- <div v-show="mode === 'indeterminate'" class="pankow-progress-bar-indeterminate" :style="{ 'min-width': '30%' }"></div>
32
+ <div v-if="mode !== 'indeterminate'" class="pankow-progress-bar-filled" :style="{ width: normalizedValue+'%', height: slim ? '2px' : '6px' }"></div>
33
+ <div v-else class="pankow-progress-bar-indeterminate" :style="{ height: slim ? '2px' : '6px' }"></div>
31
34
  </div>
32
35
  </template>
33
36
 
@@ -54,22 +57,38 @@ const normalizedValue = computed(() => {
54
57
  }
55
58
 
56
59
  .pankow-progress-bar-indeterminate {
57
- background-color: var(--pankow-color-primary);
58
- height: 6px;
59
60
  width: 100%;
60
- background-image: linear-gradient(45deg,rgba(255,255,255,.35) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.35) 50%,rgba(255,255,255,.35) 75%,transparent 75%,transparent);
61
- background-size: 30px 30px;
62
- animation: progress-bar-stripes 1s linear infinite;
61
+ height: 6px;
62
+ display: inline-block;
63
+ position: relative;
64
+ background: rgba(255, 255, 255, 0.15);
65
+ overflow: hidden;
63
66
  border-radius: calc(var(--pankow-border-radius) / 1.5);
64
67
  }
65
68
 
66
- @keyframes progress-bar-stripes {
67
- from {
68
- background-position: 30px 0;
69
+ .pankow-progress-bar-indeterminate::after {
70
+ content: '';
71
+ width: 90%;
72
+ height: 100%;
73
+ background: var(--pankow-color-primary);
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ box-sizing: border-box;
78
+ animation: pankow-progress-bar-indeterminate-animation 1.5s ease-in-out infinite;
79
+ border-radius: calc(var(--pankow-border-radius) / 1.5);
80
+ }
81
+
82
+ @keyframes pankow-progress-bar-indeterminate-animation {
83
+ 0% {
84
+ left: 0;
85
+ transform: translateX(-100%);
69
86
  }
70
- to {
71
- background-position: 0 0;
87
+ 100% {
88
+ left: 100%;
89
+ transform: translateX(0%);
72
90
  }
73
91
  }
74
92
 
93
+
75
94
  </style>
@@ -12,9 +12,9 @@
12
12
  </tr>
13
13
  </thead>
14
14
  <tbody>
15
- <tr v-show="busy"><td :colspan="Object.keys(columns).length" style="text-align: center; padding: 20px;"><Spinner class="pankow-spinner-large"/></td></tr>
16
- <tr v-show="!busy && sortedItems.length === 0"><td :colspan="Object.keys(columns).length" class="pankow-table-placeholder">{{ placeholder }}</td></tr>
17
- <tr v-show="!busy" class="pankow-table-row" :class="{ 'pankow-table-row-with-hover': hover }" v-for="item in sortedItems" @click="onRowClick(item)">
15
+ <tr v-if="busy"><td :colspan="Object.keys(columns).length" style="text-align: center; padding: 20px;"><ProgressBar mode="indeterminate" :show-label="false" :slim="true"/></td></tr>
16
+ <tr v-else-if="!busy && sortedItems.length === 0"><td :colspan="Object.keys(columns).length" class="pankow-table-placeholder">{{ placeholder }}</td></tr>
17
+ <tr v-else class="pankow-table-row" :class="{ 'pankow-table-row-with-hover': hover }" v-for="item in sortedItems" @click="onRowClick(item)">
18
18
  <td class="pankow-table-cell" v-for="column in Object.keys(columns)" :style="{ width: typeof columns[column].width === 'string' ? columns[column].width : 'auto' }" :class="{ 'pankow-table-cell-hide-mobile': columns[column].hideMobile }">
19
19
  <slot :name="column" v-if="$slots[column]" v-bind="item"/>
20
20
  <span v-if="!$slots[column]">{{ (column in item) ? (item[column].label || item[column]) : `TableView Error: item has no property '${column}' nor a template with that name` }}</span>
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script>
30
30
 
31
- import Spinner from './Spinner.vue';
31
+ import ProgressBar from './ProgressBar.vue';
32
32
  import Icon from './Icon.vue';
33
33
 
34
34
  const SORT_ORDER = {
@@ -41,7 +41,7 @@ export default {
41
41
  emits: ['row-click'],
42
42
  components: {
43
43
  Icon,
44
- Spinner,
44
+ ProgressBar,
45
45
  },
46
46
  data() {
47
47
  return {
package/gallery/Index.vue CHANGED
@@ -327,7 +327,7 @@
327
327
  <MultiSelect v-model="multiselectValueWithSelectAll" :options="multiselectModel" select-all-label="Select All" :search-threshold="2" option-key="id" optionLabel="display"/> {{ multiselectValueWithSelectAll }}
328
328
 
329
329
  <h2 id="progressbar">Progress</h2>
330
- <div style="width: 720px;">
330
+ <div style="width: 100%; max-width: 720px;">
331
331
  <NumberInput v-model="progressValue"/>
332
332
  <br/><br/>
333
333
  <ProgressBar :value="progressValue" />
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.1.8",
4
+ "version": "3.2.0",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {
package/style.css CHANGED
@@ -349,3 +349,22 @@ textarea:focus {
349
349
  }
350
350
  }
351
351
 
352
+ .pankow-bounce-center-top-enter-active {
353
+ animation: pankow-bounce-center-top-in 0.2s;
354
+ }
355
+
356
+ .pankow-bounce-center-top-leave-active {
357
+ animation: pankow-bounce-center-top-in 0.2s reverse;
358
+ }
359
+
360
+ @keyframes pankow-bounce-center-top-in {
361
+ 0% {
362
+ opacity: 0;
363
+ transform: translateX(-50%) scale(0.9);
364
+ }
365
+
366
+ 100% {
367
+ opacity: 1;
368
+ transform: translateX(-50%) scale(1);
369
+ }
370
+ }