@npm_leadtech/legal-lib-components 5.16.9 → 5.17.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/dist/css/styles.css +1 -1
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.js +1 -1
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.tsx +3 -0
- package/dist/src/components/atoms/GoogleButton/GoogleButton.js +2 -2
- package/dist/src/components/atoms/GoogleButton/GoogleButton.tsx +2 -2
- package/dist/src/components/atoms/GoogleButton/GoogleButtonProps.types.d.ts +0 -1
- package/dist/src/components/atoms/GoogleButton/GoogleButtonProps.types.ts +0 -1
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.d.ts +1 -0
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.ts +1 -0
- package/dist/src/components/atoms/SearchSelect/SearchSelect.styled.js +1 -1
- package/dist/src/components/atoms/SearchSelect/SearchSelect.styled.ts +1 -1
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.js +12 -0
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.tsx +12 -0
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.js +8 -1
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.ts +8 -1
- package/dist/src/components/molecules/TextInput/TextInput.scss +1 -1
- package/dist/src/components/organisms/LoginRatafiaContent/LoginRatafiaContent.js +3 -4
- package/dist/src/components/organisms/LoginRatafiaContent/LoginRatafiaContent.styled.js +0 -7
- package/dist/src/components/organisms/LoginRatafiaContent/LoginRatafiaContent.styled.ts +0 -7
- package/dist/src/components/organisms/LoginRatafiaContent/LoginRatafiaContent.tsx +2 -8
- package/dist/src/components/pages/LoginRatafiaPage/LoginRatafiaPage.styled.js +2 -8
- package/dist/src/components/pages/LoginRatafiaPage/LoginRatafiaPage.styled.ts +2 -8
- package/package.json +1 -1
package/dist/css/styles.css
CHANGED
|
@@ -16,6 +16,6 @@ export const DisclaimerRatafia = ({ icon, text, ctaTextShowDisclaimer, ctaTextCl
|
|
|
16
16
|
ctaTextCloseDisclaimer.onClick();
|
|
17
17
|
};
|
|
18
18
|
const existLegalAdviceText = Boolean(legalAdviceText);
|
|
19
|
-
return (_jsxs(DisclaimerRatafiaStyled, { className: 'disclaimer-ratafia', children: [_jsxs("div", { className: 'disclaimer-ratafia__text-desktop', children: [_jsxs("div", { className: 'disclaimer-ratafia__text', children: [_jsx("div", { className: 'disclaimer-ratafia__text__icon', children: icon }), _jsx("p", { className: 'sans-serif --small disclaimer-ratafia__text__text', children: text })] }), existLegalAdviceText && (_jsx("div", { className: 'disclaimer-ratafia__legal-advice', children: _jsx("span", { className: 'sans-serif --extra-small disclaimer-ratafia__copyright__text', children: legalAdviceText }) })), _jsx("div", { className: 'disclaimer-ratafia__copyright', children: _jsx("span", { className: 'sans-serif --extra-small disclaimer-ratafia__copyright__text', children: copyrightText }) })] }), _jsxs("div", { className: 'disclaimer-ratafia__text-mobile', children: [_jsx("div", { className: 'disclaimer-ratafia__text-mobile-text', children: _jsxs("button", { "data-qa": ctaTextShowDisclaimer.dataQa, className: 'sans-serif --small disclaimer-ratafia__text__text', onClick: handleShowDisclaimer, children: [_jsx("div", { className: 'disclaimer-ratafia__text__icon', children: icon }), ctaTextShowDisclaimer.text, _jsx("div", { className: 'disclaimer-ratafia__text__arrow', children: _jsx(ChevronRight, {}) })] }) }), disclaimer && (_jsxs(_Fragment, { children: [_jsx("div", { className: 'disclaimer-ratafia__disclaimer-background' }), _jsxs("div", { className: 'disclaimer-ratafia__disclaimer-fixed', children: [_jsx("p", { className: 'disclaimer-ratafia__disclaimer-fixed__title', children: ctaTextShowDisclaimer.text }), _jsx("p", { className: 'sans-serif --small disclaimer-ratafia__disclaimer-fixed__subTitle', children: text }), _jsx("div", { className: 'sans-serif --small disclaimer-ratafia__disclaimer-fixed__text', children: copyrightText }), _jsx(Button, { color: 'primary', label: ctaTextCloseDisclaimer.text, givenClass: 'disclaimer-ratafia__disclaimer-fixed__cta', onClick: handleCloseDisclaimer, noLink: true, dataQa: ctaTextCloseDisclaimer.dataQa })] })] }))] })] }));
|
|
19
|
+
return (_jsxs(DisclaimerRatafiaStyled, { className: 'disclaimer-ratafia', children: [_jsxs("div", { className: 'disclaimer-ratafia__text-desktop', children: [_jsxs("div", { className: 'disclaimer-ratafia__text', children: [_jsx("div", { className: 'disclaimer-ratafia__text__icon', children: icon }), _jsx("p", { className: 'sans-serif --small disclaimer-ratafia__text__text', children: text })] }), existLegalAdviceText && (_jsx("div", { className: 'disclaimer-ratafia__legal-advice', children: _jsx("span", { className: 'sans-serif --extra-small disclaimer-ratafia__copyright__text', children: legalAdviceText }) })), _jsx("div", { className: 'disclaimer-ratafia__copyright', children: _jsx("span", { className: 'sans-serif --extra-small disclaimer-ratafia__copyright__text', children: copyrightText }) })] }), _jsxs("div", { className: 'disclaimer-ratafia__text-mobile', children: [_jsx("div", { className: 'disclaimer-ratafia__text-mobile-text', children: _jsxs("button", { "data-qa": ctaTextShowDisclaimer.dataQa, className: 'sans-serif --small disclaimer-ratafia__text__text', onClick: handleShowDisclaimer, children: [_jsx("div", { className: 'disclaimer-ratafia__text__icon', children: icon }), ctaTextShowDisclaimer.text, _jsx("div", { className: 'disclaimer-ratafia__text__arrow', children: _jsx(ChevronRight, {}) })] }) }), disclaimer && (_jsxs(_Fragment, { children: [_jsx("div", { className: 'disclaimer-ratafia__disclaimer-background' }), _jsxs("div", { className: 'disclaimer-ratafia__disclaimer-fixed', children: [_jsx("p", { className: 'disclaimer-ratafia__disclaimer-fixed__title', children: ctaTextShowDisclaimer.text }), _jsx("p", { className: 'sans-serif --small disclaimer-ratafia__disclaimer-fixed__subTitle', children: text }), existLegalAdviceText && (_jsx("div", { className: 'sans-serif --small disclaimer-ratafia__disclaimer-fixed__text', children: legalAdviceText })), _jsx("div", { className: 'sans-serif --small disclaimer-ratafia__disclaimer-fixed__text', children: copyrightText }), _jsx(Button, { color: 'primary', label: ctaTextCloseDisclaimer.text, givenClass: 'disclaimer-ratafia__disclaimer-fixed__cta', onClick: handleCloseDisclaimer, noLink: true, dataQa: ctaTextCloseDisclaimer.dataQa })] })] }))] })] }));
|
|
20
20
|
};
|
|
21
21
|
export default DisclaimerRatafia;
|
|
@@ -65,6 +65,9 @@ export const DisclaimerRatafia: React.FC<DisclaimerRatafiaProps> = ({
|
|
|
65
65
|
<div className='disclaimer-ratafia__disclaimer-fixed'>
|
|
66
66
|
<p className='disclaimer-ratafia__disclaimer-fixed__title'>{ctaTextShowDisclaimer.text}</p>
|
|
67
67
|
<p className='sans-serif --small disclaimer-ratafia__disclaimer-fixed__subTitle'>{text}</p>
|
|
68
|
+
{existLegalAdviceText && (
|
|
69
|
+
<div className='sans-serif --small disclaimer-ratafia__disclaimer-fixed__text'>{legalAdviceText}</div>
|
|
70
|
+
)}
|
|
68
71
|
<div className='sans-serif --small disclaimer-ratafia__disclaimer-fixed__text'>{copyrightText}</div>
|
|
69
72
|
<Button
|
|
70
73
|
color='primary'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { GoogleButtonStyled } from './GoogleButton.styled';
|
|
3
3
|
import logoGoogle from '../../../../images/svg/logo-google.svg';
|
|
4
|
-
const GoogleButton = ({ onClick, label = 'Log In with Google'
|
|
5
|
-
return (_jsxs(GoogleButtonStyled, { type: 'button', className: 'google-button', onClick: onClick,
|
|
4
|
+
const GoogleButton = ({ onClick, label = 'Log In with Google' }) => {
|
|
5
|
+
return (_jsxs(GoogleButtonStyled, { type: 'button', className: 'google-button', onClick: onClick, children: [_jsx("img", { className: 'google-logo', src: logoGoogle, alt: '' }), _jsx("span", { children: label })] }));
|
|
6
6
|
};
|
|
7
7
|
export default GoogleButton;
|
|
@@ -4,9 +4,9 @@ import { type GoogleButtonProps } from './GoogleButtonProps.types'
|
|
|
4
4
|
import { GoogleButtonStyled } from './GoogleButton.styled'
|
|
5
5
|
import logoGoogle from '../../../../images/svg/logo-google.svg'
|
|
6
6
|
|
|
7
|
-
const GoogleButton: FC<GoogleButtonProps> = ({ onClick, label = 'Log In with Google'
|
|
7
|
+
const GoogleButton: FC<GoogleButtonProps> = ({ onClick, label = 'Log In with Google' }) => {
|
|
8
8
|
return (
|
|
9
|
-
<GoogleButtonStyled type='button' className='google-button' onClick={onClick}
|
|
9
|
+
<GoogleButtonStyled type='button' className='google-button' onClick={onClick}>
|
|
10
10
|
<img className='google-logo' src={logoGoogle} alt=''></img>
|
|
11
11
|
<span>{label}</span>
|
|
12
12
|
</GoogleButtonStyled>
|
|
@@ -9,6 +9,7 @@ const BottomOverlay = ({ givenClass, header, body, open = false, onClose, footer
|
|
|
9
9
|
const overlayBackground = useRef(null);
|
|
10
10
|
const overlayMessage = useRef(null);
|
|
11
11
|
useEffect(() => {
|
|
12
|
+
handleBodyScroll(open);
|
|
12
13
|
if (open) {
|
|
13
14
|
const backgroundElement = overlayBackground.current;
|
|
14
15
|
backgroundElement.addEventListener('mousedown', handleCloseModal);
|
|
@@ -17,6 +18,17 @@ const BottomOverlay = ({ givenClass, header, body, open = false, onClose, footer
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
}, [open]);
|
|
21
|
+
const handleBodyScroll = (disableScroll) => {
|
|
22
|
+
if (disableScroll) {
|
|
23
|
+
document.body.style.overflow = 'hidden';
|
|
24
|
+
document.body.style.position = 'fixed';
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
document.body.style.overflow = 'unset';
|
|
28
|
+
document.body.style.position = 'relative';
|
|
29
|
+
document.body.style.width = '100%';
|
|
30
|
+
}
|
|
31
|
+
};
|
|
20
32
|
const handleCloseModal = (event) => {
|
|
21
33
|
if (onClose != null)
|
|
22
34
|
onClose();
|
|
@@ -12,6 +12,7 @@ const BottomOverlay: FC<BottomOverlayProps> = ({ givenClass, header, body, open
|
|
|
12
12
|
const overlayMessage = useRef<HTMLDivElement | null>(null)
|
|
13
13
|
|
|
14
14
|
useEffect(() => {
|
|
15
|
+
handleBodyScroll(open)
|
|
15
16
|
if (open) {
|
|
16
17
|
const backgroundElement = overlayBackground.current as HTMLElement
|
|
17
18
|
backgroundElement.addEventListener('mousedown', handleCloseModal)
|
|
@@ -21,6 +22,17 @@ const BottomOverlay: FC<BottomOverlayProps> = ({ givenClass, header, body, open
|
|
|
21
22
|
}
|
|
22
23
|
}, [open])
|
|
23
24
|
|
|
25
|
+
const handleBodyScroll = (disableScroll: boolean): void => {
|
|
26
|
+
if (disableScroll) {
|
|
27
|
+
document.body.style.overflow = 'hidden'
|
|
28
|
+
document.body.style.position = 'fixed'
|
|
29
|
+
} else {
|
|
30
|
+
document.body.style.overflow = 'unset'
|
|
31
|
+
document.body.style.position = 'relative'
|
|
32
|
+
document.body.style.width = '100%'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
const handleCloseModal = (event: MouseEvent): void => {
|
|
25
37
|
if (onClose != null) onClose()
|
|
26
38
|
}
|
package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
export const RatafiaSubscriptionCardStyled = styled.div `
|
|
3
4
|
display: flex;
|
|
4
5
|
flex-flow: column nowrap;
|
|
5
6
|
flex: 1;
|
|
6
7
|
gap: 0.5rem;
|
|
7
|
-
min-width:
|
|
8
|
+
min-width: 270px;
|
|
8
9
|
padding: 1rem;
|
|
9
10
|
border-radius: var(--global-border-radius);
|
|
10
11
|
|
|
@@ -90,5 +91,11 @@ export const RatafiaSubscriptionCardStyled = styled.div `
|
|
|
90
91
|
display: flex;
|
|
91
92
|
margin-top: 1.5rem;
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
@media ${device.mobile} {
|
|
96
|
+
&__button {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
93
100
|
}
|
|
94
101
|
`;
|
package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints'
|
|
1
2
|
import styled from 'styled-components'
|
|
2
3
|
|
|
3
4
|
export const RatafiaSubscriptionCardStyled = styled.div`
|
|
@@ -5,7 +6,7 @@ export const RatafiaSubscriptionCardStyled = styled.div`
|
|
|
5
6
|
flex-flow: column nowrap;
|
|
6
7
|
flex: 1;
|
|
7
8
|
gap: 0.5rem;
|
|
8
|
-
min-width:
|
|
9
|
+
min-width: 270px;
|
|
9
10
|
padding: 1rem;
|
|
10
11
|
border-radius: var(--global-border-radius);
|
|
11
12
|
|
|
@@ -91,5 +92,11 @@ export const RatafiaSubscriptionCardStyled = styled.div`
|
|
|
91
92
|
display: flex;
|
|
92
93
|
margin-top: 1.5rem;
|
|
93
94
|
}
|
|
95
|
+
|
|
96
|
+
@media ${device.mobile} {
|
|
97
|
+
&__button {
|
|
98
|
+
flex: 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
`
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox } from '../../atoms';
|
|
3
|
-
import { TextInput } from '../../molecules';
|
|
4
2
|
import { LoginRatafiaContentStyled } from './LoginRatafiaContent.styled';
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { TextInput } from '../../molecules';
|
|
4
|
+
const LoginRatafiaContent = ({ title, email }) => {
|
|
5
|
+
return (_jsxs(LoginRatafiaContentStyled, { children: [_jsx("h2", { className: 'login-ratafia-content__title', children: title }), _jsx("div", { className: 'login-ratafia-content__email', children: _jsx(TextInput, { ...email }) })] }));
|
|
7
6
|
};
|
|
8
7
|
export default LoginRatafiaContent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { device } from '../../../globalStyles/breakpoints';
|
|
2
1
|
import styled from 'styled-components';
|
|
3
2
|
export const LoginRatafiaContentStyled = styled.div `
|
|
4
3
|
width: 100%;
|
|
@@ -12,10 +11,4 @@ export const LoginRatafiaContentStyled = styled.div `
|
|
|
12
11
|
margin-bottom: 0.5rem;
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
|
-
.login-ratafia-content__policy {
|
|
16
|
-
margin-top: 1rem;
|
|
17
|
-
@media ${device['portrait-tablets']} {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
14
|
`;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { device } from '../../../globalStyles/breakpoints'
|
|
2
1
|
import styled from 'styled-components'
|
|
3
2
|
|
|
4
3
|
export const LoginRatafiaContentStyled = styled.div`
|
|
@@ -13,10 +12,4 @@ export const LoginRatafiaContentStyled = styled.div`
|
|
|
13
12
|
margin-bottom: 0.5rem;
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
.login-ratafia-content__policy {
|
|
17
|
-
margin-top: 1rem;
|
|
18
|
-
@media ${device['portrait-tablets']} {
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
15
|
`
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import React, { type FC } from 'react'
|
|
2
2
|
|
|
3
3
|
import { type LoginRatafiaContentProps } from './LoginRatafiaContentProps.types'
|
|
4
|
-
|
|
5
|
-
import { Checkbox } from '../../atoms'
|
|
6
|
-
import { TextInput } from '../../molecules'
|
|
7
|
-
|
|
8
4
|
import { LoginRatafiaContentStyled } from './LoginRatafiaContent.styled'
|
|
5
|
+
import { TextInput } from '../../molecules'
|
|
9
6
|
|
|
10
|
-
const LoginRatafiaContent: FC<LoginRatafiaContentProps> = ({ title, email
|
|
7
|
+
const LoginRatafiaContent: FC<LoginRatafiaContentProps> = ({ title, email }) => {
|
|
11
8
|
return (
|
|
12
9
|
<LoginRatafiaContentStyled>
|
|
13
10
|
<h2 className='login-ratafia-content__title'>{title}</h2>
|
|
14
11
|
<div className='login-ratafia-content__email'>
|
|
15
12
|
<TextInput {...email} />
|
|
16
13
|
</div>
|
|
17
|
-
<div className='login-ratafia-content__policy'>
|
|
18
|
-
<Checkbox {...policy} />
|
|
19
|
-
</div>
|
|
20
14
|
</LoginRatafiaContentStyled>
|
|
21
15
|
)
|
|
22
16
|
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export const LoginRatafiaPageStyled = styled.div `
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
flex: 1 0 0;
|
|
7
|
-
align-self: stretch;
|
|
8
|
-
gap: 1.5rem;
|
|
9
3
|
background-color: var(--neutral-neutral-6);
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
&__ctas {
|
|
12
6
|
text-align: center;
|
|
13
7
|
&__button {
|
|
14
8
|
display: block;
|
|
15
|
-
width:
|
|
9
|
+
width: 100%;
|
|
16
10
|
margin-bottom: 1rem;
|
|
17
11
|
}
|
|
18
12
|
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import styled from 'styled-components'
|
|
2
2
|
|
|
3
3
|
export const LoginRatafiaPageStyled = styled.div`
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: flex-start;
|
|
7
|
-
flex: 1 0 0;
|
|
8
|
-
align-self: stretch;
|
|
9
|
-
gap: 1.5rem;
|
|
10
4
|
background-color: var(--neutral-neutral-6);
|
|
11
5
|
|
|
12
|
-
|
|
6
|
+
&__ctas {
|
|
13
7
|
text-align: center;
|
|
14
8
|
&__button {
|
|
15
9
|
display: block;
|
|
16
|
-
width:
|
|
10
|
+
width: 100%;
|
|
17
11
|
margin-bottom: 1rem;
|
|
18
12
|
}
|
|
19
13
|
|