@eturnity/eturnity_reusable_components 7.35.1-EPDM-10620.7 → 7.35.1-EPDM-10620.9
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
@@ -15,11 +15,10 @@
|
|
15
15
|
>
|
16
16
|
{{ item.name }}
|
17
17
|
</ListItem>
|
18
|
-
<IconContainer>
|
18
|
+
<IconContainer @click="expandOptions">
|
19
19
|
<ButtonContainer
|
20
20
|
v-if="optionsList.length > optionLimit || hasComponent"
|
21
21
|
name="more_options,_tool_tips"
|
22
|
-
@click="expandOptions"
|
23
22
|
>
|
24
23
|
<DotItem />
|
25
24
|
<DotItem />
|
@@ -63,6 +62,7 @@
|
|
63
62
|
v-for="item in expandedOptions"
|
64
63
|
:key="item.type"
|
65
64
|
:disabled="item.disabled || false"
|
65
|
+
:hasComponent="!!item?.component"
|
66
66
|
:hover-color="item.hoverColor"
|
67
67
|
@click="
|
68
68
|
!item?.component && !item.disabled && $emit('on-' + item.type)
|
@@ -70,6 +70,7 @@
|
|
70
70
|
>
|
71
71
|
<ListItemWrapper
|
72
72
|
v-if="item?.component"
|
73
|
+
:hasComponent="!!item?.component"
|
73
74
|
@click="!item.disabled && toggleElement(item.type)"
|
74
75
|
>
|
75
76
|
<ListItemTitle>
|
@@ -305,12 +306,16 @@
|
|
305
306
|
flex-direction: column;
|
306
307
|
`
|
307
308
|
|
308
|
-
const ExpandedListItem = styled('div',
|
309
|
+
const ExpandedListItem = styled('div', {
|
310
|
+
disabled: Boolean,
|
311
|
+
hoverColor: String,
|
312
|
+
hasComponent: Boolean,
|
313
|
+
})`
|
309
314
|
width: 100%;
|
310
315
|
display: flex;
|
311
316
|
justify-content: space-between;
|
312
317
|
align-items: center;
|
313
|
-
padding: 13px 15px;
|
318
|
+
padding: ${(props) => (props.hasComponent ? '0' : '13px 15px')};
|
314
319
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
315
320
|
color: ${(props) => props.disabled && props.theme.colors.grey3};
|
316
321
|
|
@@ -321,11 +326,12 @@
|
|
321
326
|
}
|
322
327
|
`
|
323
328
|
|
324
|
-
const ListItemWrapper = styled
|
329
|
+
const ListItemWrapper = styled('div', { hasComponent: Boolean })`
|
325
330
|
width: 100%;
|
326
331
|
display: flex;
|
327
332
|
align-items: center;
|
328
333
|
justify-content: space-between;
|
334
|
+
padding: ${(props) => (props.hasComponent ? '13px 15px' : '0')};
|
329
335
|
`
|
330
336
|
|
331
337
|
const ListItemTitle = styled.div`
|
@@ -428,6 +434,17 @@
|
|
428
434
|
this.expanded = !this.expanded
|
429
435
|
this.expandedOptions = this.optionsList
|
430
436
|
},
|
437
|
+
handleExpandedOptionClick(item) {
|
438
|
+
if (item.disabled) return
|
439
|
+
|
440
|
+
if (!item.component) {
|
441
|
+
this.$emit('on-' + item.type)
|
442
|
+
|
443
|
+
return
|
444
|
+
}
|
445
|
+
|
446
|
+
this.toggleElement(item.type)
|
447
|
+
},
|
431
448
|
},
|
432
449
|
}
|
433
450
|
</script>
|