@eturnity/eturnity_reusable_components 7.8.0 → 7.8.1
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
@@ -1,38 +1,36 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
<info-container>
|
3
|
+
<icon name="info" size="24px" />
|
4
|
+
<text-container>
|
5
|
+
<slot />
|
6
|
+
</text-container>
|
7
|
+
</info-container>
|
8
8
|
</template>
|
9
|
-
|
9
|
+
|
10
10
|
<script>
|
11
11
|
import styled from 'vue-styled-components'
|
12
|
-
import
|
13
|
-
|
12
|
+
import Icon from '../icon'
|
13
|
+
|
14
|
+
const InfoContainer = styled.div`
|
14
15
|
display: flex;
|
15
|
-
align-items: flex-start;
|
16
16
|
gap: 15px;
|
17
17
|
padding: 20px;
|
18
|
-
|
19
|
-
min-width: 450px;
|
20
|
-
border: 1px dashed #dee2eb;
|
18
|
+
border: 1px dashed ${(props) => props.theme.colors.grey4};
|
21
19
|
border-radius: 4px;
|
22
|
-
margin:20px 0;
|
23
20
|
`
|
24
21
|
|
25
|
-
const
|
22
|
+
const TextContainer = styled.div`
|
26
23
|
font-size: 13px;
|
24
|
+
width: 100%;
|
27
25
|
`
|
28
26
|
|
29
27
|
|
30
28
|
export default {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
name: 'InfoCard',
|
30
|
+
components: {
|
31
|
+
Icon,
|
32
|
+
InfoContainer,
|
33
|
+
TextContainer
|
34
|
+
}
|
37
35
|
}
|
38
36
|
</script>
|
@@ -23,17 +23,17 @@
|
|
23
23
|
v-for="child in childOpen"
|
24
24
|
:key="child.value"
|
25
25
|
@click.stop="
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
onSelect({
|
27
|
+
item: child,
|
28
|
+
hasChildren: hasChildren(child)
|
29
|
+
})
|
30
|
+
"
|
31
31
|
@keyup.enter.stop="
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
onSelect({
|
33
|
+
item: child,
|
34
|
+
hasChildren: hasChildren(child)
|
35
|
+
})
|
36
|
+
"
|
37
37
|
>
|
38
38
|
{{ child.name }}
|
39
39
|
</option-child>
|
@@ -45,10 +45,11 @@
|
|
45
45
|
tabindex="0"
|
46
46
|
@click.stop="onSelect({ item: item, hasChildren: hasChildren(item) })"
|
47
47
|
@keyup.enter="
|
48
|
-
|
49
|
-
|
48
|
+
onSelect({ item: item, hasChildren: hasChildren(item) })
|
49
|
+
"
|
50
50
|
@mouseover="onItemHover({ index, item })"
|
51
51
|
:isDisabled="item.disabled"
|
52
|
+
:title="item.title"
|
52
53
|
>
|
53
54
|
<arrow-left
|
54
55
|
:hasChildren="hasChildren(item)"
|
@@ -68,9 +69,10 @@
|
|
68
69
|
// import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/threeDots"
|
69
70
|
// To use:
|
70
71
|
// <three-dots
|
72
|
+
// :isLoading="true"
|
71
73
|
// :options="listOptions"
|
74
|
+
// @on-click="onClick($event)"
|
72
75
|
// @on-select="onSelect($event)"
|
73
|
-
// :isLoading="true"
|
74
76
|
// />
|
75
77
|
// options to pass:
|
76
78
|
// listOptions: [
|
@@ -203,6 +205,8 @@ const OptionItem = styled('div', optionAttrs)`
|
|
203
205
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
204
206
|
font-size: 13px;
|
205
207
|
position: relative;
|
208
|
+
${(props) => (props.isDisabled ? `background-color: ${ props.theme.colors.grey5 }!important` : '')};
|
209
|
+
${(props) => (props.isDisabled ? `color: ${ props.theme.colors.grey2 }` : '')};
|
206
210
|
|
207
211
|
&:hover {
|
208
212
|
background-color: #ebeef4;
|
@@ -368,6 +372,7 @@ export default {
|
|
368
372
|
},
|
369
373
|
onSelect({ item, hasChildren }) {
|
370
374
|
if (hasChildren || item.disabled) {
|
375
|
+
this.$emit('on-click', item)
|
371
376
|
return
|
372
377
|
}
|
373
378
|
this.$emit('on-select', item)
|