datastake-daf 0.6.587 → 0.6.588
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/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/dist/hooks/index.js +4656 -16
- package/dist/layouts/index.js +16 -869
- package/dist/style/datastake/datastake.css +1 -1
- package/dist/utils/index.js +22 -1
- package/package.json +1 -1
- package/src/@daf/layouts/AppLayout/components/Notifications/index.js +1 -1
- package/src/@daf/utils/theme.js +1 -0
- package/src/helpers/theme.js +29 -1
- package/src/layouts.js +1 -2
- package/src/styles/datastake/datastake.css +1 -1
- package/src/@daf/layouts/AuthLayout/AuthLayout.stories.js +0 -502
- package/src/@daf/layouts/AuthLayout/components/Navbar/config.js +0 -43
- package/src/@daf/layouts/AuthLayout/components/Navbar/index.jsx +0 -76
- package/src/@daf/layouts/AuthLayout/components/Navbar/index.scss +0 -173
- package/src/@daf/layouts/AuthLayout/components/Navbar/style.js +0 -305
- package/src/@daf/layouts/AuthLayout/index.jsx +0 -85
- package/src/@daf/layouts/AuthLayout/style.js +0 -401
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Select } from "antd";
|
|
3
|
-
import { formatClassname } from "../../../../../helpers/ClassesHelper.js";
|
|
4
|
-
import Style, { GlobalNavbarStyles } from './style';
|
|
5
|
-
|
|
6
|
-
const AuthNavbar = ({
|
|
7
|
-
logo,
|
|
8
|
-
appName = "default",
|
|
9
|
-
showLanguageSelector = true,
|
|
10
|
-
updateLanguage,
|
|
11
|
-
languageConfig = [
|
|
12
|
-
{ value: "en", label: "EN", flagUrl: "/assets/images/countries/gb.png" },
|
|
13
|
-
{ value: "fr", label: "FR", flagUrl: "/assets/images/countries/fr.png" },
|
|
14
|
-
{ value: "sp", label: "ES", flagUrl: "/assets/images/countries/sp.png" },
|
|
15
|
-
],
|
|
16
|
-
showBack = false,
|
|
17
|
-
backLabel = "Back",
|
|
18
|
-
onBack,
|
|
19
|
-
}) => {
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<GlobalNavbarStyles />
|
|
23
|
-
<Style className={formatClassname([showBack && 'bordered'])}>
|
|
24
|
-
<div className="d-navbar">
|
|
25
|
-
<div className="main-cont d-container">
|
|
26
|
-
<div className="left">
|
|
27
|
-
{logo && (
|
|
28
|
-
<img className="navbar-logo" src={logo} alt={`${appName} logo`} />
|
|
29
|
-
)}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div className="right">
|
|
33
|
-
{showLanguageSelector && updateLanguage && (
|
|
34
|
-
<Select
|
|
35
|
-
className="language-select"
|
|
36
|
-
defaultValue={localStorage.getItem("datastakeLng") || "en"}
|
|
37
|
-
onChange={(lng) => updateLanguage(lng)}
|
|
38
|
-
popupClassName={formatClassname([
|
|
39
|
-
"language-select-popup",
|
|
40
|
-
appName,
|
|
41
|
-
])}
|
|
42
|
-
suffixIcon={
|
|
43
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
44
|
-
<path d="M5 7.5L10 12.5L15 7.5" stroke="#667085" strokeWidth="1.66667" strokeLinecap="round" strokeLinejoin="round"/>
|
|
45
|
-
</svg>
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
{languageConfig.map((lang) => (
|
|
49
|
-
<Select.Option key={lang.value} value={lang.value}>
|
|
50
|
-
<div className="language-option">
|
|
51
|
-
<img
|
|
52
|
-
src={lang.flagUrl}
|
|
53
|
-
alt={lang.label}
|
|
54
|
-
className="flag-icon"
|
|
55
|
-
/>
|
|
56
|
-
<span>{lang.label}</span>
|
|
57
|
-
</div>
|
|
58
|
-
</Select.Option>
|
|
59
|
-
))}
|
|
60
|
-
</Select>
|
|
61
|
-
)}
|
|
62
|
-
|
|
63
|
-
{showBack && (
|
|
64
|
-
<button className="back-btn" onClick={onBack}>
|
|
65
|
-
{backLabel}
|
|
66
|
-
</button>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</Style>
|
|
72
|
-
</>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default AuthNavbar;
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
.auth-navbar {
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 64px;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
background: #ffffff;
|
|
11
|
-
border-bottom: 1px solid #eaecf0;
|
|
12
|
-
padding: 0 80px;
|
|
13
|
-
position: sticky;
|
|
14
|
-
top: 0;
|
|
15
|
-
z-index: 10;
|
|
16
|
-
|
|
17
|
-
@media (max-width: 1200px) {
|
|
18
|
-
padding: 0 32px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.navbar-left {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
|
|
25
|
-
.navbar-logo {
|
|
26
|
-
height: 32px;
|
|
27
|
-
object-fit: contain;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.navbar-right {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
gap: 12px;
|
|
35
|
-
|
|
36
|
-
.language-select {
|
|
37
|
-
min-width: 110px;
|
|
38
|
-
|
|
39
|
-
.ant-select-selector {
|
|
40
|
-
background: #fff !important;
|
|
41
|
-
border: 1px solid #d0d5dd !important;
|
|
42
|
-
border-radius: 8px !important;
|
|
43
|
-
padding: 8px 12px !important;
|
|
44
|
-
height: 40px !important;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
transition: all 0.2s ease;
|
|
48
|
-
|
|
49
|
-
&:hover {
|
|
50
|
-
border-color: #98a2b3 !important;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ant-select-selection-item {
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
padding-right: 0 !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.language-option {
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
gap: 8px;
|
|
64
|
-
|
|
65
|
-
.flag-icon {
|
|
66
|
-
width: 20px;
|
|
67
|
-
height: 14px;
|
|
68
|
-
object-fit: cover;
|
|
69
|
-
border-radius: 2px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
span {
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
font-weight: 500;
|
|
75
|
-
color: #344054;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.ant-select-arrow {
|
|
80
|
-
color: #667085;
|
|
81
|
-
right: 12px;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
svg {
|
|
85
|
-
width: 20px;
|
|
86
|
-
height: 20px;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.back-btn {
|
|
92
|
-
border: 1px solid #d0d5dd;
|
|
93
|
-
background: #fff;
|
|
94
|
-
border-radius: 8px;
|
|
95
|
-
padding: 10px 16px;
|
|
96
|
-
height: 40px;
|
|
97
|
-
font-size: 14px;
|
|
98
|
-
font-weight: 600;
|
|
99
|
-
color: #344054;
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
transition: all 0.2s ease;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
background: #f9fafb;
|
|
106
|
-
border-color: #98a2b3;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:active {
|
|
110
|
-
background: #f2f4f7;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@media (max-width: 768px) {
|
|
116
|
-
padding: 0 16px;
|
|
117
|
-
.navbar-logo { height: 28px; }
|
|
118
|
-
.navbar-right { gap: 8px; }
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.language-select-popup {
|
|
123
|
-
.ant-select-dropdown {
|
|
124
|
-
padding: 4px;
|
|
125
|
-
background: #ffffff;
|
|
126
|
-
border-radius: 8px;
|
|
127
|
-
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
|
|
128
|
-
0px 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
129
|
-
border: none !important;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.ant-select-item {
|
|
133
|
-
border-radius: 6px;
|
|
134
|
-
padding: 8px 12px;
|
|
135
|
-
min-height: 40px;
|
|
136
|
-
transition: all 0.2s ease;
|
|
137
|
-
|
|
138
|
-
&:hover {
|
|
139
|
-
background-color: #265a80;
|
|
140
|
-
|
|
141
|
-
.language-option span {
|
|
142
|
-
color: #ffffff;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&.ant-select-item-option-selected {
|
|
147
|
-
background-color: #265a80;
|
|
148
|
-
color: #ffffff;
|
|
149
|
-
|
|
150
|
-
.language-option span {
|
|
151
|
-
color: #ffffff;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.language-option {
|
|
156
|
-
display: flex;
|
|
157
|
-
align-items: center;
|
|
158
|
-
gap: 8px;
|
|
159
|
-
|
|
160
|
-
.flag-icon {
|
|
161
|
-
width: 20px;
|
|
162
|
-
height: 14px;
|
|
163
|
-
border-radius: 2px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
span {
|
|
167
|
-
font-size: 14px;
|
|
168
|
-
font-weight: 500;
|
|
169
|
-
color: #344054;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import styled, { createGlobalStyle } from "styled-components";
|
|
2
|
-
import { MOBILE_WIDTH, TABLET_WIDTH } from "datastake-daf/src/constants/Style";
|
|
3
|
-
|
|
4
|
-
// Global styles for portaled elements (dropdowns, modals, etc.)
|
|
5
|
-
export const GlobalNavbarStyles = createGlobalStyle`
|
|
6
|
-
.language-select-popup {
|
|
7
|
-
.ant-select-dropdown {
|
|
8
|
-
padding: 4px;
|
|
9
|
-
background: #ffffff;
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
|
|
12
|
-
0px 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
13
|
-
border: none !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ant-select-item {
|
|
17
|
-
border-radius: 6px;
|
|
18
|
-
padding: 8px 12px;
|
|
19
|
-
min-height: 40px;
|
|
20
|
-
transition: all 0.2s ease;
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background-color: #265a80;
|
|
24
|
-
|
|
25
|
-
.language-option span {
|
|
26
|
-
color: #ffffff;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.ant-select-item-option-selected {
|
|
31
|
-
background-color: #265a80;
|
|
32
|
-
color: #ffffff;
|
|
33
|
-
|
|
34
|
-
.language-option span {
|
|
35
|
-
color: #ffffff;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.language-option {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: 8px;
|
|
43
|
-
|
|
44
|
-
.flag-icon {
|
|
45
|
-
width: 20px;
|
|
46
|
-
height: 14px;
|
|
47
|
-
border-radius: 2px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
span {
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
font-weight: 500;
|
|
53
|
-
color: #344054;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
const style = styled.div`
|
|
61
|
-
font-family: Outfit;
|
|
62
|
-
|
|
63
|
-
.btns {
|
|
64
|
-
display: flex;
|
|
65
|
-
gap: 12px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.d-container {
|
|
69
|
-
width: 80vw;
|
|
70
|
-
margin-left: auto;
|
|
71
|
-
margin-right: auto;
|
|
72
|
-
|
|
73
|
-
@media (max-width: 1440px) {
|
|
74
|
-
width: 85vw;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@media (${TABLET_WIDTH}) {
|
|
78
|
-
width: calc(100vw - 4.6rem);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.flex-c {
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.jus-c {
|
|
88
|
-
justify-content: center;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.d-navbar {
|
|
92
|
-
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
93
|
-
position: fixed;
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
background-color: white;
|
|
98
|
-
z-index: 1000;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 80px;
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
|
|
104
|
-
@media (${TABLET_WIDTH}) {
|
|
105
|
-
height: 72px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@media (${MOBILE_WIDTH}) {
|
|
109
|
-
height: 64px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.main-cont {
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: space-between;
|
|
116
|
-
width: 100%;
|
|
117
|
-
height: 100%;
|
|
118
|
-
padding: 0 80px;
|
|
119
|
-
|
|
120
|
-
@media (max-width: 1200px) {
|
|
121
|
-
padding: 0 32px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
@media (${TABLET_WIDTH}) {
|
|
125
|
-
padding: 0 24px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
@media (${MOBILE_WIDTH}) {
|
|
129
|
-
padding: 0 16px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.left {
|
|
133
|
-
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
|
-
height: 100%;
|
|
136
|
-
|
|
137
|
-
.navbar-logo {
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
height: 40px;
|
|
140
|
-
width: auto;
|
|
141
|
-
object-fit: contain;
|
|
142
|
-
|
|
143
|
-
@media (${MOBILE_WIDTH}) {
|
|
144
|
-
height: 32px;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
img {
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
height: 40px;
|
|
151
|
-
width: auto;
|
|
152
|
-
object-fit: contain;
|
|
153
|
-
|
|
154
|
-
@media (${MOBILE_WIDTH}) {
|
|
155
|
-
height: 32px;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.right {
|
|
161
|
-
display: flex;
|
|
162
|
-
gap: 1rem;
|
|
163
|
-
align-items: center;
|
|
164
|
-
|
|
165
|
-
.language-select {
|
|
166
|
-
min-width: 100px;
|
|
167
|
-
|
|
168
|
-
.ant-select-selector {
|
|
169
|
-
padding: 8px 12px !important;
|
|
170
|
-
height: auto !important;
|
|
171
|
-
border: none !important;
|
|
172
|
-
|
|
173
|
-
.ant-select-selection-item {
|
|
174
|
-
padding: 0 !important;
|
|
175
|
-
line-height: none !important;
|
|
176
|
-
&:hover{
|
|
177
|
-
background-color: transparent !important;
|
|
178
|
-
border: none !important;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.ant-select-arrow {
|
|
184
|
-
color: #667085;
|
|
185
|
-
display: flex;
|
|
186
|
-
align-items: center;
|
|
187
|
-
height: 80%;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.language-option {
|
|
192
|
-
display: flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
gap: 8px;
|
|
195
|
-
|
|
196
|
-
.flag-icon {
|
|
197
|
-
width: 20px;
|
|
198
|
-
height: 15px;
|
|
199
|
-
object-fit: cover;
|
|
200
|
-
border-radius: 2px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
span {
|
|
204
|
-
font-size: 14px;
|
|
205
|
-
font-weight: 500;
|
|
206
|
-
color: #344054;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.back-btn {
|
|
211
|
-
background: transparent;
|
|
212
|
-
border: 1px solid #D0D5DD;
|
|
213
|
-
border-radius: 8px;
|
|
214
|
-
padding: 8px 16px;
|
|
215
|
-
font-size: 14px;
|
|
216
|
-
font-weight: 500;
|
|
217
|
-
color: #344054;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
transition: all 0.2s ease;
|
|
220
|
-
box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
|
|
221
|
-
|
|
222
|
-
&:hover {
|
|
223
|
-
background: #F9FAFB;
|
|
224
|
-
border-color: #98A2B3;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&:active {
|
|
228
|
-
transform: scale(0.98);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.ant-btn {
|
|
233
|
-
font-size: 14px;
|
|
234
|
-
padding: 6px 0;
|
|
235
|
-
text-align: center;
|
|
236
|
-
width: 70px;
|
|
237
|
-
|
|
238
|
-
@media (${MOBILE_WIDTH}) {
|
|
239
|
-
padding: 3px 0;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
@media (max-width: 1070px) {
|
|
244
|
-
gap: 1rem;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
&.bordered {
|
|
251
|
-
.d-navbar {
|
|
252
|
-
position: relative;
|
|
253
|
-
box-shadow: unset;
|
|
254
|
-
border-bottom: 1px solid var(--base-gray-40);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.tazama-extra {
|
|
259
|
-
&.mobile {
|
|
260
|
-
display: none;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@media (${MOBILE_WIDTH}) {
|
|
264
|
-
&.mobile {
|
|
265
|
-
display: flex;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
&.desktop {
|
|
269
|
-
display: none;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.ant-btn {
|
|
274
|
-
width: 90px !important;
|
|
275
|
-
display: flex;
|
|
276
|
-
flex-direction: column;
|
|
277
|
-
justify-content: center;
|
|
278
|
-
|
|
279
|
-
&.w-100 {
|
|
280
|
-
width: 100% !important;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
span {
|
|
284
|
-
margin: 0 auto;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.nav-extra {
|
|
289
|
-
position: fixed;
|
|
290
|
-
top: 0;
|
|
291
|
-
left: 0;
|
|
292
|
-
height: 100dvh;
|
|
293
|
-
width: 100%;
|
|
294
|
-
background: white;
|
|
295
|
-
margin-left: -100%;
|
|
296
|
-
transition: 0.4s margin-left;
|
|
297
|
-
|
|
298
|
-
&.toggled {
|
|
299
|
-
margin-left: 0;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
`;
|
|
304
|
-
|
|
305
|
-
export default style;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import AuthNavbar from "./components/Navbar/index.jsx";
|
|
3
|
-
import { formatClassname } from "../../../helpers/ClassesHelper.js";
|
|
4
|
-
import Style from './style';
|
|
5
|
-
|
|
6
|
-
const AuthLayout = ({
|
|
7
|
-
children,
|
|
8
|
-
StyleComponent,
|
|
9
|
-
t = (key) => key,
|
|
10
|
-
title = "Welcome Back",
|
|
11
|
-
subTitle = "Please introduce yourself",
|
|
12
|
-
logo,
|
|
13
|
-
appName = "default",
|
|
14
|
-
containerClassName = "",
|
|
15
|
-
leftClassName = "",
|
|
16
|
-
rightClassName = "",
|
|
17
|
-
rightImgClassName = "",
|
|
18
|
-
rightImageUrl,
|
|
19
|
-
additionalContent,
|
|
20
|
-
showTopHeader = true,
|
|
21
|
-
showLanguageSelector = true,
|
|
22
|
-
updateLanguage,
|
|
23
|
-
showBack = false,
|
|
24
|
-
onBack,
|
|
25
|
-
backLabel = "Back",
|
|
26
|
-
}) => {
|
|
27
|
-
const Wrapper = StyleComponent || "div";
|
|
28
|
-
const wrapperClassName = formatClassname([
|
|
29
|
-
"auth-layout",
|
|
30
|
-
appName,
|
|
31
|
-
containerClassName,
|
|
32
|
-
]);
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<>
|
|
38
|
-
{showTopHeader && (
|
|
39
|
-
<AuthNavbar
|
|
40
|
-
logo={logo}
|
|
41
|
-
appName={appName}
|
|
42
|
-
showLanguageSelector={showLanguageSelector}
|
|
43
|
-
updateLanguage={updateLanguage}
|
|
44
|
-
showBack={showBack}
|
|
45
|
-
onBack={onBack}
|
|
46
|
-
backLabel={backLabel}
|
|
47
|
-
/>
|
|
48
|
-
)}
|
|
49
|
-
<Style>
|
|
50
|
-
<div className="main-cont">
|
|
51
|
-
<div className={formatClassname(["d-cont left", leftClassName])}>
|
|
52
|
-
<div className="main">
|
|
53
|
-
{logo && (
|
|
54
|
-
<div className="left-logo">
|
|
55
|
-
<img src={logo} alt={`${appName} logo`} />
|
|
56
|
-
</div>
|
|
57
|
-
)}
|
|
58
|
-
<div className="left-header">
|
|
59
|
-
{title && <h2>{t(title)}</h2>}
|
|
60
|
-
{subTitle && (
|
|
61
|
-
<p>{typeof subTitle === "string" ? t(subTitle) : subTitle}</p>
|
|
62
|
-
)}
|
|
63
|
-
</div>
|
|
64
|
-
{children}
|
|
65
|
-
{additionalContent}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div
|
|
70
|
-
className={formatClassname(["d-cont right", rightClassName])}
|
|
71
|
-
style={
|
|
72
|
-
rightImageUrl
|
|
73
|
-
? { backgroundImage: `url(${rightImageUrl})`, backgroundSize: "cover" }
|
|
74
|
-
: {}
|
|
75
|
-
}
|
|
76
|
-
>
|
|
77
|
-
<div className={formatClassname(["right-img", rightImgClassName])} />
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</Style>
|
|
81
|
-
</>
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default AuthLayout;
|