@cloudron/pankow 3.5.6 → 3.5.9

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.
@@ -64,7 +64,7 @@ async function open() {
64
64
 
65
65
  // try to focus some form elements else just the dialog
66
66
  await nextTick();
67
- const focusElement = dialogBody.value.querySelector('input:not([disabled]):not([style*="display:none"]):not([style*="display: none"])') || dialog.value;
67
+ const focusElement = dialogBody.value.querySelector('input:not([disabled]):not([readonly]):not([style*="display:none"]):not([style*="display: none"])') || dialog.value;
68
68
  focusElement.focus();
69
69
  }
70
70
 
@@ -36,8 +36,12 @@ const isValid = computed(() => {
36
36
  </script>
37
37
 
38
38
  <template>
39
- <input v-if="!multiline" class="pankow-masked-input" :value="displayValue" :required="isValid" @input="displayValue = $event.target.value" @focus="$event.target.select()" />
40
- <textarea v-else :rows="rows" :cols="cols" :required="isValid" :value="displayValue" @input="displayValue = $event.target.value" @focus="$event.target.select()"></textarea>
39
+ <template v-if="!multiline">
40
+ <input class="pankow-masked-input" :value="displayValue" :required="isValid" @input="displayValue = $event.target.value" @focus="$event.target.select()" />
41
+ </template>
42
+ <template v-else>
43
+ <textarea :required="isValid" :value="displayValue" @input="displayValue = $event.target.value" @focus="$event.target.select()"></textarea>
44
+ </template>
41
45
  </template>
42
46
 
43
47
  <style>
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
 
3
- import { ref, useTemplateRef, onMounted, computed, watch } from 'vue';
3
+ import { ref, useTemplateRef, computed, watch, watchEffect } from 'vue';
4
4
  import Button from './Button.vue';
5
5
  import Menu from './Menu.vue';
6
6
  import Icon from './Icon.vue';
@@ -155,14 +155,16 @@ function onKeyDown(event) {
155
155
  if (found !== -1) selectIndex(found);
156
156
  }
157
157
 
158
- onMounted(() => {
158
+ function handleDefaultSelect() {
159
159
  if (props.optionKey) {
160
160
  selectedKey.value = model.value;
161
161
  selected.value = props.options.find((o) => o[props.optionKey] === selectedKey.value);
162
162
  } else {
163
163
  selected.value = model.value;
164
164
  }
165
- });
165
+ }
166
+
167
+ watchEffect(handleDefaultSelect);
166
168
 
167
169
  </script>
168
170
 
@@ -14,8 +14,8 @@ const internalId = uuidv4();
14
14
 
15
15
  const emit = defineEmits(['change']);
16
16
 
17
- function onChange() {
18
- emit('change', model.value);
17
+ function onChange(event) {
18
+ emit('change', model.value); // this contains the value after the checkbox has already toggled
19
19
  }
20
20
 
21
21
  </script>
@@ -54,13 +54,14 @@ defineExpose({ focus });
54
54
  outline: none;
55
55
  }
56
56
 
57
+ .pankow-text-input[disabled],
57
58
  .pankow-text-input[readonly] {
58
59
  cursor: not-allowed;
60
+ background-color: var(--pankow-input-readonly-background-color);
59
61
  }
60
62
 
61
- .pankow-text-input:disabled {
62
- cursor: not-allowed;
63
- opacity: 0.5;
63
+ .pankow-text-input[disabled]:hover {
64
+ border-color: var(--pankow-input-border-color);
64
65
  }
65
66
 
66
67
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.5.6",
4
+ "version": "3.5.9",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "@vitejs/plugin-vue": "^6.0.1",
26
26
  "typescript": "^5.9.3",
27
- "vite": "^7.1.12",
28
- "vue": "^3.5.22"
27
+ "vite": "^7.2.2",
28
+ "vue": "^3.5.24"
29
29
  }
30
30
  }
package/style.css CHANGED
@@ -49,6 +49,7 @@
49
49
  --pankow-input-vertial-padding: 6px;
50
50
  --pankow-input-horizontal-padding: max(7px, var(--pankow-border-radius));
51
51
  --pankow-input-background-color: white;
52
+ --pankow-input-readonly-background-color: #f5f5f5;
52
53
  --pankow-input-border-color: #ced4da;
53
54
  --pankow-input-border-color-hover: var(--pankow-color-dark);
54
55
  --pankow-input-border-color-focus: var(--pankow-color-primary-hover);
@@ -92,6 +93,7 @@ input {
92
93
  --pankow-input-background-color: #1b1e21;
93
94
  --pankow-input-border-color: #1b1e21;
94
95
  --pankow-input-border-color-hover: #ced4da;
96
+ --pankow-input-readonly-background-color: #000000;
95
97
 
96
98
  --pankow-color-background: #1b1e21;
97
99
  --pankow-color-background-hover: #1f2326;
@@ -1,40 +0,0 @@
1
- <script setup>
2
-
3
- import { computed } from 'vue';
4
-
5
- const props = defineProps({
6
- values: Array,
7
- });
8
-
9
- // const normalizedValue = computed(() => {
10
- // if (props.value < 0) return 0;
11
- // if (props.value > 100) return 100;
12
- // return props.value;
13
- // });
14
-
15
- // we want 100 to be the circumverence so we can neatly use percentage: radius = 100 / ( 3,14159 * 2 ) = 15,9155
16
- const radius = 15.9155;
17
- const stroke = 10;
18
-
19
- function calculateViewbox() {
20
- return `0 0 ${radius*2+stroke} ${radius*2+stroke}`;
21
- }
22
-
23
- function calculateArcPath() {
24
- return `M${radius+stroke/2} ${stroke/2} a ${radius} ${radius} 0 0 1 0 ${radius*2} a ${radius} ${radius} 0 0 1 0 -${radius*2}`;
25
- }
26
-
27
- </script>
28
-
29
- <template>
30
- <div class="pankow-circle-chart">
31
- <svg :viewBox="calculateViewbox()" xmlns="http://www.w3.org/2000/svg">
32
- <path :d="calculateArcPath()" fill="none" stroke="red" :stroke-width="stroke" stroke-dasharray="75, 100" @click.stop="onClick('red')" />
33
- <path :d="calculateArcPath()" fill="none" stroke="green" :stroke-width="stroke" stroke-dasharray="30, 100" @click.stop="onClick('green') "/>
34
- </svg>
35
- </div>
36
- </template>
37
-
38
- <style>
39
-
40
- </style>