@eturnity/eturnity_reusable_components 1.2.86-EPDM-7435-0 → 1.2.86-EPDM-7509.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.86-EPDM-7435-0",
3
+ "version": "1.2.86-EPDM-7509.1",
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,8 @@
12
12
  v-else
13
13
  :cellPaddings="cellPaddings"
14
14
  :tableCursor="tableCursor"
15
+ @mouseover="setHovers($event)"
16
+ @mouseleave="setHovers($event)"
15
17
  >
16
18
  <slot />
17
19
  </table-container>
@@ -87,8 +89,8 @@ const TableContainer = styled('table', containerAttrs)`
87
89
  }
88
90
 
89
91
  tbody {
90
- tr {
91
- &:hover {
92
+ tr, td {
93
+ &:hover, &.hover {
92
94
  background-color: ${(props) => props.theme.colors.white};
93
95
  cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
94
96
 
@@ -378,6 +380,33 @@ export default {
378
380
  tableCursor: {
379
381
  required: false
380
382
  }
383
+ },
384
+ methods: {
385
+ setHovers(event) {
386
+ if (event.target.tagName !== 'TABLE') {
387
+ console.log('over', event)
388
+ let hoveredCell = event.target
389
+ console.log(hoveredCell.tagName)
390
+
391
+ if (hoveredCell.tagName !== 'TD') {
392
+ let currentParentElement = hoveredCell.parentElement
393
+ while (currentParentElement.tagName !== 'TR') {
394
+ console.log(currentParentElement.tagName)
395
+ if (currentParentElement.tagName === 'TD') hoveredCell = currentParentElement
396
+ currentParentElement = currentParentElement.parentElement
397
+ }
398
+ }
399
+
400
+ if (hoveredCell) {
401
+ const rowChildren = Array.from(hoveredCell.parentElement.children)
402
+ const rowList = Array.from(document.querySelectorAll('tr'))
403
+ rowList.forEach((el) => {
404
+ const cells = Array.from(el.children)
405
+ cells[rowChildren.indexOf(hoveredCell)].classList.add('hover')
406
+ })
407
+ }
408
+ }
409
+ }
381
410
  }
382
411
  }
383
412
  </script>
@@ -1 +0,0 @@
1
- <?xml version="1.0" ?><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 13H12v5l6-6-6-6v5H4V2H2v11z"/></svg>