adata-ui 0.1.2 → 0.1.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/README.md +3 -20
- package/dist/adata-ui.common.js +4478 -290
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.css +1 -1
- package/dist/adata-ui.umd.js +4478 -290
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +1 -1
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/package-lock.json +25791 -12100
- package/package.json +71 -52
- package/src/App.vue +23 -28
- package/src/components/Alert/Alert.stories.js +17 -0
- package/src/components/Alert/Alert.vue +63 -0
- package/src/components/Button/BaseButton.vue +241 -0
- package/src/components/Button/Button.stories.js +23 -0
- package/src/components/Footer/Footer.stories.js +20 -0
- package/src/components/Footer/Footer.vue +233 -0
- package/src/components/Header/Header.stories.js +55 -0
- package/src/components/Header/Header.vue +315 -0
- package/src/components/Header/Profile.vue +806 -0
- package/src/components/PasswordField/PasswordField.stories.js +16 -0
- package/src/components/PasswordField/PasswordField.vue +68 -0
- package/src/components/TextField/TextField.stories.js +17 -0
- package/src/components/TextField/TextField.vue +355 -0
- package/src/components/index.js +12 -5
- package/src/components/transitions/SlideToggle.vue +55 -0
- package/src/components/transitions/VerticalMobileToggle.vue +76 -0
- package/src/configs/navigationBarConfig.js +22 -0
- package/src/configs/profileDropDown.js +101 -0
- package/src/stories/Button.stories.js +46 -0
- package/src/stories/Button.vue +54 -0
- package/src/stories/Header.stories.js +21 -0
- package/src/stories/Header.vue +59 -0
- package/src/stories/Introduction.stories.mdx +211 -0
- package/src/stories/Page.stories.js +25 -0
- package/src/stories/Page.vue +88 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +26 -0
- package/src/stories/page.css +69 -0
- package/src/components/Button.vue +0 -18
- package/src/components/HelloWorld.vue +0 -58
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<footer class="footer" :class="[{'paddinged': hasBottomMenu}]">
|
|
3
|
+
<div class="footer__top">
|
|
4
|
+
<ul class="nav">
|
|
5
|
+
<a class="logo adata-logo" href="https://adata.kz">
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
|
|
7
|
+
<path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
|
|
8
|
+
<path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
|
|
9
|
+
</svg>
|
|
10
|
+
</a>
|
|
11
|
+
<div class="social">
|
|
12
|
+
<a target="_blank" href="https://www.facebook.com/adata.kz">
|
|
13
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
|
|
14
|
+
<path d="M13.6562 0H2.34375C1.05151 0 0 1.05151 0 2.34375V13.6562C0 14.9485 1.05151 16 2.34375 16H7.0625V10.3438H5.1875V7.53125H7.0625V5.625C7.0625 4.0741 8.3241 2.8125 9.875 2.8125H12.7188V5.625H9.875V7.53125H12.7188L12.25 10.3438H9.875V16H13.6562C14.9485 16 16 14.9485 16 13.6562V2.34375C16 1.05151 14.9485 0 13.6562 0Z" fill="#2C3E50"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
</a>
|
|
17
|
+
<a target="_blank" href="https://www.instagram.com/adata.kz/?igshid=253i4qxg3els">
|
|
18
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
|
|
19
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.01562 0.0166016C1.35877 0.0166016 0.015625 1.35975 0.015625 3.0166V13.001C0.015625 14.6578 1.35877 16.001 3.01562 16.001H13C14.6569 16.001 16 14.6578 16 13.001V3.0166C16 1.35975 14.6569 0.0166016 13 0.0166016H3.01562ZM14.3891 3.20021C14.3891 3.6416 14.0313 3.99943 13.5899 3.99943C13.1485 3.99943 12.7906 3.6416 12.7906 3.20021C12.7906 2.75881 13.1485 2.40099 13.5899 2.40099C14.0313 2.40099 14.3891 2.75881 14.3891 3.20021ZM8.01132 11.5982C9.99761 11.5982 11.6078 9.98805 11.6078 8.00176C11.6078 6.01548 9.99761 4.40528 8.01132 4.40528C6.02504 4.40528 4.41484 6.01548 4.41484 8.00176C4.41484 9.98805 6.02504 11.5982 8.01132 11.5982ZM8.01132 12.7971C10.6597 12.7971 12.8066 10.6501 12.8066 8.00176C12.8066 5.35339 10.6597 3.20645 8.01132 3.20645C5.36295 3.20645 3.21601 5.35339 3.21601 8.00176C3.21601 10.6501 5.36295 12.7971 8.01132 12.7971Z" fill="#2C3E50"></path>
|
|
20
|
+
</svg>
|
|
21
|
+
</a>
|
|
22
|
+
<a target="_blank" href="https://www.youtube.com/channel/UCPkbtgwgTZbMJXjmTi3R8Uw/about">
|
|
23
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
|
|
24
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895431 0 0 0.895431 0 2V14C0 15.1046 0.895431 16 2 16H14C15.1046 16 16 15.1046 16 14V2C16 0.895431 15.1046 0 14 0H2ZM13.7528 4.98132C13.6144 4.46732 13.2092 4.06205 12.6952 3.92367C11.7561 3.66667 7.99997 3.66667 7.99997 3.66667C7.99997 3.66667 4.24381 3.66667 3.30477 3.91378C2.80066 4.05217 2.3855 4.46732 2.24712 4.98132C2 5.92036 2 7.86764 2 7.86764C2 7.86764 2 9.82479 2.24712 10.7539C2.3855 11.268 2.79077 11.6732 3.30477 11.8116C4.2537 12.0686 7.99997 12.0686 7.99997 12.0686C7.99997 12.0686 11.7561 12.0686 12.6952 11.8215C13.2092 11.6831 13.6144 11.2778 13.7528 10.7638C13.9999 9.82479 13.9999 7.87752 13.9999 7.87752C13.9999 7.87752 14.0098 5.92036 13.7528 4.98132ZM6.80392 9.59801L9.92747 7.799L6.80392 6V9.59801Z" fill="#2C3E50"></path>
|
|
25
|
+
</svg> </a>
|
|
26
|
+
<a target="_blank" href="https://www.tiktok.com/@adata.kz?lang=ru-RU" >
|
|
27
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="social__icon">
|
|
28
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895431 0 0 0.895431 0 2V14C0 15.1046 0.895431 16 2 16H14C15.1046 16 16 15.1046 16 14V2C16 0.895431 15.1046 0 14 0H2ZM8.27136 9.89447C8.27136 10.8688 7.54987 11.506 6.65988 11.506C5.76988 11.506 5.04839 10.7845 5.04839 9.89447C5.04839 9.0988 5.7895 8.37096 6.68689 8.40404C6.86305 8.40404 7.06987 8.44599 7.15006 8.47436V6.62331C5.55588 6.30091 3.14893 7.62001 3.14893 9.89447C3.14893 11.506 4.38899 13.3333 6.65988 13.3333C8.93076 13.3333 10.1985 11.506 10.1985 9.89447V6.23373C10.5643 6.52374 11.6152 7.04631 12.8511 7.04631V5.229C11.406 5.25812 10.0956 3.98482 10.204 2.66667H8.27136V9.89447Z" fill="#2C3E50"></path>
|
|
29
|
+
</svg>
|
|
30
|
+
</a>
|
|
31
|
+
</div>
|
|
32
|
+
<li class="nav__item">
|
|
33
|
+
<a href="https://adata.kz/tariffs" class="nav__link">Тарифы</a>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="nav__item">
|
|
36
|
+
<a href="https://adata.kz/about" class="nav__link">О сервисе</a>
|
|
37
|
+
</li>
|
|
38
|
+
<li class="nav__item">
|
|
39
|
+
<a href="https://adata.kz/apiInfo" class="nav__link">Описание API</a>
|
|
40
|
+
</li>
|
|
41
|
+
<li class="nav__item">
|
|
42
|
+
<a href="https://adata.kz/user-agreements" class="nav__link">Пользовательское соглашение</a>
|
|
43
|
+
</li>
|
|
44
|
+
<li class="nav__item">
|
|
45
|
+
<a href="https://adata.kz/vacancy" class="nav__link">Вакансии</a>
|
|
46
|
+
</li>
|
|
47
|
+
<li class="nav__item">
|
|
48
|
+
<a href="https://adata.kz/contacts" class="nav__link">Контакты</a>
|
|
49
|
+
</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="footer__bottom"><span>2022 © ТОО "Alldata"</span></div>
|
|
53
|
+
</footer>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
export default {
|
|
58
|
+
props: {
|
|
59
|
+
name: "Footer",
|
|
60
|
+
hasBottomMenu: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
<style lang="scss" scoped>
|
|
68
|
+
ul, li {
|
|
69
|
+
list-style: none;
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
a {
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
* {
|
|
79
|
+
font-family: "Open Sans", sans-serif;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
margin: 0;
|
|
82
|
+
padding: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.footer {
|
|
86
|
+
background: #BDC7CE4C;
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
margin-top: 20px;
|
|
89
|
+
@media(max-width: 1025px) {
|
|
90
|
+
background: #F6F6F7;
|
|
91
|
+
&.paddinged {
|
|
92
|
+
padding-bottom: 60px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
&__top {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-between;
|
|
98
|
+
max-width: 900px;
|
|
99
|
+
width: 100%;
|
|
100
|
+
margin: 0 auto;
|
|
101
|
+
padding: 20px 24px;
|
|
102
|
+
@media(max-width: 1025px) {
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
padding: 16px 16px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.adata-logo {
|
|
108
|
+
display: none;
|
|
109
|
+
@media(max-width: 1025px) {
|
|
110
|
+
display: flex;
|
|
111
|
+
width: 77px;
|
|
112
|
+
height: 24px;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.nav {
|
|
117
|
+
width: 100%;
|
|
118
|
+
display: flex;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
align-items: center;
|
|
121
|
+
@media(max-width: 1025px) {
|
|
122
|
+
display: grid;
|
|
123
|
+
grid-template-columns: 0.7fr 1fr;
|
|
124
|
+
column-gap: 15px;
|
|
125
|
+
row-gap: 15px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&__link {
|
|
129
|
+
line-height: 19px;
|
|
130
|
+
color: #2c3e50;
|
|
131
|
+
@media(max-width: 1025px) {
|
|
132
|
+
font-size: 12px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:hover {
|
|
136
|
+
color: #9da3ac;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:active {
|
|
140
|
+
color: #c4c4c4;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.social {
|
|
146
|
+
$self: &;
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
margin-left: 15px;
|
|
150
|
+
order: 1;
|
|
151
|
+
@media (max-width: 1025px) {
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
order: 0;
|
|
154
|
+
}
|
|
155
|
+
a {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
line-height: 19px;
|
|
159
|
+
text-decoration-line: none;
|
|
160
|
+
color: #007aff;
|
|
161
|
+
.social__icon {
|
|
162
|
+
margin: 2px 10px 2px 2px;
|
|
163
|
+
@media (max-width: 1025px) {
|
|
164
|
+
margin: 0 8px 0 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
@media(max-width: 1025px) {
|
|
168
|
+
margin-left: 0;
|
|
169
|
+
&:not(:first-child) {
|
|
170
|
+
margin-left: 8px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
&:hover {
|
|
174
|
+
text-decoration: underline;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&:active {
|
|
178
|
+
color: #0055bb;
|
|
179
|
+
text-decoration-line: none;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
svg {
|
|
184
|
+
width: 16px;
|
|
185
|
+
height: 16px;
|
|
186
|
+
fill: #2C3E50;
|
|
187
|
+
@media(max-width: 1025px) {
|
|
188
|
+
width: 20px;
|
|
189
|
+
height: 20px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&#{$self}__icon {
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&:hover {
|
|
197
|
+
fill: #9da3ac !important;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&:active {
|
|
201
|
+
fill: #c4c4c4 !important;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&__bottom {
|
|
208
|
+
text-align: center;
|
|
209
|
+
padding: 11.5px 0 13px;
|
|
210
|
+
border: 1px solid #BDC7CE;
|
|
211
|
+
@media(max-width: 1025px) {
|
|
212
|
+
background: #EFEFF0;
|
|
213
|
+
border: none;
|
|
214
|
+
border-top: 1px solid #bdc7ce;
|
|
215
|
+
}
|
|
216
|
+
span {
|
|
217
|
+
font-size: 10px;
|
|
218
|
+
line-height: 12px;
|
|
219
|
+
color: #71757a;
|
|
220
|
+
@media(max-width: 1025px) {
|
|
221
|
+
font-size: 10px;
|
|
222
|
+
line-height: 16px;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.mobile-head-wrapper {
|
|
229
|
+
display: flex;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
align-items: center;
|
|
232
|
+
}
|
|
233
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Header from './Header.vue'
|
|
2
|
+
import {action} from "@storybook/addon-actions";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Header',
|
|
6
|
+
component: Header,
|
|
7
|
+
template: '<Header></Header>'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = (args, { argTypes }) => ({
|
|
11
|
+
components: { Header },
|
|
12
|
+
props: Object.keys(argTypes),
|
|
13
|
+
template: '<Header @menuOpen="openMenu' +
|
|
14
|
+
'" @showBalanceModal="showBalance"' +
|
|
15
|
+
' @setShowModal="showModal"' +
|
|
16
|
+
' @logout="logoutClick"' +
|
|
17
|
+
' @setIsReplenishModal="setReplenishModal" v-bind="$props"' +
|
|
18
|
+
'></Header>',
|
|
19
|
+
methods: {
|
|
20
|
+
openMenu(val) {
|
|
21
|
+
console.log(val);
|
|
22
|
+
},
|
|
23
|
+
showBalance(val) {
|
|
24
|
+
console.log(val);
|
|
25
|
+
},
|
|
26
|
+
showModal(val) {
|
|
27
|
+
console.log(val);
|
|
28
|
+
},
|
|
29
|
+
logoutClick() {
|
|
30
|
+
console.log("logout");
|
|
31
|
+
},
|
|
32
|
+
setReplenishModal(val) {
|
|
33
|
+
console.log(val);
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const MainHeader = Template.bind({});
|
|
39
|
+
|
|
40
|
+
export const devHeader = Template.bind({});
|
|
41
|
+
devHeader.args = {
|
|
42
|
+
isDev: true
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const headerAuthenticated = Template.bind({});
|
|
46
|
+
headerAuthenticated.args = {
|
|
47
|
+
isDev: true,
|
|
48
|
+
isAuthenticated: true,
|
|
49
|
+
requestCount: 1000,
|
|
50
|
+
daysRemaining: "остаток дней: 29",
|
|
51
|
+
email: "sboranbayeva@gmail.com",
|
|
52
|
+
loginUrl: "https://id.adtdev.kz/auth/signin?url=https://pk.adata.kz/auth",
|
|
53
|
+
activeTabKey: 'counterparty',
|
|
54
|
+
balance: 1954900
|
|
55
|
+
}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="header">
|
|
3
|
+
<div class="container">
|
|
4
|
+
<div class="header__left">
|
|
5
|
+
<a class="logo" :href="toAdtdev('https://adata.kz')">
|
|
6
|
+
<svg class="adata-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
|
|
7
|
+
<path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
|
|
8
|
+
<path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
|
|
9
|
+
</svg>
|
|
10
|
+
</a>
|
|
11
|
+
<div class="menu" v-if="subheaderItems.length > 0">
|
|
12
|
+
<div v-for="(item, index) in subheaderItems"
|
|
13
|
+
:key="index"
|
|
14
|
+
class="menu__wrapper menu__items"
|
|
15
|
+
:class="{active: locationUrl.includes(item.url)}"
|
|
16
|
+
@click="handleClick(item.url)"
|
|
17
|
+
>
|
|
18
|
+
{{ item.name }}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="header__right">
|
|
23
|
+
<slot name="chooseCountry"></slot>
|
|
24
|
+
<slot name="profile"></slot>
|
|
25
|
+
<Profile
|
|
26
|
+
v-bind:profileDropDown="profileDropDown"
|
|
27
|
+
:isDev="isDev"
|
|
28
|
+
:isAuthenticated="isAuthenticated"
|
|
29
|
+
:requestCount="requestCount"
|
|
30
|
+
:daysRemaining="daysRemaining"
|
|
31
|
+
:email="email"
|
|
32
|
+
:loginUrl="loginUrl"
|
|
33
|
+
@showBalanceModal="(val) => { $emit('showBalanceModal', val) }"
|
|
34
|
+
@setShowModal="(val) => { $emit('setShowModal', val) }"
|
|
35
|
+
@logout="$emit('logout')"
|
|
36
|
+
@setIsReplenishModal="(val) => { $emit('setIsReplenishModal', val) }"
|
|
37
|
+
/>
|
|
38
|
+
<div class="menu_mobile--switcher" @click="changeValue">
|
|
39
|
+
<!-- icon_hamburger -->
|
|
40
|
+
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
41
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 4h20v2H2V4zm0 14h20v2H2v-2zm0-7h20v2H2v-2z"
|
|
42
|
+
fill="#2C3E50"></path>
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<MobileToggle v-slot="{ animationClass }">
|
|
48
|
+
<div
|
|
49
|
+
class="menu_mobile"
|
|
50
|
+
:class="animationClass"
|
|
51
|
+
v-show="subheaderItems.length > 0 && isOpen"
|
|
52
|
+
>
|
|
53
|
+
<div @click.stop="changeValue" class="mobile-table-head">
|
|
54
|
+
<!-- close_hamburger -->
|
|
55
|
+
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
56
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.414 18.142L18.556 4l1.415 1.414L5.828 19.556l-1.414-1.414z"
|
|
57
|
+
fill="#2C3E50"></path>
|
|
58
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.414 4l14.142 14.142-1.414 1.414L4 5.414 5.414 4z"
|
|
59
|
+
fill="#2C3E50"></path>
|
|
60
|
+
</svg>
|
|
61
|
+
</div>
|
|
62
|
+
<div
|
|
63
|
+
v-for="(item, index) in subheaderItems"
|
|
64
|
+
:key="index"
|
|
65
|
+
class="menu_mobile-wrapper"
|
|
66
|
+
:class="{'active-burger-tab': locationUrl.includes(item.url)}"
|
|
67
|
+
@click="handleClick(item.url)"
|
|
68
|
+
>
|
|
69
|
+
{{ item.name }}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</MobileToggle>
|
|
73
|
+
</header>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
import Profile from "./Profile";
|
|
78
|
+
import { menuList } from "../../configs/navigationBarConfig";
|
|
79
|
+
import { profileDropDown } from "../../configs/profileDropDown"
|
|
80
|
+
import MobileToggle from "../transitions/VerticalMobileToggle";
|
|
81
|
+
|
|
82
|
+
export default {
|
|
83
|
+
components: {
|
|
84
|
+
Profile,
|
|
85
|
+
MobileToggle,
|
|
86
|
+
},
|
|
87
|
+
props: {
|
|
88
|
+
isDev: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
91
|
+
},
|
|
92
|
+
isAuthenticated: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
},
|
|
96
|
+
requestCount: {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: null
|
|
99
|
+
},
|
|
100
|
+
daysRemaining: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: null
|
|
103
|
+
},
|
|
104
|
+
email: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: ""
|
|
107
|
+
},
|
|
108
|
+
loginUrl: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: "",
|
|
111
|
+
required: true
|
|
112
|
+
},
|
|
113
|
+
activeTabKey: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: 'counterparty'
|
|
116
|
+
},
|
|
117
|
+
balance: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: 0
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
data() {
|
|
123
|
+
return {
|
|
124
|
+
profileDropDown,
|
|
125
|
+
subheaderItems: [],
|
|
126
|
+
isOpen: false
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
mounted() {
|
|
130
|
+
this.setBalance(this.balance);
|
|
131
|
+
this.subheaderItems = menuList;
|
|
132
|
+
},
|
|
133
|
+
computed: {
|
|
134
|
+
locationUrl() {
|
|
135
|
+
return window.location.href;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
methods: {
|
|
139
|
+
changeValue() {
|
|
140
|
+
this.isOpen = !this.isOpen
|
|
141
|
+
this.$emit('menuOpen', this.isOpen)
|
|
142
|
+
},
|
|
143
|
+
toAdtdev(url) {
|
|
144
|
+
return this.isDev ? url.replace("adata", "adtdev") : url;
|
|
145
|
+
},
|
|
146
|
+
setBalance(balance) {
|
|
147
|
+
if (balance !== 0) {
|
|
148
|
+
this.profileDropDown[2].name = 'Текущий баланс: ' + this.thousandSeparator(balance) + ' ₸';
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
thousandSeparator(val) {
|
|
152
|
+
return val ? val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "): '';
|
|
153
|
+
},
|
|
154
|
+
handleClick(url) {
|
|
155
|
+
window.open(this.toAdtdev(url), "_self");
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
watch: {
|
|
159
|
+
balance(newBalance) {
|
|
160
|
+
this.setBalance(newBalance);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<style lang="scss" scoped>
|
|
167
|
+
* {
|
|
168
|
+
font-family: "Open Sans", sans-serif;
|
|
169
|
+
box-sizing: border-box;
|
|
170
|
+
margin: 0;
|
|
171
|
+
padding: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.container {
|
|
175
|
+
max-width: 1180px;
|
|
176
|
+
width: 100%;
|
|
177
|
+
padding: 0 20px;
|
|
178
|
+
margin: 0 auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.header {
|
|
182
|
+
width: 100%;
|
|
183
|
+
background: #ffffff;
|
|
184
|
+
max-height: 62px;
|
|
185
|
+
height: 62px;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
@media (max-width: 1025px) {
|
|
189
|
+
border-bottom: 1px solid #2C3E5026;
|
|
190
|
+
height: 40px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
& > .container {
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: space-between;
|
|
196
|
+
align-items: center;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&__right {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&__left {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
|
|
208
|
+
.menu {
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
@media (max-width: 1025px) {
|
|
212
|
+
display: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&__items {
|
|
216
|
+
margin-right: 8px;
|
|
217
|
+
align-items: center;
|
|
218
|
+
padding: 20px 8px 20px 0;
|
|
219
|
+
transition: text-shadow 0.3s;
|
|
220
|
+
display: block;
|
|
221
|
+
font-weight: bold;
|
|
222
|
+
font-size: 16px;
|
|
223
|
+
line-height: 22px;
|
|
224
|
+
text-transform: uppercase;
|
|
225
|
+
color: #71757a;
|
|
226
|
+
position: relative;
|
|
227
|
+
|
|
228
|
+
&::after {
|
|
229
|
+
content: "";
|
|
230
|
+
position: absolute;
|
|
231
|
+
right: -1px;
|
|
232
|
+
top: 50%;
|
|
233
|
+
transform: translateY(-50%);
|
|
234
|
+
height: 22px;
|
|
235
|
+
width: 1px;
|
|
236
|
+
background-color: #e5e5e5;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&.active {
|
|
240
|
+
font-weight: bold;
|
|
241
|
+
font-size: 16px;
|
|
242
|
+
line-height: 22px;
|
|
243
|
+
text-transform: uppercase;
|
|
244
|
+
color: #2c3e50;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&:hover {
|
|
248
|
+
color: #9DA3AC;
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.logo {
|
|
255
|
+
display: block;
|
|
256
|
+
margin-right: 20px;
|
|
257
|
+
|
|
258
|
+
svg {
|
|
259
|
+
width: 90px;
|
|
260
|
+
height: 26px;
|
|
261
|
+
display: block;
|
|
262
|
+
fill: #2c3e50;
|
|
263
|
+
@media(max-width: 1025px) {
|
|
264
|
+
width: 77px;
|
|
265
|
+
height: 24px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&:hover {
|
|
269
|
+
fill: #71757a;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.menu_mobile {
|
|
276
|
+
display: none;
|
|
277
|
+
|
|
278
|
+
&--switcher {
|
|
279
|
+
display: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@media (max-width: 1025px) {
|
|
283
|
+
display: block;
|
|
284
|
+
.mobile-table-head {
|
|
285
|
+
padding: 11px 16px;
|
|
286
|
+
display: flex;
|
|
287
|
+
justify-content: flex-end;
|
|
288
|
+
background: #2c3e500d;
|
|
289
|
+
}
|
|
290
|
+
&-wrapper {
|
|
291
|
+
border-top: 1px solid #9DA3AC4C;
|
|
292
|
+
padding: 14px 16px;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
font-size: 16px;
|
|
295
|
+
line-height: 22px;
|
|
296
|
+
color: #2c3e50;
|
|
297
|
+
|
|
298
|
+
&:last-child {
|
|
299
|
+
border-bottom: 1px solid #9DA3AC4C;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&.active-burger-tab {
|
|
303
|
+
background: #2c3e500d;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
&--switcher {
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
</style>
|