@gympass/yoga 7.62.1 → 7.64.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/Accordion/Accordion.theme.js +5 -1
- package/cjs/Accordion/web/Accordion.js +8 -5
- package/cjs/Button/Button.theme.js +5 -0
- package/cjs/Button/web/Link.js +7 -3
- package/esm/Accordion/Accordion.theme.js +5 -1
- package/esm/Accordion/web/Accordion.js +8 -5
- package/esm/Button/Button.theme.js +5 -0
- package/esm/Button/web/Link.js +8 -4
- package/package.json +2 -2
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = void 0;
|
|
5
5
|
|
|
6
6
|
var Accordion = function Accordion(_ref) {
|
|
7
|
-
var spacing = _ref.spacing
|
|
7
|
+
var spacing = _ref.spacing,
|
|
8
|
+
fontWeights = _ref.fontWeights;
|
|
8
9
|
return {
|
|
9
10
|
padding: {
|
|
10
11
|
standard: spacing.medium,
|
|
@@ -15,6 +16,9 @@ var Accordion = function Accordion(_ref) {
|
|
|
15
16
|
},
|
|
16
17
|
gap: {
|
|
17
18
|
header: spacing.xxxsmall
|
|
19
|
+
},
|
|
20
|
+
fontWeight: {
|
|
21
|
+
title: fontWeights.medium
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
24
|
};
|
|
@@ -25,9 +25,10 @@ var Accordion = function Accordion(_ref) {
|
|
|
25
25
|
var title = _ref.title,
|
|
26
26
|
subtitle = _ref.subtitle,
|
|
27
27
|
children = _ref.children,
|
|
28
|
-
disabled = _ref.disabled
|
|
28
|
+
disabled = _ref.disabled,
|
|
29
|
+
expanded = _ref.expanded;
|
|
29
30
|
|
|
30
|
-
var _useState = (0, _react.useState)(
|
|
31
|
+
var _useState = (0, _react.useState)(expanded),
|
|
31
32
|
open = _useState[0],
|
|
32
33
|
setOpen = _useState[1];
|
|
33
34
|
|
|
@@ -48,7 +49,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
48
49
|
|
|
49
50
|
var Title = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n text-align: start;\n\n ", "\n\n ", "\n "])), function (_ref5) {
|
|
50
51
|
var accordion = _ref5.theme.yoga.components.accordion;
|
|
51
|
-
return "\n gap: " + (subtitle ? accordion.gap.header : 0) + "px;\n margin: " + (subtitle ? 0 : accordion.paddingArrow.total + "px 0") + ";\n ";
|
|
52
|
+
return "\n gap: " + (subtitle ? accordion.gap.header : 0) + "px;\n margin: " + (subtitle ? 0 : accordion.paddingArrow.total + "px 0") + ";\n\n p {\n font-weight: " + accordion.fontWeight.title + ";\n }\n ";
|
|
52
53
|
}, disabled && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", "\n "])), function (_ref6) {
|
|
53
54
|
var text = _ref6.theme.yoga.colors.text;
|
|
54
55
|
return "\n color: " + text.secundary + ";\n ";
|
|
@@ -95,11 +96,13 @@ Accordion.propTypes = {
|
|
|
95
96
|
title: _propTypes.string.isRequired,
|
|
96
97
|
subtitle: _propTypes.string,
|
|
97
98
|
children: _propTypes.node.isRequired,
|
|
98
|
-
disabled: _propTypes.bool
|
|
99
|
+
disabled: _propTypes.bool,
|
|
100
|
+
expanded: _propTypes.bool
|
|
99
101
|
};
|
|
100
102
|
Accordion.defaultProps = {
|
|
101
103
|
subtitle: undefined,
|
|
102
|
-
disabled: false
|
|
104
|
+
disabled: false,
|
|
105
|
+
expanded: false
|
|
103
106
|
};
|
|
104
107
|
var _default = Accordion;
|
|
105
108
|
exports["default"] = _default;
|
package/cjs/Button/web/Link.js
CHANGED
|
@@ -24,7 +24,7 @@ var Link = (0, _styledComponents["default"])(_Button["default"])(_templateObject
|
|
|
24
24
|
secondary = _ref.secondary,
|
|
25
25
|
button = _ref.theme.yoga.components.button;
|
|
26
26
|
var state = secondary ? 'secondary' : 'primary';
|
|
27
|
-
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 &: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\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(button.types.link.font[state].color, 0.75) + ";\n }\n\n &:disabled {\n color: " + button.types.link.font.disabled.color + ";\n }\n\n " + (full ? 'width: 100%' : '') + "\n ";
|
|
27
|
+
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
28
|
});
|
|
29
29
|
|
|
30
30
|
var ButtonLink = function ButtonLink(props) {
|
|
@@ -34,12 +34,16 @@ var ButtonLink = function ButtonLink(props) {
|
|
|
34
34
|
ButtonLink.propTypes = {
|
|
35
35
|
disabled: _propTypes.bool,
|
|
36
36
|
secondary: _propTypes.bool,
|
|
37
|
-
href: _propTypes.string
|
|
37
|
+
href: _propTypes.string,
|
|
38
|
+
|
|
39
|
+
/** an Icon from yoga-icons package */
|
|
40
|
+
icon: (0, _propTypes.oneOfType)([_propTypes.node, _propTypes.func])
|
|
38
41
|
};
|
|
39
42
|
ButtonLink.defaultProps = {
|
|
40
43
|
disabled: false,
|
|
41
44
|
secondary: false,
|
|
42
|
-
href: undefined
|
|
45
|
+
href: undefined,
|
|
46
|
+
icon: undefined
|
|
43
47
|
};
|
|
44
48
|
ButtonLink.displayName = 'Button.Link';
|
|
45
49
|
var _default = ButtonLink;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var Accordion = function Accordion(_ref) {
|
|
2
|
-
var spacing = _ref.spacing
|
|
2
|
+
var spacing = _ref.spacing,
|
|
3
|
+
fontWeights = _ref.fontWeights;
|
|
3
4
|
return {
|
|
4
5
|
padding: {
|
|
5
6
|
standard: spacing.medium,
|
|
@@ -10,6 +11,9 @@ var Accordion = function Accordion(_ref) {
|
|
|
10
11
|
},
|
|
11
12
|
gap: {
|
|
12
13
|
header: spacing.xxxsmall
|
|
14
|
+
},
|
|
15
|
+
fontWeight: {
|
|
16
|
+
title: fontWeights.medium
|
|
13
17
|
}
|
|
14
18
|
};
|
|
15
19
|
};
|
|
@@ -12,9 +12,10 @@ var Accordion = function Accordion(_ref) {
|
|
|
12
12
|
var title = _ref.title,
|
|
13
13
|
subtitle = _ref.subtitle,
|
|
14
14
|
children = _ref.children,
|
|
15
|
-
disabled = _ref.disabled
|
|
15
|
+
disabled = _ref.disabled,
|
|
16
|
+
expanded = _ref.expanded;
|
|
16
17
|
|
|
17
|
-
var _useState = useState(
|
|
18
|
+
var _useState = useState(expanded),
|
|
18
19
|
open = _useState[0],
|
|
19
20
|
setOpen = _useState[1];
|
|
20
21
|
|
|
@@ -33,7 +34,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
33
34
|
}, disabled && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n cursor: not-allowed;\n "]))));
|
|
34
35
|
var Title = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n text-align: start;\n\n ", "\n\n ", "\n "])), function (_ref5) {
|
|
35
36
|
var accordion = _ref5.theme.yoga.components.accordion;
|
|
36
|
-
return "\n gap: " + (subtitle ? accordion.gap.header : 0) + "px;\n margin: " + (subtitle ? 0 : accordion.paddingArrow.total + "px 0") + ";\n ";
|
|
37
|
+
return "\n gap: " + (subtitle ? accordion.gap.header : 0) + "px;\n margin: " + (subtitle ? 0 : accordion.paddingArrow.total + "px 0") + ";\n\n p {\n font-weight: " + accordion.fontWeight.title + ";\n }\n ";
|
|
37
38
|
}, disabled && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", "\n "])), function (_ref6) {
|
|
38
39
|
var text = _ref6.theme.yoga.colors.text;
|
|
39
40
|
return "\n color: " + text.secundary + ";\n ";
|
|
@@ -77,10 +78,12 @@ Accordion.propTypes = {
|
|
|
77
78
|
title: string.isRequired,
|
|
78
79
|
subtitle: string,
|
|
79
80
|
children: node.isRequired,
|
|
80
|
-
disabled: bool
|
|
81
|
+
disabled: bool,
|
|
82
|
+
expanded: bool
|
|
81
83
|
};
|
|
82
84
|
Accordion.defaultProps = {
|
|
83
85
|
subtitle: undefined,
|
|
84
|
-
disabled: false
|
|
86
|
+
disabled: false,
|
|
87
|
+
expanded: false
|
|
85
88
|
};
|
|
86
89
|
export default Accordion;
|
package/esm/Button/web/Link.js
CHANGED
|
@@ -3,7 +3,7 @@ var _templateObject;
|
|
|
3
3
|
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { bool, string } from 'prop-types';
|
|
6
|
+
import { bool, string, oneOfType, node, func } from 'prop-types';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { hexToRgb } from '@gympass/yoga-common';
|
|
9
9
|
import Button from './Button';
|
|
@@ -12,7 +12,7 @@ var Link = styled(Button)(_templateObject || (_templateObject = _taggedTemplateL
|
|
|
12
12
|
secondary = _ref.secondary,
|
|
13
13
|
button = _ref.theme.yoga.components.button;
|
|
14
14
|
var state = secondary ? 'secondary' : 'primary';
|
|
15
|
-
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 &: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\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(button.types.link.font[state].color, 0.75) + ";\n }\n\n &:disabled {\n color: " + button.types.link.font.disabled.color + ";\n }\n\n " + (full ? 'width: 100%' : '') + "\n ";
|
|
15
|
+
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
16
|
});
|
|
17
17
|
|
|
18
18
|
var ButtonLink = function ButtonLink(props) {
|
|
@@ -22,12 +22,16 @@ var ButtonLink = function ButtonLink(props) {
|
|
|
22
22
|
ButtonLink.propTypes = {
|
|
23
23
|
disabled: bool,
|
|
24
24
|
secondary: bool,
|
|
25
|
-
href: string
|
|
25
|
+
href: string,
|
|
26
|
+
|
|
27
|
+
/** an Icon from yoga-icons package */
|
|
28
|
+
icon: oneOfType([node, func])
|
|
26
29
|
};
|
|
27
30
|
ButtonLink.defaultProps = {
|
|
28
31
|
disabled: false,
|
|
29
32
|
secondary: false,
|
|
30
|
-
href: undefined
|
|
33
|
+
href: undefined,
|
|
34
|
+
icon: undefined
|
|
31
35
|
};
|
|
32
36
|
ButtonLink.displayName = 'Button.Link';
|
|
33
37
|
export default ButtonLink;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.64.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": "c33949c0b93ecc10be19ee73132cc9778a6a595e",
|
|
56
56
|
"module": "./esm",
|
|
57
57
|
"private": false,
|
|
58
58
|
"react-native": "./cjs/index.native.js"
|