@globalbrain/sefirot 3.1.0 → 3.2.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.
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useIntersectionObserver } from '@vueuse/core'
|
|
3
|
+
import { ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
as?: string
|
|
7
|
+
x?: string
|
|
8
|
+
y?: string
|
|
9
|
+
opacity?: string | number
|
|
10
|
+
duration?: string
|
|
11
|
+
delay?: string
|
|
12
|
+
once?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
as: 'div',
|
|
17
|
+
x: '0',
|
|
18
|
+
y: '0',
|
|
19
|
+
opacity: 1,
|
|
20
|
+
duration: '0.75s',
|
|
21
|
+
delay: '0s',
|
|
22
|
+
once: true
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const target = ref<HTMLElement | null>(null)
|
|
26
|
+
const on = ref(false)
|
|
27
|
+
|
|
28
|
+
const { stop } = useIntersectionObserver(target, ([{ isIntersecting }]) => {
|
|
29
|
+
on.value = isIntersecting
|
|
30
|
+
if (on.value && props.once) {
|
|
31
|
+
stop()
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<component :is="as" class="SM" :class="{ on }" ref="target">
|
|
38
|
+
<slot :on="on" />
|
|
39
|
+
</component>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<style scoped lang="postcss">
|
|
43
|
+
.SM {
|
|
44
|
+
position: relative;
|
|
45
|
+
opacity: v-bind(opacity);
|
|
46
|
+
transform: translate(v-bind(x), v-bind(y));
|
|
47
|
+
transition: opacity, transform;
|
|
48
|
+
transition-duration: v-bind(duration);
|
|
49
|
+
transition-delay: v-bind(delay);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.SM.on {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
transform: translate(0, 0);
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -206,7 +206,11 @@ const resizeObserver = useResizeObserver(head, handleResize)
|
|
|
206
206
|
|
|
207
207
|
function stopObserving() {
|
|
208
208
|
const orders = ordersToShow.value
|
|
209
|
-
|
|
209
|
+
const lastOrder
|
|
210
|
+
= orders[orders.length - 1] === 'actions'
|
|
211
|
+
? orders[orders.length - 2]
|
|
212
|
+
: orders[orders.length - 1]
|
|
213
|
+
colWidths[lastOrder] = 'auto'
|
|
210
214
|
resizeObserver.stop()
|
|
211
215
|
}
|
|
212
216
|
|
package/lib/styles/variables.css
CHANGED
|
@@ -228,9 +228,9 @@
|
|
|
228
228
|
|
|
229
229
|
:root {
|
|
230
230
|
--c-bg-elv-1: #ffffff;
|
|
231
|
-
--c-bg-elv-2: #
|
|
231
|
+
--c-bg-elv-2: #f5f5f7;
|
|
232
232
|
--c-bg-elv-3: #ffffff;
|
|
233
|
-
--c-bg-elv-4: #
|
|
233
|
+
--c-bg-elv-4: #fafafa;
|
|
234
234
|
|
|
235
235
|
--c-bg-mute-1: var(--c-gray-4);
|
|
236
236
|
--c-bg-mute-2: var(--c-gray-5);
|