@bgord/design 0.27.65 → 0.27.66
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/design.cjs.development.js +53 -2
- 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 +53 -2
- package/dist/design.esm.js.map +1 -1
- package/dist/generator.d.ts +2 -1
- package/dist/main.css +18 -0
- 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-heights-generator.d.ts +7 -0
- package/dist/tokens.d.ts +2 -0
- package/package.json +1 -1
- package/src/generate-css.ts +4 -0
- package/src/generator.ts +2 -0
- package/src/max-heights-generator.ts +34 -0
- package/src/tokens.ts +7 -0
|
@@ -2534,6 +2534,52 @@ var RotatesGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
|
2534
2534
|
return RotatesGenerator;
|
|
2535
2535
|
}(AbstractGenerator);
|
|
2536
2536
|
|
|
2537
|
+
var MaxHeightsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
2538
|
+
_inheritsLoose(MaxHeightsGenerator, _AbstractGenerator);
|
|
2539
|
+
|
|
2540
|
+
function MaxHeightsGenerator(config) {
|
|
2541
|
+
var _this;
|
|
2542
|
+
|
|
2543
|
+
_this = _AbstractGenerator.call(this, 'Max heights') || this;
|
|
2544
|
+
_this.maxHeights = config.maxHeights;
|
|
2545
|
+
_this.breakpoints = config.breakpoints;
|
|
2546
|
+
return _this;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
var _proto = MaxHeightsGenerator.prototype;
|
|
2550
|
+
|
|
2551
|
+
_proto.generateCss = function generateCss() {
|
|
2552
|
+
var output = ''; // Regular display: data-max-height="*"
|
|
2553
|
+
|
|
2554
|
+
for (var _i = 0, _Object$entries = Object.entries(this.maxHeights); _i < _Object$entries.length; _i++) {
|
|
2555
|
+
var _Object$entries$_i = _Object$entries[_i],
|
|
2556
|
+
key = _Object$entries$_i[0],
|
|
2557
|
+
value = _Object$entries$_i[1];
|
|
2558
|
+
output += "*[data-max-height='" + key + "'] {\n max-height: " + value + ";\n}\n";
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
|
|
2562
|
+
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
2563
|
+
name = _Object$entries2$_i[0],
|
|
2564
|
+
_value = _Object$entries2$_i[1];
|
|
2565
|
+
output += "@media (max-width: " + _value + "px) {\n";
|
|
2566
|
+
|
|
2567
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(this.maxHeights); _i3 < _Object$entries3.length; _i3++) {
|
|
2568
|
+
var _Object$entries3$_i = _Object$entries3[_i3],
|
|
2569
|
+
_key = _Object$entries3$_i[0],
|
|
2570
|
+
_value2 = _Object$entries3$_i[1];
|
|
2571
|
+
output += "*[data-" + name + "-max-height='" + _key + "'] {\n max-height: " + _value2 + ";\n}\n";
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
output += "}\n";
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
return output;
|
|
2578
|
+
};
|
|
2579
|
+
|
|
2580
|
+
return MaxHeightsGenerator;
|
|
2581
|
+
}(AbstractGenerator);
|
|
2582
|
+
|
|
2537
2583
|
var Spacing = {
|
|
2538
2584
|
'0': '0',
|
|
2539
2585
|
'3': '3px',
|
|
@@ -2726,6 +2772,10 @@ var MaxWidths = {
|
|
|
2726
2772
|
'320': '320px',
|
|
2727
2773
|
unset: 'unset'
|
|
2728
2774
|
};
|
|
2775
|
+
var MaxHeights = {
|
|
2776
|
+
'100%': '100%',
|
|
2777
|
+
unset: 'unset'
|
|
2778
|
+
};
|
|
2729
2779
|
var Transforms = {
|
|
2730
2780
|
uppercase: 'uppercase',
|
|
2731
2781
|
lowercase: 'lowercase',
|
|
@@ -2944,10 +2994,11 @@ function _main() {
|
|
|
2944
2994
|
backdrops: Backdrops,
|
|
2945
2995
|
objectFits: ObjectFits,
|
|
2946
2996
|
objectPositions: ObjectPositions,
|
|
2947
|
-
rotates: Rotates
|
|
2997
|
+
rotates: Rotates,
|
|
2998
|
+
maxHeights: MaxHeights
|
|
2948
2999
|
};
|
|
2949
3000
|
_context2.next = 3;
|
|
2950
|
-
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 FlexShrinksGenerator(config), new GapGenerator(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), new OverflowsGenerator(config), new PositionersGenerator(config), new HeightsGenerator(config), new CursorsGenerator(config), new PointerEventsGenerator(config), new BackdropsGenerator(config), new ObjectFitsGenerator(config), new ObjectPositionsGenerator(config), new RotatesGenerator(config)]);
|
|
3001
|
+
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 FlexShrinksGenerator(config), new GapGenerator(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), new OverflowsGenerator(config), new PositionersGenerator(config), new HeightsGenerator(config), new CursorsGenerator(config), new PointerEventsGenerator(config), new BackdropsGenerator(config), new ObjectFitsGenerator(config), new ObjectPositionsGenerator(config), new RotatesGenerator(config), new MaxHeightsGenerator(config)]);
|
|
2951
3002
|
|
|
2952
3003
|
case 3:
|
|
2953
3004
|
case "end":
|