@flodesk/grain 10.10.11 → 10.12.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/es/components/index.js +1 -0
- package/es/components/text2/index.js +100 -0
- package/es/components/text2/styles.module.css +22 -0
- package/es/icons/icon-bold.js +28 -0
- package/es/icons/icon-bullet-list.js +21 -0
- package/es/icons/icon-italic.js +28 -0
- package/es/icons/icon-number-list.js +21 -0
- package/es/icons/icon-strike.js +28 -0
- package/es/icons/icon-underline.js +28 -0
- package/es/icons/index.js +7 -1
- package/es/styles/utilities.js +6 -4
- package/es/utilities/style-config.js +20 -1
- package/package.json +1 -1
package/es/components/index.js
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.array.index-of.js";
|
|
3
|
+
import "core-js/modules/es.symbol.js";
|
|
4
|
+
import "core-js/modules/es.object.define-property.js";
|
|
5
|
+
import "core-js/modules/es.array.filter.js";
|
|
6
|
+
import "core-js/modules/es.object.to-string.js";
|
|
7
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
8
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
9
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
10
|
+
import "core-js/modules/es.object.define-properties.js";
|
|
11
|
+
import "core-js/modules/es.object.assign.js";
|
|
12
|
+
var _excluded = ["children", "size", "weight", "color", "tag", "display", "hasEllipsis", "ellipsisLines", "align", "letterSpacing", "textTransform", "variant", "trimTop", "className"];
|
|
13
|
+
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
|
|
16
|
+
import "core-js/modules/es.string.trim.js";
|
|
17
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
18
|
+
import "core-js/modules/es.string.replace.js";
|
|
19
|
+
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
+
|
|
24
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
30
|
+
import { generateStyleAttributes, generateClassNameAttributes } from '../../utilities';
|
|
31
|
+
import PropTypes from 'prop-types';
|
|
32
|
+
import React, { forwardRef } from 'react';
|
|
33
|
+
import { types } from '../../types';
|
|
34
|
+
import styles from './styles.module.css';
|
|
35
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
36
|
+
export var Text2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
37
|
+
var children = _ref.children,
|
|
38
|
+
_ref$size = _ref.size,
|
|
39
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
40
|
+
weight = _ref.weight,
|
|
41
|
+
color = _ref.color,
|
|
42
|
+
_ref$tag = _ref.tag,
|
|
43
|
+
tag = _ref$tag === void 0 ? 'span' : _ref$tag,
|
|
44
|
+
_ref$display = _ref.display,
|
|
45
|
+
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
46
|
+
hasEllipsis = _ref.hasEllipsis,
|
|
47
|
+
ellipsisLines = _ref.ellipsisLines,
|
|
48
|
+
align = _ref.align,
|
|
49
|
+
letterSpacing = _ref.letterSpacing,
|
|
50
|
+
textTransform = _ref.textTransform,
|
|
51
|
+
variant = _ref.variant,
|
|
52
|
+
trimTop = _ref.trimTop,
|
|
53
|
+
className = _ref.className,
|
|
54
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
+
|
|
56
|
+
var Tag = tag;
|
|
57
|
+
|
|
58
|
+
if (variant === 'caps') {
|
|
59
|
+
size = 's';
|
|
60
|
+
weight = 'medium';
|
|
61
|
+
textTransform = 'uppercase';
|
|
62
|
+
letterSpacing = '0.05em';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var genStyles = _objectSpread(_objectSpread({}, generateStyleAttributes({
|
|
66
|
+
size: size,
|
|
67
|
+
align: align,
|
|
68
|
+
color: color,
|
|
69
|
+
letterSpacing: letterSpacing
|
|
70
|
+
})), ellipsisLines && _defineProperty({}, '--el', ellipsisLines));
|
|
71
|
+
|
|
72
|
+
var propClassName = className ? className : '';
|
|
73
|
+
var classNames = [generateClassNameAttributes({
|
|
74
|
+
size: size,
|
|
75
|
+
align: align,
|
|
76
|
+
color: color,
|
|
77
|
+
weight: weight,
|
|
78
|
+
display: !ellipsisLines ? display : undefined,
|
|
79
|
+
textTransform: textTransform
|
|
80
|
+
}), propClassName, trimTop && styles.trimTop, hasEllipsis && !ellipsisLines ? styles.ellipsis : undefined, hasEllipsis && ellipsisLines ? styles.ellipsisMulti : undefined].join(' ').replace(/\s+/g, ' ').trim();
|
|
81
|
+
return ___EmotionJSX(Tag, _extends({
|
|
82
|
+
ref: ref,
|
|
83
|
+
className: classNames,
|
|
84
|
+
style: genStyles
|
|
85
|
+
}, props), children);
|
|
86
|
+
});
|
|
87
|
+
Text2.propTypes = {
|
|
88
|
+
size: types.responsiveTextSize,
|
|
89
|
+
weight: types.weight,
|
|
90
|
+
color: types.color,
|
|
91
|
+
align: types.responsiveTextAlign,
|
|
92
|
+
tag: types.textTag,
|
|
93
|
+
hasEllipsis: PropTypes.bool,
|
|
94
|
+
ellipsisLines: PropTypes.number,
|
|
95
|
+
letterSpacing: PropTypes.string,
|
|
96
|
+
textTransform: PropTypes.oneOf(['capitalize', 'uppercase', 'lowercase']),
|
|
97
|
+
variant: PropTypes.oneOf(['caps']),
|
|
98
|
+
trimTop: PropTypes.bool,
|
|
99
|
+
display: types.textDisplay
|
|
100
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.trimTop:before {
|
|
2
|
+
--capHeight: 0.74em;
|
|
3
|
+
--lineHeightAndCapHeightOffset: calc((var(--grn-lineHeight-global) - var(--capHeight)) / 2);
|
|
4
|
+
|
|
5
|
+
content: '';
|
|
6
|
+
margin-top: calc(-1 * var(--lineHeightAndCapHeightOffset));
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ellipsis {
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ellipsisMulti {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
display: -webkit-box;
|
|
20
|
+
-webkit-line-clamp: var(--el);
|
|
21
|
+
-webkit-box-orient: vertical;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconBold = function IconBold(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 18 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("g", {
|
|
14
|
+
clipPath: "url(#prefix__clip0_1288_666)"
|
|
15
|
+
}, ___EmotionJSX("path", {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M0 24V0h6.978c1.834 0 3.81.32 5.357 1.31C13.951 2.34 15 4.037 15 6.5s-1.049 4.16-2.665 5.19a6.77 6.77 0 01-.087.056c.38.157.744.344 1.088.563C14.95 13.341 16 15.04 16 17.5c0 2.462-1.049 4.16-2.665 5.19-1.548.99-3.523 1.31-5.357 1.31H0zm2-2h5.978c1.655 0 3.19-.299 4.281-.995C13.282 20.352 14 19.299 14 17.5c0-1.8-.718-2.852-1.74-3.505C11.167 13.299 9.632 13 7.977 13H2v9zm9.26-19.005C12.281 3.648 13 4.7 13 6.5c0 1.8-.718 2.852-1.74 3.505-1.092.696-2.627.995-4.282.995H2V2h4.978c1.655 0 3.19.299 4.281.995z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
})), ___EmotionJSX("defs", null, ___EmotionJSX("clipPath", {
|
|
21
|
+
id: "prefix__clip0_1288_666"
|
|
22
|
+
}, ___EmotionJSX("path", {
|
|
23
|
+
fill: "#fff",
|
|
24
|
+
d: "M0 0h16v24H0z"
|
|
25
|
+
}))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default IconBold;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconBulletList = function IconBulletList(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("path", {
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
clipRule: "evenodd",
|
|
16
|
+
d: "M2 7a2 2 0 100-4 2 2 0 000 4zm22-3H6v2h18V4zm0 7H6v2h18v-2zM6 18h18v2H6v-2zm-2 1a2 2 0 11-4 0 2 2 0 014 0zm-2-5a2 2 0 100-4 2 2 0 000 4z",
|
|
17
|
+
fill: "currentColor"
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default IconBulletList;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconItalic = function IconItalic(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 18 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("g", {
|
|
14
|
+
clipPath: "url(#prefix__clip0_1288_675)"
|
|
15
|
+
}, ___EmotionJSX("path", {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M6 0h12v2h-5.236L7.309 22H12v2H0v-2h5.236l5.455-20H6V0z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
})), ___EmotionJSX("defs", null, ___EmotionJSX("clipPath", {
|
|
21
|
+
id: "prefix__clip0_1288_675"
|
|
22
|
+
}, ___EmotionJSX("path", {
|
|
23
|
+
fill: "#fff",
|
|
24
|
+
d: "M0 0h18v24H0z"
|
|
25
|
+
}))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default IconItalic;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconNumberList = function IconNumberList(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("path", {
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
clipRule: "evenodd",
|
|
16
|
+
d: "M2 3.5H1v-1h1.5A.5.5 0 013 3v3.5h2v1H0v-1h2v-3zM7 4h17v2H7V4zm0 7h17v2H7v-2zm17 7H7v2h17v-2zM1 10.5v-1h3.5a.5.5 0 01.5.5v1.6a.5.5 0 01-.402.49L1 12.81v.69h4v1H.5A.5.5 0 010 14v-1.6a.5.5 0 01.402-.49L4 11.19v-.69H1zm-1 6v1h4v1H2v1h2v1H0v1h4.5A.5.5 0 005 21v-4a.5.5 0 00-.5-.5H0z",
|
|
17
|
+
fill: "currentColor"
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default IconNumberList;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconStrike = function IconStrike(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("g", {
|
|
14
|
+
clipPath: "url(#prefix__clip0_1288_730)"
|
|
15
|
+
}, ___EmotionJSX("path", {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M11.727.004c5.499-.149 7.8 3.742 8.25 5.804l-1.954.426c-.304-1.394-1.956-4.347-6.241-4.23C9.86 2.056 7.978 2.52 6.759 4c-.474.577-.772 1.446-.766 2.352.005.9.308 1.73.895 2.295.753.724 1.979 1.77 5.2 2.352H24v2H0v-2h6.583a9.682 9.682 0 01-1.081-.91c-1.056-1.017-1.5-2.407-1.51-3.724-.008-1.31.412-2.65 1.223-3.636C6.985.58 9.597.062 11.727.004zm.538 23.992c-5.498.15-7.8-3.742-8.25-5.803l1.955-.427c.304 1.394 1.956 4.347 6.241 4.23 1.921-.051 3.804-.516 5.022-1.997.475-.576.773-1.446.767-2.352-.006-.9-.308-1.73-.896-2.295A9.348 9.348 0 0016.72 15h2.61c.46.82.664 1.744.67 2.634.008 1.31-.412 2.651-1.223 3.636-1.77 2.15-4.382 2.668-6.512 2.726z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
})), ___EmotionJSX("defs", null, ___EmotionJSX("clipPath", {
|
|
21
|
+
id: "prefix__clip0_1288_730"
|
|
22
|
+
}, ___EmotionJSX("path", {
|
|
23
|
+
fill: "#fff",
|
|
24
|
+
d: "M0 0h24v24H0z"
|
|
25
|
+
}))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default IconStrike;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconUnderline = function IconUnderline(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 20 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("g", {
|
|
14
|
+
clipPath: "url(#prefix__clip0_1288_698)"
|
|
15
|
+
}, ___EmotionJSX("path", {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M16 8.066V0h2v8.066c0 2.31-.405 4.764-1.623 6.671-1.262 1.976-3.334 3.266-6.377 3.266-3.043 0-5.115-1.29-6.377-3.266C2.405 12.83 2 10.376 2 8.066V0h2v8.066c0 2.13.383 4.145 1.31 5.595.882 1.383 2.31 2.342 4.69 2.342 2.38 0 3.808-.959 4.69-2.342.927-1.45 1.31-3.465 1.31-5.595zM20 22v2H0v-2h20z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
})), ___EmotionJSX("defs", null, ___EmotionJSX("clipPath", {
|
|
21
|
+
id: "prefix__clip0_1288_698"
|
|
22
|
+
}, ___EmotionJSX("path", {
|
|
23
|
+
fill: "#fff",
|
|
24
|
+
d: "M0 0h20v24H0z"
|
|
25
|
+
}))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default IconUnderline;
|
package/es/icons/index.js
CHANGED
|
@@ -66,4 +66,10 @@ export { default as ColumnAndRows } from './icon-column-and-rows';
|
|
|
66
66
|
export { default as Columns } from './icon-columns';
|
|
67
67
|
export { default as Rows } from './icon-rows';
|
|
68
68
|
export { default as RowAndColumns } from './icon-row-and-columns';
|
|
69
|
-
export { default as RowsAndColumn } from './icon-rows-and-column';
|
|
69
|
+
export { default as RowsAndColumn } from './icon-rows-and-column';
|
|
70
|
+
export { default as IconItalic } from './icon-italic';
|
|
71
|
+
export { default as IconStrike } from './icon-strike';
|
|
72
|
+
export { default as IconBold } from './icon-bold';
|
|
73
|
+
export { default as IconUnderline } from './icon-underline';
|
|
74
|
+
export { default as IconBulletList } from './icon-bullet-list';
|
|
75
|
+
export { default as IconNumberList } from './icon-number-list';
|
package/es/styles/utilities.js
CHANGED
|
@@ -97,10 +97,12 @@ var spaceProps = styleConfig.spaceProps,
|
|
|
97
97
|
alignProps = styleConfig.alignProps,
|
|
98
98
|
weightProps = styleConfig.weightProps,
|
|
99
99
|
displayProps = styleConfig.displayProps,
|
|
100
|
-
zIndexProps = styleConfig.zIndexProps
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var
|
|
100
|
+
zIndexProps = styleConfig.zIndexProps,
|
|
101
|
+
letterSpacingProps = styleConfig.letterSpacingProps,
|
|
102
|
+
textTransformProps = styleConfig.textTransformProps;
|
|
103
|
+
var classAndStyleDeclarationProps = [spaceProps, colorProps, shadowProps, radiusProps, transitionProps, sizeProps, borderColorProps, alignProps];
|
|
104
|
+
var classDeclarationProps = [].concat(classAndStyleDeclarationProps, [positionProps, overflowProps, cursorProps, sizeProps, alignSelfProps, borderWidthProps, weightProps, displayProps, borderSideProps, textTransformProps]);
|
|
105
|
+
var styleDeclarationProps = [].concat(classAndStyleDeclarationProps, [dimensionProps, aspectRatioProps, orderProps, flexProps, opacityProps, zIndexProps, letterSpacingProps]);
|
|
104
106
|
var defaultBorder = "\n [class*=\"bd\"] {\n border-color: var(--grn-color-border);\n border-width: 1px;\n }\n";
|
|
105
107
|
var utilities = "\n ".concat(defaultBorder, "\n ").concat(generateUtilityClassDeclarations(classDeclarationProps), ";\n ").concat(generateStyleClassDeclarations(styleDeclarationProps), ";\n");
|
|
106
108
|
export default utilities;
|
|
@@ -378,7 +378,8 @@ export var styleConfig = {
|
|
|
378
378
|
variables: ['left', 'center', 'right'],
|
|
379
379
|
variableChecker: function variableChecker(value) {
|
|
380
380
|
return ['left', 'center', 'right'].includes(value);
|
|
381
|
-
}
|
|
381
|
+
},
|
|
382
|
+
isResponsive: true
|
|
382
383
|
},
|
|
383
384
|
weightProps: {
|
|
384
385
|
props: [{
|
|
@@ -402,6 +403,24 @@ export var styleConfig = {
|
|
|
402
403
|
variableChecker: function variableChecker(value) {
|
|
403
404
|
return ['block', 'inline', 'inline-block'].includes(value);
|
|
404
405
|
}
|
|
406
|
+
},
|
|
407
|
+
letterSpacingProps: {
|
|
408
|
+
props: [{
|
|
409
|
+
propName: 'letterSpacing',
|
|
410
|
+
property: 'letter-spacing',
|
|
411
|
+
short: 'ls'
|
|
412
|
+
}]
|
|
413
|
+
},
|
|
414
|
+
textTransformProps: {
|
|
415
|
+
props: [{
|
|
416
|
+
propName: 'textTransform',
|
|
417
|
+
property: 'text-transform',
|
|
418
|
+
short: 'tt'
|
|
419
|
+
}],
|
|
420
|
+
variables: ['capitalize', 'uppercase', 'lowercase'],
|
|
421
|
+
variableChecker: function variableChecker(value) {
|
|
422
|
+
return ['capitalize', 'uppercase', 'lowercase'].includes(value);
|
|
423
|
+
}
|
|
405
424
|
}
|
|
406
425
|
};
|
|
407
426
|
export var propNameToShort = function propNameToShort(propName) {
|