@widergy/react-social-auth 2.1.1 → 2.1.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.
- package/CHANGELOG.md +7 -0
- package/dist/components/Apple/index.js +9 -8
- package/dist/components/Apple/styles.module.scss +0 -4
- package/dist/components/Button/index.js +9 -6
- package/dist/components/Facebook/index.js +9 -8
- package/dist/components/Facebook/styles.module.scss +0 -4
- package/dist/components/Google/components/GoogleButton/index.js +10 -8
- package/dist/components/Google/components/GoogleButton/styles.module.scss +0 -4
- package/dist/components/Google/index.js +1 -1
- package/dist/components/Twitter/index.js +9 -8
- package/dist/components/Twitter/styles.module.scss +0 -4
- package/dist/scss/variables/_colors.scss +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.1.2](https://github.com/widergy/react-social-auth/compare/v2.1.1...v2.1.2) (2023-06-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* corrections ([f62a556](https://github.com/widergy/react-social-auth/commit/f62a5565e16b81c844f33d37ef78c39abcd0e09c))
|
|
7
|
+
|
|
1
8
|
## [2.1.1](https://github.com/widergy/react-social-auth/compare/v2.1.0...v2.1.1) (2023-06-02)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -78,10 +78,10 @@ var Apple = function Apple(_ref) {
|
|
|
78
78
|
tooltipContent: tooltipContent,
|
|
79
79
|
triggerOnMount: triggerOnMount
|
|
80
80
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
81
|
-
|
|
81
|
+
classNames: {
|
|
82
|
+
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
83
|
+
},
|
|
82
84
|
email: email,
|
|
83
|
-
onClick: handleLogin,
|
|
84
|
-
size: size,
|
|
85
85
|
Icon: function Icon(_ref4) {
|
|
86
86
|
var className = _ref4.className;
|
|
87
87
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -90,11 +90,12 @@ var Apple = function Apple(_ref) {
|
|
|
90
90
|
src: _appleIcon.default
|
|
91
91
|
});
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
label: label,
|
|
94
|
+
mainLabelProps: _objectSpread({}, size === _buttonSizes.LARGE ? {
|
|
95
|
+
colorTheme: 'light'
|
|
96
|
+
} : {}),
|
|
97
|
+
onClick: handleLogin,
|
|
98
|
+
size: size
|
|
98
99
|
}));
|
|
99
100
|
};
|
|
100
101
|
Apple.propTypes = {
|
|
@@ -10,23 +10,25 @@ var _propTypes = require("prop-types");
|
|
|
10
10
|
var _buttonSizes = require("../../constants/buttonSizes");
|
|
11
11
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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); }
|
|
13
14
|
var Button = function Button(_ref) {
|
|
14
15
|
var _ref$classNames = _ref.classNames,
|
|
15
16
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
17
|
+
email = _ref.email,
|
|
16
18
|
_Icon = _ref.Icon,
|
|
17
19
|
label = _ref.label,
|
|
20
|
+
mainLabelProps = _ref.mainLabelProps,
|
|
18
21
|
onClick = _ref.onClick,
|
|
19
|
-
size = _ref.size
|
|
20
|
-
email = _ref.email;
|
|
22
|
+
size = _ref.size;
|
|
21
23
|
return size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_energyUi.UTButton, {
|
|
22
24
|
onClick: onClick,
|
|
23
25
|
classNames: {
|
|
24
26
|
root: "".concat(_stylesModule.default.largeContainer, " ").concat(classNames.container),
|
|
25
27
|
childrenContainer: _stylesModule.default.fullWidth,
|
|
26
|
-
text: "".concat(_stylesModule.default.largeText, "
|
|
28
|
+
text: "".concat(_stylesModule.default.largeText, " ").concat(email && _stylesModule.default.labelsContainer)
|
|
27
29
|
},
|
|
28
30
|
Icon: _Icon
|
|
29
|
-
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel,
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, mainLabelProps, label), email && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
30
32
|
variant: "small"
|
|
31
33
|
}, email)) : /*#__PURE__*/_react.default.createElement("div", {
|
|
32
34
|
className: "".concat(label ? _stylesModule.default.buttonWithLabel : '')
|
|
@@ -41,15 +43,16 @@ var Button = function Button(_ref) {
|
|
|
41
43
|
className: className
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
|
-
}), label && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
46
|
+
}), label && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, _extends({
|
|
45
47
|
className: classNames.text
|
|
46
|
-
}, label));
|
|
48
|
+
}, mainLabelProps), label));
|
|
47
49
|
};
|
|
48
50
|
Button.propTypes = {
|
|
49
51
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
50
52
|
email: _propTypes.string,
|
|
51
53
|
Icon: _propTypes.element,
|
|
52
54
|
label: _propTypes.string,
|
|
55
|
+
mainLabelProps: _propTypes.object,
|
|
53
56
|
onClick: _propTypes.func,
|
|
54
57
|
size: _propTypes.string
|
|
55
58
|
};
|
|
@@ -46,9 +46,9 @@ var Facebook = function Facebook(_ref) {
|
|
|
46
46
|
fields: fields,
|
|
47
47
|
render: function render(renderProps) {
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
classNames: {
|
|
50
|
+
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
51
|
+
},
|
|
52
52
|
email: email,
|
|
53
53
|
Icon: function Icon(_ref3) {
|
|
54
54
|
var className = _ref3.className;
|
|
@@ -58,11 +58,12 @@ var Facebook = function Facebook(_ref) {
|
|
|
58
58
|
src: _facebookIcon.default
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
label: label,
|
|
62
|
+
mainLabelProps: _objectSpread({}, size === _buttonSizes.LARGE ? {
|
|
63
|
+
colorTheme: 'light'
|
|
64
|
+
} : {}),
|
|
65
|
+
onClick: renderProps.onClick,
|
|
66
|
+
size: size
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
}));
|
|
@@ -31,10 +31,10 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
31
31
|
onSuccess: successCallback
|
|
32
32
|
});
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
34
|
-
|
|
34
|
+
classNames: {
|
|
35
|
+
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
36
|
+
},
|
|
35
37
|
email: email,
|
|
36
|
-
onClick: login,
|
|
37
|
-
size: size,
|
|
38
38
|
Icon: function Icon(_ref2) {
|
|
39
39
|
var className = _ref2.className;
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -43,11 +43,13 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
43
43
|
src: _googleIcon.default
|
|
44
44
|
});
|
|
45
45
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} : {})
|
|
46
|
+
label: label,
|
|
47
|
+
mainLabelProps: _objectSpread({}, size === _buttonSizes.LARGE ? {
|
|
48
|
+
colorTheme: 'dark',
|
|
49
|
+
shade: '01'
|
|
50
|
+
} : {}),
|
|
51
|
+
onClick: login,
|
|
52
|
+
size: size
|
|
51
53
|
});
|
|
52
54
|
};
|
|
53
55
|
GoogleButton.propTypes = {
|
|
@@ -34,10 +34,10 @@ var Google = function Google(_ref) {
|
|
|
34
34
|
triggerOnMount: triggerOnMount
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement(_GoogleButton.default, {
|
|
36
36
|
classNames: classNames,
|
|
37
|
+
email: email,
|
|
37
38
|
failureCallback: failureCallback,
|
|
38
39
|
label: label,
|
|
39
40
|
size: size,
|
|
40
|
-
email: email,
|
|
41
41
|
successCallback: successCallback
|
|
42
42
|
})));
|
|
43
43
|
};
|
|
@@ -98,10 +98,10 @@ var Twitter = function Twitter(_ref) {
|
|
|
98
98
|
tooltipContent: tooltipContent,
|
|
99
99
|
triggerOnMount: triggerOnMount
|
|
100
100
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
101
|
+
classNames: {
|
|
102
|
+
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
103
|
+
},
|
|
101
104
|
email: email,
|
|
102
|
-
label: label,
|
|
103
|
-
onClick: handleClick,
|
|
104
|
-
size: size,
|
|
105
105
|
Icon: function Icon(_ref4) {
|
|
106
106
|
var className = _ref4.className;
|
|
107
107
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -110,11 +110,12 @@ var Twitter = function Twitter(_ref) {
|
|
|
110
110
|
src: _twitterIcon.default
|
|
111
111
|
});
|
|
112
112
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
label: label,
|
|
114
|
+
mainLabelProps: _objectSpread({}, size === _buttonSizes.LARGE ? {
|
|
115
|
+
colorTheme: 'light'
|
|
116
|
+
} : {}),
|
|
117
|
+
onClick: handleClick,
|
|
118
|
+
size: size
|
|
118
119
|
}));
|
|
119
120
|
};
|
|
120
121
|
Twitter.propTypes = {
|