@db-ux/wc-core-components 4.5.3 → 4.5.4

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@db-ux/wc-core-components",
4
- "version": "4.5.3",
4
+ "version": "4.5.4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -3476,15 +3476,15 @@
3476
3476
  "description": "\n---\n\n\n### **Events:**\n - **click**\n\n### **Slots:**\n - **children** - This is a default/unnamed slot\n- **subNavigation** - React-specific property to pass in a slot for sub-navigation",
3477
3477
  "doc-url": "https://design-system.deutschebahn.com/core-web/review/main/components/navigation-item/properties",
3478
3478
  "attributes": [
3479
+ {
3480
+ "name": "id",
3481
+ "value": { "type": "DBNavigationItemProps[\"id\"]" }
3482
+ },
3479
3483
  {
3480
3484
  "name": "sub-navigation-expanded",
3481
3485
  "description": "This is for mobile navigation only, if it is set the sub-navigation is a static overlay",
3482
3486
  "value": { "type": "boolean | string" }
3483
3487
  },
3484
- {
3485
- "name": "id",
3486
- "value": { "type": "DBNavigationItemProps[\"id\"]" }
3487
- },
3488
3488
  {
3489
3489
  "name": "prop-overrides",
3490
3490
  "value": { "type": "DBNavigationItemProps[\"propOverrides\"]" }
@@ -3557,12 +3557,12 @@
3557
3557
  ],
3558
3558
  "js": {
3559
3559
  "properties": [
3560
+ { "name": "id", "type": "DBNavigationItemProps[\"id\"]" },
3560
3561
  {
3561
3562
  "name": "subNavigationExpanded",
3562
3563
  "description": "This is for mobile navigation only, if it is set the sub-navigation is a static overlay",
3563
3564
  "type": "boolean | string"
3564
3565
  },
3565
- { "name": "id", "type": "DBNavigationItemProps[\"id\"]" },
3566
3566
  {
3567
3567
  "name": "propOverrides",
3568
3568
  "type": "DBNavigationItemProps[\"propOverrides\"]"
@@ -3621,7 +3621,9 @@
3621
3621
  { "name": "hasSubNavigation", "type": "boolean" },
3622
3622
  { "name": "isSubNavigationExpanded", "type": "boolean" },
3623
3623
  { "name": "autoClose", "type": "boolean" },
3624
- { "name": "navigationItemSafeTriangle" }
3624
+ { "name": "navigationItemSafeTriangle" },
3625
+ { "name": "subNavigationId" },
3626
+ { "name": "subNavigationToggleId" }
3625
3627
  ],
3626
3628
  "events": [
3627
3629
  {
@@ -5737,7 +5739,8 @@
5737
5739
  { "name": "role", "type": "any" },
5738
5740
  { "name": "label", "type": "any" },
5739
5741
  { "name": "href" },
5740
- { "name": "updateHref" }
5742
+ { "name": "updateHref" },
5743
+ { "name": "handleHrefUpdateEvent" }
5741
5744
  ],
5742
5745
  "events": []
5743
5746
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/wc-core-components",
3
- "version": "4.5.3",
3
+ "version": "4.5.4",
4
4
  "description": "Stencil components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,7 +48,7 @@
48
48
  "web-types": "./dist/web-types.json",
49
49
  "customElements": "dist/custom-elements.json",
50
50
  "dependencies": {
51
- "@db-ux/core-components": "4.5.3",
52
- "@db-ux/core-foundations": "4.5.3"
51
+ "@db-ux/core-components": "4.5.4",
52
+ "@db-ux/core-foundations": "4.5.4"
53
53
  }
54
54
  }
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,F as a}from"./p-BjIPMjCM.js";import{n as h}from"./p-BdL-nI5y.js";import{d as n,e as o,g as d,c as l}from"./p-xkoBSP8R.js";import{N as e}from"./p-BuBrj57D.js";import"./p-DOPXnIzL.js";const r=class{constructor(s){i(this,s),this.click=t(this,"click"),this.initialized=!1,this.hasAreaPopup=!1,this.hasSubNavigation=!0,this.isSubNavigationExpanded=!1,this.autoClose=!1,this.navigationItemSafeTriangle=void 0}handleNavigationItemClick(i){var t;"A"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.nodeName)&&(this.autoClose=!0,n((()=>{this.autoClose=!1}),1e3))}handleClick(i){this.click&&(i.stopPropagation(),this.click.emit(i)),this.hasAreaPopup&&(this.isSubNavigationExpanded=!0)}handleBackClick(i){i.stopPropagation(),this.isSubNavigationExpanded=!1}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let a=0;a<t.length;a++){const h=t.item(a);if(h&&"data-density"!==h.name&&(h.name.startsWith("data-")||h.name.startsWith("aria-")))i.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"data-density"!==h.name&&"class"!==h.name&&"style"===h.name)i.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"class"===h.name){const t=h.value.includes("hydrated"),a=h.value.replace("hydrated","").trim(),n=i.getAttribute("class");i.setAttribute(h.name,`${n?`${n} `:""}${a}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(h.name)}}}}watch0Fn(){void 0!==this.subNavigationExpanded&&(this.isSubNavigationExpanded=!!o(this.subNavigationExpanded,"subNavigationExpanded"))}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");t&&((null===(i=t.children)||void 0===i?void 0:i.length)>0?(this.hasAreaPopup=!0,this.navigationItemSafeTriangle||(this.navigationItemSafeTriangle=new e(this._ref,t))):this.hasSubNavigation=!1)}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-navigation-item"),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}render(){var i,t,n;return s("li",{key:"dd524f6e6fa61adfb6d87591d1dbff6ba2e8f4fa",class:l("db-navigation-item",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id,onMouseOver:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.disableFollow()},onMouseMove:i=>{var t;return null===(t=this.navigationItemSafeTriangle)||void 0===t?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-show-icon":d(this.showIcon),"data-active":this.active,"data-wrap":d(this.wrap),"aria-disabled":d(this.disabled)},this.hasSubNavigation?null:this.text?this.text:s("slot",null),this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button","aria-haspopup":this.hasAreaPopup,"aria-expanded":this.isSubNavigationExpanded,disabled:o(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",null)),s("menu",{class:"db-sub-navigation","data-force-close":this.autoClose,onClick:i=>this.handleNavigationItemClick(i)},this.hasAreaPopup?s("div",{class:"db-mobile-navigation-back"},s("db-button",{icon:"arrow_left",variant:"ghost",id:this.backButtonId,onClick:i=>this.handleBackClick(i)},null!==(n=this.backButtonText)&&void 0!==n?n:h)):null,s("slot",{name:"subNavigation"}))):null)}static get watchers(){return{subNavigationExpanded:[{watch0:0}],initialized:[{watch1:0}],_ref:[{watch1:0}]}}};export{r as db_navigation_item}