@gympass/yoga 7.83.1 → 7.84.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.
@@ -27,7 +27,7 @@ var Title = (0, _styledComponents["default"])(_Text["default"].H4).attrs({
27
27
  as: 'p'
28
28
  })(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
29
29
  var fontSizes = _ref.theme.yoga.fontSizes;
30
- return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-bottom: 6px;\n @media (min-width: 769px) {\n max-width: 700px;\n font-size: ", "px;\n line-height: ", "px;\n }\n "])), fontSizes.huge, fontSizes.huge);
30
+ return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-bottom: 6px;\n\n @media (min-width: 769px) {\n max-width: 700px;\n font-size: ", "px;\n line-height: ", "px;\n }\n "])), fontSizes.huge, fontSizes.huge);
31
31
  });
32
32
  exports.Title = Title;
33
33
  var Actions = (0, _styledComponents["default"])(_Box["default"])(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
@@ -9,7 +9,7 @@ var _propTypes = require("prop-types");
9
9
 
10
10
  var _StyledButton = _interopRequireDefault(require("./StyledButton"));
11
11
 
12
- var _excluded = ["children", "onClick", "full", "disabled", "inverted", "small", "secondary", "icon"];
12
+ var _excluded = ["ariaLabel", "children", "onClick", "full", "disabled", "inverted", "small", "secondary", "icon"];
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
@@ -23,7 +23,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
23
23
 
24
24
  /** Buttons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them. */
25
25
  var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
- var children = _ref.children,
26
+ var ariaLabel = _ref.ariaLabel,
27
+ children = _ref.children,
27
28
  onClick = _ref.onClick,
28
29
  full = _ref.full,
29
30
  disabled = _ref.disabled,
@@ -42,6 +43,8 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
42
43
  return /*#__PURE__*/_react["default"].createElement(_StyledButton["default"], _extends({
43
44
  ref: ref,
44
45
  disabled: disabled,
46
+ "aria-disabled": disabled,
47
+ "aria-label": ariaLabel,
45
48
  full: full,
46
49
  inverted: inverted,
47
50
  onClick: onClick,
@@ -50,6 +53,7 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
50
53
  }, finalProps), Icon && /*#__PURE__*/_react["default"].createElement(Icon, null), children);
51
54
  });
52
55
  Button.propTypes = {
56
+ ariaLabel: _propTypes.string,
53
57
  children: _propTypes.node,
54
58
  disabled: _propTypes.bool,
55
59
  full: _propTypes.bool,
@@ -63,8 +67,9 @@ Button.propTypes = {
63
67
  href: _propTypes.string
64
68
  };
65
69
  Button.defaultProps = {
70
+ ariaLabel: undefined,
66
71
  children: 'Button',
67
- disabled: false,
72
+ disabled: undefined,
68
73
  full: false,
69
74
  inverted: false,
70
75
  onClick: function onClick() {},
@@ -13,7 +13,7 @@ var _StyledButton = _interopRequireDefault(require("./StyledButton"));
13
13
 
14
14
  var _Icon = _interopRequireDefault(require("../../Icon"));
15
15
 
16
- var _excluded = ["icon", "theme", "small"];
16
+ var _excluded = ["icon", "theme", "small", "disabled", "ariaLabel"];
17
17
 
18
18
  var _templateObject;
19
19
 
@@ -38,11 +38,16 @@ var ButtonIcon = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
38
38
  var icon = _ref2.icon,
39
39
  button = _ref2.theme.yoga.components.button,
40
40
  small = _ref2.small,
41
+ disabled = _ref2.disabled,
42
+ ariaLabel = _ref2.ariaLabel,
41
43
  props = _objectWithoutPropertiesLoose(_ref2, _excluded);
42
44
 
43
45
  return /*#__PURE__*/_react["default"].createElement(IconStyled, _extends({}, props, {
44
46
  ref: ref,
45
- small: small
47
+ small: small,
48
+ disabled: disabled,
49
+ "aria-disabled": disabled,
50
+ "aria-label": ariaLabel
46
51
  }), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
47
52
  as: icon,
48
53
  size: small ? button.icon.size.small : button.icon.size["default"]
@@ -53,14 +58,16 @@ ButtonIcon.propTypes = {
53
58
  disabled: _propTypes.bool,
54
59
  secondary: _propTypes.bool,
55
60
  inverted: _propTypes.bool,
56
- icon: (0, _propTypes.oneOfType)([_propTypes.node, _propTypes.func])
61
+ icon: (0, _propTypes.oneOfType)([_propTypes.node, _propTypes.func]),
62
+ ariaLabel: _propTypes.string
57
63
  };
58
64
  ButtonIcon.defaultProps = {
59
65
  small: false,
60
- disabled: false,
66
+ disabled: undefined,
61
67
  secondary: false,
62
68
  inverted: false,
63
- icon: undefined
69
+ icon: undefined,
70
+ ariaLabel: undefined
64
71
  };
65
72
  ButtonIcon.displayName = 'Button.Icon';
66
73
 
@@ -13,10 +13,16 @@ var _yogaCommon = require("@gympass/yoga-common");
13
13
 
14
14
  var _Button = _interopRequireDefault(require("./Button"));
15
15
 
16
+ var _excluded = ["disabled"];
17
+
16
18
  var _templateObject;
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
+
24
+ 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; }
25
+
20
26
  function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
21
27
 
22
28
  var Link = (0, _styledComponents["default"])(_Button["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
@@ -27,8 +33,14 @@ var Link = (0, _styledComponents["default"])(_Button["default"])(_templateObject
27
33
  return "\n height: unset;\n padding: 0;\n background-color: unset;\n border: none;\n border-radius: 0;\n color: " + button.types.link.font[state].color + ";\n\n svg {\n margin-right: " + button.types.link.icon.margin.right + "px;\n fill: " + button.types.link.font[state].color + ";\n }\n\n &:disabled,\n &:not([disabled]):hover,\n &:not([disabled]):focus,\n &:not([disabled]):active {\n box-shadow: unset;\n background-color: unset;\n }\n\n &:not([disabled]):hover {\n color: " + (0, _yogaCommon.hexToRgb)(button.types.link.font[state].color, 0.5) + ";\n\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(button.types.link.font[state].color, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(button.types.link.font[state].color, 0.75) + ";\n\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(button.types.link.font[state].color, 0.75) + ";\n }\n }\n\n &:disabled {\n color: " + button.types.link.font.disabled.color + ";\n\n svg {\n fill: " + button.types.link.font.disabled.color + ";\n }\n }\n\n " + (full ? 'width: 100%' : '') + "\n ";
28
34
  });
29
35
 
30
- var ButtonLink = function ButtonLink(props) {
31
- return /*#__PURE__*/_react["default"].createElement(Link, props);
36
+ var ButtonLink = function ButtonLink(_ref2) {
37
+ var disabled = _ref2.disabled,
38
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded);
39
+
40
+ return /*#__PURE__*/_react["default"].createElement(Link, _extends({}, props, {
41
+ disabled: disabled,
42
+ "aria-disabled": disabled
43
+ }));
32
44
  };
33
45
 
34
46
  ButtonLink.propTypes = {
@@ -40,7 +52,7 @@ ButtonLink.propTypes = {
40
52
  icon: (0, _propTypes.oneOfType)([_propTypes.node, _propTypes.func])
41
53
  };
42
54
  ButtonLink.defaultProps = {
43
- disabled: false,
55
+ disabled: undefined,
44
56
  secondary: false,
45
57
  href: undefined,
46
58
  icon: undefined
@@ -11,7 +11,7 @@ export var Title = styled(Text.H4).attrs({
11
11
  as: 'p'
12
12
  })(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
13
13
  var fontSizes = _ref.theme.yoga.fontSizes;
14
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-bottom: 6px;\n @media (min-width: 769px) {\n max-width: 700px;\n font-size: ", "px;\n line-height: ", "px;\n }\n "])), fontSizes.huge, fontSizes.huge);
14
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-bottom: 6px;\n\n @media (min-width: 769px) {\n max-width: 700px;\n font-size: ", "px;\n line-height: ", "px;\n }\n "])), fontSizes.huge, fontSizes.huge);
15
15
  });
16
16
  export var Actions = styled(Box)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
17
17
  var spacing = _ref2.theme.yoga.spacing;
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "onClick", "full", "disabled", "inverted", "small", "secondary", "icon"];
1
+ var _excluded = ["ariaLabel", "children", "onClick", "full", "disabled", "inverted", "small", "secondary", "icon"];
2
2
 
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -10,7 +10,8 @@ import StyledButton from './StyledButton';
10
10
  /** Buttons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them. */
11
11
 
12
12
  var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
- var children = _ref.children,
13
+ var ariaLabel = _ref.ariaLabel,
14
+ children = _ref.children,
14
15
  onClick = _ref.onClick,
15
16
  full = _ref.full,
16
17
  disabled = _ref.disabled,
@@ -29,6 +30,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
30
  return /*#__PURE__*/React.createElement(StyledButton, _extends({
30
31
  ref: ref,
31
32
  disabled: disabled,
33
+ "aria-disabled": disabled,
34
+ "aria-label": ariaLabel,
32
35
  full: full,
33
36
  inverted: inverted,
34
37
  onClick: onClick,
@@ -37,6 +40,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
37
40
  }, finalProps), Icon && /*#__PURE__*/React.createElement(Icon, null), children);
38
41
  });
39
42
  Button.propTypes = {
43
+ ariaLabel: string,
40
44
  children: node,
41
45
  disabled: bool,
42
46
  full: bool,
@@ -50,8 +54,9 @@ Button.propTypes = {
50
54
  href: string
51
55
  };
52
56
  Button.defaultProps = {
57
+ ariaLabel: undefined,
53
58
  children: 'Button',
54
- disabled: false,
59
+ disabled: undefined,
55
60
  full: false,
56
61
  inverted: false,
57
62
  onClick: function onClick() {},
@@ -1,4 +1,4 @@
1
- var _excluded = ["icon", "theme", "small"];
1
+ var _excluded = ["icon", "theme", "small", "disabled", "ariaLabel"];
2
2
 
3
3
  var _templateObject;
4
4
 
@@ -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, { forwardRef } from 'react';
12
- import { oneOfType, func, node, bool } from 'prop-types';
12
+ import { oneOfType, func, node, bool, string } from 'prop-types';
13
13
  import styled, { withTheme } from 'styled-components';
14
14
  import StyledButton from './StyledButton';
15
15
  import Icon from '../../Icon';
@@ -22,11 +22,16 @@ var ButtonIcon = /*#__PURE__*/forwardRef(function (_ref2, ref) {
22
22
  var icon = _ref2.icon,
23
23
  button = _ref2.theme.yoga.components.button,
24
24
  small = _ref2.small,
25
+ disabled = _ref2.disabled,
26
+ ariaLabel = _ref2.ariaLabel,
25
27
  props = _objectWithoutPropertiesLoose(_ref2, _excluded);
26
28
 
27
29
  return /*#__PURE__*/React.createElement(IconStyled, _extends({}, props, {
28
30
  ref: ref,
29
- small: small
31
+ small: small,
32
+ disabled: disabled,
33
+ "aria-disabled": disabled,
34
+ "aria-label": ariaLabel
30
35
  }), /*#__PURE__*/React.createElement(Icon, {
31
36
  as: icon,
32
37
  size: small ? button.icon.size.small : button.icon.size["default"]
@@ -37,14 +42,16 @@ ButtonIcon.propTypes = {
37
42
  disabled: bool,
38
43
  secondary: bool,
39
44
  inverted: bool,
40
- icon: oneOfType([node, func])
45
+ icon: oneOfType([node, func]),
46
+ ariaLabel: string
41
47
  };
42
48
  ButtonIcon.defaultProps = {
43
49
  small: false,
44
- disabled: false,
50
+ disabled: undefined,
45
51
  secondary: false,
46
52
  inverted: false,
47
- icon: undefined
53
+ icon: undefined,
54
+ ariaLabel: undefined
48
55
  };
49
56
  ButtonIcon.displayName = 'Button.Icon';
50
57
  export default withTheme(ButtonIcon);
@@ -1,5 +1,11 @@
1
+ var _excluded = ["disabled"];
2
+
1
3
  var _templateObject;
2
4
 
5
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
+
7
+ 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; }
8
+
3
9
  function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
10
 
5
11
  import React from 'react';
@@ -15,8 +21,14 @@ var Link = styled(Button)(_templateObject || (_templateObject = _taggedTemplateL
15
21
  return "\n height: unset;\n padding: 0;\n background-color: unset;\n border: none;\n border-radius: 0;\n color: " + button.types.link.font[state].color + ";\n\n svg {\n margin-right: " + button.types.link.icon.margin.right + "px;\n fill: " + button.types.link.font[state].color + ";\n }\n\n &:disabled,\n &:not([disabled]):hover,\n &:not([disabled]):focus,\n &:not([disabled]):active {\n box-shadow: unset;\n background-color: unset;\n }\n\n &:not([disabled]):hover {\n color: " + hexToRgb(button.types.link.font[state].color, 0.5) + ";\n\n svg {\n fill: " + hexToRgb(button.types.link.font[state].color, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(button.types.link.font[state].color, 0.75) + ";\n\n svg {\n fill: " + hexToRgb(button.types.link.font[state].color, 0.75) + ";\n }\n }\n\n &:disabled {\n color: " + button.types.link.font.disabled.color + ";\n\n svg {\n fill: " + button.types.link.font.disabled.color + ";\n }\n }\n\n " + (full ? 'width: 100%' : '') + "\n ";
16
22
  });
17
23
 
18
- var ButtonLink = function ButtonLink(props) {
19
- return /*#__PURE__*/React.createElement(Link, props);
24
+ var ButtonLink = function ButtonLink(_ref2) {
25
+ var disabled = _ref2.disabled,
26
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded);
27
+
28
+ return /*#__PURE__*/React.createElement(Link, _extends({}, props, {
29
+ disabled: disabled,
30
+ "aria-disabled": disabled
31
+ }));
20
32
  };
21
33
 
22
34
  ButtonLink.propTypes = {
@@ -28,7 +40,7 @@ ButtonLink.propTypes = {
28
40
  icon: oneOfType([node, func])
29
41
  };
30
42
  ButtonLink.defaultProps = {
31
- disabled: false,
43
+ disabled: undefined,
32
44
  secondary: false,
33
45
  href: undefined,
34
46
  icon: undefined
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.83.1",
3
+ "version": "7.84.0",
4
4
  "description": "Gympass component library",
5
- "main": "./cjs",
5
+ "main": "./cjs/index.js",
6
6
  "sideEffects": false,
7
7
  "keywords": [
8
8
  "Gympass",
@@ -25,12 +25,12 @@
25
25
  "url": "https://github.com/Gympass/yoga/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@gympass/yoga-common": "^1.2.0",
29
- "@gympass/yoga-helpers": "^1.0.3",
28
+ "@gympass/yoga-common": "^1.2.1",
29
+ "@gympass/yoga-helpers": "^1.0.4",
30
30
  "@gympass/yoga-icons": "^1.16.0",
31
- "@gympass/yoga-illustrations": "^0.5.1",
32
- "@gympass/yoga-system": "^0.11.0",
33
- "@gympass/yoga-tokens": "^3.2.0",
31
+ "@gympass/yoga-illustrations": "^0.5.2",
32
+ "@gympass/yoga-system": "^0.11.1",
33
+ "@gympass/yoga-tokens": "^3.2.1",
34
34
  "@ptomasroos/react-native-multi-slider": "^2.1.1",
35
35
  "@radix-ui/react-dropdown-menu": "^2.0.1",
36
36
  "date-fns": "^2.29.2",
@@ -55,14 +55,14 @@
55
55
  "react-native": "0.72.3",
56
56
  "styled-components": "^4.4.0"
57
57
  },
58
- "gitHead": "4cbae54a4a40e7081461982b3e17fc70be057349",
59
- "module": "./esm",
58
+ "gitHead": "f4ff629d7f0f900398d0504f164071af2d25d9e4",
59
+ "module": "./esm/index.js",
60
60
  "types": "./typings/index.d.ts",
61
61
  "private": false,
62
62
  "exports": {
63
63
  ".": {
64
- "require": "./cjs",
65
- "import": "./esm"
64
+ "require": "./cjs/index.js",
65
+ "import": "./esm/index.js"
66
66
  }
67
67
  },
68
68
  "react-native": "./cjs/index.native.js"