@nice-digital/nds-maintain-ratio 1.2.11 → 1.2.14
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.
- package/lib/MaintainRatio.js +1 -1
- package/package.json +5 -5
- package/scss/maintain-ratio.scss +5 -3
package/lib/MaintainRatio.js
CHANGED
|
@@ -19,7 +19,7 @@ require("../scss/maintain-ratio.scss");
|
|
|
19
19
|
|
|
20
20
|
var _excluded = ["ratio", "className", "stretchFirstChild", "children"];
|
|
21
21
|
|
|
22
|
-
var _jsxFileName = "
|
|
22
|
+
var _jsxFileName = "C:\\dev\\nice-design-system\\components\\nds-maintain-ratio\\src\\MaintainRatio.js",
|
|
23
23
|
_this = void 0;
|
|
24
24
|
|
|
25
25
|
var MaintainRatio = function MaintainRatio(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-maintain-ratio",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "Maintain ratio component for the NICE Design System",
|
|
5
5
|
"author": "Ian Routledge <ian.routledge@nice.org.uk>",
|
|
6
6
|
"homepage": "https://design-system.nice.org.uk/",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"url": "https://github.com/nice-digital/nice-design-system/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nice-digital/nds-core": "^1.2.
|
|
37
|
+
"@nice-digital/nds-core": "^1.2.13",
|
|
38
|
+
"classnames": "^2.3.1",
|
|
38
39
|
"prop-types": "^15.7.2"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
@@ -42,8 +43,7 @@
|
|
|
42
43
|
"react-dom": "^16 || ^17"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@babel/cli": "^7.5.0"
|
|
46
|
-
"classnames": "^2.2.6"
|
|
46
|
+
"@babel/cli": "^7.5.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "2bdf3454416a51f8e6c407a0f03ff14c08b6023a"
|
|
49
49
|
}
|
package/scss/maintain-ratio.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/// @group components
|
|
3
3
|
////
|
|
4
4
|
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
|
|
5
7
|
@import '~@nice-digital/nds-core/scss/core';
|
|
6
8
|
|
|
7
9
|
/// Maintains the aspect ratio of an embedded item, useful for responsive embedding, e.g.
|
|
@@ -57,17 +59,17 @@
|
|
|
57
59
|
|
|
58
60
|
// Modifier class for 21:9 aspect ratio
|
|
59
61
|
&--21-9 {
|
|
60
|
-
padding-bottom: percentage(9
|
|
62
|
+
padding-bottom: percentage(math.div(9, 21));
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
// Modifier class for 16:9 aspect ratio
|
|
64
66
|
&--16-9 {
|
|
65
|
-
padding-bottom: percentage(9
|
|
67
|
+
padding-bottom: percentage(math.div(9, 16));
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
// Modifier class for 4:3 aspect ratio
|
|
69
71
|
&--4-3 {
|
|
70
|
-
padding-bottom: percentage(3
|
|
72
|
+
padding-bottom: percentage(3 * 0.25);
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
// Modifier class for square aspect ratio
|