@getflip/swirl-components 0.420.0 → 0.420.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-12-09T10:38:16",
2
+ "timestamp": "2025-12-09T12:06:42",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.35.0",
@@ -696,6 +696,7 @@ const SwirlResourceListItem = class {
696
696
  this.updateMediaState();
697
697
  }
698
698
  componentDidLoad() {
699
+ this.parentSemantics = this.el.closest("swirl-resource-list")?.semantics;
699
700
  this.mediaQueryUnsubscribe = mediaQuery_service.DesktopMediaQuery.subscribe((isDesktop) => {
700
701
  this.forceIconProps(isDesktop);
701
702
  this.updateIconSize(isDesktop);
@@ -732,6 +733,9 @@ const SwirlResourceListItem = class {
732
733
  return this.el.querySelector('[slot="control"] button');
733
734
  }
734
735
  makeControlFocusable() {
736
+ if (this.parentSemantics !== "grid") {
737
+ return;
738
+ }
735
739
  const control = this.getControl();
736
740
  if (!Boolean(control)) {
737
741
  return;
@@ -739,6 +743,9 @@ const SwirlResourceListItem = class {
739
743
  control.tabIndex = 0;
740
744
  }
741
745
  makeControlUnfocusable() {
746
+ if (this.parentSemantics !== "grid") {
747
+ return;
748
+ }
742
749
  const control = this.getControl();
743
750
  if (!Boolean(control)) {
744
751
  return;
@@ -769,7 +776,7 @@ const SwirlResourceListItem = class {
769
776
  const labelContainerStyles = {
770
777
  minHeight: this.labelMinHeight ?? undefined,
771
778
  };
772
- const renderLabel = () => (index.h("span", { key: '690378b89e7602bce03f2d17be13fac0a1929cb2', class: "resource-list-item__label", id: this.elementId, innerHTML: this.allowHtml ? this.label : undefined }, !this.allowHtml && this.label));
779
+ const renderLabel = () => (index.h("span", { key: '4ea7c31f515f297a49d3e4ae457f141d10207d32', class: "resource-list-item__label", id: this.elementId, innerHTML: this.allowHtml ? this.label : undefined }, !this.allowHtml && this.label));
773
780
  const className = index$1.classnames("resource-list-item", `resource-list-item--label-weight-${this.labelWeight}`, {
774
781
  "resource-list-item--active": this.active,
775
782
  "resource-list-item--checked": this.checked,
@@ -786,7 +793,7 @@ const SwirlResourceListItem = class {
786
793
  "resource-list-item--wrap-description": this.descriptionWrap,
787
794
  "resource-list-item--wrap-label": this.labelWrap,
788
795
  });
789
- return (index.h(index.Host, { key: '4e531cac84caa3a75ca0d075e74d25d7e20938f5', role: hostRole }, index.h("div", { key: '0991eacb0eb30bd61e9149340f2a1c3f182cbb0f', class: className, role: containerRole, onClick: this.onClick }, index.h(Tag, { key: '310c9d1d0e7f82ada1d5ecfa1d280c0cbbf121f1', "aria-checked": ariaChecked, "aria-current": this.swirlAriaCurrent, "aria-disabled": disabled ? "true" : undefined, "aria-label": ariaLabel, "aria-labelledby": Boolean(this.swirlAriaLabel) ? undefined : this.elementId, class: "resource-list-item__content", style: { alignItems: this.alignItems }, href: href, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, part: "resource-list-item__content", role: role, tabIndex: 0, type: Tag === "button" ? "button" : undefined }, this.hasMedia && (index.h("span", { key: 'dfec3c6e64a14e0982e631152e569af30a1f34c2', class: "resource-list-item__media" }, index.h("slot", { key: '8387cca8da1c66d346ec35148d4b4e6fcf139fc9', name: "media" }))), index.h("span", { key: 'c532460dcc4c696a82ff51f8feb4e40e3ec835fb', class: "resource-list-item__label-container", style: labelContainerStyles }, this.labelTooltip ? (index.h("swirl-tooltip", { content: this.labelTooltip, position: this.labelTooltipPosition, positioning: "fixed" }, renderLabel())) : (renderLabel()), this.description && (index.h("span", { key: 'ff5e78788fe449dfe319a5f8b79738fb55dc15ef', class: "resource-list-item__description", innerHTML: this.allowHtml ? this.description : undefined }, !this.allowHtml && this.description)))), this.selectable && (index.h("span", { key: '4d8317fe52ceaa2c9511db77e9a2b55cc3e5c33f', "aria-hidden": "true", class: "resource-list-item__checkbox" }, index.h("span", { key: 'b5586ccc6d95747d6ceea8a8507afe3bcc9c63d9', class: "resource-list-item__checkbox-icon" }, this.checked && (index.h("swirl-icon-check-strong", { key: '8b2d9731d0e67256ef020303581941b27b8f87ed' }))))), showMeta && (index.h("span", { key: '214388f28884208432c172d30a14d379baf97446', class: "resource-list-item__meta" }, this.meta && (index.h("span", { key: '633e238ec76450a3b016aa9c91fa85054cd7e762', class: "resource-list-item__meta-text" }, this.meta)), index.h("span", { key: 'bc0ad527a45ff7e92100b98b856aa1826b1e7dd6', class: "resource-list-item__badges" }, index.h("slot", { key: '30691e49a2e848e0b0badf1b38f56a20807531d8', name: "badges" })))), index.h("span", { key: 'ee276d8ddd524a9cc3b22b8400b06c201e95e29c', class: "resource-list-item__control", onClick: this.onControlClick }, index.h("slot", { key: '3354734ce2a0638f022e68525db0e5332d2144e2', name: "control" })), showMenu && (index.h("swirl-popover-trigger", { key: '4763cd07eb9125845a9fcbc0b09c2ced3e67d483', swirlPopover: this.menuTriggerId }, index.h("swirl-button", { key: '102d6933bfd40aa3850b03f5c0d582f7a2ac3439', "aria-disabled": disabled ? "true" : undefined, class: "resource-list-item__menu-trigger", disabled: disabled, hideLabel: true, icon: "<swirl-icon-more-horizontal></swirl-icon-more-horizontal>", intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })))), this.allowDrag && (index.h("button", { key: '028a1b72539c414f87e9c3a260f9284aa437284d', "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "resource-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, type: "button" }, index.h("swirl-icon-drag-handle", { key: '64360247d8bab2cbefdefb13db8ef27c3f12e1ac', size: this.iconSize })))));
796
+ return (index.h(index.Host, { key: '088ed55cf56852341a0374b37f0b5f024fc72035', role: hostRole }, index.h("div", { key: '8ec9769f5c90136c3a86ea5a967f8e87a8a88973', class: className, role: containerRole, onClick: this.onClick }, index.h(Tag, { key: '134b9a1a9645d97447937ab7e3501f48aab9cb9f', "aria-checked": ariaChecked, "aria-current": this.swirlAriaCurrent, "aria-disabled": disabled ? "true" : undefined, "aria-label": ariaLabel, "aria-labelledby": Boolean(this.swirlAriaLabel) ? undefined : this.elementId, class: "resource-list-item__content", style: { alignItems: this.alignItems }, href: href, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, part: "resource-list-item__content", role: role, tabIndex: 0, type: Tag === "button" ? "button" : undefined }, this.hasMedia && (index.h("span", { key: '269e9e19598891a53fe896840fec876aba5f096c', class: "resource-list-item__media" }, index.h("slot", { key: 'e676975dec132755e9492d4f14e271f0371d030c', name: "media" }))), index.h("span", { key: '0c597785a34fc0d6362f3e80b98802c3d732e0b7', class: "resource-list-item__label-container", style: labelContainerStyles }, this.labelTooltip ? (index.h("swirl-tooltip", { content: this.labelTooltip, position: this.labelTooltipPosition, positioning: "fixed" }, renderLabel())) : (renderLabel()), this.description && (index.h("span", { key: '2dd25de843ee96dfe2c9352e3e4e4b8659de7e9d', class: "resource-list-item__description", innerHTML: this.allowHtml ? this.description : undefined }, !this.allowHtml && this.description)))), this.selectable && (index.h("span", { key: 'a9da2a1442ea6adfaba6027dc11f6a5a84453ad4', "aria-hidden": "true", class: "resource-list-item__checkbox" }, index.h("span", { key: 'f76cef21e8fb5387f34e99fd3765a19c179faf7e', class: "resource-list-item__checkbox-icon" }, this.checked && (index.h("swirl-icon-check-strong", { key: 'bebb799ffa8ee3fc6275f61451e80ae4c4fe1ce6' }))))), showMeta && (index.h("span", { key: '04dd2f96b4e64ae93f015ecb85cd384a2c0890a2', class: "resource-list-item__meta" }, this.meta && (index.h("span", { key: '57f895be000f5fd1c62ab6f2b0b6ddc89fbdce60', class: "resource-list-item__meta-text" }, this.meta)), index.h("span", { key: '91efc58635fb8efcf2c652059b6cf63fcdae28f4', class: "resource-list-item__badges" }, index.h("slot", { key: '8c3c18cbc29e8bc931ad0c41b6d5e5ef5fd7554a', name: "badges" })))), index.h("span", { key: '66802320e490115b2e653a91ffa4b2da7e8415a0', class: "resource-list-item__control", onClick: this.onControlClick }, index.h("slot", { key: 'acb0bf6a1c293a6f83021c069afc90c26efdb655', name: "control" })), showMenu && (index.h("swirl-popover-trigger", { key: '2b3d071301fff6629bead54ba951c5cb9ff6472b', swirlPopover: this.menuTriggerId }, index.h("swirl-button", { key: '05a78400347d5b4861b6a8865f733b0bb93361ff', "aria-disabled": disabled ? "true" : undefined, class: "resource-list-item__menu-trigger", disabled: disabled, hideLabel: true, icon: "<swirl-icon-more-horizontal></swirl-icon-more-horizontal>", intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })))), this.allowDrag && (index.h("button", { key: '39bfbf3b67ee035fb415f1c309db2471007c8f7d', "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "resource-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, type: "button" }, index.h("swirl-icon-drag-handle", { key: 'c474e283823ad5a849e343cdfdc0cdaa31deb277', size: this.iconSize })))));
790
797
  }
791
798
  get el() { return index.getElement(this); }
792
799
  };
@@ -53,6 +53,7 @@ export class SwirlResourceListItem {
53
53
  this.updateMediaState();
54
54
  }
55
55
  componentDidLoad() {
56
+ this.parentSemantics = this.el.closest("swirl-resource-list")?.semantics;
56
57
  this.mediaQueryUnsubscribe = DesktopMediaQuery.subscribe((isDesktop) => {
57
58
  this.forceIconProps(isDesktop);
58
59
  this.updateIconSize(isDesktop);
@@ -89,6 +90,9 @@ export class SwirlResourceListItem {
89
90
  return this.el.querySelector('[slot="control"] button');
90
91
  }
91
92
  makeControlFocusable() {
93
+ if (this.parentSemantics !== "grid") {
94
+ return;
95
+ }
92
96
  const control = this.getControl();
93
97
  if (!Boolean(control)) {
94
98
  return;
@@ -96,6 +100,9 @@ export class SwirlResourceListItem {
96
100
  control.tabIndex = 0;
97
101
  }
98
102
  makeControlUnfocusable() {
103
+ if (this.parentSemantics !== "grid") {
104
+ return;
105
+ }
99
106
  const control = this.getControl();
100
107
  if (!Boolean(control)) {
101
108
  return;
@@ -126,7 +133,7 @@ export class SwirlResourceListItem {
126
133
  const labelContainerStyles = {
127
134
  minHeight: this.labelMinHeight ?? undefined,
128
135
  };
129
- const renderLabel = () => (h("span", { key: '690378b89e7602bce03f2d17be13fac0a1929cb2', class: "resource-list-item__label", id: this.elementId, innerHTML: this.allowHtml ? this.label : undefined }, !this.allowHtml && this.label));
136
+ const renderLabel = () => (h("span", { key: '4ea7c31f515f297a49d3e4ae457f141d10207d32', class: "resource-list-item__label", id: this.elementId, innerHTML: this.allowHtml ? this.label : undefined }, !this.allowHtml && this.label));
130
137
  const className = classnames("resource-list-item", `resource-list-item--label-weight-${this.labelWeight}`, {
131
138
  "resource-list-item--active": this.active,
132
139
  "resource-list-item--checked": this.checked,
@@ -143,7 +150,7 @@ export class SwirlResourceListItem {
143
150
  "resource-list-item--wrap-description": this.descriptionWrap,
144
151
  "resource-list-item--wrap-label": this.labelWrap,
145
152
  });
146
- return (h(Host, { key: '4e531cac84caa3a75ca0d075e74d25d7e20938f5', role: hostRole }, h("div", { key: '0991eacb0eb30bd61e9149340f2a1c3f182cbb0f', class: className, role: containerRole, onClick: this.onClick }, h(Tag, { key: '310c9d1d0e7f82ada1d5ecfa1d280c0cbbf121f1', "aria-checked": ariaChecked, "aria-current": this.swirlAriaCurrent, "aria-disabled": disabled ? "true" : undefined, "aria-label": ariaLabel, "aria-labelledby": Boolean(this.swirlAriaLabel) ? undefined : this.elementId, class: "resource-list-item__content", style: { alignItems: this.alignItems }, href: href, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, part: "resource-list-item__content", role: role, tabIndex: 0, type: Tag === "button" ? "button" : undefined }, this.hasMedia && (h("span", { key: 'dfec3c6e64a14e0982e631152e569af30a1f34c2', class: "resource-list-item__media" }, h("slot", { key: '8387cca8da1c66d346ec35148d4b4e6fcf139fc9', name: "media" }))), h("span", { key: 'c532460dcc4c696a82ff51f8feb4e40e3ec835fb', class: "resource-list-item__label-container", style: labelContainerStyles }, this.labelTooltip ? (h("swirl-tooltip", { content: this.labelTooltip, position: this.labelTooltipPosition, positioning: "fixed" }, renderLabel())) : (renderLabel()), this.description && (h("span", { key: 'ff5e78788fe449dfe319a5f8b79738fb55dc15ef', class: "resource-list-item__description", innerHTML: this.allowHtml ? this.description : undefined }, !this.allowHtml && this.description)))), this.selectable && (h("span", { key: '4d8317fe52ceaa2c9511db77e9a2b55cc3e5c33f', "aria-hidden": "true", class: "resource-list-item__checkbox" }, h("span", { key: 'b5586ccc6d95747d6ceea8a8507afe3bcc9c63d9', class: "resource-list-item__checkbox-icon" }, this.checked && (h("swirl-icon-check-strong", { key: '8b2d9731d0e67256ef020303581941b27b8f87ed' }))))), showMeta && (h("span", { key: '214388f28884208432c172d30a14d379baf97446', class: "resource-list-item__meta" }, this.meta && (h("span", { key: '633e238ec76450a3b016aa9c91fa85054cd7e762', class: "resource-list-item__meta-text" }, this.meta)), h("span", { key: 'bc0ad527a45ff7e92100b98b856aa1826b1e7dd6', class: "resource-list-item__badges" }, h("slot", { key: '30691e49a2e848e0b0badf1b38f56a20807531d8', name: "badges" })))), h("span", { key: 'ee276d8ddd524a9cc3b22b8400b06c201e95e29c', class: "resource-list-item__control", onClick: this.onControlClick }, h("slot", { key: '3354734ce2a0638f022e68525db0e5332d2144e2', name: "control" })), showMenu && (h("swirl-popover-trigger", { key: '4763cd07eb9125845a9fcbc0b09c2ced3e67d483', swirlPopover: this.menuTriggerId }, h("swirl-button", { key: '102d6933bfd40aa3850b03f5c0d582f7a2ac3439', "aria-disabled": disabled ? "true" : undefined, class: "resource-list-item__menu-trigger", disabled: disabled, hideLabel: true, icon: "<swirl-icon-more-horizontal></swirl-icon-more-horizontal>", intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })))), this.allowDrag && (h("button", { key: '028a1b72539c414f87e9c3a260f9284aa437284d', "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "resource-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, type: "button" }, h("swirl-icon-drag-handle", { key: '64360247d8bab2cbefdefb13db8ef27c3f12e1ac', size: this.iconSize })))));
153
+ return (h(Host, { key: '088ed55cf56852341a0374b37f0b5f024fc72035', role: hostRole }, h("div", { key: '8ec9769f5c90136c3a86ea5a967f8e87a8a88973', class: className, role: containerRole, onClick: this.onClick }, h(Tag, { key: '134b9a1a9645d97447937ab7e3501f48aab9cb9f', "aria-checked": ariaChecked, "aria-current": this.swirlAriaCurrent, "aria-disabled": disabled ? "true" : undefined, "aria-label": ariaLabel, "aria-labelledby": Boolean(this.swirlAriaLabel) ? undefined : this.elementId, class: "resource-list-item__content", style: { alignItems: this.alignItems }, href: href, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, part: "resource-list-item__content", role: role, tabIndex: 0, type: Tag === "button" ? "button" : undefined }, this.hasMedia && (h("span", { key: '269e9e19598891a53fe896840fec876aba5f096c', class: "resource-list-item__media" }, h("slot", { key: 'e676975dec132755e9492d4f14e271f0371d030c', name: "media" }))), h("span", { key: '0c597785a34fc0d6362f3e80b98802c3d732e0b7', class: "resource-list-item__label-container", style: labelContainerStyles }, this.labelTooltip ? (h("swirl-tooltip", { content: this.labelTooltip, position: this.labelTooltipPosition, positioning: "fixed" }, renderLabel())) : (renderLabel()), this.description && (h("span", { key: '2dd25de843ee96dfe2c9352e3e4e4b8659de7e9d', class: "resource-list-item__description", innerHTML: this.allowHtml ? this.description : undefined }, !this.allowHtml && this.description)))), this.selectable && (h("span", { key: 'a9da2a1442ea6adfaba6027dc11f6a5a84453ad4', "aria-hidden": "true", class: "resource-list-item__checkbox" }, h("span", { key: 'f76cef21e8fb5387f34e99fd3765a19c179faf7e', class: "resource-list-item__checkbox-icon" }, this.checked && (h("swirl-icon-check-strong", { key: 'bebb799ffa8ee3fc6275f61451e80ae4c4fe1ce6' }))))), showMeta && (h("span", { key: '04dd2f96b4e64ae93f015ecb85cd384a2c0890a2', class: "resource-list-item__meta" }, this.meta && (h("span", { key: '57f895be000f5fd1c62ab6f2b0b6ddc89fbdce60', class: "resource-list-item__meta-text" }, this.meta)), h("span", { key: '91efc58635fb8efcf2c652059b6cf63fcdae28f4', class: "resource-list-item__badges" }, h("slot", { key: '8c3c18cbc29e8bc931ad0c41b6d5e5ef5fd7554a', name: "badges" })))), h("span", { key: '66802320e490115b2e653a91ffa4b2da7e8415a0', class: "resource-list-item__control", onClick: this.onControlClick }, h("slot", { key: 'acb0bf6a1c293a6f83021c069afc90c26efdb655', name: "control" })), showMenu && (h("swirl-popover-trigger", { key: '2b3d071301fff6629bead54ba951c5cb9ff6472b', swirlPopover: this.menuTriggerId }, h("swirl-button", { key: '05a78400347d5b4861b6a8865f733b0bb93361ff', "aria-disabled": disabled ? "true" : undefined, class: "resource-list-item__menu-trigger", disabled: disabled, hideLabel: true, icon: "<swirl-icon-more-horizontal></swirl-icon-more-horizontal>", intent: "primary", label: this.menuTriggerLabel, onClick: this.onMenuTriggerClick })))), this.allowDrag && (h("button", { key: '39bfbf3b67ee035fb415f1c309db2471007c8f7d', "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "resource-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, type: "button" }, h("swirl-icon-drag-handle", { key: 'c474e283823ad5a849e343cdfdc0cdaa31deb277', size: this.iconSize })))));
147
154
  }
148
155
  static get is() { return "swirl-resource-list-item"; }
149
156
  static get encapsulation() { return "scoped"; }