@eturnity/eturnity_reusable_components 7.4.4-qa-16-02-05 → 7.6.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/package.json
CHANGED
package/src/assets/theme.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
:position="position"
|
4
4
|
:isOpen="isOpen"
|
5
5
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
6
|
+
@click.native="onOutsideClose()"
|
6
7
|
:backdrop="backdrop"
|
7
8
|
>
|
8
9
|
<modal-container @click.stop>
|
@@ -26,7 +27,7 @@
|
|
26
27
|
// import Modal from "@eturnity/eturnity_reusable_components/src/components/modals/modal"
|
27
28
|
// This is a more flexible modal box, where the parent can decide how the body of the modal looks
|
28
29
|
// To use:
|
29
|
-
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :isLoading="true" :hideClose="true">
|
30
|
+
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :preventOutsideClose="true" :isLoading="true" :hideClose="true">
|
30
31
|
// <div>Data....</div>
|
31
32
|
// </modal>
|
32
33
|
|
@@ -85,6 +86,22 @@ const ModalContainer = styled.div`
|
|
85
86
|
min-width: 100px;
|
86
87
|
min-height: 100px;
|
87
88
|
|
89
|
+
::-webkit-scrollbar {
|
90
|
+
width: 0.3em;
|
91
|
+
height: 100%;
|
92
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
93
|
+
}
|
94
|
+
|
95
|
+
/* Make scrollbar visible when needed */
|
96
|
+
::-webkit-scrollbar-thumb {
|
97
|
+
background-color: ${(props) => props.theme.colors.grey3};
|
98
|
+
}
|
99
|
+
|
100
|
+
/* Make scrollbar track visible when needed */
|
101
|
+
::-webkit-scrollbar-track {
|
102
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
103
|
+
}
|
104
|
+
|
88
105
|
.close {
|
89
106
|
position: absolute;
|
90
107
|
right: 20px;
|
@@ -120,6 +137,10 @@ export default {
|
|
120
137
|
required: true,
|
121
138
|
default: false
|
122
139
|
},
|
140
|
+
preventOutsideClose: {
|
141
|
+
required: false,
|
142
|
+
default: false
|
143
|
+
},
|
123
144
|
isLoading: {
|
124
145
|
required: false,
|
125
146
|
default: false
|
@@ -137,27 +158,20 @@ export default {
|
|
137
158
|
default: 'fixed'
|
138
159
|
}
|
139
160
|
},
|
140
|
-
beforeDestroy() {
|
141
|
-
window.removeEventListener('keydown', this.handleKeyDown)
|
142
|
-
},
|
143
161
|
methods: {
|
144
162
|
onCloseModal() {
|
145
163
|
this.$emit('on-close')
|
146
164
|
},
|
147
|
-
|
148
|
-
|
149
|
-
|
165
|
+
onOutsideClose() {
|
166
|
+
// If true, then only allow closing to come from clicking the X or wherever the onCloseModal is called
|
167
|
+
if (!this.preventOutsideClose) {
|
168
|
+
this.$emit('on-close')
|
150
169
|
}
|
151
170
|
}
|
152
171
|
},
|
153
172
|
watch: {
|
154
|
-
isOpen: function (
|
155
|
-
document.body.style.overflow =
|
156
|
-
if (isOpen) {
|
157
|
-
window.addEventListener('keydown', this.handleKeyDown)
|
158
|
-
} else {
|
159
|
-
window.removeEventListener('keydown', this.handleKeyDown)
|
160
|
-
}
|
173
|
+
isOpen: function (newVal) {
|
174
|
+
document.body.style.overflow = newVal ? 'hidden' : ''
|
161
175
|
}
|
162
176
|
}
|
163
177
|
}
|
@@ -7,11 +7,7 @@
|
|
7
7
|
@click="fetchPage(paginationParams.previous)"
|
8
8
|
>
|
9
9
|
<arrowIconContainer>
|
10
|
-
<icon
|
11
|
-
name="arrow_left"
|
12
|
-
:color="getTheme.colors.brightBlue"
|
13
|
-
size="12px"
|
14
|
-
/>
|
10
|
+
<icon name="arrow_left" color="#0068de" size="12px" />
|
15
11
|
</arrowIconContainer>
|
16
12
|
<arrowText>{{ $gettext('back') }}</arrowText>
|
17
13
|
</paginationLink>
|
@@ -59,11 +55,7 @@
|
|
59
55
|
>
|
60
56
|
<arrowText>{{ $gettext('forward') }}</arrowText>
|
61
57
|
<arrowIconContainer>
|
62
|
-
<icon
|
63
|
-
name="arrow_right"
|
64
|
-
:color="getTheme.colors.brightBlue"
|
65
|
-
size="12px"
|
66
|
-
/>
|
58
|
+
<icon name="arrow_right" color="#0068de" size="12px" />
|
67
59
|
</arrowIconContainer>
|
68
60
|
</paginationLink>
|
69
61
|
</paginationWrapper>
|
@@ -72,10 +64,8 @@
|
|
72
64
|
<script>
|
73
65
|
import styled from 'vue-styled-components'
|
74
66
|
import icon from '../icon'
|
75
|
-
import theme from '@/assets/theme.js'
|
76
|
-
|
77
67
|
const paginationWrapper = styled.nav`
|
78
|
-
color:
|
68
|
+
color: #0068de;
|
79
69
|
font-size: 13px;
|
80
70
|
display: flex;
|
81
71
|
flex-wrap: wrap;
|
@@ -95,7 +85,7 @@ const paginationLink = styled.div`
|
|
95
85
|
|
96
86
|
&.active {
|
97
87
|
color: #fff;
|
98
|
-
background-color:
|
88
|
+
background-color: #0068de;
|
99
89
|
padding: 7px 12px;
|
100
90
|
border-radius: 4px;
|
101
91
|
}
|
@@ -116,11 +106,6 @@ export default {
|
|
116
106
|
arrowIconContainer
|
117
107
|
},
|
118
108
|
props: ['fetchPage', 'currentPage', 'paginationParams'],
|
119
|
-
computed: {
|
120
|
-
getTheme() {
|
121
|
-
return theme
|
122
|
-
}
|
123
|
-
},
|
124
109
|
methods: {
|
125
110
|
getNewProjects(num) {
|
126
111
|
this.$emit('on-pagination-change', num)
|
@@ -72,7 +72,7 @@ const TableWrapper = styled('div', wrapperAttrs)`
|
|
72
72
|
overflow-y: hidden;
|
73
73
|
|
74
74
|
::-webkit-scrollbar {
|
75
|
-
height:
|
75
|
+
height: 5px; //height of the whole scrollbar area
|
76
76
|
}
|
77
77
|
|
78
78
|
::-webkit-scrollbar-track {
|
@@ -81,7 +81,7 @@ const TableWrapper = styled('div', wrapperAttrs)`
|
|
81
81
|
}
|
82
82
|
|
83
83
|
::-webkit-scrollbar-thumb {
|
84
|
-
border-bottom:
|
84
|
+
border-bottom: 5px solid ${(props) => props.theme.colors.purple}; // width of the actual scrollbar
|
85
85
|
border-radius: 4px;
|
86
86
|
}
|
87
87
|
`
|