@gympass/yoga 7.34.0 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -187,7 +187,7 @@ var Checkbox = function Checkbox(_ref8) {
|
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
Checkbox.propTypes = {
|
|
190
|
-
label: _propTypes.string,
|
|
190
|
+
label: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.node]),
|
|
191
191
|
|
|
192
192
|
/** short helper text under checkbox */
|
|
193
193
|
helper: _propTypes.string,
|
package/cjs/Header/web/Header.js
CHANGED
|
@@ -11,10 +11,10 @@ var _propTypes = require("prop-types");
|
|
|
11
11
|
|
|
12
12
|
var _yogaHelpers = require("@gympass/yoga-helpers");
|
|
13
13
|
|
|
14
|
-
var _GympassLogo = _interopRequireDefault(require("./GympassLogo"));
|
|
15
|
-
|
|
16
14
|
var _Box = _interopRequireDefault(require("../../Box"));
|
|
17
15
|
|
|
16
|
+
var _Logo = _interopRequireDefault(require("./Logo"));
|
|
17
|
+
|
|
18
18
|
var _templateObject, _templateObject2, _templateObject3;
|
|
19
19
|
|
|
20
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); }
|
|
@@ -32,7 +32,8 @@ var StyledHeader = (0, _styledComponents["default"])(_Box["default"])(_templateO
|
|
|
32
32
|
|
|
33
33
|
var Header = function Header(_ref2) {
|
|
34
34
|
var link = _ref2.link,
|
|
35
|
-
children = _ref2.children
|
|
35
|
+
children = _ref2.children,
|
|
36
|
+
logo = _ref2.logo;
|
|
36
37
|
return /*#__PURE__*/_react["default"].createElement(StyledHeader, {
|
|
37
38
|
as: "header",
|
|
38
39
|
d: "flex",
|
|
@@ -42,7 +43,11 @@ var Header = function Header(_ref2) {
|
|
|
42
43
|
w: "100%"
|
|
43
44
|
}, link ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
44
45
|
href: link
|
|
45
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_Logo["default"], {
|
|
47
|
+
customLogo: logo
|
|
48
|
+
})) : /*#__PURE__*/_react["default"].createElement(_Logo["default"], {
|
|
49
|
+
customLogo: logo
|
|
50
|
+
}), children);
|
|
46
51
|
};
|
|
47
52
|
|
|
48
53
|
Header.propTypes = {
|
|
@@ -50,11 +55,15 @@ Header.propTypes = {
|
|
|
50
55
|
link: _propTypes.string,
|
|
51
56
|
|
|
52
57
|
/** Use children to add whatever you want inside the header */
|
|
53
|
-
children: _propTypes.node
|
|
58
|
+
children: _propTypes.node,
|
|
59
|
+
|
|
60
|
+
/** Use logo to change headers image */
|
|
61
|
+
logo: _propTypes.elementType
|
|
54
62
|
};
|
|
55
63
|
Header.defaultProps = {
|
|
56
64
|
link: null,
|
|
57
|
-
children: null
|
|
65
|
+
children: null,
|
|
66
|
+
logo: null
|
|
58
67
|
};
|
|
59
68
|
var _default = Header;
|
|
60
69
|
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
|
|
10
|
+
var _GympassLogo = _interopRequireDefault(require("./GympassLogo"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var Logo = function Logo(_ref) {
|
|
15
|
+
var CustomLogo = _ref.customLogo;
|
|
16
|
+
return CustomLogo ? /*#__PURE__*/_react["default"].createElement(CustomLogo, null) : /*#__PURE__*/_react["default"].createElement(_GympassLogo["default"], null);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
Logo.propTypes = {
|
|
20
|
+
customLogo: _propTypes.elementType
|
|
21
|
+
};
|
|
22
|
+
Logo.defaultProps = {
|
|
23
|
+
customLogo: null
|
|
24
|
+
};
|
|
25
|
+
var _default = Logo;
|
|
26
|
+
exports["default"] = _default;
|
|
@@ -9,7 +9,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
9
9
|
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
10
10
|
|
|
11
11
|
import React, { useEffect, useRef } from 'react';
|
|
12
|
-
import { bool, string, shape } from 'prop-types';
|
|
12
|
+
import { bool, string, shape, oneOfType, node } from 'prop-types';
|
|
13
13
|
import styled, { withTheme } from 'styled-components';
|
|
14
14
|
import { hexToRgb } from '@gympass/yoga-common';
|
|
15
15
|
import { Check, Rectangle } from '@gympass/yoga-icons';
|
|
@@ -165,7 +165,7 @@ var Checkbox = function Checkbox(_ref8) {
|
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
Checkbox.propTypes = {
|
|
168
|
-
label: string,
|
|
168
|
+
label: oneOfType([string, node]),
|
|
169
169
|
|
|
170
170
|
/** short helper text under checkbox */
|
|
171
171
|
helper: string,
|
package/esm/Header/web/Header.js
CHANGED
|
@@ -4,10 +4,10 @@ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.s
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
|
-
import { string, node } from 'prop-types';
|
|
7
|
+
import { string, node, elementType } from 'prop-types';
|
|
8
8
|
import { media } from '@gympass/yoga-helpers';
|
|
9
|
-
import GympassLogo from './GympassLogo';
|
|
10
9
|
import Box from '../../Box';
|
|
10
|
+
import Logo from './Logo';
|
|
11
11
|
var StyledHeader = styled(Box)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
12
12
|
var header = _ref.theme.yoga.components.header;
|
|
13
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));
|
|
@@ -15,7 +15,8 @@ var StyledHeader = styled(Box)(_templateObject || (_templateObject = _taggedTemp
|
|
|
15
15
|
|
|
16
16
|
var Header = function Header(_ref2) {
|
|
17
17
|
var link = _ref2.link,
|
|
18
|
-
children = _ref2.children
|
|
18
|
+
children = _ref2.children,
|
|
19
|
+
logo = _ref2.logo;
|
|
19
20
|
return /*#__PURE__*/React.createElement(StyledHeader, {
|
|
20
21
|
as: "header",
|
|
21
22
|
d: "flex",
|
|
@@ -25,7 +26,11 @@ var Header = function Header(_ref2) {
|
|
|
25
26
|
w: "100%"
|
|
26
27
|
}, link ? /*#__PURE__*/React.createElement("a", {
|
|
27
28
|
href: link
|
|
28
|
-
}, /*#__PURE__*/React.createElement(
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Logo, {
|
|
30
|
+
customLogo: logo
|
|
31
|
+
})) : /*#__PURE__*/React.createElement(Logo, {
|
|
32
|
+
customLogo: logo
|
|
33
|
+
}), children);
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
Header.propTypes = {
|
|
@@ -33,10 +38,14 @@ Header.propTypes = {
|
|
|
33
38
|
link: string,
|
|
34
39
|
|
|
35
40
|
/** Use children to add whatever you want inside the header */
|
|
36
|
-
children: node
|
|
41
|
+
children: node,
|
|
42
|
+
|
|
43
|
+
/** Use logo to change headers image */
|
|
44
|
+
logo: elementType
|
|
37
45
|
};
|
|
38
46
|
Header.defaultProps = {
|
|
39
47
|
link: null,
|
|
40
|
-
children: null
|
|
48
|
+
children: null,
|
|
49
|
+
logo: null
|
|
41
50
|
};
|
|
42
51
|
export default Header;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { elementType } from 'prop-types';
|
|
3
|
+
import GympassLogo from './GympassLogo';
|
|
4
|
+
|
|
5
|
+
var Logo = function Logo(_ref) {
|
|
6
|
+
var CustomLogo = _ref.customLogo;
|
|
7
|
+
return CustomLogo ? /*#__PURE__*/React.createElement(CustomLogo, null) : /*#__PURE__*/React.createElement(GympassLogo, null);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
Logo.propTypes = {
|
|
11
|
+
customLogo: elementType
|
|
12
|
+
};
|
|
13
|
+
Logo.defaultProps = {
|
|
14
|
+
customLogo: null
|
|
15
|
+
};
|
|
16
|
+
export default Logo;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react": ">=16",
|
|
50
50
|
"styled-components": "^4.4.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "afe6f5fbbeefda7ddff325c0105ebab573135cb0",
|
|
53
53
|
"module": "./esm",
|
|
54
54
|
"private": false,
|
|
55
55
|
"react-native": "./cjs/index.native.js"
|