playbook_ui_docs 13.10.0.pre.alpha.play10561409 → 13.10.0.pre.alpha.play10561428
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_truncated.html.erb +7 -7
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_truncated.jsx +8 -8
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_truncated.md +1 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/styles.css +7 -1
- data/dist/playbook-doc.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9910aa7ddf2bedaba1ac25b50e36262211927ec14e1959ec60dbd5d178ec937
|
4
|
+
data.tar.gz: 8c0f71901ebc99aa4dcc522cb4ac2332655577ae3a50034abd9a5818be4fc085
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ebe74f371e1fba8e4cdf565ed8e1dbb99798bc55d8399021c396852dcb16d64753d2548549f4ee86b706c8323cb28b92e66fae42db6d22442b366cb7fe7cdbf
|
7
|
+
data.tar.gz: 8d3727a0257faca87c5c66ddae889bd68e17a028b9351d1a21b194d19c3f4ea7b0dd93a67f3060e7054e128af70f81df3038319272e2ad07ed68be5d0b0cf43d
|
@@ -5,26 +5,26 @@
|
|
5
5
|
white-space: nowrap;
|
6
6
|
overflow: hidden;
|
7
7
|
text-overflow: ellipsis;
|
8
|
-
max-width:
|
9
|
-
">
|
8
|
+
max-width: 65px;
|
9
|
+
">Tooltip for truncation only</span>
|
10
10
|
<%= pb_rails("tooltip", props: {
|
11
11
|
trigger_element_selector: "#truncated-tooltip-2",
|
12
12
|
tooltip_id: "truncated-2",
|
13
13
|
position: 'left',
|
14
|
-
|
14
|
+
truncation_enabled: true
|
15
15
|
}) do %>
|
16
|
-
|
16
|
+
Tooltip for truncation only
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
<%= pb_rails("flex/flex_item") do %>
|
20
|
-
<span id='truncated-tooltip-1'>
|
20
|
+
<span id='truncated-tooltip-1'>Tooltip for truncation only</span>
|
21
21
|
<%= pb_rails("tooltip", props: {
|
22
22
|
trigger_element_selector: "#truncated-tooltip-1",
|
23
23
|
tooltip_id: "truncated-1",
|
24
24
|
position: 'left',
|
25
|
-
|
25
|
+
truncation_enabled: true
|
26
26
|
}) do %>
|
27
|
-
|
27
|
+
Tooltip for truncation only
|
28
28
|
<% end %>
|
29
29
|
<% end %>
|
30
30
|
|
@@ -15,27 +15,27 @@ const TooltipTruncated = (props) => {
|
|
15
15
|
>
|
16
16
|
<FlexItem>
|
17
17
|
<Tooltip
|
18
|
-
className='tooltip-text-truncation'
|
18
|
+
className='tooltip-text-truncation short'
|
19
19
|
style={{
|
20
20
|
'backgroundColor': 'red'
|
21
21
|
}}
|
22
|
-
text='
|
23
|
-
|
22
|
+
text='Tooltip for truncation only short'
|
23
|
+
truncationEnabled
|
24
24
|
zIndex={10}
|
25
25
|
{...props}
|
26
26
|
>
|
27
|
-
{'
|
27
|
+
{'Tooltip for truncation only'}
|
28
28
|
</Tooltip>
|
29
29
|
</FlexItem>
|
30
30
|
<FlexItem>
|
31
31
|
<Tooltip
|
32
|
-
className='tooltip-text-truncation'
|
33
|
-
text='
|
34
|
-
|
32
|
+
className='tooltip-text-truncation long'
|
33
|
+
text='Tooltip for truncation only'
|
34
|
+
truncationEnabled
|
35
35
|
zIndex={10}
|
36
36
|
{...props}
|
37
37
|
>
|
38
|
-
{'
|
38
|
+
{'Tooltip for truncation only'}
|
39
39
|
</Tooltip>
|
40
40
|
</FlexItem>
|
41
41
|
</Flex>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
If your implementation involves truncated text, you can set the `
|
1
|
+
If your implementation involves truncated text, you can set the `truncationEnabled` prop to `true` and only display the tooltip when the trigger element is truncated.
|
2
2
|
|
3
3
|
When activated, the component checks whether the trigger element's scrollWidth is equal to its clientWidth, or if the scrollWidth is equal to 0. If either of these conditions is met, the tooltip won't be displayed because the text is not truncated.
|
4
4
|
|