@getflip/swirl-components 0.213.1 → 0.213.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.
package/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-07-12T09:32:31",
2
+ "timestamp": "2024-07-12T11:19:09",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.18.1",
@@ -162,7 +162,7 @@ const SwirlLightbox = class {
162
162
  return;
163
163
  }
164
164
  this.closing = true;
165
- this.focusTrap.deactivate();
165
+ this.focusTrap?.deactivate();
166
166
  this.unlockBodyScroll();
167
167
  setTimeout(() => {
168
168
  this.isOpen = false;
@@ -264,7 +264,7 @@ const SwirlLightbox = class {
264
264
  "lightbox--hide-menu": !hasMenuItems,
265
265
  "lightbox--hide-toolbar": !hasToolbar,
266
266
  });
267
- return (index.h(index.Host, { key: '8cec4d231dec35e90b6d3b3c54bbf1b1e4fcd364', onKeydown: this.onKeyDown }, index.h("section", { key: '212e15751c9842b7a81f87c4d3c8f4ad601c52e6', "aria-hidden": String(!this.isOpen), "aria-label": this.label, "aria-modal": "true", class: className, id: "lightbox", onMouseDown: this.onPointerDown, onMouseMove: this.onPointerMove, onMouseOut: this.onPointerUp, onMouseUp: this.onPointerUp, onTouchEnd: this.onPointerUp, onTouchMove: this.onPointerMove, onTouchStart: this.onPointerDown, ref: (el) => (this.modalEl = el), role: "dialog", tabIndex: this.isOpen ? 0 : -1 }, index.h("div", { key: '134ec9aaa142401f165781af108715260f5fe32b', class: "lightbox__body", role: "document" }, index.h("header", { key: '6bc11ff79e3a17adfffc99fdab5e3750847388b4', class: "lightbox__header" }, index.h("button", { key: '52d3a58620374ed27ddcabbef709641139a35fa7', "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, index.h("swirl-icon-close", { key: 'a6a57ac17788fb71a29722b0834a85544943abf9' })), index.h("div", { key: '1e02044a040920ccda9178be647e44e4dc5d158e', class: "lightbox__toolbar" }, index.h("slot", { key: 'e412a8198a090255c6f6f3be26f000f9a71cda2a', name: "toolbar" })), !this.hideMenu && (index.h("swirl-popover-trigger", { key: '0eedb89f9e659030ef6f9ba7114fc8954d164c5f', swirlPopover: this.menu }, index.h("button", { key: '633a48d1a460ec83cfcea48a552b9cae3fc636d9', "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button" }, index.h("swirl-icon-more-vertikal", { key: '52f05b468eb36ed77c192fef0047cd41118e1e39' }))))), index.h("div", { key: 'c2b313e5b2fa3184007bb8e3d71037216f82bc25', "aria-roledescription": "carousel", class: "lightbox__content", role: "group" }, index.h("div", { key: '9f67aa3142ead468f41a99eb6d974f6676d135c4', "aria-atomic": "false", "aria-live": "polite", class: "lightbox__slides", onClick: this.onBackdropClick, onContextMenu: this.onContextMenu, ref: (el) => (this.slidesContainer = el) }, index.h("slot", { key: '86c833d3fa242b7f98522f7eee12fad8f301ca02', onSlotchange: this.registerSlides }))), index.h("div", { key: '966d8708ec3f444d2854b960c792033cf4be4541', class: "lightbox__controls" }, index.h("button", { key: '5413d867e329cc80e25a2eb879f4ebd0efe272bc', "aria-label": this.previousSlideButtonLabel, class: "lightbox__previous-slide-button", disabled: this.activeSlideIndex === 0, onClick: this.onPreviousSlideClick }, index.h("swirl-icon-arrow-left", { key: '222f6399158b27123641b61a320c06c7ce46fa68' })), index.h("button", { key: 'be498e47d9140e912448899abb112b379dfc0ff4', "aria-label": this.nextSlideButtonLabel, class: "lightbox__next-slide-button", disabled: this.activeSlideIndex === this.slides.length - 1, onClick: this.onNextSlideClick }, index.h("swirl-icon-arrow-right", { key: 'a3dad756c6d1052504c98576e44e34ffd6793f3c' }))), showPagination && (index.h("span", { key: '893b6ae4cac0ebb15e47b79506aaf4c1074cdf85', class: "lightbox__pagination" }, index.h("span", { key: 'd3cdc7805bfddf426eb67b6682e365198d850de6', "aria-current": "page" }, this.activeSlideIndex + 1), " /", " ", this.slides.length))), !this.hideMenu && (index.h("swirl-popover", { key: 'aa3db469a7f9926d573c64a165e491d4b6ef1c29', animation: "scale-in-y", disableScrollLock: true, id: "slide-menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, index.h("swirl-stack", { key: '124ab8fb29f24c4dc29bb27680b2cdab28fe3554' }, index.h("div", { key: 'f2a3220011af94da43bd0bffc94ed95731d45b02', class: "lightbox__meta" }, currentThumbnailUrl && (index.h("div", { key: '6a6eb5063e7c27e1df4f086e9f0a5dbd79378082', class: "lightbox__thumbnail" }, index.h("swirl-thumbnail", { key: 'ebdc1427141cb8ea7f905b30394110e202a69eff', alt: "", src: currentThumbnailUrl }))), index.h("div", { key: '2f329517b4dc0a1603331f38a9febdd9a473c485', class: "lightbox__file-info" }, index.h("swirl-text", { key: '44b6e8ddb2ca98d0d8b967634737449bd0ba86f8', truncate: true, weight: "semibold" }, currentFileName), index.h("swirl-text", { key: 'b15159d27d94693f70ecd8acb9db02b1a64168aa', color: "subdued", size: "sm", truncate: true }, currentFileType))), hasMenuItems && index.h("swirl-separator", { key: '5d5899ba624cdf0cddd44cd208cf500ca5a13a60' }), index.h("swirl-action-list", { key: 'be2fd718a93cf326b0f5f86d8d5eaa8dbdb795e3' }, this.downloadButtonEnabled && (index.h("swirl-action-list-item", { key: '1fdc3fe61ae7fcff9e4553edddd04eef3ff1713d', icon: "<swirl-icon-download></swirl-icon-download>", label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick })), index.h("slot", { key: '561c958a3e809fbfcf4f28105f81f5ecf2bf7403', name: "menu-items" }))))))));
267
+ return (index.h(index.Host, { key: '6f38a02323c43b2068f4325e3d644a1cf3836d08', onKeydown: this.onKeyDown }, index.h("section", { key: 'c7b37a6ea2b219b019e135ab72a982cc6c397eb2', "aria-hidden": String(!this.isOpen), "aria-label": this.label, "aria-modal": "true", class: className, id: "lightbox", onMouseDown: this.onPointerDown, onMouseMove: this.onPointerMove, onMouseOut: this.onPointerUp, onMouseUp: this.onPointerUp, onTouchEnd: this.onPointerUp, onTouchMove: this.onPointerMove, onTouchStart: this.onPointerDown, ref: (el) => (this.modalEl = el), role: "dialog", tabIndex: this.isOpen ? 0 : -1 }, index.h("div", { key: 'ba45b8d5c3066c6050e23888208c23b9fbceecef', class: "lightbox__body", role: "document" }, index.h("header", { key: '38b9fbec51a8e8893729d68cc2e78fa2808cc02f', class: "lightbox__header" }, index.h("button", { key: '5c9748775b0fb8303005dbd3ea4f4460bca135a3', "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, index.h("swirl-icon-close", { key: '470336593999047c371f8ffefc1bdcc53454a824' })), index.h("div", { key: 'c8362fb5fa227be5968984256550e016436cf7d4', class: "lightbox__toolbar" }, index.h("slot", { key: '6644556b4386c215eae9f7750fbcfcc84bd70627', name: "toolbar" })), !this.hideMenu && (index.h("swirl-popover-trigger", { key: 'b32143c69f2d23324549d0035dfe67b819bb035e', swirlPopover: this.menu }, index.h("button", { key: '65dd4bd6cf8dcd0388a21b66b0ef9fe6ab3ea46f', "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button" }, index.h("swirl-icon-more-vertikal", { key: '6c0ae26d6db0a9eeda62f6e7e4b50a1583da3139' }))))), index.h("div", { key: '9098924cfb4e236818e0b99a46c1d182bbafc667', "aria-roledescription": "carousel", class: "lightbox__content", role: "group" }, index.h("div", { key: '62207dbf4df5cdef6430c45caf3a6364d1a2cd89', "aria-atomic": "false", "aria-live": "polite", class: "lightbox__slides", onClick: this.onBackdropClick, onContextMenu: this.onContextMenu, ref: (el) => (this.slidesContainer = el) }, index.h("slot", { key: '73d3cdddef1a02a2a620eefeb4104adc900e4b9c', onSlotchange: this.registerSlides }))), index.h("div", { key: 'b074e1f32dd0c57536092e4e7e62c497ab5ef982', class: "lightbox__controls" }, index.h("button", { key: '6b18629bee35d41169433a141058a0eec4b4bbe1', "aria-label": this.previousSlideButtonLabel, class: "lightbox__previous-slide-button", disabled: this.activeSlideIndex === 0, onClick: this.onPreviousSlideClick }, index.h("swirl-icon-arrow-left", { key: 'a985ec6541a5d14f6a80d31badfb2326b7859feb' })), index.h("button", { key: 'dacf055ac17e8cb0acf8f886ffaebfc6433dbe40', "aria-label": this.nextSlideButtonLabel, class: "lightbox__next-slide-button", disabled: this.activeSlideIndex === this.slides.length - 1, onClick: this.onNextSlideClick }, index.h("swirl-icon-arrow-right", { key: 'a5b1b929bf83d959bf156907e27d2745961a3253' }))), showPagination && (index.h("span", { key: '8522b6ba8a13e937fef9c52a9f0ba4ea3db3be9a', class: "lightbox__pagination" }, index.h("span", { key: 'a91b35586cebed170a14f25650b2e0aad7612114', "aria-current": "page" }, this.activeSlideIndex + 1), " /", " ", this.slides.length))), !this.hideMenu && (index.h("swirl-popover", { key: '10fd0b20ae94675060c3862e066d58115487c5ec', animation: "scale-in-y", disableScrollLock: true, id: "slide-menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, index.h("swirl-stack", { key: '3d230ae7bb3a13ff267691eea08fb296e25f5d3c' }, index.h("div", { key: '912b5d37523c60014c40b8a44901e9b57e16a943', class: "lightbox__meta" }, currentThumbnailUrl && (index.h("div", { key: 'f6cb69f77c7d01bba6f678639223336904276cf7', class: "lightbox__thumbnail" }, index.h("swirl-thumbnail", { key: '0c5454ff4e7c8d434f098ad263b3da6e6792c43d', alt: "", src: currentThumbnailUrl }))), index.h("div", { key: 'd2e7c5b8c3836ec12f22fa93bc4795500d54ccd3', class: "lightbox__file-info" }, index.h("swirl-text", { key: 'd8128db7fa6aa56a8e0b08657925ae9c4137a440', truncate: true, weight: "semibold" }, currentFileName), index.h("swirl-text", { key: '6d8effcdc5b6198786c4302fcf2aa17ee878e66f', color: "subdued", size: "sm", truncate: true }, currentFileType))), hasMenuItems && index.h("swirl-separator", { key: '206b0b31b24d0cb0c605916fd4ac846c3f5ad719' }), index.h("swirl-action-list", { key: '0060ce14704b2c2c6967b5399b2b2db83a327063' }, this.downloadButtonEnabled && (index.h("swirl-action-list-item", { key: '526ed63e300600eb41ec615950d9c7de0ce5f8ae', icon: "<swirl-icon-download></swirl-icon-download>", label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick })), index.h("slot", { key: 'df2fa48984cdf48a0787ed7d514d4c7d43f2a4c0', name: "menu-items" }))))))));
268
268
  }
269
269
  get el() { return index.getElement(this); }
270
270
  };