@flodesk/grain 10.10.5 → 10.10.6
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/es/styles/utilities.js +9 -16
- package/package.json +1 -1
package/es/styles/utilities.js
CHANGED
|
@@ -17,6 +17,9 @@ import "core-js/modules/es.string.includes.js";
|
|
|
17
17
|
import "core-js/modules/es.array.concat.js";
|
|
18
18
|
import "core-js/modules/es.object.entries.js";
|
|
19
19
|
import "core-js/modules/es.array.map.js";
|
|
20
|
+
import "core-js/modules/es.object.values.js";
|
|
21
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
22
|
+
import "core-js/modules/es.string.replace.js";
|
|
20
23
|
import "core-js/modules/es.symbol.js";
|
|
21
24
|
import "core-js/modules/es.symbol.description.js";
|
|
22
25
|
import "core-js/modules/es.symbol.iterator.js";
|
|
@@ -25,7 +28,6 @@ import "core-js/modules/es.string.iterator.js";
|
|
|
25
28
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
26
29
|
import "core-js/modules/es.array.slice.js";
|
|
27
30
|
import "core-js/modules/es.array.from.js";
|
|
28
|
-
import "core-js/modules/es.regexp.exec.js";
|
|
29
31
|
import { borderWidths } from '../types';
|
|
30
32
|
import { styleConfig } from '../utilities';
|
|
31
33
|
import { propNameToShort } from '../utilities/style-config';
|
|
@@ -100,26 +102,17 @@ var spaceProps = styleConfig.spaceProps,
|
|
|
100
102
|
var classAndStyleDeclarationProps = [spaceProps, colorProps, shadowProps, radiusProps, transitionProps, sizeProps, borderColorProps];
|
|
101
103
|
var classDeclarationProps = [].concat(classAndStyleDeclarationProps, [positionProps, overflowProps, cursorProps, sizeProps, alignSelfProps, borderWidthProps]);
|
|
102
104
|
var styleDeclarationProps = [].concat(classAndStyleDeclarationProps, [dimensionProps, aspectRatioProps, orderProps, flexProps, opacityProps]);
|
|
103
|
-
var borderSides = {
|
|
104
|
-
t: 'top',
|
|
105
|
-
r: 'right',
|
|
106
|
-
b: 'bottom',
|
|
107
|
-
l: 'left',
|
|
108
|
-
x: 'inline',
|
|
109
|
-
y: 'block'
|
|
110
|
-
};
|
|
111
105
|
|
|
112
106
|
var generateBorderStyle = function generateBorderStyle() {
|
|
113
107
|
var css = '';
|
|
114
|
-
Object.
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
css += "\n [class*=\"bdw-".concat(shortSide, "\"] { border-").concat(side, "-style: solid }\n ");
|
|
108
|
+
Object.values(borderWidthProps.props).map(function (prop) {
|
|
109
|
+
var property = prop.property.replace('width', 'style');
|
|
110
|
+
if (prop.propName === 'borderWidth') return;
|
|
111
|
+
css += "\n [class*=\"".concat(prop.short, "\"] { ").concat(property, ": solid }\n ");
|
|
120
112
|
}).join('');
|
|
113
|
+
var allSideSelector = borderWidthProps.props[0].short;
|
|
121
114
|
css += "\n ".concat(borderWidths.map(function (w) {
|
|
122
|
-
return ".
|
|
115
|
+
return ".".concat(allSideSelector, "-").concat(w);
|
|
123
116
|
}), " { border-style: solid }\n ");
|
|
124
117
|
return css;
|
|
125
118
|
};
|