@flodesk/grain 2.7.3 → 2.7.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/components/box/index.js +867 -58
- package/es/components/button/index.js +53 -22
- package/es/components/index.js +39 -4
- package/es/components/input/index.js +55 -25
- package/es/components/text/index.js +156 -33
- package/es/index.js +38 -2
- package/es/styles/variables.css +7 -7
- package/es/types/index.js +31 -14
- package/es/utilities/index.js +80 -33
- package/es/variables/index.js +15 -5
- package/package.json +2 -1
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Button = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
+
|
|
18
|
+
var _utilities = require("../../utilities");
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
|
|
22
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
23
|
+
|
|
7
24
|
var _excluded = ["children", "size", "weight", "color", "tag"];
|
|
8
25
|
|
|
9
26
|
var _templateObject, _templateObject2;
|
|
10
27
|
|
|
11
|
-
|
|
28
|
+
var __jsx = _react.default.createElement;
|
|
12
29
|
|
|
13
|
-
|
|
30
|
+
var Wrapper = _styled.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n font-size: ", ";\n font-weight: ", ";\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n border-radius: ", ";\n height: var(--grn-textBoxHeight-m);\n padding: 0 var(--grn-buttonTextBoxPaddingX-m);\n"])), (0, _utilities.getTextSize)('m'), (0, _utilities.getWeight)('medium'), (0, _utilities.getColor)('body'), (0, _utilities.getColor)('white'), (0, _utilities.getRadius)('m'));
|
|
14
31
|
|
|
15
|
-
|
|
32
|
+
var ButtonText = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n --opticalCompensation: -0.3px;\n\n position: relative;\n top: var(--opticalCompensation);\n"])));
|
|
16
33
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { getColor, getRadius, getTextSize, getWeight } from '../../utilities';
|
|
20
|
-
import React from "react";
|
|
21
|
-
import styled from "@emotion/styled";
|
|
22
|
-
var Wrapper = styled.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n border: none;\n font-family: inherit;\n font-size: ", ";\n font-weight: ", ";\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n border-radius: ", ";\n height: var(--grn-textBoxHeight-m);\n padding: 0 var(--grn-buttonTextBoxPaddingX-m);\n"])), getTextSize('m'), getWeight('medium'), getColor('body'), getColor('white'), getRadius('m'));
|
|
23
|
-
var ButtonText = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n --opticalCompensation: -0.3px;\n\n position: relative;\n top: var(--opticalCompensation);\n"])));
|
|
24
|
-
export var Button = function Button(_ref) {
|
|
34
|
+
var Button = function Button(_ref) {
|
|
25
35
|
var children = _ref.children,
|
|
26
36
|
_ref$size = _ref.size,
|
|
27
37
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
@@ -29,13 +39,34 @@ export var Button = function Button(_ref) {
|
|
|
29
39
|
weight = _ref$weight === void 0 ? 'normal' : _ref$weight,
|
|
30
40
|
color = _ref.color,
|
|
31
41
|
tag = _ref.tag,
|
|
32
|
-
props =
|
|
33
|
-
|
|
34
|
-
return /*#__PURE__*/React.createElement(Wrapper, Object.assign({
|
|
42
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
|
+
return __jsx(Wrapper, (0, _extends2.default)({
|
|
35
44
|
size: size,
|
|
36
45
|
weight: weight,
|
|
37
46
|
color: color,
|
|
38
47
|
as: tag
|
|
39
|
-
}, props),
|
|
48
|
+
}, props), __jsx(ButtonText, null, children));
|
|
40
49
|
};
|
|
41
|
-
|
|
50
|
+
|
|
51
|
+
exports.Button = Button;
|
|
52
|
+
Button.__docgenInfo = {
|
|
53
|
+
"description": "",
|
|
54
|
+
"methods": [],
|
|
55
|
+
"displayName": "Button",
|
|
56
|
+
"props": {
|
|
57
|
+
"size": {
|
|
58
|
+
"defaultValue": {
|
|
59
|
+
"value": "'m'",
|
|
60
|
+
"computed": false
|
|
61
|
+
},
|
|
62
|
+
"required": false
|
|
63
|
+
},
|
|
64
|
+
"weight": {
|
|
65
|
+
"defaultValue": {
|
|
66
|
+
"value": "'normal'",
|
|
67
|
+
"computed": false
|
|
68
|
+
},
|
|
69
|
+
"required": false
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
package/es/components/index.js
CHANGED
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "Text", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _text.Text;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "Box", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _box.Box;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "Button", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _button.Button;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "Input", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _input.Input;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _text = require("./text");
|
|
34
|
+
|
|
35
|
+
var _box = require("./box");
|
|
36
|
+
|
|
37
|
+
var _button = require("./button");
|
|
38
|
+
|
|
39
|
+
var _input = require("./input");
|
|
@@ -1,45 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
import "core-js/modules/es.object.freeze.js";
|
|
3
|
-
import "core-js/modules/es.object.define-properties.js";
|
|
4
|
-
import "core-js/modules/es.object.keys.js";
|
|
5
|
-
import "core-js/modules/es.array.index-of.js";
|
|
6
|
-
import "core-js/modules/es.symbol.js";
|
|
7
|
-
var _excluded = ["value", "placeholder", "size"];
|
|
1
|
+
"use strict";
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Input = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
var _utilities = require("../../utilities");
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
var _types = require("../../types");
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
var _excluded = ["value", "placeholder", "size"];
|
|
27
|
+
|
|
28
|
+
var _templateObject;
|
|
29
|
+
|
|
30
|
+
var __jsx = _react.default.createElement;
|
|
31
|
+
|
|
32
|
+
var Wrapper = _styled.default.input(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n background-color: transparent;\n color: inherit;\n font-size: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n height: ", ";\n padding: 0 ", ";\n width: 100%;\n"])), function (p) {
|
|
33
|
+
return (0, _utilities.getTextSize)(p.size);
|
|
34
|
+
}, (0, _utilities.getRadius)('m'), (0, _utilities.getColor)('grey3'), function (p) {
|
|
27
35
|
return "var(--grn-textBoxHeight-".concat(p.size, ")");
|
|
28
36
|
}, function (p) {
|
|
29
37
|
return "var(--grn-fieldTextBoxPaddingX-".concat(p.size, ")");
|
|
30
38
|
});
|
|
31
|
-
|
|
39
|
+
|
|
40
|
+
var Input = function Input(_ref) {
|
|
32
41
|
var value = _ref.value,
|
|
33
42
|
_ref$placeholder = _ref.placeholder,
|
|
34
43
|
placeholder = _ref$placeholder === void 0 ? 'Placeholder' : _ref$placeholder,
|
|
35
44
|
_ref$size = _ref.size,
|
|
36
45
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
37
|
-
props =
|
|
38
|
-
|
|
39
|
-
return /*#__PURE__*/React.createElement(Wrapper, Object.assign({
|
|
46
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
47
|
+
return __jsx(Wrapper, (0, _extends2.default)({
|
|
40
48
|
value: value,
|
|
41
49
|
placeholder: placeholder,
|
|
42
50
|
size: size
|
|
43
51
|
}, props));
|
|
44
52
|
};
|
|
45
|
-
|
|
53
|
+
|
|
54
|
+
exports.Input = Input;
|
|
55
|
+
Input.__docgenInfo = {
|
|
56
|
+
"description": "",
|
|
57
|
+
"methods": [],
|
|
58
|
+
"displayName": "Input",
|
|
59
|
+
"props": {
|
|
60
|
+
"placeholder": {
|
|
61
|
+
"defaultValue": {
|
|
62
|
+
"value": "'Placeholder'",
|
|
63
|
+
"computed": false
|
|
64
|
+
},
|
|
65
|
+
"required": false
|
|
66
|
+
},
|
|
67
|
+
"size": {
|
|
68
|
+
"defaultValue": {
|
|
69
|
+
"value": "'m'",
|
|
70
|
+
"computed": false
|
|
71
|
+
},
|
|
72
|
+
"required": false
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import "core-js/modules/es.object.freeze.js";
|
|
3
|
-
import "core-js/modules/es.object.define-properties.js";
|
|
4
|
-
import "core-js/modules/es.object.keys.js";
|
|
5
|
-
import "core-js/modules/es.array.index-of.js";
|
|
6
|
-
import "core-js/modules/es.symbol.js";
|
|
7
|
-
var _excluded = ["children", "size", "weight", "color", "tag", "hasEllipsis", "ellipsisLines", "align"];
|
|
1
|
+
"use strict";
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Text = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
var _utilities = require("../../utilities");
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
var _types = require("../../types");
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
var _excluded = ["children", "size", "weight", "color", "tag", "hasEllipsis", "ellipsisLines", "align"];
|
|
27
|
+
|
|
28
|
+
var _templateObject;
|
|
29
|
+
|
|
30
|
+
var __jsx = _react.default.createElement;
|
|
31
|
+
|
|
32
|
+
var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n text-align: ", ";\n \n ", ";\n ", ";\n ", ";\n"])), function (p) {
|
|
33
|
+
return (0, _utilities.getTextSize)(p.size);
|
|
26
34
|
}, function (p) {
|
|
27
|
-
return getWeight(p.weight);
|
|
35
|
+
return (0, _utilities.getWeight)(p.weight);
|
|
28
36
|
}, function (p) {
|
|
29
|
-
return getColor(p.color);
|
|
37
|
+
return (0, _utilities.getColor)(p.color);
|
|
30
38
|
}, function (p) {
|
|
31
39
|
return p.align;
|
|
32
40
|
}, function (p) {
|
|
@@ -36,7 +44,8 @@ var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateL
|
|
|
36
44
|
}, function (p) {
|
|
37
45
|
return p.hasEllipsis && p.ellipsisLines && "\n display: -webkit-box;\n -webkit-line-clamp: ".concat(p.ellipsisLines, ";\n -webkit-box-orient: vertical;\n ");
|
|
38
46
|
});
|
|
39
|
-
|
|
47
|
+
|
|
48
|
+
var Text = function Text(_ref) {
|
|
40
49
|
var children = _ref.children,
|
|
41
50
|
_ref$size = _ref.size,
|
|
42
51
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
@@ -47,9 +56,8 @@ export var Text = function Text(_ref) {
|
|
|
47
56
|
hasEllipsis = _ref.hasEllipsis,
|
|
48
57
|
ellipsisLines = _ref.ellipsisLines,
|
|
49
58
|
align = _ref.align,
|
|
50
|
-
props =
|
|
51
|
-
|
|
52
|
-
return /*#__PURE__*/React.createElement(Wrapper, Object.assign({
|
|
59
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
60
|
+
return __jsx(Wrapper, (0, _extends2.default)({
|
|
53
61
|
size: size,
|
|
54
62
|
weight: weight,
|
|
55
63
|
color: color,
|
|
@@ -59,12 +67,127 @@ export var Text = function Text(_ref) {
|
|
|
59
67
|
align: align
|
|
60
68
|
}, props), children);
|
|
61
69
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
|
|
71
|
+
exports.Text = Text;
|
|
72
|
+
Text.__docgenInfo = {
|
|
73
|
+
"description": "",
|
|
74
|
+
"methods": [],
|
|
75
|
+
"displayName": "Text",
|
|
76
|
+
"props": {
|
|
77
|
+
"size": {
|
|
78
|
+
"defaultValue": {
|
|
79
|
+
"value": "'m'",
|
|
80
|
+
"computed": false
|
|
81
|
+
},
|
|
82
|
+
"type": {
|
|
83
|
+
"name": "union",
|
|
84
|
+
"value": [{
|
|
85
|
+
"name": "enum",
|
|
86
|
+
"value": [{
|
|
87
|
+
"value": "\"s\"",
|
|
88
|
+
"computed": false
|
|
89
|
+
}, {
|
|
90
|
+
"value": "\"m\"",
|
|
91
|
+
"computed": false
|
|
92
|
+
}, {
|
|
93
|
+
"value": "\"l\"",
|
|
94
|
+
"computed": false
|
|
95
|
+
}, {
|
|
96
|
+
"value": "\"xl\"",
|
|
97
|
+
"computed": false
|
|
98
|
+
}, {
|
|
99
|
+
"value": "\"xxl\"",
|
|
100
|
+
"computed": false
|
|
101
|
+
}]
|
|
102
|
+
}, {
|
|
103
|
+
"name": "number"
|
|
104
|
+
}, {
|
|
105
|
+
"name": "string"
|
|
106
|
+
}]
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"description": ""
|
|
110
|
+
},
|
|
111
|
+
"weight": {
|
|
112
|
+
"defaultValue": {
|
|
113
|
+
"value": "'normal'",
|
|
114
|
+
"computed": false
|
|
115
|
+
},
|
|
116
|
+
"type": {
|
|
117
|
+
"name": "enum",
|
|
118
|
+
"value": [{
|
|
119
|
+
"value": "\"normal\"",
|
|
120
|
+
"computed": false
|
|
121
|
+
}, {
|
|
122
|
+
"value": "\"medium\"",
|
|
123
|
+
"computed": false
|
|
124
|
+
}, {
|
|
125
|
+
"value": "\"semiBold\"",
|
|
126
|
+
"computed": false
|
|
127
|
+
}]
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"description": ""
|
|
131
|
+
},
|
|
132
|
+
"color": {
|
|
133
|
+
"type": {
|
|
134
|
+
"name": "union",
|
|
135
|
+
"value": [{
|
|
136
|
+
"name": "enum",
|
|
137
|
+
"value": [{
|
|
138
|
+
"value": "\"greys\"",
|
|
139
|
+
"computed": false
|
|
140
|
+
}, {
|
|
141
|
+
"value": "\"baseColors\"",
|
|
142
|
+
"computed": false
|
|
143
|
+
}, {
|
|
144
|
+
"value": "\"semanticColors\"",
|
|
145
|
+
"computed": false
|
|
146
|
+
}]
|
|
147
|
+
}, {
|
|
148
|
+
"name": "string"
|
|
149
|
+
}]
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"description": ""
|
|
153
|
+
},
|
|
154
|
+
"align": {
|
|
155
|
+
"type": {
|
|
156
|
+
"name": "enum",
|
|
157
|
+
"value": [{
|
|
158
|
+
"value": "\"left\"",
|
|
159
|
+
"computed": false
|
|
160
|
+
}, {
|
|
161
|
+
"value": "\"center\"",
|
|
162
|
+
"computed": false
|
|
163
|
+
}, {
|
|
164
|
+
"value": "\"right\"",
|
|
165
|
+
"computed": false
|
|
166
|
+
}]
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"description": ""
|
|
170
|
+
},
|
|
171
|
+
"tag": {
|
|
172
|
+
"type": {
|
|
173
|
+
"name": "string"
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"description": ""
|
|
177
|
+
},
|
|
178
|
+
"hasEllipsis": {
|
|
179
|
+
"type": {
|
|
180
|
+
"name": "bool"
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"description": ""
|
|
184
|
+
},
|
|
185
|
+
"ellipsisLines": {
|
|
186
|
+
"type": {
|
|
187
|
+
"name": "number"
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"description": ""
|
|
191
|
+
}
|
|
192
|
+
}
|
|
70
193
|
};
|
package/es/index.js
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.object.keys.js");
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
var _exportNames = {
|
|
15
|
+
vars: true
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "vars", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _variables.vars;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
var _components = require("./components");
|
|
25
|
+
|
|
26
|
+
Object.keys(_components).forEach(function (key) {
|
|
27
|
+
if (key === "default" || key === "__esModule") return;
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
29
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
30
|
+
Object.defineProperty(exports, key, {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _components[key];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
var _variables = require("./variables");
|
package/es/styles/variables.css
CHANGED
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
:root {
|
|
29
|
-
--grn-radius-
|
|
30
|
-
--grn-radius-
|
|
31
|
-
--grn-radius-
|
|
29
|
+
--grn-radius-s: 5px;
|
|
30
|
+
--grn-radius-m: 10px;
|
|
31
|
+
--grn-radius-l: 15px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
:root {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
--grn-color-grey8: hsl(var(--grn-color-grey8-HSL));
|
|
38
38
|
--grn-color-grey7: hsl(0 0% 20%);
|
|
39
39
|
--grn-color-grey6: hsl(0 0% 32%);
|
|
40
|
-
--grn-color-grey5: hsl(0 0%
|
|
41
|
-
--grn-color-grey4: hsl(0 0%
|
|
42
|
-
--grn-color-grey3: hsl(0 0%
|
|
43
|
-
--grn-color-grey2: hsl(0 0%
|
|
40
|
+
--grn-color-grey5: hsl(0 0% 50%);
|
|
41
|
+
--grn-color-grey4: hsl(0 0% 66%);
|
|
42
|
+
--grn-color-grey3: hsl(0 0% 83%);
|
|
43
|
+
--grn-color-grey2: hsl(0 0% 93%);
|
|
44
44
|
--grn-color-grey1: hsl(0 0% 98%);
|
|
45
45
|
|
|
46
46
|
--grn-color-blue: hsl(218 74% 54%);
|
package/es/types/index.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.types = void 0;
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.object.keys.js");
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var _variables = require("../variables");
|
|
17
|
+
|
|
18
|
+
var types = {
|
|
19
|
+
color: _propTypes.default.oneOfType([_propTypes.default.oneOf(Object.keys(_variables.vars.colors)), _propTypes.default.string]),
|
|
20
|
+
space: _propTypes.default.oneOfType([_propTypes.default.oneOf(Object.keys(_variables.vars.spaces)), _propTypes.default.number, _propTypes.default.string]),
|
|
21
|
+
dimension: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
22
|
+
side: _propTypes.default.oneOf(["all", "left", "right", "top", "bottom", "x", "y"]),
|
|
23
|
+
radius: _propTypes.default.oneOfType([_propTypes.default.oneOf(Object.keys(_variables.vars.radiuses)), _propTypes.default.string]),
|
|
24
|
+
shadow: _propTypes.default.oneOfType([_propTypes.default.oneOf(Object.keys(_variables.vars.shadows)), _propTypes.default.string]),
|
|
25
|
+
position: _propTypes.default.oneOf(["static", "relative", "fixed", "absolute", "sticky"]),
|
|
26
|
+
textSize: _propTypes.default.oneOfType([_propTypes.default.oneOf(Object.keys(_variables.vars.textSizes)), _propTypes.default.number, _propTypes.default.string]),
|
|
27
|
+
weight: _propTypes.default.oneOf(Object.keys(_variables.vars.weights)),
|
|
28
|
+
textAlign: _propTypes.default.oneOf(["left", "center", "right"]),
|
|
29
|
+
overflow: _propTypes.default.oneOf(["visible", "hidden", "scroll", "auto"])
|
|
30
|
+
};
|
|
31
|
+
exports.types = types;
|