@eturnity/eturnity_reusable_components 1.2.86-EPDM-7435 → 1.2.86-EPDM-7509

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.86-EPDM-7435",
3
+ "version": "1.2.86-EPDM-7509",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -193,7 +193,7 @@ const selectButton = styled('div', selectButtonAttrs)`
193
193
  box-sizing: border-box;
194
194
  border-radius: 4px;
195
195
  padding: ${(props) =>
196
- props.isSearchBarVisible ? '0' : '0px 0px 0 15px'};
196
+ props.isSearchBarVisible ? '0 10px 0 0' : '0px 10px 0 15px'};
197
197
  text-align: left;
198
198
  border-radius: 4px;
199
199
  min-height: 36px;
@@ -230,6 +230,7 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
230
230
  z-index:${(props) => (props.isActive ? '2' : '1')};
231
231
  position:absolute;
232
232
  top:5px;
233
+ padding:10px;
233
234
  border:1px solid ${(props) => props.theme.colors.grey4}
234
235
  border-radius:4px;
235
236
  display: flex;
@@ -12,6 +12,7 @@
12
12
  v-else
13
13
  :cellPaddings="cellPaddings"
14
14
  :tableCursor="tableCursor"
15
+ @mouseover="setHovers($event)"
15
16
  >
16
17
  <slot />
17
18
  </table-container>
@@ -87,8 +88,8 @@ const TableContainer = styled('table', containerAttrs)`
87
88
  }
88
89
 
89
90
  tbody {
90
- tr {
91
- &:hover {
91
+ tr, td {
92
+ &:hover, &.hover {
92
93
  background-color: ${(props) => props.theme.colors.white};
93
94
  cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
94
95
 
@@ -378,6 +379,30 @@ export default {
378
379
  tableCursor: {
379
380
  required: false
380
381
  }
382
+ },
383
+ methods: {
384
+ setHovers(event) {
385
+ let parentTd
386
+
387
+ if (event.target.tagName === 'TD') {
388
+ parentTd = event.target
389
+ } else {
390
+ let currentElement = event.target.parentElement
391
+ while (currentElement.tagName !== 'TR') {
392
+ if (currentElement.tagName === 'TD') parentTd = currentElement
393
+ currentElement = currentElement.parentElement
394
+ }
395
+ }
396
+
397
+ if (parentTd) {
398
+ const trChildren = Array.from(parentTd.parentElement.children)
399
+ const trList = Array.from(document.querySelectorAll('tr'))
400
+ trList.forEach((el) => {
401
+ const cells = Array.from(el.children)
402
+ cells[trChildren.indexOf(parentTd)].classList.add('hover')
403
+ })
404
+ }
405
+ }
381
406
  }
382
407
  }
383
408
  </script>