playbook_ui 14.10.0.pre.rc.8 → 14.10.0.pre.rc.10

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: 67db3edb99c4f8bd19b596012247b0068d4e6a4e3ac3762f85adf04cf4310634
4
- data.tar.gz: 7ba28c0c61f821f539b129604488b859f4fbbbc10fcec7cd91794f572bf57b52
3
+ metadata.gz: 261c8a122caf4777b2fc17bc61f873c6bd397639dd497c6f3d82da76914117ee
4
+ data.tar.gz: d31124538e56a79c476e8ff8cc64e71b2eadf62b038c5d5311d198a3c2e18047
5
5
  SHA512:
6
- metadata.gz: 6bac3f3f10d4e59b8d470a1795bf2b901f0d68fb8cbf4abfcf893c40a6c2a67c5bdc89aef5f5cb03abbfe81af5421a39fda5b22f81dacd458301e30d3c44273a
7
- data.tar.gz: 5f0c1d534d8ec93be2baa17b408157f484bc3d4db262e30feb59220c02b706afdcc81b9b9dd7edabe507a313f125163939cdcac1c0edb41e75477584f7444476
6
+ metadata.gz: a3be7534e6d709e3e025dab46471de4a2f30e8365f698e3297df480315d54f85dac5aa23291bb4d770d2dbe06900c0f5613c359f0ffa9d02a13cbde77f78f276
7
+ data.tar.gz: 0f9e8082a5177e5b1b11b16ea62a69a072084b4389eb5ec3dc59d976fc150f241638b2c6e01b86c6422f4baa4a660bd19658e371ea2ed5b15c342edf062e664f
@@ -4,8 +4,10 @@
4
4
  <%= pb_rails("table/table_header", props: { tag: "div", id: item[:accessor], classname: object.th_classname, sort_menu: item[:sort_menu] }) do %>
5
5
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align: "end" }) do %>
6
6
  <% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
7
- <button class="gray-icon toggle-all-icon" onclick="expandAllRows(this)">
8
- <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
7
+ <button
8
+ class="gray-icon toggle-all-icon"
9
+ onclick="expandAllRows(this); event.preventDefault();">
10
+ <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
9
11
  </button>
10
12
  <% end %>
11
13
  <%= item[:label] %>
@@ -13,4 +15,4 @@
13
15
  <% end %>
14
16
  <% end %>
15
17
  <% end %>
16
- <% end %>
18
+ <% end %>
@@ -20,6 +20,13 @@
20
20
  }
21
21
  }
22
22
 
23
+ @mixin hover-underline {
24
+ .hover_underline:hover {
25
+ text-decoration: underline;
26
+ transition: text-decoration $transition-speed ease;
27
+ }
28
+ }
29
+
23
30
  @mixin hover-color-classes($colors-list) {
24
31
  @each $name, $color in $colors-list {
25
32
  .hover_background-#{"" + $name}:hover {
@@ -32,7 +39,9 @@
32
39
  }
33
40
  }
34
41
  }
35
-
42
+
43
+
44
+ @include hover-underline;
36
45
  @include hover-scale-classes($scales);
37
46
  @include hover-shadow-classes($box_shadows);
38
47
  @include hover-color-classes($product_colors);
@@ -64,4 +73,4 @@
64
73
  .group_hover.hover_visibility {
65
74
  opacity: 1;
66
75
  }
67
- }
76
+ }
@@ -64,6 +64,7 @@ type Hover = Shadow & {
64
64
  background?: string,
65
65
  color?: string,
66
66
  scale?: "sm" | "md" | "lg",
67
+ underline?: boolean,
67
68
  visibility?: boolean,
68
69
  }
69
70
 
@@ -236,6 +237,7 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
236
237
  if (!hover) return css;
237
238
  css += hover.shadow ? `hover_shadow_${hover.shadow} ` : '';
238
239
  css += hover.background ? `hover_background-${hover.background } ` : '';
240
+ css += hover.underline ? `hover_underline ` : '';
239
241
  css += hover.scale ? `hover_scale_${hover.scale} ` : '';
240
242
  css += hover.color ? `hover_color-${hover.color } ` : '';
241
243
  css += hover.visibility ? `hover_visibility` : '';
@@ -57,6 +57,19 @@ test('Hover Props: returns proper class name', () => {
57
57
  expectedClassName = `hover_scale_xl`;
58
58
  expect(kit).toHaveClass(expectedClassName);
59
59
 
60
+ const testIdUnderline = `${testSubject}-hover-underline`;
61
+ render(
62
+ <Body
63
+ data={{ testid: testIdUnderline }}
64
+ hover={{ underline: true }}
65
+ text="Hi"
66
+ />
67
+ );
68
+
69
+ kit = screen.getByTestId(testIdUnderline);
70
+ expectedClassName = `hover_underline`;
71
+ expect(kit).toHaveClass(expectedClassName);
72
+
60
73
  const testIdMultiple = `${testSubject}-hover-multiple`;
61
74
  render(
62
75
  <Body
@@ -66,6 +79,7 @@ test('Hover Props: returns proper class name', () => {
66
79
  background: 'error',
67
80
  shadow: 'deeper',
68
81
  scale: 'xl',
82
+ underline: true,
69
83
  }}
70
84
  text="Hi"
71
85
  />
@@ -76,4 +90,5 @@ test('Hover Props: returns proper class name', () => {
76
90
  expect(kit).toHaveClass('hover_background-error');
77
91
  expect(kit).toHaveClass('hover_shadow_deeper');
78
92
  expect(kit).toHaveClass('hover_scale_xl');
93
+ expect(kit).toHaveClass('hover_underline');
79
94
  });