@bgord/design 0.25.0 → 0.27.0

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.
@@ -1,6 +1,9 @@
1
1
  import { GeneratorInterface, GeneratorConfigType } from './generator';
2
2
  export declare class BorderColorsGenerator implements GeneratorInterface {
3
3
  borderColors: GeneratorConfigType['borderColors'];
4
+ greens: GeneratorConfigType['greens'];
5
+ oranges: GeneratorConfigType['oranges'];
6
+ reds: GeneratorConfigType['reds'];
4
7
  constructor(config: GeneratorConfigType);
5
8
  generateHeader(): string;
6
9
  generateCss(): string;
@@ -1784,6 +1784,9 @@ var BorderWidthsGenerator = /*#__PURE__*/function () {
1784
1784
  var BorderColorsGenerator = /*#__PURE__*/function () {
1785
1785
  function BorderColorsGenerator(config) {
1786
1786
  this.borderColors = config.borderColors;
1787
+ this.greens = config.greens;
1788
+ this.oranges = config.oranges;
1789
+ this.reds = config.reds;
1787
1790
  }
1788
1791
 
1789
1792
  var _proto = BorderColorsGenerator.prototype;
@@ -1795,7 +1798,7 @@ var BorderColorsGenerator = /*#__PURE__*/function () {
1795
1798
  _proto.generateCss = function generateCss() {
1796
1799
  var output = '';
1797
1800
 
1798
- for (var _i = 0, _Object$entries = Object.entries(this.borderColors); _i < _Object$entries.length; _i++) {
1801
+ for (var _i = 0, _Object$entries = Object.entries(_extends({}, this.borderColors, this.greens, this.oranges, this.reds)); _i < _Object$entries.length; _i++) {
1799
1802
  var _Object$entries$_i = _Object$entries[_i],
1800
1803
  key = _Object$entries$_i[0],
1801
1804
  value = _Object$entries$_i[1];
@@ -1885,6 +1888,37 @@ var BorderRadiusesGenerator = /*#__PURE__*/function () {
1885
1888
  return BorderRadiusesGenerator;
1886
1889
  }();
1887
1890
 
1891
+ var MaxWidthsGenerator = /*#__PURE__*/function () {
1892
+ function MaxWidthsGenerator(config) {
1893
+ this.maxWidths = config.maxWidths;
1894
+ }
1895
+
1896
+ var _proto = MaxWidthsGenerator.prototype;
1897
+
1898
+ _proto.generateHeader = function generateHeader() {
1899
+ return '/* Max widths */\n\n';
1900
+ };
1901
+
1902
+ _proto.generateCss = function generateCss() {
1903
+ var output = ''; // Regular display: data-max-width="*"
1904
+
1905
+ for (var _i = 0, _Object$entries = Object.entries(this.maxWidths); _i < _Object$entries.length; _i++) {
1906
+ var _Object$entries$_i = _Object$entries[_i],
1907
+ key = _Object$entries$_i[0],
1908
+ value = _Object$entries$_i[1];
1909
+ output += "*[data-max-width='" + key + "'] {\n max-width: " + value + ";\n}\n";
1910
+ }
1911
+
1912
+ return output;
1913
+ };
1914
+
1915
+ _proto.generateFooter = function generateFooter() {
1916
+ return '/* ===================== */\n\n';
1917
+ };
1918
+
1919
+ return MaxWidthsGenerator;
1920
+ }();
1921
+
1888
1922
  var Spacing = {
1889
1923
  '0': '0',
1890
1924
  '3': '3px',
@@ -2039,6 +2073,11 @@ var BorderRadiuses = {
2039
2073
  '4': '4px',
2040
2074
  '50%': '50%'
2041
2075
  };
2076
+ var MaxWidths = {
2077
+ '100%': '100%',
2078
+ '768': '768px',
2079
+ unset: 'unset'
2080
+ };
2042
2081
 
2043
2082
  var GeneratorProcessor = /*#__PURE__*/function () {
2044
2083
  function GeneratorProcessor() {}
@@ -2145,10 +2184,11 @@ function _main() {
2145
2184
  flexGrows: FlexGrows,
2146
2185
  borderWidths: BorderWidths,
2147
2186
  borderColors: BorderColors,
2148
- borderRadiuses: BorderRadiuses
2187
+ borderRadiuses: BorderRadiuses,
2188
+ maxWidths: MaxWidths
2149
2189
  };
2150
2190
  _context2.next = 3;
2151
- 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)]);
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)]);
2152
2192
 
2153
2193
  case 3:
2154
2194
  case "end":