adata-ui 0.1.50 → 0.1.53
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/adata-ui.common.js +982 -249
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.css +1 -1
- package/dist/adata-ui.umd.js +982 -249
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +2 -2
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/dist/img/arrow-down.72dc66a4.svg +3 -0
- package/dist/img/arrow-up.95ee7d72.svg +3 -0
- package/dist/img/dollor.7d00f847.svg +54 -0
- package/dist/img/euro.1362dfb6.svg +15 -0
- package/dist/img/ruble.c27b58e5.svg +12 -0
- package/package.json +1 -1
- package/src/App.vue +1 -2
- package/src/assets/icons/arrow-down.svg +3 -0
- package/src/assets/icons/arrow-up.svg +3 -0
- package/src/assets/icons/dollor.svg +54 -0
- package/src/assets/icons/euro.svg +15 -0
- package/src/assets/icons/ruble.svg +12 -0
- package/src/assets/style.scss +1 -1
- package/src/components/Checkbox/ACheckbox.vue +114 -0
- package/src/components/Checkbox/Checkbox.stories.js +15 -0
- package/src/components/Header/Header.vue +363 -125
- package/src/components/Header/InfoHeader.vue +215 -0
- package/src/components/Header/Profile.vue +0 -14
- package/src/components/Table/ATable.vue +117 -0
- package/src/components/Table/Table.stories.js +15 -0
- package/src/components/index.js +4 -0
- package/src/configs/profileDropDown.js +7 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="info">
|
|
3
|
+
<transition name="fade">
|
|
4
|
+
<div class="info-notification" v-if="isOpenNotification">
|
|
5
|
+
<div class="container">
|
|
6
|
+
<div class="info-notification__wrapper">
|
|
7
|
+
<div class="info-notification__content">
|
|
8
|
+
<svg id="note-svg" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<circle cx="8" cy="8" r="6" stroke="white"/>
|
|
10
|
+
<path d="M9.6613 11.1367L9.54952 11.5936C9.21418 11.726 8.94631 11.8267 8.74685 11.896C8.54716 11.9654 8.31514 12 8.05079 12C7.64483 12 7.32906 11.9006 7.10386 11.703C6.87865 11.5047 6.76601 11.2534 6.76601 10.9485C6.76601 10.8305 6.77418 10.7091 6.79117 10.5854C6.80831 10.4616 6.83556 10.3222 6.87284 10.1663L7.29192 8.68297C7.32921 8.54094 7.3609 8.40636 7.38628 8.27909C7.41202 8.15261 7.42442 8.03624 7.42442 7.93149C7.42442 7.74206 7.3852 7.60956 7.30712 7.53507C7.22904 7.46079 7.08005 7.42307 6.85886 7.42307C6.75052 7.42307 6.63917 7.44042 6.52567 7.47398C6.41167 7.50768 6.31423 7.54023 6.23242 7.57049L6.34449 7.11319C6.61902 7.00141 6.88144 6.90569 7.13246 6.82625C7.38348 6.74659 7.62066 6.70672 7.84501 6.70672C8.24818 6.70672 8.55928 6.80416 8.77775 6.99904C8.99622 7.19406 9.10542 7.44688 9.10542 7.75841C9.10542 7.82287 9.09825 7.93644 9.08283 8.09877C9.06777 8.26145 9.03974 8.41051 8.99887 8.5461L8.58158 10.0235C8.54738 10.1421 8.51662 10.2778 8.48988 10.4304C8.46227 10.5821 8.44908 10.6979 8.44908 10.7757C8.44908 10.9718 8.49282 11.1058 8.5805 11.177C8.66884 11.2482 8.82098 11.2836 9.03709 11.2836C9.13854 11.2836 9.25398 11.2656 9.38225 11.2302C9.51016 11.1949 9.60344 11.1638 9.6613 11.1367ZM9.76713 4.93424C9.76713 5.19164 9.67012 5.41147 9.47517 5.59223C9.28072 5.77363 9.04641 5.8644 8.7723 5.8644C8.49733 5.8644 8.26245 5.77363 8.06577 5.59223C7.86946 5.4114 7.77109 5.19164 7.77109 4.93424C7.77109 4.67734 7.86946 4.45716 8.06577 4.27411C8.26209 4.09134 8.4974 4 8.7723 4C9.04634 4 9.28072 4.09156 9.47517 4.27411C9.67026 4.45716 9.76713 4.67742 9.76713 4.93424Z" fill="white"/>
|
|
11
|
+
</svg>
|
|
12
|
+
<span>{{systemMessage}}</span>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="info-notification__close" @click="closeNotification">
|
|
15
|
+
<svg id="close-notification" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
16
|
+
<path d="M2.99902 2.99951L12.9997 13.0002" stroke="white" stroke-linecap="round"/>
|
|
17
|
+
<path d="M13 2.99951L2.99934 13.0002" stroke="white" stroke-linecap="round"/>
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</transition>
|
|
24
|
+
<div class="info-header" v-if="!isOpenNotification">
|
|
25
|
+
<div class="container">
|
|
26
|
+
<div class="info-header__list">
|
|
27
|
+
<div class="info-header__item">
|
|
28
|
+
<template v-if="currencies" >
|
|
29
|
+
<div v-for="(currency, index) in currencies" :key="index" class="info-header__item-elem">
|
|
30
|
+
<img v-if="currency.currency === 'USD'" src="@/assets/icons/dollor.svg" alt=""/>
|
|
31
|
+
<img v-if="currency.currency === 'EUR'" src="@/assets/icons/euro.svg" alt=""/>
|
|
32
|
+
<img v-if="currency.currency === 'RUB'" src="@/assets/icons/ruble.svg" alt=""/>
|
|
33
|
+
<div class="info-header__inner-item">
|
|
34
|
+
<span class="info-header__result">{{ currency.sell }}</span>
|
|
35
|
+
<img v-if="currency.sell_state === 'DOWN'" src="@/assets/icons/arrow-down.svg" alt=""/>
|
|
36
|
+
<img v-else src="@/assets/icons/arrow-up.svg" alt=""/>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="info-header__inner-item">
|
|
39
|
+
<span class="info-header__result">{{ currency.buy }}</span>
|
|
40
|
+
<img v-if="currency.buy_state === 'DOWN'" src="@/assets/icons/arrow-down.svg" alt=""/>
|
|
41
|
+
<img v-else src="@/assets/icons/arrow-up.svg" alt=""/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
</div>
|
|
46
|
+
<div v-if="isAuthenticated" class="info-header__item">
|
|
47
|
+
<div class="info-header__item-elem">
|
|
48
|
+
<div class="info-header__inner-item">
|
|
49
|
+
<span class="info-header__title">Cуточный лимит запросов:</span>
|
|
50
|
+
<span class="info-header__result info-header__result_circled">{{ requestCount }}</span>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="divider"></div>
|
|
53
|
+
<div class="info-header__inner-item">
|
|
54
|
+
<span class="info-header__title">остаток дней:</span>
|
|
55
|
+
<span class="info-header__result info-header__result_circled">{{ daysRemaining }}</span>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
name: "InfoHeader",
|
|
69
|
+
props: {
|
|
70
|
+
requestCount: {
|
|
71
|
+
type: [String, Number],
|
|
72
|
+
default: null
|
|
73
|
+
},
|
|
74
|
+
daysRemaining: {
|
|
75
|
+
type: [String, Number],
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
isAuthenticated: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
isOpenNotification: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
weather: {
|
|
87
|
+
type: Array,
|
|
88
|
+
default: () => []
|
|
89
|
+
},
|
|
90
|
+
currencies: {
|
|
91
|
+
type: Array,
|
|
92
|
+
default: () => []
|
|
93
|
+
},
|
|
94
|
+
systemMessage:{
|
|
95
|
+
type: String,
|
|
96
|
+
default: ''
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
closeNotification() {
|
|
101
|
+
this.$emit("closeNotification", this.isOpenNotification)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style scoped lang="scss">
|
|
109
|
+
.info {
|
|
110
|
+
position: relative;
|
|
111
|
+
@media (min-width: 1025px) {
|
|
112
|
+
height: 30px;
|
|
113
|
+
}
|
|
114
|
+
&-notification {
|
|
115
|
+
position: absolute;
|
|
116
|
+
width: 100%;
|
|
117
|
+
z-index: 1;
|
|
118
|
+
top: 0;
|
|
119
|
+
color: #FFFFFF;
|
|
120
|
+
background: #007AFF;
|
|
121
|
+
padding: 7px 0;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
@media(max-width: 1025px) {
|
|
124
|
+
position: relative;
|
|
125
|
+
height: 30px;
|
|
126
|
+
}
|
|
127
|
+
&__wrapper {
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
align-items: center;
|
|
131
|
+
}
|
|
132
|
+
&__content {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 10px;
|
|
136
|
+
}
|
|
137
|
+
&__close {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
&-header {
|
|
144
|
+
background: #FFFFFF;
|
|
145
|
+
padding: 7px 0;
|
|
146
|
+
border-bottom: 0.5px solid rgba(189, 199, 206, 0.5);
|
|
147
|
+
@media (max-width: 1025px) {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
&__title {
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
line-height: 14px;
|
|
154
|
+
color: #2C3E50;
|
|
155
|
+
}
|
|
156
|
+
&__result {
|
|
157
|
+
font-weight: 400;
|
|
158
|
+
font-size: 12px;
|
|
159
|
+
line-height: 14px;
|
|
160
|
+
color: #2C3E50;
|
|
161
|
+
&_circled {
|
|
162
|
+
color: #ffffff;
|
|
163
|
+
padding: 4px 12px;
|
|
164
|
+
background: #007AFF;
|
|
165
|
+
border-radius: 100px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
&__list {
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: space-between;
|
|
171
|
+
align-items: center;
|
|
172
|
+
}
|
|
173
|
+
&__item {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 20px;
|
|
177
|
+
&-elem {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: 7px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
&__inner-item {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: 8px;
|
|
187
|
+
font-size: 12px;
|
|
188
|
+
}
|
|
189
|
+
.last-header-item {
|
|
190
|
+
.info-header__inner-item:nth-child(2) {
|
|
191
|
+
margin-left: 5px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.divider {
|
|
197
|
+
background: #2C3E50;
|
|
198
|
+
width: 1px;
|
|
199
|
+
height: 10px;
|
|
200
|
+
margin: 0 10px;
|
|
201
|
+
transform: rotate(20deg);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.fade-enter-active,
|
|
206
|
+
.fade-leave-active {
|
|
207
|
+
transition: 0.5s ease;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.fade-enter,
|
|
211
|
+
.fade-leave-to {
|
|
212
|
+
opacity: 0;
|
|
213
|
+
top: -30px;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
<div class="profile" :class="{ active: active }">
|
|
3
3
|
<div v-click-outside="() => {active = false}">
|
|
4
4
|
<div class="profile__inner">
|
|
5
|
-
<div class="requests__link" v-if="requestCount !== null && isAuthenticated">
|
|
6
|
-
Суточный лимит запросов:
|
|
7
|
-
<span>
|
|
8
|
-
{{ requestCount }} {{ (daysRemaining === null || daysRemaining === '-') ? '' : `(${daysRemaining})` }}
|
|
9
|
-
</span>
|
|
10
|
-
</div>
|
|
11
5
|
<div class="profile__item" @click="active = !active">
|
|
12
6
|
<div v-show="isAuthenticated" class="profile__item-link">
|
|
13
7
|
<span class="desktop">{{ email }}</span>
|
|
@@ -256,14 +250,6 @@ export default {
|
|
|
256
250
|
type: Boolean,
|
|
257
251
|
default: false
|
|
258
252
|
},
|
|
259
|
-
requestCount: {
|
|
260
|
-
type: Number,
|
|
261
|
-
default: null
|
|
262
|
-
},
|
|
263
|
-
daysRemaining: {
|
|
264
|
-
type: String,
|
|
265
|
-
default: null
|
|
266
|
-
},
|
|
267
253
|
email: {
|
|
268
254
|
type: String,
|
|
269
255
|
default: ""
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table class="a-table">
|
|
3
|
+
<thead>
|
|
4
|
+
<tr>
|
|
5
|
+
<th v-for="(col, i) in cols" :key="i">{{ col.name }}</th>
|
|
6
|
+
</tr>
|
|
7
|
+
</thead>
|
|
8
|
+
<tbody v-for="(row, i) in rows" :key="i">
|
|
9
|
+
<tr>
|
|
10
|
+
<td v-for="col in cols" :key="col.key" :data-label="`${col.name}`">
|
|
11
|
+
<slot :name="'key-' + col.key" :row="row">
|
|
12
|
+
{{ row[col.key] || defaultEmpty }}
|
|
13
|
+
</slot>
|
|
14
|
+
</td>
|
|
15
|
+
</tr>
|
|
16
|
+
</tbody>
|
|
17
|
+
</table>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
props: {
|
|
23
|
+
cols: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default: () => [],
|
|
26
|
+
},
|
|
27
|
+
rows: {
|
|
28
|
+
type: Array,
|
|
29
|
+
default: () => [],
|
|
30
|
+
},
|
|
31
|
+
defaultEmpty: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: "Нет данных",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" scoped>
|
|
40
|
+
.a-table {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
background: #fff;
|
|
44
|
+
|
|
45
|
+
@media screen and (max-width: 850px) {
|
|
46
|
+
border: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
thead {
|
|
50
|
+
background: rgba(189, 199, 206, 0.3);
|
|
51
|
+
|
|
52
|
+
@media screen and (max-width: 850px) {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
tr {
|
|
57
|
+
display: flex;
|
|
58
|
+
|
|
59
|
+
th {
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
flex: 1;
|
|
63
|
+
padding: 20px 16px;
|
|
64
|
+
font-size: 12px;
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
word-break: break-word;
|
|
67
|
+
|
|
68
|
+
@media screen and (max-width: 850px) {
|
|
69
|
+
justify-content: flex-start;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
tbody {
|
|
76
|
+
tr {
|
|
77
|
+
display: flex;
|
|
78
|
+
border-bottom: 1px solid #ccc;
|
|
79
|
+
|
|
80
|
+
@media screen and (max-width: 850px) {
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
margin: 10px;
|
|
83
|
+
padding: 10px 0;
|
|
84
|
+
border: 0;
|
|
85
|
+
background: rgba(189, 199, 206, 0.3);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
td {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
flex: 1;
|
|
92
|
+
padding: 20px 16px;
|
|
93
|
+
word-break: break-word;
|
|
94
|
+
font-size: 12px;
|
|
95
|
+
font-weight: normal;
|
|
96
|
+
text-align: left;
|
|
97
|
+
|
|
98
|
+
@media screen and (max-width: 850px) {
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
row-gap: 4px;
|
|
101
|
+
justify-content: flex-start;
|
|
102
|
+
padding: 8px 16px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:before {
|
|
106
|
+
@media screen and (max-width: 850px) {
|
|
107
|
+
content: attr(data-label);
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: left;
|
|
110
|
+
font-weight: bold;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import ATable from "./ATable.vue";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Table",
|
|
5
|
+
component: ATable,
|
|
6
|
+
template: "<a-table></a-table>",
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
|
+
components: { ATable },
|
|
11
|
+
props: Object.keys(argTypes),
|
|
12
|
+
template: "<a-table v-bind='$props'></a-header>",
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const BaseTable = Template.bind({});
|
package/src/components/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
+
import ACheckbox from "./Checkbox/ACheckbox";
|
|
2
3
|
import AButton from "./Button/AButton";
|
|
3
4
|
import ATextField from "./TextField/TextField";
|
|
4
5
|
import APasswordField from "./PasswordField/PasswordField";
|
|
@@ -7,8 +8,10 @@ import AHeader from "./Header/Header";
|
|
|
7
8
|
import AFooter from "./Footer/Footer";
|
|
8
9
|
import ASearchTextField from "./SearchTextField/SearchTextField";
|
|
9
10
|
import AMailTo from "./MailTo/MailTo";
|
|
11
|
+
import ATable from "./Table/ATable";
|
|
10
12
|
|
|
11
13
|
const Components = {
|
|
14
|
+
ACheckbox,
|
|
12
15
|
AButton,
|
|
13
16
|
ATextField,
|
|
14
17
|
APasswordField,
|
|
@@ -17,6 +20,7 @@ const Components = {
|
|
|
17
20
|
AFooter,
|
|
18
21
|
ASearchTextField,
|
|
19
22
|
AMailTo,
|
|
23
|
+
ATable,
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
Object.keys(Components).forEach((name) => {
|
|
@@ -54,6 +54,13 @@ export const profileDropDown = [
|
|
|
54
54
|
dev: "https://pk.adtdev.kz/profile/browsing-history",
|
|
55
55
|
staging: "https://pk.adada.kz/profile/browsing-history",
|
|
56
56
|
prod: "https://pk.adata.kz/profile/browsing-history"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 10,
|
|
60
|
+
name: "Мои отчеты",
|
|
61
|
+
dev: "https://pk.adtdev.kz/profile/my-reports",
|
|
62
|
+
staging: "https://pk.adada.kz/profile/my-reports",
|
|
63
|
+
prod: "https://pk.adata.kz/profile/my-reports"
|
|
57
64
|
}
|
|
58
65
|
],
|
|
59
66
|
disabled: false
|