@getflip/swirl-components 0.176.0 → 0.177.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.
- package/components.json +9 -1
- package/dist/cjs/swirl-description-list-item.cjs.entry.js +4 -2
- package/dist/cjs/swirl-lightbox.cjs.entry.js +6 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-description-list/swirl-description-list.stories.js +3 -0
- package/dist/collection/components/swirl-description-list-item/swirl-description-list-item.css +17 -4
- package/dist/collection/components/swirl-description-list-item/swirl-description-list-item.js +4 -1
- package/dist/collection/components/swirl-description-list-item/swirl-description-list-item.spec.js +11 -6
- package/dist/collection/components/swirl-lightbox/swirl-lightbox.js +6 -1
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-description-list-item.js +4 -2
- package/dist/components/swirl-lightbox.js +6 -1
- package/dist/esm/swirl-description-list-item.entry.js +4 -2
- package/dist/esm/swirl-lightbox.entry.js +6 -1
- package/dist/swirl-components/p-d5c10d1e.entry.js +1 -0
- package/dist/swirl-components/p-ff15c52e.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-description-list-item/swirl-description-list-item.d.ts +1 -0
- package/dist/types/components/swirl-lightbox/swirl-lightbox.d.ts +1 -0
- package/package.json +1 -1
- package/dist/swirl-components/p-443e8a4b.entry.js +0 -1
- package/dist/swirl-components/p-85eeb993.entry.js +0 -1
package/components.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-03-
|
|
2
|
+
"timestamp": "2024-03-26T08:52:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "3.3.1",
|
|
@@ -6375,6 +6375,10 @@
|
|
|
6375
6375
|
{
|
|
6376
6376
|
"name": "slot",
|
|
6377
6377
|
"text": "tools - Optional tools to be displayed on the right side of the item"
|
|
6378
|
+
},
|
|
6379
|
+
{
|
|
6380
|
+
"name": "slot",
|
|
6381
|
+
"text": "additional-content - Optional additional content displayed at the bottom of the item"
|
|
6378
6382
|
}
|
|
6379
6383
|
],
|
|
6380
6384
|
"usage": {},
|
|
@@ -6450,6 +6454,10 @@
|
|
|
6450
6454
|
"listeners": [],
|
|
6451
6455
|
"styles": [],
|
|
6452
6456
|
"slots": [
|
|
6457
|
+
{
|
|
6458
|
+
"name": "additional-content",
|
|
6459
|
+
"docs": "Optional additional content displayed at the bottom of the item"
|
|
6460
|
+
},
|
|
6453
6461
|
{
|
|
6454
6462
|
"name": "slot",
|
|
6455
6463
|
"docs": "The description"
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1de6abbd.js');
|
|
6
6
|
const index$1 = require('./index-2ddd0598.js');
|
|
7
7
|
|
|
8
|
-
const swirlDescriptionListItemCss = ":host{display:block}:host *{box-sizing:border-box}.description-list-
|
|
8
|
+
const swirlDescriptionListItemCss = ":host{display:block}:host *{box-sizing:border-box}.description-list-item__inner{display:flex;max-width:100%;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);align-items:flex-start;color:var(--s-text-default);line-height:var(--s-line-height-base);justfiy-content:space-between;gap:var(--s-space-16)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.description-list-item__inner{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.description-list-item--bordered{padding-top:var(--s-space-16);padding-bottom:var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default)}.description-list-item:not(.description-list-item--has-tools) .description-list-item__tools{display:none}.description-list-item:not(.description-list-item--has-additional-content) .description-list-item__additional-content{display:none}.description-list-item__text-container{flex-grow:1}.description-list-item__term{display:block;margin-bottom:var(--s-space-4);font-weight:var(--s-font-weight-semibold);overflow-wrap:break-word}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.description-list-item__term{margin-bottom:var(--s-space-2)}}.description-list-item__tooltip{display:inline-flex;margin-left:var(--s-space-4);vertical-align:middle}.description-list-item__description{display:block;max-width:40rem;margin:0;overflow-wrap:break-word}.description-list-item__tools{display:flex;min-height:2.625rem;flex-shrink:0;align-items:center}.description-list-item__additional-content{padding-bottom:var(--s-space-8);flex-basis:100%;flex-shrink:0}";
|
|
9
9
|
|
|
10
10
|
const SwirlDescriptionListItem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -17,11 +17,13 @@ const SwirlDescriptionListItem = class {
|
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
const hasTools = Boolean(this.el.querySelector('[slot="tools"]'));
|
|
20
|
+
const hasAdditionalContent = Boolean(this.el.querySelector('[slot="additional-content"]'));
|
|
20
21
|
const className = index$1.classnames("description-list-item", {
|
|
21
22
|
"description-list-item--bordered": this.bordered,
|
|
23
|
+
"description-list-item--has-additional-content": hasAdditionalContent,
|
|
22
24
|
"description-list-item--has-tools": hasTools,
|
|
23
25
|
});
|
|
24
|
-
return (index.h(index.Host, { role: "listitem" }, index.h("div", { class: className, part: "description-list-item", role: "group" }, index.h("div", { class: "description-list-item__text-container" }, index.h("div", { class: "description-list-item__term", part: "description-list-item__term", role: "term" }, this.term, this.tooltip && (index.h("span", { class: "description-list-item__tooltip" }, index.h("swirl-tooltip", { content: this.tooltip, position: "right" }, index.h("swirl-icon-info", { size: 16, tabIndex: 0 }))))), index.h("div", { style: { maxWidth: this.maxWidth }, class: "description-list-item__description", role: "definition" }, index.h("slot", null))), index.h("div", { class: "description-list-item__tools" }, index.h("slot", { name: "tools" })))));
|
|
26
|
+
return (index.h(index.Host, { role: "listitem" }, index.h("div", { class: className, part: "description-list-item", role: "group" }, index.h("div", { class: "description-list-item__inner" }, index.h("div", { class: "description-list-item__text-container" }, index.h("div", { class: "description-list-item__term", part: "description-list-item__term", role: "term" }, this.term, this.tooltip && (index.h("span", { class: "description-list-item__tooltip" }, index.h("swirl-tooltip", { content: this.tooltip, position: "right" }, index.h("swirl-icon-info", { size: 16, tabIndex: 0 }))))), index.h("div", { style: { maxWidth: this.maxWidth }, class: "description-list-item__description", role: "definition" }, index.h("slot", null))), index.h("div", { class: "description-list-item__tools" }, index.h("slot", { name: "tools" }))), index.h("div", { class: "description-list-item__additional-content" }, index.h("slot", { name: "additional-content" })))));
|
|
25
27
|
}
|
|
26
28
|
get el() { return index.getElement(this); }
|
|
27
29
|
};
|
|
@@ -87,6 +87,11 @@ const SwirlLightbox = class {
|
|
|
87
87
|
}
|
|
88
88
|
this.close();
|
|
89
89
|
};
|
|
90
|
+
this.onContextMenu = (event) => {
|
|
91
|
+
if (!this.downloadButtonEnabled) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
90
95
|
this.closeButtonLabel = "Close modal";
|
|
91
96
|
this.downloadButtonEnabled = true;
|
|
92
97
|
this.downloadButtonLabel = "Download";
|
|
@@ -240,7 +245,7 @@ const SwirlLightbox = class {
|
|
|
240
245
|
"lightbox--closing": this.closing,
|
|
241
246
|
"lightbox--hide-menu": !hasMenuItems,
|
|
242
247
|
});
|
|
243
|
-
return (index.h(index.Host, null, index.h("section", { "aria-hidden": "true", "aria-label": this.label, 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) }, index.h("div", { class: "lightbox__body", role: "document" }, index.h("header", { class: "lightbox__header" }, index.h("button", { "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, index.h("swirl-icon-close", null)), !this.hideMenu && (index.h("swirl-popover-trigger", { popover: this.menu }, index.h("button", { "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button" }, index.h("swirl-icon-more-vertikal", null))))), index.h("div", { "aria-roledescription": "carousel", class: "lightbox__content", role: "group" }, index.h("div", { "aria-atomic": "false", "aria-live": "polite", class: "lightbox__slides", onClick: this.onBackdropClick, ref: (el) => (this.slidesContainer = el) }, index.h("slot", { onSlotchange: this.registerSlides }))), index.h("div", { class: "lightbox__controls" }, index.h("button", { "aria-label": this.previousSlideButtonLabel, class: "lightbox__previous-slide-button", disabled: this.activeSlideIndex === 0, onClick: this.onPreviousSlideClick }, index.h("swirl-icon-arrow-left", null)), index.h("button", { "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", null))), showPagination && (index.h("span", { class: "lightbox__pagination" }, index.h("span", { "aria-current": "page" }, this.activeSlideIndex + 1), " /", " ", this.slides.length))), !this.hideMenu && (index.h("swirl-popover", { animation: "scale-in-y", disableScrollLock: true, id: "slide-menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, index.h("swirl-stack", null, index.h("div", { class: "lightbox__meta" }, currentThumbnailUrl && (index.h("div", { class: "lightbox__thumbnail" }, index.h("swirl-thumbnail", { alt: "", src: currentThumbnailUrl }))), index.h("div", { class: "lightbox__file-info" }, index.h("swirl-text", { truncate: true, weight: "semibold" }, currentFileName), index.h("swirl-text", { color: "subdued", size: "sm", truncate: true }, currentFileType))), hasMenuItems && index.h("swirl-separator", null), index.h("swirl-action-list", null, this.downloadButtonEnabled && (index.h("swirl-action-list-item", { icon: "<swirl-icon-download></swirl-icon-download>", label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick })), index.h("slot", { name: "menu-items" }))))))));
|
|
248
|
+
return (index.h(index.Host, null, index.h("section", { "aria-hidden": "true", "aria-label": this.label, 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) }, index.h("div", { class: "lightbox__body", role: "document" }, index.h("header", { class: "lightbox__header" }, index.h("button", { "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, index.h("swirl-icon-close", null)), !this.hideMenu && (index.h("swirl-popover-trigger", { popover: this.menu }, index.h("button", { "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button" }, index.h("swirl-icon-more-vertikal", null))))), index.h("div", { "aria-roledescription": "carousel", class: "lightbox__content", role: "group" }, index.h("div", { "aria-atomic": "false", "aria-live": "polite", class: "lightbox__slides", onClick: this.onBackdropClick, onContextMenu: this.onContextMenu, ref: (el) => (this.slidesContainer = el) }, index.h("slot", { onSlotchange: this.registerSlides }))), index.h("div", { class: "lightbox__controls" }, index.h("button", { "aria-label": this.previousSlideButtonLabel, class: "lightbox__previous-slide-button", disabled: this.activeSlideIndex === 0, onClick: this.onPreviousSlideClick }, index.h("swirl-icon-arrow-left", null)), index.h("button", { "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", null))), showPagination && (index.h("span", { class: "lightbox__pagination" }, index.h("span", { "aria-current": "page" }, this.activeSlideIndex + 1), " /", " ", this.slides.length))), !this.hideMenu && (index.h("swirl-popover", { animation: "scale-in-y", disableScrollLock: true, id: "slide-menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, index.h("swirl-stack", null, index.h("div", { class: "lightbox__meta" }, currentThumbnailUrl && (index.h("div", { class: "lightbox__thumbnail" }, index.h("swirl-thumbnail", { alt: "", src: currentThumbnailUrl }))), index.h("div", { class: "lightbox__file-info" }, index.h("swirl-text", { truncate: true, weight: "semibold" }, currentFileName), index.h("swirl-text", { color: "subdued", size: "sm", truncate: true }, currentFileType))), hasMenuItems && index.h("swirl-separator", null), index.h("swirl-action-list", null, this.downloadButtonEnabled && (index.h("swirl-action-list-item", { icon: "<swirl-icon-download></swirl-icon-download>", label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick })), index.h("slot", { name: "menu-items" }))))))));
|
|
244
249
|
}
|
|
245
250
|
get el() { return index.getElement(this); }
|
|
246
251
|
};
|