@bgord/design 0.27.0 → 0.27.4

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.
@@ -1680,6 +1680,7 @@ var LetterSpacingsGenerator = /*#__PURE__*/function () {
1680
1680
  var FlexGrowsGenerator = /*#__PURE__*/function () {
1681
1681
  function FlexGrowsGenerator(config) {
1682
1682
  this.flexGrows = config.flexGrows;
1683
+ this.breakpoints = config.breakpoints;
1683
1684
  }
1684
1685
 
1685
1686
  var _proto = FlexGrowsGenerator.prototype;
@@ -1698,6 +1699,22 @@ var FlexGrowsGenerator = /*#__PURE__*/function () {
1698
1699
  output += "*[data-grow='" + key + "'] {\n flex-grow: " + value + ";\n}\n";
1699
1700
  }
1700
1701
 
1702
+ for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
1703
+ var _Object$entries2$_i = _Object$entries2[_i2],
1704
+ name = _Object$entries2$_i[0],
1705
+ _value = _Object$entries2$_i[1];
1706
+ output += "@media (max-width: " + _value + "px) {\n";
1707
+
1708
+ for (var _i3 = 0, _Object$entries3 = Object.entries(this.flexGrows); _i3 < _Object$entries3.length; _i3++) {
1709
+ var _Object$entries3$_i = _Object$entries3[_i3],
1710
+ _key = _Object$entries3$_i[0],
1711
+ _value2 = _Object$entries3$_i[1];
1712
+ output += " *[data-" + name + "-grow='" + _key + "'] {\n flex-grow: " + _value2 + ";\n }\n";
1713
+ }
1714
+
1715
+ output += "}\n";
1716
+ }
1717
+
1701
1718
  return output;
1702
1719
  };
1703
1720
 
@@ -1919,6 +1936,37 @@ var MaxWidthsGenerator = /*#__PURE__*/function () {
1919
1936
  return MaxWidthsGenerator;
1920
1937
  }();
1921
1938
 
1939
+ var TransformsGenerator = /*#__PURE__*/function () {
1940
+ function TransformsGenerator(config) {
1941
+ this.transforms = config.transforms;
1942
+ }
1943
+
1944
+ var _proto = TransformsGenerator.prototype;
1945
+
1946
+ _proto.generateHeader = function generateHeader() {
1947
+ return '/* Transforms */\n\n';
1948
+ };
1949
+
1950
+ _proto.generateCss = function generateCss() {
1951
+ var output = ''; // Regular display: data-transform="*"
1952
+
1953
+ for (var _i = 0, _Object$entries = Object.entries(this.transforms); _i < _Object$entries.length; _i++) {
1954
+ var _Object$entries$_i = _Object$entries[_i],
1955
+ key = _Object$entries$_i[0],
1956
+ value = _Object$entries$_i[1];
1957
+ output += "*[data-transform='" + key + "'] {\n text-transform: " + value + ";\n}\n";
1958
+ }
1959
+
1960
+ return output;
1961
+ };
1962
+
1963
+ _proto.generateFooter = function generateFooter() {
1964
+ return '/* ===================== */\n\n';
1965
+ };
1966
+
1967
+ return TransformsGenerator;
1968
+ }();
1969
+
1922
1970
  var Spacing = {
1923
1971
  '0': '0',
1924
1972
  '3': '3px',
@@ -2078,6 +2126,12 @@ var MaxWidths = {
2078
2126
  '768': '768px',
2079
2127
  unset: 'unset'
2080
2128
  };
2129
+ var Transforms = {
2130
+ uppercase: 'uppercase',
2131
+ lowercase: 'lowercase',
2132
+ capitalize: 'capitalize',
2133
+ none: 'none'
2134
+ };
2081
2135
 
2082
2136
  var GeneratorProcessor = /*#__PURE__*/function () {
2083
2137
  function GeneratorProcessor() {}
@@ -2131,10 +2185,16 @@ var GeneratorProcessor = /*#__PURE__*/function () {
2131
2185
 
2132
2186
  case 21:
2133
2187
  output = _context.t4 += _context.sent;
2134
- _context.next = 24;
2188
+ _context.t5 = output;
2189
+ _context.next = 25;
2190
+ return new File('src/ui/checkbox.css').read();
2191
+
2192
+ case 25:
2193
+ output = _context.t5 += _context.sent;
2194
+ _context.next = 28;
2135
2195
  return new File('dist/main.css').save(output);
2136
2196
 
2137
- case 24:
2197
+ case 28:
2138
2198
  case "end":
2139
2199
  return _context.stop();
2140
2200
  }
@@ -2185,10 +2245,11 @@ function _main() {
2185
2245
  borderWidths: BorderWidths,
2186
2246
  borderColors: BorderColors,
2187
2247
  borderRadiuses: BorderRadiuses,
2188
- maxWidths: MaxWidths
2248
+ maxWidths: MaxWidths,
2249
+ transforms: Transforms
2189
2250
  };
2190
2251
  _context2.next = 3;
2191
- 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)]);
2252
+ 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)]);
2192
2253
 
2193
2254
  case 3:
2194
2255
  case "end":