@cloudron/pankow 3.5.1 → 3.5.2

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.
@@ -1,7 +1,6 @@
1
1
  <script setup>
2
2
 
3
3
  import { ref, useTemplateRef, onMounted, computed, watch } from 'vue';
4
- import Button from './Button.vue';
5
4
  import Menu from './Menu.vue';
6
5
  import Icon from './Icon.vue';
7
6
 
@@ -40,7 +39,7 @@ const props = defineProps({
40
39
  },
41
40
  });
42
41
 
43
- const emits = defineEmits(['select']);
42
+ const emits = defineEmits(['select', 'close']);
44
43
 
45
44
  const model = defineModel();
46
45
 
@@ -117,6 +116,7 @@ const menuModel = computed(() => {
117
116
 
118
117
  function onMenuClosed() {
119
118
  elem.value.focus();
119
+ emits('close');
120
120
  }
121
121
 
122
122
  function onClick(event) {
@@ -134,11 +134,7 @@ function onOpen(event) {
134
134
 
135
135
  function onClose(event) {
136
136
  menu.value.close();
137
- }
138
-
139
- function onClosed() {
140
- // restores the focus
141
- elem.value.focus();
137
+ emits('close');
142
138
  }
143
139
 
144
140
  onMounted(() => {
@@ -169,7 +169,7 @@ onMounted(() => {
169
169
  </select>
170
170
 
171
171
  <Menu ref="menu" :model="menuModel" :search-threshold="searchThreshold" :close-on-activation="true" @close="onMenuClosed"/>
172
- <span>
172
+ <span class="pankow-singleselect-label">
173
173
  <Icon v-if="selected ? selected.icon : false" :icon="selected.icon" style="margin-right: 6px" />
174
174
  {{ selected ? selected[optionLabel] : placeholder }}
175
175
  </span>
@@ -199,6 +199,7 @@ onMounted(() => {
199
199
  transition: background-color 250ms;
200
200
  min-width: 100px;
201
201
  white-space: nowrap;
202
+ overflow: hidden;
202
203
  }
203
204
 
204
205
  @media (prefers-color-scheme: dark) {
@@ -222,4 +223,9 @@ onMounted(() => {
222
223
  border-color: var(--pankow-input-border-color);
223
224
  }
224
225
 
226
+ .pankow-singleselect-label {
227
+ overflow: hidden;
228
+ text-overflow: ellipsis;
229
+ }
230
+
225
231
  </style>
@@ -56,8 +56,6 @@ defineExpose({ focus });
56
56
 
57
57
  .pankow-text-input[readonly] {
58
58
  cursor: not-allowed;
59
- border-color: var(--pankow-input-border-color) !important;
60
- background-color: #f5f5f5;
61
59
  }
62
60
 
63
61
  .pankow-text-input:disabled {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.5.1",
4
+ "version": "3.5.2",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",