@bgord/design 0.27.56 → 0.27.57

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/README.md CHANGED
@@ -241,6 +241,17 @@ Possible values: see the Colors section.
241
241
  | 1 | 1 |
242
242
  | unset | unset |
243
243
 
244
+ ## Flex shrinks
245
+
246
+ | Definition | Value |
247
+ | ----------- | ----------- |
248
+ | data-shrink | flex-shrink |
249
+
250
+ | Key | Value |
251
+ | ----- | :---: |
252
+ | 0 | 0 |
253
+ | unset | unset |
254
+
244
255
  ## Border widths
245
256
 
246
257
  | Definition | Value |
@@ -1553,7 +1553,7 @@ var FontWeightGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1553
1553
  function FontWeightGenerator(config) {
1554
1554
  var _this;
1555
1555
 
1556
- _this = _AbstractGenerator.call(this, 'Font sizes') || this;
1556
+ _this = _AbstractGenerator.call(this, 'Font weights') || this;
1557
1557
  _this.fontWeights = config.fontWeights;
1558
1558
  return _this;
1559
1559
  }
@@ -1744,7 +1744,7 @@ var FlexGrowsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1744
1744
  function FlexGrowsGenerator(config) {
1745
1745
  var _this;
1746
1746
 
1747
- _this = _AbstractGenerator.call(this, 'Line heights') || this;
1747
+ _this = _AbstractGenerator.call(this, 'Flex grows') || this;
1748
1748
  _this.flexGrows = config.flexGrows;
1749
1749
  _this.breakpoints = config.breakpoints;
1750
1750
  return _this;
@@ -1784,6 +1784,52 @@ var FlexGrowsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1784
1784
  return FlexGrowsGenerator;
1785
1785
  }(AbstractGenerator);
1786
1786
 
1787
+ var FlexShrinksGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1788
+ _inheritsLoose(FlexShrinksGenerator, _AbstractGenerator);
1789
+
1790
+ function FlexShrinksGenerator(config) {
1791
+ var _this;
1792
+
1793
+ _this = _AbstractGenerator.call(this, 'Flex shrinks') || this;
1794
+ _this.flexShrinks = config.flexShrinks;
1795
+ _this.breakpoints = config.breakpoints;
1796
+ return _this;
1797
+ }
1798
+
1799
+ var _proto = FlexShrinksGenerator.prototype;
1800
+
1801
+ _proto.generateCss = function generateCss() {
1802
+ var output = ''; // Regular display: data-shrink="*"
1803
+
1804
+ for (var _i = 0, _Object$entries = Object.entries(this.flexShrinks); _i < _Object$entries.length; _i++) {
1805
+ var _Object$entries$_i = _Object$entries[_i],
1806
+ key = _Object$entries$_i[0],
1807
+ value = _Object$entries$_i[1];
1808
+ output += "*[data-shrink='" + key + "'] {\n flex-shrink: " + value + ";\n}\n";
1809
+ }
1810
+
1811
+ for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
1812
+ var _Object$entries2$_i = _Object$entries2[_i2],
1813
+ name = _Object$entries2$_i[0],
1814
+ _value = _Object$entries2$_i[1];
1815
+ output += "@media (max-width: " + _value + "px) {\n";
1816
+
1817
+ for (var _i3 = 0, _Object$entries3 = Object.entries(this.flexShrinks); _i3 < _Object$entries3.length; _i3++) {
1818
+ var _Object$entries3$_i = _Object$entries3[_i3],
1819
+ _key = _Object$entries3$_i[0],
1820
+ _value2 = _Object$entries3$_i[1];
1821
+ output += " *[data-" + name + "-shrink='" + _key + "'] {\n flex-shrink: " + _value2 + ";\n }\n";
1822
+ }
1823
+
1824
+ output += "}\n";
1825
+ }
1826
+
1827
+ return output;
1828
+ };
1829
+
1830
+ return FlexShrinksGenerator;
1831
+ }(AbstractGenerator);
1832
+
1787
1833
  var BorderWidthsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
1788
1834
  _inheritsLoose(BorderWidthsGenerator, _AbstractGenerator);
1789
1835
 
@@ -2281,7 +2327,7 @@ var PointerEventsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
2281
2327
  function PointerEventsGenerator(config) {
2282
2328
  var _this;
2283
2329
 
2284
- _this = _AbstractGenerator.call(this, 'Cursors') || this;
2330
+ _this = _AbstractGenerator.call(this, 'Pointer events') || this;
2285
2331
  _this.pointerEvents = config.pointerEvents;
2286
2332
  _this.breakpoints = config.breakpoints;
2287
2333
  return _this;
@@ -2497,6 +2543,10 @@ var FlexGrows = {
2497
2543
  '1': '1',
2498
2544
  unset: 'unset'
2499
2545
  };
2546
+ var FlexShrinks = {
2547
+ '0': '0',
2548
+ unset: 'unset'
2549
+ };
2500
2550
  var BorderWidths = {
2501
2551
  '1': 1,
2502
2552
  '2': 2,
@@ -2709,6 +2759,7 @@ function _main() {
2709
2759
  breakpoints: Breakpoints,
2710
2760
  letterSpacings: LetterSpacings,
2711
2761
  flexGrows: FlexGrows,
2762
+ flexShrinks: FlexShrinks,
2712
2763
  borderWidths: BorderWidths,
2713
2764
  borderColors: BorderColors,
2714
2765
  borderRadiuses: BorderRadiuses,
@@ -2721,7 +2772,7 @@ function _main() {
2721
2772
  backdrops: Backdrops
2722
2773
  };
2723
2774
  _context2.next = 3;
2724
- 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(config), new HeightsGenerator(config), new CursorsGenerator(config), new PointerEventsGenerator(config), new BackdropsGenerator(config)]);
2775
+ 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 FlexShrinksGenerator(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(config), new HeightsGenerator(config), new CursorsGenerator(config), new PointerEventsGenerator(config), new BackdropsGenerator(config)]);
2725
2776
 
2726
2777
  case 3:
2727
2778
  case "end":