@policystudio/policy-studio-ui-vue 1.2.0-access.86 → 1.2.0-access.88

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.2.0-access.86",
3
+ "version": "1.2.0-access.88",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -34,7 +34,7 @@
34
34
  :role="role"
35
35
  tabindex="-1"
36
36
  class="psui-el-dropdown-menu-dialog-wrapper"
37
- @keydown.esc="closeWithFocus"
37
+ @keyup.esc.stop="closeWithFocus"
38
38
  @keydown.down.prevent="moveFocus(1)"
39
39
  @keydown.up.prevent="moveFocus(-1)"
40
40
  @keydown.tab="handleTab"
@@ -7,6 +7,12 @@
7
7
  @click="emit('click', $event)"
8
8
  @keydown="emit('keydown',$event)"
9
9
  >
10
+ <span
11
+ v-if="label"
12
+ class="sr-only"
13
+ >
14
+ {{ label }}
15
+ </span>
10
16
  <span
11
17
  v-if="getIconType === 'material-icons'"
12
18
  class="material-icons-round"
@@ -16,12 +22,7 @@
16
22
  >
17
23
  {{ getIcon }}
18
24
  </span>
19
- <span
20
- v-if="label"
21
- class="sr-only"
22
- >
23
- {{ label }}
24
- </span>
25
+
25
26
  <img
26
27
  v-else-if="getIconType === 'url'"
27
28
  :src="icon"
@@ -145,13 +146,14 @@ const emit = defineEmits(['click','keydown'])
145
146
 
146
147
  const getIconType = computed(() => {
147
148
  if (props.type) return props.type
148
- if (!props.icon?.includes('/')) return 'material-icons'
149
- if (!props.icon?.includes('.svg')) return 'url'
149
+ if (!props.icon) return 'material-icons'
150
+ if (!props.icon.includes('/')) return 'material-icons'
151
+ if (!props.icon.includes('.svg')) return 'url'
150
152
  return 'svg'
151
153
  })
152
154
 
153
155
  const getIcon = computed(() => {
154
- if (!props.icon?.includes('/')) return props.icon ? props.icon : props.loaderErrorIcon
156
+ if (!props.icon || !props.icon.includes('/')) return props.icon ? props.icon : props.loaderErrorIcon
155
157
  if (!finishedImageLoad.value && !imageLoadError.value && props.loaderIcon) return props.loaderIcon
156
158
  if (imageLoadError.value) return props.loaderErrorIcon
157
159
  return props.icon ? props.icon : props.loaderErrorIcon
@@ -183,7 +185,7 @@ onMounted(() => {
183
185
  })
184
186
 
185
187
  const loadImage = () => {
186
- if(getIconType.value != 'material-icons') {
188
+ if(getIconType.value != 'material-icons' && props.icon?.includes('/')) {
187
189
  finishedImageLoad.value = false
188
190
  imageLoadError.value = false
189
191
  imageLoader({ imageUrl: props.icon, returnsBase64: false })