@nanoporetech-digital/components 5.5.0 → 5.5.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/nano-slides.cjs.entry.js +8 -6
  3. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  4. package/dist/cjs/{nano-table-6abb323d.js → nano-table-884ce575.js} +2 -2
  5. package/dist/cjs/{nano-table-6abb323d.js.map → nano-table-884ce575.js.map} +1 -1
  6. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  7. package/dist/cjs/{table.worker-20dc920c.js → table.worker-670457aa.js} +2 -2
  8. package/dist/cjs/table.worker-670457aa.js.map +1 -0
  9. package/dist/collection/components/slides/lib/js/prev-next-button.js +5 -0
  10. package/dist/collection/components/slides/slides.js +3 -6
  11. package/dist/collection/components/slides/slides.js.map +1 -1
  12. package/dist/components/nano-slides.js +8 -6
  13. package/dist/components/nano-slides.js.map +1 -1
  14. package/dist/esm/nano-slides.entry.js +8 -6
  15. package/dist/esm/nano-slides.entry.js.map +1 -1
  16. package/dist/esm/{nano-table-f234ca94.js → nano-table-c6a4e1dc.js} +2 -2
  17. package/dist/esm/{nano-table-f234ca94.js.map → nano-table-c6a4e1dc.js.map} +1 -1
  18. package/dist/esm/nano-table.entry.js +1 -1
  19. package/dist/esm/{table.worker-cb4d4ab8.js → table.worker-2568f20c.js} +2 -2
  20. package/dist/esm/table.worker-2568f20c.js.map +1 -0
  21. package/dist/nano-components/nano-components.esm.js +1 -1
  22. package/dist/nano-components/{p-c6ee778e.js → p-4ef3200a.js} +2 -2
  23. package/dist/nano-components/{p-0b03cb52.entry.js → p-7c4ac519.entry.js} +2 -2
  24. package/dist/nano-components/p-7c4ac519.entry.js.map +1 -0
  25. package/dist/nano-components/{p-47b7a81d.entry.js → p-9a0191c7.entry.js} +2 -2
  26. package/dist/nano-components/p-f5698b41.js +5 -0
  27. package/dist/types/components/slides/slides.d.ts +1 -3
  28. package/docs-json.json +1 -1
  29. package/hydrate/index.js +8 -6
  30. package/package.json +2 -2
  31. package/dist/cjs/table.worker-20dc920c.js.map +0 -1
  32. package/dist/esm/table.worker-cb4d4ab8.js.map +0 -1
  33. package/dist/nano-components/p-0b03cb52.entry.js.map +0 -1
  34. package/dist/nano-components/p-5c493505.js +0 -5
  35. /package/dist/nano-components/{p-c6ee778e.js.map → p-4ef3200a.js.map} +0 -0
  36. /package/dist/nano-components/{p-47b7a81d.entry.js.map → p-9a0191c7.entry.js.map} +0 -0
  37. /package/dist/nano-components/{p-5c493505.js.map → p-f5698b41.js.map} +0 -0
@@ -2758,6 +2758,11 @@ PrevNextButton.prototype._create = function () {
2758
2758
  const slot = document.createElement('slot');
2759
2759
  slot.name = this.isPrevious ? 'previous-icon' : 'next-icon';
2760
2760
  button.appendChild(slot);
2761
+ slot.addEventListener('slotchange', () => {
2762
+ slot.assignedElements({ flatten: true }).forEach((ele) => {
2763
+ ele.removeAttribute('hidden');
2764
+ });
2765
+ });
2761
2766
 
2762
2767
  // create arrow
2763
2768
  var svg = this.createSVG();
@@ -3867,22 +3872,21 @@ const Slides = class {
3867
3872
  const flkty = await this.flickity;
3868
3873
  flkty.cells.forEach((el, i) => {
3869
3874
  const cell = el;
3875
+ let flkX = flkty.x;
3870
3876
  const shiftedPos = cell.x + flkty.slideableWidth * cell.shift;
3871
3877
  const ele = this.childrenEles[i];
3872
- let flkX = flkty.x;
3873
3878
  if (flkty.options.wrapAround && flkty.cells.length > 1) {
3874
3879
  flkX = modulo(flkX, flkty.slideableWidth);
3875
3880
  flkX = flkX - flkty.slideableWidth;
3876
3881
  }
3877
3882
  let x = ((cell.target + flkX) * -1) / 3;
3878
3883
  if (cell.shift < 0) {
3879
- x = x + Math.abs(shiftedPos);
3884
+ x = x + Math.abs(shiftedPos) * 1.3333;
3880
3885
  }
3881
3886
  else if (cell.shift > 0) {
3882
3887
  x = ((cell.target + (flkX + shiftedPos)) * -1) / 3;
3883
3888
  }
3884
3889
  ele.style.transform = 'translate3d(' + x + 'px, 0, 0)';
3885
- // 'translateX(' + x + 'px)';
3886
3890
  });
3887
3891
  };
3888
3892
  this.handleFullscreen = (isFullScreen) => {
@@ -4065,9 +4069,7 @@ const Slides = class {
4065
4069
  this.options = { autoPlay: time };
4066
4070
  setTimeout(() => flickity.playPlayer());
4067
4071
  }
4068
- /**
4069
- * Stop auto play.
4070
- */
4072
+ /** Stop auto play. */
4071
4073
  async stopAutoplay() {
4072
4074
  const flickity = await this.getflickity();
4073
4075
  flickity.stopPlayer();