@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
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.5.1](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v5.5.0...v5.5.1) (2023-09-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **slides:** remove stencil applied hidden attribute to slotted next/prev buttons ([9a9ff09](https://git.oxfordnanolabs.local/Digital/nano-components/commits/9a9ff0925d4b47cdd6c5a5367f273e1466d2478f))
12
+ * **slides:** wrap around slides not being adjusted during parallax animation ([feadf52](https://git.oxfordnanolabs.local/Digital/nano-components/commits/feadf52a14802b98ca1e4df6d2aae8670e6b927d))
13
+
14
+
15
+
16
+
17
+
6
18
  # [5.5.0](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v5.4.2...v5.5.0) (2023-09-28)
7
19
 
8
20
 
@@ -2762,6 +2762,11 @@ PrevNextButton.prototype._create = function () {
2762
2762
  const slot = document.createElement('slot');
2763
2763
  slot.name = this.isPrevious ? 'previous-icon' : 'next-icon';
2764
2764
  button.appendChild(slot);
2765
+ slot.addEventListener('slotchange', () => {
2766
+ slot.assignedElements({ flatten: true }).forEach((ele) => {
2767
+ ele.removeAttribute('hidden');
2768
+ });
2769
+ });
2765
2770
 
2766
2771
  // create arrow
2767
2772
  var svg = this.createSVG();
@@ -3871,22 +3876,21 @@ const Slides = class {
3871
3876
  const flkty = await this.flickity;
3872
3877
  flkty.cells.forEach((el, i) => {
3873
3878
  const cell = el;
3879
+ let flkX = flkty.x;
3874
3880
  const shiftedPos = cell.x + flkty.slideableWidth * cell.shift;
3875
3881
  const ele = this.childrenEles[i];
3876
- let flkX = flkty.x;
3877
3882
  if (flkty.options.wrapAround && flkty.cells.length > 1) {
3878
3883
  flkX = modulo(flkX, flkty.slideableWidth);
3879
3884
  flkX = flkX - flkty.slideableWidth;
3880
3885
  }
3881
3886
  let x = ((cell.target + flkX) * -1) / 3;
3882
3887
  if (cell.shift < 0) {
3883
- x = x + Math.abs(shiftedPos);
3888
+ x = x + Math.abs(shiftedPos) * 1.3333;
3884
3889
  }
3885
3890
  else if (cell.shift > 0) {
3886
3891
  x = ((cell.target + (flkX + shiftedPos)) * -1) / 3;
3887
3892
  }
3888
3893
  ele.style.transform = 'translate3d(' + x + 'px, 0, 0)';
3889
- // 'translateX(' + x + 'px)';
3890
3894
  });
3891
3895
  };
3892
3896
  this.handleFullscreen = (isFullScreen) => {
@@ -4069,9 +4073,7 @@ const Slides = class {
4069
4073
  this.options = { autoPlay: time };
4070
4074
  setTimeout(() => flickity.playPlayer());
4071
4075
  }
4072
- /**
4073
- * Stop auto play.
4074
- */
4076
+ /** Stop auto play. */
4075
4077
  async stopAutoplay() {
4076
4078
  const flickity = await this.getflickity();
4077
4079
  flickity.stopPlayer();