@tak-ps/vue-tabler 3.79.1 → 3.79.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/CHANGELOG.md +5 -0
- package/components/Slidedown.vue +27 -16
- package/components/input/FileInput.vue +1 -1
- package/components/input/Input.vue +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/components/Slidedown.vue
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
|
|
3
|
+
<span v-text='isExpanded ? "Collapse" : "Expand"' />
|
|
2
4
|
<div
|
|
3
5
|
class='hover-expandable rounded position-relative px-2 py-2'
|
|
4
|
-
:class='{
|
|
6
|
+
:class='{
|
|
7
|
+
"expanded": isExpanded
|
|
8
|
+
}'
|
|
5
9
|
>
|
|
6
10
|
<div class='mb-2'>
|
|
7
11
|
<slot />
|
|
@@ -25,7 +29,9 @@
|
|
|
25
29
|
size='24'
|
|
26
30
|
stroke='1.5'
|
|
27
31
|
class='arrow'
|
|
28
|
-
:class='{
|
|
32
|
+
:class='{
|
|
33
|
+
"expanded": isExpanded
|
|
34
|
+
}'
|
|
29
35
|
/>
|
|
30
36
|
</div>
|
|
31
37
|
</div>
|
|
@@ -42,16 +48,17 @@ const isExpanded = ref(false);
|
|
|
42
48
|
const contentWrapperRef = ref(null);
|
|
43
49
|
|
|
44
50
|
function toggle() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
isExpanded.value = !isExpanded.value;
|
|
52
|
+
|
|
53
|
+
const el = contentWrapperRef.value;
|
|
54
|
+
|
|
55
|
+
if (el) {
|
|
56
|
+
if (isExpanded.value) {
|
|
57
|
+
el.style.maxHeight = el.scrollHeight + 'px';
|
|
58
|
+
} else {
|
|
59
|
+
el.style.maxHeight = null;
|
|
60
|
+
}
|
|
53
61
|
}
|
|
54
|
-
}
|
|
55
62
|
};
|
|
56
63
|
</script>
|
|
57
64
|
|
|
@@ -61,15 +68,15 @@ function toggle() {
|
|
|
61
68
|
transition: border-color 0.2s ease;
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
.hover-expandable:not(.
|
|
65
|
-
border: 1px solid color-mix(in srgb, var(--tblr-border-color), white
|
|
71
|
+
.hover-expandable:not(.expanded):hover {
|
|
72
|
+
border: 1px solid color-mix(in srgb, var(--tblr-border-color), white 10%);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
.hover-expandable:not(.
|
|
69
|
-
border-color: var(--tblr-
|
|
75
|
+
.hover-expandable:not(.expanded):hover .arrow-container {
|
|
76
|
+
border-color: color-mix(in srgb, var(--tblr-border-color), white 25%);
|
|
70
77
|
}
|
|
71
78
|
|
|
72
|
-
.hover-expandable:not(.
|
|
79
|
+
.hover-expandable:not(.expanded):hover .arrow {
|
|
73
80
|
color: var(--tblr-secondary-color, white);
|
|
74
81
|
}
|
|
75
82
|
|
|
@@ -97,6 +104,10 @@ function toggle() {
|
|
|
97
104
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
98
105
|
}
|
|
99
106
|
|
|
107
|
+
.arrow-container:hover {
|
|
108
|
+
border-color: var(--tblr-primary-rgb) !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
100
111
|
.arrow {
|
|
101
112
|
transition: transform 0.3s ease-out, color 0.2s ease;
|
|
102
113
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
/>
|
|
37
37
|
</span>
|
|
38
38
|
<input
|
|
39
|
-
ref='
|
|
39
|
+
ref='textInput'
|
|
40
40
|
v-model='current'
|
|
41
41
|
:disabled='disabled'
|
|
42
42
|
:autocomplete='autocomplete'
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
</template>
|
|
70
70
|
<template v-else>
|
|
71
71
|
<textarea
|
|
72
|
-
ref='
|
|
72
|
+
ref='textInput'
|
|
73
73
|
v-model='current'
|
|
74
74
|
:disabled='disabled'
|
|
75
75
|
:autofocus='autofocus'
|