@flodesk/grain 10.17.2 → 11.0.0-next.10
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/arrange/index.js +96 -0
- package/es/components/arrange/styles.module.css +3 -0
- package/es/components/box.js +74 -69
- package/es/components/flex/index.js +91 -0
- package/es/components/flex/styles.module.css +3 -0
- package/es/components/index.js +0 -2
- package/es/components/stack/index.js +68 -0
- package/es/components/stack/styles.module.css +3 -0
- package/es/components/{text2 → text}/index.js +28 -21
- package/es/styles/utilities.js +10 -4
- package/es/styles/variables.js +1 -1
- package/es/types.js +8 -7
- package/es/utilities/attributes.js +65 -27
- package/es/utilities/style-config.js +110 -41
- package/package.json +1 -1
- package/es/components/arrange.js +0 -91
- package/es/components/box2.js +0 -223
- package/es/components/flex.js +0 -85
- package/es/components/stack.js +0 -43
- package/es/components/text.js +0 -120
- /package/es/components/{text2 → text}/styles.module.css +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
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", "gap", "columnGap", "rowGap", "alignItems", "justifyItems", "justifyContent", "alignContent", "columns", "rows", "autoFlow", "className", "style"];
|
|
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.regexp.exec.js";
|
|
17
|
+
import "core-js/modules/es.string.replace.js";
|
|
18
|
+
import "core-js/modules/es.string.trim.js";
|
|
19
|
+
import "core-js/modules/es.array.concat.js";
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
25
|
+
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; }
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
import { generateAttributes } from '../../utilities';
|
|
32
|
+
import React, { forwardRef } from 'react';
|
|
33
|
+
import { types } from '../../types';
|
|
34
|
+
import { Box } from '../box';
|
|
35
|
+
import styles from './styles.module.css';
|
|
36
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
37
|
+
export var Arrange = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
|
+
var children = _ref.children,
|
|
39
|
+
gap = _ref.gap,
|
|
40
|
+
columnGap = _ref.columnGap,
|
|
41
|
+
rowGap = _ref.rowGap,
|
|
42
|
+
_ref$alignItems = _ref.alignItems,
|
|
43
|
+
alignItems = _ref$alignItems === void 0 ? 'center' : _ref$alignItems,
|
|
44
|
+
justifyItems = _ref.justifyItems,
|
|
45
|
+
_ref$justifyContent = _ref.justifyContent,
|
|
46
|
+
justifyContent = _ref$justifyContent === void 0 ? 'start' : _ref$justifyContent,
|
|
47
|
+
alignContent = _ref.alignContent,
|
|
48
|
+
columns = _ref.columns,
|
|
49
|
+
rows = _ref.rows,
|
|
50
|
+
_ref$autoFlow = _ref.autoFlow,
|
|
51
|
+
autoFlow = _ref$autoFlow === void 0 ? 'column' : _ref$autoFlow,
|
|
52
|
+
className = _ref.className,
|
|
53
|
+
style = _ref.style,
|
|
54
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
+
|
|
56
|
+
var propClassName = className ? className : '';
|
|
57
|
+
var propStyle = style ? style : {};
|
|
58
|
+
var sharedProps = {
|
|
59
|
+
gap: gap,
|
|
60
|
+
columnGap: columnGap,
|
|
61
|
+
rowGap: rowGap,
|
|
62
|
+
alignItems: alignItems,
|
|
63
|
+
justifyItems: justifyItems,
|
|
64
|
+
justifyContent: justifyContent,
|
|
65
|
+
alignContent: alignContent,
|
|
66
|
+
autoFlow: !columns ? autoFlow : undefined
|
|
67
|
+
};
|
|
68
|
+
var attributes = generateAttributes({
|
|
69
|
+
styleProps: _objectSpread({
|
|
70
|
+
columns: columns,
|
|
71
|
+
rows: rows
|
|
72
|
+
}, sharedProps),
|
|
73
|
+
classNameProps: _objectSpread({}, sharedProps)
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
|
|
77
|
+
|
|
78
|
+
var classAttributes = "".concat(attributes.classNames, " ").concat(propClassName, " ").concat(styles.arrange).trim().replace(/\s+/g, ' ');
|
|
79
|
+
return ___EmotionJSX(Box, _extends({
|
|
80
|
+
ref: ref,
|
|
81
|
+
className: classAttributes,
|
|
82
|
+
style: styleAttributes
|
|
83
|
+
}, props), children);
|
|
84
|
+
});
|
|
85
|
+
Arrange.propTypes = {
|
|
86
|
+
gap: types.responsiveSpace,
|
|
87
|
+
columnGap: types.responsiveSpace,
|
|
88
|
+
rowGap: types.responsiveSpace,
|
|
89
|
+
columns: types.responsiveColumns,
|
|
90
|
+
rows: types.responsiveRows,
|
|
91
|
+
autoFlow: types.autoFlow,
|
|
92
|
+
alignItems: types.gridItemsAlignment,
|
|
93
|
+
justifyItems: types.gridItemsAlignment,
|
|
94
|
+
justifyContent: types.gridContentPosition,
|
|
95
|
+
alignContent: types.gridContentPosition
|
|
96
|
+
};
|
package/es/components/box.js
CHANGED
|
@@ -1,53 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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 = ["color", "colorHover", "backgroundColor", "backgroundColorHover", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "radius", "padding", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "paddingX", "paddingY", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight", "marginX", "marginY", "position", "top", "bottom", "left", "right", "shadow", "shadowHover", "overflow", "overflowX", "overflowY", "aspectRatio", "zIndex", "tag", "opacity", "opacityHover", "order", "alignSelf", "flex", "transition", "transitionHover", "cursor", "children", "className", "style", "borderColor", "borderColorHover", "borderWidth", "borderSide"];
|
|
3
13
|
|
|
4
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); }
|
|
5
15
|
|
|
16
|
+
import "core-js/modules/es.string.trim.js";
|
|
17
|
+
import "core-js/modules/es.array.concat.js";
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
6
25
|
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; }
|
|
7
26
|
|
|
8
27
|
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; }
|
|
9
28
|
|
|
10
|
-
import "core-js/modules/es.array.includes.js";
|
|
11
|
-
import "core-js/modules/es.array.concat.js";
|
|
12
|
-
import "core-js/modules/es.object.keys.js";
|
|
13
|
-
import "core-js/modules/es.array.index-of.js";
|
|
14
|
-
import "core-js/modules/es.symbol.js";
|
|
15
|
-
import "core-js/modules/es.object.assign.js";
|
|
16
|
-
import { getBorder, getColor, getRadius, getResponsiveSpace, getShadow, getResponsiveDimension, getResponsiveOneOf, getTransition } from '../utilities';
|
|
17
29
|
import React, { forwardRef } from 'react';
|
|
18
30
|
import { types } from '../types';
|
|
19
31
|
import PropTypes from 'prop-types';
|
|
20
|
-
import
|
|
32
|
+
import { generateAttributes } from '../utilities';
|
|
21
33
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
|
-
var propsToExcludeFromDom = ['color', 'width', 'height', 'overflow', 'radius', 'cursor', 'opacity', 'order'];
|
|
23
|
-
|
|
24
|
-
var Root = /*#__PURE__*/_styled('div', process.env.NODE_ENV === "production" ? {
|
|
25
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
26
|
-
return isPropValid(prop) && !propsToExcludeFromDom.includes(prop);
|
|
27
|
-
},
|
|
28
|
-
target: "e195veib0"
|
|
29
|
-
} : {
|
|
30
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
31
|
-
return isPropValid(prop) && !propsToExcludeFromDom.includes(prop);
|
|
32
|
-
},
|
|
33
|
-
target: "e195veib0",
|
|
34
|
-
label: "Root"
|
|
35
|
-
})(function (p) {
|
|
36
|
-
return "\n ".concat(p.all && "all: ".concat(all), ";\n\n ").concat(getBorder(p.borderSide, p.borderWidth, p.borderColor), ";\n\n ").concat(getResponsiveSpace('padding', p.padding), ";\n ").concat(getResponsiveSpace('padding-top', p.paddingTop || p.paddingY), ";\n ").concat(getResponsiveSpace('padding-bottom', p.paddingBottom || p.paddingY), ";\n ").concat(getResponsiveSpace('padding-left', p.paddingLeft || p.paddingX), ";\n ").concat(getResponsiveSpace('padding-right', p.paddingRight || p.paddingX), ";\n\n ").concat(getResponsiveSpace('margin', p.margin), ";\n ").concat(getResponsiveSpace('margin-top', p.marginTop || p.marginY), ";\n ").concat(getResponsiveSpace('margin-bottom', p.marginBottom || p.marginY), ";\n ").concat(getResponsiveSpace('margin-left', p.marginLeft || p.marginX), ";\n ").concat(getResponsiveSpace('margin-right', p.marginRight || p.marginX), ";\n\n ").concat(getResponsiveSpace('top', p.top), ";\n ").concat(getResponsiveSpace('bottom', p.bottom), ";\n ").concat(getResponsiveSpace('left', p.left), ";\n ").concat(getResponsiveSpace('right', p.right), ";\n\n ").concat(getResponsiveDimension('width', p.width), ";\n ").concat(getResponsiveDimension('min-width', p.minWidth), ";\n ").concat(getResponsiveDimension('max-width', p.maxWidth), ";\n ").concat(getResponsiveDimension('height', p.height), ";\n ").concat(getResponsiveDimension('min-height', p.minHeight), ";\n ").concat(getResponsiveDimension('max-height', p.maxHeight), ";\n\n ").concat(getResponsiveOneOf('order', p.order), ";\n ").concat(getResponsiveOneOf('flex', p.flex), ";\n ").concat(getResponsiveOneOf('align-self', p.alignSelf), ";\n\n ").concat(p.overflow && "overflow: ".concat(p.overflow), ";\n ").concat(p.overflowX && "overflow-x: ".concat(p.overflowX), ";\n ").concat(p.overflowY && "overflow-y: ".concat(p.overflowY), ";\n\n ").concat(p.color && "color: ".concat(getColor(p.color)), ";\n ").concat(p.backgroundColor && "background-color: ".concat(getColor(p.backgroundColor)), ";\n ").concat(p.position && "position: ".concat(p.position), ";\n ").concat(p.radius && "border-radius: ".concat(getRadius(p.radius)), ";\n ").concat(p.shadow && "box-shadow: ".concat(getShadow(p.shadow)), ";\n ").concat(p.aspectRatio && "aspect-ratio: ".concat(p.aspectRatio), ";\n ").concat(p.zIndex && "z-index: ".concat(p.zIndex), ";\n ").concat(Boolean(p.opacity) && "opacity: ".concat(p.opacity), ";\n ").concat(p.transition && "transition: ".concat(getTransition(p.transition)), ";\n ").concat(p.cursor && "cursor: ".concat(p.cursor), ";\n\n &:hover {\n ").concat(p.colorHover && "color: ".concat(getColor(p.colorHover)), ";\n ").concat(p.backgroundColorHover && "background-color: ".concat(getColor(p.backgroundColorHover)), ";\n ").concat(p.coshadowHoverlor && "box-shadow: ".concat(getShadow(p.shadowHover)), ";\n ").concat(p.transitionHover && "transition: ".concat(getTransition(p.transitionHover)), ";\n ").concat(Boolean(p.opacityHover) && "opacity: ".concat(p.opacityHover), ";\n ").concat(p.borderColorHover && getBorder(p.borderSide, p.borderWidth, p.borderColorHover), ";\n }\n ");
|
|
37
|
-
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL2JveC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkJFIiwiZmlsZSI6Ii4uLy4uL3NyYy9jb21wb25lbnRzL2JveC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBnZXRCb3JkZXI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XG4gIG92ZXJmbG93OiB0eXBlcy5vdmVyZmxvdyxcbiAgb3ZlcmZsb3dYOiB0eXBlcy5vdmVyZmxvdyxcbiAgb3ZlcmZsb3dZOiB0eXBlcy5vdmVyZmxvdyxcbiAgYXNwZWN0UmF0aW86IFByb3BUeXBlcy5zdHJpbmcsXG4gIHpJbmRleDogdHlwZXMuekluZGV4LFxuICBvcGFjaXR5OiBQcm9wVHlwZXMuc3RyaW5nLFxuICBvcGFjaXR5SG92ZXI6IFByb3BUeXBlcy5zdHJpbmcsXG4gIG9yZGVyOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtQcm9wVHlwZXMuc3RyaW5nLCBQcm9wVHlwZXMub2JqZWN0XSksXG4gIGFsaWduU2VsZjogdHlwZXMuYWxpZ25TZWxmLFxuICBmbGV4OiBQcm9wVHlwZXMub25lT2ZUeXBlKFtQcm9wVHlwZXMuc3RyaW5nLCBQcm9wVHlwZXMub2JqZWN0XSksXG4gIHRyYW5zaXRpb246IHR5cGVzLnRyYW5zaXRpb24sXG4gIHRyYW5zaXRpb25Ib3ZlcjogdHlwZXMudHJhbnNpdGlvbixcbiAgY3Vyc29yOiB0eXBlcy5jdXJzb3IsXG4gIHRhZzogUHJvcFR5cGVzLnN0cmluZyxcbn07XG4iXX0= */"));
|
|
38
|
-
|
|
39
34
|
export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
40
|
-
var
|
|
41
|
-
|
|
35
|
+
var _objectSpread2;
|
|
36
|
+
|
|
37
|
+
var color = _ref.color,
|
|
42
38
|
colorHover = _ref.colorHover,
|
|
43
39
|
backgroundColor = _ref.backgroundColor,
|
|
44
40
|
backgroundColorHover = _ref.backgroundColorHover,
|
|
45
|
-
_ref$borderColor = _ref.borderColor,
|
|
46
|
-
borderColor = _ref$borderColor === void 0 ? 'border' : _ref$borderColor,
|
|
47
|
-
borderColorHover = _ref.borderColorHover,
|
|
48
|
-
_ref$borderWidth = _ref.borderWidth,
|
|
49
|
-
borderWidth = _ref$borderWidth === void 0 ? '1px' : _ref$borderWidth,
|
|
50
|
-
borderSide = _ref.borderSide,
|
|
51
41
|
width = _ref.width,
|
|
52
42
|
minWidth = _ref.minWidth,
|
|
53
43
|
maxWidth = _ref.maxWidth,
|
|
@@ -92,26 +82,18 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
82
|
transitionHover = _ref.transitionHover,
|
|
93
83
|
cursor = _ref.cursor,
|
|
94
84
|
children = _ref.children,
|
|
85
|
+
className = _ref.className,
|
|
86
|
+
style = _ref.style,
|
|
87
|
+
borderColor = _ref.borderColor,
|
|
88
|
+
borderColorHover = _ref.borderColorHover,
|
|
89
|
+
borderWidth = _ref.borderWidth,
|
|
90
|
+
borderSide = _ref.borderSide,
|
|
95
91
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
96
92
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
colorHover: colorHover,
|
|
102
|
-
backgroundColor: backgroundColor,
|
|
103
|
-
backgroundColorHover: backgroundColorHover,
|
|
104
|
-
borderColor: borderColor,
|
|
105
|
-
borderColorHover: borderColorHover,
|
|
106
|
-
borderWidth: borderWidth,
|
|
107
|
-
borderSide: borderSide,
|
|
108
|
-
width: width,
|
|
109
|
-
minWidth: minWidth,
|
|
110
|
-
maxWidth: maxWidth,
|
|
111
|
-
height: height,
|
|
112
|
-
minHeight: minHeight,
|
|
113
|
-
maxHeight: maxHeight,
|
|
114
|
-
radius: radius,
|
|
93
|
+
var propClassName = className ? className : '';
|
|
94
|
+
var propStyle = style ? style : {};
|
|
95
|
+
var Tag = tag;
|
|
96
|
+
var sharedProps = {
|
|
115
97
|
padding: padding,
|
|
116
98
|
paddingTop: paddingTop,
|
|
117
99
|
paddingBottom: paddingBottom,
|
|
@@ -126,27 +108,50 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
126
108
|
marginRight: marginRight,
|
|
127
109
|
marginX: marginX,
|
|
128
110
|
marginY: marginY,
|
|
129
|
-
position: position,
|
|
130
111
|
top: top,
|
|
131
112
|
bottom: bottom,
|
|
132
113
|
left: left,
|
|
133
114
|
right: right,
|
|
115
|
+
color: color,
|
|
116
|
+
colorHover: colorHover,
|
|
117
|
+
backgroundColor: backgroundColor,
|
|
118
|
+
backgroundColorHover: backgroundColorHover,
|
|
134
119
|
shadow: shadow,
|
|
135
120
|
shadowHover: shadowHover,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
aspectRatio: aspectRatio,
|
|
140
|
-
zIndex: zIndex,
|
|
141
|
-
as: tag,
|
|
142
|
-
opacity: opacity,
|
|
143
|
-
opacityHover: opacityHover,
|
|
144
|
-
order: order,
|
|
145
|
-
alignSelf: alignSelf,
|
|
146
|
-
flex: flex,
|
|
121
|
+
radius: radius,
|
|
122
|
+
borderColor: borderColor,
|
|
123
|
+
borderColorHover: borderColorHover,
|
|
147
124
|
transition: transition,
|
|
148
125
|
transitionHover: transitionHover,
|
|
149
|
-
|
|
126
|
+
alignSelf: alignSelf
|
|
127
|
+
};
|
|
128
|
+
var attributes = generateAttributes({
|
|
129
|
+
styleProps: _objectSpread({
|
|
130
|
+
width: width,
|
|
131
|
+
minWidth: minWidth,
|
|
132
|
+
maxWidth: maxWidth,
|
|
133
|
+
height: height,
|
|
134
|
+
minHeight: minHeight,
|
|
135
|
+
maxHeight: maxHeight,
|
|
136
|
+
order: order,
|
|
137
|
+
zIndex: zIndex,
|
|
138
|
+
aspectRatio: aspectRatio,
|
|
139
|
+
flex: flex,
|
|
140
|
+
opacity: opacity,
|
|
141
|
+
opacityHover: opacityHover
|
|
142
|
+
}, sharedProps),
|
|
143
|
+
classNameProps: _objectSpread((_objectSpread2 = {
|
|
144
|
+
position: position
|
|
145
|
+
}, _defineProperty(_objectSpread2, "position", position), _defineProperty(_objectSpread2, "overflow", overflow), _defineProperty(_objectSpread2, "cursor", cursor), _defineProperty(_objectSpread2, "borderWidth", borderWidth), _defineProperty(_objectSpread2, "borderSide", borderSide), _objectSpread2), sharedProps)
|
|
146
|
+
});
|
|
147
|
+
var classAttributes = "".concat(attributes.classNames, " ").concat(propClassName).trim();
|
|
148
|
+
|
|
149
|
+
var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
|
|
150
|
+
|
|
151
|
+
return ___EmotionJSX(Tag, _extends({
|
|
152
|
+
ref: ref,
|
|
153
|
+
className: classAttributes,
|
|
154
|
+
style: styleAttributes
|
|
150
155
|
}, otherProps), children);
|
|
151
156
|
});
|
|
152
157
|
Box.propTypes = {
|
|
@@ -155,10 +160,10 @@ Box.propTypes = {
|
|
|
155
160
|
colorHover: types.color,
|
|
156
161
|
backgroundColor: types.color,
|
|
157
162
|
backgroundColorHover: types.color,
|
|
158
|
-
borderSide: types.side,
|
|
159
|
-
borderWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
160
163
|
borderColor: types.color,
|
|
161
164
|
borderColorHover: types.color,
|
|
165
|
+
borderWidth: types.borderWidth,
|
|
166
|
+
borderSide: types.side,
|
|
162
167
|
width: types.responsiveDimension,
|
|
163
168
|
minWidth: types.responsiveDimension,
|
|
164
169
|
maxWidth: types.responsiveDimension,
|
|
@@ -194,7 +199,7 @@ Box.propTypes = {
|
|
|
194
199
|
zIndex: types.zIndex,
|
|
195
200
|
opacity: PropTypes.string,
|
|
196
201
|
opacityHover: PropTypes.string,
|
|
197
|
-
order: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
202
|
+
order: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
|
|
198
203
|
alignSelf: types.alignSelf,
|
|
199
204
|
flex: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
200
205
|
transition: types.transition,
|
|
@@ -0,0 +1,91 @@
|
|
|
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 = ["direction", "wrap", "justifyContent", "alignItems", "alignContent", "gap", "columnGap", "rowGap", "children", "className", "style"];
|
|
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.regexp.exec.js";
|
|
17
|
+
import "core-js/modules/es.string.replace.js";
|
|
18
|
+
import "core-js/modules/es.string.trim.js";
|
|
19
|
+
import "core-js/modules/es.array.concat.js";
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
25
|
+
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; }
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
import React, { forwardRef } from 'react';
|
|
32
|
+
import { types } from '../../types';
|
|
33
|
+
import { generateAttributes } from '../../utilities';
|
|
34
|
+
import { Box } from '../box';
|
|
35
|
+
import styles from './styles.module.css';
|
|
36
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
37
|
+
export var Flex = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
|
+
var _ref$direction = _ref.direction,
|
|
39
|
+
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
40
|
+
_ref$wrap = _ref.wrap,
|
|
41
|
+
wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
|
|
42
|
+
_ref$justifyContent = _ref.justifyContent,
|
|
43
|
+
justifyContent = _ref$justifyContent === void 0 ? 'start' : _ref$justifyContent,
|
|
44
|
+
_ref$alignItems = _ref.alignItems,
|
|
45
|
+
alignItems = _ref$alignItems === void 0 ? 'start' : _ref$alignItems,
|
|
46
|
+
_ref$alignContent = _ref.alignContent,
|
|
47
|
+
alignContent = _ref$alignContent === void 0 ? 'start' : _ref$alignContent,
|
|
48
|
+
gap = _ref.gap,
|
|
49
|
+
columnGap = _ref.columnGap,
|
|
50
|
+
rowGap = _ref.rowGap,
|
|
51
|
+
children = _ref.children,
|
|
52
|
+
className = _ref.className,
|
|
53
|
+
style = _ref.style,
|
|
54
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
+
|
|
56
|
+
var propClassName = className ? className : '';
|
|
57
|
+
var propStyle = style ? style : {};
|
|
58
|
+
var sharedProps = {
|
|
59
|
+
gap: gap,
|
|
60
|
+
columnGap: columnGap,
|
|
61
|
+
rowGap: rowGap,
|
|
62
|
+
wrap: wrap,
|
|
63
|
+
justifyContent: justifyContent,
|
|
64
|
+
alignItems: alignItems,
|
|
65
|
+
alignContent: alignContent,
|
|
66
|
+
direction: direction
|
|
67
|
+
};
|
|
68
|
+
var attributes = generateAttributes({
|
|
69
|
+
styleProps: _objectSpread({}, sharedProps),
|
|
70
|
+
classNameProps: _objectSpread({}, sharedProps)
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
|
|
74
|
+
|
|
75
|
+
var classAttributes = "".concat(attributes.classNames, " ").concat(propClassName, " ").concat(styles.flex).trim().replace(/\s+/g, ' ');
|
|
76
|
+
return ___EmotionJSX(Box, _extends({
|
|
77
|
+
ref: ref,
|
|
78
|
+
style: styleAttributes,
|
|
79
|
+
className: classAttributes
|
|
80
|
+
}, props), children);
|
|
81
|
+
});
|
|
82
|
+
Flex.propTypes = {
|
|
83
|
+
direction: types.flexDirection,
|
|
84
|
+
wrap: types.flexWrap,
|
|
85
|
+
justifyContent: types.flexJustifyContent,
|
|
86
|
+
alignItems: types.flexAlignItems,
|
|
87
|
+
alignContent: types.flexAlignContent,
|
|
88
|
+
gap: types.responsiveSpace,
|
|
89
|
+
columnGap: types.responsiveSpace,
|
|
90
|
+
rowGap: types.responsiveSpace
|
|
91
|
+
};
|
package/es/components/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './provider';
|
|
2
2
|
export { Text } from './text';
|
|
3
|
-
export { Text2 } from './text2';
|
|
4
3
|
export { Box } from './box';
|
|
5
|
-
export { Box2 } from './box2';
|
|
6
4
|
export { Button } from './button';
|
|
7
5
|
export { Checkbox } from './checkbox';
|
|
8
6
|
export { TextInput } from './text-input';
|
|
@@ -0,0 +1,68 @@
|
|
|
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", "gap", "style", "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.regexp.exec.js";
|
|
17
|
+
import "core-js/modules/es.string.replace.js";
|
|
18
|
+
import "core-js/modules/es.string.trim.js";
|
|
19
|
+
import "core-js/modules/es.array.concat.js";
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
25
|
+
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; }
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
import PropTypes from 'prop-types';
|
|
32
|
+
import React, { forwardRef } from 'react';
|
|
33
|
+
import { types } from '../../types';
|
|
34
|
+
import { Box } from '../box';
|
|
35
|
+
import { generateAttributes } from '../../utilities';
|
|
36
|
+
import styles from './styles.module.css';
|
|
37
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
38
|
+
export var Stack = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
39
|
+
var children = _ref.children,
|
|
40
|
+
stackGap = _ref.gap,
|
|
41
|
+
style = _ref.style,
|
|
42
|
+
className = _ref.className,
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
44
|
+
|
|
45
|
+
var propClassName = className ? className : '';
|
|
46
|
+
var propStyle = style ? style : {};
|
|
47
|
+
var attributes = generateAttributes({
|
|
48
|
+
styleProps: {
|
|
49
|
+
stackGap: stackGap
|
|
50
|
+
},
|
|
51
|
+
classNameProps: {
|
|
52
|
+
stackGap: stackGap
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
|
|
57
|
+
|
|
58
|
+
var classAttributes = "".concat(propClassName, " ").concat(attributes.classNames, " ").concat(styles.stack).trim().replace(/\s+/g, ' ');
|
|
59
|
+
return ___EmotionJSX(Box, _extends({
|
|
60
|
+
ref: ref,
|
|
61
|
+
style: styleAttributes,
|
|
62
|
+
className: classAttributes
|
|
63
|
+
}, props), children);
|
|
64
|
+
});
|
|
65
|
+
Stack.propTypes = {
|
|
66
|
+
children: PropTypes.node,
|
|
67
|
+
gap: types.responsiveSpace
|
|
68
|
+
};
|
|
@@ -9,7 +9,7 @@ import "core-js/modules/web.dom-collections.for-each.js";
|
|
|
9
9
|
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
10
10
|
import "core-js/modules/es.object.define-properties.js";
|
|
11
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"];
|
|
12
|
+
var _excluded = ["children", "size", "weight", "color", "tag", "display", "hasEllipsis", "ellipsisLines", "align", "letterSpacing", "textTransform", "variant", "trimTop", "className", "style"];
|
|
13
13
|
|
|
14
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
15
|
|
|
@@ -27,13 +27,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
27
27
|
|
|
28
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
29
|
|
|
30
|
-
import {
|
|
30
|
+
import { generateAttributes } from '../../utilities';
|
|
31
31
|
import PropTypes from 'prop-types';
|
|
32
32
|
import React, { forwardRef } from 'react';
|
|
33
33
|
import { types } from '../../types';
|
|
34
34
|
import styles from './styles.module.css';
|
|
35
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
36
|
-
export var
|
|
36
|
+
export var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
37
37
|
var children = _ref.children,
|
|
38
38
|
_ref$size = _ref.size,
|
|
39
39
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
@@ -51,6 +51,7 @@ export var Text2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
51
51
|
variant = _ref.variant,
|
|
52
52
|
trimTop = _ref.trimTop,
|
|
53
53
|
className = _ref.className,
|
|
54
|
+
style = _ref.style,
|
|
54
55
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
56
|
|
|
56
57
|
var Tag = tag;
|
|
@@ -62,29 +63,35 @@ export var Text2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
62
63
|
letterSpacing = '0.05em';
|
|
63
64
|
}
|
|
64
65
|
|
|
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
66
|
var propClassName = className ? className : '';
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
var propStyle = style ? style : {};
|
|
68
|
+
var attributes = generateAttributes({
|
|
69
|
+
styleProps: {
|
|
70
|
+
size: size,
|
|
71
|
+
align: align,
|
|
72
|
+
color: color,
|
|
73
|
+
letterSpacing: letterSpacing
|
|
74
|
+
},
|
|
75
|
+
classNameProps: {
|
|
76
|
+
size: size,
|
|
77
|
+
align: align,
|
|
78
|
+
color: color,
|
|
79
|
+
weight: weight,
|
|
80
|
+
display: !ellipsisLines ? display : undefined,
|
|
81
|
+
textTransform: textTransform
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var styleAttributes = _objectSpread(_objectSpread(_objectSpread({}, attributes.styles), propStyle), ellipsisLines && _defineProperty({}, '--el', ellipsisLines));
|
|
86
|
+
|
|
87
|
+
var classAttributes = [attributes.classNames, propClassName, trimTop && styles.trimTop, hasEllipsis && !ellipsisLines ? styles.ellipsis : undefined, hasEllipsis && ellipsisLines ? styles.ellipsisMulti : undefined].join(' ').replace(/\s+/g, ' ').trim();
|
|
81
88
|
return ___EmotionJSX(Tag, _extends({
|
|
82
89
|
ref: ref,
|
|
83
|
-
className:
|
|
84
|
-
style:
|
|
90
|
+
className: classAttributes,
|
|
91
|
+
style: styleAttributes
|
|
85
92
|
}, props), children);
|
|
86
93
|
});
|
|
87
|
-
|
|
94
|
+
Text.propTypes = {
|
|
88
95
|
size: types.responsiveTextSize,
|
|
89
96
|
weight: types.weight,
|
|
90
97
|
color: types.color,
|
package/es/styles/utilities.js
CHANGED
|
@@ -99,10 +99,16 @@ var spaceProps = styleConfig.spaceProps,
|
|
|
99
99
|
textDisplayProps = styleConfig.textDisplayProps,
|
|
100
100
|
zIndexProps = styleConfig.zIndexProps,
|
|
101
101
|
letterSpacingProps = styleConfig.letterSpacingProps,
|
|
102
|
-
textTransformProps = styleConfig.textTransformProps
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
textTransformProps = styleConfig.textTransformProps,
|
|
103
|
+
autoFlowProps = styleConfig.autoFlowProps,
|
|
104
|
+
gridTemplateProps = styleConfig.gridTemplateProps,
|
|
105
|
+
itemAlignmentProps = styleConfig.itemAlignmentProps,
|
|
106
|
+
contentPositionProps = styleConfig.contentPositionProps,
|
|
107
|
+
flexDirectionProps = styleConfig.flexDirectionProps,
|
|
108
|
+
flexWrapProps = styleConfig.flexWrapProps;
|
|
109
|
+
var classAndStyleDeclarationProps = [spaceProps, colorProps, shadowProps, radiusProps, transitionProps, sizeProps, borderColorProps, alignProps, flexWrapProps, autoFlowProps, itemAlignmentProps, contentPositionProps, flexDirectionProps, alignSelfProps];
|
|
110
|
+
var classDeclarationProps = [].concat(classAndStyleDeclarationProps, [positionProps, overflowProps, cursorProps, sizeProps, borderWidthProps, weightProps, textDisplayProps, borderSideProps, textTransformProps]);
|
|
111
|
+
var styleDeclarationProps = [].concat(classAndStyleDeclarationProps, [dimensionProps, aspectRatioProps, orderProps, flexProps, opacityProps, zIndexProps, letterSpacingProps, gridTemplateProps]);
|
|
106
112
|
var defaultBorder = "\n [class*=\"bd\"] {\n border-color: var(--grn-color-border);\n border-width: 1px;\n }\n";
|
|
107
113
|
var utilities = "\n ".concat(defaultBorder, "\n ").concat(generateUtilityClassDeclarations(classDeclarationProps), ";\n ").concat(generateStyleClassDeclarations(styleDeclarationProps), ";\n");
|
|
108
114
|
export default utilities;
|
package/es/styles/variables.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m:
|
|
1
|
+
var variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m: 15px;\n --grn-text-l: 18px;\n --grn-text-xl: 24px;\n --grn-text-xxl: 30px;\n }\n\n /* text size \u2715 ~1.2 */\n :root {\n --grn-icon-s: 14px;\n --grn-icon-m: 18px;\n --grn-icon-l: 22px;\n --grn-icon-xl: 28px;\n --grn-icon-xxl: 36px;\n }\n\n :root {\n --grn-weight-normal: 400;\n --grn-weight-medium: 500;\n }\n\n :root {\n --grn-space-xs: calc(var(--grn-unit) / 2);\n --grn-space-s: calc(var(--grn-unit) * 1);\n --grn-space-s2: calc(var(--grn-unit) * 1.5);\n --grn-space-m: calc(var(--grn-unit) * 2);\n --grn-space-l: calc(var(--grn-unit) * 3);\n --grn-space-l2: calc(var(--grn-unit) * 4);\n --grn-space-xl: calc(var(--grn-unit) * 5);\n --grn-space-xl2: calc(var(--grn-unit) * 6);\n --grn-space-xxl: calc(var(--grn-unit) * 7);\n }\n\n :root {\n --grn-radius-s: 3px;\n --grn-radius-m: 6px;\n --grn-radius-l: 10px;\n }\n\n :root {\n --grn-transition-slow: 400ms;\n --grn-transition-fast: 200ms;\n --grn-transition-xFast: 160ms;\n --grn-transition-xxFast: 80ms;\n }\n\n :root,\n [data-theme] {\n --grn-space-betweenFormTitleAndContent: var(--grn-space-l);\n --grn-space-betweenFormContents: var(--grn-space-m);\n --grn-space-betweenFormContentAndActions: var(--grn-space-xl);\n --grn-space-betweenFormControlAndLabel: var(--grn-space-s);\n --grn-space-fieldPaddingX: 12px;\n\n --grn-color-fieldBorder: var(--grn-color-fade3);\n --grn-color-fieldBorderHover: var(--grn-color-fade6);\n --grn-color-fieldBorderFocus: var(--grn-color-shade9);\n --grn-color-fieldBorderDisabled: var(--grn-color-shade5);\n --grn-color-fieldBackgroundDisabled: var(--grn-color-shade2);\n --grn-color-backdrop: hsl(var(--H) 15% 10% / 0.6);\n\n --grn-transition-leave: var(--grn-transition-slow);\n --grn-transition-hover: var(--grn-transition-fast);\n --grn-transition-active: var(--grn-transition-xxFast);\n }\n";
|
|
2
2
|
export default variables;
|