intelliwaketssveltekitv25 1.0.87 → 1.0.89
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/TabHeader.svelte +15 -10
- package/package.json +1 -1
package/dist/TabHeader.svelte
CHANGED
|
@@ -55,12 +55,26 @@
|
|
|
55
55
|
const controlElementRect = controlElement.getBoundingClientRect()
|
|
56
56
|
const activeElementRect = activeElement.getBoundingClientRect()
|
|
57
57
|
indicatorStyles = `left: ${activeElementRect.left - controlElementRect.left - 4}px; width: ${activeElementRect.width + 8}px; top: ${activeElementRect.top - controlElementRect.top - 3}px; height: ${activeElementRect.height + 4}px;`
|
|
58
|
+
} else {
|
|
59
|
+
console.log('No active element found', currentKey, tabItems)
|
|
58
60
|
}
|
|
59
61
|
} else {
|
|
60
62
|
console.log('No control element found', currentKey, tabItems)
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
$effect(() => {
|
|
67
|
+
clientWidth
|
|
68
|
+
tabItems
|
|
69
|
+
|
|
70
|
+
if (currentKey && isVisible) {
|
|
71
|
+
setIndicatorStyle().then(() => {
|
|
72
|
+
})
|
|
73
|
+
} else {
|
|
74
|
+
console.log('No currentKey or not visible', currentKey, isVisible)
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
|
|
64
78
|
onMount(() => {
|
|
65
79
|
const observer = new IntersectionObserver(
|
|
66
80
|
(entries) => {
|
|
@@ -82,16 +96,6 @@
|
|
|
82
96
|
}
|
|
83
97
|
})
|
|
84
98
|
|
|
85
|
-
$effect(() => {
|
|
86
|
-
clientWidth
|
|
87
|
-
tabItems
|
|
88
|
-
|
|
89
|
-
if (currentKey && isVisible) {
|
|
90
|
-
setIndicatorStyle().then(() => {
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
|
|
95
99
|
</script>
|
|
96
100
|
|
|
97
101
|
<div class='grid mx-auto mb-2 relative'
|
|
@@ -100,6 +104,7 @@
|
|
|
100
104
|
bind:clientWidth>
|
|
101
105
|
<div
|
|
102
106
|
class="tab_href_indicator absolute h-8 z-10 bg-transparent border-b-2 border-b-primary-selected transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] select-none pointer-events-none"
|
|
107
|
+
hidden={!currentKey}
|
|
103
108
|
style={indicatorStyles}
|
|
104
109
|
in:fly={{ y: 10, duration: 200, easing: cubicInOut }}>
|
|
105
110
|
|