@gympass/yoga 7.52.0 → 7.53.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.
- package/cjs/Popover/Popover.theme.js +11 -0
- package/cjs/Popover/index.js +11 -0
- package/cjs/Popover/web/Popover.js +78 -0
- package/cjs/Popover/web/Popover.test.js +27 -0
- package/cjs/Popover/web/index.js +11 -0
- package/cjs/Popover/web/styles.js +69 -0
- package/cjs/Theme/theme/theme.js +3 -0
- package/cjs/index.js +4 -0
- package/esm/Popover/Popover.theme.js +5 -0
- package/esm/Popover/index.js +2 -0
- package/esm/Popover/web/Popover.js +65 -0
- package/esm/Popover/web/Popover.test.js +19 -0
- package/esm/Popover/web/index.js +2 -0
- package/esm/Popover/web/styles.js +54 -0
- package/esm/Theme/theme/theme.js +2 -0
- package/esm/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _web = _interopRequireDefault(require("./web"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
|
|
10
|
+
var _default = _web["default"];
|
|
11
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
|
|
10
|
+
var _yoga = require("@gympass/yoga");
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _excluded = ["children", "title", "description", "position", "width", "height"];
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
+
|
|
22
|
+
function Popover(_ref) {
|
|
23
|
+
var children = _ref.children,
|
|
24
|
+
title = _ref.title,
|
|
25
|
+
description = _ref.description,
|
|
26
|
+
position = _ref.position,
|
|
27
|
+
width = _ref.width,
|
|
28
|
+
height = _ref.height,
|
|
29
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
30
|
+
|
|
31
|
+
var _useState = (0, _react.useState)(false),
|
|
32
|
+
isPopoverOpen = _useState[0],
|
|
33
|
+
setIsPopoverOpen = _useState[1];
|
|
34
|
+
|
|
35
|
+
function handleShowPopover() {
|
|
36
|
+
setIsPopoverOpen(true);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function handleHidePopover() {
|
|
40
|
+
setIsPopoverOpen(false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_styles.Wrapper, props, isPopoverOpen && /*#__PURE__*/_react["default"].createElement(_styles.PopoverContainer, {
|
|
44
|
+
position: position,
|
|
45
|
+
width: width,
|
|
46
|
+
height: height,
|
|
47
|
+
role: "tooltip"
|
|
48
|
+
}, !!title && /*#__PURE__*/_react["default"].createElement(_yoga.Text.Small, {
|
|
49
|
+
mb: "xxxsmall",
|
|
50
|
+
fw: "medium",
|
|
51
|
+
color: "white"
|
|
52
|
+
}, title), /*#__PURE__*/_react["default"].createElement(_yoga.Text.Small, {
|
|
53
|
+
m: "zero",
|
|
54
|
+
color: "white"
|
|
55
|
+
}, description)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
|
+
onMouseEnter: handleShowPopover,
|
|
57
|
+
onMouseLeave: handleHidePopover
|
|
58
|
+
}, children));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Popover.propTypes = {
|
|
62
|
+
children: _propTypes.node.isRequired,
|
|
63
|
+
title: _propTypes.string,
|
|
64
|
+
description: _propTypes.string.isRequired,
|
|
65
|
+
|
|
66
|
+
/** Position of the popover relative to the children. Accepted values: bottom-[start|center|end], left-[start|center|end], top-[start|center|end] or right-[start|center|end] */
|
|
67
|
+
position: (0, _propTypes.oneOf)(['bottom-start', 'bottom-center', 'bottom-end', 'left-start', 'left-center', 'left-end', 'top-start', 'top-center', 'top-end', 'right-start', 'right-center', 'right-end']),
|
|
68
|
+
width: _propTypes.number,
|
|
69
|
+
height: _propTypes.number
|
|
70
|
+
};
|
|
71
|
+
Popover.defaultProps = {
|
|
72
|
+
title: undefined,
|
|
73
|
+
position: 'bottom-center',
|
|
74
|
+
width: 265,
|
|
75
|
+
height: 116
|
|
76
|
+
};
|
|
77
|
+
var _default = Popover;
|
|
78
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
var _yogaIcons = require("@gympass/yoga-icons");
|
|
8
|
+
|
|
9
|
+
var _ = require("../..");
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
|
|
13
|
+
describe('<Popover />', function () {
|
|
14
|
+
it('should match snapshot', function () {
|
|
15
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_.ThemeProvider, null, /*#__PURE__*/_react["default"].createElement(_.Popover, {
|
|
16
|
+
title: "Making wellbeing universal",
|
|
17
|
+
description: "Try moving to another spot. Your new favorite activity could be arround the corner.",
|
|
18
|
+
width: 265
|
|
19
|
+
}, /*#__PURE__*/_react["default"].createElement(_yogaIcons.Info, {
|
|
20
|
+
width: 26,
|
|
21
|
+
height: 26
|
|
22
|
+
})))),
|
|
23
|
+
container = _render.container;
|
|
24
|
+
|
|
25
|
+
expect(container).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _Popover = _interopRequireDefault(require("./Popover"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
|
|
10
|
+
var _default = _Popover["default"];
|
|
11
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Wrapper = exports.PopoverContainer = void 0;
|
|
5
|
+
|
|
6
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
7
|
+
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
9
|
+
|
|
10
|
+
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); }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
15
|
+
|
|
16
|
+
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Wrapper = Wrapper;
|
|
19
|
+
var popoverContainerPositionModifier = {
|
|
20
|
+
'bottom-start': function bottomStart() {
|
|
21
|
+
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n left: 0;\n transform: translate(0, 100%);\n "])));
|
|
22
|
+
},
|
|
23
|
+
'bottom-center': function bottomCenter() {
|
|
24
|
+
return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n left: 50%;\n transform: translate(-50%, 100%);\n "])));
|
|
25
|
+
},
|
|
26
|
+
'bottom-end': function bottomEnd() {
|
|
27
|
+
return (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n right: 0;\n transform: translate(0, 100%);\n "])));
|
|
28
|
+
},
|
|
29
|
+
'left-start': function leftStart() {
|
|
30
|
+
return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n left: -8px;\n top: 0;\n transform: translate(-100%, 0);\n "])));
|
|
31
|
+
},
|
|
32
|
+
'left-center': function leftCenter() {
|
|
33
|
+
return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n left: -8px;\n top: 50%;\n transform: translate(-100%, -50%);\n "])));
|
|
34
|
+
},
|
|
35
|
+
'left-end': function leftEnd() {
|
|
36
|
+
return (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n bottom: 0;\n left: -8px;\n transform: translate(-100%, 0);\n "])));
|
|
37
|
+
},
|
|
38
|
+
'top-start': function topStart() {
|
|
39
|
+
return (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n left: 0;\n top: -8px;\n transform: translate(0, -100%);\n "])));
|
|
40
|
+
},
|
|
41
|
+
'top-center': function topCenter() {
|
|
42
|
+
return (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n left: 50%;\n top: -8px;\n transform: translate(-50%, -100%);\n "])));
|
|
43
|
+
},
|
|
44
|
+
'top-end': function topEnd() {
|
|
45
|
+
return (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n right: 0;\n top: -8px;\n transform: translate(0, -100%);\n "])));
|
|
46
|
+
},
|
|
47
|
+
'right-start': function rightStart() {
|
|
48
|
+
return (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n right: -8px;\n top: 0;\n transform: translate(100%, 0);\n "])));
|
|
49
|
+
},
|
|
50
|
+
'right-center': function rightCenter() {
|
|
51
|
+
return (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n right: -8px;\n top: 50%;\n transform: translate(100%, -50%);\n "])));
|
|
52
|
+
},
|
|
53
|
+
'right-end': function rightEnd() {
|
|
54
|
+
return (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n bottom: 0;\n right: -8px;\n transform: translate(100%, 0);\n "])));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var PopoverContainer = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
59
|
+
var _ref$theme$yoga = _ref.theme.yoga,
|
|
60
|
+
colors = _ref$theme$yoga.colors,
|
|
61
|
+
spacing = _ref$theme$yoga.spacing,
|
|
62
|
+
radii = _ref$theme$yoga.radii,
|
|
63
|
+
position = _ref.position,
|
|
64
|
+
width = _ref.width,
|
|
65
|
+
height = _ref.height;
|
|
66
|
+
return (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n position: absolute;\n\n width: max-content;\n max-width: ", "px;\n height: max-content;\n max-height: ", "px;\n\n border-radius: ", "px;\n background-color: ", ";\n padding: ", "px;\n\n ", ";\n "])), width, height, radii.small, colors.stamina, spacing.small, popoverContainerPositionModifier[position]);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
exports.PopoverContainer = PopoverContainer;
|
package/cjs/Theme/theme/theme.js
CHANGED
|
@@ -53,6 +53,8 @@ var _ListTheme = _interopRequireDefault(require("./../../List/List.theme.js"));
|
|
|
53
53
|
|
|
54
54
|
var _MenuTheme = _interopRequireDefault(require("./../../Menu/Menu.theme.js"));
|
|
55
55
|
|
|
56
|
+
var _PopoverTheme = _interopRequireDefault(require("./../../Popover/Popover.theme.js"));
|
|
57
|
+
|
|
56
58
|
var _ProgressTheme = _interopRequireDefault(require("./../../Progress/Progress.theme.js"));
|
|
57
59
|
|
|
58
60
|
var _RadioGroupTheme = _interopRequireDefault(require("./../../RadioGroup/RadioGroup.theme.js"));
|
|
@@ -104,6 +106,7 @@ var componentThemes = {
|
|
|
104
106
|
Input$Input: _InputTheme["default"],
|
|
105
107
|
List$List: _ListTheme["default"],
|
|
106
108
|
Menu$Menu: _MenuTheme["default"],
|
|
109
|
+
Popover$Popover: _PopoverTheme["default"],
|
|
107
110
|
Progress$Progress: _ProgressTheme["default"],
|
|
108
111
|
RadioGroup$RadioGroup: _RadioGroupTheme["default"],
|
|
109
112
|
Rating$Rating: _RatingTheme["default"],
|
package/cjs/index.js
CHANGED
|
@@ -147,6 +147,10 @@ var _ActionRequirement = _interopRequireDefault(require("./ActionRequirement"));
|
|
|
147
147
|
|
|
148
148
|
exports.ActionRequirement = _ActionRequirement["default"];
|
|
149
149
|
|
|
150
|
+
var _Popover = _interopRequireDefault(require("./Popover"));
|
|
151
|
+
|
|
152
|
+
exports.Popover = _Popover["default"];
|
|
153
|
+
|
|
150
154
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
151
155
|
|
|
152
156
|
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); }
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var _excluded = ["children", "title", "description", "position", "width", "height"];
|
|
2
|
+
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { node, number, oneOf, string } from 'prop-types';
|
|
7
|
+
import { Text } from '@gympass/yoga';
|
|
8
|
+
import { PopoverContainer, Wrapper } from './styles';
|
|
9
|
+
|
|
10
|
+
function Popover(_ref) {
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
title = _ref.title,
|
|
13
|
+
description = _ref.description,
|
|
14
|
+
position = _ref.position,
|
|
15
|
+
width = _ref.width,
|
|
16
|
+
height = _ref.height,
|
|
17
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
|
+
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
isPopoverOpen = _useState[0],
|
|
21
|
+
setIsPopoverOpen = _useState[1];
|
|
22
|
+
|
|
23
|
+
function handleShowPopover() {
|
|
24
|
+
setIsPopoverOpen(true);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function handleHidePopover() {
|
|
28
|
+
setIsPopoverOpen(false);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return /*#__PURE__*/React.createElement(Wrapper, props, isPopoverOpen && /*#__PURE__*/React.createElement(PopoverContainer, {
|
|
32
|
+
position: position,
|
|
33
|
+
width: width,
|
|
34
|
+
height: height,
|
|
35
|
+
role: "tooltip"
|
|
36
|
+
}, !!title && /*#__PURE__*/React.createElement(Text.Small, {
|
|
37
|
+
mb: "xxxsmall",
|
|
38
|
+
fw: "medium",
|
|
39
|
+
color: "white"
|
|
40
|
+
}, title), /*#__PURE__*/React.createElement(Text.Small, {
|
|
41
|
+
m: "zero",
|
|
42
|
+
color: "white"
|
|
43
|
+
}, description)), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
onMouseEnter: handleShowPopover,
|
|
45
|
+
onMouseLeave: handleHidePopover
|
|
46
|
+
}, children));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Popover.propTypes = {
|
|
50
|
+
children: node.isRequired,
|
|
51
|
+
title: string,
|
|
52
|
+
description: string.isRequired,
|
|
53
|
+
|
|
54
|
+
/** Position of the popover relative to the children. Accepted values: bottom-[start|center|end], left-[start|center|end], top-[start|center|end] or right-[start|center|end] */
|
|
55
|
+
position: oneOf(['bottom-start', 'bottom-center', 'bottom-end', 'left-start', 'left-center', 'left-end', 'top-start', 'top-center', 'top-end', 'right-start', 'right-center', 'right-end']),
|
|
56
|
+
width: number,
|
|
57
|
+
height: number
|
|
58
|
+
};
|
|
59
|
+
Popover.defaultProps = {
|
|
60
|
+
title: undefined,
|
|
61
|
+
position: 'bottom-center',
|
|
62
|
+
width: 265,
|
|
63
|
+
height: 116
|
|
64
|
+
};
|
|
65
|
+
export default Popover;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Info } from '@gympass/yoga-icons';
|
|
4
|
+
import { ThemeProvider, Popover } from '../..';
|
|
5
|
+
describe('<Popover />', function () {
|
|
6
|
+
it('should match snapshot', function () {
|
|
7
|
+
var _render = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Popover, {
|
|
8
|
+
title: "Making wellbeing universal",
|
|
9
|
+
description: "Try moving to another spot. Your new favorite activity could be arround the corner.",
|
|
10
|
+
width: 265
|
|
11
|
+
}, /*#__PURE__*/React.createElement(Info, {
|
|
12
|
+
width: 26,
|
|
13
|
+
height: 26
|
|
14
|
+
})))),
|
|
15
|
+
container = _render.container;
|
|
16
|
+
|
|
17
|
+
expect(container).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
6
|
+
export var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
7
|
+
var popoverContainerPositionModifier = {
|
|
8
|
+
'bottom-start': function bottomStart() {
|
|
9
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n left: 0;\n transform: translate(0, 100%);\n "])));
|
|
10
|
+
},
|
|
11
|
+
'bottom-center': function bottomCenter() {
|
|
12
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n left: 50%;\n transform: translate(-50%, 100%);\n "])));
|
|
13
|
+
},
|
|
14
|
+
'bottom-end': function bottomEnd() {
|
|
15
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n bottom: -8px;\n right: 0;\n transform: translate(0, 100%);\n "])));
|
|
16
|
+
},
|
|
17
|
+
'left-start': function leftStart() {
|
|
18
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n left: -8px;\n top: 0;\n transform: translate(-100%, 0);\n "])));
|
|
19
|
+
},
|
|
20
|
+
'left-center': function leftCenter() {
|
|
21
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n left: -8px;\n top: 50%;\n transform: translate(-100%, -50%);\n "])));
|
|
22
|
+
},
|
|
23
|
+
'left-end': function leftEnd() {
|
|
24
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n bottom: 0;\n left: -8px;\n transform: translate(-100%, 0);\n "])));
|
|
25
|
+
},
|
|
26
|
+
'top-start': function topStart() {
|
|
27
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n left: 0;\n top: -8px;\n transform: translate(0, -100%);\n "])));
|
|
28
|
+
},
|
|
29
|
+
'top-center': function topCenter() {
|
|
30
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n left: 50%;\n top: -8px;\n transform: translate(-50%, -100%);\n "])));
|
|
31
|
+
},
|
|
32
|
+
'top-end': function topEnd() {
|
|
33
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n right: 0;\n top: -8px;\n transform: translate(0, -100%);\n "])));
|
|
34
|
+
},
|
|
35
|
+
'right-start': function rightStart() {
|
|
36
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n right: -8px;\n top: 0;\n transform: translate(100%, 0);\n "])));
|
|
37
|
+
},
|
|
38
|
+
'right-center': function rightCenter() {
|
|
39
|
+
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n right: -8px;\n top: 50%;\n transform: translate(100%, -50%);\n "])));
|
|
40
|
+
},
|
|
41
|
+
'right-end': function rightEnd() {
|
|
42
|
+
return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n bottom: 0;\n right: -8px;\n transform: translate(100%, 0);\n "])));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export var PopoverContainer = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
46
|
+
var _ref$theme$yoga = _ref.theme.yoga,
|
|
47
|
+
colors = _ref$theme$yoga.colors,
|
|
48
|
+
spacing = _ref$theme$yoga.spacing,
|
|
49
|
+
radii = _ref$theme$yoga.radii,
|
|
50
|
+
position = _ref.position,
|
|
51
|
+
width = _ref.width,
|
|
52
|
+
height = _ref.height;
|
|
53
|
+
return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n position: absolute;\n\n width: max-content;\n max-width: ", "px;\n height: max-content;\n max-height: ", "px;\n\n border-radius: ", "px;\n background-color: ", ";\n padding: ", "px;\n\n ", ";\n "])), width, height, radii.small, colors.stamina, spacing.small, popoverContainerPositionModifier[position]);
|
|
54
|
+
});
|
package/esm/Theme/theme/theme.js
CHANGED
|
@@ -26,6 +26,7 @@ import _componentThemes_Icon$Icon from "./../../Icon/Icon.theme.js";
|
|
|
26
26
|
import _componentThemes_Input$Input from "./../../Input/Input.theme.js";
|
|
27
27
|
import _componentThemes_List$List from "./../../List/List.theme.js";
|
|
28
28
|
import _componentThemes_Menu$Menu from "./../../Menu/Menu.theme.js";
|
|
29
|
+
import _componentThemes_Popover$Popover from "./../../Popover/Popover.theme.js";
|
|
29
30
|
import _componentThemes_Progress$Progress from "./../../Progress/Progress.theme.js";
|
|
30
31
|
import _componentThemes_RadioGroup$RadioGroup from "./../../RadioGroup/RadioGroup.theme.js";
|
|
31
32
|
import _componentThemes_Rating$Rating from "./../../Rating/Rating.theme.js";
|
|
@@ -62,6 +63,7 @@ var componentThemes = {
|
|
|
62
63
|
Input$Input: _componentThemes_Input$Input,
|
|
63
64
|
List$List: _componentThemes_List$List,
|
|
64
65
|
Menu$Menu: _componentThemes_Menu$Menu,
|
|
66
|
+
Popover$Popover: _componentThemes_Popover$Popover,
|
|
65
67
|
Progress$Progress: _componentThemes_Progress$Progress,
|
|
66
68
|
RadioGroup$RadioGroup: _componentThemes_RadioGroup$RadioGroup,
|
|
67
69
|
Rating$Rating: _componentThemes_Rating$Rating,
|
package/esm/index.js
CHANGED
|
@@ -32,4 +32,5 @@ import Datepicker from './Datepicker';
|
|
|
32
32
|
import Drawer from './Drawer';
|
|
33
33
|
import Skeleton from './Skeleton';
|
|
34
34
|
import ActionRequirement from './ActionRequirement';
|
|
35
|
-
|
|
35
|
+
import Popover from './Popover';
|
|
36
|
+
export { ThemeProvider, FontLoader, createTheme, yogaTheme, theme, Button, List, Checkbox, RadioGroup, Slider, Card, PlanCard, Stepper, Container, Row, Col, Hide, Text, Rating, EventCard, Tag, Input, Progress, Dropdown, TextArea, AutoComplete, Icon, Chips, Box, Snackbar, Avatar, BottomSheet, Dialog, Divider, Header, Menu, Banner, Heading, Feedback, Datepicker, Drawer, Skeleton, ActionRequirement, Popover };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.53.0",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react": ">=16",
|
|
53
53
|
"styled-components": "^4.4.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "545504e792fa70a3b8e3b73fa13213a08a1c5421",
|
|
56
56
|
"module": "./esm",
|
|
57
57
|
"private": false,
|
|
58
58
|
"react-native": "./cjs/index.native.js"
|