playbook_ui 14.17.0.pre.alpha.play1499backgroundkitoverlay7105 → 14.17.0.pre.alpha.play1499backgroundkitoverlay7110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b38daf6aad351a9d3b57169619dbba3749175bb2e2aae4f92aeb1368d8cd6cd5
4
- data.tar.gz: 6718570cbc87905c88c57df0f1878cabd011e6ddac73d4c522c9ed88f08e537a
3
+ metadata.gz: 0aa6639822cd2ea1f1956a8e184d0194086ae25e2307d7c6233469ff6889722c
4
+ data.tar.gz: ccc5ed747a8511d0fe4f51c6bfe152b5cffc40aab95acc09867ed30874f0acb8
5
5
  SHA512:
6
- metadata.gz: 8f1df4e4bcd4f2f0dac7285d99a80bd63c0b139db5256d2c8fe7754f78a573a811fa17fd3d8203eff2de08c576070c862add9cf92a3869a63bc178e87abd3a98
7
- data.tar.gz: 2a0df11f026f0afe56e42a873105cd71756ea23d7e6bedec727954db2ff20fe7781142226f2415fe1f5d21d38a4c4e1c8fe286bf4a888e2d1f8089a7ba9ac2c7
6
+ metadata.gz: d4e5a6fa4924c2cb68814350e0bd7ed4e5f5952c77b0f695ec72d006d3e370c94ed013d7cdfe7998e59e36601e249b3474aa1c1f93e6407958bfc37e1e3f84d9
7
+ data.tar.gz: d88379f2a0912b9058238866fd54ed60f15b54c584f828219918343e07963292dfcaef332f535f53049338ff0a9a09f24b31e27691b8fdf4f0a3fddad0ee5fd9
@@ -56,7 +56,7 @@ $background_colors: map-merge($additional_colors, $merge_kits7);
56
56
  }
57
57
  }
58
58
 
59
- &.imageoverlay {
59
+ &[class*=imageoverlay] {
60
60
  position: relative;
61
61
 
62
62
  &:before {
@@ -77,7 +77,7 @@ $background_colors: map-merge($additional_colors, $merge_kits7);
77
77
  }
78
78
 
79
79
  @each $key, $value in $opacity {
80
- &.imageoverlay[imageoverlay="#{$key}"]::before {
80
+ &.imageoverlay_#{$key}::before {
81
81
  opacity: $value;
82
82
  }
83
83
  }
@@ -84,10 +84,10 @@ const Background = (props: BackgroundProps): React.ReactElement => {
84
84
  data = {},
85
85
  htmlOptions = {},
86
86
  id,
87
+ imageOverlay,
87
88
  imageUrl = '',
88
89
  tag = 'div',
89
90
  transition = '',
90
- imageOverlay,
91
91
  } = props
92
92
 
93
93
  const [responsiveProps, setResponsiveProps] = useState({
@@ -134,8 +134,8 @@ const Background = (props: BackgroundProps): React.ReactElement => {
134
134
  [`pb_background_color_${resBackgroundColor}`]: resBackgroundColor && !customColor,
135
135
  [`pb_background_custom_color`]: !!customColor,
136
136
  },
137
- className,
138
- imageOverlay ? "imageoverlay" : ""
137
+ imageOverlay ? `imageoverlay_${imageOverlay}` : "",
138
+ className
139
139
  );
140
140
 
141
141
  const backgroundStyle = {
@@ -167,7 +167,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
167
167
  alt={alt}
168
168
  className={classes}
169
169
  id={id}
170
- imageOverlay={imageOverlay}
171
170
  style={combinedStyles}
172
171
  >
173
172
  {children}
@@ -37,3 +37,8 @@ test('backgroundSize = auto', () => {
37
37
  const kit = renderKit(Background, props, { classname: "background-image", imageUrl: "https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80", backgroundSize: 'auto' })
38
38
  expect(kit).toHaveStyle('background-size: auto')
39
39
  })
40
+
41
+ test('applies correct overlay class when imageOverlay prop is provided', () => {
42
+ const kit = renderKit(Background, props, { imageOverlay: 'opacity_6' });
43
+ expect(kit).toHaveClass('imageoverlay_opacity_6');
44
+ });