@timlassiter11/yatl 1.2.2 → 1.2.3

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/dist/index.mjs CHANGED
@@ -1619,10 +1619,15 @@ var table_styles_default = css`
1619
1619
  .row {
1620
1620
  position: relative;
1621
1621
  background-color: var(--table-row-bg);
1622
- border-bottom: 1px solid var(--table-border-color);
1622
+ /** Use box-shadow to mimic borders. It works better when virtualized */
1623
+ box-shadow: inset 0 -1px 0 0 var(--table-border-color);
1623
1624
  transition: background-color 50ms;
1624
1625
  }
1625
1626
 
1627
+ .row-number-cell {
1628
+ box-shadow: inset 0 -1px 0 0 var(--table-border-color);
1629
+ }
1630
+
1626
1631
  .row.header-row {
1627
1632
  background-color: var(--table-header-bg);
1628
1633
  border-bottom: 1px solid var(--table-border-color);
@@ -1635,7 +1640,7 @@ var table_styles_default = css`
1635
1640
  }
1636
1641
 
1637
1642
  .row:last-child {
1638
- border-bottom: none;
1643
+ box-shadow: none;
1639
1644
  }
1640
1645
 
1641
1646
  .table:not(.resizing) .row {
@@ -1681,7 +1686,7 @@ var table_styles_default = css`
1681
1686
  }
1682
1687
 
1683
1688
  @layer striped {
1684
- :host([striped]) .body .row:nth-child(even) {
1689
+ :host([striped]) .row-even {
1685
1690
  background-color: var(--table-row-stripe-bg);
1686
1691
  }
1687
1692
  }
@@ -2660,7 +2665,12 @@ var YatlTable = class extends LitElement {
2660
2665
  if (Array.isArray(userParts)) {
2661
2666
  userParts = userParts.join(" ");
2662
2667
  }
2663
- const classes = { row: true, selected };
2668
+ const classes = {
2669
+ row: true,
2670
+ selected,
2671
+ "row-even": renderIndex % 2 === 0,
2672
+ "row-odd": renderIndex % 2 !== 0
2673
+ };
2664
2674
  const rowIndex = renderIndex + 1;
2665
2675
  return html2`
2666
2676
  <div
@@ -2905,7 +2915,7 @@ __decorateClass([
2905
2915
  property({ type: Boolean, attribute: "enable-column-reorder" })
2906
2916
  ], YatlTable.prototype, "enableColumnReorder", 2);
2907
2917
  __decorateClass([
2908
- property({ type: Boolean })
2918
+ property({ type: Boolean, attribute: "enable-row-number-column" })
2909
2919
  ], YatlTable.prototype, "enableRowNumberColumn", 2);
2910
2920
  __decorateClass([
2911
2921
  property({ type: Boolean, attribute: "enable-footer" })