@getflip/swirl-components 0.319.0 → 0.319.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 +1 -1
- package/dist/cjs/swirl-modal.cjs.entry.js +9 -6
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-modal/swirl-modal.js +9 -6
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-modal.js +9 -6
- package/dist/esm/swirl-modal.entry.js +9 -6
- package/dist/swirl-components/p-41fa045f.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/swirl-components/p-6e605f61.entry.js +0 -1
|
@@ -112,6 +112,9 @@ export class SwirlModal {
|
|
|
112
112
|
componentDidLoad() {
|
|
113
113
|
this.focusTrap = focusTrap.createFocusTrap(this.modalEl, {
|
|
114
114
|
allowOutsideClick: true,
|
|
115
|
+
// We don't always close the modal when ESC is pressed. So we manage the
|
|
116
|
+
// deactivation of the focus trap manually.
|
|
117
|
+
escapeDeactivates: false,
|
|
115
118
|
tabbableOptions: {
|
|
116
119
|
getShadowRoot: (node) => {
|
|
117
120
|
return node.shadowRoot;
|
|
@@ -226,21 +229,21 @@ export class SwirlModal {
|
|
|
226
229
|
"modal--sidebar-scrolled-down": this.sidebarScrolledDown,
|
|
227
230
|
"modal--sidebar-scrollable": this.sidebarScrollable,
|
|
228
231
|
});
|
|
229
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '3a3366fb403f5722bf8f544426dc0e28a38baf5c' }, h("section", { key: '62cf4ed359569d7252c9516ee986ab8e873bb754', "aria-hidden": String(!this.isOpen), "aria-label": this.label, "aria-modal": "true", class: className, onKeyDown: this.onKeyDown, role: "dialog", ref: (el) => (this.modalEl = el) }, h("div", { key: '80f26c8113995973f1984bb64d2ef0db6bc65d71', class: "modal__backdrop", onClick: this.onBackdropClick }), h("div", { key: '576ea88a03ebcf3c63711214f954131afc76edac', class: "modal__body", style: {
|
|
230
233
|
"--swirl-modal-max-height": this.maxHeight,
|
|
231
234
|
"--swirl-modal-height": this.height,
|
|
232
235
|
minHeight: this.minHeight,
|
|
233
236
|
maxWidth: this.maxWidth,
|
|
234
|
-
} }, h("aside", { key: '
|
|
237
|
+
} }, h("aside", { key: '4f7fb1ec21a4b715e2318c1a9f53882deb9e7ba8', class: "modal__sidebar" }, this.sidebarLabel && (h("header", { key: '87abcf300bfb125308856ac1b60ad0df28e99c27', class: "modal__sidebar-header" }, h("swirl-heading", { key: '81b6227d1085c4e7eb7c9f0cebfc18b3540f2e7c', as: "h3", class: "modal__sidebar-heading", level: 3, text: this.sidebarLabel }))), h("div", { key: 'f42abc8314b221af8f2dadeaa73d1de429e05177', class: "modal__sidebar-content", onScroll: this.determineSidebarScrollStatus, ref: (el) => (this.sidebarScrollContainer = el) }, h("slot", { key: '643816994f91313553b11980182285394f8096f5', name: "sidebar-content" })), h("div", { key: '20f5780da70f923151617a35b60e2a8ae13136e2', class: "modal__sidebar-footer" }, h("slot", { key: 'de224373f052ecc0c7eea72e83e4c98e6dd23cf1', name: "sidebar-footer" }))), h("div", { key: 'dd23b1b51b5545af639e8f5ace2106614cb551bd', class: "modal__main-content" }, h("header", { key: 'd71937f4fbf87caaeac6e0722a0c4bea5829b029', class: "modal__custom-header" }, h("slot", { key: '45336edc346f4b5931c32f029c3072d2c813208b', name: "custom-header" })), (!this.hideLabel || !this.hideCloseButton) && (h("header", { key: 'b965f7be0bb9b2500abb3c338d3d9c1c58cc01bc', class: "modal__header" }, h("div", { key: 'ed69b19865ceb4e27759d3936ee3f58995b7f9d9', class: "modal__header-bar" }, !this.hideCloseButton && (h("swirl-button", { key: '628e0e6b13c39b7d535b43de3ad9a9ec21517f8b', class: "modal__close-button", hideLabel: true, icon: this.variant === "default"
|
|
235
238
|
? "<swirl-icon-close></swirl-icon-close>"
|
|
236
|
-
: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", label: this.closeButtonLabel, onClick: this.onCloseButtonClick })), !this.hideLabel && (h("swirl-heading", { key: '
|
|
239
|
+
: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", label: this.closeButtonLabel, onClick: this.onCloseButtonClick })), !this.hideLabel && (h("swirl-heading", { key: 'c9ca1c39d3b8447aa73dbdead5d9fda0a4352c98', as: "h2", class: "modal__heading", level: 3, text: this.label }))))), h("div", { key: 'd5263228d3ddf9de25fe5ff38b4697ab9d8e418b', class: "modal__content-container", style: {
|
|
237
240
|
gap: this.contentGap
|
|
238
241
|
? `var(--s-space-${this.contentGap})`
|
|
239
242
|
: undefined,
|
|
240
|
-
} }, h("div", { key: '
|
|
243
|
+
} }, h("div", { key: 'f44850b03d1716bc29de23e606bfbbbf076a4993', class: "modal__primary-content", style: {
|
|
241
244
|
maxWidth: this.primaryContentMaxWidth,
|
|
242
245
|
flex: this.primaryContentFlex,
|
|
243
|
-
} }, h("div", { key: '
|
|
246
|
+
} }, h("div", { key: '2399661abddb5bfca0b6d7d14247421050fced42', class: "modal__header-tools" }, h("slot", { key: '810b31cd6deaa29a3e4e35cc7a43eea1f5b6aa6a', name: "header-tools" })), h("div", { key: 'ee7ad6321ce5af143d04d3593c5896a9350c69f8', class: "modal__content", onScroll: this.determineMainScrollStatus, ref: (el) => (this.scrollContainer = el) }, h("slot", { key: '51004f8664d52eaeafd8a704386b28e7ba4758d3' }))), h("div", { key: '64124ddb5d19bf945810dc5cc603e52febaf7598', class: "modal__secondary-content", style: {
|
|
244
247
|
maxWidth: this.secondaryContentMaxWidth,
|
|
245
248
|
flex: this.secondaryContentFlex,
|
|
246
249
|
padding: Boolean(this.secondaryContentPadding)
|
|
@@ -258,7 +261,7 @@ export class SwirlModal {
|
|
|
258
261
|
paddingInlineStart: Boolean(this.secondaryContentPaddingInlineStart)
|
|
259
262
|
? `var(--s-space-${this.secondaryContentPaddingInlineStart})`
|
|
260
263
|
: undefined,
|
|
261
|
-
} }, h("slot", { key: '
|
|
264
|
+
} }, h("slot", { key: 'e1a3139d5eb54fc0b6446d17ea63a1efd5106378', name: "secondary-content" }))), h("div", { key: '0e671a3b4c808390af2a3840aa799be41fc03f90', class: "modal__custom-footer" }, h("slot", { key: '131a3cb5bc9ad8c9c001f057d55bc0eeec39264b', name: "custom-footer" })), showControls && (h("footer", { key: 'e4a15ee635125e219a8437ee86a4a1e35736edac', class: "modal__controls" }, h("swirl-button-group", { key: '0fd1929c805d700d0694e517984d03193de657a4', wrap: true }, this.secondaryActionLabel && (h("swirl-button", { key: 'b0464799d74c4d8e6d98e5580a38a91be6432ac5', label: this.secondaryActionLabel, onClick: this.onSecondaryAction })), this.primaryActionLabel && (h("swirl-button", { key: '946a61eefefaa5a483e2de0e492dc3b741a38198', intent: "primary", label: this.primaryActionLabel, onClick: this.onPrimaryAction, variant: "flat" }))))))))));
|
|
262
265
|
}
|
|
263
266
|
static get is() { return "swirl-modal"; }
|
|
264
267
|
static get originalStyleUrls() {
|