wave-ui 3.27.0 → 3.27.1
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/dist/wave-ui.cjs.js +2 -2
- package/dist/wave-ui.esm.js +12 -12
- package/dist/wave-ui.umd.js +2 -2
- package/package.json +1 -1
- package/src/wave-ui/components/w-list.vue +2 -2
- package/src/wave-ui/components/w-select.vue +1 -1
- package/src/wave-ui/components/w-slider.vue +1 -1
- package/src/wave-ui/components/w-tabs/index.vue +3 -3
- package/src/wave-ui/components/w-tooltip.vue +3 -2
- package/src/wave-ui/mixins/form-elements.js +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.1",
|
|
4
4
|
"description": "A UI framework for Vue.js 3 (and 2) with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"homepage": "https://antoniandre.github.io/wave-ui",
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
name: 'w-list',
|
|
50
50
|
|
|
51
51
|
setup () {
|
|
52
|
-
return {
|
|
52
|
+
return { waveUiUseId: useId() }
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
props: {
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
|
|
97
97
|
listId () {
|
|
98
98
|
if (!this.addIds) return null
|
|
99
|
-
return typeof this.addIds === 'string' ? this.addIds : `w-list--${this.
|
|
99
|
+
return typeof this.addIds === 'string' ? this.addIds : `w-list--${this.waveUiUseId}`
|
|
100
100
|
},
|
|
101
101
|
|
|
102
102
|
selectedItems () {
|
|
@@ -168,7 +168,7 @@ export default {
|
|
|
168
168
|
computed: {
|
|
169
169
|
/** Prefix for w-list item ids (`id_item-N`) and ARIA listbox linkage; stable with SSR. */
|
|
170
170
|
selectListId () {
|
|
171
|
-
return this.id ? `${this.id}__listbox` : `w-select-menu--${this.
|
|
171
|
+
return this.id ? `${this.id}__listbox` : `w-select-menu--${this.waveUiUseId}`
|
|
172
172
|
},
|
|
173
173
|
|
|
174
174
|
// Check all the items and add a `value` if missing, containing either: value, label or index
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
computed: {
|
|
122
122
|
/** DOM id for the thumb control and related labels (distinct from `inputId` on `w-slider`). */
|
|
123
123
|
thumbId () {
|
|
124
|
-
return this.id ? `${this.id}__thumb` : `button--${this.
|
|
124
|
+
return this.id ? `${this.id}__thumb` : `button--${this.waveUiUseId}`
|
|
125
125
|
},
|
|
126
126
|
|
|
127
127
|
minVal () {
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
name: 'w-tabs',
|
|
80
80
|
|
|
81
81
|
setup () {
|
|
82
|
-
return {
|
|
82
|
+
return { tabsStableId: useId() }
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
props: {
|
|
@@ -183,7 +183,7 @@ export default {
|
|
|
183
183
|
addTab (item) {
|
|
184
184
|
// If there is no unique ID provided, inject one in each tab.
|
|
185
185
|
// This will cause a single other update from watching the tabs items and stop there.
|
|
186
|
-
if (!(item[this.itemIdKey] ?? item._uid ?? false)) item._uid = `${this.
|
|
186
|
+
if (!(item[this.itemIdKey] ?? item._uid ?? false)) item._uid = `${this.tabsStableId}-${this.tabs.length}`
|
|
187
187
|
|
|
188
188
|
this.tabs.push({
|
|
189
189
|
_uid: item[this.itemIdKey] ?? item._uid,
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
200
200
|
this.tabs = items.map((item, _index) => {
|
|
201
201
|
// If there is no unique ID provided, inject one in each tab.
|
|
202
202
|
// This will cause a single other update from watching the tabs items and stop there.
|
|
203
|
-
if (!(item[this.itemIdKey] ?? item._uid ?? false)) item._uid = `${this.
|
|
203
|
+
if (!(item[this.itemIdKey] ?? item._uid ?? false)) item._uid = `${this.tabsStableId}-${_index}`
|
|
204
204
|
|
|
205
205
|
return {
|
|
206
206
|
...item,
|
|
@@ -4,7 +4,7 @@ transition(:name="transitionName" appear @after-leave="onAfterLeave")
|
|
|
4
4
|
.w-tooltip(
|
|
5
5
|
v-if="detachableVisible"
|
|
6
6
|
ref="detachable"
|
|
7
|
-
:key="
|
|
7
|
+
:key="tooltipInstanceId"
|
|
8
8
|
:class="classes"
|
|
9
9
|
:style="styles")
|
|
10
10
|
slot
|
|
@@ -20,7 +20,8 @@ export default {
|
|
|
20
20
|
mixins: [DetachableMixin],
|
|
21
21
|
|
|
22
22
|
setup () {
|
|
23
|
-
|
|
23
|
+
// No leading `_`/`$`: Vue omits those from the render context (setup() reserved prefixes).
|
|
24
|
+
return { tooltipInstanceId: useId() }
|
|
24
25
|
},
|
|
25
26
|
|
|
26
27
|
props: {
|
|
@@ -11,8 +11,9 @@ export default {
|
|
|
11
11
|
|
|
12
12
|
setup () {
|
|
13
13
|
return {
|
|
14
|
-
// SSR-safe unique suffix (Vue 3.5+).
|
|
15
|
-
|
|
14
|
+
// SSR-safe unique suffix (Vue 3.5+). Must not start with `_`/`$` or Vue omits it from the
|
|
15
|
+
// render context and template/slot access can warn or fail (see exposeSetupStateOnRenderContext).
|
|
16
|
+
waveUiUseId: useId()
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
19
|
|
|
@@ -37,11 +38,11 @@ export default {
|
|
|
37
38
|
/** Stable DOM id for the control (and labels), including SSR/hydration. */
|
|
38
39
|
inputId () {
|
|
39
40
|
const componentName = this.$options.name || 'w-field'
|
|
40
|
-
return this.id || `${componentName}--${this.
|
|
41
|
+
return this.id || `${componentName}--${this.waveUiUseId}`
|
|
41
42
|
},
|
|
42
43
|
|
|
43
44
|
inputName () {
|
|
44
|
-
return this.name || `${this.$options.name}--${this.
|
|
45
|
+
return this.name || `${this.$options.name}--${this.waveUiUseId}`
|
|
45
46
|
},
|
|
46
47
|
isDisabled () {
|
|
47
48
|
return this.disabled || this.formProps.disabled
|