@gympass/yoga 7.69.1 → 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.
@@ -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) {
@@ -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.1",
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": "8fe50ffb42fb0dc3d3feb368869dd32446afe64c",
56
+ "gitHead": "ef314aea8ebfe8e77cf8f2b46acaa4a3001924f5",
57
57
  "module": "./esm",
58
58
  "private": false,
59
59
  "react-native": "./cjs/index.native.js"