@gympass/yoga 7.40.0 → 7.40.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/cjs/Heading/web/BackButton.js +1 -0
- package/cjs/Heading/web/Heading.js +9 -3
- package/cjs/Heading/web/RightButton.js +1 -0
- package/cjs/Heading/web/Title.js +1 -0
- package/esm/Heading/web/BackButton.js +1 -0
- package/esm/Heading/web/Heading.js +6 -3
- package/esm/Heading/web/RightButton.js +1 -0
- package/esm/Heading/web/Title.js +1 -0
- package/package.json +2 -2
|
@@ -11,6 +11,12 @@ var _StyledHeading = _interopRequireWildcard(require("./StyledHeading"));
|
|
|
11
11
|
|
|
12
12
|
var _Box = _interopRequireDefault(require("../../Box"));
|
|
13
13
|
|
|
14
|
+
var _Title = _interopRequireDefault(require("./Title"));
|
|
15
|
+
|
|
16
|
+
var _BackButton = _interopRequireDefault(require("./BackButton"));
|
|
17
|
+
|
|
18
|
+
var _RightButton = _interopRequireDefault(require("./RightButton"));
|
|
19
|
+
|
|
14
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); }
|
|
15
21
|
|
|
16
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -25,9 +31,9 @@ var Heading = function Heading(_ref) {
|
|
|
25
31
|
if (!children) throw new Error('Heading needs at least one child');
|
|
26
32
|
|
|
27
33
|
var defineComponent = function defineComponent(child) {
|
|
28
|
-
if (child.type.
|
|
29
|
-
if (child.type.
|
|
30
|
-
if (child.type.
|
|
34
|
+
if (child.type.displayName === _Title["default"].displayName) title = child;
|
|
35
|
+
if (child.type.displayName === _BackButton["default"].displayName) backButton = child;
|
|
36
|
+
if (child.type.displayName === _RightButton["default"].displayName) rightButtons.push(child);
|
|
31
37
|
};
|
|
32
38
|
|
|
33
39
|
if (Array.isArray(children)) {
|
package/cjs/Heading/web/Title.js
CHANGED
|
@@ -2,6 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import StyledHeading, { Button } from './StyledHeading';
|
|
4
4
|
import Box from '../../Box';
|
|
5
|
+
import Title from './Title';
|
|
6
|
+
import BackButton from './BackButton';
|
|
7
|
+
import RightButton from './RightButton';
|
|
5
8
|
|
|
6
9
|
var Heading = function Heading(_ref) {
|
|
7
10
|
var children = _ref.children;
|
|
@@ -11,9 +14,9 @@ var Heading = function Heading(_ref) {
|
|
|
11
14
|
if (!children) throw new Error('Heading needs at least one child');
|
|
12
15
|
|
|
13
16
|
var defineComponent = function defineComponent(child) {
|
|
14
|
-
if (child.type.
|
|
15
|
-
if (child.type.
|
|
16
|
-
if (child.type.
|
|
17
|
+
if (child.type.displayName === Title.displayName) title = child;
|
|
18
|
+
if (child.type.displayName === BackButton.displayName) backButton = child;
|
|
19
|
+
if (child.type.displayName === RightButton.displayName) rightButtons.push(child);
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
if (Array.isArray(children)) {
|
package/esm/Heading/web/Title.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.40.
|
|
3
|
+
"version": "7.40.1",
|
|
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": "69180fcb15f0df3be0b74720c4324c681b56ae15",
|
|
53
53
|
"module": "./esm",
|
|
54
54
|
"private": false,
|
|
55
55
|
"react-native": "./cjs/index.native.js"
|