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 +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -3
- data/app/pb_kits/playbook/utilities/_hover.scss +11 -2
- data/app/pb_kits/playbook/utilities/globalProps.ts +2 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +15 -0
- data/dist/chunks/{_typeahead-B8fkIeXA.js → _typeahead-DW9yLrAA.js} +1 -1
- data/dist/chunks/{_weekday_stacked-B6zpg7_x.js → _weekday_stacked-Czv-yJw4.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/hover.rb +7 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261c8a122caf4777b2fc17bc61f873c6bd397639dd497c6f3d82da76914117ee
|
4
|
+
data.tar.gz: d31124538e56a79c476e8ff8cc64e71b2eadf62b038c5d5311d198a3c2e18047
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
8
|
-
|
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
|
});
|