@eturnity/eturnity_reusable_components 6.50.1 → 7.2.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 +1 -1
- package/src/App.vue +3 -1
- package/src/components/addNewButton/index.vue +12 -8
- package/src/components/buttons/mainButton/index.vue +1 -1
- package/src/components/iconWrapper/index.vue +19 -15
- package/src/components/infoCard/index.vue +38 -0
- package/src/components/inputs/inputText/index.vue +2 -2
- package/src/components/inputs/searchInput/index.vue +2 -2
- package/src/components/inputs/select/index.vue +8 -2
- package/src/components/inputs/switchField/index.vue +7 -2
- package/src/components/inputs/toggle/index.vue +1 -1
- package/src/components/navigationTabs/index.vue +105 -0
- package/src/components/pageTitle/index.vue +26 -3
- package/src/components/sideMenu/index.vue +5 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -114,6 +114,7 @@ import iconCollection from '@/components/icon/iconCollection'
|
|
114
114
|
import dropdownComponent from '@/components/dropdown'
|
115
115
|
import videoThumbnail from '@/components/videoThumbnail'
|
116
116
|
import icon from '@/components/icon'
|
117
|
+
import infoCard from '@/components/infoCard'
|
117
118
|
// import TableDropdown from "@/components/tableDropdown"
|
118
119
|
|
119
120
|
const PageContainer = styled.div`
|
@@ -138,7 +139,8 @@ export default {
|
|
138
139
|
iconCollection,
|
139
140
|
dropdownComponent,
|
140
141
|
videoThumbnail,
|
141
|
-
icon
|
142
|
+
icon,
|
143
|
+
infoCard
|
142
144
|
},
|
143
145
|
data() {
|
144
146
|
return {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container :shouldPosition="shouldPosition">
|
3
|
-
<button-container>
|
3
|
+
<button-container :data-id="dataId">
|
4
4
|
<plus-button :src="require('../../assets/icons/plus_button.svg')" />
|
5
5
|
</button-container>
|
6
6
|
</page-container>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script>
|
10
10
|
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
-
import styled from
|
11
|
+
import styled from 'vue-styled-components'
|
12
12
|
|
13
13
|
const pageAttrs = { shouldPosition: Boolean }
|
14
|
-
const PageContainer = styled(
|
15
|
-
position: ${(props) => (props.shouldPosition ?
|
14
|
+
const PageContainer = styled('div', pageAttrs)`
|
15
|
+
position: ${(props) => (props.shouldPosition ? 'fixed' : 'unset')};
|
16
16
|
bottom: 30px;
|
17
17
|
right: 30px;
|
18
18
|
`
|
@@ -42,17 +42,21 @@ const ButtonContainer = styled.div`
|
|
42
42
|
const PlusButton = styled.img``
|
43
43
|
|
44
44
|
export default {
|
45
|
-
name:
|
45
|
+
name: 'add-new-button',
|
46
46
|
components: {
|
47
47
|
PageContainer,
|
48
48
|
ButtonContainer,
|
49
|
-
PlusButton
|
49
|
+
PlusButton
|
50
50
|
},
|
51
51
|
props: {
|
52
52
|
shouldPosition: {
|
53
53
|
required: false,
|
54
|
-
default: true
|
54
|
+
default: true
|
55
55
|
},
|
56
|
-
|
56
|
+
dataId: {
|
57
|
+
type: String,
|
58
|
+
default: ''
|
59
|
+
}
|
60
|
+
}
|
57
61
|
}
|
58
62
|
</script>
|
@@ -8,6 +8,7 @@
|
|
8
8
|
:color="iconColor"
|
9
9
|
:hoveredBackgroundColor="hoveredBackgroundColor"
|
10
10
|
:isHovered="isHovered"
|
11
|
+
:data-id="dataId"
|
11
12
|
>
|
12
13
|
<icon
|
13
14
|
:disabled="disabled"
|
@@ -110,10 +111,10 @@ export default {
|
|
110
111
|
required: false
|
111
112
|
},
|
112
113
|
backgroundColor: {
|
113
|
-
required: false
|
114
|
-
|
115
|
-
|
116
|
-
|
114
|
+
required: false
|
115
|
+
},
|
116
|
+
hasBorder: {
|
117
|
+
required: false
|
117
118
|
},
|
118
119
|
hoveredBackgroundColor: {
|
119
120
|
required: false,
|
@@ -135,18 +136,21 @@ export default {
|
|
135
136
|
required: false,
|
136
137
|
default: '6px'
|
137
138
|
},
|
138
|
-
|
139
|
-
|
140
|
-
default:
|
141
|
-
},
|
142
|
-
isStriked:{
|
143
|
-
required:false,
|
144
|
-
default:false
|
145
|
-
|
146
|
-
}
|
139
|
+
dataId: {
|
140
|
+
type: String,
|
141
|
+
default: ''
|
147
142
|
},
|
148
|
-
|
149
|
-
|
143
|
+
isHovered: {
|
144
|
+
required: false,
|
145
|
+
default: false
|
146
|
+
},
|
147
|
+
isStriked: {
|
148
|
+
required: false,
|
149
|
+
default: false
|
150
150
|
}
|
151
|
+
},
|
152
|
+
data() {
|
153
|
+
return {}
|
151
154
|
}
|
155
|
+
}
|
152
156
|
</script>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<template>
|
2
|
+
<info-container>
|
3
|
+
<icon name="info" size="24px" />
|
4
|
+
<InfoTextContainer>
|
5
|
+
<slot />
|
6
|
+
</InfoTextContainer>
|
7
|
+
</info-container>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
import styled from 'vue-styled-components'
|
12
|
+
import icon from '../icon'
|
13
|
+
const InfoContainer = styled('div')`
|
14
|
+
display: flex;
|
15
|
+
align-items: flex-start;
|
16
|
+
gap: 15px;
|
17
|
+
padding: 20px;
|
18
|
+
width: 500px;
|
19
|
+
min-width: 450px;
|
20
|
+
border: 1px dashed #dee2eb;
|
21
|
+
border-radius: 4px;
|
22
|
+
margin:20px 0;
|
23
|
+
`
|
24
|
+
|
25
|
+
const InfoTextContainer = styled('div')`
|
26
|
+
font-size: 13px;
|
27
|
+
`
|
28
|
+
|
29
|
+
|
30
|
+
export default {
|
31
|
+
components:{
|
32
|
+
icon,
|
33
|
+
InfoTextContainer,
|
34
|
+
InfoContainer
|
35
|
+
},
|
36
|
+
props:[]
|
37
|
+
}
|
38
|
+
</script>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<input-label
|
9
9
|
:labelFontColor="labelFontColor"
|
10
10
|
:fontSize="fontSize"
|
11
|
-
:
|
11
|
+
:data-id="labelDataId"
|
12
12
|
>{{ label }}
|
13
13
|
<optionalLabel v-if="labelOptional"
|
14
14
|
>({{ $gettext('Optional') }})</optionalLabel
|
@@ -44,7 +44,7 @@
|
|
44
44
|
:hasFocus="hasFocus"
|
45
45
|
:backgroundColor="backgroundColor"
|
46
46
|
:disabledBackgroundColor="disabledBackgroundColor"
|
47
|
-
:
|
47
|
+
:data-id="inputDataId"
|
48
48
|
/>
|
49
49
|
<icon-wrapper
|
50
50
|
v-if="inputType === 'password' && !isError"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
:inputWidth="inputWidth"
|
12
12
|
:isFilter="isFilter"
|
13
13
|
:hasFocus="hasFocus"
|
14
|
-
:
|
14
|
+
:data-id="dataId"
|
15
15
|
/>
|
16
16
|
<img
|
17
17
|
class="search-icn"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
// inputWidth="250px"
|
32
32
|
// @on-change="function($event)"
|
33
33
|
// :isFilter="true" // to set the height at 30px
|
34
|
-
//
|
34
|
+
// data-id="test-data-id"
|
35
35
|
// />
|
36
36
|
import styled from 'vue-styled-components'
|
37
37
|
|
@@ -45,6 +45,7 @@
|
|
45
45
|
:disabled="disabled"
|
46
46
|
@keydown.native="onKeyDown"
|
47
47
|
:showBorder="showBorder"
|
48
|
+
:data-id="dataId"
|
48
49
|
>
|
49
50
|
<inputText
|
50
51
|
v-if="isSearchBarVisible"
|
@@ -122,7 +123,8 @@
|
|
122
123
|
// optionWidth="50%"
|
123
124
|
// label="that is a label"
|
124
125
|
// alignItems="vertical"
|
125
|
-
// label-data-id="test-
|
126
|
+
// label-data-id="test-label0data-id"
|
127
|
+
// data-id="test-data-id"
|
126
128
|
// >
|
127
129
|
// <template #selector="{selectedValue}">
|
128
130
|
// value selected: {{selectedValue}}
|
@@ -391,6 +393,10 @@ export default {
|
|
391
393
|
showBorder: {
|
392
394
|
required: false,
|
393
395
|
default: true
|
396
|
+
},
|
397
|
+
dataId: {
|
398
|
+
type: String,
|
399
|
+
default: ''
|
394
400
|
}
|
395
401
|
},
|
396
402
|
|
@@ -471,7 +477,7 @@ export default {
|
|
471
477
|
}
|
472
478
|
},
|
473
479
|
optionLeave() {
|
474
|
-
if(this.dropdownAutoClose) {
|
480
|
+
if (this.dropdownAutoClose) {
|
475
481
|
this.isDropdownOpen = false
|
476
482
|
}
|
477
483
|
},
|
@@ -10,6 +10,8 @@
|
|
10
10
|
v-if="label && labelAlign === 'left'"
|
11
11
|
:hasInfoMessage="!!infoTextMessage"
|
12
12
|
:colorMode="colorMode"
|
13
|
+
:primaryColor="primaryColor"
|
14
|
+
:secondaryColor="secondaryColor"
|
13
15
|
>
|
14
16
|
<label-text :size="size">{{ label }}</label-text>
|
15
17
|
<info-text
|
@@ -35,6 +37,7 @@
|
|
35
37
|
:primaryColor="primaryColor"
|
36
38
|
:secondaryColor="secondaryColor"
|
37
39
|
:inactiveColor="inactiveColor"
|
40
|
+
:data-id="item.hasOwnProperty('dataId') ? item.dataId : ''"
|
38
41
|
>
|
39
42
|
{{ item.content }}
|
40
43
|
</switchOption>
|
@@ -99,10 +102,12 @@ const toggleAttrs = {
|
|
99
102
|
fontColor: String,
|
100
103
|
disabled: Boolean,
|
101
104
|
backgroundColor: String,
|
102
|
-
isChecked: Boolean
|
105
|
+
isChecked: Boolean,
|
106
|
+
secondaryColor: String,
|
107
|
+
primaryColor: String,
|
103
108
|
}
|
104
109
|
const LabelText = styled('div', toggleAttrs)`
|
105
|
-
color:
|
110
|
+
color: ${(props) => props.primaryColor };
|
106
111
|
font-size: 13px;
|
107
112
|
font-weight: 700;
|
108
113
|
`
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<template>
|
2
|
+
<roofTabWrap>
|
3
|
+
<tab
|
4
|
+
v-for="(tab, index) in tabsData"
|
5
|
+
:key="tab.id"
|
6
|
+
:isDisabled="!!tab['isDisabled']"
|
7
|
+
:hasDisabledLook="!!tab['hasDisabledLook']"
|
8
|
+
:active="isIndexKey ? index === activeTab : tab[tabKey] === activeTab"
|
9
|
+
@click="$emit('tab-click', isIndexKey ? index : tab[tabKey])"
|
10
|
+
>
|
11
|
+
<Option :isDisabled="!!tab['isDisabled']" :hasDisabledLook="!!tab['hasDisabledLook']">
|
12
|
+
<Uppercase>{{ tab[tabLabel] }}</Uppercase>
|
13
|
+
<info-text
|
14
|
+
v-if="tab['labelInfoText']"
|
15
|
+
:text="tab['labelInfoText']"
|
16
|
+
borderColor="#ccc"
|
17
|
+
size="14px"
|
18
|
+
:alignArrow="tab['labelInfoAlign']"
|
19
|
+
/>
|
20
|
+
</Option>
|
21
|
+
</tab>
|
22
|
+
<bottomLine />
|
23
|
+
</roofTabWrap>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
import styled from 'vue-styled-components'
|
28
|
+
import InfoText from '../infoText'
|
29
|
+
const TabAttr = {
|
30
|
+
active: Boolean,
|
31
|
+
isDisabled: Boolean,
|
32
|
+
hasDisabledLook: Boolean
|
33
|
+
}
|
34
|
+
|
35
|
+
const bottomLine = styled('div')`
|
36
|
+
position: absolute;
|
37
|
+
bottom: 0;
|
38
|
+
left: 0;
|
39
|
+
height: 1px;
|
40
|
+
width: 100%;
|
41
|
+
background-color: #b2b9c5;
|
42
|
+
`
|
43
|
+
const roofTabWrap = styled('div')`
|
44
|
+
display: flex;
|
45
|
+
align-items: center;
|
46
|
+
position: relative;
|
47
|
+
font-size: 13px;
|
48
|
+
font-weight: 700;
|
49
|
+
`
|
50
|
+
const Uppercase = styled('span')`
|
51
|
+
text-transform: uppercase;
|
52
|
+
`
|
53
|
+
const Option = styled('div',TabAttr)`
|
54
|
+
font-size: 13px;
|
55
|
+
font-weight: 700;
|
56
|
+
display:flex;
|
57
|
+
justify-content: center;
|
58
|
+
flex-direction: row;
|
59
|
+
gap: 10px;
|
60
|
+
color: ${props=>props.hasDisabledLook ? props.theme.colors.grey2 : props.theme.colors.black};
|
61
|
+
`
|
62
|
+
const Tab = styled('div', TabAttr)`
|
63
|
+
padding: 16px 10px;
|
64
|
+
margin-right: 5px;
|
65
|
+
position: relative;
|
66
|
+
top: ${(props) => (props.hasDisabledLook ? '-1px' : '0')};
|
67
|
+
z-index: 10;
|
68
|
+
border-bottom: 2px solid
|
69
|
+
${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
|
70
|
+
background-color: ${(props) => (props.hasDisabledLook ? props.theme.colors.grey5 : 'transparent')};
|
71
|
+
transition: 0.2s ease;
|
72
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
73
|
+
min-width: 140px;
|
74
|
+
display: flex !important;
|
75
|
+
align-items: center;
|
76
|
+
justify-content: space-between;
|
77
|
+
min-height: 55px;
|
78
|
+
&:hover {
|
79
|
+
border-color: ${(props) => props.hasDisabledLook ? props.theme.colors.grey2 : props.theme.colors.primary};
|
80
|
+
}
|
81
|
+
`
|
82
|
+
|
83
|
+
export default {
|
84
|
+
name: 'Tabs',
|
85
|
+
|
86
|
+
components: {
|
87
|
+
Tab,
|
88
|
+
bottomLine,
|
89
|
+
roofTabWrap,
|
90
|
+
Option,
|
91
|
+
InfoText,
|
92
|
+
Uppercase
|
93
|
+
},
|
94
|
+
|
95
|
+
props: {
|
96
|
+
tabsData: { required: true },
|
97
|
+
activeTab: { required: true },
|
98
|
+
isIndexKey: { type: Boolean, default: false },
|
99
|
+
tabKey: { type: String, default: '' },
|
100
|
+
tabLabel: { type: String, default: '' }
|
101
|
+
}
|
102
|
+
}
|
103
|
+
</script>
|
104
|
+
|
105
|
+
<style lang="scss" scoped></style>
|
@@ -1,5 +1,14 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<flex>
|
3
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ text }}</title-text>
|
4
|
+
<info-text
|
5
|
+
v-if="infoText"
|
6
|
+
:text="infoText"
|
7
|
+
borderColor="#ccc"
|
8
|
+
size="14px"
|
9
|
+
:alignArrow="infoAlign"
|
10
|
+
/>
|
11
|
+
</flex>
|
3
12
|
</template>
|
4
13
|
|
5
14
|
<script>
|
@@ -10,20 +19,28 @@
|
|
10
19
|
// color="red"
|
11
20
|
// />
|
12
21
|
import styled from "vue-styled-components"
|
13
|
-
|
22
|
+
import InfoText from '../infoText'
|
14
23
|
const textAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
15
24
|
const TitleText = styled("div", textAttrs)`
|
16
25
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
17
26
|
font-weight: bold;
|
18
27
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
19
28
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
29
|
+
|
30
|
+
`
|
31
|
+
const flex = styled("div", textAttrs)`
|
32
|
+
display: flex;
|
33
|
+
gap:10px;
|
20
34
|
margin-bottom: 20px;
|
35
|
+
align-items: center;
|
21
36
|
`
|
22
37
|
|
23
38
|
export default {
|
24
39
|
name: "page-title",
|
25
40
|
components: {
|
26
41
|
TitleText,
|
42
|
+
InfoText,
|
43
|
+
flex
|
27
44
|
},
|
28
45
|
props: {
|
29
46
|
text: {
|
@@ -39,7 +56,13 @@ export default {
|
|
39
56
|
uppercase: {
|
40
57
|
required: false,
|
41
58
|
default: true
|
42
|
-
}
|
59
|
+
},
|
60
|
+
infoText: {
|
61
|
+
required: false,
|
62
|
+
},
|
63
|
+
infoAlign: {
|
64
|
+
required: false,
|
65
|
+
},
|
43
66
|
},
|
44
67
|
}
|
45
68
|
</script>
|
@@ -18,7 +18,10 @@
|
|
18
18
|
<list-text>{{ $gettext(item.label) }}</list-text>
|
19
19
|
</list-item>
|
20
20
|
<collapse-wrapper v-else :key="idx + item.key">
|
21
|
-
<collapse-container
|
21
|
+
<collapse-container
|
22
|
+
:data-id="`sub_menu_settings_${item.key}`"
|
23
|
+
@click="toggleActiveDropdown(item.key)"
|
24
|
+
>
|
22
25
|
<icon-container :isActive="activeParentTab === item.key">
|
23
26
|
<icon
|
24
27
|
:name="item.icon"
|
@@ -41,6 +44,7 @@
|
|
41
44
|
v-for="subItem in item.children"
|
42
45
|
:key="subItem.key"
|
43
46
|
:isActive="activeTab === subItem.key"
|
47
|
+
:data-id="`sub_menu_settings_${subItem.key}`"
|
44
48
|
@click="
|
45
49
|
$emit('tab-click', {
|
46
50
|
activeKey: subItem.key,
|