playbook_ui 13.5.0.pre.alpha.play984collapsiblekithidestooltips1203 → 13.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7172374694713ed870dd3d7801aba460bca488288c56a3d1894ae76455e22500
|
4
|
+
data.tar.gz: f3fd4ed95bcd7742f66dfeb9831777e9fed9a82fe258001f8b2f5a7dab3da54d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24f343c6fa7004493b0f18478b3f493f6f6167cfce5a98eacd413d74958dfb204e12e4e53ec809d9e7811d81a611de33fecf95d2c5ae527092e36660beca7178
|
7
|
+
data.tar.gz: 958ecce577a1c495085bdea636e656d67a6e805b45b635070d8d7713b623c9ccc09854662b08c06d2c5c21c5631d2370efc59b6596869f038afa73db32c83fca
|
@@ -1,29 +1,25 @@
|
|
1
|
-
export const showElement = (elem:any) => {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}, 300);
|
12
|
-
};
|
1
|
+
export const showElement = (elem: any) => {
|
2
|
+
elem.style.display = 'block';
|
3
|
+
const height = elem.scrollHeight + 'px'; // Get its height
|
4
|
+
elem.style.height = height; // Update the max-height
|
5
|
+
elem.classList.add('is-visible')
|
6
|
+
// Once the transition is complete, remove the inline max-height so the content can scale responsively
|
7
|
+
window.setTimeout(() => {
|
8
|
+
elem.style.height = '';
|
9
|
+
}, 300);
|
10
|
+
};
|
13
11
|
|
14
|
-
export const hideElement = (elem:any) => {
|
15
|
-
|
12
|
+
export const hideElement = (elem:any) => {
|
13
|
+
elem.style.height = elem.scrollHeight + 'px';
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}, 1);
|
15
|
+
window.setTimeout(() => {
|
16
|
+
elem.style.height = '0';
|
17
|
+
elem.style.paddingTop = '0';
|
18
|
+
elem.style.paddingBottom = '0';
|
19
|
+
}, 1);
|
23
20
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
};
|
21
|
+
// When the transition is complete, hide it
|
22
|
+
window.setTimeout(() => {
|
23
|
+
elem.classList.remove('is-visible');
|
24
|
+
}, 300);
|
25
|
+
};
|
@@ -33,12 +33,10 @@ export default class PbCollapsible extends PbEnhancedElement {
|
|
33
33
|
const height = getHeight()
|
34
34
|
elem.classList.add('is-visible')
|
35
35
|
elem.style.height = height // Update the max-height
|
36
|
-
elem.style.overflow = "hidden"
|
37
36
|
|
38
37
|
// Once the transition is complete, remove the inline max-height so the content can scale responsively
|
39
38
|
window.setTimeout(() => {
|
40
39
|
elem.style.height = ''
|
41
|
-
elem.style.overflow = ""
|
42
40
|
}, 300)
|
43
41
|
}
|
44
42
|
|
@@ -50,13 +48,11 @@ export default class PbCollapsible extends PbEnhancedElement {
|
|
50
48
|
elem.style.height = '0'
|
51
49
|
elem.style.paddingTop = '0'
|
52
50
|
elem.style.paddingBottom = '0'
|
53
|
-
elem.style.overflow = "hidden"
|
54
51
|
}, 1)
|
55
52
|
|
56
53
|
// When the transition is complete, hide it
|
57
54
|
window.setTimeout(() => {
|
58
55
|
elem.classList.remove('is-visible')
|
59
|
-
elem.style.overflow = ""
|
60
56
|
}, 300)
|
61
57
|
}
|
62
58
|
|