@getflip/swirl-components 0.256.0 → 0.256.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-11-18T07:37:58",
2
+ "timestamp": "2024-11-18T13:07:41",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.18.1",
@@ -35,7 +35,7 @@ const SwirlTreeNavigationItem = class {
35
35
  }
36
36
  };
37
37
  this.toggleExpanded = (event) => {
38
- if (!this.href) {
38
+ if (this.expandable && this.hasChildren && !this.href) {
39
39
  event.preventDefault();
40
40
  event.stopPropagation();
41
41
  if (this.expanded) {
@@ -86,9 +86,9 @@ const SwirlTreeNavigationItem = class {
86
86
  "tree-navigation-item__link--active": this.active,
87
87
  "tree-navigation-item__link--has-icon": Boolean(this.icon),
88
88
  });
89
- return (index.h(index.Host, { key: 'e3bfad9988e2f3fd9d7b2d92bed466008bddee46', role: "none" }, index.h("li", { key: 'eb1da2091f8168ca76b5356b5747139e59c73845', class: "tree-navigation-item", role: "treeitem", "aria-expanded": this.hasChildren ? this.expanded : undefined, "aria-level": this.level }, index.h(Tag, { key: 'c630c70f43bd45758d929c14026c9c28941d082e', onClick: this.toggleExpanded, onKeyDown: this.onKeyDown, class: linkClassName, href: this.href, target: this.target, type: isLink ? undefined : "button", id: this.buttonId, "aria-current": this.active ? "page" : undefined, "aria-controls": this.hasChildren ? this.childrenId : undefined, "aria-expanded": this.hasChildren ? this.expanded : undefined }, index.h("span", { key: '0001a3da5777d5ba7d98a862433a3340c523722e', class: "tree-navigation-item__content" }, this.icon && (index.h("swirl-icon", { key: 'c1671f5761c2a6554309da4a22eeac8be12aa0da', class: "tree-navigation-item__icon", glyph: this.icon, size: 20, "aria-hidden": "true", role: "img", "aria-label": `${this.label} icon` })), index.h("span", { key: 'c21401058cdcd0b8a695f42adfddf867b7295286', class: "tree-navigation-item__label" }, this.label)), this.expandable && this.hasChildren && !this.external && (index.h("span", { key: 'b2213d840c108846a0f2ba776ee3ff733a75b95f', class: "tree-navigation-item__toggle-icon", "aria-hidden": "true" }, this.expanded ? (index.h("swirl-icon-expand-more", { size: 16, role: "img", "aria-label": "Collapse" })) : (index.h("swirl-icon-chevron-right", { size: 16, role: "img", "aria-label": "Expand" })))), this.external && (index.h("span", { key: '818cb51c0ea3330392f87cc3aa429974bd363d12', class: "tree-navigation-item__external-icon", "aria-hidden": "true" }, index.h("swirl-icon-open-in-new", { key: 'ef01b1ca0fd70fd0c85ae80ab914ab89b407a56c', size: 16, role: "img", "aria-label": "External link" })))), this.hasChildren && (index.h("ul", { key: 'c576a994a7434de80b2945798b46118950cb6b1b', class: "tree-navigation-item__children", id: this.childrenId, role: "group", "aria-label": `${this.label} submenu`, style: {
89
+ return (index.h(index.Host, { key: 'a9ff10b73bf2590b5b32c6bdde98452b325dd07f', role: "none" }, index.h("li", { key: 'a36bac6a8f8d6cc08cc12b82751b412cab9770e6', class: "tree-navigation-item", role: "treeitem", "aria-expanded": this.hasChildren ? this.expanded : undefined, "aria-level": this.level }, index.h(Tag, { key: 'ea5988791f7a62127a0dc6a1bf06530fe258296a', onClick: this.toggleExpanded, onKeyDown: this.onKeyDown, class: linkClassName, href: this.href, target: this.target, type: isLink ? undefined : "button", id: this.buttonId, "aria-current": this.active ? "page" : undefined, "aria-controls": this.hasChildren ? this.childrenId : undefined, "aria-expanded": this.hasChildren ? this.expanded : undefined }, index.h("span", { key: '5838bc17bf01e8644b583c122b9d0c72b842ccad', class: "tree-navigation-item__content" }, this.icon && (index.h("swirl-icon", { key: '5e9bf82d1ff7aa4a46e077786e0d6dc05d367526', class: "tree-navigation-item__icon", glyph: this.icon, size: 20, "aria-hidden": "true", role: "img", "aria-label": `${this.label} icon` })), index.h("span", { key: '017b1e8ecb93b08f4ad51cc2e0b7d800b4d74bdd', class: "tree-navigation-item__label" }, this.label)), this.expandable && this.hasChildren && !this.external && (index.h("span", { key: 'fed4147568ee64adc006d4d4e87c8a7a8370f079', class: "tree-navigation-item__toggle-icon", "aria-hidden": "true" }, this.expanded ? (index.h("swirl-icon-expand-more", { size: 16, role: "img", "aria-label": "Collapse" })) : (index.h("swirl-icon-chevron-right", { size: 16, role: "img", "aria-label": "Expand" })))), this.external && (index.h("span", { key: 'f219e59cee7707992bb270edf301c67867fccad9', class: "tree-navigation-item__external-icon", "aria-hidden": "true" }, index.h("swirl-icon-open-in-new", { key: '3f71c3097d071e90fa026a86ddcd101677c2c3ce', size: 16, role: "img", "aria-label": "External link" })))), this.hasChildren && (index.h("ul", { key: 'f0acf9327561438ece383a8b2dd047f175e1692d', class: "tree-navigation-item__children", id: this.childrenId, role: "group", "aria-label": `${this.label} submenu`, style: {
90
90
  display: !this.expanded ? "none" : undefined,
91
- } }, index.h("slot", { key: 'cf31e4f6c71cc39028f2aa5d2748fd3798c3c393' }))))));
91
+ } }, index.h("slot", { key: '42e95f0cfc4890335acb8c6a972f869f260396f2' }))))));
92
92
  }
93
93
  get el() { return index.getElement(this); }
94
94
  static get watchers() { return {