@getflip/swirl-components 0.256.0 → 0.256.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": "2024-11-18T07:37:58",
2
+ "timestamp": "2024-11-18T12:21:40",
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.href || !this.expandable) {
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: 'a821377f4a2e8f7913ab6aa65ca7b0126b99fd95', role: "none" }, index.h("li", { key: '712e77af1186a24e1ef884e5972044ee0e8ebf8f', class: "tree-navigation-item", role: "treeitem", "aria-expanded": this.hasChildren ? this.expanded : undefined, "aria-level": this.level }, index.h(Tag, { key: 'bb33784af6d87d1fac438398e435d7305aa53616', 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: '23100bf22e467bcd776110bf3b417c14dd712c9d', class: "tree-navigation-item__content" }, this.icon && (index.h("swirl-icon", { key: '2ccfae85ca436819f2d2461c4c7b2f1f0c9d75b6', class: "tree-navigation-item__icon", glyph: this.icon, size: 20, "aria-hidden": "true", role: "img", "aria-label": `${this.label} icon` })), index.h("span", { key: '6a09c3578093f8de3b111132192d6b52ce31425e', class: "tree-navigation-item__label" }, this.label)), this.expandable && this.hasChildren && !this.external && (index.h("span", { key: '952182732993dd3a79692e91a497d488dfc8b335', 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: '1e1b284f3f61dcf375d3ae2904d4e43af95f94ee', class: "tree-navigation-item__external-icon", "aria-hidden": "true" }, index.h("swirl-icon-open-in-new", { key: '6bc207820463c81edd493ad7a8d86bb69598a91f', size: 16, role: "img", "aria-label": "External link" })))), this.hasChildren && (index.h("ul", { key: '32a8f9120bb8b1b6a381151a4d74b83f701a53fa', 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: '43389aa1d7626ad3949bd71cd2556872a31d96b5' }))))));
92
92
  }
93
93
  get el() { return index.getElement(this); }
94
94
  static get watchers() { return {