@gympass/yoga 7.47.0 → 7.48.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.
|
@@ -64,7 +64,7 @@ var Button = function Button(_ref) {
|
|
|
64
64
|
color: colors.white
|
|
65
65
|
},
|
|
66
66
|
disabled: {
|
|
67
|
-
color: colors.
|
|
67
|
+
color: colors.deep
|
|
68
68
|
},
|
|
69
69
|
pressed: {
|
|
70
70
|
color: colors.white
|
|
@@ -94,7 +94,7 @@ var Button = function Button(_ref) {
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
disabled: {
|
|
97
|
-
color: colors.
|
|
97
|
+
color: colors.deep
|
|
98
98
|
},
|
|
99
99
|
hover: {
|
|
100
100
|
color: colors.white
|
|
@@ -110,7 +110,8 @@ var Button = function Button(_ref) {
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
text: {
|
|
113
|
-
backgroundColor: 'transparent'
|
|
113
|
+
backgroundColor: 'transparent',
|
|
114
|
+
disabled: colors.deep
|
|
114
115
|
},
|
|
115
116
|
link: {
|
|
116
117
|
font: {
|
|
@@ -121,7 +122,7 @@ var Button = function Button(_ref) {
|
|
|
121
122
|
color: colors.secondary
|
|
122
123
|
},
|
|
123
124
|
disabled: {
|
|
124
|
-
color: colors.
|
|
125
|
+
color: colors.deep
|
|
125
126
|
}
|
|
126
127
|
},
|
|
127
128
|
margin: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _taggedTemplateLiteralLoose2=_interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _react=_interopRequireWildcard(require("react"));var _styledComponents=_interopRequireWildcard(require("styled-components"));var _yogaCommon=require("@gympass/yoga-common");var _withTouchable=_interopRequireDefault(require("./withTouchable"));var _Button=require("./Button");var _excluded=["children","disabled","pressed","small","secondary","inverted","icon","theme"];var _templateObject,_templateObject2;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);}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;}var LabelText=(0,_styledComponents["default"])(_Button.Label)(_templateObject||(_templateObject=(0,_taggedTemplateLiteralLoose2["default"])(["\n ","\n"])),function(_ref){var color=_ref.color;return"color: "+color+";";});var ButtonContainerText=(0,_styledComponents["default"])(_Button.ButtonContainer)(_templateObject2||(_templateObject2=(0,_taggedTemplateLiteralLoose2["default"])(["\n ","\n"])),function(_ref2){var button=_ref2.theme.yoga.components.button;return"\n background-color: "+button.types.text.backgroundColor+";\n ";});var ButtonText=(0,_react.forwardRef)(function(_ref3,ref){var children=_ref3.children,disabled=_ref3.disabled,pressed=_ref3.pressed,small=_ref3.small,secondary=_ref3.secondary,inverted=_ref3.inverted,Icon=_ref3.icon,_ref3$theme$yoga=_ref3.theme.yoga,colors=_ref3$theme$yoga.colors,button=_ref3$theme$yoga.components.button,rest=(0,_objectWithoutProperties2["default"])(_ref3,_excluded);var state=secondary?'secondary':'primary';var textColor=colors[state];if(disabled){textColor=
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _taggedTemplateLiteralLoose2=_interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _react=_interopRequireWildcard(require("react"));var _styledComponents=_interopRequireWildcard(require("styled-components"));var _yogaCommon=require("@gympass/yoga-common");var _withTouchable=_interopRequireDefault(require("./withTouchable"));var _Button=require("./Button");var _excluded=["children","disabled","pressed","small","secondary","inverted","icon","theme"];var _templateObject,_templateObject2;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);}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;}var LabelText=(0,_styledComponents["default"])(_Button.Label)(_templateObject||(_templateObject=(0,_taggedTemplateLiteralLoose2["default"])(["\n ","\n"])),function(_ref){var color=_ref.color;return"color: "+color+";";});var ButtonContainerText=(0,_styledComponents["default"])(_Button.ButtonContainer)(_templateObject2||(_templateObject2=(0,_taggedTemplateLiteralLoose2["default"])(["\n ","\n"])),function(_ref2){var button=_ref2.theme.yoga.components.button;return"\n background-color: "+button.types.text.backgroundColor+";\n ";});var ButtonText=(0,_react.forwardRef)(function(_ref3,ref){var children=_ref3.children,disabled=_ref3.disabled,pressed=_ref3.pressed,small=_ref3.small,secondary=_ref3.secondary,inverted=_ref3.inverted,Icon=_ref3.icon,_ref3$theme$yoga=_ref3.theme.yoga,colors=_ref3$theme$yoga.colors,button=_ref3$theme$yoga.components.button,rest=(0,_objectWithoutProperties2["default"])(_ref3,_excluded);var state=secondary?'secondary':'primary';var textColor=colors[state];if(disabled){textColor=button.types.text.disabled;}else if(inverted){textColor=colors.white;if(pressed){textColor=(0,_yogaCommon.hexToRgb)(colors.white,0.75);}}else if(pressed){textColor=(0,_yogaCommon.hexToRgb)(colors[state],0.75);}return _react["default"].createElement(ButtonContainerText,(0,_extends2["default"])({},rest,{disabled:disabled,pressed:pressed,small:small,ref:ref}),Icon&&_react["default"].createElement(Icon,{width:small?button.icon.size.small:button.icon.size["default"],height:small?button.icon.size.small:button.icon.size["default"],fill:textColor,style:{marginRight:button.icon.margin.right}}),_react["default"].createElement(LabelText,{disabled:disabled,pressed:pressed,small:small,secondary:secondary,color:textColor},children));});ButtonText.propTypes=_Button.ButtonContainer.propTypes;ButtonText.defaultProps=_Button.ButtonContainer.defaultProps;var _default=(0,_withTouchable["default"])((0,_styledComponents.withTheme)(ButtonText));exports["default"]=_default;
|
package/cjs/Button/web/Text.js
CHANGED
|
@@ -22,7 +22,7 @@ var ButtonText = (0, _styledComponents["default"])(_Button["default"])(_template
|
|
|
22
22
|
colors = _ref$theme$yoga.colors,
|
|
23
23
|
button = _ref$theme$yoga.components.button;
|
|
24
24
|
var state = secondary ? 'secondary' : 'primary';
|
|
25
|
-
return "\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + colors[state] + ";\n\n svg {\n fill: " + colors[state] + ";\n }\n\n &:not([disabled]):hover, &:not([disabled]):focus, &:not([disabled]):active {\n background-color: " + button.types.text.backgroundColor + ";\n box-shadow: none;\n }\n\n &:not([disabled]):hover {\n color: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.5) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.75) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.75) + ";\n }\n }\n\n " + (inverted ? "\n color: " + colors.white + ";\n svg {\n fill: " + colors.white + ";\n }\n\n &:not([disabled]):hover {\n color: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.5) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.75) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.75) + ";\n }\n }\n " : '') + "\n\n &:disabled {\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " +
|
|
25
|
+
return "\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + colors[state] + ";\n\n svg {\n fill: " + colors[state] + ";\n }\n\n &:not([disabled]):hover, &:not([disabled]):focus, &:not([disabled]):active {\n background-color: " + button.types.text.backgroundColor + ";\n box-shadow: none;\n }\n\n &:not([disabled]):hover {\n color: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.5) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.75) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors[state], 0.75) + ";\n }\n }\n\n " + (inverted ? "\n color: " + colors.white + ";\n svg {\n fill: " + colors.white + ";\n }\n\n &:not([disabled]):hover {\n color: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.5) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.75) + ";\n svg {\n fill: " + (0, _yogaCommon.hexToRgb)(colors.white, 0.75) + ";\n }\n }\n " : '') + "\n\n &:disabled {\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + button.types.text.disabled + ";\n svg {\n fill: " + button.types.text.disabled + ";\n }\n }\n ";
|
|
26
26
|
});
|
|
27
27
|
ButtonText.displayName = 'Button.Text';
|
|
28
28
|
var _default = ButtonText;
|
|
@@ -59,7 +59,7 @@ var Button = function Button(_ref) {
|
|
|
59
59
|
color: colors.white
|
|
60
60
|
},
|
|
61
61
|
disabled: {
|
|
62
|
-
color: colors.
|
|
62
|
+
color: colors.deep
|
|
63
63
|
},
|
|
64
64
|
pressed: {
|
|
65
65
|
color: colors.white
|
|
@@ -89,7 +89,7 @@ var Button = function Button(_ref) {
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
disabled: {
|
|
92
|
-
color: colors.
|
|
92
|
+
color: colors.deep
|
|
93
93
|
},
|
|
94
94
|
hover: {
|
|
95
95
|
color: colors.white
|
|
@@ -105,7 +105,8 @@ var Button = function Button(_ref) {
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
text: {
|
|
108
|
-
backgroundColor: 'transparent'
|
|
108
|
+
backgroundColor: 'transparent',
|
|
109
|
+
disabled: colors.deep
|
|
109
110
|
},
|
|
110
111
|
link: {
|
|
111
112
|
font: {
|
|
@@ -116,7 +117,7 @@ var Button = function Button(_ref) {
|
|
|
116
117
|
color: colors.secondary
|
|
117
118
|
},
|
|
118
119
|
disabled: {
|
|
119
|
-
color: colors.
|
|
120
|
+
color: colors.deep
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
margin: {
|
package/esm/Button/web/Text.js
CHANGED
|
@@ -12,7 +12,7 @@ var ButtonText = styled(Button)(_templateObject || (_templateObject = _taggedTem
|
|
|
12
12
|
colors = _ref$theme$yoga.colors,
|
|
13
13
|
button = _ref$theme$yoga.components.button;
|
|
14
14
|
var state = secondary ? 'secondary' : 'primary';
|
|
15
|
-
return "\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + colors[state] + ";\n\n svg {\n fill: " + colors[state] + ";\n }\n\n &:not([disabled]):hover, &:not([disabled]):focus, &:not([disabled]):active {\n background-color: " + button.types.text.backgroundColor + ";\n box-shadow: none;\n }\n\n &:not([disabled]):hover {\n color: " + hexToRgb(colors[state], 0.5) + ";\n svg {\n fill: " + hexToRgb(colors[state], 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(colors[state], 0.75) + ";\n svg {\n fill: " + hexToRgb(colors[state], 0.75) + ";\n }\n }\n\n " + (inverted ? "\n color: " + colors.white + ";\n svg {\n fill: " + colors.white + ";\n }\n\n &:not([disabled]):hover {\n color: " + hexToRgb(colors.white, 0.5) + ";\n svg {\n fill: " + hexToRgb(colors.white, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(colors.white, 0.75) + ";\n svg {\n fill: " + hexToRgb(colors.white, 0.75) + ";\n }\n }\n " : '') + "\n\n &:disabled {\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " +
|
|
15
|
+
return "\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + colors[state] + ";\n\n svg {\n fill: " + colors[state] + ";\n }\n\n &:not([disabled]):hover, &:not([disabled]):focus, &:not([disabled]):active {\n background-color: " + button.types.text.backgroundColor + ";\n box-shadow: none;\n }\n\n &:not([disabled]):hover {\n color: " + hexToRgb(colors[state], 0.5) + ";\n svg {\n fill: " + hexToRgb(colors[state], 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(colors[state], 0.75) + ";\n svg {\n fill: " + hexToRgb(colors[state], 0.75) + ";\n }\n }\n\n " + (inverted ? "\n color: " + colors.white + ";\n svg {\n fill: " + colors.white + ";\n }\n\n &:not([disabled]):hover {\n color: " + hexToRgb(colors.white, 0.5) + ";\n svg {\n fill: " + hexToRgb(colors.white, 0.5) + ";\n }\n }\n\n &:not([disabled]):focus, &:not([disabled]):active {\n color: " + hexToRgb(colors.white, 0.75) + ";\n svg {\n fill: " + hexToRgb(colors.white, 0.75) + ";\n }\n }\n " : '') + "\n\n &:disabled {\n background-color: " + button.types.text.backgroundColor + ";\n border-color: " + button.types.text.backgroundColor + ";\n color: " + button.types.text.disabled + ";\n svg {\n fill: " + button.types.text.disabled + ";\n }\n }\n ";
|
|
16
16
|
});
|
|
17
17
|
ButtonText.displayName = 'Button.Text';
|
|
18
18
|
export default ButtonText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.48.0",
|
|
4
4
|
"description": "Gympass component library",
|
|
5
5
|
"main": "./cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react": ">=16",
|
|
52
52
|
"styled-components": "^4.4.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8320df5bc9056099b35bf713b2c2b6ce819e28a9",
|
|
55
55
|
"module": "./esm",
|
|
56
56
|
"private": false,
|
|
57
57
|
"react-native": "./cjs/index.native.js"
|