@bgord/design 0.9.2 → 0.10.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/axis-placements-generator.d.ts +0 -2
- package/dist/backgrounds-generator.d.ts +0 -2
- package/dist/design.cjs.development.js +148 -40
- 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 +148 -40
- package/dist/design.esm.js.map +1 -1
- package/dist/displays-generator.d.ts +0 -1
- package/dist/flex-directions-generator.d.ts +1 -2
- package/dist/flex-wraps-generator.d.ts +0 -2
- package/dist/font-colors-generator.d.ts +0 -2
- package/dist/font-size-generator.d.ts +0 -2
- package/dist/font-weight-generator.d.ts +0 -2
- package/dist/generator.d.ts +2 -3
- package/dist/line-height-generator.d.ts +0 -2
- package/dist/main.css +444 -0
- package/dist/main.min.css +1 -1
- package/dist/margins-generator.d.ts +1 -1
- package/dist/paddings-generator.d.ts +1 -1
- package/dist/postions-generator.d.ts +0 -2
- package/dist/tokens.d.ts +2 -0
- package/dist/widhts-generator.d.ts +0 -2
- package/dist/z-index-generator.d.ts +0 -2
- package/package.json +1 -1
- package/src/axis-placements-generator.ts +0 -4
- package/src/backgrounds-generator.ts +0 -4
- package/src/displays-generator.ts +0 -2
- package/src/flex-directions-generator.ts +12 -5
- package/src/flex-wraps-generator.ts +0 -4
- package/src/font-colors-generator.ts +0 -4
- package/src/font-size-generator.ts +0 -4
- package/src/font-weight-generator.ts +0 -4
- package/src/generate-css.ts +2 -0
- package/src/generator.ts +2 -3
- package/src/line-height-generator.ts +0 -4
- package/src/margins-generator.ts +36 -9
- package/src/paddings-generator.ts +36 -2
- package/src/postions-generator.ts +0 -4
- package/src/tokens.ts +6 -0
- package/src/widhts-generator.ts +0 -4
- package/src/z-index-generator.ts +0 -4
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { GeneratorInterface, GeneratorConfigType } from './generator';
|
|
2
2
|
export declare class AxisPlacementsGenerator implements GeneratorInterface {
|
|
3
|
-
spacing: GeneratorConfigType['spacing'];
|
|
4
|
-
displays: GeneratorConfigType['displays'];
|
|
5
3
|
axisPlacements: GeneratorConfigType['axisPlacements'];
|
|
6
4
|
constructor(config: GeneratorConfigType);
|
|
7
5
|
generateHeader(): string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { GeneratorInterface, GeneratorConfigType } from './generator';
|
|
2
2
|
export declare class BackgroundsGenerator implements GeneratorInterface {
|
|
3
|
-
spacing: GeneratorConfigType['spacing'];
|
|
4
|
-
displays: GeneratorConfigType['displays'];
|
|
5
3
|
colors: GeneratorConfigType['colors'];
|
|
6
4
|
constructor(config: GeneratorConfigType);
|
|
7
5
|
generateHeader(): string;
|
|
@@ -847,7 +847,7 @@ var File = /*#__PURE__*/function () {
|
|
|
847
847
|
var Margins = /*#__PURE__*/function () {
|
|
848
848
|
function Margins(config) {
|
|
849
849
|
this.spacing = config.spacing;
|
|
850
|
-
this.
|
|
850
|
+
this.breakpoints = config.breakpoints;
|
|
851
851
|
}
|
|
852
852
|
|
|
853
853
|
var _proto = Margins.prototype;
|
|
@@ -857,55 +857,49 @@ var Margins = /*#__PURE__*/function () {
|
|
|
857
857
|
};
|
|
858
858
|
|
|
859
859
|
_proto.generateCss = function generateCss() {
|
|
860
|
-
var output = '';
|
|
860
|
+
var output = '';
|
|
861
861
|
|
|
862
862
|
for (var _i = 0, _Object$entries = Object.entries(this.spacing); _i < _Object$entries.length; _i++) {
|
|
863
863
|
var _Object$entries$_i = _Object$entries[_i],
|
|
864
864
|
key = _Object$entries$_i[0],
|
|
865
865
|
value = _Object$entries$_i[1];
|
|
866
866
|
output += "*[data-m='" + key + "'] {\n margin: " + value + ";\n}\n";
|
|
867
|
-
}
|
|
868
|
-
|
|
867
|
+
}
|
|
869
868
|
|
|
870
869
|
for (var _i2 = 0, _Object$entries2 = Object.entries(this.spacing); _i2 < _Object$entries2.length; _i2++) {
|
|
871
870
|
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
872
871
|
_key = _Object$entries2$_i[0],
|
|
873
872
|
_value = _Object$entries2$_i[1];
|
|
874
873
|
output += "*[data-mx='" + _key + "'] {\n margin-left: " + _value + ";\n margin-right: " + _value + ";\n}\n";
|
|
875
|
-
}
|
|
876
|
-
|
|
874
|
+
}
|
|
877
875
|
|
|
878
876
|
for (var _i3 = 0, _Object$entries3 = Object.entries(this.spacing); _i3 < _Object$entries3.length; _i3++) {
|
|
879
877
|
var _Object$entries3$_i = _Object$entries3[_i3],
|
|
880
878
|
_key2 = _Object$entries3$_i[0],
|
|
881
879
|
_value2 = _Object$entries3$_i[1];
|
|
882
880
|
output += "*[data-my='" + _key2 + "'] {\n margin-top: " + _value2 + ";\n margin-bottom: " + _value2 + ";\n}\n";
|
|
883
|
-
}
|
|
884
|
-
|
|
881
|
+
}
|
|
885
882
|
|
|
886
883
|
for (var _i4 = 0, _Object$entries4 = Object.entries(this.spacing); _i4 < _Object$entries4.length; _i4++) {
|
|
887
884
|
var _Object$entries4$_i = _Object$entries4[_i4],
|
|
888
885
|
_key3 = _Object$entries4$_i[0],
|
|
889
886
|
_value3 = _Object$entries4$_i[1];
|
|
890
887
|
output += "*[data-mt='" + _key3 + "'] {\n margin-top: " + _value3 + ";\n}\n";
|
|
891
|
-
}
|
|
892
|
-
|
|
888
|
+
}
|
|
893
889
|
|
|
894
890
|
for (var _i5 = 0, _Object$entries5 = Object.entries(this.spacing); _i5 < _Object$entries5.length; _i5++) {
|
|
895
891
|
var _Object$entries5$_i = _Object$entries5[_i5],
|
|
896
892
|
_key4 = _Object$entries5$_i[0],
|
|
897
893
|
_value4 = _Object$entries5$_i[1];
|
|
898
894
|
output += "*[data-mr='" + _key4 + "'] {\n margin-right: " + _value4 + ";\n}\n";
|
|
899
|
-
}
|
|
900
|
-
|
|
895
|
+
}
|
|
901
896
|
|
|
902
897
|
for (var _i6 = 0, _Object$entries6 = Object.entries(this.spacing); _i6 < _Object$entries6.length; _i6++) {
|
|
903
898
|
var _Object$entries6$_i = _Object$entries6[_i6],
|
|
904
899
|
_key5 = _Object$entries6$_i[0],
|
|
905
900
|
_value5 = _Object$entries6$_i[1];
|
|
906
901
|
output += "*[data-mb='" + _key5 + "'] {\n margin-bottom: " + _value5 + ";\n}\n";
|
|
907
|
-
}
|
|
908
|
-
|
|
902
|
+
}
|
|
909
903
|
|
|
910
904
|
for (var _i7 = 0, _Object$entries7 = Object.entries(this.spacing); _i7 < _Object$entries7.length; _i7++) {
|
|
911
905
|
var _Object$entries7$_i = _Object$entries7[_i7],
|
|
@@ -914,6 +908,64 @@ var Margins = /*#__PURE__*/function () {
|
|
|
914
908
|
output += "*[data-ml='" + _key6 + "'] {\n margin-left: " + _value6 + ";\n}\n";
|
|
915
909
|
}
|
|
916
910
|
|
|
911
|
+
for (var _i8 = 0, _Object$entries8 = Object.entries(this.breakpoints); _i8 < _Object$entries8.length; _i8++) {
|
|
912
|
+
var _Object$entries8$_i = _Object$entries8[_i8],
|
|
913
|
+
name = _Object$entries8$_i[0],
|
|
914
|
+
_value7 = _Object$entries8$_i[1];
|
|
915
|
+
output += "@media (max-width: " + _value7 + "px) {\n";
|
|
916
|
+
|
|
917
|
+
for (var _i9 = 0, _Object$entries9 = Object.entries(this.spacing); _i9 < _Object$entries9.length; _i9++) {
|
|
918
|
+
var _Object$entries9$_i = _Object$entries9[_i9],
|
|
919
|
+
_key7 = _Object$entries9$_i[0],
|
|
920
|
+
_value8 = _Object$entries9$_i[1];
|
|
921
|
+
output += " *[data-" + name + "-m='" + _key7 + "'] {\n margin: " + _value8 + ";\n }\n";
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
for (var _i10 = 0, _Object$entries10 = Object.entries(this.spacing); _i10 < _Object$entries10.length; _i10++) {
|
|
925
|
+
var _Object$entries10$_i = _Object$entries10[_i10],
|
|
926
|
+
_key8 = _Object$entries10$_i[0],
|
|
927
|
+
_value9 = _Object$entries10$_i[1];
|
|
928
|
+
output += " *[data-" + name + "-mx='" + _key8 + "'] {\n margin-left: " + _value9 + ";\n margin-right: " + _value9 + ";\n }\n";
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
for (var _i11 = 0, _Object$entries11 = Object.entries(this.spacing); _i11 < _Object$entries11.length; _i11++) {
|
|
932
|
+
var _Object$entries11$_i = _Object$entries11[_i11],
|
|
933
|
+
_key9 = _Object$entries11$_i[0],
|
|
934
|
+
_value10 = _Object$entries11$_i[1];
|
|
935
|
+
output += " *[data-" + name + "-my='" + _key9 + "'] {\n margin-top: " + _value10 + ";\n margin-bottom: " + _value10 + ";\n }\n";
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
for (var _i12 = 0, _Object$entries12 = Object.entries(this.spacing); _i12 < _Object$entries12.length; _i12++) {
|
|
939
|
+
var _Object$entries12$_i = _Object$entries12[_i12],
|
|
940
|
+
_key10 = _Object$entries12$_i[0],
|
|
941
|
+
_value11 = _Object$entries12$_i[1];
|
|
942
|
+
output += " *[data-" + name + "-mt='" + _key10 + "'] {\n margin-top: " + _value11 + ";\n }\n";
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
for (var _i13 = 0, _Object$entries13 = Object.entries(this.spacing); _i13 < _Object$entries13.length; _i13++) {
|
|
946
|
+
var _Object$entries13$_i = _Object$entries13[_i13],
|
|
947
|
+
_key11 = _Object$entries13$_i[0],
|
|
948
|
+
_value12 = _Object$entries13$_i[1];
|
|
949
|
+
output += " *[data-" + name + "-mr='" + _key11 + "'] {\n margin-right: " + _value12 + ";\n }\n";
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
for (var _i14 = 0, _Object$entries14 = Object.entries(this.spacing); _i14 < _Object$entries14.length; _i14++) {
|
|
953
|
+
var _Object$entries14$_i = _Object$entries14[_i14],
|
|
954
|
+
_key12 = _Object$entries14$_i[0],
|
|
955
|
+
_value13 = _Object$entries14$_i[1];
|
|
956
|
+
output += " *[data-" + name + "-mb='" + _key12 + "'] {\n margin-bottom: " + _value13 + ";\n }\n";
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
for (var _i15 = 0, _Object$entries15 = Object.entries(this.spacing); _i15 < _Object$entries15.length; _i15++) {
|
|
960
|
+
var _Object$entries15$_i = _Object$entries15[_i15],
|
|
961
|
+
_key13 = _Object$entries15$_i[0],
|
|
962
|
+
_value14 = _Object$entries15$_i[1];
|
|
963
|
+
output += " *[data-" + name + "-ml='" + _key13 + "'] {\n margin-left: " + _value14 + ";\n }\n";
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
output += "}\n";
|
|
967
|
+
}
|
|
968
|
+
|
|
917
969
|
return output;
|
|
918
970
|
};
|
|
919
971
|
|
|
@@ -927,7 +979,7 @@ var Margins = /*#__PURE__*/function () {
|
|
|
927
979
|
var Paddings = /*#__PURE__*/function () {
|
|
928
980
|
function Paddings(config) {
|
|
929
981
|
this.spacing = config.spacing;
|
|
930
|
-
this.
|
|
982
|
+
this.breakpoints = config.breakpoints;
|
|
931
983
|
}
|
|
932
984
|
|
|
933
985
|
var _proto = Paddings.prototype;
|
|
@@ -994,6 +1046,64 @@ var Paddings = /*#__PURE__*/function () {
|
|
|
994
1046
|
output += "*[data-pl='" + _key6 + "'] {\n padding-left: " + _value6 + ";\n}\n";
|
|
995
1047
|
}
|
|
996
1048
|
|
|
1049
|
+
for (var _i8 = 0, _Object$entries8 = Object.entries(this.breakpoints); _i8 < _Object$entries8.length; _i8++) {
|
|
1050
|
+
var _Object$entries8$_i = _Object$entries8[_i8],
|
|
1051
|
+
name = _Object$entries8$_i[0],
|
|
1052
|
+
_value7 = _Object$entries8$_i[1];
|
|
1053
|
+
output += "@media (max-width: " + _value7 + "px) {\n";
|
|
1054
|
+
|
|
1055
|
+
for (var _i9 = 0, _Object$entries9 = Object.entries(this.spacing); _i9 < _Object$entries9.length; _i9++) {
|
|
1056
|
+
var _Object$entries9$_i = _Object$entries9[_i9],
|
|
1057
|
+
_key7 = _Object$entries9$_i[0],
|
|
1058
|
+
_value8 = _Object$entries9$_i[1];
|
|
1059
|
+
output += " *[data-" + name + "-p='" + _key7 + "'] {\n padding: " + _value8 + ";\n }\n";
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
for (var _i10 = 0, _Object$entries10 = Object.entries(this.spacing); _i10 < _Object$entries10.length; _i10++) {
|
|
1063
|
+
var _Object$entries10$_i = _Object$entries10[_i10],
|
|
1064
|
+
_key8 = _Object$entries10$_i[0],
|
|
1065
|
+
_value9 = _Object$entries10$_i[1];
|
|
1066
|
+
output += " *[data-" + name + "-px='" + _key8 + "'] {\n padding-left: " + _value9 + ";\n padding-right: " + _value9 + ";\n }\n";
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
for (var _i11 = 0, _Object$entries11 = Object.entries(this.spacing); _i11 < _Object$entries11.length; _i11++) {
|
|
1070
|
+
var _Object$entries11$_i = _Object$entries11[_i11],
|
|
1071
|
+
_key9 = _Object$entries11$_i[0],
|
|
1072
|
+
_value10 = _Object$entries11$_i[1];
|
|
1073
|
+
output += " *[data-" + name + "-py='" + _key9 + "'] {\n padding-top: " + _value10 + ";\n padding-bottom: " + _value10 + ";\n }\n";
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
for (var _i12 = 0, _Object$entries12 = Object.entries(this.spacing); _i12 < _Object$entries12.length; _i12++) {
|
|
1077
|
+
var _Object$entries12$_i = _Object$entries12[_i12],
|
|
1078
|
+
_key10 = _Object$entries12$_i[0],
|
|
1079
|
+
_value11 = _Object$entries12$_i[1];
|
|
1080
|
+
output += " *[data-" + name + "-pt='" + _key10 + "'] {\n padding-top: " + _value11 + ";\n }\n";
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
for (var _i13 = 0, _Object$entries13 = Object.entries(this.spacing); _i13 < _Object$entries13.length; _i13++) {
|
|
1084
|
+
var _Object$entries13$_i = _Object$entries13[_i13],
|
|
1085
|
+
_key11 = _Object$entries13$_i[0],
|
|
1086
|
+
_value12 = _Object$entries13$_i[1];
|
|
1087
|
+
output += " *[data-" + name + "-pr='" + _key11 + "'] {\n padding-right: " + _value12 + ";\n }\n";
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
for (var _i14 = 0, _Object$entries14 = Object.entries(this.spacing); _i14 < _Object$entries14.length; _i14++) {
|
|
1091
|
+
var _Object$entries14$_i = _Object$entries14[_i14],
|
|
1092
|
+
_key12 = _Object$entries14$_i[0],
|
|
1093
|
+
_value13 = _Object$entries14$_i[1];
|
|
1094
|
+
output += " *[data-" + name + "-pb='" + _key12 + "'] {\n padding-bottom: " + _value13 + ";\n }\n";
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
for (var _i15 = 0, _Object$entries15 = Object.entries(this.spacing); _i15 < _Object$entries15.length; _i15++) {
|
|
1098
|
+
var _Object$entries15$_i = _Object$entries15[_i15],
|
|
1099
|
+
_key13 = _Object$entries15$_i[0],
|
|
1100
|
+
_value14 = _Object$entries15$_i[1];
|
|
1101
|
+
output += " *[data-" + name + "-pl='" + _key13 + "'] {\n padding-left: " + _value14 + ";\n }\n";
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
output += "}\n";
|
|
1105
|
+
}
|
|
1106
|
+
|
|
997
1107
|
return output;
|
|
998
1108
|
};
|
|
999
1109
|
|
|
@@ -1006,7 +1116,6 @@ var Paddings = /*#__PURE__*/function () {
|
|
|
1006
1116
|
|
|
1007
1117
|
var DisplaysGenerator = /*#__PURE__*/function () {
|
|
1008
1118
|
function DisplaysGenerator(config) {
|
|
1009
|
-
this.spacing = config.spacing;
|
|
1010
1119
|
this.displays = config.displays;
|
|
1011
1120
|
}
|
|
1012
1121
|
|
|
@@ -1043,8 +1152,6 @@ var DisplaysGenerator = /*#__PURE__*/function () {
|
|
|
1043
1152
|
|
|
1044
1153
|
var AxisPlacementsGenerator = /*#__PURE__*/function () {
|
|
1045
1154
|
function AxisPlacementsGenerator(config) {
|
|
1046
|
-
this.spacing = config.spacing;
|
|
1047
|
-
this.displays = config.displays;
|
|
1048
1155
|
this.axisPlacements = config.axisPlacements;
|
|
1049
1156
|
}
|
|
1050
1157
|
|
|
@@ -1084,8 +1191,6 @@ var AxisPlacementsGenerator = /*#__PURE__*/function () {
|
|
|
1084
1191
|
|
|
1085
1192
|
var PositionsGenerator = /*#__PURE__*/function () {
|
|
1086
1193
|
function PositionsGenerator(config) {
|
|
1087
|
-
this.spacing = config.spacing;
|
|
1088
|
-
this.displays = config.displays;
|
|
1089
1194
|
this.positions = config.positions;
|
|
1090
1195
|
}
|
|
1091
1196
|
|
|
@@ -1117,8 +1222,6 @@ var PositionsGenerator = /*#__PURE__*/function () {
|
|
|
1117
1222
|
|
|
1118
1223
|
var FlexWrapGenerator = /*#__PURE__*/function () {
|
|
1119
1224
|
function FlexWrapGenerator(config) {
|
|
1120
|
-
this.spacing = config.spacing;
|
|
1121
|
-
this.displays = config.displays;
|
|
1122
1225
|
this.flexWraps = config.flexWraps;
|
|
1123
1226
|
}
|
|
1124
1227
|
|
|
@@ -1150,8 +1253,6 @@ var FlexWrapGenerator = /*#__PURE__*/function () {
|
|
|
1150
1253
|
|
|
1151
1254
|
var ZIndexGenerator = /*#__PURE__*/function () {
|
|
1152
1255
|
function ZIndexGenerator(config) {
|
|
1153
|
-
this.spacing = config.spacing;
|
|
1154
|
-
this.displays = config.displays;
|
|
1155
1256
|
this.zIndexes = config.zIndexes;
|
|
1156
1257
|
}
|
|
1157
1258
|
|
|
@@ -1183,8 +1284,6 @@ var ZIndexGenerator = /*#__PURE__*/function () {
|
|
|
1183
1284
|
|
|
1184
1285
|
var WidthsGenerator = /*#__PURE__*/function () {
|
|
1185
1286
|
function WidthsGenerator(config) {
|
|
1186
|
-
this.spacing = config.spacing;
|
|
1187
|
-
this.displays = config.displays;
|
|
1188
1287
|
this.widhts = config.widths;
|
|
1189
1288
|
}
|
|
1190
1289
|
|
|
@@ -1216,8 +1315,6 @@ var WidthsGenerator = /*#__PURE__*/function () {
|
|
|
1216
1315
|
|
|
1217
1316
|
var FontSizeGenerator = /*#__PURE__*/function () {
|
|
1218
1317
|
function FontSizeGenerator(config) {
|
|
1219
|
-
this.spacing = config.spacing;
|
|
1220
|
-
this.displays = config.displays;
|
|
1221
1318
|
this.fontSizes = config.fontSizes;
|
|
1222
1319
|
}
|
|
1223
1320
|
|
|
@@ -1249,8 +1346,6 @@ var FontSizeGenerator = /*#__PURE__*/function () {
|
|
|
1249
1346
|
|
|
1250
1347
|
var FontWeightGenerator = /*#__PURE__*/function () {
|
|
1251
1348
|
function FontWeightGenerator(config) {
|
|
1252
|
-
this.spacing = config.spacing;
|
|
1253
|
-
this.displays = config.displays;
|
|
1254
1349
|
this.fontWeights = config.fontWeights;
|
|
1255
1350
|
}
|
|
1256
1351
|
|
|
@@ -1282,8 +1377,6 @@ var FontWeightGenerator = /*#__PURE__*/function () {
|
|
|
1282
1377
|
|
|
1283
1378
|
var LineHeightsGenerator = /*#__PURE__*/function () {
|
|
1284
1379
|
function LineHeightsGenerator(config) {
|
|
1285
|
-
this.spacing = config.spacing;
|
|
1286
|
-
this.displays = config.displays;
|
|
1287
1380
|
this.lineHeights = config.lineHeights;
|
|
1288
1381
|
}
|
|
1289
1382
|
|
|
@@ -1315,9 +1408,8 @@ var LineHeightsGenerator = /*#__PURE__*/function () {
|
|
|
1315
1408
|
|
|
1316
1409
|
var FlexDirectionsGenerator = /*#__PURE__*/function () {
|
|
1317
1410
|
function FlexDirectionsGenerator(config) {
|
|
1318
|
-
this.spacing = config.spacing;
|
|
1319
|
-
this.displays = config.displays;
|
|
1320
1411
|
this.flexDirections = config.flexDirections;
|
|
1412
|
+
this.breakpoints = config.breakpoints;
|
|
1321
1413
|
}
|
|
1322
1414
|
|
|
1323
1415
|
var _proto = FlexDirectionsGenerator.prototype;
|
|
@@ -1327,7 +1419,7 @@ var FlexDirectionsGenerator = /*#__PURE__*/function () {
|
|
|
1327
1419
|
};
|
|
1328
1420
|
|
|
1329
1421
|
_proto.generateCss = function generateCss() {
|
|
1330
|
-
var output = '';
|
|
1422
|
+
var output = '';
|
|
1331
1423
|
|
|
1332
1424
|
for (var _i = 0, _Object$entries = Object.entries(this.flexDirections); _i < _Object$entries.length; _i++) {
|
|
1333
1425
|
var _Object$entries$_i = _Object$entries[_i],
|
|
@@ -1336,6 +1428,22 @@ var FlexDirectionsGenerator = /*#__PURE__*/function () {
|
|
|
1336
1428
|
output += "*[data-direction='" + key + "'] {\n flex-direction: " + value + ";\n}\n";
|
|
1337
1429
|
}
|
|
1338
1430
|
|
|
1431
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
|
|
1432
|
+
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
1433
|
+
name = _Object$entries2$_i[0],
|
|
1434
|
+
_value = _Object$entries2$_i[1];
|
|
1435
|
+
output += "@media (max-width: " + _value + "px) {\n";
|
|
1436
|
+
|
|
1437
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(this.flexDirections); _i3 < _Object$entries3.length; _i3++) {
|
|
1438
|
+
var _Object$entries3$_i = _Object$entries3[_i3],
|
|
1439
|
+
_key = _Object$entries3$_i[0],
|
|
1440
|
+
_value2 = _Object$entries3$_i[1];
|
|
1441
|
+
output += " *[data-" + name + "-direction='" + _key + "'] {\n flex-direction: " + _value2 + ";\n }\n";
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
output += "}\n";
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1339
1447
|
return output;
|
|
1340
1448
|
};
|
|
1341
1449
|
|
|
@@ -1348,8 +1456,6 @@ var FlexDirectionsGenerator = /*#__PURE__*/function () {
|
|
|
1348
1456
|
|
|
1349
1457
|
var BackgroundsGenerator = /*#__PURE__*/function () {
|
|
1350
1458
|
function BackgroundsGenerator(config) {
|
|
1351
|
-
this.spacing = config.spacing;
|
|
1352
|
-
this.displays = config.displays;
|
|
1353
1459
|
this.colors = config.colors;
|
|
1354
1460
|
}
|
|
1355
1461
|
|
|
@@ -1381,8 +1487,6 @@ var BackgroundsGenerator = /*#__PURE__*/function () {
|
|
|
1381
1487
|
|
|
1382
1488
|
var FontColorsGenerator = /*#__PURE__*/function () {
|
|
1383
1489
|
function FontColorsGenerator(config) {
|
|
1384
|
-
this.spacing = config.spacing;
|
|
1385
|
-
this.displays = config.displays;
|
|
1386
1490
|
this.colors = config.colors;
|
|
1387
1491
|
}
|
|
1388
1492
|
|
|
@@ -1502,6 +1606,9 @@ var Colors = {
|
|
|
1502
1606
|
'gray-800': '#1F2937',
|
|
1503
1607
|
black: '#111827'
|
|
1504
1608
|
};
|
|
1609
|
+
var Breakpoints = {
|
|
1610
|
+
md: 768
|
|
1611
|
+
};
|
|
1505
1612
|
|
|
1506
1613
|
var GeneratorProcessor = /*#__PURE__*/function () {
|
|
1507
1614
|
function GeneratorProcessor() {}
|
|
@@ -1570,7 +1677,8 @@ function _main() {
|
|
|
1570
1677
|
fontWeights: FontWeights,
|
|
1571
1678
|
lineHeights: LineHeights,
|
|
1572
1679
|
flexDirections: FlexDirections,
|
|
1573
|
-
colors: Colors
|
|
1680
|
+
colors: Colors,
|
|
1681
|
+
breakpoints: Breakpoints
|
|
1574
1682
|
};
|
|
1575
1683
|
_context2.next = 3;
|
|
1576
1684
|
return new GeneratorProcessor().process([new Margins(config), new Paddings(config), new DisplaysGenerator(config), new AxisPlacementsGenerator(config), new FlexWrapGenerator(config), new FlexDirectionsGenerator(config), new WidthsGenerator(config), new PositionsGenerator(config), new ZIndexGenerator(config), new FontSizeGenerator(config), new FontWeightGenerator(config), new FontColorsGenerator(config), new LineHeightsGenerator(config), new BackgroundsGenerator(config)]);
|