@bgord/design 0.27.36 → 0.27.39

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.
@@ -1370,6 +1370,7 @@ var FlexWrapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1370
1370
 
1371
1371
  _this = _AbstractGenerator.call(this, 'Flex wraps') || this;
1372
1372
  _this.flexWraps = config.flexWraps;
1373
+ _this.breakpoints = config.breakpoints;
1373
1374
  return _this;
1374
1375
  }
1375
1376
 
@@ -1385,6 +1386,22 @@ var FlexWrapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1385
1386
  output += "*[data-wrap='" + key + "'] {\n flex-wrap: " + value + ";\n}\n";
1386
1387
  }
1387
1388
 
1389
+ for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
1390
+ var _Object$entries2$_i = _Object$entries2[_i2],
1391
+ name = _Object$entries2$_i[0],
1392
+ _value = _Object$entries2$_i[1];
1393
+ output += "@media (max-width: " + _value + "px) {\n";
1394
+
1395
+ for (var _i3 = 0, _Object$entries3 = Object.entries(this.flexWraps); _i3 < _Object$entries3.length; _i3++) {
1396
+ var _Object$entries3$_i = _Object$entries3[_i3],
1397
+ _key = _Object$entries3$_i[0],
1398
+ _value2 = _Object$entries3$_i[1];
1399
+ output += " *[data-" + name + "-wrap='" + _key + "'] {\n flex-wrap: " + _value2 + ";\n }\n";
1400
+ }
1401
+
1402
+ output += "}\n";
1403
+ }
1404
+
1388
1405
  return output;
1389
1406
  };
1390
1407
 
@@ -2116,6 +2133,52 @@ var HeightsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
2116
2133
  return HeightsGenerator;
2117
2134
  }(AbstractGenerator);
2118
2135
 
2136
+ var GapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
2137
+ _inheritsLoose(GapGenerator, _AbstractGenerator);
2138
+
2139
+ function GapGenerator(config) {
2140
+ var _this;
2141
+
2142
+ _this = _AbstractGenerator.call(this, 'Gaps') || this;
2143
+ _this.spacing = config.spacing;
2144
+ _this.breakpoints = config.breakpoints;
2145
+ return _this;
2146
+ }
2147
+
2148
+ var _proto = GapGenerator.prototype;
2149
+
2150
+ _proto.generateCss = function generateCss() {
2151
+ var output = ''; // Regular gap: data-gap="*"
2152
+
2153
+ for (var _i = 0, _Object$entries = Object.entries(this.spacing); _i < _Object$entries.length; _i++) {
2154
+ var _Object$entries$_i = _Object$entries[_i],
2155
+ key = _Object$entries$_i[0],
2156
+ value = _Object$entries$_i[1];
2157
+ output += "*[data-gap='" + key + "'] {\n gap: " + value + ";\n}\n";
2158
+ }
2159
+
2160
+ for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
2161
+ var _Object$entries2$_i = _Object$entries2[_i2],
2162
+ name = _Object$entries2$_i[0],
2163
+ _value = _Object$entries2$_i[1];
2164
+ output += "@media (max-width: " + _value + "px) {\n";
2165
+
2166
+ for (var _i3 = 0, _Object$entries3 = Object.entries(this.spacing); _i3 < _Object$entries3.length; _i3++) {
2167
+ var _Object$entries3$_i = _Object$entries3[_i3],
2168
+ _key = _Object$entries3$_i[0],
2169
+ _value2 = _Object$entries3$_i[1];
2170
+ output += " *[data-" + name + "-gap='" + _key + "'] {\n gap: " + _value2 + ";\n }\n";
2171
+ }
2172
+
2173
+ output += "}\n";
2174
+ }
2175
+
2176
+ return output;
2177
+ };
2178
+
2179
+ return GapGenerator;
2180
+ }(AbstractGenerator);
2181
+
2119
2182
  var Spacing = {
2120
2183
  '0': '0',
2121
2184
  '3': '3px',
@@ -2444,7 +2507,7 @@ function _main() {
2444
2507
  heights: Heights
2445
2508
  };
2446
2509
  _context2.next = 3;
2447
- return new GeneratorProcessor().process([new Margins(config), new Paddings(config), new DisplaysGenerator(config), new AxisPlacementsGenerator(config), new FlexWrapGenerator(config), new FlexDirectionsGenerator(config), new FlexGrowsGenerator(config), new WidthsGenerator(config), new PositionsGenerator(config), new ZIndexGenerator(config), new FontSizeGenerator(config), new FontWeightGenerator(config), new FontColorsGenerator(config), new LineHeightsGenerator(config), new LetterSpacingsGenerator(config), new BackgroundsGenerator(config), new BorderWidthsGenerator(config), new BorderColorsGenerator(config), new BorderRadiusesGenerator(config), new MaxWidthsGenerator(config), new TransformsGenerator(config), new OverflowsGenerator(config), new PositionersGenerator(), new HeightsGenerator(config)]);
2510
+ return new GeneratorProcessor().process([new Margins(config), new Paddings(config), new DisplaysGenerator(config), new AxisPlacementsGenerator(config), new FlexWrapGenerator(config), new FlexDirectionsGenerator(config), new FlexGrowsGenerator(config), new GapGenerator(config), new WidthsGenerator(config), new PositionsGenerator(config), new ZIndexGenerator(config), new FontSizeGenerator(config), new FontWeightGenerator(config), new FontColorsGenerator(config), new LineHeightsGenerator(config), new LetterSpacingsGenerator(config), new BackgroundsGenerator(config), new BorderWidthsGenerator(config), new BorderColorsGenerator(config), new BorderRadiusesGenerator(config), new MaxWidthsGenerator(config), new TransformsGenerator(config), new OverflowsGenerator(config), new PositionersGenerator(), new HeightsGenerator(config)]);
2448
2511
 
2449
2512
  case 3:
2450
2513
  case "end":