@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-04-16T08:21:53",
2
+ "timestamp": "2025-04-23T07:10:36",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.18.1",
@@ -117,6 +117,9 @@ const SwirlModal = class {
117
117
  componentDidLoad() {
118
118
  this.focusTrap = focusTrap_esm.createFocusTrap(this.modalEl, {
119
119
  allowOutsideClick: true,
120
+ // We don't always close the modal when ESC is pressed. So we manage the
121
+ // deactivation of the focus trap manually.
122
+ escapeDeactivates: false,
120
123
  tabbableOptions: {
121
124
  getShadowRoot: (node) => {
122
125
  return node.shadowRoot;
@@ -231,21 +234,21 @@ const SwirlModal = class {
231
234
  "modal--sidebar-scrolled-down": this.sidebarScrolledDown,
232
235
  "modal--sidebar-scrollable": this.sidebarScrollable,
233
236
  });
234
- return (index.h(index.Host, { key: '86c6f75b6de310e3c8718c1496abcbbc2b2ae4ef' }, index.h("section", { key: '305b83da19ac070fbd8b08b139c97eb6aea5f7dc', "aria-hidden": String(!this.isOpen), "aria-label": this.label, "aria-modal": "true", class: className, onKeyDown: this.onKeyDown, role: "dialog", ref: (el) => (this.modalEl = el) }, index.h("div", { key: 'be19999f6cfe2ec369276caef9476f0baa3209d0', class: "modal__backdrop", onClick: this.onBackdropClick }), index.h("div", { key: '1bdd2f01b020cfe42da6e1c3580ea0605f0ac530', class: "modal__body", style: {
237
+ return (index.h(index.Host, { key: '3a3366fb403f5722bf8f544426dc0e28a38baf5c' }, index.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) }, index.h("div", { key: '80f26c8113995973f1984bb64d2ef0db6bc65d71', class: "modal__backdrop", onClick: this.onBackdropClick }), index.h("div", { key: '576ea88a03ebcf3c63711214f954131afc76edac', class: "modal__body", style: {
235
238
  "--swirl-modal-max-height": this.maxHeight,
236
239
  "--swirl-modal-height": this.height,
237
240
  minHeight: this.minHeight,
238
241
  maxWidth: this.maxWidth,
239
- } }, index.h("aside", { key: 'c516bedc53f64bfbd255275735940db2e0d06df0', class: "modal__sidebar" }, this.sidebarLabel && (index.h("header", { key: '7becdfe335bfb9f57a7d1924fce5673d08f705f5', class: "modal__sidebar-header" }, index.h("swirl-heading", { key: '4aa7d5089b1210b2faaa2e54dc1a7e50a53338b2', as: "h3", class: "modal__sidebar-heading", level: 3, text: this.sidebarLabel }))), index.h("div", { key: '2e80c44664a2b0de3409b099616d28551a934d15', class: "modal__sidebar-content", onScroll: this.determineSidebarScrollStatus, ref: (el) => (this.sidebarScrollContainer = el) }, index.h("slot", { key: '0b9d67d4650421811b55b5b081143c634b389f9d', name: "sidebar-content" })), index.h("div", { key: '4df7ec9cd81ba0760376aa84bd425ffba3f9f82a', class: "modal__sidebar-footer" }, index.h("slot", { key: '8cc197c426a6e133e9ed4bfdd556c3ddcd78d930', name: "sidebar-footer" }))), index.h("div", { key: '9cbcbe92bd740e85dc0726c67d41361ba9f0e78b', class: "modal__main-content" }, index.h("header", { key: '00d24b87643cfca4b1dd497a2e8ae3fb4b23c1ec', class: "modal__custom-header" }, index.h("slot", { key: '67ef18cbb7356e62c691a3b097ec2200ec57f977', name: "custom-header" })), (!this.hideLabel || !this.hideCloseButton) && (index.h("header", { key: 'f2fdfbbbf7ba83f99507ca316eadfa4d2a87b5ec', class: "modal__header" }, index.h("div", { key: '4e2e45ebf9a11024df589fed401a720839df6cd8', class: "modal__header-bar" }, !this.hideCloseButton && (index.h("swirl-button", { key: '0eddedd97d71caaf2f162bd4b5c4dd53f611fe47', class: "modal__close-button", hideLabel: true, icon: this.variant === "default"
242
+ } }, index.h("aside", { key: '4f7fb1ec21a4b715e2318c1a9f53882deb9e7ba8', class: "modal__sidebar" }, this.sidebarLabel && (index.h("header", { key: '87abcf300bfb125308856ac1b60ad0df28e99c27', class: "modal__sidebar-header" }, index.h("swirl-heading", { key: '81b6227d1085c4e7eb7c9f0cebfc18b3540f2e7c', as: "h3", class: "modal__sidebar-heading", level: 3, text: this.sidebarLabel }))), index.h("div", { key: 'f42abc8314b221af8f2dadeaa73d1de429e05177', class: "modal__sidebar-content", onScroll: this.determineSidebarScrollStatus, ref: (el) => (this.sidebarScrollContainer = el) }, index.h("slot", { key: '643816994f91313553b11980182285394f8096f5', name: "sidebar-content" })), index.h("div", { key: '20f5780da70f923151617a35b60e2a8ae13136e2', class: "modal__sidebar-footer" }, index.h("slot", { key: 'de224373f052ecc0c7eea72e83e4c98e6dd23cf1', name: "sidebar-footer" }))), index.h("div", { key: 'dd23b1b51b5545af639e8f5ace2106614cb551bd', class: "modal__main-content" }, index.h("header", { key: 'd71937f4fbf87caaeac6e0722a0c4bea5829b029', class: "modal__custom-header" }, index.h("slot", { key: '45336edc346f4b5931c32f029c3072d2c813208b', name: "custom-header" })), (!this.hideLabel || !this.hideCloseButton) && (index.h("header", { key: 'b965f7be0bb9b2500abb3c338d3d9c1c58cc01bc', class: "modal__header" }, index.h("div", { key: 'ed69b19865ceb4e27759d3936ee3f58995b7f9d9', class: "modal__header-bar" }, !this.hideCloseButton && (index.h("swirl-button", { key: '628e0e6b13c39b7d535b43de3ad9a9ec21517f8b', class: "modal__close-button", hideLabel: true, icon: this.variant === "default"
240
243
  ? "<swirl-icon-close></swirl-icon-close>"
241
- : "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", label: this.closeButtonLabel, onClick: this.onCloseButtonClick })), !this.hideLabel && (index.h("swirl-heading", { key: 'a6d69412764c53c41c45468a84fbc40ea7d85f01', as: "h2", class: "modal__heading", level: 3, text: this.label }))))), index.h("div", { key: '2505c71ba22aa58bba3e42a4c4bd2566a64fd84d', class: "modal__content-container", style: {
244
+ : "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", label: this.closeButtonLabel, onClick: this.onCloseButtonClick })), !this.hideLabel && (index.h("swirl-heading", { key: 'c9ca1c39d3b8447aa73dbdead5d9fda0a4352c98', as: "h2", class: "modal__heading", level: 3, text: this.label }))))), index.h("div", { key: 'd5263228d3ddf9de25fe5ff38b4697ab9d8e418b', class: "modal__content-container", style: {
242
245
  gap: this.contentGap
243
246
  ? `var(--s-space-${this.contentGap})`
244
247
  : undefined,
245
- } }, index.h("div", { key: '3e9e9970bb1c424c5bd7dedb4e6c9df06d6c7fdc', class: "modal__primary-content", style: {
248
+ } }, index.h("div", { key: 'f44850b03d1716bc29de23e606bfbbbf076a4993', class: "modal__primary-content", style: {
246
249
  maxWidth: this.primaryContentMaxWidth,
247
250
  flex: this.primaryContentFlex,
248
- } }, index.h("div", { key: '91c4cbab2f857801169d0720141b98eb23d861cd', class: "modal__header-tools" }, index.h("slot", { key: 'a4a4ba517c2ebe5ab21b5716280890ee1f6ea122', name: "header-tools" })), index.h("div", { key: 'd8864a2cb8e4b95834600ccad913ffb836002433', class: "modal__content", onScroll: this.determineMainScrollStatus, ref: (el) => (this.scrollContainer = el) }, index.h("slot", { key: '5a02790ce4d07c4a61fa12bb217fc54c61640008' }))), index.h("div", { key: '666722323c12677b0534d29d8b6ccd231e69236e', class: "modal__secondary-content", style: {
251
+ } }, index.h("div", { key: '2399661abddb5bfca0b6d7d14247421050fced42', class: "modal__header-tools" }, index.h("slot", { key: '810b31cd6deaa29a3e4e35cc7a43eea1f5b6aa6a', name: "header-tools" })), index.h("div", { key: 'ee7ad6321ce5af143d04d3593c5896a9350c69f8', class: "modal__content", onScroll: this.determineMainScrollStatus, ref: (el) => (this.scrollContainer = el) }, index.h("slot", { key: '51004f8664d52eaeafd8a704386b28e7ba4758d3' }))), index.h("div", { key: '64124ddb5d19bf945810dc5cc603e52febaf7598', class: "modal__secondary-content", style: {
249
252
  maxWidth: this.secondaryContentMaxWidth,
250
253
  flex: this.secondaryContentFlex,
251
254
  padding: Boolean(this.secondaryContentPadding)
@@ -263,7 +266,7 @@ const SwirlModal = class {
263
266
  paddingInlineStart: Boolean(this.secondaryContentPaddingInlineStart)
264
267
  ? `var(--s-space-${this.secondaryContentPaddingInlineStart})`
265
268
  : undefined,
266
- } }, index.h("slot", { key: '6c53741ce3e006cfc2bca293fcee71900b038cb3', name: "secondary-content" }))), index.h("div", { key: 'd521bfb64a4723ca6b4ccedf3174c56df12279a1', class: "modal__custom-footer" }, index.h("slot", { key: 'b08efd8d371278df24ea55da69485ebcb1d32540', name: "custom-footer" })), showControls && (index.h("footer", { key: '3f841a17a178d331a2908d892b71590860e445b3', class: "modal__controls" }, index.h("swirl-button-group", { key: '46c7d1a4aa3687de9770bf89d37e29c05a861eb2', wrap: true }, this.secondaryActionLabel && (index.h("swirl-button", { key: 'a0ab164c3dc2dbdd2c74ca70db6b22d6274f0eb2', label: this.secondaryActionLabel, onClick: this.onSecondaryAction })), this.primaryActionLabel && (index.h("swirl-button", { key: 'e75e5d2dec79738b5355f2387969ac7c95548e52', intent: "primary", label: this.primaryActionLabel, onClick: this.onPrimaryAction, variant: "flat" }))))))))));
269
+ } }, index.h("slot", { key: 'e1a3139d5eb54fc0b6446d17ea63a1efd5106378', name: "secondary-content" }))), index.h("div", { key: '0e671a3b4c808390af2a3840aa799be41fc03f90', class: "modal__custom-footer" }, index.h("slot", { key: '131a3cb5bc9ad8c9c001f057d55bc0eeec39264b', name: "custom-footer" })), showControls && (index.h("footer", { key: 'e4a15ee635125e219a8437ee86a4a1e35736edac', class: "modal__controls" }, index.h("swirl-button-group", { key: '0fd1929c805d700d0694e517984d03193de657a4', wrap: true }, this.secondaryActionLabel && (index.h("swirl-button", { key: 'b0464799d74c4d8e6d98e5580a38a91be6432ac5', label: this.secondaryActionLabel, onClick: this.onSecondaryAction })), this.primaryActionLabel && (index.h("swirl-button", { key: '946a61eefefaa5a483e2de0e492dc3b741a38198', intent: "primary", label: this.primaryActionLabel, onClick: this.onPrimaryAction, variant: "flat" }))))))))));
267
270
  }
268
271
  get el() { return index.getElement(this); }
269
272
  };