@bgord/design 0.26.0 → 0.27.2

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
 
@@ -1888,6 +1905,68 @@ var BorderRadiusesGenerator = /*#__PURE__*/function () {
1888
1905
  return BorderRadiusesGenerator;
1889
1906
  }();
1890
1907
 
1908
+ var MaxWidthsGenerator = /*#__PURE__*/function () {
1909
+ function MaxWidthsGenerator(config) {
1910
+ this.maxWidths = config.maxWidths;
1911
+ }
1912
+
1913
+ var _proto = MaxWidthsGenerator.prototype;
1914
+
1915
+ _proto.generateHeader = function generateHeader() {
1916
+ return '/* Max widths */\n\n';
1917
+ };
1918
+
1919
+ _proto.generateCss = function generateCss() {
1920
+ var output = ''; // Regular display: data-max-width="*"
1921
+
1922
+ for (var _i = 0, _Object$entries = Object.entries(this.maxWidths); _i < _Object$entries.length; _i++) {
1923
+ var _Object$entries$_i = _Object$entries[_i],
1924
+ key = _Object$entries$_i[0],
1925
+ value = _Object$entries$_i[1];
1926
+ output += "*[data-max-width='" + key + "'] {\n max-width: " + value + ";\n}\n";
1927
+ }
1928
+
1929
+ return output;
1930
+ };
1931
+
1932
+ _proto.generateFooter = function generateFooter() {
1933
+ return '/* ===================== */\n\n';
1934
+ };
1935
+
1936
+ return MaxWidthsGenerator;
1937
+ }();
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
+
1891
1970
  var Spacing = {
1892
1971
  '0': '0',
1893
1972
  '3': '3px',
@@ -2042,6 +2121,17 @@ var BorderRadiuses = {
2042
2121
  '4': '4px',
2043
2122
  '50%': '50%'
2044
2123
  };
2124
+ var MaxWidths = {
2125
+ '100%': '100%',
2126
+ '768': '768px',
2127
+ unset: 'unset'
2128
+ };
2129
+ var Transforms = {
2130
+ uppercase: 'uppercase',
2131
+ lowercase: 'lowercase',
2132
+ capitalize: 'capitalize',
2133
+ none: 'none'
2134
+ };
2045
2135
 
2046
2136
  var GeneratorProcessor = /*#__PURE__*/function () {
2047
2137
  function GeneratorProcessor() {}
@@ -2148,10 +2238,12 @@ function _main() {
2148
2238
  flexGrows: FlexGrows,
2149
2239
  borderWidths: BorderWidths,
2150
2240
  borderColors: BorderColors,
2151
- borderRadiuses: BorderRadiuses
2241
+ borderRadiuses: BorderRadiuses,
2242
+ maxWidths: MaxWidths,
2243
+ transforms: Transforms
2152
2244
  };
2153
2245
  _context2.next = 3;
2154
- 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)]);
2246
+ 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)]);
2155
2247
 
2156
2248
  case 3:
2157
2249
  case "end":