datastake-daf 0.6.575 → 0.6.577
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/components/index.js +199 -2
- package/dist/hooks/index.js +4655 -16
- package/dist/layouts/index.css +1 -1
- package/dist/layouts/index.js +14 -577
- package/dist/services/index.js +1 -2
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/AuthForm.stories.js +421 -0
- package/src/@daf/core/components/AuthForm/index.jsx +200 -0
- package/src/@daf/services/ChannelsService.js +1 -2
- package/src/index.js +1 -0
- package/src/layouts.js +1 -3
- 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 -69
- package/src/@daf/layouts/AuthLayout/components/Navbar/index.scss +0 -169
- package/src/@daf/layouts/AuthLayout/components/Navbar/style.js +0 -149
- package/src/@daf/layouts/AuthLayout/index.jsx +0 -85
- package/src/@daf/layouts/AuthLayout/index.scss +0 -77
- package/src/@daf/layouts/AuthLayout/style.js +0 -418
|
@@ -1,169 +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
|
-
svg {
|
|
84
|
-
width: 20px;
|
|
85
|
-
height: 20px;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.back-btn {
|
|
91
|
-
border: 1px solid #d0d5dd;
|
|
92
|
-
background: #fff;
|
|
93
|
-
border-radius: 8px;
|
|
94
|
-
padding: 10px 16px;
|
|
95
|
-
height: 40px;
|
|
96
|
-
font-size: 14px;
|
|
97
|
-
font-weight: 600;
|
|
98
|
-
color: #344054;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
transition: all 0.2s ease;
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
|
|
103
|
-
&:hover {
|
|
104
|
-
background: #f9fafb;
|
|
105
|
-
border-color: #98a2b3;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:active {
|
|
109
|
-
background: #f2f4f7;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@media (max-width: 768px) {
|
|
115
|
-
padding: 0 16px;
|
|
116
|
-
.navbar-logo { height: 28px; }
|
|
117
|
-
.navbar-right { gap: 8px; }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.language-select-popup {
|
|
122
|
-
.ant-select-dropdown {
|
|
123
|
-
padding: 4px;
|
|
124
|
-
background: #ffffff;
|
|
125
|
-
border-radius: 8px;
|
|
126
|
-
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
|
|
127
|
-
0px 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
128
|
-
border: none !important;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.ant-select-item {
|
|
132
|
-
border-radius: 6px;
|
|
133
|
-
padding: 8px 12px;
|
|
134
|
-
min-height: 40px;
|
|
135
|
-
transition: all 0.2s ease;
|
|
136
|
-
|
|
137
|
-
&:hover {
|
|
138
|
-
background-color: #f9fafb;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.ant-select-item-option-selected {
|
|
142
|
-
background-color: #155eef;
|
|
143
|
-
color: #ffffff;
|
|
144
|
-
padding: 4px !important;
|
|
145
|
-
|
|
146
|
-
.language-option span {
|
|
147
|
-
color: #ffffff;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.language-option {
|
|
152
|
-
display: flex;
|
|
153
|
-
align-items: center;
|
|
154
|
-
gap: 8px;
|
|
155
|
-
|
|
156
|
-
.flag-icon {
|
|
157
|
-
width: 20px;
|
|
158
|
-
height: 14px;
|
|
159
|
-
border-radius: 2px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
span {
|
|
163
|
-
font-size: 14px;
|
|
164
|
-
font-weight: 500;
|
|
165
|
-
color: #344054;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { MOBILE_WIDTH, TABLET_WIDTH } from "datastake-daf/src/constants/Style";
|
|
3
|
-
|
|
4
|
-
const style = styled.div`
|
|
5
|
-
font-family: Outfit;
|
|
6
|
-
|
|
7
|
-
.btns {
|
|
8
|
-
display: flex;
|
|
9
|
-
gap: 12px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.d-container {
|
|
13
|
-
width: 80vw;
|
|
14
|
-
margin-left: auto;
|
|
15
|
-
margin-right: auto;
|
|
16
|
-
|
|
17
|
-
@media (max-width: 1440px) {
|
|
18
|
-
width: 85vw;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@media (${TABLET_WIDTH}) {
|
|
22
|
-
width: calc(100vw - 4.6rem);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.flex-c {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.jus-c {
|
|
32
|
-
justify-content: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.d-navbar {
|
|
36
|
-
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
37
|
-
position: fixed;
|
|
38
|
-
background-color: white;
|
|
39
|
-
z-index: 1000;
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 80px;
|
|
42
|
-
|
|
43
|
-
@media (${TABLET_WIDTH}) {
|
|
44
|
-
height: 72px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@media (${MOBILE_WIDTH}) {
|
|
48
|
-
height: 5.12rem;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.main-cont {
|
|
52
|
-
display: flex;
|
|
53
|
-
padding: 20px 0px;
|
|
54
|
-
|
|
55
|
-
@media (${MOBILE_WIDTH}) {
|
|
56
|
-
padding: 1.6rem 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.left {
|
|
60
|
-
flex: 1;
|
|
61
|
-
|
|
62
|
-
img {
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
width: 128px;
|
|
65
|
-
|
|
66
|
-
@media (${MOBILE_WIDTH}) {
|
|
67
|
-
width: 10.24rem;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.right {
|
|
73
|
-
display: flex;
|
|
74
|
-
gap: 3rem;
|
|
75
|
-
|
|
76
|
-
.ant-btn {
|
|
77
|
-
font-size: 14px;
|
|
78
|
-
padding: 6px 0;
|
|
79
|
-
text-align: center;
|
|
80
|
-
width: 70px;
|
|
81
|
-
|
|
82
|
-
@media (${MOBILE_WIDTH}) {
|
|
83
|
-
padding: 3px 0;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@media (max-width: 1070px) {
|
|
88
|
-
gap: 2rem;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.bordered {
|
|
95
|
-
.d-navbar {
|
|
96
|
-
position: relative;
|
|
97
|
-
box-shadow: unset;
|
|
98
|
-
border-bottom: 1px solid var(--base-gray-40);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.tazama-extra {
|
|
103
|
-
&.mobile {
|
|
104
|
-
display: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@media (${MOBILE_WIDTH}) {
|
|
108
|
-
&.mobile {
|
|
109
|
-
display: flex;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&.desktop {
|
|
113
|
-
display: none;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.ant-btn {
|
|
118
|
-
width: 90px !important;
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
|
|
123
|
-
&.w-100 {
|
|
124
|
-
width: 100% !important;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
span {
|
|
128
|
-
margin: 0 auto;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.nav-extra {
|
|
133
|
-
position: fixed;
|
|
134
|
-
top: 0;
|
|
135
|
-
left: 0;
|
|
136
|
-
height: 100dvh;
|
|
137
|
-
width: 100%;
|
|
138
|
-
background: white;
|
|
139
|
-
margin-left: -100%;
|
|
140
|
-
transition: 0.4s margin-left;
|
|
141
|
-
|
|
142
|
-
&.toggled {
|
|
143
|
-
margin-left: 0;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
|
|
149
|
-
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;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
.auth-layout {
|
|
2
|
-
min-height: 100vh;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
background-color: #fff;
|
|
6
|
-
font-family: "Outfit", sans-serif;
|
|
7
|
-
|
|
8
|
-
.main-cont {
|
|
9
|
-
flex: 1;
|
|
10
|
-
display: flex;
|
|
11
|
-
height: calc(100vh - 64px); // Subtract header height
|
|
12
|
-
transition: all 0.2s ease;
|
|
13
|
-
|
|
14
|
-
@media (max-width: 768px) {
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
height: auto;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.d-cont.left {
|
|
21
|
-
width: 50%;
|
|
22
|
-
padding: 6rem 2rem;
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
overflow-y: auto;
|
|
26
|
-
background: #fff;
|
|
27
|
-
|
|
28
|
-
.main {
|
|
29
|
-
width: 350px;
|
|
30
|
-
margin: auto;
|
|
31
|
-
|
|
32
|
-
.left-logo img {
|
|
33
|
-
height: 40px;
|
|
34
|
-
margin-bottom: 48px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.left-header h2 {
|
|
38
|
-
font-size: 36px;
|
|
39
|
-
font-weight: 600;
|
|
40
|
-
color: #101828;
|
|
41
|
-
margin-bottom: 12px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.left-header p {
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
color: #667085;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.d-cont.right {
|
|
52
|
-
width: 50%;
|
|
53
|
-
background-size: cover;
|
|
54
|
-
background-position: center;
|
|
55
|
-
background-repeat: no-repeat;
|
|
56
|
-
|
|
57
|
-
@media (max-width: 768px) {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&.sbg {
|
|
63
|
-
--primary-color: #992f24;
|
|
64
|
-
.ant-btn-primary {
|
|
65
|
-
background: var(--primary-color);
|
|
66
|
-
border-color: var(--primary-color);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.nashiriki {
|
|
71
|
-
--primary-color: #004b91;
|
|
72
|
-
.ant-btn-primary {
|
|
73
|
-
background: var(--primary-color);
|
|
74
|
-
border-color: var(--primary-color);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|