@gympass/yoga 7.26.0 → 7.26.4
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/cjs/Header/Header.theme.js +0 -10
- package/cjs/Header/web/GympassLogo.js +46 -0
- package/cjs/Header/web/Header.js +10 -34
- package/cjs/Progress/web/Progress.js +5 -3
- package/cjs/Snackbar/web/Snackbar.js +17 -14
- package/esm/Header/Header.theme.js +0 -10
- package/esm/Header/web/GympassLogo.js +38 -0
- package/esm/Header/web/Header.js +8 -12
- package/esm/Progress/web/Progress.js +5 -3
- package/esm/Snackbar/web/Snackbar.js +17 -14
- package/package.json +3 -3
|
@@ -6,16 +6,6 @@ exports["default"] = void 0;
|
|
|
6
6
|
var Header = function Header(_ref) {
|
|
7
7
|
var spacing = _ref.spacing;
|
|
8
8
|
return {
|
|
9
|
-
logo: {
|
|
10
|
-
width: {
|
|
11
|
-
xxs: 80,
|
|
12
|
-
lg: 130
|
|
13
|
-
},
|
|
14
|
-
margin: {
|
|
15
|
-
xxs: spacing.medium,
|
|
16
|
-
lg: 48
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
9
|
padding: {
|
|
20
10
|
xxs: spacing.medium,
|
|
21
11
|
lg: spacing.huge
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
|
|
10
|
+
var GympassLogo = function GympassLogo() {
|
|
11
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
12
|
+
width: "129",
|
|
13
|
+
height: "24",
|
|
14
|
+
viewBox: "0 0 129 24",
|
|
15
|
+
fill: "none",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
17
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
18
|
+
d: "M14.814 6.64083L18.1979 4.72868C17.0449 1.75711 14.1623 0 10.3021 0C3.93536 0 0 4.05685 0 9.97416C0 16.4341 5.21372 20 10.1768 20C14.7388 20 17.7216 17.8036 19 15.969V9.01809H9.19921V12.2222H15.3404L15.3153 14.4186C15.3153 14.4186 13.5106 16.2015 10.252 16.2015C6.74274 16.2015 4.73747 13.7468 4.73747 9.8708C4.73747 5.96899 6.74274 3.51421 10.2018 3.51421C12.2573 3.51421 13.7863 4.78036 14.814 6.64083Z",
|
|
19
|
+
fill: "#F46152"
|
|
20
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
21
|
+
d: "M21.1013 23.6795V20.5479C21.844 20.6712 22.3306 20.6959 22.8428 20.6959C24.3794 20.6959 25.5319 20.1781 26.0441 19.1425L26.1465 18.7726L20.0512 6.46849H24.8916L27.9649 14.0137C28.1954 14.5562 28.2722 14.8767 28.3746 15.3945H28.4515C28.5283 14.9507 28.6307 14.6301 28.8356 14.0384L31.7808 6.46849H36.3139L30.5259 19.3644C29.0917 22.5699 26.9661 23.8521 23.2781 23.8521C22.7147 23.8521 21.8183 23.8027 21.1013 23.6795Z",
|
|
22
|
+
fill: "#F46152"
|
|
23
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
24
|
+
d: "M41.9482 8.93425V6.46849H37.6968V18.7973H42.0762V12.411C42.0762 10.4137 43.1007 9.25479 44.8166 9.25479C46.4556 9.25479 47.2752 10.2411 47.2752 12.263V18.7973H51.6546V12.337C51.6546 10.389 52.679 9.25479 54.3949 9.25479C56.034 9.25479 56.8535 10.2411 56.8535 12.263V18.7973H61.2329V11.4986C61.2329 8.02192 59.4402 6.09863 56.2388 6.09863C53.9851 6.09863 52.2692 7.06027 51.2192 8.9589C50.4509 7.03562 48.9399 6.09863 46.6861 6.09863C44.4068 6.09863 42.8189 7.03562 41.9482 8.93425Z",
|
|
25
|
+
fill: "#F46152"
|
|
26
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
27
|
+
fillRule: "evenodd",
|
|
28
|
+
clipRule: "evenodd",
|
|
29
|
+
d: "M67.9428 8.53973V6.46849H63.6915V23.6055H68.0709V17.0712C69.1465 18.3781 70.8368 19.1671 72.9881 19.1671C76.8809 19.1671 79.5444 16.5534 79.5444 12.5836C79.5444 8.66301 77.009 6.09863 73.1674 6.09863C70.9137 6.09863 68.9929 6.93699 67.9428 8.53973ZM71.5283 8.93425C73.7308 8.93425 75.0113 10.2658 75.0113 12.5836C75.0113 14.9014 73.6796 16.3315 71.5027 16.3315C69.377 16.3315 67.9685 14.9753 67.9685 12.9041V12.3863C67.9685 10.1918 69.377 8.93425 71.5283 8.93425Z",
|
|
30
|
+
fill: "#F46152"
|
|
31
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
32
|
+
fillRule: "evenodd",
|
|
33
|
+
clipRule: "evenodd",
|
|
34
|
+
d: "M81.2347 15.4192C81.2347 14.2849 81.7213 13.3479 82.6176 12.7315C83.514 12.1397 84.7945 11.7699 87.0739 11.5479L91.8374 11.1288V10.7589C91.8374 9.37808 90.8642 8.71233 89.1227 8.71233C87.3556 8.71233 86.3056 9.37808 86.1263 10.611H81.6444C81.9774 7.8 84.8201 6.09863 89.1483 6.09863C94.0143 6.09863 96.2424 7.8 96.2424 11.3753V15.1973C96.2424 16.7753 96.3449 17.9342 96.5498 18.7973H92.2216C92.1191 18.2055 92.0423 17.4411 92.0423 16.7014C91.1972 18.2548 89.1995 19.1671 86.4848 19.1671C83.2579 19.1671 81.2347 17.737 81.2347 15.4192ZM91.9399 13.9151V13.126L88.4056 13.4712C86.4592 13.6932 85.7165 14.1863 85.7165 15.1479C85.7165 16.0603 86.6385 16.6027 88.1495 16.6027C90.4032 16.6027 91.9399 15.5425 91.9399 13.9151Z",
|
|
35
|
+
fill: "#F46152"
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
37
|
+
d: "M97.7791 16.2329L100.135 14.3096C101.339 15.6904 103.157 16.4301 105.821 16.4301C107.613 16.4301 108.407 16.0603 108.407 15.2959C108.407 14.6055 108.023 14.3342 106.563 14.1863L103.157 13.8658C100.033 13.4959 98.5474 12.2384 98.5474 10.0685C98.5474 7.55342 100.955 6.09863 105.257 6.09863C108.356 6.09863 110.866 6.93699 112.3 8.4411L110.251 10.463C108.945 9.32877 107.332 8.7863 105.027 8.7863C103.337 8.7863 102.543 9.10685 102.543 9.82192C102.543 10.4137 103.004 10.7096 104.182 10.8329L107.946 11.2027C111.097 11.5479 112.351 12.8055 112.351 14.9753C112.351 17.589 110.072 19.1671 105.616 19.1671C102.056 19.1671 99.3669 18.1562 97.7791 16.2329Z",
|
|
38
|
+
fill: "#F46152"
|
|
39
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
40
|
+
d: "M115.86 14.3096L113.504 16.2329C115.092 18.1562 117.781 19.1671 121.341 19.1671C125.797 19.1671 128.076 17.589 128.076 14.9753C128.076 12.8055 126.821 11.5479 123.671 11.2027L119.907 10.8329C118.728 10.7096 118.267 10.4137 118.267 9.82192C118.267 9.10685 119.061 8.7863 120.752 8.7863C123.057 8.7863 124.67 9.32877 125.976 10.463L128.025 8.4411C126.591 6.93699 124.081 6.09863 120.982 6.09863C116.68 6.09863 114.272 7.55342 114.272 10.0685C114.272 12.2384 115.758 13.4959 118.882 13.8658L122.288 14.1863C123.748 14.3342 124.132 14.6055 124.132 15.2959C124.132 16.0603 123.338 16.4301 121.546 16.4301C118.882 16.4301 117.064 15.6904 115.86 14.3096Z",
|
|
41
|
+
fill: "#F46152"
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _default = GympassLogo;
|
|
46
|
+
exports["default"] = _default;
|
package/cjs/Header/web/Header.js
CHANGED
|
@@ -11,9 +11,11 @@ var _propTypes = require("prop-types");
|
|
|
11
11
|
|
|
12
12
|
var _yogaHelpers = require("@gympass/yoga-helpers");
|
|
13
13
|
|
|
14
|
+
var _GympassLogo = _interopRequireDefault(require("./GympassLogo"));
|
|
15
|
+
|
|
14
16
|
var _Box = _interopRequireDefault(require("../../Box"));
|
|
15
17
|
|
|
16
|
-
var _templateObject, _templateObject2, _templateObject3
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
17
19
|
|
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
21
|
|
|
@@ -23,41 +25,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
23
25
|
|
|
24
26
|
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
25
27
|
|
|
26
|
-
var
|
|
27
|
-
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
28
|
-
d: "M14.814 6.64l3.384-1.911C17.045 1.757 14.162 0 10.302 0 3.935 0 0 4.057 0 9.974 0 16.434 5.214 20 10.177 20c4.562 0 7.545-2.196 8.823-4.031v-6.95H9.2v3.203h6.14l-.025 2.197S13.511 16.2 10.252 16.2c-3.51 0-5.515-2.454-5.515-6.33 0-3.902 2.006-6.357 5.465-6.357 2.055 0 3.584 1.266 4.612 3.127zM21.101 23.68v-3.132c.743.123 1.23.148 1.742.148 1.536 0 2.689-.518 3.201-1.554l.102-.37-6.095-12.304h4.84l3.074 7.546c.23.542.307.863.41 1.38h.076c.077-.443.18-.764.385-1.356l2.945-7.57h4.533l-5.788 12.896c-1.434 3.206-3.56 4.488-7.248 4.488-.563 0-1.46-.05-2.177-.172zM41.948 8.934V6.468h-4.251v12.33h4.38V12.41c0-1.997 1.024-3.156 2.74-3.156 1.639 0 2.458.986 2.458 3.008v6.534h4.38v-6.46c0-1.948 1.024-3.082 2.74-3.082 1.639 0 2.458.986 2.458 3.008v6.534h4.38V11.5c0-3.477-1.793-5.4-4.994-5.4-2.254 0-3.97.961-5.02 2.86-.768-1.923-2.28-2.86-4.533-2.86-2.28 0-3.867.937-4.738 2.835z",
|
|
29
|
-
fill: "#F46152"
|
|
30
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
31
|
-
fillRule: "evenodd",
|
|
32
|
-
clipRule: "evenodd",
|
|
33
|
-
d: "M67.943 8.54V6.468H63.69v17.137h4.38v-6.534c1.076 1.307 2.766 2.096 4.917 2.096 3.893 0 6.556-2.614 6.556-6.583 0-3.921-2.535-6.485-6.377-6.485-2.253 0-4.174.838-5.224 2.44zm3.585.394c2.203 0 3.483 1.332 3.483 3.65 0 2.317-1.331 3.747-3.508 3.747-2.126 0-3.534-1.356-3.534-3.427v-.518c0-2.194 1.408-3.452 3.56-3.452zM81.235 15.42c0-1.135.486-2.072 1.383-2.688.896-.592 2.177-.962 4.456-1.184l4.763-.42v-.37c0-1.38-.973-2.046-2.714-2.046-1.767 0-2.817.666-2.997 1.899h-4.482c.333-2.811 3.176-4.512 7.504-4.512 4.866 0 7.094 1.701 7.094 5.276v3.822c0 1.578.103 2.737.308 3.6h-4.328a12.846 12.846 0 0 1-.18-2.096c-.845 1.554-2.843 2.466-5.557 2.466-3.227 0-5.25-1.43-5.25-3.748zm10.705-1.505v-.789l-3.534.345c-1.947.222-2.69.715-2.69 1.677 0 .912.922 1.455 2.434 1.455 2.253 0 3.79-1.06 3.79-2.688z",
|
|
34
|
-
fill: "#F46152"
|
|
35
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
36
|
-
d: "M97.78 16.233l2.355-1.923c1.204 1.38 3.022 2.12 5.686 2.12 1.792 0 2.586-.37 2.586-1.134 0-.69-.384-.962-1.844-1.11l-3.406-.32c-3.124-.37-4.61-1.628-4.61-3.797 0-2.516 2.408-3.97 6.71-3.97 3.099 0 5.609.838 7.043 2.342l-2.049 2.022c-1.306-1.134-2.919-1.677-5.224-1.677-1.69 0-2.484.32-2.484 1.036 0 .592.461.888 1.639 1.01l3.764.37c3.151.346 4.405 1.604 4.405 3.773 0 2.614-2.279 4.192-6.735 4.192-3.56 0-6.25-1.01-7.837-2.934zM115.86 14.31l-2.356 1.923c1.588 1.923 4.277 2.934 7.837 2.934 4.456 0 6.735-1.578 6.735-4.192 0-2.17-1.255-3.427-4.405-3.772l-3.764-.37c-1.179-.123-1.64-.42-1.64-1.011 0-.715.794-1.036 2.485-1.036 2.305 0 3.918.543 5.224 1.677l2.049-2.022c-1.434-1.504-3.944-2.342-7.043-2.342-4.302 0-6.71 1.454-6.71 3.97 0 2.17 1.486 3.427 4.61 3.797l3.406.32c1.46.148 1.844.42 1.844 1.11 0 .764-.794 1.134-2.586 1.134-2.664 0-4.482-.74-5.686-2.12z",
|
|
37
|
-
fill: "#F46152"
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
Gympass.defaultProps = {
|
|
42
|
-
width: "129",
|
|
43
|
-
height: "24",
|
|
44
|
-
viewBox: "0 0 129 24",
|
|
45
|
-
fill: "none",
|
|
46
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
47
|
-
};
|
|
48
|
-
var GympassLogo = (0, _styledComponents["default"])(Gympass)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
28
|
+
var StyledHeader = (0, _styledComponents["default"])(_Box["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
49
29
|
var header = _ref.theme.yoga.components.header;
|
|
50
|
-
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n
|
|
51
|
-
});
|
|
52
|
-
var Heading = (0, _styledComponents["default"])(_Box["default"])(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
|
|
53
|
-
var header = _ref2.theme.yoga.components.header;
|
|
54
|
-
return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n\n ", "\n "])), header.padding.xxs, header.height.xxs, _yogaHelpers.media.lg(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n "])), header.padding.lg, header.height.lg));
|
|
30
|
+
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n\n ", "\n "])), header.padding.xxs, header.height.xxs, _yogaHelpers.media.lg(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n "])), header.padding.lg, header.height.lg));
|
|
55
31
|
});
|
|
56
32
|
|
|
57
|
-
var Header = function Header(
|
|
58
|
-
var link =
|
|
59
|
-
children =
|
|
60
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
33
|
+
var Header = function Header(_ref2) {
|
|
34
|
+
var link = _ref2.link,
|
|
35
|
+
children = _ref2.children;
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement(StyledHeader, {
|
|
61
37
|
as: "header",
|
|
62
38
|
d: "flex",
|
|
63
39
|
elevation: "medium",
|
|
@@ -66,7 +42,7 @@ var Header = function Header(_ref3) {
|
|
|
66
42
|
w: "100%"
|
|
67
43
|
}, link ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
68
44
|
href: link
|
|
69
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement(_GympassLogo["default"], null)) : /*#__PURE__*/_react["default"].createElement(_GympassLogo["default"], null), children);
|
|
70
46
|
};
|
|
71
47
|
|
|
72
48
|
Header.propTypes = {
|
|
@@ -34,15 +34,17 @@ var ProgressBar = _styledComponents["default"].progress(_templateObject || (_tem
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
var Label = _styledComponents["default"].label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
|
|
37
|
-
var
|
|
38
|
-
|
|
37
|
+
var _ref2$theme$yoga = _ref2.theme.yoga,
|
|
38
|
+
progress = _ref2$theme$yoga.components.progress,
|
|
39
|
+
text = _ref2$theme$yoga.colors.text;
|
|
40
|
+
return "\n color: " + text.secondary + ";\n font-size: " + progress.label.font.size + "px;\n letter-spacing: normal;\n";
|
|
39
41
|
});
|
|
40
42
|
|
|
41
43
|
var Wrapper = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n display: flex;\n\n width: 100%;\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function (_ref3) {
|
|
42
44
|
var isNumber = _ref3.isNumber,
|
|
43
45
|
align = _ref3.align,
|
|
44
46
|
spacing = _ref3.theme.yoga.spacing;
|
|
45
|
-
return "\n " + (isNumber ? "\n " + Label + " {\n width: 22px;\n\n margin-" + (align === 'right' ? 'left' : 'right') + ": " + spacing.xxsmall + "px;\n }\n\n " + ProgressBar + " {\n margin: auto;\n }\n " : "\n flex-direction: column;\n\n " + Label + " {\n max-width: 280px;\n\n margin-top: " + spacing.
|
|
47
|
+
return "\n " + (isNumber ? "\n " + Label + " {\n width: 22px;\n\n margin-" + (align === 'right' ? 'left' : 'right') + ": " + spacing.xxsmall + "px;\n }\n\n " + ProgressBar + " {\n margin: auto;\n }\n " : "\n flex-direction: column;\n\n " + Label + " {\n max-width: 280px;\n\n margin-top: " + spacing.xxsmall + "px;\n }\n ") + "\n\n " + (align === 'right' ? 'align-items: flex-end; text-align: right;' : 'align-items: flex-start;') + "\n " + (isNumber && align === 'left' ? 'flex-direction: row-reverse;' : '') + "\n ";
|
|
46
48
|
}, _yogaSystem.backgroundColor, _yogaSystem.borders, _yogaSystem.elevation, _yogaSystem.positions, _yogaSystem.display, _yogaSystem.spacing);
|
|
47
49
|
|
|
48
50
|
Wrapper.propTypes = {
|
|
@@ -23,7 +23,7 @@ var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
|
23
23
|
|
|
24
24
|
var _Text = _interopRequireDefault(require("../../Text"));
|
|
25
25
|
|
|
26
|
-
var _excluded = ["open", "duration", "variant", "hideIcon", "message", "actionLabel", "onAction", "onClose", "theme"];
|
|
26
|
+
var _excluded = ["open", "duration", "variant", "hideIcon", "message", "actionLabel", "onAction", "onClose", "hideCloseButton", "theme"];
|
|
27
27
|
|
|
28
28
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
29
29
|
|
|
@@ -61,6 +61,7 @@ var Snackbar = function Snackbar(_ref2) {
|
|
|
61
61
|
actionLabel = _ref2.actionLabel,
|
|
62
62
|
onAction = _ref2.onAction,
|
|
63
63
|
onClose = _ref2.onClose,
|
|
64
|
+
hideCloseButton = _ref2.hideCloseButton,
|
|
64
65
|
snackbar = _ref2.theme.yoga.components.snackbar,
|
|
65
66
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
66
67
|
|
|
@@ -100,14 +101,13 @@ var Snackbar = function Snackbar(_ref2) {
|
|
|
100
101
|
onClick: onAction,
|
|
101
102
|
secondary: true,
|
|
102
103
|
small: true
|
|
103
|
-
}, actionLabel), !
|
|
104
|
+
}, actionLabel), !hideCloseButton && onClose && /*#__PURE__*/_react["default"].createElement(IconButtonWrapper, {
|
|
104
105
|
role: "button",
|
|
105
106
|
onClick: onClose
|
|
106
107
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
107
108
|
as: _yogaIcons.Close,
|
|
108
109
|
fill: "secondary",
|
|
109
|
-
|
|
110
|
-
height: "large"
|
|
110
|
+
size: "medium"
|
|
111
111
|
}))));
|
|
112
112
|
};
|
|
113
113
|
|
|
@@ -115,7 +115,13 @@ Snackbar.propTypes = {
|
|
|
115
115
|
/** Controls the snackbar visibility. */
|
|
116
116
|
open: _propTypes.bool,
|
|
117
117
|
|
|
118
|
-
/**
|
|
118
|
+
/** The message shown when snackbar is opened. */
|
|
119
|
+
message: _propTypes.string.isRequired,
|
|
120
|
+
|
|
121
|
+
/** Function to close the snackbar. */
|
|
122
|
+
onClose: _propTypes.func.isRequired,
|
|
123
|
+
|
|
124
|
+
/** A number in milliseconds to close snackbar automaticaly. */
|
|
119
125
|
duration: _propTypes.number,
|
|
120
126
|
|
|
121
127
|
/** Label for a custom action. */
|
|
@@ -124,17 +130,14 @@ Snackbar.propTypes = {
|
|
|
124
130
|
/** Controls the snackbar icon visibility. */
|
|
125
131
|
hideIcon: _propTypes.bool,
|
|
126
132
|
|
|
127
|
-
/** The message shown when snackbar is opened. */
|
|
128
|
-
message: _propTypes.string.isRequired,
|
|
129
|
-
|
|
130
133
|
/** Function for the custom action. The `actionLabel` becomes required when passing this function. */
|
|
131
134
|
onAction: _propTypes.func,
|
|
132
135
|
|
|
133
|
-
/** Function to close the snackbar. */
|
|
134
|
-
onClose: _propTypes.func,
|
|
135
|
-
|
|
136
136
|
/** The style variant, it may be "success", "failure" or "info". */
|
|
137
|
-
variant: (0, _propTypes.oneOf)(['success', 'failure', 'info'])
|
|
137
|
+
variant: (0, _propTypes.oneOf)(['success', 'failure', 'info']),
|
|
138
|
+
|
|
139
|
+
/** Hides the close button. */
|
|
140
|
+
hideCloseButton: _propTypes.bool
|
|
138
141
|
};
|
|
139
142
|
Snackbar.defaultProps = {
|
|
140
143
|
open: false,
|
|
@@ -142,8 +145,8 @@ Snackbar.defaultProps = {
|
|
|
142
145
|
actionLabel: undefined,
|
|
143
146
|
hideIcon: false,
|
|
144
147
|
onAction: undefined,
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
variant: 'success',
|
|
149
|
+
hideCloseButton: false
|
|
147
150
|
};
|
|
148
151
|
|
|
149
152
|
var _default = /*#__PURE__*/(0, _react.memo)((0, _styledComponents.withTheme)(Snackbar));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var GympassLogo = function GympassLogo() {
|
|
4
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
5
|
+
width: "129",
|
|
6
|
+
height: "24",
|
|
7
|
+
viewBox: "0 0 129 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M14.814 6.64083L18.1979 4.72868C17.0449 1.75711 14.1623 0 10.3021 0C3.93536 0 0 4.05685 0 9.97416C0 16.4341 5.21372 20 10.1768 20C14.7388 20 17.7216 17.8036 19 15.969V9.01809H9.19921V12.2222H15.3404L15.3153 14.4186C15.3153 14.4186 13.5106 16.2015 10.252 16.2015C6.74274 16.2015 4.73747 13.7468 4.73747 9.8708C4.73747 5.96899 6.74274 3.51421 10.2018 3.51421C12.2573 3.51421 13.7863 4.78036 14.814 6.64083Z",
|
|
12
|
+
fill: "#F46152"
|
|
13
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
d: "M21.1013 23.6795V20.5479C21.844 20.6712 22.3306 20.6959 22.8428 20.6959C24.3794 20.6959 25.5319 20.1781 26.0441 19.1425L26.1465 18.7726L20.0512 6.46849H24.8916L27.9649 14.0137C28.1954 14.5562 28.2722 14.8767 28.3746 15.3945H28.4515C28.5283 14.9507 28.6307 14.6301 28.8356 14.0384L31.7808 6.46849H36.3139L30.5259 19.3644C29.0917 22.5699 26.9661 23.8521 23.2781 23.8521C22.7147 23.8521 21.8183 23.8027 21.1013 23.6795Z",
|
|
15
|
+
fill: "#F46152"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
d: "M41.9482 8.93425V6.46849H37.6968V18.7973H42.0762V12.411C42.0762 10.4137 43.1007 9.25479 44.8166 9.25479C46.4556 9.25479 47.2752 10.2411 47.2752 12.263V18.7973H51.6546V12.337C51.6546 10.389 52.679 9.25479 54.3949 9.25479C56.034 9.25479 56.8535 10.2411 56.8535 12.263V18.7973H61.2329V11.4986C61.2329 8.02192 59.4402 6.09863 56.2388 6.09863C53.9851 6.09863 52.2692 7.06027 51.2192 8.9589C50.4509 7.03562 48.9399 6.09863 46.6861 6.09863C44.4068 6.09863 42.8189 7.03562 41.9482 8.93425Z",
|
|
18
|
+
fill: "#F46152"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fillRule: "evenodd",
|
|
21
|
+
clipRule: "evenodd",
|
|
22
|
+
d: "M67.9428 8.53973V6.46849H63.6915V23.6055H68.0709V17.0712C69.1465 18.3781 70.8368 19.1671 72.9881 19.1671C76.8809 19.1671 79.5444 16.5534 79.5444 12.5836C79.5444 8.66301 77.009 6.09863 73.1674 6.09863C70.9137 6.09863 68.9929 6.93699 67.9428 8.53973ZM71.5283 8.93425C73.7308 8.93425 75.0113 10.2658 75.0113 12.5836C75.0113 14.9014 73.6796 16.3315 71.5027 16.3315C69.377 16.3315 67.9685 14.9753 67.9685 12.9041V12.3863C67.9685 10.1918 69.377 8.93425 71.5283 8.93425Z",
|
|
23
|
+
fill: "#F46152"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
fillRule: "evenodd",
|
|
26
|
+
clipRule: "evenodd",
|
|
27
|
+
d: "M81.2347 15.4192C81.2347 14.2849 81.7213 13.3479 82.6176 12.7315C83.514 12.1397 84.7945 11.7699 87.0739 11.5479L91.8374 11.1288V10.7589C91.8374 9.37808 90.8642 8.71233 89.1227 8.71233C87.3556 8.71233 86.3056 9.37808 86.1263 10.611H81.6444C81.9774 7.8 84.8201 6.09863 89.1483 6.09863C94.0143 6.09863 96.2424 7.8 96.2424 11.3753V15.1973C96.2424 16.7753 96.3449 17.9342 96.5498 18.7973H92.2216C92.1191 18.2055 92.0423 17.4411 92.0423 16.7014C91.1972 18.2548 89.1995 19.1671 86.4848 19.1671C83.2579 19.1671 81.2347 17.737 81.2347 15.4192ZM91.9399 13.9151V13.126L88.4056 13.4712C86.4592 13.6932 85.7165 14.1863 85.7165 15.1479C85.7165 16.0603 86.6385 16.6027 88.1495 16.6027C90.4032 16.6027 91.9399 15.5425 91.9399 13.9151Z",
|
|
28
|
+
fill: "#F46152"
|
|
29
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
30
|
+
d: "M97.7791 16.2329L100.135 14.3096C101.339 15.6904 103.157 16.4301 105.821 16.4301C107.613 16.4301 108.407 16.0603 108.407 15.2959C108.407 14.6055 108.023 14.3342 106.563 14.1863L103.157 13.8658C100.033 13.4959 98.5474 12.2384 98.5474 10.0685C98.5474 7.55342 100.955 6.09863 105.257 6.09863C108.356 6.09863 110.866 6.93699 112.3 8.4411L110.251 10.463C108.945 9.32877 107.332 8.7863 105.027 8.7863C103.337 8.7863 102.543 9.10685 102.543 9.82192C102.543 10.4137 103.004 10.7096 104.182 10.8329L107.946 11.2027C111.097 11.5479 112.351 12.8055 112.351 14.9753C112.351 17.589 110.072 19.1671 105.616 19.1671C102.056 19.1671 99.3669 18.1562 97.7791 16.2329Z",
|
|
31
|
+
fill: "#F46152"
|
|
32
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
33
|
+
d: "M115.86 14.3096L113.504 16.2329C115.092 18.1562 117.781 19.1671 121.341 19.1671C125.797 19.1671 128.076 17.589 128.076 14.9753C128.076 12.8055 126.821 11.5479 123.671 11.2027L119.907 10.8329C118.728 10.7096 118.267 10.4137 118.267 9.82192C118.267 9.10685 119.061 8.7863 120.752 8.7863C123.057 8.7863 124.67 9.32877 125.976 10.463L128.025 8.4411C126.591 6.93699 124.081 6.09863 120.982 6.09863C116.68 6.09863 114.272 7.55342 114.272 10.0685C114.272 12.2384 115.758 13.4959 118.882 13.8658L122.288 14.1863C123.748 14.3342 124.132 14.6055 124.132 15.2959C124.132 16.0603 123.338 16.4301 121.546 16.4301C118.882 16.4301 117.064 15.6904 115.86 14.3096Z",
|
|
34
|
+
fill: "#F46152"
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default GympassLogo;
|
package/esm/Header/web/Header.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
|
|
3
3
|
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
4
|
|
|
@@ -6,21 +6,17 @@ import React from 'react';
|
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
7
|
import { string, node } from 'prop-types';
|
|
8
8
|
import { media } from '@gympass/yoga-helpers';
|
|
9
|
-
import
|
|
9
|
+
import GympassLogo from './GympassLogo';
|
|
10
10
|
import Box from '../../Box';
|
|
11
|
-
var
|
|
11
|
+
var StyledHeader = styled(Box)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
12
12
|
var header = _ref.theme.yoga.components.header;
|
|
13
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n
|
|
14
|
-
});
|
|
15
|
-
var Heading = styled(Box)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
|
|
16
|
-
var header = _ref2.theme.yoga.components.header;
|
|
17
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n\n ", "\n "])), header.padding.xxs, header.height.xxs, media.lg(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n "])), header.padding.lg, header.height.lg));
|
|
13
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n\n ", "\n "])), header.padding.xxs, header.height.xxs, media.lg(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding: 0 ", "px;\n height: ", "px;\n "])), header.padding.lg, header.height.lg));
|
|
18
14
|
});
|
|
19
15
|
|
|
20
|
-
var Header = function Header(
|
|
21
|
-
var link =
|
|
22
|
-
children =
|
|
23
|
-
return /*#__PURE__*/React.createElement(
|
|
16
|
+
var Header = function Header(_ref2) {
|
|
17
|
+
var link = _ref2.link,
|
|
18
|
+
children = _ref2.children;
|
|
19
|
+
return /*#__PURE__*/React.createElement(StyledHeader, {
|
|
24
20
|
as: "header",
|
|
25
21
|
d: "flex",
|
|
26
22
|
elevation: "medium",
|
|
@@ -21,14 +21,16 @@ var ProgressBar = styled.progress(_templateObject || (_templateObject = _taggedT
|
|
|
21
21
|
return "\n height: " + progress.height + "px;\n\n &&,\n &::-webkit-progress-value,\n &[value]::-webkit-progress-bar,\n &:not(value)::-webkit-progress-bar {\n border-radius: " + progress.border.radius + "px;\n }\n\n &:not(value)::-moz-progress-bar,\n &[value]::-moz-progress-bar {\n border-radius: " + progress.border.radius + "px;\n }\n\n &:not(value)::-webkit-progress-bar {\n background-color: " + progress.backgroundColor.bar + ";\n }\n\n &::-webkit-progress-value {\n background-color: " + color + ";\n }\n\n &&,\n &:not(value)::-moz-progress-bar {\n background-color: " + progress.backgroundColor.bar + ";\n }\n\n &[value]::-moz-progress-bar {\n background-color: " + color + ";\n }\n";
|
|
22
22
|
});
|
|
23
23
|
var Label = styled.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
|
|
24
|
-
var
|
|
25
|
-
|
|
24
|
+
var _ref2$theme$yoga = _ref2.theme.yoga,
|
|
25
|
+
progress = _ref2$theme$yoga.components.progress,
|
|
26
|
+
text = _ref2$theme$yoga.colors.text;
|
|
27
|
+
return "\n color: " + text.secondary + ";\n font-size: " + progress.label.font.size + "px;\n letter-spacing: normal;\n";
|
|
26
28
|
});
|
|
27
29
|
var Wrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n display: flex;\n\n width: 100%;\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function (_ref3) {
|
|
28
30
|
var isNumber = _ref3.isNumber,
|
|
29
31
|
align = _ref3.align,
|
|
30
32
|
spacing = _ref3.theme.yoga.spacing;
|
|
31
|
-
return "\n " + (isNumber ? "\n " + Label + " {\n width: 22px;\n\n margin-" + (align === 'right' ? 'left' : 'right') + ": " + spacing.xxsmall + "px;\n }\n\n " + ProgressBar + " {\n margin: auto;\n }\n " : "\n flex-direction: column;\n\n " + Label + " {\n max-width: 280px;\n\n margin-top: " + spacing.
|
|
33
|
+
return "\n " + (isNumber ? "\n " + Label + " {\n width: 22px;\n\n margin-" + (align === 'right' ? 'left' : 'right') + ": " + spacing.xxsmall + "px;\n }\n\n " + ProgressBar + " {\n margin: auto;\n }\n " : "\n flex-direction: column;\n\n " + Label + " {\n max-width: 280px;\n\n margin-top: " + spacing.xxsmall + "px;\n }\n ") + "\n\n " + (align === 'right' ? 'align-items: flex-end; text-align: right;' : 'align-items: flex-start;') + "\n " + (isNumber && align === 'left' ? 'flex-direction: row-reverse;' : '') + "\n ";
|
|
32
34
|
}, backgroundColor, borders, elevation, positions, display, systemSpacing);
|
|
33
35
|
Wrapper.propTypes = {
|
|
34
36
|
align: oneOf(['left', 'right']),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["open", "duration", "variant", "hideIcon", "message", "actionLabel", "onAction", "onClose", "theme"];
|
|
1
|
+
var _excluded = ["open", "duration", "variant", "hideIcon", "message", "actionLabel", "onAction", "onClose", "hideCloseButton", "theme"];
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
4
4
|
|
|
@@ -37,6 +37,7 @@ var Snackbar = function Snackbar(_ref2) {
|
|
|
37
37
|
actionLabel = _ref2.actionLabel,
|
|
38
38
|
onAction = _ref2.onAction,
|
|
39
39
|
onClose = _ref2.onClose,
|
|
40
|
+
hideCloseButton = _ref2.hideCloseButton,
|
|
40
41
|
snackbar = _ref2.theme.yoga.components.snackbar,
|
|
41
42
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
42
43
|
|
|
@@ -76,14 +77,13 @@ var Snackbar = function Snackbar(_ref2) {
|
|
|
76
77
|
onClick: onAction,
|
|
77
78
|
secondary: true,
|
|
78
79
|
small: true
|
|
79
|
-
}, actionLabel), !
|
|
80
|
+
}, actionLabel), !hideCloseButton && onClose && /*#__PURE__*/React.createElement(IconButtonWrapper, {
|
|
80
81
|
role: "button",
|
|
81
82
|
onClick: onClose
|
|
82
83
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
83
84
|
as: Close,
|
|
84
85
|
fill: "secondary",
|
|
85
|
-
|
|
86
|
-
height: "large"
|
|
86
|
+
size: "medium"
|
|
87
87
|
}))));
|
|
88
88
|
};
|
|
89
89
|
|
|
@@ -91,7 +91,13 @@ Snackbar.propTypes = {
|
|
|
91
91
|
/** Controls the snackbar visibility. */
|
|
92
92
|
open: bool,
|
|
93
93
|
|
|
94
|
-
/**
|
|
94
|
+
/** The message shown when snackbar is opened. */
|
|
95
|
+
message: string.isRequired,
|
|
96
|
+
|
|
97
|
+
/** Function to close the snackbar. */
|
|
98
|
+
onClose: func.isRequired,
|
|
99
|
+
|
|
100
|
+
/** A number in milliseconds to close snackbar automaticaly. */
|
|
95
101
|
duration: number,
|
|
96
102
|
|
|
97
103
|
/** Label for a custom action. */
|
|
@@ -100,17 +106,14 @@ Snackbar.propTypes = {
|
|
|
100
106
|
/** Controls the snackbar icon visibility. */
|
|
101
107
|
hideIcon: bool,
|
|
102
108
|
|
|
103
|
-
/** The message shown when snackbar is opened. */
|
|
104
|
-
message: string.isRequired,
|
|
105
|
-
|
|
106
109
|
/** Function for the custom action. The `actionLabel` becomes required when passing this function. */
|
|
107
110
|
onAction: func,
|
|
108
111
|
|
|
109
|
-
/** Function to close the snackbar. */
|
|
110
|
-
onClose: func,
|
|
111
|
-
|
|
112
112
|
/** The style variant, it may be "success", "failure" or "info". */
|
|
113
|
-
variant: oneOf(['success', 'failure', 'info'])
|
|
113
|
+
variant: oneOf(['success', 'failure', 'info']),
|
|
114
|
+
|
|
115
|
+
/** Hides the close button. */
|
|
116
|
+
hideCloseButton: bool
|
|
114
117
|
};
|
|
115
118
|
Snackbar.defaultProps = {
|
|
116
119
|
open: false,
|
|
@@ -118,7 +121,7 @@ Snackbar.defaultProps = {
|
|
|
118
121
|
actionLabel: undefined,
|
|
119
122
|
hideIcon: false,
|
|
120
123
|
onAction: undefined,
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
variant: 'success',
|
|
125
|
+
hideCloseButton: false
|
|
123
126
|
};
|
|
124
127
|
export default /*#__PURE__*/memo(withTheme(Snackbar));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.26.
|
|
3
|
+
"version": "7.26.4",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@gympass/yoga-common": "^1.1.0",
|
|
29
29
|
"@gympass/yoga-helpers": "^1.0.1",
|
|
30
|
-
"@gympass/yoga-icons": "^1.
|
|
30
|
+
"@gympass/yoga-icons": "^1.4.0",
|
|
31
31
|
"@gympass/yoga-system": "^0.10.0",
|
|
32
32
|
"@gympass/yoga-tokens": "^3.1.1",
|
|
33
33
|
"@ptomasroos/react-native-multi-slider": "^1.0.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react": ">=16",
|
|
50
50
|
"styled-components": "^4.4.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "eeb9e217af0e65ea9668fa2662ff980de974e3f7",
|
|
53
53
|
"module": "./esm",
|
|
54
54
|
"private": false,
|
|
55
55
|
"react-native": "./cjs/index.native.js"
|