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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e8b0f34e3ce1ae0e6dd4ff0fd257aa7dd073be6361014f46b171c8f74ac9332
4
- data.tar.gz: feb0177fc6b2782b778e1e06236ecc982d873f3655beb35954c30b87376e2297
3
+ metadata.gz: a9910aa7ddf2bedaba1ac25b50e36262211927ec14e1959ec60dbd5d178ec937
4
+ data.tar.gz: 8c0f71901ebc99aa4dcc522cb4ac2332655577ae3a50034abd9a5818be4fc085
5
5
  SHA512:
6
- metadata.gz: cf3ff6c0e522f2c1635b9f0769d65f71d46329ef5e8ee1eb824f16e07dd9216a6674ecf08e20c45ebf707974293ec485a65e812285d2d1e558462c1a709e3639
7
- data.tar.gz: ade5d5455664e3e1ab79535370bbb4a14dce3da1d224c6cb82bd8fb2a5addc42ac40836e41bd93dc106c0b02f4d6969b526c34a4d29372e2651a01721268e5d9
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: 100px;
9
- ">This is a truncated tooltip trigger.</span>
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
- truncatable: true
14
+ truncation_enabled: true
15
15
  }) do %>
16
- This is a truncated tooltip trigger.
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'>This tooltip trigger is not truncated.</span>
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
- truncatable: true
25
+ truncation_enabled: true
26
26
  }) do %>
27
- This tooltip trigger is not truncated.
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='This is a truncated tooltip trigger.'
23
- truncatable
22
+ text='Tooltip for truncation only short'
23
+ truncationEnabled
24
24
  zIndex={10}
25
25
  {...props}
26
26
  >
27
- {'This is a truncated tooltip trigger.'}
27
+ {'Tooltip for truncation only'}
28
28
  </Tooltip>
29
29
  </FlexItem>
30
30
  <FlexItem>
31
31
  <Tooltip
32
- className='tooltip-text-truncation'
33
- text='This is a truncated tooltip trigger.'
34
- truncatable
32
+ className='tooltip-text-truncation long'
33
+ text='Tooltip for truncation only'
34
+ truncationEnabled
35
35
  zIndex={10}
36
36
  {...props}
37
37
  >
38
- {'This'}
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 `truncatable` prop to `true` and only display the tooltip when the trigger element is truncated.
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
 
@@ -3,5 +3,11 @@
3
3
  white-space: nowrap;
4
4
  overflow: hidden;
5
5
  text-overflow: ellipsis;
6
- max-width: 100px;
6
+ }
7
+ .tooltip-text-truncation.short {
8
+ max-width: 65px;
9
+ }
10
+
11
+ .tooltip-text-truncation.long {
12
+ max-width: 180px;
7
13
  }