@gympass/yoga 7.69.0 → 7.69.2

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.
@@ -15,7 +15,7 @@ var _Text = _interopRequireDefault(require("../../../Text"));
15
15
 
16
16
  var _excluded = ["children", "discount", "variant"];
17
17
 
18
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
18
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
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); }
21
21
 
@@ -56,8 +56,10 @@ var DiscountWrapper = (0, _styledComponents["default"])(_Box["default"]).attrs({
56
56
  })(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
57
57
  var bg = _ref2.bg,
58
58
  theme = _ref2.theme;
59
- var baseCurveStyle = (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n content: '';\n position: absolute;\n left: -", "px;\n height: ", "px;\n width: ", "px;\n "])), DISCOUNT_HEIGHT, DISCOUNT_HEIGHT, DISCOUNT_HEIGHT);
60
- return (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n min-height: ", "px;\n border-bottom-left-radius: 16px;\n\n ::before {\n ", "\n top: 0;\n background: ", ";\n }\n\n ::after {\n ", "\n top: ", "px;\n background: ", ";\n border-top-right-radius: ", "px;\n }\n "])), DISCOUNT_HEIGHT, baseCurveStyle, theme.yoga.colors[bg], baseCurveStyle, PLAN_LINE_HEIGHT, theme.yoga.colors.white, DISCOUNT_HEIGHT / 2 - PLAN_LINE_HEIGHT);
59
+ var _theme$yoga2 = theme.yoga,
60
+ spacing = _theme$yoga2.spacing,
61
+ colors = _theme$yoga2.colors;
62
+ return (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n min-height: ", "px;\n border-bottom-left-radius: ", "px;\n\n ::before {\n content: '';\n position: absolute;\n left: -", "px;\n height: ", "px;\n width: ", "px;\n top: ", "px;\n background: transparent;\n border-top-right-radius: ", "px;\n box-shadow: ", " ", "px -1px;\n }\n "])), DISCOUNT_HEIGHT, spacing.small, DISCOUNT_HEIGHT, DISCOUNT_HEIGHT / 2 - PLAN_LINE_HEIGHT, DISCOUNT_HEIGHT, PLAN_LINE_HEIGHT, spacing.small, colors[bg], spacing.xsmall);
61
63
  });
62
64
 
63
65
  function PlanCard(_ref3) {
@@ -36,7 +36,7 @@ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.s
36
36
  var StyledDialog = (0, _styledComponents["default"])(_.Card)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n flex-direction: column;\n"])), function (_ref) {
37
37
  var onClose = _ref.onClose,
38
38
  dialog = _ref.theme.yoga.components.dialog;
39
- return "\n padding: " + (onClose ? dialog.padding.withCloseButton : dialog.padding.top) + "px \n " + dialog.padding["default"] + "px \n " + dialog.padding["default"] + "px;\n\n width: " + dialog.width["default"] + "px;\n min-height: " + dialog.height.min + "px;\n border-radius: " + dialog.border.radius + "px;\n ";
39
+ return "\n padding: " + (onClose ? dialog.padding.withCloseButton : dialog.padding.top) + "px\n " + dialog.padding["default"] + "px\n " + dialog.padding["default"] + "px;\n\n width: " + dialog.width["default"] + "px;\n min-height: " + dialog.height.min + "px;\n border-radius: " + dialog.border.radius + "px;\n ";
40
40
  });
41
41
  exports.StyledDialog = StyledDialog;
42
42
 
@@ -63,14 +63,14 @@ function Dialog(_ref3) {
63
63
  }
64
64
 
65
65
  return true;
66
- }, [onClose]);
66
+ }, [onClose, isOpen]);
67
67
  var keyPress = (0, _react.useCallback)(function (e) {
68
68
  if (e.key === 'Escape' && isOpen && onClose) {
69
69
  onClose(e);
70
70
  }
71
71
 
72
72
  return true;
73
- }, [onClose]);
73
+ }, [onClose, isOpen]);
74
74
  (0, _react.useEffect)(function () {
75
75
  document.addEventListener('keydown', keyPress);
76
76
  return function () {
@@ -19,7 +19,7 @@ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.s
19
19
 
20
20
  var StyledDrawer = (0, _styledComponents["default"])(_Dialog["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n border-radius: 0!important;\n height: 100%;\n align-self: flex-end;\n position: absolute;\n right: 0;\n animation: content;\n animation-duration: 400ms;\n animation-fill-mode: forwards;\n transition: 0.25s ease-in-out;\n @keyframes content {\n 0% {\n transform: translate3d(100%, 0, 0);\n }\n }\n"])), function (_ref) {
21
21
  var drawer = _ref.theme.yoga.components.drawer;
22
- return "\n padding: " + drawer.padding.top + "px " + drawer.padding.right + "px " + drawer.padding.bottom + "px " + drawer.padding.left + "px;\n width: " + drawer.width["default"] + "px;\n ";
22
+ return "\n padding: " + drawer.padding.top + "px " + drawer.padding.right + "px " + drawer.padding.bottom + "px " + drawer.padding.left + "px;\n width: min(" + drawer.width["default"] + "px, 100%);\n ";
23
23
  });
24
24
 
25
25
  function Drawer(props) {
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "discount", "variant"];
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
4
4
 
5
5
  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; }
6
6
 
@@ -36,8 +36,10 @@ var DiscountWrapper = styled(Box).attrs({
36
36
  })(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
37
37
  var bg = _ref2.bg,
38
38
  theme = _ref2.theme;
39
- var baseCurveStyle = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n content: '';\n position: absolute;\n left: -", "px;\n height: ", "px;\n width: ", "px;\n "])), DISCOUNT_HEIGHT, DISCOUNT_HEIGHT, DISCOUNT_HEIGHT);
40
- return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n min-height: ", "px;\n border-bottom-left-radius: 16px;\n\n ::before {\n ", "\n top: 0;\n background: ", ";\n }\n\n ::after {\n ", "\n top: ", "px;\n background: ", ";\n border-top-right-radius: ", "px;\n }\n "])), DISCOUNT_HEIGHT, baseCurveStyle, theme.yoga.colors[bg], baseCurveStyle, PLAN_LINE_HEIGHT, theme.yoga.colors.white, DISCOUNT_HEIGHT / 2 - PLAN_LINE_HEIGHT);
39
+ var _theme$yoga2 = theme.yoga,
40
+ spacing = _theme$yoga2.spacing,
41
+ colors = _theme$yoga2.colors;
42
+ return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n min-height: ", "px;\n border-bottom-left-radius: ", "px;\n\n ::before {\n content: '';\n position: absolute;\n left: -", "px;\n height: ", "px;\n width: ", "px;\n top: ", "px;\n background: transparent;\n border-top-right-radius: ", "px;\n box-shadow: ", " ", "px -1px;\n }\n "])), DISCOUNT_HEIGHT, spacing.small, DISCOUNT_HEIGHT, DISCOUNT_HEIGHT / 2 - PLAN_LINE_HEIGHT, DISCOUNT_HEIGHT, PLAN_LINE_HEIGHT, spacing.small, colors[bg], spacing.xsmall);
41
43
  });
42
44
 
43
45
  function PlanCard(_ref3) {
@@ -18,7 +18,7 @@ import { Button, Card, Box } from '../..';
18
18
  export var StyledDialog = styled(Card)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n flex-direction: column;\n"])), function (_ref) {
19
19
  var onClose = _ref.onClose,
20
20
  dialog = _ref.theme.yoga.components.dialog;
21
- return "\n padding: " + (onClose ? dialog.padding.withCloseButton : dialog.padding.top) + "px \n " + dialog.padding["default"] + "px \n " + dialog.padding["default"] + "px;\n\n width: " + dialog.width["default"] + "px;\n min-height: " + dialog.height.min + "px;\n border-radius: " + dialog.border.radius + "px;\n ";
21
+ return "\n padding: " + (onClose ? dialog.padding.withCloseButton : dialog.padding.top) + "px\n " + dialog.padding["default"] + "px\n " + dialog.padding["default"] + "px;\n\n width: " + dialog.width["default"] + "px;\n min-height: " + dialog.height.min + "px;\n border-radius: " + dialog.border.radius + "px;\n ";
22
22
  });
23
23
  var Overlay = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
24
24
  var zIndex = _ref2.zIndex,
@@ -43,14 +43,14 @@ function Dialog(_ref3) {
43
43
  }
44
44
 
45
45
  return true;
46
- }, [onClose]);
46
+ }, [onClose, isOpen]);
47
47
  var keyPress = useCallback(function (e) {
48
48
  if (e.key === 'Escape' && isOpen && onClose) {
49
49
  onClose(e);
50
50
  }
51
51
 
52
52
  return true;
53
- }, [onClose]);
53
+ }, [onClose, isOpen]);
54
54
  useEffect(function () {
55
55
  document.addEventListener('keydown', keyPress);
56
56
  return function () {
@@ -8,7 +8,7 @@ import { node, number } from 'prop-types';
8
8
  import Dialog from '../../Dialog';
9
9
  var StyledDrawer = styled(Dialog)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n border-radius: 0!important;\n height: 100%;\n align-self: flex-end;\n position: absolute;\n right: 0;\n animation: content;\n animation-duration: 400ms;\n animation-fill-mode: forwards;\n transition: 0.25s ease-in-out;\n @keyframes content {\n 0% {\n transform: translate3d(100%, 0, 0);\n }\n }\n"])), function (_ref) {
10
10
  var drawer = _ref.theme.yoga.components.drawer;
11
- return "\n padding: " + drawer.padding.top + "px " + drawer.padding.right + "px " + drawer.padding.bottom + "px " + drawer.padding.left + "px;\n width: " + drawer.width["default"] + "px;\n ";
11
+ return "\n padding: " + drawer.padding.top + "px " + drawer.padding.right + "px " + drawer.padding.bottom + "px " + drawer.padding.left + "px;\n width: min(" + drawer.width["default"] + "px, 100%);\n ";
12
12
  });
13
13
 
14
14
  function Drawer(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.69.0",
3
+ "version": "7.69.2",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "sideEffects": false,
@@ -53,7 +53,7 @@
53
53
  "react": ">=16",
54
54
  "styled-components": "^4.4.0"
55
55
  },
56
- "gitHead": "1d8db51bc5a623a28d7f0dadc1a0d54c3e109bcb",
56
+ "gitHead": "ef314aea8ebfe8e77cf8f2b46acaa4a3001924f5",
57
57
  "module": "./esm",
58
58
  "private": false,
59
59
  "react-native": "./cjs/index.native.js"