@policystudio/policy-studio-ui-vue 1.2.0-access.85 → 1.2.0-access.87

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.85",
3
+ "version": "1.2.0-access.87",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -12,8 +12,8 @@
12
12
  @mouseleave="isHovering = false"
13
13
  @click="emit('click')"
14
14
  :tabindex="isNested ? -1 : 0"
15
- :role="type === 'radio' ? 'radio' : (type === 'button' && !isNested ? 'button' : undefined)"
16
- :aria-checked="type === 'radio' ? !!checked : undefined"
15
+ :role="type === 'radio' ? 'radio' : (type === 'checkbox' ? 'checkbox' : (type === 'button' && !isNested ? 'button' : undefined))"
16
+ :aria-checked="(type === 'radio' || type === 'checkbox') ? (checked ? 'true' : 'false') : undefined"
17
17
  >
18
18
  <input
19
19
  @change="onChange"
@@ -108,8 +108,8 @@
108
108
  class="psui-text-gray-60 hover:psui-text-blue-60 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
109
109
  display="flex"
110
110
  :aria-label="`${item.title} info`"
111
- aria-haspopup="dialog"
112
- :aria-owns="`modal-table-results-${item.helper_slug}`"
111
+ aria-haspopup="true"
112
+ :aria-controls="`modal-table-results-${item.helper_slug}`"
113
113
  @click.native="emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
114
114
  />
115
115
  </p>
@@ -130,8 +130,8 @@
130
130
  class="psui-opacity-0 psui-text-gray-60 hover:psui-text-blue-60 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
131
131
  display="flex"
132
132
  :aria-label="`${item.title} info`"
133
- aria-haspopup="dialog"
134
- :aria-owns="`modal-table-results-${item.helper_slug}`"
133
+ aria-haspopup="true"
134
+ :aria-controls="`modal-table-results-${item.helper_slug}`"
135
135
  @click.native="emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
136
136
  />
137
137
  </p>
@@ -24,8 +24,7 @@
24
24
  class="psui-cursor-pointer psui-text-gray-60 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
25
25
  :style="{ display: 'flex' }"
26
26
  :aria-label="`${columnGroup.title} info`"
27
- aria-haspopup="dialog"
28
- :aria-owns="`modal-column-group-helper-${columnGroup.key}`"
27
+ aria-haspopup="true"
29
28
  @click="emit('click-column-group-helper', columnGroup, $event)"
30
29
  @keydown.enter.stop="emit('click-column-group-helper', columnGroup, $event)"
31
30
  />
@@ -69,8 +68,8 @@
69
68
  class="helper psui-cursor-pointer psui-text-gray-60 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
70
69
  :style="{ display: 'flex', marginTop: '1px' }"
71
70
  :aria-label="`${column.title} info`"
72
- aria-haspopup="dialog"
73
- :aria-owns="`modal-column-helper-${column.key}`"
71
+ aria-haspopup="true"
72
+ :aria-controls="`modal-column-helper-${column.key}`"
74
73
  @click="emit('click-column-helper', column, $event)"
75
74
  @keydown.enter.stop="emit('click-column-helper', column, $event)"
76
75
  />
@@ -29,8 +29,8 @@
29
29
  class="psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
30
30
  :style="{ display: 'flex' }"
31
31
  :aria-label="`${columnGroup.title} info`"
32
- aria-haspopup="dialog"
33
- :aria-owns="`modal-column-group-helper-${columnGroup.key}`"
32
+ aria-haspopup="true"
33
+ :aria-controls="`modal-column-group-helper-${columnGroup.key}`"
34
34
  @click="emit('click-column-group-helper', columnGroup, $event)"
35
35
  />
36
36
  </div>
@@ -58,8 +58,8 @@
58
58
  class="helper psui-cursor-pointer psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
59
59
  :style="{ display: 'flex', marginTop: '1px' }"
60
60
  :aria-label="`${column.title} info`"
61
- aria-haspopup="dialog"
62
- :aria-owns="`modal-column-helper-${column.key}`"
61
+ aria-haspopup="true"
62
+ :aria-controls="`modal-column-helper-${column.key}`"
63
63
  @click="emit('click-column-helper', column, $event)"
64
64
  />
65
65
 
@@ -17,8 +17,8 @@
17
17
  display="flex"
18
18
  class="helper psui-mt-[2px] psui-cursor-pointer psui-text-gray-60 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
19
19
  :aria-label="`${columnGroup.title} info`"
20
- aria-haspopup="dialog"
21
- :aria-owns="`modal-column-group-helper-${columnGroup.key}`"
20
+ aria-haspopup="true"
21
+ :aria-controls="`modal-column-group-helper-${columnGroup.key}`"
22
22
  @click="emit('click-column-group-helper', columnGroup, $event)"
23
23
  @keydown.enter.stop="emit('click-column-group-helper', columnGroup, $event)"
24
24
  />
@@ -82,8 +82,8 @@
82
82
  class="helper psui-cursor-pointer psui-text-gray-60 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
83
83
  display="flex"
84
84
  :aria-label="`${column.title} info`"
85
- aria-haspopup="dialog"
86
- :aria-owns="`modal-column-helper-${column.key}`"
85
+ aria-haspopup="true"
86
+ :aria-controls="`modal-column-helper-${column.key}`"
87
87
  @click="emit('click-column-helper', column, $event)"
88
88
  @keydown.enter.stop="emit('click-column-helper', column, $event)"
89
89
  />
@@ -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 })