@nice-digital/nds-grid 1.2.13 → 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/Grid.js +1 -1
- package/lib/GridItem.js +1 -1
- package/package.json +3 -3
- package/scss/grid.scss +10 -8
package/lib/Grid.js
CHANGED
|
@@ -23,7 +23,7 @@ require("../scss/grid.scss");
|
|
|
23
23
|
|
|
24
24
|
var _excluded = ["children", "reverse", "equalHeight", "gutter", "horizontalAlignment", "verticalAlignment", "debug", "className", "elementType"];
|
|
25
25
|
|
|
26
|
-
var _jsxFileName = "C:\\
|
|
26
|
+
var _jsxFileName = "C:\\dev\\nice-design-system\\components\\nds-grid\\src\\Grid.js",
|
|
27
27
|
_this = void 0;
|
|
28
28
|
|
|
29
29
|
var Grid = function Grid(props) {
|
package/lib/GridItem.js
CHANGED
|
@@ -15,7 +15,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _excluded = ["children", "cols", "push", "pull", "xs", "sm", "md", "lg", "xl", "className", "elementType"];
|
|
17
17
|
|
|
18
|
-
var _jsxFileName = "C:\\
|
|
18
|
+
var _jsxFileName = "C:\\dev\\nice-design-system\\components\\nds-grid\\src\\GridItem.js",
|
|
19
19
|
_this = void 0;
|
|
20
20
|
|
|
21
21
|
var GridItem = function GridItem(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-grid",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "Grid component for the NICE Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"grid"
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"url": "https://github.com/nice-digital/nice-design-system/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nice-digital/nds-core": "^1.2.
|
|
40
|
+
"@nice-digital/nds-core": "^1.2.13",
|
|
41
41
|
"classnames": "^2.2.6",
|
|
42
42
|
"prop-types": "^15.7.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^16 || ^17"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "2bdf3454416a51f8e6c407a0f03ff14c08b6023a"
|
|
48
48
|
}
|
package/scss/grid.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
1
3
|
@import '~@nice-digital/nds-core/scss/core';
|
|
2
4
|
|
|
3
5
|
////
|
|
@@ -32,8 +34,8 @@
|
|
|
32
34
|
flex-wrap: wrap;
|
|
33
35
|
justify-content: flex-start;
|
|
34
36
|
list-style: none; // Allow the grid system to be used on lists.
|
|
35
|
-
margin-left: -#{$nds-grid-gutter
|
|
36
|
-
margin-right: -#{$nds-grid-gutter
|
|
37
|
+
margin-left: -#{$nds-grid-gutter * 0.5};
|
|
38
|
+
margin-right: -#{$nds-grid-gutter * 0.5};
|
|
37
39
|
max-width: none; // To override the 66ch max width on lists
|
|
38
40
|
padding: 0; // Remove any paddings that might affect the grid system.
|
|
39
41
|
width: calc(100% + #{$nds-grid-gutter});
|
|
@@ -114,8 +116,8 @@
|
|
|
114
116
|
[data-g] {
|
|
115
117
|
// Auto flex-basis with separate width property for IE11 because of https://github.com/philipwalton/flexbugs#flexbug-8
|
|
116
118
|
flex: 0 0 auto;
|
|
117
|
-
margin-left: #{$nds-grid-gutter
|
|
118
|
-
margin-right: #{$nds-grid-gutter
|
|
119
|
+
margin-left: #{$nds-grid-gutter * 0.5};
|
|
120
|
+
margin-right: #{$nds-grid-gutter * 0.5};
|
|
119
121
|
position: relative;
|
|
120
122
|
// Fixed gutters fallback for IE11, due to lack of custom property support:
|
|
121
123
|
width: calc(100% - #{$nds-grid-gutter});
|
|
@@ -155,18 +157,18 @@
|
|
|
155
157
|
|
|
156
158
|
@for $index from 1 through 12 {
|
|
157
159
|
[data-g~='#{ $prefix }#{ $index }'] {
|
|
158
|
-
--grid-item-width: #{percentage($index
|
|
160
|
+
--grid-item-width: #{percentage(math.div($index, 12))};
|
|
159
161
|
// IE 11 fallback, due to lack of custom property support:
|
|
160
|
-
width: calc(#{percentage($index
|
|
162
|
+
width: calc(#{percentage(math.div($index, 12))} - #{$nds-grid-gutter});
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
@for $index from 0 through 12 {
|
|
165
167
|
[data-g~='#{ $prefix }push:#{ $index }'] {
|
|
166
|
-
left: percentage($index
|
|
168
|
+
left: percentage(math.div($index, 12));
|
|
167
169
|
}
|
|
168
170
|
[data-g~='#{ $prefix }pull:#{ $index }'] {
|
|
169
|
-
right: percentage($index
|
|
171
|
+
right: percentage(math.div($index, 12));
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
}
|