@flodesk/grain 2.18.0 → 2.18.1
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/icon-button.js +4 -8
- package/es/components/text-button.js +3 -7
- package/es/components/text-input.js +1 -1
- package/es/components/toggle-group.js +1 -1
- package/es/foundational/index.js +26 -0
- package/es/icons/icon-download.js +11 -4
- package/es/icons/icon-folder-add.js +1 -4
- package/es/icons/icon-folder.js +3 -1
- package/es/icons/icon-monitor.js +2 -2
- package/es/icons/icon-phone.js +2 -7
- package/es/icons/icon-tablet.js +2 -2
- package/es/icons/icon-upload.js +11 -4
- package/package.json +1 -1
|
@@ -15,26 +15,22 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
|
|
16
16
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
17
|
|
|
18
|
-
var _utilities = require("../utilities");
|
|
19
|
-
|
|
20
18
|
var _components = require("../components");
|
|
21
19
|
|
|
22
20
|
var _react = _interopRequireDefault(require("react"));
|
|
23
21
|
|
|
24
22
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
25
23
|
|
|
26
|
-
var _react2 = require("@emotion/react");
|
|
27
|
-
|
|
28
24
|
var _types = require("../types");
|
|
29
25
|
|
|
26
|
+
var _foundational = require("../foundational");
|
|
27
|
+
|
|
30
28
|
var _excluded = ["children", "isDisabled", "icon", "color"];
|
|
31
29
|
|
|
32
|
-
var _templateObject
|
|
30
|
+
var _templateObject;
|
|
33
31
|
|
|
34
32
|
var __jsx = _react.default.createElement;
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
var Wrapper = _styled.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n appearance: none;\n border: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n width: var(--grn-clearButtonHeight-m);\n height: var(--grn-clearButtonHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n \n &:hover {\n transition: ", ";\n border-color: var(--grn-borderColor-hover);\n }\n \n &:active {\n transition: 0s;\n border-color: var(--grn-borderColor-active);\n }\n \n &:disabled {\n color: ", ";\n cursor: default;\n border-color: transparent;\n }\n"])), variables, (0, _utilities.getRadius)('s'), (0, _utilities.getTransition)('slow'), (0, _utilities.getTransition)('fast'), (0, _utilities.getColor)('disabledContent'));
|
|
33
|
+
var Wrapper = (0, _styled.default)(_foundational.ClearButtonBox)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: var(--grn-clearButtonHeight-m);\n"])));
|
|
38
34
|
|
|
39
35
|
var IconButton = function IconButton(_ref) {
|
|
40
36
|
var children = _ref.children,
|
|
@@ -15,24 +15,20 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
|
|
16
16
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
17
|
|
|
18
|
-
var _utilities = require("../utilities");
|
|
19
|
-
|
|
20
18
|
var _components = require("../components");
|
|
21
19
|
|
|
22
20
|
var _react = _interopRequireDefault(require("react"));
|
|
23
21
|
|
|
24
22
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
25
23
|
|
|
26
|
-
var
|
|
24
|
+
var _foundational = require("../foundational");
|
|
27
25
|
|
|
28
26
|
var _excluded = ["children", "isDisabled", "icon"];
|
|
29
27
|
|
|
30
|
-
var _templateObject
|
|
28
|
+
var _templateObject;
|
|
31
29
|
|
|
32
30
|
var __jsx = _react.default.createElement;
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
var Wrapper = _styled.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n appearance: none;\n border: 1px solid transparent;\n padding: 0 var(--grn-paddingX-m);\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n border-radius: ", ";\n font-weight: ", ";\n transition: ", ";\n height: var(--grn-clearButtonHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n \n &:hover {\n transition: ", ";\n border-color: var(--grn-borderColor-hover);\n }\n \n &:active {\n transition: 0s;\n border-color: var(--grn-borderColor-active);\n }\n \n &:disabled {\n color: ", ";\n cursor: default;\n border-color: transparent;\n }\n"])), variables, (0, _utilities.getRadius)('s'), (0, _utilities.getWeight)('medium'), (0, _utilities.getTransition)('slow'), (0, _utilities.getTransition)('fast'), (0, _utilities.getColor)('disabledContent'));
|
|
31
|
+
var Wrapper = (0, _styled.default)(_foundational.ClearButtonBox)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 8px;\n gap: 8px;\n"])));
|
|
36
32
|
|
|
37
33
|
var TextButton = function TextButton(_ref) {
|
|
38
34
|
var children = _ref.children,
|
|
@@ -70,7 +70,7 @@ var Label = _styled.default.label(_templateObject3 || (_templateObject3 = (0, _t
|
|
|
70
70
|
return sizesStyles[p.size].labelGap;
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
-
var InputField = _styled.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n background-color: transparent;\n color: inherit;\n font-size: inherit;\n transition: border-color ", ";\n border: 1px solid var(--grn-color-fieldBorder);\n width: 100%;\n ", ";\n ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n transition: ", ";\n border-color: var(--grn-color-fieldBorder-hover);\n }\n \n &:focus {\n transition: 0s;\n border-color: var(--grn-color-
|
|
73
|
+
var InputField = _styled.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n background-color: transparent;\n color: inherit;\n font-size: inherit;\n transition: border-color ", ";\n border: 1px solid var(--grn-color-fieldBorder);\n width: 100%;\n ", ";\n ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n transition: ", ";\n border-color: var(--grn-color-fieldBorder-hover);\n }\n \n &:focus {\n transition: 0s;\n border-color: var(--grn-color-grey6);\n }\n"])), (0, _utilities.getTransition)('slow'), function (p) {
|
|
74
74
|
return inputSizesStyles[p.size];
|
|
75
75
|
}, function (p) {
|
|
76
76
|
return p.paddingLeft && "padding-left: ".concat(p.paddingLeft, "px");
|
|
@@ -37,7 +37,7 @@ var variables = (0, _react2.css)(_templateObject || (_templateObject = (0, _tagg
|
|
|
37
37
|
|
|
38
38
|
var Wrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border: 1px solid var(--grn-color-border);\n border-radius: var(--grn-radius-s);\n width: fit-content;\n"])));
|
|
39
39
|
|
|
40
|
-
var ItemWrapper = _styled.default.button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n appearance: none;\n border: none;\n border-left: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n font-weight: ", ";\n cursor: pointer;\n transition: ", ";\n min-width: var(--grn-width);\n height: var(--grn-textBoxHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n color: var(--grn-color-bodyDimmed);\n\n ", ";\n \n & + .ToggleOption {\n border-color: var(--grn-color-border);\n }\n \n &:after {\n content: \"\";\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n ", ";\n }\n\n &:first-child {\n min-width: calc(var(--grn-width) - 1px);\n }\n \n &:first-child:after {\n width: calc(100% + 1px);\n left: -1px;\n border-radius: var(--grn-radius-s) 0 0 var(--grn-radius-s);\n }\n \n &:last-child:after {\n border-radius: 0 var(--grn-radius-s) var(--grn-radius-s) 0;\n }\n\n &:hover {\n color: var(--grn-color-body);\n transition: ", ";\n }\n"])), variables, (0, _utilities.getWeight)("medium"), (0, _utilities.getTransition)('slow'), function (p) {
|
|
40
|
+
var ItemWrapper = _styled.default.button(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n appearance: none;\n border: none;\n border-left: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n font-weight: ", ";\n cursor: pointer;\n transition: ", ";\n min-width: var(--grn-width);\n height: calc(var(--grn-textBoxHeight-m) - 2px);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n color: var(--grn-color-bodyDimmed);\n\n ", ";\n \n & + .ToggleOption {\n border-color: var(--grn-color-border);\n }\n \n &:after {\n content: \"\";\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n ", ";\n }\n\n &:first-child {\n min-width: calc(var(--grn-width) - 1px);\n }\n \n &:first-child:after {\n width: calc(100% + 1px);\n left: -1px;\n border-radius: var(--grn-radius-s) 0 0 var(--grn-radius-s);\n }\n \n &:last-child:after {\n border-radius: 0 var(--grn-radius-s) var(--grn-radius-s) 0;\n }\n\n &:hover {\n color: var(--grn-color-body);\n transition: ", ";\n }\n"])), variables, (0, _utilities.getWeight)("medium"), (0, _utilities.getTransition)('slow'), function (p) {
|
|
41
41
|
return p.isActive && "\n color: var(--grn-color-body);\n ";
|
|
42
42
|
}, function (p) {
|
|
43
43
|
return p.isActive && "box-shadow: 0 0 0 1px var(--grn-color-grey6)";
|
|
@@ -0,0 +1,26 @@
|
|
|
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.ClearButtonBox = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
|
+
|
|
16
|
+
var _react = require("@emotion/react");
|
|
17
|
+
|
|
18
|
+
var _utilities = require("../utilities");
|
|
19
|
+
|
|
20
|
+
var _templateObject, _templateObject2;
|
|
21
|
+
|
|
22
|
+
var variables = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n --grn-borderColor-active: var(--grn-color-fade5);\n"])));
|
|
23
|
+
|
|
24
|
+
var ClearButtonBox = _styled.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n appearance: none;\n border: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n font-weight: ", ";\n border-radius: ", ";\n transition: ", ";\n height: var(--grn-clearButtonHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n transition: ", ";\n background-color: var(--grn-color-overlay);\n }\n\n &:active {\n transition: 0s;\n border-color: var(--grn-borderColor-active);\n background-color: transparent;\n }\n\n &:disabled {\n color: ", ";\n cursor: default;\n border-color: transparent;\n\n &:hover {\n background-color: transparent;\n }\n }\n"])), variables, (0, _utilities.getWeight)("medium"), (0, _utilities.getRadius)('s'), (0, _utilities.getTransition)('slow'), (0, _utilities.getTransition)('fast'), (0, _utilities.getColor)('disabledContent'));
|
|
25
|
+
|
|
26
|
+
exports.ClearButtonBox = ClearButtonBox;
|
|
@@ -35,15 +35,22 @@ var __jsx = React.createElement;
|
|
|
35
35
|
|
|
36
36
|
var IconDownload = function IconDownload(props) {
|
|
37
37
|
return __jsx("svg", (0, _extends2.default)({
|
|
38
|
-
viewBox: "0 0
|
|
38
|
+
viewBox: "0 0 24 32",
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
|
-
}, props), __jsx("
|
|
41
|
+
}, props), __jsx("g", {
|
|
42
|
+
clipPath: "url(#prefix__clip0_262_764)"
|
|
43
|
+
}, __jsx("path", {
|
|
42
44
|
fillRule: "evenodd",
|
|
43
45
|
clipRule: "evenodd",
|
|
44
|
-
d: "
|
|
46
|
+
d: "M13 4v16.172l7.586-7.586L22 14l-8.586 8.586L12 24l-1.414-1.414L2 14l1.414-1.414L11 20.172V4h2zM0 20v6a2 2 0 002 2h20a2 2 0 002-2v-6h-2v6H2v-6H0z",
|
|
45
47
|
fill: "currentColor"
|
|
46
|
-
}))
|
|
48
|
+
})), __jsx("defs", null, __jsx("clipPath", {
|
|
49
|
+
id: "prefix__clip0_262_764"
|
|
50
|
+
}, __jsx("path", {
|
|
51
|
+
fill: "#fff",
|
|
52
|
+
d: "M0 0h24v32H0z"
|
|
53
|
+
}))));
|
|
47
54
|
};
|
|
48
55
|
|
|
49
56
|
IconDownload.__docgenInfo = {
|
|
@@ -39,12 +39,9 @@ var IconFolderAdd = function IconFolderAdd(props) {
|
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
41
|
}, props), __jsx("path", {
|
|
42
|
-
d: "M1 3V2H0v1h1Zm7 0 .894-.447L8.618 2H8v1Zm2 4-.894.447.276.553H10V7ZM1 4h7V2H1v2Zm6.106-.553 2 4 1.788-.894-2-4-1.788.894ZM2 11V3H0v8h2Zm8-3h16V6H10v2Zm16 0v3h2V8h-2ZM0 11v13h2V11H0Zm2 15h24v-2H2v2Zm26-2V11h-2v13h2Zm-2 2a2 2 0 0 0 2-2h-2v2ZM0 24a2 2 0 0 0 2 2v-2H0ZM26 8h2a2 2 0 0 0-2-2v2Z",
|
|
43
|
-
fill: "currentColor"
|
|
44
|
-
}), __jsx("path", {
|
|
45
42
|
fillRule: "evenodd",
|
|
46
43
|
clipRule: "evenodd",
|
|
47
|
-
d: "
|
|
44
|
+
d: "M1 4H0v22a2 2 0 002 2h24a2 2 0 002-2V10a2 2 0 00-2-2H10.618L8.894 4.553 8.618 4H1zm1 9V6h5.382l1.724 3.447.276.553H26v16H2V13zm11-1h2v5h5v2h-5v5h-2v-5H8v-2h5v-5z",
|
|
48
45
|
fill: "currentColor"
|
|
49
46
|
}));
|
|
50
47
|
};
|
package/es/icons/icon-folder.js
CHANGED
|
@@ -39,7 +39,9 @@ var IconFolder = function IconFolder(props) {
|
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
41
|
}, props), __jsx("path", {
|
|
42
|
-
|
|
42
|
+
fillRule: "evenodd",
|
|
43
|
+
clipRule: "evenodd",
|
|
44
|
+
d: "M0 4h8.618l2 4H26a2 2 0 012 2v16a2 2 0 01-2 2H2a2 2 0 01-2-2V4zm2 2v20h24V10H9.382l-2-4H2z",
|
|
43
45
|
fill: "currentColor"
|
|
44
46
|
}));
|
|
45
47
|
};
|
package/es/icons/icon-monitor.js
CHANGED
|
@@ -35,13 +35,13 @@ var __jsx = React.createElement;
|
|
|
35
35
|
|
|
36
36
|
var IconMonitor = function IconMonitor(props) {
|
|
37
37
|
return __jsx("svg", (0, _extends2.default)({
|
|
38
|
-
viewBox: "0 0
|
|
38
|
+
viewBox: "0 0 28 32",
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
41
|
}, props), __jsx("path", {
|
|
42
42
|
fillRule: "evenodd",
|
|
43
43
|
clipRule: "evenodd",
|
|
44
|
-
d: "
|
|
44
|
+
d: "M2 4a2 2 0 00-2 2v16a2 2 0 002 2h24a2 2 0 002-2V6a2 2 0 00-2-2H2zm0 2h24v16H2V6zm18 20H8v2h12v-2z",
|
|
45
45
|
fill: "currentColor"
|
|
46
46
|
}));
|
|
47
47
|
};
|
package/es/icons/icon-phone.js
CHANGED
|
@@ -35,18 +35,13 @@ var __jsx = React.createElement;
|
|
|
35
35
|
|
|
36
36
|
var IconPhone = function IconPhone(props) {
|
|
37
37
|
return __jsx("svg", (0, _extends2.default)({
|
|
38
|
-
viewBox: "0 0
|
|
38
|
+
viewBox: "0 0 16 32",
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
41
|
}, props), __jsx("path", {
|
|
42
42
|
fillRule: "evenodd",
|
|
43
43
|
clipRule: "evenodd",
|
|
44
|
-
d: "
|
|
45
|
-
fill: "currentColor"
|
|
46
|
-
}), __jsx("circle", {
|
|
47
|
-
cx: 6,
|
|
48
|
-
cy: 17.25,
|
|
49
|
-
r: 0.75,
|
|
44
|
+
d: "M2 4a2 2 0 00-2 2v20a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2H2zm0 2h12v20H2V6zm6 18a1 1 0 100-2 1 1 0 000 2z",
|
|
50
45
|
fill: "currentColor"
|
|
51
46
|
}));
|
|
52
47
|
};
|
package/es/icons/icon-tablet.js
CHANGED
|
@@ -35,13 +35,13 @@ var __jsx = React.createElement;
|
|
|
35
35
|
|
|
36
36
|
var IconTablet = function IconTablet(props) {
|
|
37
37
|
return __jsx("svg", (0, _extends2.default)({
|
|
38
|
-
viewBox: "0 0
|
|
38
|
+
viewBox: "0 0 20 32",
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
41
|
}, props), __jsx("path", {
|
|
42
42
|
fillRule: "evenodd",
|
|
43
43
|
clipRule: "evenodd",
|
|
44
|
-
d: "
|
|
44
|
+
d: "M2 4a2 2 0 00-2 2v20a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2H2zm0 2h16v20H2V6zm12 16H6v2h8v-2z",
|
|
45
45
|
fill: "currentColor"
|
|
46
46
|
}));
|
|
47
47
|
};
|
package/es/icons/icon-upload.js
CHANGED
|
@@ -35,15 +35,22 @@ var __jsx = React.createElement;
|
|
|
35
35
|
|
|
36
36
|
var IconUpload = function IconUpload(props) {
|
|
37
37
|
return __jsx("svg", (0, _extends2.default)({
|
|
38
|
-
viewBox: "0 0
|
|
38
|
+
viewBox: "0 0 24 32",
|
|
39
39
|
fill: "none",
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
|
-
}, props), __jsx("
|
|
41
|
+
}, props), __jsx("g", {
|
|
42
|
+
clipPath: "url(#prefix__clip0_262_741)"
|
|
43
|
+
}, __jsx("path", {
|
|
42
44
|
fillRule: "evenodd",
|
|
43
45
|
clipRule: "evenodd",
|
|
44
|
-
d: "
|
|
46
|
+
d: "M22 14l-8.586-8.586L12 4l-1.414 1.414L2 14l1.414 1.414L11 7.828V24h2V7.828l7.586 7.586L22 14zM0 20v6a2 2 0 002 2h20a2 2 0 002-2v-6h-2v6H2v-6H0z",
|
|
45
47
|
fill: "currentColor"
|
|
46
|
-
}))
|
|
48
|
+
})), __jsx("defs", null, __jsx("clipPath", {
|
|
49
|
+
id: "prefix__clip0_262_741"
|
|
50
|
+
}, __jsx("path", {
|
|
51
|
+
fill: "#fff",
|
|
52
|
+
d: "M0 0h24v32H0z"
|
|
53
|
+
}))));
|
|
47
54
|
};
|
|
48
55
|
|
|
49
56
|
IconUpload.__docgenInfo = {
|