@indielayer/ui 1.14.1 → 1.14.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.
- package/lib/components/tag/theme/Tag.base.theme.js +3 -3
- package/lib/composables/useFocusTrap.js +31 -33
- package/lib/index.js +1 -1
- package/lib/index.umd.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/tag/theme/Tag.base.theme.ts +3 -3
- package/src/components/tooltip/Tooltip.vue +1 -1
- package/src/composables/useFocusTrap.ts +12 -10
- package/src/version.ts +1 -1
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.14.
|
|
1
|
+
declare const _default: "1.14.2";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -31,11 +31,11 @@ const theme: TagTheme = {
|
|
|
31
31
|
|
|
32
32
|
return css.variables({
|
|
33
33
|
bg: color[100],
|
|
34
|
-
text: color[
|
|
35
|
-
border: color[
|
|
34
|
+
text: color[800],
|
|
35
|
+
border: color[700],
|
|
36
36
|
dark: {
|
|
37
37
|
bg: color[600],
|
|
38
|
-
border: color[
|
|
38
|
+
border: color[500],
|
|
39
39
|
text: color[100],
|
|
40
40
|
},
|
|
41
41
|
})
|
|
@@ -20,7 +20,7 @@ import XPopover from '../../components/popover/Popover.vue'
|
|
|
20
20
|
import XPopoverContainer from '../../components/popover/PopoverContainer.vue'
|
|
21
21
|
import { type Placement } from 'floating-vue'
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
defineProps(tooltipProps)
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onUnmounted, unref, nextTick,
|
|
1
|
+
import { onUnmounted, unref, nextTick, ref, type Ref, type ComponentPublicInstance } from 'vue'
|
|
2
2
|
|
|
3
3
|
const focusableQuery = 'button:not([tabindex="-1"]), [href], input, select, textarea, li, a, [tabindex]:not([tabindex="-1"])'
|
|
4
4
|
|
|
@@ -77,18 +77,16 @@ export function useFocusTrap() {
|
|
|
77
77
|
|
|
78
78
|
focusable.value[idx]?.focus()
|
|
79
79
|
|
|
80
|
+
document.removeEventListener('keydown', handleKeydown)
|
|
81
|
+
observer?.disconnect()
|
|
82
|
+
|
|
80
83
|
document.addEventListener('keydown', handleKeydown)
|
|
81
|
-
observer = new MutationObserver(() => getFocusableElements(currentTarget))
|
|
82
|
-
const el = getEl(currentTarget)
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
const el = getEl(currentTarget)
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
clearFocusTrap()
|
|
90
|
-
if (newVal !== null) initFocusTrap(targetRef, options)
|
|
91
|
-
})
|
|
87
|
+
if (el) {
|
|
88
|
+
observer = new MutationObserver(() => getFocusableElements(currentTarget))
|
|
89
|
+
observer.observe(el, { childList: true, subtree: true })
|
|
92
90
|
}
|
|
93
91
|
}
|
|
94
92
|
|
|
@@ -100,6 +98,10 @@ export function useFocusTrap() {
|
|
|
100
98
|
prevActiveElement.focus()
|
|
101
99
|
}
|
|
102
100
|
currentTarget = null
|
|
101
|
+
focusable.value = []
|
|
102
|
+
firstFocusableEl = null
|
|
103
|
+
lastFocusableEl = null
|
|
104
|
+
prevActiveElement = null
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
onUnmounted(() => {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.14.
|
|
1
|
+
export default '1.14.2'
|