@widergy/react-social-auth 3.2.4 → 3.2.6
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 +15 -0
- package/README.md +1 -1
- package/dist/components/Apple/AppleIcon.js +38 -0
- package/dist/components/Apple/index.js +11 -5
- package/dist/components/Apple/styles.module.scss +8 -0
- package/dist/components/Button/index.js +10 -1
- package/dist/components/Button/styles.module.scss +66 -0
- package/dist/components/ButtonContainer/index.js +5 -1
- package/dist/components/ButtonContainer/styles.module.scss +9 -0
- package/dist/components/Facebook/assets/facebookNewIcon.svg +49 -0
- package/dist/components/Facebook/index.js +10 -2
- package/dist/components/Facebook/styles.module.scss +8 -0
- package/dist/components/Google/components/GoogleButton/index.js +4 -1
- package/dist/components/Google/components/GoogleButton/styles.module.scss +8 -0
- package/dist/components/Google/index.js +4 -0
- package/dist/components/Microsoft/index.js +5 -2
- package/dist/components/Microsoft/styles.module.scss +66 -4
- package/dist/components/Twitter/index.js +5 -1
- package/dist/components/Twitter/styles.module.scss +8 -0
- package/dist/scss/variables/_colors.scss +5 -4
- package/package.json +1 -1
- package/dist/components/Apple/assets/appleIcon.svg +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [3.2.6](https://github.com/widergy/react-social-auth/compare/v3.2.5...v3.2.6) (2026-04-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* test org deploy ([477549c](https://github.com/widergy/react-social-auth/commit/477549c2369de2d2519d5ab078332a6307374916))
|
|
7
|
+
|
|
8
|
+
## [3.2.5](https://github.com/widergy/react-social-auth/compare/v3.2.4...v3.2.5) (2026-03-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [CX-1938] login visual adjustments ([7d4f617](https://github.com/widergy/react-social-auth/commit/7d4f61787b518331f25f0668fc3d6939384c34ab))
|
|
14
|
+
* fixes ([7322c3e](https://github.com/widergy/react-social-auth/commit/7322c3eb2aa45cfd1691c010a676c20b3bc99d9f))
|
|
15
|
+
|
|
1
16
|
## [3.2.4](https://github.com/widergy/react-social-auth/compare/v3.2.3...v3.2.4) (2026-03-11)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const AppleIcon = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
className,
|
|
13
|
+
fill = '#FFFFFF'
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
16
|
+
className: className,
|
|
17
|
+
width: "21px",
|
|
18
|
+
height: "24px",
|
|
19
|
+
viewBox: "0 0 21 24",
|
|
20
|
+
version: "1.1",
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
23
|
+
stroke: "none",
|
|
24
|
+
strokeWidth: "1",
|
|
25
|
+
fill: "none",
|
|
26
|
+
fillRule: "evenodd"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
28
|
+
fill: fill,
|
|
29
|
+
fillRule: "nonzero"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
31
|
+
d: "M18.5424591,17.5224972 C18.2024218,18.3080534 17.7999282,19.0311534 17.3335909,19.6959621 C16.6979284,20.6022652 16.1774629,21.2296004 15.7763572,21.5779659 C15.1545744,22.1497841 14.4883782,22.4426326 13.774993,22.4592879 C13.2628549,22.4592879 12.6452354,22.3135568 11.9262989,22.0179337 C11.205003,21.7236951 10.5421377,21.5779659 9.93603788,21.5779659 C9.30037576,21.5779659 8.61863485,21.7236951 7.88942784,22.0179337 C7.15910966,22.3135568 6.57077557,22.4676155 6.12095417,22.4828826 C5.43685398,22.5120284 4.754975,22.2108523 4.07434413,21.5779659 C3.63992917,21.1990663 3.09656307,20.5495246 2.44563352,19.6293409 C1.74723818,18.646703 1.17306038,17.5072301 0.723239167,16.2081477 C0.241496117,14.804972 0,13.4462095 0,12.1307502 C0,10.6238979 0.32560339,9.32426023 0.97778161,8.23516818 C1.49033625,7.36036989 2.17221572,6.67030152 3.02564034,6.16371458 C3.87906572,5.65712841 4.80119223,5.39897746 5.7942411,5.38246098 C6.33760682,5.38246098 7.05015966,5.55053674 7.93564508,5.88085909 C8.81863258,6.21229167 9.38559337,6.38036742 9.63416742,6.38036742 C9.82000833,6.38036742 10.4498413,6.1838392 11.5175595,5.79203314 C12.5272634,5.4286786 13.379439,5.27822879 14.077557,5.33749242 C15.9692767,5.4901625 17.3904951,6.23588598 18.335661,7.57938144 C16.6438006,8.60449091 15.8068915,10.0402822 15.8235462,11.8821756 C15.8388133,13.3168564 16.3592788,14.5107352 17.3821674,15.4586775 C17.8457286,15.8986437 18.3634189,16.2386814 18.9393996,16.4801778 C18.8144896,16.8424218 18.6826383,17.1893991 18.5424591,17.5224972 Z M14.2038572,0.449834034 C14.2038572,1.57433081 13.7930356,2.62427027 12.9741701,3.59608333 C11.9859784,4.75137898 10.7907121,5.41896269 9.49454394,5.31362064 C9.47802803,5.17871572 9.46845133,5.03673295 9.46845133,4.88753295 C9.46845133,3.80801723 9.93839735,2.65272216 10.7729472,1.7081115 C11.1895966,1.22983858 11.7195002,0.832161117 12.3621021,0.514926269 C13.0033157,0.202424754 13.609832,0.0296046856 14.1802619,9.98757121e-06 C14.196918,0.15033764 14.2038572,0.300674754 14.2038572,0.449819451 L14.2038572,0.449834034 Z"
|
|
32
|
+
}))));
|
|
33
|
+
};
|
|
34
|
+
AppleIcon.propTypes = {
|
|
35
|
+
className: _propTypes.string,
|
|
36
|
+
fill: _propTypes.string
|
|
37
|
+
};
|
|
38
|
+
var _default = exports.default = AppleIcon;
|
|
@@ -10,18 +10,20 @@ var _buttonSizes = require("../../constants/buttonSizes");
|
|
|
10
10
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
11
11
|
var _ButtonContainer = _interopRequireDefault(require("../ButtonContainer"));
|
|
12
12
|
var _utils = require("../utils");
|
|
13
|
-
var
|
|
13
|
+
var _AppleIcon = _interopRequireDefault(require("./AppleIcon"));
|
|
14
14
|
var _utils2 = require("./utils");
|
|
15
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
18
|
const Apple = _ref => {
|
|
19
19
|
let {
|
|
20
|
+
appleLogoColor = 'white',
|
|
20
21
|
classNames = {},
|
|
21
22
|
config,
|
|
22
23
|
dataTestId,
|
|
23
24
|
email,
|
|
24
25
|
label,
|
|
26
|
+
rectangleButtonEnabled,
|
|
25
27
|
size = _buttonSizes.SMALL,
|
|
26
28
|
tooltipContent,
|
|
27
29
|
triggerOnMount
|
|
@@ -33,6 +35,7 @@ const Apple = _ref => {
|
|
|
33
35
|
scope,
|
|
34
36
|
successCallback
|
|
35
37
|
} = config || {};
|
|
38
|
+
const iconColor = appleLogoColor === 'black' ? '#000000' : '#FFFFFF';
|
|
36
39
|
(0, _react.useEffect)(() => {
|
|
37
40
|
if ((0, _utils.isValidId)(clientId)) (0, _utils2.initAppleAuth)(clientId, redirectUrl, scope);
|
|
38
41
|
// eslint-disable-next-line no-console
|
|
@@ -48,12 +51,13 @@ const Apple = _ref => {
|
|
|
48
51
|
};
|
|
49
52
|
return (0, _utils.isValidId)(clientId) ? /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
50
53
|
className: classNames.container,
|
|
54
|
+
fullWidth: rectangleButtonEnabled,
|
|
51
55
|
size: size,
|
|
52
56
|
tooltipContent: tooltipContent,
|
|
53
57
|
triggerOnMount: triggerOnMount
|
|
54
58
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
55
59
|
classNames: {
|
|
56
|
-
container: `${_stylesModule.default.buttonContainer} ${classNames.buttonContainer}`
|
|
60
|
+
container: `${_stylesModule.default.buttonContainer} ${rectangleButtonEnabled ? _stylesModule.default.iconOnlyButton : ''} ${classNames.buttonContainer}`
|
|
57
61
|
},
|
|
58
62
|
dataTestId: dataTestId,
|
|
59
63
|
email: email,
|
|
@@ -64,10 +68,9 @@ const Apple = _ref => {
|
|
|
64
68
|
let {
|
|
65
69
|
className
|
|
66
70
|
} = _ref2;
|
|
67
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
68
|
-
alt: "Logo de Apple",
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_AppleIcon.default, {
|
|
69
72
|
className: className,
|
|
70
|
-
|
|
73
|
+
fill: iconColor
|
|
71
74
|
});
|
|
72
75
|
},
|
|
73
76
|
label: label,
|
|
@@ -77,10 +80,12 @@ const Apple = _ref => {
|
|
|
77
80
|
} : {})
|
|
78
81
|
},
|
|
79
82
|
onClick: handleLogin,
|
|
83
|
+
rectangleButtonEnabled: rectangleButtonEnabled,
|
|
80
84
|
size: size
|
|
81
85
|
})) : null;
|
|
82
86
|
};
|
|
83
87
|
Apple.propTypes = {
|
|
88
|
+
appleLogoColor: _propTypes.string,
|
|
84
89
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
85
90
|
config: (0, _propTypes.shape)({
|
|
86
91
|
clientId: _propTypes.string,
|
|
@@ -92,6 +97,7 @@ Apple.propTypes = {
|
|
|
92
97
|
dataTestId: _propTypes.string,
|
|
93
98
|
email: _propTypes.string,
|
|
94
99
|
label: _propTypes.string,
|
|
100
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
95
101
|
size: _propTypes.string,
|
|
96
102
|
tooltipContent: _propTypes.string,
|
|
97
103
|
triggerOnMount: _propTypes.bool
|
|
@@ -21,9 +21,17 @@ const Button = _ref => {
|
|
|
21
21
|
label,
|
|
22
22
|
mainLabelProps,
|
|
23
23
|
onClick,
|
|
24
|
+
rectangleButtonEnabled = false,
|
|
24
25
|
size
|
|
25
26
|
} = _ref;
|
|
26
|
-
return
|
|
27
|
+
return rectangleButtonEnabled ? /*#__PURE__*/_react.default.createElement(_energyUi.UTButton, {
|
|
28
|
+
classNames: {
|
|
29
|
+
root: `${_stylesModule.default.rectangleContainer} ${classNames.container}`
|
|
30
|
+
},
|
|
31
|
+
dataTestId: dataTestId,
|
|
32
|
+
Icon: Icon,
|
|
33
|
+
onClick: onClick
|
|
34
|
+
}) : size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_energyUi.UTButton, {
|
|
27
35
|
onClick: onClick,
|
|
28
36
|
classNames: {
|
|
29
37
|
root: `${_stylesModule.default.largeContainer} ${classNames.container}`,
|
|
@@ -63,6 +71,7 @@ Button.propTypes = {
|
|
|
63
71
|
label: _propTypes.string,
|
|
64
72
|
mainLabelProps: _propTypes.object,
|
|
65
73
|
onClick: _propTypes.func,
|
|
74
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
66
75
|
size: _propTypes.string
|
|
67
76
|
};
|
|
68
77
|
var _default = exports.default = Button;
|
|
@@ -18,6 +18,32 @@
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.iconOnlyContainer {
|
|
22
|
+
background: none;
|
|
23
|
+
border: none;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
padding: 0;
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
transition: opacity 0.2s ease;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
opacity: 0.8;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:active {
|
|
36
|
+
opacity: 0.6;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.iconOnly {
|
|
41
|
+
display: block;
|
|
42
|
+
height: 48px;
|
|
43
|
+
width: 48px;
|
|
44
|
+
object-fit: contain;
|
|
45
|
+
}
|
|
46
|
+
|
|
21
47
|
.largeContainer {
|
|
22
48
|
box-shadow: 0 3px 6px $large-button-shadow !important;
|
|
23
49
|
width: 100%;
|
|
@@ -48,3 +74,43 @@
|
|
|
48
74
|
.labelsContainer {
|
|
49
75
|
text-align: left;
|
|
50
76
|
}
|
|
77
|
+
|
|
78
|
+
.noHover {
|
|
79
|
+
&:hover {
|
|
80
|
+
opacity: 1 !important;
|
|
81
|
+
background: inherit !important;
|
|
82
|
+
box-shadow: inherit !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:active {
|
|
86
|
+
opacity: 1 !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.rectangleContainer {
|
|
91
|
+
border: 1px solid $gray !important;
|
|
92
|
+
border-radius: 8px !important;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
height: 64px !important;
|
|
98
|
+
padding: 16px !important;
|
|
99
|
+
width: 100%;
|
|
100
|
+
transition: opacity 0.2s ease;
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
opacity: 0.9;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:active {
|
|
107
|
+
opacity: 0.8;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.rectangleIcon {
|
|
112
|
+
display: block;
|
|
113
|
+
height: 24px;
|
|
114
|
+
width: 24px;
|
|
115
|
+
object-fit: contain;
|
|
116
|
+
}
|
|
@@ -7,12 +7,15 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
9
|
var _energyUi = require("@widergy/energy-ui");
|
|
10
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
13
|
const ButtonContainer = _ref => {
|
|
12
14
|
let {
|
|
13
15
|
children,
|
|
14
16
|
className,
|
|
15
17
|
dataTestId,
|
|
18
|
+
fullWidth,
|
|
16
19
|
tooltipContent,
|
|
17
20
|
triggerOnMount
|
|
18
21
|
} = _ref;
|
|
@@ -34,7 +37,7 @@ const ButtonContainer = _ref => {
|
|
|
34
37
|
placement: 'left'
|
|
35
38
|
}
|
|
36
39
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
-
className: `${className ?? ''}`,
|
|
40
|
+
className: `${fullWidth ? _stylesModule.default.fullWidth : _stylesModule.default.container} ${className ?? ''}`,
|
|
38
41
|
"data-testid": dataTestId,
|
|
39
42
|
ref: ref
|
|
40
43
|
}, children));
|
|
@@ -43,6 +46,7 @@ ButtonContainer.propTypes = {
|
|
|
43
46
|
children: _propTypes.object,
|
|
44
47
|
className: _propTypes.string,
|
|
45
48
|
dataTestId: _propTypes.string,
|
|
49
|
+
fullWidth: _propTypes.bool,
|
|
46
50
|
tooltipContent: _propTypes.string,
|
|
47
51
|
triggerOnMount: _propTypes.bool
|
|
48
52
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
version="1.1"
|
|
6
|
+
id="svg9"
|
|
7
|
+
width="666.66669"
|
|
8
|
+
height="666.66718"
|
|
9
|
+
viewBox="0 0 666.66668 666.66717"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs13">
|
|
14
|
+
<clipPath
|
|
15
|
+
clipPathUnits="userSpaceOnUse"
|
|
16
|
+
id="clipPath25">
|
|
17
|
+
<path
|
|
18
|
+
d="M 0,700 H 700 V 0 H 0 Z"
|
|
19
|
+
id="path23" />
|
|
20
|
+
</clipPath>
|
|
21
|
+
</defs>
|
|
22
|
+
<g
|
|
23
|
+
id="g17"
|
|
24
|
+
transform="matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)">
|
|
25
|
+
<g
|
|
26
|
+
id="g19">
|
|
27
|
+
<g
|
|
28
|
+
id="g21"
|
|
29
|
+
clip-path="url(#clipPath25)">
|
|
30
|
+
<g
|
|
31
|
+
id="g27"
|
|
32
|
+
transform="translate(600,350)">
|
|
33
|
+
<path
|
|
34
|
+
d="m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0"
|
|
35
|
+
style="fill:#0866ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
36
|
+
id="path29" />
|
|
37
|
+
</g>
|
|
38
|
+
<g
|
|
39
|
+
id="g31"
|
|
40
|
+
transform="translate(447.9175,273.6036)">
|
|
41
|
+
<path
|
|
42
|
+
d="M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z"
|
|
43
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
44
|
+
id="path33" />
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
</g>
|
|
48
|
+
</g>
|
|
49
|
+
</svg>
|
|
@@ -12,6 +12,7 @@ var _Button = _interopRequireDefault(require("../Button"));
|
|
|
12
12
|
var _ButtonContainer = _interopRequireDefault(require("../ButtonContainer"));
|
|
13
13
|
var _utils = require("../utils");
|
|
14
14
|
var _facebookIcon = _interopRequireDefault(require("./assets/facebookIcon.svg"));
|
|
15
|
+
var _facebookNewIcon = _interopRequireDefault(require("./assets/facebookNewIcon.svg"));
|
|
15
16
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
const Facebook = _ref => {
|
|
@@ -20,7 +21,9 @@ const Facebook = _ref => {
|
|
|
20
21
|
config,
|
|
21
22
|
dataTestId,
|
|
22
23
|
email,
|
|
24
|
+
facebookIconVariant = 'default',
|
|
23
25
|
label,
|
|
26
|
+
rectangleButtonEnabled,
|
|
24
27
|
size = _buttonSizes.SMALL,
|
|
25
28
|
tooltipContent,
|
|
26
29
|
triggerOnMount
|
|
@@ -30,11 +33,13 @@ const Facebook = _ref => {
|
|
|
30
33
|
callback,
|
|
31
34
|
fields
|
|
32
35
|
} = config || {};
|
|
36
|
+
const selectedFacebookIcon = facebookIconVariant === 'new' ? _facebookNewIcon.default : _facebookIcon.default;
|
|
33
37
|
|
|
34
38
|
// eslint-disable-next-line no-console
|
|
35
39
|
if (!(0, _utils.isValidId)(appId)) console.error('El id de Facebook es inválido');
|
|
36
40
|
return (0, _utils.isValidId)(appId) ? /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
37
41
|
className: classNames.container,
|
|
42
|
+
fullWidth: rectangleButtonEnabled,
|
|
38
43
|
size: size,
|
|
39
44
|
tooltipContent: tooltipContent,
|
|
40
45
|
triggerOnMount: triggerOnMount
|
|
@@ -46,7 +51,7 @@ const Facebook = _ref => {
|
|
|
46
51
|
fields: fields,
|
|
47
52
|
render: renderProps => /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
48
53
|
classNames: {
|
|
49
|
-
container: `${_stylesModule.default.buttonContainer} ${classNames.buttonContainer}`
|
|
54
|
+
container: `${_stylesModule.default.buttonContainer} ${rectangleButtonEnabled ? _stylesModule.default.iconOnlyButton : ''} ${classNames.buttonContainer}`
|
|
50
55
|
},
|
|
51
56
|
dataTestId: dataTestId,
|
|
52
57
|
email: email,
|
|
@@ -60,7 +65,7 @@ const Facebook = _ref => {
|
|
|
60
65
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
61
66
|
alt: "Logo de Facebook",
|
|
62
67
|
className: className,
|
|
63
|
-
src:
|
|
68
|
+
src: selectedFacebookIcon
|
|
64
69
|
});
|
|
65
70
|
},
|
|
66
71
|
label: label,
|
|
@@ -70,6 +75,7 @@ const Facebook = _ref => {
|
|
|
70
75
|
} : {})
|
|
71
76
|
},
|
|
72
77
|
onClick: renderProps.onClick,
|
|
78
|
+
rectangleButtonEnabled: rectangleButtonEnabled,
|
|
73
79
|
size: size
|
|
74
80
|
})
|
|
75
81
|
})) : null;
|
|
@@ -83,7 +89,9 @@ Facebook.propTypes = {
|
|
|
83
89
|
}),
|
|
84
90
|
dataTestId: _propTypes.string,
|
|
85
91
|
email: _propTypes.string,
|
|
92
|
+
facebookIconVariant: _propTypes.string,
|
|
86
93
|
label: _propTypes.string,
|
|
94
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
87
95
|
size: _propTypes.string,
|
|
88
96
|
tooltipContent: _propTypes.string,
|
|
89
97
|
triggerOnMount: _propTypes.bool
|
|
@@ -18,6 +18,7 @@ const GoogleButton = _ref => {
|
|
|
18
18
|
dataTestId,
|
|
19
19
|
failureCallback,
|
|
20
20
|
label,
|
|
21
|
+
rectangleButtonEnabled,
|
|
21
22
|
size,
|
|
22
23
|
successCallback,
|
|
23
24
|
email
|
|
@@ -28,7 +29,7 @@ const GoogleButton = _ref => {
|
|
|
28
29
|
});
|
|
29
30
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
30
31
|
classNames: {
|
|
31
|
-
container: `${_stylesModule.default.buttonContainer} ${classNames.buttonContainer}`
|
|
32
|
+
container: `${rectangleButtonEnabled ? _stylesModule.default.iconOnlyButton : _stylesModule.default.buttonContainer} ${classNames.buttonContainer}`
|
|
32
33
|
},
|
|
33
34
|
dataTestId: dataTestId,
|
|
34
35
|
email: email,
|
|
@@ -54,6 +55,7 @@ const GoogleButton = _ref => {
|
|
|
54
55
|
} : {})
|
|
55
56
|
},
|
|
56
57
|
onClick: login,
|
|
58
|
+
rectangleButtonEnabled: rectangleButtonEnabled,
|
|
57
59
|
size: size
|
|
58
60
|
});
|
|
59
61
|
};
|
|
@@ -63,6 +65,7 @@ GoogleButton.propTypes = {
|
|
|
63
65
|
email: _propTypes.string,
|
|
64
66
|
failureCallback: _propTypes.func,
|
|
65
67
|
label: _propTypes.string,
|
|
68
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
66
69
|
size: _propTypes.string,
|
|
67
70
|
successCallback: _propTypes.bool
|
|
68
71
|
};
|
|
@@ -19,6 +19,7 @@ const Google = _ref => {
|
|
|
19
19
|
config,
|
|
20
20
|
email,
|
|
21
21
|
label,
|
|
22
|
+
rectangleButtonEnabled,
|
|
22
23
|
size = _buttonSizes.SMALL,
|
|
23
24
|
tooltipContent,
|
|
24
25
|
triggerOnMount
|
|
@@ -35,6 +36,7 @@ const Google = _ref => {
|
|
|
35
36
|
clientId: clientId
|
|
36
37
|
}, /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
37
38
|
className: classNames.container,
|
|
39
|
+
fullWidth: rectangleButtonEnabled,
|
|
38
40
|
size: size,
|
|
39
41
|
tooltipContent: tooltipContent,
|
|
40
42
|
triggerOnMount: triggerOnMount
|
|
@@ -44,6 +46,7 @@ const Google = _ref => {
|
|
|
44
46
|
email: email,
|
|
45
47
|
failureCallback: failureCallback,
|
|
46
48
|
label: label,
|
|
49
|
+
rectangleButtonEnabled: rectangleButtonEnabled,
|
|
47
50
|
size: size,
|
|
48
51
|
successCallback: successCallback
|
|
49
52
|
}))) : null;
|
|
@@ -58,6 +61,7 @@ Google.propTypes = {
|
|
|
58
61
|
}),
|
|
59
62
|
email: _propTypes.string,
|
|
60
63
|
label: _propTypes.string,
|
|
64
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
61
65
|
size: _propTypes.string,
|
|
62
66
|
tooltipContent: _propTypes.string,
|
|
63
67
|
triggerOnMount: _propTypes.bool
|
|
@@ -21,6 +21,7 @@ const Microsoft = _ref => {
|
|
|
21
21
|
config,
|
|
22
22
|
email,
|
|
23
23
|
label,
|
|
24
|
+
rectangleButtonEnabled,
|
|
24
25
|
size = _buttonSizes.SMALL,
|
|
25
26
|
tooltipContent,
|
|
26
27
|
tooltipDataTestId,
|
|
@@ -42,11 +43,12 @@ const Microsoft = _ref => {
|
|
|
42
43
|
return (0, _utils.isValidId)(clientId) ? /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
43
44
|
className: `${_stylesModule.default.container} ${classNames.container}`,
|
|
44
45
|
dataTestId: tooltipDataTestId,
|
|
46
|
+
fullWidth: rectangleButtonEnabled,
|
|
45
47
|
size: size,
|
|
46
48
|
tooltipContent: tooltipContent,
|
|
47
49
|
triggerOnMount: triggerOnMount
|
|
48
50
|
}, /*#__PURE__*/_react.default.createElement(_reactMsLogin.default, {
|
|
49
|
-
btnContent: size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Image, /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
btnContent: rectangleButtonEnabled ? Image : size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Image, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
52
|
className: _stylesModule.default.textsContainer
|
|
51
53
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
52
54
|
className: `${_stylesModule.default.label} ${classNames.label}`,
|
|
@@ -58,7 +60,7 @@ const Microsoft = _ref => {
|
|
|
58
60
|
className: _stylesModule.default.smallButtonWrapper
|
|
59
61
|
}, Image),
|
|
60
62
|
clientId: clientId,
|
|
61
|
-
cssClass: `${_stylesModule.default.button} ${classNames.buttonContainer} ${size === _buttonSizes.SMALL ? _stylesModule.default.smallContainer : ''}`,
|
|
63
|
+
cssClass: `${_stylesModule.default.button} ${classNames.buttonContainer} ${rectangleButtonEnabled ? _stylesModule.default.rectangleButton : size === _buttonSizes.SMALL ? _stylesModule.default.smallContainer : ''}`,
|
|
62
64
|
handleLogin: loginHandler,
|
|
63
65
|
redirectUri: redirectUrl
|
|
64
66
|
}), size === _buttonSizes.SMALL && label && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, null, label)) : null;
|
|
@@ -72,6 +74,7 @@ Microsoft.propTypes = {
|
|
|
72
74
|
}),
|
|
73
75
|
email: _propTypes.string,
|
|
74
76
|
label: _propTypes.string,
|
|
77
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
75
78
|
size: _propTypes.string,
|
|
76
79
|
tooltipContent: _propTypes.string,
|
|
77
80
|
tooltipDataTestId: _propTypes.string,
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
background: $microsoft-bg !important;
|
|
6
6
|
border-radius: 4px;
|
|
7
7
|
border: 1px solid transparent;
|
|
8
|
-
box-shadow: 0 3px 6px $microsoft-button-shadow;
|
|
9
8
|
box-sizing: border-box;
|
|
10
9
|
cursor: pointer;
|
|
11
10
|
display: inline-flex;
|
|
12
11
|
justify-content: center;
|
|
13
12
|
outline: 0;
|
|
14
13
|
padding: 8px 12px;
|
|
15
|
-
transition:
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
transition:
|
|
15
|
+
background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
16
|
+
border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
17
|
+
color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
18
|
+
opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
18
19
|
width: 100%;
|
|
19
20
|
|
|
20
21
|
&:hover {
|
|
@@ -56,3 +57,64 @@
|
|
|
56
57
|
margin: 0 auto;
|
|
57
58
|
text-align: left;
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
.iconOnly {
|
|
62
|
+
background: none !important;
|
|
63
|
+
border: none !important;
|
|
64
|
+
box-shadow: none !important;
|
|
65
|
+
padding: 0 !important;
|
|
66
|
+
width: auto !important;
|
|
67
|
+
transition: opacity 0.2s ease !important;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
background: $gray !important;
|
|
71
|
+
opacity: 0.8;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:active {
|
|
75
|
+
opacity: 0.6;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.icon {
|
|
79
|
+
height: 48px;
|
|
80
|
+
width: 48px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.noHover {
|
|
85
|
+
&:hover {
|
|
86
|
+
opacity: 1 !important;
|
|
87
|
+
box-shadow: 0 3px 6px $microsoft-button-shadow !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:active {
|
|
91
|
+
opacity: 1 !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.iconOnly:hover {
|
|
95
|
+
background: none !important;
|
|
96
|
+
box-shadow: none !important;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.rectangleButton {
|
|
101
|
+
background: none !important;
|
|
102
|
+
border: 1px solid $gray !important;
|
|
103
|
+
border-radius: 8px !important;
|
|
104
|
+
height: 64px !important;
|
|
105
|
+
padding: 16px !important;
|
|
106
|
+
width: 100% !important;
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
background: $gray !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:active {
|
|
113
|
+
opacity: 0.8 !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.icon {
|
|
117
|
+
height: 24px;
|
|
118
|
+
width: 24px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -23,6 +23,7 @@ const Twitter = _ref => {
|
|
|
23
23
|
dataTestId,
|
|
24
24
|
email,
|
|
25
25
|
label,
|
|
26
|
+
rectangleButtonEnabled,
|
|
26
27
|
size = _buttonSizes.SMALL,
|
|
27
28
|
tooltipContent,
|
|
28
29
|
triggerOnMount
|
|
@@ -67,12 +68,13 @@ const Twitter = _ref => {
|
|
|
67
68
|
};
|
|
68
69
|
return /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
69
70
|
className: classNames.container,
|
|
71
|
+
fullWidth: rectangleButtonEnabled,
|
|
70
72
|
size: size,
|
|
71
73
|
tooltipContent: tooltipContent,
|
|
72
74
|
triggerOnMount: triggerOnMount
|
|
73
75
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
74
76
|
classNames: {
|
|
75
|
-
container: `${_stylesModule.default.buttonContainer} ${classNames.buttonContainer}`
|
|
77
|
+
container: `${_stylesModule.default.buttonContainer} ${rectangleButtonEnabled ? _stylesModule.default.iconOnlyButton : ''} ${classNames.buttonContainer}`
|
|
76
78
|
},
|
|
77
79
|
dataTestId: dataTestId,
|
|
78
80
|
email: email,
|
|
@@ -96,6 +98,7 @@ const Twitter = _ref => {
|
|
|
96
98
|
} : {})
|
|
97
99
|
},
|
|
98
100
|
onClick: handleClick,
|
|
101
|
+
rectangleButtonEnabled: rectangleButtonEnabled,
|
|
99
102
|
size: size
|
|
100
103
|
}));
|
|
101
104
|
};
|
|
@@ -113,6 +116,7 @@ Twitter.propTypes = {
|
|
|
113
116
|
dataTestId: _propTypes.string,
|
|
114
117
|
email: _propTypes.string,
|
|
115
118
|
label: _propTypes.string,
|
|
119
|
+
rectangleButtonEnabled: _propTypes.bool,
|
|
116
120
|
size: _propTypes.string,
|
|
117
121
|
tooltipContent: _propTypes.string,
|
|
118
122
|
triggerOnMount: _propTypes.bool
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
$black: #000;
|
|
2
|
-
$facebook-bg: #
|
|
2
|
+
$facebook-bg: #4267b2;
|
|
3
3
|
$large-button-shadow: rgba(9, 30, 66, 0.1);
|
|
4
4
|
$small-button-shadow: rgba(24, 44, 73, 0.1);
|
|
5
5
|
$light-black: #252525;
|
|
6
|
-
$microsoft-bg: #
|
|
6
|
+
$microsoft-bg: #2f2f2f;
|
|
7
7
|
$microsoft-button-shadow: rgba(24, 44, 73, 0.1);
|
|
8
|
-
$twitter-bg: #
|
|
9
|
-
$white: #
|
|
8
|
+
$twitter-bg: #00aced;
|
|
9
|
+
$white: #fff;
|
|
10
|
+
$gray: #E4E6EA;
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>Apple_logo_black 2</title>
|
|
4
|
-
<g id="Login" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="Con-DNI---01" transform="translate(-1039.000000, -389.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
|
6
|
-
<g id="Group-27" transform="translate(887.000000, 167.000000)">
|
|
7
|
-
<g id="Group-23" transform="translate(17.000000, 212.000000)">
|
|
8
|
-
<g id="Group-15" transform="translate(123.000000, 0.000000)">
|
|
9
|
-
<g id="Apple_logo_black" transform="translate(12.600000, 10.800000)">
|
|
10
|
-
<path d="M18.5424591,17.5224972 C18.2024218,18.3080534 17.7999282,19.0311534 17.3335909,19.6959621 C16.6979284,20.6022652 16.1774629,21.2296004 15.7763572,21.5779659 C15.1545744,22.1497841 14.4883782,22.4426326 13.774993,22.4592879 C13.2628549,22.4592879 12.6452354,22.3135568 11.9262989,22.0179337 C11.205003,21.7236951 10.5421377,21.5779659 9.93603788,21.5779659 C9.30037576,21.5779659 8.61863485,21.7236951 7.88942784,22.0179337 C7.15910966,22.3135568 6.57077557,22.4676155 6.12095417,22.4828826 C5.43685398,22.5120284 4.754975,22.2108523 4.07434413,21.5779659 C3.63992917,21.1990663 3.09656307,20.5495246 2.44563352,19.6293409 C1.74723818,18.646703 1.17306038,17.5072301 0.723239167,16.2081477 C0.241496117,14.804972 0,13.4462095 0,12.1307502 C0,10.6238979 0.32560339,9.32426023 0.97778161,8.23516818 C1.49033625,7.36036989 2.17221572,6.67030152 3.02564034,6.16371458 C3.87906572,5.65712841 4.80119223,5.39897746 5.7942411,5.38246098 C6.33760682,5.38246098 7.05015966,5.55053674 7.93564508,5.88085909 C8.81863258,6.21229167 9.38559337,6.38036742 9.63416742,6.38036742 C9.82000833,6.38036742 10.4498413,6.1838392 11.5175595,5.79203314 C12.5272634,5.4286786 13.379439,5.27822879 14.077557,5.33749242 C15.9692767,5.4901625 17.3904951,6.23588598 18.335661,7.57938144 C16.6438006,8.60449091 15.8068915,10.0402822 15.8235462,11.8821756 C15.8388133,13.3168564 16.3592788,14.5107352 17.3821674,15.4586775 C17.8457286,15.8986437 18.3634189,16.2386814 18.9393996,16.4801778 C18.8144896,16.8424218 18.6826383,17.1893991 18.5424591,17.5224972 Z M14.2038572,0.449834034 C14.2038572,1.57433081 13.7930356,2.62427027 12.9741701,3.59608333 C11.9859784,4.75137898 10.7907121,5.41896269 9.49454394,5.31362064 C9.47802803,5.17871572 9.46845133,5.03673295 9.46845133,4.88753295 C9.46845133,3.80801723 9.93839735,2.65272216 10.7729472,1.7081115 C11.1895966,1.22983858 11.7195002,0.832161117 12.3621021,0.514926269 C13.0033157,0.202424754 13.609832,0.0296046856 14.1802619,9.98757121e-06 C14.196918,0.15033764 14.2038572,0.300674754 14.2038572,0.449819451 L14.2038572,0.449834034 Z" id="path4"></path>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|