@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.
- package/dist/border-colors-generator.d.ts +3 -0
- package/dist/design.cjs.development.js +43 -3
- package/dist/design.cjs.development.js.map +1 -1
- package/dist/design.cjs.production.min.js +1 -1
- package/dist/design.cjs.production.min.js.map +1 -1
- package/dist/design.esm.js +43 -3
- package/dist/design.esm.js.map +1 -1
- package/dist/generator.d.ts +2 -1
- package/dist/main.css +133 -9
- package/dist/main.min.css +1 -1
- package/dist/main.min.css.br +0 -0
- package/dist/main.min.css.gz +0 -0
- package/dist/max-widths-generator.d.ts +8 -0
- package/dist/tokens.d.ts +2 -0
- package/package.json +1 -1
- package/src/border-colors-generator.ts +12 -1
- package/src/generate-css.ts +4 -0
- package/src/generator.ts +2 -0
- package/src/max-widths-generator.ts +28 -0
- package/src/tokens.ts +8 -0
- package/src/ui/button.css +20 -5
|
@@ -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":
|