@getflip/swirl-components 0.171.0 → 0.171.2

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 (26) hide show
  1. package/components.json +1 -1
  2. package/dist/cjs/swirl-avatar.cjs.entry.js +1 -3
  3. package/dist/cjs/swirl-date-input.cjs.entry.js +6 -12
  4. package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -3
  5. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  6. package/dist/collection/components/swirl-avatar/swirl-avatar.js +1 -3
  7. package/dist/collection/components/swirl-date-input/swirl-date-input.js +6 -12
  8. package/dist/collection/components/swirl-date-input/swirl-date-input.spec.js +9 -9
  9. package/dist/collection/components/swirl-image-grid-item/swirl-image-grid-item.js +1 -3
  10. package/dist/collection/components/swirl-image-grid-item/swirl-image-grid-item.stories.js +2 -0
  11. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  12. package/dist/components/swirl-avatar.js +1 -3
  13. package/dist/components/swirl-date-input.js +6 -12
  14. package/dist/components/swirl-image-grid-item.js +1 -3
  15. package/dist/esm/swirl-avatar.entry.js +1 -3
  16. package/dist/esm/swirl-date-input.entry.js +6 -12
  17. package/dist/esm/swirl-image-grid-item.entry.js +1 -3
  18. package/dist/swirl-components/p-0935f67d.entry.js +1 -0
  19. package/dist/swirl-components/p-5901b953.entry.js +1 -0
  20. package/dist/swirl-components/p-8acf7c0d.entry.js +1 -0
  21. package/dist/swirl-components/swirl-components.esm.js +1 -1
  22. package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +0 -1
  23. package/package.json +1 -1
  24. package/dist/swirl-components/p-345c4495.entry.js +0 -1
  25. package/dist/swirl-components/p-42fa1fd3.entry.js +0 -1
  26. package/dist/swirl-components/p-b4ba60d8.entry.js +0 -1
package/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-03-15T09:09:05",
2
+ "timestamp": "2024-03-18T09:19:12",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.3.1",
@@ -90,9 +90,7 @@ const SwirlAvatar = class {
90
90
  this.intersectionObserver.observe(this.element);
91
91
  }
92
92
  onVisibilityChange(entries) {
93
- if (entries[0].isIntersecting) {
94
- this.inViewport = true;
95
- }
93
+ this.inViewport = entries.some((entry) => entry.isIntersecting);
96
94
  }
97
95
  render() {
98
96
  const showImage = Boolean(this.src) &&
@@ -16,7 +16,6 @@ const SwirlDateInput = class {
16
16
  this.invalidInput = index.createEvent(this, "invalidInput", 7);
17
17
  this.valueChange = index.createEvent(this, "valueChange", 7);
18
18
  this.desktopMediaQuery = utils.getDesktopMediaQuery();
19
- this.recursiveFocus = false;
20
19
  this.desktopMediaQueryHandler = (event) => {
21
20
  this.updateIconSize(event.matches);
22
21
  };
@@ -47,6 +46,12 @@ const SwirlDateInput = class {
47
46
  };
48
47
  this.onClick = (event) => {
49
48
  event.preventDefault();
49
+ if (this.preferredInputMode === "pick") {
50
+ this.pickerPopover.open(this.el);
51
+ if (!utils.isMobileViewport()) {
52
+ this.focus();
53
+ }
54
+ }
50
55
  };
51
56
  this.onMouseDown = () => {
52
57
  if (this.preferredInputMode === "pick") {
@@ -54,17 +59,6 @@ const SwirlDateInput = class {
54
59
  }
55
60
  };
56
61
  this.onFocus = (event) => {
57
- if (this.recursiveFocus) {
58
- this.recursiveFocus = false;
59
- return;
60
- }
61
- if (this.preferredInputMode === "pick") {
62
- this.pickerPopover.open(this.el);
63
- if (!utils.isMobileViewport()) {
64
- this.recursiveFocus = true;
65
- this.focus();
66
- }
67
- }
68
62
  this.handleAutoSelect(event);
69
63
  };
70
64
  this.onPickDate = (event) => {
@@ -56,9 +56,7 @@ const SwirlImageGridItem = class {
56
56
  this.intersectionObserver.observe(this.el);
57
57
  }
58
58
  onVisibilityChange(entries) {
59
- if (entries[0].isIntersecting) {
60
- this.inViewport = true;
61
- }
59
+ this.inViewport = entries.some((entry) => entry.isIntersecting);
62
60
  }
63
61
  render() {
64
62
  const Tag = this.interactive ? "button" : "div";