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 +4 -4
- data/app/pb_kits/playbook/pb_background/_background.scss +2 -2
- data/app/pb_kits/playbook/pb_background/_background.tsx +3 -4
- data/app/pb_kits/playbook/pb_background/background.test.js +5 -0
- data/dist/chunks/{_typeahead-ySWHB-7p.js → _typeahead-1gVtCLYL.js} +1 -1
- data/dist/chunks/{_weekday_stacked-36N8xzXL.js → _weekday_stacked-Cl62R0Ef.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/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: 0aa6639822cd2ea1f1956a8e184d0194086ae25e2307d7c6233469ff6889722c
|
4
|
+
data.tar.gz: ccc5ed747a8511d0fe4f51c6bfe152b5cffc40aab95acc09867ed30874f0acb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
&.
|
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
|
-
|
138
|
-
|
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
|
+
});
|