@bgord/design 0.27.38 → 0.27.40
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/README.md +13 -0
- package/dist/cursors-generator.d.ts +7 -0
- package/dist/design.cjs.development.js +72 -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 +72 -2
- package/dist/design.esm.js.map +1 -1
- package/dist/flex-wraps-generator.d.ts +1 -0
- package/dist/generator.d.ts +2 -1
- package/dist/main.css +44 -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/tokens.d.ts +2 -0
- package/package.json +1 -1
- package/src/cursors-generator.ts +34 -0
- package/src/flex-wraps-generator.ts +13 -0
- package/src/generate-css.ts +4 -0
- package/src/generator.ts +2 -0
- package/src/tokens.ts +9 -0
package/README.md
CHANGED
|
@@ -437,3 +437,16 @@ Orange
|
|
|
437
437
|
| orange-600 | hsl(25, 88%, 37.5%) |
|
|
438
438
|
| orange-700 | hsl(25, 88%, 27.5%) |
|
|
439
439
|
| orange-800 | hsl(25, 88%, 20%) |
|
|
440
|
+
|
|
441
|
+
## Cursors
|
|
442
|
+
|
|
443
|
+
| Definition | Value |
|
|
444
|
+
| ----------- | ------ |
|
|
445
|
+
| data-cursor | cursor |
|
|
446
|
+
|
|
447
|
+
| Key | Value |
|
|
448
|
+
| ----------- | :---------: |
|
|
449
|
+
| wait | wait |
|
|
450
|
+
| auto | auto |
|
|
451
|
+
| pointer | pointer |
|
|
452
|
+
| not-allowed | not-allowed |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractGenerator, GeneratorConfigType } from './generator';
|
|
2
|
+
export declare class CursorsGenerator extends AbstractGenerator {
|
|
3
|
+
cursors: GeneratorConfigType['cursors'];
|
|
4
|
+
breakpoints: GeneratorConfigType['breakpoints'];
|
|
5
|
+
constructor(config: GeneratorConfigType);
|
|
6
|
+
generateCss(): string;
|
|
7
|
+
}
|
|
@@ -1370,6 +1370,7 @@ var FlexWrapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
|
1370
1370
|
|
|
1371
1371
|
_this = _AbstractGenerator.call(this, 'Flex wraps') || this;
|
|
1372
1372
|
_this.flexWraps = config.flexWraps;
|
|
1373
|
+
_this.breakpoints = config.breakpoints;
|
|
1373
1374
|
return _this;
|
|
1374
1375
|
}
|
|
1375
1376
|
|
|
@@ -1385,6 +1386,22 @@ var FlexWrapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
|
1385
1386
|
output += "*[data-wrap='" + key + "'] {\n flex-wrap: " + value + ";\n}\n";
|
|
1386
1387
|
}
|
|
1387
1388
|
|
|
1389
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
|
|
1390
|
+
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
1391
|
+
name = _Object$entries2$_i[0],
|
|
1392
|
+
_value = _Object$entries2$_i[1];
|
|
1393
|
+
output += "@media (max-width: " + _value + "px) {\n";
|
|
1394
|
+
|
|
1395
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(this.flexWraps); _i3 < _Object$entries3.length; _i3++) {
|
|
1396
|
+
var _Object$entries3$_i = _Object$entries3[_i3],
|
|
1397
|
+
_key = _Object$entries3$_i[0],
|
|
1398
|
+
_value2 = _Object$entries3$_i[1];
|
|
1399
|
+
output += " *[data-" + name + "-wrap='" + _key + "'] {\n flex-wrap: " + _value2 + ";\n }\n";
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
output += "}\n";
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1388
1405
|
return output;
|
|
1389
1406
|
};
|
|
1390
1407
|
|
|
@@ -2162,6 +2179,52 @@ var GapGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
|
2162
2179
|
return GapGenerator;
|
|
2163
2180
|
}(AbstractGenerator);
|
|
2164
2181
|
|
|
2182
|
+
var CursorsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
|
|
2183
|
+
_inheritsLoose(CursorsGenerator, _AbstractGenerator);
|
|
2184
|
+
|
|
2185
|
+
function CursorsGenerator(config) {
|
|
2186
|
+
var _this;
|
|
2187
|
+
|
|
2188
|
+
_this = _AbstractGenerator.call(this, 'Cursors') || this;
|
|
2189
|
+
_this.cursors = config.cursors;
|
|
2190
|
+
_this.breakpoints = config.breakpoints;
|
|
2191
|
+
return _this;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
var _proto = CursorsGenerator.prototype;
|
|
2195
|
+
|
|
2196
|
+
_proto.generateCss = function generateCss() {
|
|
2197
|
+
var output = ''; // Regular display: data-cursor="*"
|
|
2198
|
+
|
|
2199
|
+
for (var _i = 0, _Object$entries = Object.entries(this.cursors); _i < _Object$entries.length; _i++) {
|
|
2200
|
+
var _Object$entries$_i = _Object$entries[_i],
|
|
2201
|
+
key = _Object$entries$_i[0],
|
|
2202
|
+
value = _Object$entries$_i[1];
|
|
2203
|
+
output += "*[data-cursor='" + key + "'] {\n cursor: " + value + ";\n}\n";
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(this.breakpoints); _i2 < _Object$entries2.length; _i2++) {
|
|
2207
|
+
var _Object$entries2$_i = _Object$entries2[_i2],
|
|
2208
|
+
name = _Object$entries2$_i[0],
|
|
2209
|
+
_value = _Object$entries2$_i[1];
|
|
2210
|
+
output += "@media (max-width: " + _value + "px) {\n";
|
|
2211
|
+
|
|
2212
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(this.cursors); _i3 < _Object$entries3.length; _i3++) {
|
|
2213
|
+
var _Object$entries3$_i = _Object$entries3[_i3],
|
|
2214
|
+
_key = _Object$entries3$_i[0],
|
|
2215
|
+
_value2 = _Object$entries3$_i[1];
|
|
2216
|
+
output += " *[data-" + name + "-cursor='" + _key + "'] {\n cursor: " + _value2 + ";\n }\n";
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
output += "}\n";
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
return output;
|
|
2223
|
+
};
|
|
2224
|
+
|
|
2225
|
+
return CursorsGenerator;
|
|
2226
|
+
}(AbstractGenerator);
|
|
2227
|
+
|
|
2165
2228
|
var Spacing = {
|
|
2166
2229
|
'0': '0',
|
|
2167
2230
|
'3': '3px',
|
|
@@ -2347,6 +2410,12 @@ var Overflows = {
|
|
|
2347
2410
|
scroll: 'scroll',
|
|
2348
2411
|
hidden: 'hidden'
|
|
2349
2412
|
};
|
|
2413
|
+
var Cursors = {
|
|
2414
|
+
wait: 'wait',
|
|
2415
|
+
auto: 'auto',
|
|
2416
|
+
pointer: 'pointer',
|
|
2417
|
+
'not-allowed': 'not-allowed'
|
|
2418
|
+
};
|
|
2350
2419
|
|
|
2351
2420
|
var GeneratorProcessor = /*#__PURE__*/function () {
|
|
2352
2421
|
function GeneratorProcessor() {}
|
|
@@ -2487,10 +2556,11 @@ function _main() {
|
|
|
2487
2556
|
maxWidths: MaxWidths,
|
|
2488
2557
|
transforms: Transforms,
|
|
2489
2558
|
overflows: Overflows,
|
|
2490
|
-
heights: Heights
|
|
2559
|
+
heights: Heights,
|
|
2560
|
+
cursors: Cursors
|
|
2491
2561
|
};
|
|
2492
2562
|
_context2.next = 3;
|
|
2493
|
-
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 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(), new HeightsGenerator(config)]);
|
|
2563
|
+
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 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(), new HeightsGenerator(config), new CursorsGenerator(config)]);
|
|
2494
2564
|
|
|
2495
2565
|
case 3:
|
|
2496
2566
|
case "end":
|