playbook_ui 14.10.0.pre.rc.9 → 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: 6dede8e498da8201d5783aa113ad9cfa06db70460791a7e6cc67328ced91e88a
4
- data.tar.gz: 76a40d46cd6968ef24a810333b5143b13e7ceb78b9a6bfb5a3ff5b10c5465571
3
+ metadata.gz: 261c8a122caf4777b2fc17bc61f873c6bd397639dd497c6f3d82da76914117ee
4
+ data.tar.gz: d31124538e56a79c476e8ff8cc64e71b2eadf62b038c5d5311d198a3c2e18047
5
5
  SHA512:
6
- metadata.gz: 6184a602390dd81aab270b57e46f23efee38f08d5d435fe18bdece7b6a2a58b3053122a130972cf4f4c400702977b9403eef85c5f875e87ed8a621cf72821006
7
- data.tar.gz: 9d89ce0480e357053bd154ce7c6996b3cf04bc7906438715b8449cece944c96f8591db62689a713dfd9c7d9c8d345becf3de978e138517b0463ed66a54604fd0
6
+ metadata.gz: a3be7534e6d709e3e025dab46471de4a2f30e8365f698e3297df480315d54f85dac5aa23291bb4d770d2dbe06900c0f5613c359f0ffa9d02a13cbde77f78f276
7
+ data.tar.gz: 0f9e8082a5177e5b1b11b16ea62a69a072084b4389eb5ec3dc59d976fc150f241638b2c6e01b86c6422f4baa4a660bd19658e371ea2ed5b15c342edf062e664f
@@ -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
  });