@policystudio/policy-studio-ui-vue 1.1.90-access.6 → 1.1.90-access.8

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.1.90-access.06",
3
+ "version": "1.1.90-access.08",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -3,7 +3,10 @@
3
3
  class="psui-el-input"
4
4
  :class="[getComponentClass, `layout-${layout}`]"
5
5
  >
6
- <label v-if="label"> {{ label }} </label>
6
+ <label
7
+ v-if="label"
8
+ :for="uniqueId"
9
+ > {{ label }} </label>
7
10
 
8
11
  <div
9
12
  class="psui-el-input-wrapper"
@@ -23,6 +26,7 @@
23
26
  >
24
27
  <template #trigger>
25
28
  <input
29
+ :id="uniqueId"
26
30
  :title="title"
27
31
  :type="type"
28
32
  :placeholder="placeholder"
@@ -71,7 +75,7 @@
71
75
 
72
76
  <script setup>
73
77
  import PsRichTooltip from '../tooltip/PsRichTooltip.vue'
74
- import { ref, computed, useAttrs } from 'vue'
78
+ import { ref, computed, useAttrs, getCurrentInstance } from 'vue'
75
79
 
76
80
  const props = defineProps({
77
81
  /**
@@ -171,7 +175,7 @@ const attrs = useAttrs()
171
175
  const getAttrs = computed(() => {
172
176
  const defaultAttrs = {
173
177
  autocapitalize: 'sentences',
174
- autocomplete: 'chrome-off',
178
+ autocomplete: 'off',
175
179
  autocorrect: 'off',
176
180
  spellcheck: 'spellcheck',
177
181
  }
@@ -190,6 +194,9 @@ const getComponentClass = computed(() => {
190
194
  }
191
195
  })
192
196
 
197
+ const instance = getCurrentInstance()
198
+ const uniqueId = computed(() => `psui-input-${instance.uid}`)
199
+
193
200
  const onInputFocus = ($event) => {
194
201
  isFocus.value = true
195
202
  emit('focus', $event)