@db-ux/wc-core-components 2.2.2 → 2.2.3-getBoundingClientRect-a18038f

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.
Files changed (43) hide show
  1. package/dist/cjs/db-custom-select.cjs.entry.js +1 -1
  2. package/dist/cjs/db-header.cjs.entry.js +2 -2
  3. package/dist/cjs/db-navigation-item.cjs.entry.js +2 -2
  4. package/dist/cjs/db-popover.cjs.entry.js +1 -1
  5. package/dist/cjs/db-tooltip.cjs.entry.js +1 -1
  6. package/dist/cjs/{floating-components-BNCfdqZJ.js → floating-components-TczCINdL.js} +17 -2
  7. package/dist/cjs/floating-components-TczCINdL.js.map +1 -0
  8. package/dist/cjs/index.cjs.js +2 -2
  9. package/dist/cjs/{navigation-U4SBgT7D.js → navigation--rlUdgeW.js} +3 -3
  10. package/dist/cjs/{navigation-U4SBgT7D.js.map → navigation--rlUdgeW.js.map} +1 -1
  11. package/dist/collection/utils/floating-components.js +15 -0
  12. package/dist/collection/utils/floating-components.js.map +1 -1
  13. package/dist/db-ux/db-ux.esm.js +1 -1
  14. package/dist/db-ux/index.esm.js +1 -1
  15. package/dist/db-ux/{p-c8666f4b.entry.js → p-010a7372.entry.js} +2 -2
  16. package/dist/db-ux/{p-a2e130ba.entry.js → p-02e09419.entry.js} +2 -2
  17. package/dist/db-ux/{p-695bf91e.entry.js → p-34d4f584.entry.js} +2 -2
  18. package/dist/db-ux/{p-BDA9dlfd.js → p-BFvCp0MI.js} +2 -2
  19. package/dist/db-ux/{p-BDA9dlfd.js.map → p-BFvCp0MI.js.map} +1 -1
  20. package/dist/db-ux/p-BLKCMo7A.js +2 -0
  21. package/dist/db-ux/p-BLKCMo7A.js.map +1 -0
  22. package/dist/db-ux/{p-3fe511ce.entry.js → p-d22637ab.entry.js} +2 -2
  23. package/dist/db-ux/{p-854c0012.entry.js → p-f3ac974b.entry.js} +2 -2
  24. package/dist/esm/db-custom-select.entry.js +1 -1
  25. package/dist/esm/db-header.entry.js +2 -2
  26. package/dist/esm/db-navigation-item.entry.js +2 -2
  27. package/dist/esm/db-popover.entry.js +1 -1
  28. package/dist/esm/db-tooltip.entry.js +1 -1
  29. package/dist/esm/{floating-components-DYeQU2bY.js → floating-components-BLKCMo7A.js} +17 -2
  30. package/dist/esm/floating-components-BLKCMo7A.js.map +1 -0
  31. package/dist/esm/index.js +2 -2
  32. package/dist/esm/{navigation-CE_2IUA4.js → navigation-C4qTkuYy.js} +3 -3
  33. package/dist/esm/{navigation-CE_2IUA4.js.map → navigation-C4qTkuYy.js.map} +1 -1
  34. package/package.json +3 -3
  35. package/dist/cjs/floating-components-BNCfdqZJ.js.map +0 -1
  36. package/dist/db-ux/p-DYeQU2bY.js +0 -2
  37. package/dist/db-ux/p-DYeQU2bY.js.map +0 -1
  38. package/dist/esm/floating-components-DYeQU2bY.js.map +0 -1
  39. /package/dist/db-ux/{p-c8666f4b.entry.js.map → p-010a7372.entry.js.map} +0 -0
  40. /package/dist/db-ux/{p-a2e130ba.entry.js.map → p-02e09419.entry.js.map} +0 -0
  41. /package/dist/db-ux/{p-695bf91e.entry.js.map → p-34d4f584.entry.js.map} +0 -0
  42. /package/dist/db-ux/{p-3fe511ce.entry.js.map → p-d22637ab.entry.js.map} +0 -0
  43. /package/dist/db-ux/{p-854c0012.entry.js.map → p-f3ac974b.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as s,F as h}from"./p-Ctmm4hMW.js";import{h as e,d as l,s as a,k as n,u as o,g as d,b as c,j as u,c as r}from"./p-BgQRUWMZ.js";import{l as v,a as f,m as w,d as b,e as m,g as p,h as y,i as g,o as k,f as A,k as F,c as D,s as x}from"./p-DC9V_oNU.js";import{D as C}from"./p-BbHrTk7a.js";import{D as S}from"./p-Dgkqk5fN.js";import{h as R}from"./p-DYeQU2bY.js";const T=class{constructor(s){i(this,s);this.amountChange=t(this,"amountChange");this.dropdownToggle=t(this,"dropdownToggle");this.optionSelected=t(this,"optionSelected");this.search=t(this,"search");this.showClearSelection=true;this.clearSelectionText="Clear selection";this._id=undefined;this._messageId=undefined;this._validMessageId=undefined;this._invalidMessageId=undefined;this._invalidMessage=undefined;this._selectId=undefined;this._labelId=undefined;this._summaryId=undefined;this._placeholderId=undefined;this._infoTextId=undefined;this._validity="no-validation";this._descByIds="";this._selectedLabels="";this._selectedLabelsId=undefined;this._voiceOverFallback="";this._selectedOptions=[];this.selectAllEnabled=false;this.searchEnabled=false;this.amountOptions=0;this._values=[];this._options=[];this._hasNoOptions=false;this._documentClickListenerCallbackId=undefined;this._internalChangeTimestamp=0;this._documentScrollListenerCallbackId=undefined;this._observer=undefined;this._searchValue=undefined;this.selectAllChecked=false;this.selectAllIndeterminate=false;this.satisfyReact=function i(t){t.stopPropagation()}}handleDocumentScroll(i){var t,s;if(((t=i===null||i===void 0?void 0:i.target)===null||t===void 0?void 0:t.contains)&&((s=i===null||i===void 0?void 0:i.target)===null||s===void 0?void 0:s.contains(this.detailsRef))){this.handleAutoPlacement()}}hasValidState(){var i;return!!((i=this.validMessage)!==null&&i!==void 0?i:this.validation==="valid")}handleValidation(){var i,t,s,h,n,o,d,c;if(this.selectRef){this.selectRef.value=this.getNativeSelectValue()}if(!((i=this.selectRef)===null||i===void 0?void 0:i.validity.valid)||this.validation==="invalid"){this._descByIds=this._invalidMessageId;this._invalidMessage=this.invalidMessage||((t=this.selectRef)===null||t===void 0?void 0:t.validationMessage)||v;if(e()){this._voiceOverFallback=this._invalidMessage;l((()=>this._voiceOverFallback=""),1e3)}this._validity=(s=this.validation)!==null&&s!==void 0?s:"invalid"}else if(this.hasValidState()&&((h=this.selectRef)===null||h===void 0?void 0:h.validity.valid)&&this.required){this._descByIds=this._validMessageId;if(e()){this._voiceOverFallback=(n=this.validMessage)!==null&&n!==void 0?n:F;l((()=>this._voiceOverFallback=""),1e3)}this._validity=(o=this.validation)!==null&&o!==void 0?o:"valid"}else if(a(this.message,this.showMessage)){this._descByIds=this._messageId;this._validity=(d=this.validation)!==null&&d!==void 0?d:"no-validation"}else{this._descByIds=this._placeholderId;this._validity=(c=this.validation)!==null&&c!==void 0?c:"no-validation"}}handleDropdownToggle(i){var t,s;if(this.dropdownToggle){i.stopPropagation();this.dropdownToggle.emit(i)}if(i.target.open){this._documentClickListenerCallbackId=(new C).addCallback((i=>this.handleDocumentClose(i)));this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i)));this.handleAutoPlacement();(t=this._observer)===null||t===void 0?void 0:t.observe(this.detailsRef);if(!i.target.dataset.test){this.handleOpenByKeyboardFocus()}}else{if(this._documentClickListenerCallbackId){(new C).removeCallback(this._documentClickListenerCallbackId)}if(this._documentScrollListenerCallbackId){(new S).removeCallback(this._documentScrollListenerCallbackId)}(s=this._observer)===null||s===void 0?void 0:s.unobserve(this.detailsRef)}}getNativeSelectValue(){var i,t;if((i=this._values)===null||i===void 0?void 0:i.length){return(t=this._values.at(0))!==null&&t!==void 0?t:""}return""}setDescById(i){var t;const s=[];if(i){s.push(i)}if(this._selectedLabelsId&&((t=this._selectedLabels)===null||t===void 0?void 0:t.length)){s.push(this._selectedLabelsId)}this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return(i=this.selectAllLabel)!==null&&i!==void 0?i:f}getOptionLabel(i){var t,s,h;return(h=(t=i.label)!==null&&t!==void 0?t:(s=i.value)===null||s===void 0?void 0:s.toString())!==null&&h!==void 0?h:""}getOptionChecked(i){var t,s;if(i&&((t=this._values)===null||t===void 0?void 0:t.includes)){return(s=this._values)===null||s===void 0?void 0:s.includes(i)}return false}getTagRemoveLabel(i){if(this.removeTagsTexts&&this.removeTagsTexts.length>i){return this.removeTagsTexts.at(i)}else{return`${w} ${this._selectedOptions?this.getOptionLabel(this._selectedOptions[i]):""}`}}handleTagRemove(i,t){t.stopPropagation();this.handleSelect(i.value);this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");if(i){l((()=>{var t;R(i,this.detailsRef,(t=this.placement)!==null&&t!==void 0?t:"bottom")}),1)}}}handleArrowDownUp(i){var t,s,h,e,a,o,d;if((t=this.detailsRef)===null||t===void 0?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t){const c=t.getAttribute("type")==="checkbox"||t.getAttribute("type")==="radio";if(c){const c=t===null||t===void 0?void 0:t.closest("li");if(i.key==="ArrowDown"||i.key==="ArrowRight"){if(c===null||c===void 0?void 0:c.nextElementSibling){(h=(s=c===null||c===void 0?void 0:c.nextElementSibling)===null||s===void 0?void 0:s.querySelector("input"))===null||h===void 0?void 0:h.focus()}else{this.handleFocusFirstDropdownCheckbox(t)}}else{if(c===null||c===void 0?void 0:c.previousElementSibling){(a=(e=c===null||c===void 0?void 0:c.previousElementSibling)===null||e===void 0?void 0:e.querySelector("input"))===null||a===void 0?void 0:a.focus()}else if(this.detailsRef.querySelector(`input[type="checkbox"]`)!==t){this.handleFocusFirstDropdownCheckbox(t)}else{const i=n(this.detailsRef);if(i){l((()=>{i.focus()}),100)}else{const i=Array.from((o=this.detailsRef)===null||o===void 0?void 0:o.querySelectorAll(`input[type="checkbox"],input[type="radio"]`));if(i.length){(d=i.at(-1))===null||d===void 0?void 0:d.focus()}}}}}else{if(t.getAttribute("type")==="search"&&(i.key==="ArrowUp"||i.key==="ArrowLeft")){this.handleClose("close");this.handleSummaryFocus()}else{this.handleFocusFirstDropdownCheckbox(t)}}}}}else if(i.key==="ArrowDown"||i.key==="ArrowRight"){this.handleAutoPlacement();if(this.detailsRef){this.detailsRef.open=true}this.handleOpenByKeyboardFocus()}i.stopPropagation();i.preventDefault()}handleKeyboardPress(i){var t;i.stopPropagation();if(i.key==="Escape"&&((t=this.detailsRef)===null||t===void 0?void 0:t.open)){this.handleClose("close");this.handleSummaryFocus()}else if(i.key==="ArrowDown"||i.key==="ArrowUp"||i.key==="ArrowLeft"||i.key==="ArrowRight"){this.handleArrowDownUp(i)}}handleClose(i){if(this.detailsRef){if(i==="close"){this.detailsRef.open=false;this.handleSummaryFocus()}else if(this.detailsRef.open&&(i===null||i===void 0?void 0:i.relatedTarget)){const t=i.relatedTarget;if(!this.detailsRef.contains(t)){l((()=>this.detailsRef.open=false),1)}}}}handleDocumentClose(i){var t,s;if(i){const h=typeof i.detail==="number"?i.target:(t=i.detail)===null||t===void 0?void 0:t.target;if(((s=this.detailsRef)===null||s===void 0?void 0:s.open)&&!this.detailsRef.contains(h)){this.detailsRef.open=false}}}handleOptionSelected(i){const t=(new Date).getTime()-this._internalChangeTimestamp<200;if(t)return;this._values=i;if(this.optionSelected){this.optionSelected.emit(i!==null&&i!==void 0?i:[])}this._internalChangeTimestamp=(new Date).getTime()}handleSelect(i){var t;if(i){if(this.multiple){if((t=this._values)===null||t===void 0?void 0:t.includes(i)){this.handleOptionSelected(this._values.filter((t=>t!==i)))}else{this.handleOptionSelected([...this._values||[],i])}}else{this.handleOptionSelected([i]);this.handleClose("close")}}}handleSelectAll(i){var t;i.stopPropagation();if(((t=this._values)===null||t===void 0?void 0:t.length)===this.amountOptions){this.handleOptionSelected([])}else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:undefined;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||((s=t.value)===null||s===void 0?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return(t=i.value)!==null&&t!==void 0?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll(`input[type="checkbox"],input[type="radio"]`));if(t.length){const s=t.at(0);const h=s===i&&t.length>1?t.at(1):s;if(h){l((()=>{h.focus()}),1)}}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=n(this.detailsRef);if(i){l((()=>{i.focus()}),1)}else{this.handleFocusFirstDropdownCheckbox()}}}handleSearch(i){let t;if(typeof i==="string"){t=i}else{i.stopPropagation();if(this.search){this.search.emit(i)}t=i.target.value;this._searchValue=t}if(!this.options||!t||t.length===0){this._options=this.options}else if(this.searchFilter){this._options=this.options.filter((i=>this.searchFilter(i,t)))}else{this._options=this.options.filter((i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(t.toLowerCase())))}}handleClearAll(i){i.stopPropagation();this.handleOptionSelected([]);this.handleSummaryFocus()}handleSummaryFocus(){var i;if(this.detailsRef){(i=this.detailsRef.querySelector("summary"))===null||i===void 0?void 0:i.focus()}}enableAttributePassing(i,t){const s=i===null||i===void 0?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const e=t.item(h);if(e&&(e.name.startsWith("data-")||e.name.startsWith("aria-"))){i.setAttribute(e.name,e.value);s.removeAttribute(e.name)}if(e&&e.name==="class"){const t=e.value.includes("hydrated");const h=e.value.replace("hydrated","").trim();const l=i.getAttribute("class");i.setAttribute(e.name,`${l?`${l} `:""}${h}`);if(t){s.setAttribute("class","hydrated")}else{s.removeAttribute(e.name)}}}}}watch0Fn(){if(this.detailsRef){this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}}watch0(){this.watch0Fn()}watch1Fn(){if(this._id){const i=this._id+A;this._labelId=this._id+b;this._selectId=this._id+m;this._validMessageId=this._id+p;this._invalidMessageId=this._id+y;this._placeholderId=this._id+g;if(a(this.message,this.showMessage)){this.setDescById(i)}else{this.setDescById()}}}watch1(){this.watch1Fn()}watch2Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");if(t){t.setAttribute("aria-describedby",(i=this.ariaDescribedBy)!==null&&i!==void 0?i:this._descByIds||"")}}}watch2(){this.watch2Fn()}watch3Fn(){if(this.showNoResults!==undefined){this._hasNoOptions=this.showNoResults}else if(this._options){this._hasNoOptions=this._options.length===0}}watch3(){this.watch3Fn()}watch4Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&((i=this.showSelectAll)!==null&&i!==void 0?i:this.amountOptions>5))}watch4(){this.watch4Fn()}watch5Fn(){var i;this.searchEnabled=(i=this.showSearch)!==null&&i!==void 0?i:this.amountOptions>9}watch5(){this.watch5Fn()}watch6Fn(){var i;if(this.values&&Array.isArray(this.values)&&this.values!==this._values){this._values=(i=this.values)!==null&&i!==void 0?i:[]}}watch6(){this.watch6Fn()}watch7Fn(){this.handleValidation()}watch7(){this.watch7Fn()}watch8Fn(){this._validity=this.validation}watch8(){this.watch8Fn()}watch9Fn(){var i,t;if(((i=this._values)===null||i===void 0?void 0:i.length)===0){this.selectAllChecked=false;this.selectAllIndeterminate=false}else if(((t=this._values)===null||t===void 0?void 0:t.length)===this.amountOptions){this.selectAllIndeterminate=false;this.selectAllChecked=true}else if(this._values){this.selectAllIndeterminate=true}}watch9(){this.watch9Fn()}watch10Fn(){var i,t;this._options=this.options;this.amountOptions=(t=(i=this.options)===null||i===void 0?void 0:i.filter((i=>!i.isGroupTitle)).length)!==null&&t!==void 0?t:0}watch10(){this.watch10Fn()}watch11Fn(){this._searchValue=this.searchValue;if(this.searchValue){const i=this.searchValue;this.handleSearch(i)}}watch11(){this.watch11Fn()}watch12Fn(){var i,t;if((i=this.options)===null||i===void 0?void 0:i.length){this._selectedOptions=(t=this.options)===null||t===void 0?void 0:t.filter((i=>{var t,s;if(!i.value||!((t=this._values)===null||t===void 0?void 0:t["includes"])){return false}return!i.isGroupTitle&&((s=this._values)===null||s===void 0?void 0:s.includes(i.value))}))}}watch12(){this.watch12Fn()}watch13Fn(){var i,t,s;if(this.selectedLabels){this._selectedLabels=this.selectedLabels;return}if((i=this._selectedOptions)===null||i===void 0?void 0:i.length){if(this.transformSelectedLabels){const i=this._selectedOptions;const t=this.transformSelectedLabels;this._selectedLabels=t(i);return}if(this.selectedType==="amount"){this._selectedLabels=this.amountText?this.amountText:`${(t=this._selectedOptions)===null||t===void 0?void 0:t.length} ${k}`}else{this._selectedLabels=(s=this._selectedOptions)===null||s===void 0?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}}else{this._selectedLabels=""}}watch13(){this.watch13Fn()}watch14Fn(){var i,t;if(this.amountChange){this.amountChange.emit((t=(i=this._selectedOptions)===null||i===void 0?void 0:i.length)!==null&&t!==void 0?t:0)}}watch14(){this.watch14Fn()}watch15Fn(){if(this.selectAllRef){this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate)}}watch15(){this.watch15Fn()}watch16Fn(){var i;this._invalidMessage=this.invalidMessage||((i=this.selectRef)===null||i===void 0?void 0:i.validationMessage)||v}watch16(){this.watch16Fn()}componentDidLoad(){var i;this.enableAttributePassing(this._ref,"db-custom-select");const t=(i=this.id)!==null&&i!==void 0?i:`custom-select-${o()}`;this._id=t;this._messageId=t+A;this._validMessageId=t+p;this._invalidMessageId=t+y;this._selectId=t+m;this._labelId=t+b;this._summaryId=t+"-summary";this._placeholderId=t+g;this._selectedLabelsId=t+"-selected-labels";this._infoTextId=t+"-info";this._invalidMessage=this.invalidMessage||v;if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));if(t&&!t.isIntersecting&&this.detailsRef.open){this.detailsRef.open=false}}}))}this.watch0Fn();this.watch1Fn();this.watch2Fn();this.watch3Fn();this.watch4Fn();this.watch5Fn();this.watch6Fn();this.watch7Fn();this.watch8Fn();this.watch9Fn();this.watch10Fn();this.watch11Fn();this.watch12Fn();this.watch13Fn();this.watch14Fn();this.watch15Fn();this.watch16Fn()}render(){var i,t,e,l,n,o,v,w,b,m,p,y,g,k,A;return s("div",{key:"e7b8902a3381240fcfe7ca2e85f66e582f7cb284",class:r("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":this._validity==="invalid","data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":this.variant==="floating"&&this.selectedType==="tag"&&this.multiple?"above":this.variant,"data-required":d(this.required),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":u(this.showLabel),"data-icon":this.icon,"data-hide-icon":u(this.showIcon)},s("label",{key:"f740293d426b6a69fc2516cc469b2510b851c9ef",id:this._labelId},(i=this.label)!==null&&i!==void 0?i:f,s("select",{key:"26f0299bdbbbf5b2593729e40cdbb724ba9224ba",role:"none",hidden:true,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,multiple:c(this.multiple,"multiple"),disabled:c(this.disabled,"disabled"),required:c(this.required,"required"),onChange:i=>this.satisfyReact(i)},((t=this.options)===null||t===void 0?void 0:t.length)?(e=this.options)===null||e===void 0?void 0:e.map((i=>s("option",{disabled:i.disabled,value:i.value,key:undefined},this.getOptionLabel(i)))):null)),s("details",{key:"71956c98be403be038dbdabc4390aa09eabc8c22",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"5b3c566401a64350434dcb2b7f71eba5c08803d0"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":d(this.disabled),"aria-labelledby":this._labelId},((l=this._selectedLabels)===null||l===void 0?void 0:l.length)?s("span",{"data-visually-hidden":d(this.selectedType==="tag"),id:this._selectedLabelsId},this._selectedLabels):null,this.selectedType==="tag"?s("div",null,(n=this._selectedOptions)===null||n===void 0?void 0:n.map(((i,t)=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(t),onRemove:t=>this.handleTagRemove(i,t),key:undefined},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:false,value:this._searchValue,label:(o=this.searchLabel)!==null&&o!==void 0?o:f,placeholder:(v=this.searchPlaceholder)!==null&&v!==void 0?v:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:undefined,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this._hasNoOptions?undefined:"circular_arrows",semantic:this._hasNoOptions?"warning":"informational"},(w=this._hasNoOptions?this.noResultsText:this.loadingText)!==null&&w!==void 0?w:D):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:c(this.multiple,"multiple"),label:(m=(b=this.ariaListLabel)!==null&&b!==void 0?b:this.label)!==null&&m!==void 0?m:f},(p=this._options)===null||p===void 0?void 0:p.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:undefined},!i.isGroupTitle?this.getOptionLabel(i):null))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose("close")},(y=this.mobileCloseButtonText)!==null&&y!==void 0?y:x)))):null),((g=this.showClearSelection)!==null&&g!==void 0?g:true)&&((k=this._values)===null||k===void 0?void 0:k.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:true,name:this._id,form:this._id,onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"1e6a1cd3d2da5ea7484309d10e1c9e7da31e1043","aria-hidden":d(true),id:this._placeholderId},(A=this.placeholder)!==null&&A!==void 0?A:this.label),a(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||F):null,s("db-infotext",{key:"4151b595eadab3814592ead50a73be825bae2d28",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"48364689d98dc1c25f70ec982de3e5a7505c1594","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{detailsRef:["watch0","watch2"],_id:["watch1"],_descByIds:["watch2"],showNoResults:["watch3"],_options:["watch3"],showSelectAll:["watch4"],amountOptions:["watch4","watch5","watch9"],multiple:["watch4"],showSearch:["watch5"],values:["watch6"],_values:["watch7","watch9","watch12"],validation:["watch8"],options:["watch10","watch12"],searchValue:["watch11"],_selectedOptions:["watch13","watch14"],selectedType:["watch13"],amountText:["watch13"],selectedLabels:["watch13"],transformSelectedLabels:["watch13"],selectAllIndeterminate:["watch15"],selectAllRef:["watch15"],selectRef:["watch16"],invalidMessage:["watch16"]}}};export{T as db_custom_select};
2
- //# sourceMappingURL=p-a2e130ba.entry.js.map
1
+ import{r as i,c as t,h as s,F as h}from"./p-Ctmm4hMW.js";import{h as e,d as l,s as a,k as n,u as o,g as d,b as c,j as u,c as r}from"./p-BgQRUWMZ.js";import{l as v,a as f,m as w,d as b,e as m,g as p,h as y,i as g,o as k,f as A,k as F,c as D,s as x}from"./p-DC9V_oNU.js";import{D as C}from"./p-BbHrTk7a.js";import{D as S}from"./p-Dgkqk5fN.js";import{h as R}from"./p-BLKCMo7A.js";const T=class{constructor(s){i(this,s);this.amountChange=t(this,"amountChange");this.dropdownToggle=t(this,"dropdownToggle");this.optionSelected=t(this,"optionSelected");this.search=t(this,"search");this.showClearSelection=true;this.clearSelectionText="Clear selection";this._id=undefined;this._messageId=undefined;this._validMessageId=undefined;this._invalidMessageId=undefined;this._invalidMessage=undefined;this._selectId=undefined;this._labelId=undefined;this._summaryId=undefined;this._placeholderId=undefined;this._infoTextId=undefined;this._validity="no-validation";this._descByIds="";this._selectedLabels="";this._selectedLabelsId=undefined;this._voiceOverFallback="";this._selectedOptions=[];this.selectAllEnabled=false;this.searchEnabled=false;this.amountOptions=0;this._values=[];this._options=[];this._hasNoOptions=false;this._documentClickListenerCallbackId=undefined;this._internalChangeTimestamp=0;this._documentScrollListenerCallbackId=undefined;this._observer=undefined;this._searchValue=undefined;this.selectAllChecked=false;this.selectAllIndeterminate=false;this.satisfyReact=function i(t){t.stopPropagation()}}handleDocumentScroll(i){var t,s;if(((t=i===null||i===void 0?void 0:i.target)===null||t===void 0?void 0:t.contains)&&((s=i===null||i===void 0?void 0:i.target)===null||s===void 0?void 0:s.contains(this.detailsRef))){this.handleAutoPlacement()}}hasValidState(){var i;return!!((i=this.validMessage)!==null&&i!==void 0?i:this.validation==="valid")}handleValidation(){var i,t,s,h,n,o,d,c;if(this.selectRef){this.selectRef.value=this.getNativeSelectValue()}if(!((i=this.selectRef)===null||i===void 0?void 0:i.validity.valid)||this.validation==="invalid"){this._descByIds=this._invalidMessageId;this._invalidMessage=this.invalidMessage||((t=this.selectRef)===null||t===void 0?void 0:t.validationMessage)||v;if(e()){this._voiceOverFallback=this._invalidMessage;l((()=>this._voiceOverFallback=""),1e3)}this._validity=(s=this.validation)!==null&&s!==void 0?s:"invalid"}else if(this.hasValidState()&&((h=this.selectRef)===null||h===void 0?void 0:h.validity.valid)&&this.required){this._descByIds=this._validMessageId;if(e()){this._voiceOverFallback=(n=this.validMessage)!==null&&n!==void 0?n:F;l((()=>this._voiceOverFallback=""),1e3)}this._validity=(o=this.validation)!==null&&o!==void 0?o:"valid"}else if(a(this.message,this.showMessage)){this._descByIds=this._messageId;this._validity=(d=this.validation)!==null&&d!==void 0?d:"no-validation"}else{this._descByIds=this._placeholderId;this._validity=(c=this.validation)!==null&&c!==void 0?c:"no-validation"}}handleDropdownToggle(i){var t,s;if(this.dropdownToggle){i.stopPropagation();this.dropdownToggle.emit(i)}if(i.target.open){this._documentClickListenerCallbackId=(new C).addCallback((i=>this.handleDocumentClose(i)));this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i)));this.handleAutoPlacement();(t=this._observer)===null||t===void 0?void 0:t.observe(this.detailsRef);if(!i.target.dataset.test){this.handleOpenByKeyboardFocus()}}else{if(this._documentClickListenerCallbackId){(new C).removeCallback(this._documentClickListenerCallbackId)}if(this._documentScrollListenerCallbackId){(new S).removeCallback(this._documentScrollListenerCallbackId)}(s=this._observer)===null||s===void 0?void 0:s.unobserve(this.detailsRef)}}getNativeSelectValue(){var i,t;if((i=this._values)===null||i===void 0?void 0:i.length){return(t=this._values.at(0))!==null&&t!==void 0?t:""}return""}setDescById(i){var t;const s=[];if(i){s.push(i)}if(this._selectedLabelsId&&((t=this._selectedLabels)===null||t===void 0?void 0:t.length)){s.push(this._selectedLabelsId)}this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return(i=this.selectAllLabel)!==null&&i!==void 0?i:f}getOptionLabel(i){var t,s,h;return(h=(t=i.label)!==null&&t!==void 0?t:(s=i.value)===null||s===void 0?void 0:s.toString())!==null&&h!==void 0?h:""}getOptionChecked(i){var t,s;if(i&&((t=this._values)===null||t===void 0?void 0:t.includes)){return(s=this._values)===null||s===void 0?void 0:s.includes(i)}return false}getTagRemoveLabel(i){if(this.removeTagsTexts&&this.removeTagsTexts.length>i){return this.removeTagsTexts.at(i)}else{return`${w} ${this._selectedOptions?this.getOptionLabel(this._selectedOptions[i]):""}`}}handleTagRemove(i,t){t.stopPropagation();this.handleSelect(i.value);this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");if(i){l((()=>{var t;R(i,this.detailsRef,(t=this.placement)!==null&&t!==void 0?t:"bottom")}),1)}}}handleArrowDownUp(i){var t,s,h,e,a,o,d;if((t=this.detailsRef)===null||t===void 0?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t){const c=t.getAttribute("type")==="checkbox"||t.getAttribute("type")==="radio";if(c){const c=t===null||t===void 0?void 0:t.closest("li");if(i.key==="ArrowDown"||i.key==="ArrowRight"){if(c===null||c===void 0?void 0:c.nextElementSibling){(h=(s=c===null||c===void 0?void 0:c.nextElementSibling)===null||s===void 0?void 0:s.querySelector("input"))===null||h===void 0?void 0:h.focus()}else{this.handleFocusFirstDropdownCheckbox(t)}}else{if(c===null||c===void 0?void 0:c.previousElementSibling){(a=(e=c===null||c===void 0?void 0:c.previousElementSibling)===null||e===void 0?void 0:e.querySelector("input"))===null||a===void 0?void 0:a.focus()}else if(this.detailsRef.querySelector(`input[type="checkbox"]`)!==t){this.handleFocusFirstDropdownCheckbox(t)}else{const i=n(this.detailsRef);if(i){l((()=>{i.focus()}),100)}else{const i=Array.from((o=this.detailsRef)===null||o===void 0?void 0:o.querySelectorAll(`input[type="checkbox"],input[type="radio"]`));if(i.length){(d=i.at(-1))===null||d===void 0?void 0:d.focus()}}}}}else{if(t.getAttribute("type")==="search"&&(i.key==="ArrowUp"||i.key==="ArrowLeft")){this.handleClose("close");this.handleSummaryFocus()}else{this.handleFocusFirstDropdownCheckbox(t)}}}}}else if(i.key==="ArrowDown"||i.key==="ArrowRight"){this.handleAutoPlacement();if(this.detailsRef){this.detailsRef.open=true}this.handleOpenByKeyboardFocus()}i.stopPropagation();i.preventDefault()}handleKeyboardPress(i){var t;i.stopPropagation();if(i.key==="Escape"&&((t=this.detailsRef)===null||t===void 0?void 0:t.open)){this.handleClose("close");this.handleSummaryFocus()}else if(i.key==="ArrowDown"||i.key==="ArrowUp"||i.key==="ArrowLeft"||i.key==="ArrowRight"){this.handleArrowDownUp(i)}}handleClose(i){if(this.detailsRef){if(i==="close"){this.detailsRef.open=false;this.handleSummaryFocus()}else if(this.detailsRef.open&&(i===null||i===void 0?void 0:i.relatedTarget)){const t=i.relatedTarget;if(!this.detailsRef.contains(t)){l((()=>this.detailsRef.open=false),1)}}}}handleDocumentClose(i){var t,s;if(i){const h=typeof i.detail==="number"?i.target:(t=i.detail)===null||t===void 0?void 0:t.target;if(((s=this.detailsRef)===null||s===void 0?void 0:s.open)&&!this.detailsRef.contains(h)){this.detailsRef.open=false}}}handleOptionSelected(i){const t=(new Date).getTime()-this._internalChangeTimestamp<200;if(t)return;this._values=i;if(this.optionSelected){this.optionSelected.emit(i!==null&&i!==void 0?i:[])}this._internalChangeTimestamp=(new Date).getTime()}handleSelect(i){var t;if(i){if(this.multiple){if((t=this._values)===null||t===void 0?void 0:t.includes(i)){this.handleOptionSelected(this._values.filter((t=>t!==i)))}else{this.handleOptionSelected([...this._values||[],i])}}else{this.handleOptionSelected([i]);this.handleClose("close")}}}handleSelectAll(i){var t;i.stopPropagation();if(((t=this._values)===null||t===void 0?void 0:t.length)===this.amountOptions){this.handleOptionSelected([])}else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:undefined;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||((s=t.value)===null||s===void 0?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return(t=i.value)!==null&&t!==void 0?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll(`input[type="checkbox"],input[type="radio"]`));if(t.length){const s=t.at(0);const h=s===i&&t.length>1?t.at(1):s;if(h){l((()=>{h.focus()}),1)}}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=n(this.detailsRef);if(i){l((()=>{i.focus()}),1)}else{this.handleFocusFirstDropdownCheckbox()}}}handleSearch(i){let t;if(typeof i==="string"){t=i}else{i.stopPropagation();if(this.search){this.search.emit(i)}t=i.target.value;this._searchValue=t}if(!this.options||!t||t.length===0){this._options=this.options}else if(this.searchFilter){this._options=this.options.filter((i=>this.searchFilter(i,t)))}else{this._options=this.options.filter((i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(t.toLowerCase())))}}handleClearAll(i){i.stopPropagation();this.handleOptionSelected([]);this.handleSummaryFocus()}handleSummaryFocus(){var i;if(this.detailsRef){(i=this.detailsRef.querySelector("summary"))===null||i===void 0?void 0:i.focus()}}enableAttributePassing(i,t){const s=i===null||i===void 0?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const e=t.item(h);if(e&&(e.name.startsWith("data-")||e.name.startsWith("aria-"))){i.setAttribute(e.name,e.value);s.removeAttribute(e.name)}if(e&&e.name==="class"){const t=e.value.includes("hydrated");const h=e.value.replace("hydrated","").trim();const l=i.getAttribute("class");i.setAttribute(e.name,`${l?`${l} `:""}${h}`);if(t){s.setAttribute("class","hydrated")}else{s.removeAttribute(e.name)}}}}}watch0Fn(){if(this.detailsRef){this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}}watch0(){this.watch0Fn()}watch1Fn(){if(this._id){const i=this._id+A;this._labelId=this._id+b;this._selectId=this._id+m;this._validMessageId=this._id+p;this._invalidMessageId=this._id+y;this._placeholderId=this._id+g;if(a(this.message,this.showMessage)){this.setDescById(i)}else{this.setDescById()}}}watch1(){this.watch1Fn()}watch2Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");if(t){t.setAttribute("aria-describedby",(i=this.ariaDescribedBy)!==null&&i!==void 0?i:this._descByIds||"")}}}watch2(){this.watch2Fn()}watch3Fn(){if(this.showNoResults!==undefined){this._hasNoOptions=this.showNoResults}else if(this._options){this._hasNoOptions=this._options.length===0}}watch3(){this.watch3Fn()}watch4Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&((i=this.showSelectAll)!==null&&i!==void 0?i:this.amountOptions>5))}watch4(){this.watch4Fn()}watch5Fn(){var i;this.searchEnabled=(i=this.showSearch)!==null&&i!==void 0?i:this.amountOptions>9}watch5(){this.watch5Fn()}watch6Fn(){var i;if(this.values&&Array.isArray(this.values)&&this.values!==this._values){this._values=(i=this.values)!==null&&i!==void 0?i:[]}}watch6(){this.watch6Fn()}watch7Fn(){this.handleValidation()}watch7(){this.watch7Fn()}watch8Fn(){this._validity=this.validation}watch8(){this.watch8Fn()}watch9Fn(){var i,t;if(((i=this._values)===null||i===void 0?void 0:i.length)===0){this.selectAllChecked=false;this.selectAllIndeterminate=false}else if(((t=this._values)===null||t===void 0?void 0:t.length)===this.amountOptions){this.selectAllIndeterminate=false;this.selectAllChecked=true}else if(this._values){this.selectAllIndeterminate=true}}watch9(){this.watch9Fn()}watch10Fn(){var i,t;this._options=this.options;this.amountOptions=(t=(i=this.options)===null||i===void 0?void 0:i.filter((i=>!i.isGroupTitle)).length)!==null&&t!==void 0?t:0}watch10(){this.watch10Fn()}watch11Fn(){this._searchValue=this.searchValue;if(this.searchValue){const i=this.searchValue;this.handleSearch(i)}}watch11(){this.watch11Fn()}watch12Fn(){var i,t;if((i=this.options)===null||i===void 0?void 0:i.length){this._selectedOptions=(t=this.options)===null||t===void 0?void 0:t.filter((i=>{var t,s;if(!i.value||!((t=this._values)===null||t===void 0?void 0:t["includes"])){return false}return!i.isGroupTitle&&((s=this._values)===null||s===void 0?void 0:s.includes(i.value))}))}}watch12(){this.watch12Fn()}watch13Fn(){var i,t,s;if(this.selectedLabels){this._selectedLabels=this.selectedLabels;return}if((i=this._selectedOptions)===null||i===void 0?void 0:i.length){if(this.transformSelectedLabels){const i=this._selectedOptions;const t=this.transformSelectedLabels;this._selectedLabels=t(i);return}if(this.selectedType==="amount"){this._selectedLabels=this.amountText?this.amountText:`${(t=this._selectedOptions)===null||t===void 0?void 0:t.length} ${k}`}else{this._selectedLabels=(s=this._selectedOptions)===null||s===void 0?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}}else{this._selectedLabels=""}}watch13(){this.watch13Fn()}watch14Fn(){var i,t;if(this.amountChange){this.amountChange.emit((t=(i=this._selectedOptions)===null||i===void 0?void 0:i.length)!==null&&t!==void 0?t:0)}}watch14(){this.watch14Fn()}watch15Fn(){if(this.selectAllRef){this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate)}}watch15(){this.watch15Fn()}watch16Fn(){var i;this._invalidMessage=this.invalidMessage||((i=this.selectRef)===null||i===void 0?void 0:i.validationMessage)||v}watch16(){this.watch16Fn()}componentDidLoad(){var i;this.enableAttributePassing(this._ref,"db-custom-select");const t=(i=this.id)!==null&&i!==void 0?i:`custom-select-${o()}`;this._id=t;this._messageId=t+A;this._validMessageId=t+p;this._invalidMessageId=t+y;this._selectId=t+m;this._labelId=t+b;this._summaryId=t+"-summary";this._placeholderId=t+g;this._selectedLabelsId=t+"-selected-labels";this._infoTextId=t+"-info";this._invalidMessage=this.invalidMessage||v;if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));if(t&&!t.isIntersecting&&this.detailsRef.open){this.detailsRef.open=false}}}))}this.watch0Fn();this.watch1Fn();this.watch2Fn();this.watch3Fn();this.watch4Fn();this.watch5Fn();this.watch6Fn();this.watch7Fn();this.watch8Fn();this.watch9Fn();this.watch10Fn();this.watch11Fn();this.watch12Fn();this.watch13Fn();this.watch14Fn();this.watch15Fn();this.watch16Fn()}render(){var i,t,e,l,n,o,v,w,b,m,p,y,g,k,A;return s("div",{key:"e7b8902a3381240fcfe7ca2e85f66e582f7cb284",class:r("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":this._validity==="invalid","data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":this.variant==="floating"&&this.selectedType==="tag"&&this.multiple?"above":this.variant,"data-required":d(this.required),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":u(this.showLabel),"data-icon":this.icon,"data-hide-icon":u(this.showIcon)},s("label",{key:"f740293d426b6a69fc2516cc469b2510b851c9ef",id:this._labelId},(i=this.label)!==null&&i!==void 0?i:f,s("select",{key:"26f0299bdbbbf5b2593729e40cdbb724ba9224ba",role:"none",hidden:true,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,multiple:c(this.multiple,"multiple"),disabled:c(this.disabled,"disabled"),required:c(this.required,"required"),onChange:i=>this.satisfyReact(i)},((t=this.options)===null||t===void 0?void 0:t.length)?(e=this.options)===null||e===void 0?void 0:e.map((i=>s("option",{disabled:i.disabled,value:i.value,key:undefined},this.getOptionLabel(i)))):null)),s("details",{key:"71956c98be403be038dbdabc4390aa09eabc8c22",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"5b3c566401a64350434dcb2b7f71eba5c08803d0"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":d(this.disabled),"aria-labelledby":this._labelId},((l=this._selectedLabels)===null||l===void 0?void 0:l.length)?s("span",{"data-visually-hidden":d(this.selectedType==="tag"),id:this._selectedLabelsId},this._selectedLabels):null,this.selectedType==="tag"?s("div",null,(n=this._selectedOptions)===null||n===void 0?void 0:n.map(((i,t)=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(t),onRemove:t=>this.handleTagRemove(i,t),key:undefined},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:false,value:this._searchValue,label:(o=this.searchLabel)!==null&&o!==void 0?o:f,placeholder:(v=this.searchPlaceholder)!==null&&v!==void 0?v:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:undefined,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this._hasNoOptions?undefined:"circular_arrows",semantic:this._hasNoOptions?"warning":"informational"},(w=this._hasNoOptions?this.noResultsText:this.loadingText)!==null&&w!==void 0?w:D):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:c(this.multiple,"multiple"),label:(m=(b=this.ariaListLabel)!==null&&b!==void 0?b:this.label)!==null&&m!==void 0?m:f},(p=this._options)===null||p===void 0?void 0:p.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:undefined},!i.isGroupTitle?this.getOptionLabel(i):null))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose("close")},(y=this.mobileCloseButtonText)!==null&&y!==void 0?y:x)))):null),((g=this.showClearSelection)!==null&&g!==void 0?g:true)&&((k=this._values)===null||k===void 0?void 0:k.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:true,name:this._id,form:this._id,onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"1e6a1cd3d2da5ea7484309d10e1c9e7da31e1043","aria-hidden":d(true),id:this._placeholderId},(A=this.placeholder)!==null&&A!==void 0?A:this.label),a(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||F):null,s("db-infotext",{key:"4151b595eadab3814592ead50a73be825bae2d28",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"48364689d98dc1c25f70ec982de3e5a7505c1594","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{detailsRef:["watch0","watch2"],_id:["watch1"],_descByIds:["watch2"],showNoResults:["watch3"],_options:["watch3"],showSelectAll:["watch4"],amountOptions:["watch4","watch5","watch9"],multiple:["watch4"],showSearch:["watch5"],values:["watch6"],_values:["watch7","watch9","watch12"],validation:["watch8"],options:["watch10","watch12"],searchValue:["watch11"],_selectedOptions:["watch13","watch14"],selectedType:["watch13"],amountText:["watch13"],selectedLabels:["watch13"],transformSelectedLabels:["watch13"],selectAllIndeterminate:["watch15"],selectAllRef:["watch15"],selectRef:["watch16"],invalidMessage:["watch16"]}}};export{T as db_custom_select};
2
+ //# sourceMappingURL=p-02e09419.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as a,h as d}from"./p-Ctmm4hMW.js";import{a as c,u as t,b as i,c as s}from"./p-BgQRUWMZ.js";import{D as n,p as r}from"./p-DC9V_oNU.js";import{i as o}from"./p-BDA9dlfd.js";import"./p-DYeQU2bY.js";const b=class{constructor(d){e(this,d);this.toggle=a(this,"toggle");this._id=n;this.initialized=false;this.forcedToMobile=false}handleToggle(e){if(e&&e.stopPropagation){e.stopPropagation()}const a=!i(this.drawerOpen,"drawerOpen");if(this.toggle){this.toggle.emit(a)}}handleNavigationItemClick(e){if(o(e)){this.handleToggle()}}enableAttributePassing(e,a){const d=e===null||e===void 0?void 0:e.closest(a);if(e&&d){const a=d.attributes;for(let c=0;c<a.length;c++){const t=a.item(c);if(t&&(t.name.startsWith("data-")||t.name.startsWith("aria-"))){e.setAttribute(t.name,t.value);d.removeAttribute(t.name)}if(t&&t.name==="class"){const a=t.value.includes("hydrated");const c=t.value.replace("hydrated","").trim();const i=e.getAttribute("class");e.setAttribute(t.name,`${i?`${i} `:""}${c}`);if(a){d.setAttribute("class","hydrated")}else{d.removeAttribute(t.name)}}}}}watch0Fn(){var e;if(this.initialized&&document&&this._id&&this.forceMobile){const a=document.getElementById((e=this._id)!==null&&e!==void 0?e:"");if(a){c(a,{key:"data-force-mobile",value:"true"})}this.forcedToMobile=true}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-header");this.initialized=true;this._id=this.id||"header-"+t();this.watch0Fn()}render(){var e;return d("header",{key:"e3c481e7cc59c48f98050d9b014e8912fdcace6d",class:s("db-header",this.className),ref:e=>{this._ref=e},id:this._id,"data-width":this.width,"data-on-forcing-mobile":this.forceMobile&&!this.forcedToMobile},d("db-drawer",{key:"851d96ddee466b650fac5e2aa8619004f3792d6d",class:"db-header-drawer",spacing:"small",rounded:true,open:i(this.drawerOpen),onClose:()=>this.handleToggle()},d("div",{key:"4a63f5d6b730ad4b7c5b5469aead1c791901e08d",class:"db-header-drawer-navigation"},d("div",{key:"f3a375f07fcc688fe01e751d14965479d8b0fd67",class:"db-header-navigation",onClick:e=>this.handleNavigationItemClick(e)},d("slot",{key:"8c0cc3b4f76622ec4bb3263417a5710044ff54c1"})),d("div",{key:"538eeec5b946d3b5de1cfc3c5dcf0aac0f1cae3f",class:"db-header-meta-navigation"},d("slot",{key:"fe5b29b17211c6f3458905dab5e0ac6c308ea1c8",name:"metaNavigation"}))),d("div",{key:"9d76492f991335066736205049078e137f683c25",class:"db-header-secondary-action"},d("slot",{key:"ae9e157bd16957d985f217d697d46473b94aacc3",name:"secondaryAction"}))),d("div",{key:"685e4f7dfedbeb5663e7932a75328897120f23d1",class:"db-header-meta-navigation"},d("slot",{key:"19ddfa552eed45eda8eb54b6197a17170f8fbe96",name:"metaNavigation"})),d("div",{key:"6f2d87a054372575d5a35d9975d276b09c910b6e",class:"db-header-navigation-bar"},d("div",{key:"1a95b153905575dd73b46408dfc6fe09a3fef480",class:"db-header-brand-container"},d("slot",{key:"eb589d84bda0b1a6e857cb01df058339e98a916a",name:"brand"})),d("div",{key:"195c03a6ae54881ec6e0065cc605bd89d6200846",class:"db-header-navigation-container"},d("div",{key:"b9e2ec192cdc908b77dc036addf85d81146ae89e",class:"db-header-navigation"},d("slot",{key:"921233eebceac68fcda24a70f4a218c9d588daac"})),d("div",{key:"6cb58fe0e628b7549f0d70858bc7a382cd3a087d",class:"db-header-primary-action"},d("slot",{key:"700428f9997edd91647b91e28174f2a7516ab7dc",name:"primaryAction"}))),d("div",{key:"3ca4479d6c5142418ec1878e9d0b5f01d5e4303a",class:"db-header-action-container"},d("div",{key:"19c73cd038ed9be869ecfc80bb9c6f7a66e9b9b0",class:"db-header-burger-menu-container"},d("db-button",{key:"53cb57495f1e215630a5529040492dfff7709a62",icon:"menu",variant:"ghost",id:this._id+"-burger-menu",noText:true,onClick:()=>this.handleToggle()},(e=this.burgerMenuLabel)!==null&&e!==void 0?e:r)),d("div",{key:"76a7166387cdfdb4fb962339af640896fc26e6ae",class:"db-header-secondary-action"},d("slot",{key:"77c898741eccdd11f5c5783537f5b5316e18f163",name:"secondaryAction"})))))}static get watchers(){return{initialized:["watch0"]}}};export{b as db_header};
2
- //# sourceMappingURL=p-695bf91e.entry.js.map
1
+ import{r as e,c as a,h as d}from"./p-Ctmm4hMW.js";import{a as c,u as t,b as i,c as s}from"./p-BgQRUWMZ.js";import{D as n,p as r}from"./p-DC9V_oNU.js";import{i as o}from"./p-BFvCp0MI.js";import"./p-BLKCMo7A.js";const b=class{constructor(d){e(this,d);this.toggle=a(this,"toggle");this._id=n;this.initialized=false;this.forcedToMobile=false}handleToggle(e){if(e&&e.stopPropagation){e.stopPropagation()}const a=!i(this.drawerOpen,"drawerOpen");if(this.toggle){this.toggle.emit(a)}}handleNavigationItemClick(e){if(o(e)){this.handleToggle()}}enableAttributePassing(e,a){const d=e===null||e===void 0?void 0:e.closest(a);if(e&&d){const a=d.attributes;for(let c=0;c<a.length;c++){const t=a.item(c);if(t&&(t.name.startsWith("data-")||t.name.startsWith("aria-"))){e.setAttribute(t.name,t.value);d.removeAttribute(t.name)}if(t&&t.name==="class"){const a=t.value.includes("hydrated");const c=t.value.replace("hydrated","").trim();const i=e.getAttribute("class");e.setAttribute(t.name,`${i?`${i} `:""}${c}`);if(a){d.setAttribute("class","hydrated")}else{d.removeAttribute(t.name)}}}}}watch0Fn(){var e;if(this.initialized&&document&&this._id&&this.forceMobile){const a=document.getElementById((e=this._id)!==null&&e!==void 0?e:"");if(a){c(a,{key:"data-force-mobile",value:"true"})}this.forcedToMobile=true}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-header");this.initialized=true;this._id=this.id||"header-"+t();this.watch0Fn()}render(){var e;return d("header",{key:"e3c481e7cc59c48f98050d9b014e8912fdcace6d",class:s("db-header",this.className),ref:e=>{this._ref=e},id:this._id,"data-width":this.width,"data-on-forcing-mobile":this.forceMobile&&!this.forcedToMobile},d("db-drawer",{key:"851d96ddee466b650fac5e2aa8619004f3792d6d",class:"db-header-drawer",spacing:"small",rounded:true,open:i(this.drawerOpen),onClose:()=>this.handleToggle()},d("div",{key:"4a63f5d6b730ad4b7c5b5469aead1c791901e08d",class:"db-header-drawer-navigation"},d("div",{key:"f3a375f07fcc688fe01e751d14965479d8b0fd67",class:"db-header-navigation",onClick:e=>this.handleNavigationItemClick(e)},d("slot",{key:"8c0cc3b4f76622ec4bb3263417a5710044ff54c1"})),d("div",{key:"538eeec5b946d3b5de1cfc3c5dcf0aac0f1cae3f",class:"db-header-meta-navigation"},d("slot",{key:"fe5b29b17211c6f3458905dab5e0ac6c308ea1c8",name:"metaNavigation"}))),d("div",{key:"9d76492f991335066736205049078e137f683c25",class:"db-header-secondary-action"},d("slot",{key:"ae9e157bd16957d985f217d697d46473b94aacc3",name:"secondaryAction"}))),d("div",{key:"685e4f7dfedbeb5663e7932a75328897120f23d1",class:"db-header-meta-navigation"},d("slot",{key:"19ddfa552eed45eda8eb54b6197a17170f8fbe96",name:"metaNavigation"})),d("div",{key:"6f2d87a054372575d5a35d9975d276b09c910b6e",class:"db-header-navigation-bar"},d("div",{key:"1a95b153905575dd73b46408dfc6fe09a3fef480",class:"db-header-brand-container"},d("slot",{key:"eb589d84bda0b1a6e857cb01df058339e98a916a",name:"brand"})),d("div",{key:"195c03a6ae54881ec6e0065cc605bd89d6200846",class:"db-header-navigation-container"},d("div",{key:"b9e2ec192cdc908b77dc036addf85d81146ae89e",class:"db-header-navigation"},d("slot",{key:"921233eebceac68fcda24a70f4a218c9d588daac"})),d("div",{key:"6cb58fe0e628b7549f0d70858bc7a382cd3a087d",class:"db-header-primary-action"},d("slot",{key:"700428f9997edd91647b91e28174f2a7516ab7dc",name:"primaryAction"}))),d("div",{key:"3ca4479d6c5142418ec1878e9d0b5f01d5e4303a",class:"db-header-action-container"},d("div",{key:"19c73cd038ed9be869ecfc80bb9c6f7a66e9b9b0",class:"db-header-burger-menu-container"},d("db-button",{key:"53cb57495f1e215630a5529040492dfff7709a62",icon:"menu",variant:"ghost",id:this._id+"-burger-menu",noText:true,onClick:()=>this.handleToggle()},(e=this.burgerMenuLabel)!==null&&e!==void 0?e:r)),d("div",{key:"76a7166387cdfdb4fb962339af640896fc26e6ae",class:"db-header-secondary-action"},d("slot",{key:"77c898741eccdd11f5c5783537f5b5316e18f163",name:"secondaryAction"})))))}static get watchers(){return{initialized:["watch0"]}}};export{b as db_header};
2
+ //# sourceMappingURL=p-34d4f584.entry.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./p-DYeQU2bY.js";const i=t=>{var i,s;const{target:n}=t;return Boolean(!((i=n===null||n===void 0?void 0:n.classList)===null||i===void 0?void 0:i.contains("db-navigation-item-expand-button"))&&((s=n===null||n===void 0?void 0:n.parentElement)===null||s===void 0?void 0:s.classList.contains("db-navigation-item")))};class s{constructor(t,i){var s;this.parentSubNavigation=null;this.initialized=false;this.mouseX=0;this.mouseY=0;this.element=t;this.subNavigation=i;if(!this.element||!this.subNavigation){return}this.parentSubNavigation=(s=this.element)===null||s===void 0?void 0:s.closest(".db-sub-navigation");if(this.parentSubNavigation&&!this.element.closest(".db-drawer")){this.init()}}init(){var t,i,s;const n=(i=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&i!==void 0?i:0;(s=this.element)===null||s===void 0?void 0:s.style.setProperty("--db-navigation-item-inline-size",`${n}px`);this.initialized=true}enableFollow(){var i,s;if(!this.initialized||this.triangleData||!this.element||!this.subNavigation){return}const n=t(this.subNavigation);const h=this.element.getBoundingClientRect();const e=(s=(i=this.parentSubNavigation)===null||i===void 0?void 0:i.getBoundingClientRect().width)!==null&&s!==void 0?s:0;this.triangleData={itemRect:h,parentElementWidth:e,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(e-h.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=undefined}getTriangleTipX(){if(!this.triangleData)return 0;if(this.triangleData.outsideVX==="right"){return this.triangleData.itemRect.width-this.mouseX}return Math.min(this.mouseX,this.triangleData.itemRect.width*.75)}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;if(this.triangleData.outsideVY==="bottom"){return t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height)}return t}hasMouseEnteredSubNavigation(){if(!this.triangleData){return false}const t=this.triangleData.outsideVX==="right";if(t&&this.mouseX<-1*this.triangleData.padding){return true}if(!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding){return true}return false}getTriangleCoordinates(t){if(!this.triangleData){return}if(t==="fill-gap"){const t=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`;const i=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${i} ${t}`,lt:`${i} 0`,rt:"100% 0",rb:`100% ${t}`}}const i=this.getTriangleTipX();const s=this.getTriangleTipY();const n=`${i}px ${s}px`;const h=`${i}px ${s}px`;return{lb:n,lt:h,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData||!this.element||!this.subNavigation){return}this.mouseX=t.clientX-this.triangleData.itemRect.left;this.mouseY=t.clientY-this.triangleData.itemRect.top;const i=this.hasMouseEnteredSubNavigation();const s=this.getTriangleCoordinates(i?"fill-gap":"safe-triangle");if(!s){return}this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${s.lb}, ${s.lt}, ${s.rt}, ${s.rb})`);if(i){this.triangleData=undefined}}}export{s as N,i};
2
- //# sourceMappingURL=p-BDA9dlfd.js.map
1
+ import{a as t}from"./p-BLKCMo7A.js";const i=t=>{var i,s;const{target:n}=t;return Boolean(!((i=n===null||n===void 0?void 0:n.classList)===null||i===void 0?void 0:i.contains("db-navigation-item-expand-button"))&&((s=n===null||n===void 0?void 0:n.parentElement)===null||s===void 0?void 0:s.classList.contains("db-navigation-item")))};class s{constructor(t,i){var s;this.parentSubNavigation=null;this.initialized=false;this.mouseX=0;this.mouseY=0;this.element=t;this.subNavigation=i;if(!this.element||!this.subNavigation){return}this.parentSubNavigation=(s=this.element)===null||s===void 0?void 0:s.closest(".db-sub-navigation");if(this.parentSubNavigation&&!this.element.closest(".db-drawer")){this.init()}}init(){var t,i,s;const n=(i=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&i!==void 0?i:0;(s=this.element)===null||s===void 0?void 0:s.style.setProperty("--db-navigation-item-inline-size",`${n}px`);this.initialized=true}enableFollow(){var i,s;if(!this.initialized||this.triangleData||!this.element||!this.subNavigation){return}const n=t(this.subNavigation);const h=this.element.getBoundingClientRect();const o=(s=(i=this.parentSubNavigation)===null||i===void 0?void 0:i.getBoundingClientRect().width)!==null&&s!==void 0?s:0;this.triangleData={itemRect:h,parentElementWidth:o,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(o-h.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=undefined}getTriangleTipX(){if(!this.triangleData)return 0;if(this.triangleData.outsideVX==="right"){return this.triangleData.itemRect.width-this.mouseX}return Math.min(this.mouseX,this.triangleData.itemRect.width*.75)}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;if(this.triangleData.outsideVY==="bottom"){return t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height)}return t}hasMouseEnteredSubNavigation(){if(!this.triangleData){return false}const t=this.triangleData.outsideVX==="right";if(t&&this.mouseX<-1*this.triangleData.padding){return true}if(!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding){return true}return false}getTriangleCoordinates(t){if(!this.triangleData){return}if(t==="fill-gap"){const t=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`;const i=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${i} ${t}`,lt:`${i} 0`,rt:"100% 0",rb:`100% ${t}`}}const i=this.getTriangleTipX();const s=this.getTriangleTipY();const n=`${i}px ${s}px`;const h=`${i}px ${s}px`;return{lb:n,lt:h,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData||!this.element||!this.subNavigation){return}this.mouseX=t.clientX-this.triangleData.itemRect.left;this.mouseY=t.clientY-this.triangleData.itemRect.top;const i=this.hasMouseEnteredSubNavigation();const s=this.getTriangleCoordinates(i?"fill-gap":"safe-triangle");if(!s){return}this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${s.lb}, ${s.lt}, ${s.rt}, ${s.rb})`);if(i){this.triangleData=undefined}}}export{s as N,i};
2
+ //# sourceMappingURL=p-BFvCp0MI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-BDA9dlfd.js","sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './floating-components';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = event as {\n target: HTMLElement;\n };\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: HTMLElement | null;\n private readonly parentSubNavigation: HTMLElement | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: HTMLElement | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"],"names":[],"mappings":";;AASa,MAAA,2BAA2B,GAAG,CAAC,KAAc,KAAa;;AACrE,IAAA,MAAM,EACJ,MAAM,EACP,GAAG,KAEH;AACD,IAAA,OAAO,OAAO,CAAC,EAAC,CAAA,EAAA,GAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,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IAAI,CAAC,aAAa,EAAE;YACnF;;AAEF,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI;AAC7D,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG;AAC5D,QAAA,MAAM,mBAAmB,GAAG,IAAI,CAAC,4BAA4B,EAAE;AAC/D,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,GAAG,UAAU,GAAG,eAAe,CAAC;QACnG,IAAI,CAAC,WAAW,EAAE;YAChB;;QAEF,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,CAAW,QAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAG,CAAA,CAAA,CAAC;QACvJ,IAAI,mBAAmB,EAAE;AACvB,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;;AAGlC;;;;"}
1
+ {"version":3,"file":"p-BFvCp0MI.js","sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './floating-components';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = event as {\n target: HTMLElement;\n };\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: HTMLElement | null;\n private readonly parentSubNavigation: HTMLElement | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: HTMLElement | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationIt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AAO;YACL,EAAE;YACF,EAAE;AACF,YAAA,EAAE,EAAE,QAAQ;AACZ,YAAA,EAAE,EAAE;SACL;;AAEI,IAAA,kBAAkB,CAAC,KAAiB,EAAA;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACnF;;AAEF,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI;AAC7D,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG;AAC5D,QAAA,MAAM,mBAAmB,GAAG,IAAI,CAAC,4BAA4B,EAAE;AAC/D,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,GAAG,UAAU,GAAG,eAAe,CAAC;QACnG,IAAI,CAAC,WAAW,EAAE;YAChB;;QAEF,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,CAAW,QAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAG,CAAA,CAAA,CAAC;QACvJ,IAAI,mBAAmB,EAAE;AACvB,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;;AAGlC;;;;"}
@@ -0,0 +1,2 @@
1
+ const t=t=>{var e;const{top:o,bottom:i,left:l,right:n}=t.getBoundingClientRect();const{innerHeight:s,innerWidth:f}=window;let d=o<0;let r=i>s;let c=l<0;let h=n>f;const p=t.dataset["outsideVy"];const a=t.dataset["outsideVx"];const g=(e=t===null||t===void 0?void 0:t.parentElement)===null||e===void 0?void 0:e.getBoundingClientRect();if(g){if(p){const e=t.dataset["outsideVy"];if(e==="top"){d=g.top-(i-g.bottom)<0}else{r=g.bottom+(g.top-o)>s}}if(a){const e=t.dataset["outsideVx"];if(e==="left"){c=g.left-(n-g.right)<0}else{h=g.right+(g.left-l)>f}}}return{outTop:d,outBottom:r,outLeft:c,outRight:h}};const e=e=>{const{outTop:o,outBottom:i,outLeft:l,outRight:n}=t(e);let s={};if(o||i){s={vy:o?"top":"bottom"};e.dataset["outsideVy"]=s.vy}else{delete e.dataset["outsideVy"]}if(l||n){s=Object.assign(Object.assign({},s),{vx:n?"right":"left"});e.dataset["outsideVx"]=s.vx}else{delete e.dataset["outsideVx"]}return s};const o=(t,e,o)=>{if(getComputedStyle(t).zIndex==="9999")return;const{top:l,bottom:n,childHeight:s,childWidth:f,width:d,right:r,left:c,correctedPlacement:h}=i(t,e,o);const p=t.dataset["width"]==="full";if(p){t.style.inlineSize=`${d}px`}if(h==="top"||h==="bottom"||h==="top-start"||h==="bottom-start"){t.style.insetInlineStart=`${c}px`}else if(h==="top-end"||h==="bottom-end"){t.style.insetInlineStart=`${r-f}px`}if(h===null||h===void 0?void 0:h.startsWith("top")){t.style.insetBlockStart=`${l-s}px`}else if(h===null||h===void 0?void 0:h.startsWith("bottom")){t.style.insetBlockStart=`${n}px`}t.style.position="fixed"};const i=(t,e,o)=>{if(!t||!e){return{top:0,bottom:0,right:0,height:0,width:0,left:0,childHeight:0,childWidth:0,correctedPlacement:o,innerWidth:window.innerWidth,innerHeight:window.innerHeight}}const i=t.getBoundingClientRect();const{top:l,height:n,bottom:s,right:f,left:d,width:r}=e.getBoundingClientRect();const{innerHeight:c,innerWidth:h}=window;let p=i.height;let a=i.width;if(o==="bottom"||o==="top"){a=a/2}if(o==="left"||o==="right"){p=p/2}const g=s+p>c;const b=l-p<0;const m=d-a<0;const $=f+a>h;let v=o;if(o.startsWith("bottom")){if(g){v=o===null||o===void 0?void 0:o.replace("bottom","top");if(m&&$){v="top"}else if(m){v="top-start"}else if($){v="top-end"}}else{if(m&&$){v="bottom"}else if(m){v="bottom-start"}else if($){v="bottom-end"}}}else if(o.startsWith("top")){if(b){v=o===null||o===void 0?void 0:o.replace("top","bottom");if(m&&$){v="bottom"}else if(m){v="bottom-start"}else if($){v="bottom-end"}}else{if(m&&$){v="top"}else if(m){v="top-start"}else if($){v="top-end"}}}else if(o.startsWith("left")){if(m){v=o===null||o===void 0?void 0:o.replace("left","right");if(g&&b){v="right"}else if(g){v="right-end"}else if(b){v="right-start"}}else{if(g&&b){v="left"}else if(g){v="left-end"}else if(b){v="left-start"}}}else if(v.startsWith("right")){if($){v=o===null||o===void 0?void 0:o.replace("right","left");if(g&&b){v="left"}else if(g){v="left-end"}else if(b){v="left-start"}}else{if(g&&b){v="right"}else if(g){v="right-end"}else if(b){v="right-start"}}}return{top:l,bottom:s,right:f,height:n,width:r,left:d,childHeight:i.height,childWidth:i.width,correctedPlacement:v,innerWidth:h,innerHeight:c}};const l=(t,e,o)=>{var l;const n=(l=getComputedStyle(t).getPropertyValue("--db-popover-distance"))!==null&&l!==void 0?l:"0px";const{top:s,height:f,width:d,childHeight:r,childWidth:c,right:h,left:p,bottom:a,correctedPlacement:g,innerWidth:b,innerHeight:m}=i(t,e,o);if(c>d&&(g.startsWith("bottom")||g.startsWith("top"))){const e=d/2/c*100;if(g.endsWith("start")){t.style.setProperty("--db-tooltip-arrow-inline-start",`${e}%`)}else if(g.endsWith("end")){t.style.setProperty("--db-tooltip-arrow-inline-start",`${100-e}%`)}}if(r>f&&(g.startsWith("left")||g.startsWith("bottom"))){const e=f/2/r*100;if(g.endsWith("start")){t.style.setProperty("--db-tooltip-arrow-block-start",`${e}%`)}else if(g.endsWith("end")){t.style.setProperty("--db-tooltip-arrow-block-start",`${100-e}%`)}}if(g==="right"||g==="left"){t.style.insetBlockStart=`${s+f/2}px`}else if(g==="right-start"||g==="left-start"){const e=s+r;t.style.insetBlockStart=`${s}px`;t.style.insetBlockEnd=`${e>m?m:e}px`}else if(g==="right-end"||g==="left-end"){const e=a-r;t.style.insetBlockStart=`${e<0?0:e}px`;t.style.insetBlockEnd=`${a}px`}else if(g==="top"||g==="bottom"){t.style.insetInlineStart=`${p+d/2}px`}else if(g==="top-start"||g==="bottom-start"){const e=p+c;t.style.insetInlineStart=`${p}px`;t.style.insetInlineEnd=`${e>b?b:e}px`}else if(g==="top-end"||g==="bottom-end"){const e=p-c;t.style.insetInlineStart=`${h-c}px`;t.style.insetInlineEnd=`${e<0?0:e}px`}if(g===null||g===void 0?void 0:g.startsWith("right")){const e=h+c;t.style.insetInlineStart=`calc(${h}px + ${n})`;t.style.insetInlineEnd=`calc(${e>b?b:e}px + ${n})`}else if(g===null||g===void 0?void 0:g.startsWith("left")){const e=p-c;t.style.insetInlineStart=`calc(${e<0?0:e}px - ${n})`;t.style.insetInlineEnd=`calc(${h}px - ${n})`}else if(g===null||g===void 0?void 0:g.startsWith("top")){const e=s-r;t.style.insetBlockStart=`calc(${e<0?0:e}px - ${n})`;t.style.insetBlockEnd=`calc(${a}px - ${n})`}else if(g===null||g===void 0?void 0:g.startsWith("bottom")){const e=a+r;t.style.insetBlockStart=`calc(${a}px + ${n})`;t.style.insetBlockEnd=`calc(${e>m?m:e}px + ${n})`}t.style.position="fixed";t.setAttribute("data-corrected-placement",g)};export{e as a,l as b,o as h};
2
+ //# sourceMappingURL=p-BLKCMo7A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-BLKCMo7A.js","sources":["src/utils/floating-components.ts"],"sourcesContent":["// TODO: We should reevaluate this as soon as CSS Anchor Positioning is supported in all relevant browsers\nconst isInView = (el: HTMLElement) => {\n const {\n top,\n bottom,\n left,\n right\n } = el.getBoundingClientRect();\n const {\n innerHeight,\n innerWidth\n } = window;\n let outTop = top < 0;\n let outBottom = bottom > innerHeight;\n let outLeft = left < 0;\n let outRight = right > innerWidth;\n\n // We need to check if it was already outside\n const outsideY = el.dataset['outsideVy'];\n const outsideX = el.dataset['outsideVx'];\n const parentRect = el?.parentElement?.getBoundingClientRect();\n if (parentRect) {\n if (outsideY) {\n const position = el.dataset['outsideVy'];\n if (position === 'top') {\n outTop = parentRect.top - (bottom - parentRect.bottom) < 0;\n } else {\n outBottom = parentRect.bottom + (parentRect.top - top) > innerHeight;\n }\n }\n if (outsideX) {\n const position = el.dataset['outsideVx'];\n if (position === 'left') {\n outLeft = parentRect.left - (right - parentRect.right) < 0;\n } else {\n outRight = parentRect.right + (parentRect.left - left) > innerWidth;\n }\n }\n }\n return {\n outTop,\n outBottom,\n outLeft,\n outRight\n };\n};\nexport interface DBDataOutsidePair {\n vx?: 'left' | 'right';\n vy?: 'top' | 'bottom';\n}\nexport const handleDataOutside = (el: HTMLElement): DBDataOutsidePair => {\n const {\n outTop,\n outBottom,\n outLeft,\n outRight\n } = isInView(el);\n let dataOutsidePair: DBDataOutsidePair = {};\n if (outTop || outBottom) {\n dataOutsidePair = {\n vy: outTop ? 'top' : 'bottom'\n };\n el.dataset['outsideVy'] = dataOutsidePair.vy!;\n } else {\n delete el.dataset['outsideVy'];\n }\n if (outLeft || outRight) {\n dataOutsidePair = {\n ...dataOutsidePair,\n vx: outRight ? 'right' : 'left'\n };\n el.dataset['outsideVx'] = dataOutsidePair.vx!;\n } else {\n delete el.dataset['outsideVx'];\n }\n return dataOutsidePair;\n};\nexport const handleFixedDropdown = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n // We skip this if we are in mobile it's already fixed\n if (getComputedStyle(element).zIndex === '9999') return;\n const {\n top,\n bottom,\n childHeight,\n childWidth,\n width,\n right,\n left,\n correctedPlacement\n } = getFloatingProps(element, parent, placement);\n const fullWidth = element.dataset['width'] === 'full';\n if (fullWidth) {\n element.style.inlineSize = `${width}px`;\n }\n if (correctedPlacement === 'top' || correctedPlacement === 'bottom' || correctedPlacement === 'top-start' || correctedPlacement === 'bottom-start') {\n element.style.insetInlineStart = `${left}px`;\n } else if (correctedPlacement === 'top-end' || correctedPlacement === 'bottom-end') {\n element.style.insetInlineStart = `${right - childWidth}px`;\n }\n if (correctedPlacement?.startsWith('top')) {\n element.style.insetBlockStart = `${top - childHeight}px`;\n } else if (correctedPlacement?.startsWith('bottom')) {\n element.style.insetBlockStart = `${bottom}px`;\n }\n element.style.position = 'fixed';\n};\nconst getFloatingProps = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n if (!element || !parent) {\n return {\n top: 0,\n bottom: 0,\n right: 0,\n height: 0,\n width: 0,\n left: 0,\n childHeight: 0,\n childWidth: 0,\n correctedPlacement: placement,\n innerWidth: window.innerWidth,\n innerHeight: window.innerHeight\n };\n }\n const childRect = element.getBoundingClientRect();\n const {\n top,\n height,\n bottom,\n right,\n left,\n width\n } = parent.getBoundingClientRect();\n const {\n innerHeight,\n innerWidth\n } = window;\n let childHeight = childRect.height;\n let childWidth = childRect.width;\n if (placement === 'bottom' || placement === 'top') {\n childWidth = childWidth / 2;\n }\n if (placement === 'left' || placement === 'right') {\n childHeight = childHeight / 2;\n }\n const outsideBottom = bottom + childHeight > innerHeight;\n const outsideTop = top - childHeight < 0;\n const outsideLeft = left - childWidth < 0;\n const outsideRight = right + childWidth > innerWidth;\n let correctedPlacement = placement;\n if (placement.startsWith('bottom')) {\n if (outsideBottom) {\n correctedPlacement = placement?.replace('bottom', 'top');\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'top';\n } else if (outsideLeft) {\n correctedPlacement = 'top-start';\n } else if (outsideRight) {\n correctedPlacement = 'top-end';\n }\n } else {\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'bottom';\n } else if (outsideLeft) {\n correctedPlacement = 'bottom-start';\n } else if (outsideRight) {\n correctedPlacement = 'bottom-end';\n }\n }\n } else if (placement.startsWith('top')) {\n if (outsideTop) {\n correctedPlacement = placement?.replace('top', 'bottom');\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'bottom';\n } else if (outsideLeft) {\n correctedPlacement = 'bottom-start';\n } else if (outsideRight) {\n correctedPlacement = 'bottom-end';\n }\n } else {\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'top';\n } else if (outsideLeft) {\n correctedPlacement = 'top-start';\n } else if (outsideRight) {\n correctedPlacement = 'top-end';\n }\n }\n } else if (placement.startsWith('left')) {\n if (outsideLeft) {\n correctedPlacement = placement?.replace('left', 'right');\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'right';\n } else if (outsideBottom) {\n correctedPlacement = 'right-end';\n } else if (outsideTop) {\n correctedPlacement = 'right-start';\n }\n } else {\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'left';\n } else if (outsideBottom) {\n correctedPlacement = 'left-end';\n } else if (outsideTop) {\n correctedPlacement = 'left-start';\n }\n }\n } else if (correctedPlacement.startsWith('right')) {\n if (outsideRight) {\n correctedPlacement = placement?.replace('right', 'left');\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'left';\n } else if (outsideBottom) {\n correctedPlacement = 'left-end';\n } else if (outsideTop) {\n correctedPlacement = 'left-start';\n }\n } else {\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'right';\n } else if (outsideBottom) {\n correctedPlacement = 'right-end';\n } else if (outsideTop) {\n correctedPlacement = 'right-start';\n }\n }\n }\n return {\n top,\n bottom,\n right,\n height,\n width,\n left,\n childHeight: childRect.height,\n childWidth: childRect.width,\n correctedPlacement,\n innerWidth,\n innerHeight\n };\n};\nexport const handleFixedPopover = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n const distance = getComputedStyle(element).getPropertyValue('--db-popover-distance') ?? '0px';\n const {\n top,\n height,\n width,\n childHeight,\n childWidth,\n right,\n left,\n bottom,\n correctedPlacement,\n innerWidth,\n innerHeight\n } = getFloatingProps(element, parent, placement);\n\n // Tooltip arrow position\n\n if (childWidth > width && (correctedPlacement.startsWith('bottom') || correctedPlacement.startsWith('top'))) {\n const diff = width / 2 / childWidth * 100;\n if (correctedPlacement.endsWith('start')) {\n element.style.setProperty('--db-tooltip-arrow-inline-start', `${diff}%`);\n } else if (correctedPlacement.endsWith('end')) {\n element.style.setProperty('--db-tooltip-arrow-inline-start', `${100 - diff}%`);\n }\n }\n if (childHeight > height && (correctedPlacement.startsWith('left') || correctedPlacement.startsWith('bottom'))) {\n const diff = height / 2 / childHeight * 100;\n if (correctedPlacement.endsWith('start')) {\n element.style.setProperty('--db-tooltip-arrow-block-start', `${diff}%`);\n } else if (correctedPlacement.endsWith('end')) {\n element.style.setProperty('--db-tooltip-arrow-block-start', `${100 - diff}%`);\n }\n }\n\n // Popover position\n\n if (correctedPlacement === 'right' || correctedPlacement === 'left') {\n // center horizontally\n element.style.insetBlockStart = `${top + height / 2}px`;\n } else if (correctedPlacement === 'right-start' || correctedPlacement === 'left-start') {\n const end = top + childHeight;\n element.style.insetBlockStart = `${top}px`;\n element.style.insetBlockEnd = `${end > innerHeight ? innerHeight : end}px`;\n } else if (correctedPlacement === 'right-end' || correctedPlacement === 'left-end') {\n const start = bottom - childHeight;\n element.style.insetBlockStart = `${start < 0 ? 0 : start}px`;\n element.style.insetBlockEnd = `${bottom}px`;\n } else if (correctedPlacement === 'top' || correctedPlacement === 'bottom') {\n // center vertically\n element.style.insetInlineStart = `${left + width / 2}px`;\n } else if (correctedPlacement === 'top-start' || correctedPlacement === 'bottom-start') {\n const end = left + childWidth;\n element.style.insetInlineStart = `${left}px`;\n element.style.insetInlineEnd = `${end > innerWidth ? innerWidth : end}px`;\n } else if (correctedPlacement === 'top-end' || correctedPlacement === 'bottom-end') {\n const start = left - childWidth;\n element.style.insetInlineStart = `${right - childWidth}px`;\n element.style.insetInlineEnd = `${start < 0 ? 0 : start}px`;\n }\n if (correctedPlacement?.startsWith('right')) {\n const end = right + childWidth;\n element.style.insetInlineStart = `calc(${right}px + ${distance})`;\n element.style.insetInlineEnd = `calc(${end > innerWidth ? innerWidth : end}px + ${distance})`;\n } else if (correctedPlacement?.startsWith('left')) {\n const start = left - childWidth;\n element.style.insetInlineStart = `calc(${start < 0 ? 0 : start}px - ${distance})`;\n element.style.insetInlineEnd = `calc(${right}px - ${distance})`;\n } else if (correctedPlacement?.startsWith('top')) {\n const start = top - childHeight;\n element.style.insetBlockStart = `calc(${start < 0 ? 0 : start}px - ${distance})`;\n element.style.insetBlockEnd = `calc(${bottom}px - ${distance})`;\n } else if (correctedPlacement?.startsWith('bottom')) {\n const end = bottom + childHeight;\n element.style.insetBlockStart = `calc(${bottom}px + ${distance})`;\n element.style.insetBlockEnd = `calc(${end > innerHeight ? innerHeight : end}px + ${distance})`;\n }\n element.style.position = 'fixed';\n element.setAttribute('data-corrected-placement', correctedPlacement);\n}"],"names":[],"mappings":"AAAA;AACA,MAAM,QAAQ,GAAG,CAAC,EAAe,KAAI;;AACnC,IAAA,MAAM,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACN,GAAG,EAAE,CAAC,qBAAqB,EAAE;AAC9B,IAAA,MAAM,EACJ,WAAW,EACX,UAAU,EACX,GAAG,MAAM;AACV,IAAA,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC;AACpB,IAAA,IAAI,SAAS,GAAG,MAAM,GAAG,WAAW;AACpC,IAAA,IAAI,OAAO,GAAG,IAAI,GAAG,CAAC;AACtB,IAAA,IAAI,QAAQ,GAAG,KAAK,GAAG,UAAU;;IAGjC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,IAAA,MAAM,UAAU,GAAG,CAAA,EAAA,GAAA,EAAE,KAAF,IAAA,IAAA,EAAE,KAAF,MAAA,GAAA,MAAA,GAAA,EAAE,CAAE,aAAa,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,qBAAqB,EAAE;IAC7D,IAAI,UAAU,EAAE;QACd,IAAI,QAAQ,EAAE;YACZ,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,YAAA,IAAI,QAAQ,KAAK,KAAK,EAAE;AACtB,gBAAA,MAAM,GA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CAAA,KAAA,EAAQ,QAAQ,CAAA,CAAA,CAAG;QACjE,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,CAAQ,KAAA,EAAA,GAAG,GAAG,WAAW,GAAG,WAAW,GAAG,GAAG,CAAQ,KAAA,EAAA,QAAQ,GAAG;;AAEhG,IAAA,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO;AAChC,IAAA,OAAO,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;AACtE;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as s,F as a}from"./p-Ctmm4hMW.js";import{u as h,d as n,b as e,g as o,j as d,c as l}from"./p-BgQRUWMZ.js";import{i as r,N as c}from"./p-BDA9dlfd.js";import{n as u}from"./p-DC9V_oNU.js";import"./p-DYeQU2bY.js";const v=class{constructor(s){i(this,s);this.click=t(this,"click");this.initialized=false;this.hasAreaPopup=false;this.hasSubNavigation=true;this.isSubNavigationExpanded=false;this.autoClose=false;this.subNavigationId="sub-navigation-"+h();this.navigationItemSafeTriangle=undefined}handleNavigationItemClick(i){if(r(i)){this.autoClose=true;n((()=>{this.autoClose=false}),300)}}handleClick(i){if(this.click){i.stopPropagation();this.click.emit(i)}if(this.hasAreaPopup){this.isSubNavigationExpanded=true}}handleBackClick(i){i.stopPropagation();this.isSubNavigationExpanded=false}enableAttributePassing(i,t){const s=i===null||i===void 0?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&&(h.name.startsWith("data-")||h.name.startsWith("aria-"))){i.setAttribute(h.name,h.value);s.removeAttribute(h.name)}if(h&&h.name==="class"){const t=h.value.includes("hydrated");const a=h.value.replace("hydrated","").trim();const n=i.getAttribute("class");i.setAttribute(h.name,`${n?`${n} `:""}${a}`);if(t){s.setAttribute("class","hydrated")}else{s.removeAttribute(h.name)}}}}}watch0Fn(){if(this.subNavigationExpanded!==undefined){this.isSubNavigationExpanded=!!e(this.subNavigationExpanded,"subNavigationExpanded")}}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");if(t){if(((i=t.children)===null||i===void 0?void 0:i.length)>0){this.hasAreaPopup=true;if(!this.navigationItemSafeTriangle){this.navigationItemSafeTriangle=new c(this._ref,t)}}else{this.hasSubNavigation=false}}}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-navigation-item");this.initialized=true;this.watch0Fn();this.watch1Fn()}render(){var i;return s("li",{key:"4611c029f6c888eebfb7a2046b2971b4a36ebd1e",class:l("db-navigation-item",this.className),ref:i=>{this._ref=i},id:this.id,onMouseOver:()=>{var i;return(i=this.navigationItemSafeTriangle)===null||i===void 0?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return(i=this.navigationItemSafeTriangle)===null||i===void 0?void 0:i.disableFollow()},onMouseMove:i=>{var t;return(t=this.navigationItemSafeTriangle)===null||t===void 0?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-hide-icon":d(this.showIcon),"data-active":this.active,"data-wrap":o(this.wrap),"aria-disabled":o(this.disabled)},!this.hasSubNavigation?this.text?this.text:s("slot",null):null,this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button","aria-haspopup":this.hasAreaPopup,"aria-expanded":this.isSubNavigationExpanded,disabled:e(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",null)),s("menu",{class:"db-sub-navigation","data-auto-close":this.autoClose,id:this.subNavigationId,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)},(i=this.backButtonText)!==null&&i!==void 0?i:u)):null,s("slot",{name:"subNavigation"}))):null)}static get watchers(){return{subNavigationExpanded:["watch0"],initialized:["watch1"],_ref:["watch1"]}}};export{v as db_navigation_item};
2
- //# sourceMappingURL=p-3fe511ce.entry.js.map
1
+ import{r as i,c as t,h as s,F as a}from"./p-Ctmm4hMW.js";import{u as h,d as n,b as e,g as o,j as l,c as d}from"./p-BgQRUWMZ.js";import{i as r,N as c}from"./p-BFvCp0MI.js";import{n as u}from"./p-DC9V_oNU.js";import"./p-BLKCMo7A.js";const v=class{constructor(s){i(this,s);this.click=t(this,"click");this.initialized=false;this.hasAreaPopup=false;this.hasSubNavigation=true;this.isSubNavigationExpanded=false;this.autoClose=false;this.subNavigationId="sub-navigation-"+h();this.navigationItemSafeTriangle=undefined}handleNavigationItemClick(i){if(r(i)){this.autoClose=true;n((()=>{this.autoClose=false}),300)}}handleClick(i){if(this.click){i.stopPropagation();this.click.emit(i)}if(this.hasAreaPopup){this.isSubNavigationExpanded=true}}handleBackClick(i){i.stopPropagation();this.isSubNavigationExpanded=false}enableAttributePassing(i,t){const s=i===null||i===void 0?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&&(h.name.startsWith("data-")||h.name.startsWith("aria-"))){i.setAttribute(h.name,h.value);s.removeAttribute(h.name)}if(h&&h.name==="class"){const t=h.value.includes("hydrated");const a=h.value.replace("hydrated","").trim();const n=i.getAttribute("class");i.setAttribute(h.name,`${n?`${n} `:""}${a}`);if(t){s.setAttribute("class","hydrated")}else{s.removeAttribute(h.name)}}}}}watch0Fn(){if(this.subNavigationExpanded!==undefined){this.isSubNavigationExpanded=!!e(this.subNavigationExpanded,"subNavigationExpanded")}}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");if(t){if(((i=t.children)===null||i===void 0?void 0:i.length)>0){this.hasAreaPopup=true;if(!this.navigationItemSafeTriangle){this.navigationItemSafeTriangle=new c(this._ref,t)}}else{this.hasSubNavigation=false}}}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-navigation-item");this.initialized=true;this.watch0Fn();this.watch1Fn()}render(){var i;return s("li",{key:"4611c029f6c888eebfb7a2046b2971b4a36ebd1e",class:d("db-navigation-item",this.className),ref:i=>{this._ref=i},id:this.id,onMouseOver:()=>{var i;return(i=this.navigationItemSafeTriangle)===null||i===void 0?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return(i=this.navigationItemSafeTriangle)===null||i===void 0?void 0:i.disableFollow()},onMouseMove:i=>{var t;return(t=this.navigationItemSafeTriangle)===null||t===void 0?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-hide-icon":l(this.showIcon),"data-active":this.active,"data-wrap":o(this.wrap),"aria-disabled":o(this.disabled)},!this.hasSubNavigation?this.text?this.text:s("slot",null):null,this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button","aria-haspopup":this.hasAreaPopup,"aria-expanded":this.isSubNavigationExpanded,disabled:e(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",null)),s("menu",{class:"db-sub-navigation","data-auto-close":this.autoClose,id:this.subNavigationId,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)},(i=this.backButtonText)!==null&&i!==void 0?i:u)):null,s("slot",{name:"subNavigation"}))):null)}static get watchers(){return{subNavigationExpanded:["watch0"],initialized:["watch1"],_ref:["watch1"]}}};export{v as db_navigation_item};
2
+ //# sourceMappingURL=p-d22637ab.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i}from"./p-Ctmm4hMW.js";import{d as s,g as e,c as a}from"./p-BgQRUWMZ.js";import{b as o}from"./p-DYeQU2bY.js";import{D as n}from"./p-Dgkqk5fN.js";const h=class{constructor(i){t(this,i);this.initialized=false;this.isExpanded=false;this._documentScrollListenerCallbackId=undefined;this._observer=undefined}handleEscape(t){if(!t||t.key==="Escape"){for(const t of Array.from(this._ref.children)){t.blur()}}}handleAutoPlacement(){if(!this._ref)return;const t=this._ref.querySelector("article");if(t){s((()=>{var i;o(t,this._ref,(i=this.placement)!==null&&i!==void 0?i:"bottom")}),1)}}handleDocumentScroll(t){var i,s;if(((i=t===null||t===void 0?void 0:t.target)===null||i===void 0?void 0:i.contains)&&((s=t===null||t===void 0?void 0:t.target)===null||s===void 0?void 0:s.contains(this._ref))){this.handleAutoPlacement()}}handleEnter(){var t;this.isExpanded=true;this._documentScrollListenerCallbackId=(new n).addCallback((t=>this.handleDocumentScroll(t)));this.handleAutoPlacement();const i=this.getTrigger();if(i){(t=this._observer)===null||t===void 0?void 0:t.observe(i)}}handleLeave(t){var i;const s=t===null||t===void 0?void 0:t.target;const e=s===null||s===void 0?void 0:s.parentNode;if(!e||s.parentNode.querySelector(":focus")!==s&&s.parentNode.querySelector(":focus-within")!==s&&s.parentNode.querySelector(":hover")!==s){this.isExpanded=false;if(this._documentScrollListenerCallbackId){(new n).removeCallback(this._documentScrollListenerCallbackId)}const t=this.getTrigger();if(t){(i=this._observer)===null||i===void 0?void 0:i.unobserve(t)}}}getTrigger(){var t;if(this._ref){const i=Array.from(this._ref.children);if(i.length>=2){const s=i[0];if(s.tagName.includes("-")){return((t=s.children)===null||t===void 0?void 0:t.length)>0?s.children[0]:null}else{return s}}}return null}enableAttributePassing(t,i){const s=t===null||t===void 0?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&(a.name.startsWith("data-")||a.name.startsWith("aria-"))){t.setAttribute(a.name,a.value);s.removeAttribute(a.name)}if(a&&a.name==="class"){const i=a.value.includes("hydrated");const e=a.value.replace("hydrated","").trim();const o=t.getAttribute("class");t.setAttribute(a.name,`${o?`${o} `:""}${e}`);if(i){s.setAttribute("class","hydrated")}else{s.removeAttribute(a.name)}}}}}watch0Fn(){if(this._ref&&this.initialized){this.initialized=false;const t=this.getTrigger();if(t){t.ariaHasPopup="true"}this.handleAutoPlacement();this._ref.addEventListener("keydown",(t=>this.handleEscape(t)));["mouseenter","focusin"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleEnter()))}));["mouseleave","focusout"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleLeave()))}));if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getTrigger()));if(i&&!i.isIntersecting){this.handleEscape(false)}}))}}}watch0(){this.watch0Fn()}watch1Fn(){if(this._ref){const t=this.getTrigger();if(t){t.ariaExpanded=Boolean(this.isExpanded).toString()}}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-popover");this.initialized=true;this.watch0Fn();this.watch1Fn()}render(){var t;return i("div",{key:"a255b62ddb2f1cc49052058c170afa5f421ea0cd",class:a("db-popover",this.className),ref:t=>{this._ref=t},id:this.id},i("slot",{key:"ef6f20e9436cfd0e31eecc319f20c048fe661254",name:"trigger"}),i("article",{key:"77ca50669fdd2d2591993dababfdf082744781cd",class:"db-popover-content","data-spacing":this.spacing,"data-gap":e(this.gap),"data-animation":e((t=this.animation)!==null&&t!==void 0?t:true),"data-open":e(this.open),"data-delay":this.delay,"data-width":this.width,"data-placement":this.placement},i("slot",{key:"efb1a717ff36febb7bdaf53377bb3c09f2ef5d2f"})))}static get watchers(){return{_ref:["watch0","watch1"],initialized:["watch0"],isExpanded:["watch1"]}}};export{h as db_popover};
2
- //# sourceMappingURL=p-854c0012.entry.js.map
1
+ import{r as t,h as i}from"./p-Ctmm4hMW.js";import{d as s,g as e,c as a}from"./p-BgQRUWMZ.js";import{b as o}from"./p-BLKCMo7A.js";import{D as n}from"./p-Dgkqk5fN.js";const h=class{constructor(i){t(this,i);this.initialized=false;this.isExpanded=false;this._documentScrollListenerCallbackId=undefined;this._observer=undefined}handleEscape(t){if(!t||t.key==="Escape"){for(const t of Array.from(this._ref.children)){t.blur()}}}handleAutoPlacement(){if(!this._ref)return;const t=this._ref.querySelector("article");if(t){s((()=>{var i;o(t,this._ref,(i=this.placement)!==null&&i!==void 0?i:"bottom")}),1)}}handleDocumentScroll(t){var i,s;if(((i=t===null||t===void 0?void 0:t.target)===null||i===void 0?void 0:i.contains)&&((s=t===null||t===void 0?void 0:t.target)===null||s===void 0?void 0:s.contains(this._ref))){this.handleAutoPlacement()}}handleEnter(){var t;this.isExpanded=true;this._documentScrollListenerCallbackId=(new n).addCallback((t=>this.handleDocumentScroll(t)));this.handleAutoPlacement();const i=this.getTrigger();if(i){(t=this._observer)===null||t===void 0?void 0:t.observe(i)}}handleLeave(t){var i;const s=t===null||t===void 0?void 0:t.target;const e=s===null||s===void 0?void 0:s.parentNode;if(!e||s.parentNode.querySelector(":focus")!==s&&s.parentNode.querySelector(":focus-within")!==s&&s.parentNode.querySelector(":hover")!==s){this.isExpanded=false;if(this._documentScrollListenerCallbackId){(new n).removeCallback(this._documentScrollListenerCallbackId)}const t=this.getTrigger();if(t){(i=this._observer)===null||i===void 0?void 0:i.unobserve(t)}}}getTrigger(){var t;if(this._ref){const i=Array.from(this._ref.children);if(i.length>=2){const s=i[0];if(s.tagName.includes("-")){return((t=s.children)===null||t===void 0?void 0:t.length)>0?s.children[0]:null}else{return s}}}return null}enableAttributePassing(t,i){const s=t===null||t===void 0?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&(a.name.startsWith("data-")||a.name.startsWith("aria-"))){t.setAttribute(a.name,a.value);s.removeAttribute(a.name)}if(a&&a.name==="class"){const i=a.value.includes("hydrated");const e=a.value.replace("hydrated","").trim();const o=t.getAttribute("class");t.setAttribute(a.name,`${o?`${o} `:""}${e}`);if(i){s.setAttribute("class","hydrated")}else{s.removeAttribute(a.name)}}}}}watch0Fn(){if(this._ref&&this.initialized){this.initialized=false;const t=this.getTrigger();if(t){t.ariaHasPopup="true"}this.handleAutoPlacement();this._ref.addEventListener("keydown",(t=>this.handleEscape(t)));["mouseenter","focusin"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleEnter()))}));["mouseleave","focusout"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleLeave()))}));if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getTrigger()));if(i&&!i.isIntersecting){this.handleEscape(false)}}))}}}watch0(){this.watch0Fn()}watch1Fn(){if(this._ref){const t=this.getTrigger();if(t){t.ariaExpanded=Boolean(this.isExpanded).toString()}}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-popover");this.initialized=true;this.watch0Fn();this.watch1Fn()}render(){var t;return i("div",{key:"a255b62ddb2f1cc49052058c170afa5f421ea0cd",class:a("db-popover",this.className),ref:t=>{this._ref=t},id:this.id},i("slot",{key:"ef6f20e9436cfd0e31eecc319f20c048fe661254",name:"trigger"}),i("article",{key:"77ca50669fdd2d2591993dababfdf082744781cd",class:"db-popover-content","data-spacing":this.spacing,"data-gap":e(this.gap),"data-animation":e((t=this.animation)!==null&&t!==void 0?t:true),"data-open":e(this.open),"data-delay":this.delay,"data-width":this.width,"data-placement":this.placement},i("slot",{key:"efb1a717ff36febb7bdaf53377bb3c09f2ef5d2f"})))}static get watchers(){return{_ref:["watch0","watch1"],initialized:["watch0"],isExpanded:["watch1"]}}};export{h as db_popover};
2
+ //# sourceMappingURL=p-f3ac974b.entry.js.map
@@ -3,7 +3,7 @@ import { h as hasVoiceOver, d as delay, s as stringPropVisible, k as getSearchIn
3
3
  import { l as DEFAULT_INVALID_MESSAGE, a as DEFAULT_LABEL, m as DEFAULT_REMOVE, d as DEFAULT_LABEL_ID_SUFFIX, e as DEFAULT_SELECT_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, o as DEFAULT_SELECTED, f as DEFAULT_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, c as DEFAULT_MESSAGE, s as DEFAULT_CLOSE_BUTTON } from './constants-DC9V_oNU.js';
4
4
  import { D as DocumentClickListener } from './document-click-listener-CG0rJGJ-.js';
5
5
  import { D as DocumentScrollListener } from './document-scroll-listener-CwWQuwL5.js';
6
- import { h as handleFixedDropdown } from './floating-components-DYeQU2bY.js';
6
+ import { h as handleFixedDropdown } from './floating-components-BLKCMo7A.js';
7
7
 
8
8
  const DBCustomSelect = class {
9
9
  constructor(hostRef) {
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-Ctmm4hMW.js';
2
2
  import { a as addAttributeToChildren, u as uuid, b as getBoolean, c as cls } from './index-BgQRUWMZ.js';
3
3
  import { D as DEFAULT_ID, p as DEFAULT_BURGER_MENU } from './constants-DC9V_oNU.js';
4
- import { i as isEventTargetNavigationItem } from './navigation-CE_2IUA4.js';
5
- import './floating-components-DYeQU2bY.js';
4
+ import { i as isEventTargetNavigationItem } from './navigation-C4qTkuYy.js';
5
+ import './floating-components-BLKCMo7A.js';
6
6
 
7
7
  const DBHeader = class {
8
8
  constructor(hostRef) {
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Ctmm4hMW.js';
2
2
  import { u as uuid, d as delay, b as getBoolean, g as getBooleanAsString, j as getHideProp, c as cls } from './index-BgQRUWMZ.js';
3
- import { i as isEventTargetNavigationItem, N as NavigationItemSafeTriangle } from './navigation-CE_2IUA4.js';
3
+ import { i as isEventTargetNavigationItem, N as NavigationItemSafeTriangle } from './navigation-C4qTkuYy.js';
4
4
  import { n as DEFAULT_BACK } from './constants-DC9V_oNU.js';
5
- import './floating-components-DYeQU2bY.js';
5
+ import './floating-components-BLKCMo7A.js';
6
6
 
7
7
  const DBNavigationItem = class {
8
8
  constructor(hostRef) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
2
  import { d as delay, g as getBooleanAsString, c as cls } from './index-BgQRUWMZ.js';
3
- import { b as handleFixedPopover } from './floating-components-DYeQU2bY.js';
3
+ import { b as handleFixedPopover } from './floating-components-BLKCMo7A.js';
4
4
  import { D as DocumentScrollListener } from './document-scroll-listener-CwWQuwL5.js';
5
5
 
6
6
  const DBPopover = class {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
2
  import { d as delay, u as uuid, g as getBooleanAsString, c as cls } from './index-BgQRUWMZ.js';
3
3
  import { D as DEFAULT_ID } from './constants-DC9V_oNU.js';
4
- import { b as handleFixedPopover } from './floating-components-DYeQU2bY.js';
4
+ import { b as handleFixedPopover } from './floating-components-BLKCMo7A.js';
5
5
  import { D as DocumentScrollListener } from './document-scroll-listener-CwWQuwL5.js';
6
6
 
7
7
  const DBTooltip = class {
@@ -83,6 +83,21 @@ const handleFixedDropdown = (element, parent, placement) => {
83
83
  element.style.position = 'fixed';
84
84
  };
85
85
  const getFloatingProps = (element, parent, placement) => {
86
+ if (!element || !parent) {
87
+ return {
88
+ top: 0,
89
+ bottom: 0,
90
+ right: 0,
91
+ height: 0,
92
+ width: 0,
93
+ left: 0,
94
+ childHeight: 0,
95
+ childWidth: 0,
96
+ correctedPlacement: placement,
97
+ innerWidth: window.innerWidth,
98
+ innerHeight: window.innerHeight
99
+ };
100
+ }
86
101
  const childRect = element.getBoundingClientRect();
87
102
  const { top, height, bottom, right, left, width } = parent.getBoundingClientRect();
88
103
  const { innerHeight, innerWidth } = window;
@@ -290,6 +305,6 @@ const handleFixedPopover = (element, parent, placement) => {
290
305
  };
291
306
 
292
307
  export { handleDataOutside as a, handleFixedPopover as b, handleFixedDropdown as h };
293
- //# sourceMappingURL=floating-components-DYeQU2bY.js.map
308
+ //# sourceMappingURL=floating-components-BLKCMo7A.js.map
294
309
 
295
- //# sourceMappingURL=floating-components-DYeQU2bY.js.map
310
+ //# sourceMappingURL=floating-components-BLKCMo7A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-components-BLKCMo7A.js","sources":["src/utils/floating-components.ts"],"sourcesContent":["// TODO: We should reevaluate this as soon as CSS Anchor Positioning is supported in all relevant browsers\nconst isInView = (el: HTMLElement) => {\n const {\n top,\n bottom,\n left,\n right\n } = el.getBoundingClientRect();\n const {\n innerHeight,\n innerWidth\n } = window;\n let outTop = top < 0;\n let outBottom = bottom > innerHeight;\n let outLeft = left < 0;\n let outRight = right > innerWidth;\n\n // We need to check if it was already outside\n const outsideY = el.dataset['outsideVy'];\n const outsideX = el.dataset['outsideVx'];\n const parentRect = el?.parentElement?.getBoundingClientRect();\n if (parentRect) {\n if (outsideY) {\n const position = el.dataset['outsideVy'];\n if (position === 'top') {\n outTop = parentRect.top - (bottom - parentRect.bottom) < 0;\n } else {\n outBottom = parentRect.bottom + (parentRect.top - top) > innerHeight;\n }\n }\n if (outsideX) {\n const position = el.dataset['outsideVx'];\n if (position === 'left') {\n outLeft = parentRect.left - (right - parentRect.right) < 0;\n } else {\n outRight = parentRect.right + (parentRect.left - left) > innerWidth;\n }\n }\n }\n return {\n outTop,\n outBottom,\n outLeft,\n outRight\n };\n};\nexport interface DBDataOutsidePair {\n vx?: 'left' | 'right';\n vy?: 'top' | 'bottom';\n}\nexport const handleDataOutside = (el: HTMLElement): DBDataOutsidePair => {\n const {\n outTop,\n outBottom,\n outLeft,\n outRight\n } = isInView(el);\n let dataOutsidePair: DBDataOutsidePair = {};\n if (outTop || outBottom) {\n dataOutsidePair = {\n vy: outTop ? 'top' : 'bottom'\n };\n el.dataset['outsideVy'] = dataOutsidePair.vy!;\n } else {\n delete el.dataset['outsideVy'];\n }\n if (outLeft || outRight) {\n dataOutsidePair = {\n ...dataOutsidePair,\n vx: outRight ? 'right' : 'left'\n };\n el.dataset['outsideVx'] = dataOutsidePair.vx!;\n } else {\n delete el.dataset['outsideVx'];\n }\n return dataOutsidePair;\n};\nexport const handleFixedDropdown = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n // We skip this if we are in mobile it's already fixed\n if (getComputedStyle(element).zIndex === '9999') return;\n const {\n top,\n bottom,\n childHeight,\n childWidth,\n width,\n right,\n left,\n correctedPlacement\n } = getFloatingProps(element, parent, placement);\n const fullWidth = element.dataset['width'] === 'full';\n if (fullWidth) {\n element.style.inlineSize = `${width}px`;\n }\n if (correctedPlacement === 'top' || correctedPlacement === 'bottom' || correctedPlacement === 'top-start' || correctedPlacement === 'bottom-start') {\n element.style.insetInlineStart = `${left}px`;\n } else if (correctedPlacement === 'top-end' || correctedPlacement === 'bottom-end') {\n element.style.insetInlineStart = `${right - childWidth}px`;\n }\n if (correctedPlacement?.startsWith('top')) {\n element.style.insetBlockStart = `${top - childHeight}px`;\n } else if (correctedPlacement?.startsWith('bottom')) {\n element.style.insetBlockStart = `${bottom}px`;\n }\n element.style.position = 'fixed';\n};\nconst getFloatingProps = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n if (!element || !parent) {\n return {\n top: 0,\n bottom: 0,\n right: 0,\n height: 0,\n width: 0,\n left: 0,\n childHeight: 0,\n childWidth: 0,\n correctedPlacement: placement,\n innerWidth: window.innerWidth,\n innerHeight: window.innerHeight\n };\n }\n const childRect = element.getBoundingClientRect();\n const {\n top,\n height,\n bottom,\n right,\n left,\n width\n } = parent.getBoundingClientRect();\n const {\n innerHeight,\n innerWidth\n } = window;\n let childHeight = childRect.height;\n let childWidth = childRect.width;\n if (placement === 'bottom' || placement === 'top') {\n childWidth = childWidth / 2;\n }\n if (placement === 'left' || placement === 'right') {\n childHeight = childHeight / 2;\n }\n const outsideBottom = bottom + childHeight > innerHeight;\n const outsideTop = top - childHeight < 0;\n const outsideLeft = left - childWidth < 0;\n const outsideRight = right + childWidth > innerWidth;\n let correctedPlacement = placement;\n if (placement.startsWith('bottom')) {\n if (outsideBottom) {\n correctedPlacement = placement?.replace('bottom', 'top');\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'top';\n } else if (outsideLeft) {\n correctedPlacement = 'top-start';\n } else if (outsideRight) {\n correctedPlacement = 'top-end';\n }\n } else {\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'bottom';\n } else if (outsideLeft) {\n correctedPlacement = 'bottom-start';\n } else if (outsideRight) {\n correctedPlacement = 'bottom-end';\n }\n }\n } else if (placement.startsWith('top')) {\n if (outsideTop) {\n correctedPlacement = placement?.replace('top', 'bottom');\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'bottom';\n } else if (outsideLeft) {\n correctedPlacement = 'bottom-start';\n } else if (outsideRight) {\n correctedPlacement = 'bottom-end';\n }\n } else {\n if (outsideLeft && outsideRight) {\n correctedPlacement = 'top';\n } else if (outsideLeft) {\n correctedPlacement = 'top-start';\n } else if (outsideRight) {\n correctedPlacement = 'top-end';\n }\n }\n } else if (placement.startsWith('left')) {\n if (outsideLeft) {\n correctedPlacement = placement?.replace('left', 'right');\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'right';\n } else if (outsideBottom) {\n correctedPlacement = 'right-end';\n } else if (outsideTop) {\n correctedPlacement = 'right-start';\n }\n } else {\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'left';\n } else if (outsideBottom) {\n correctedPlacement = 'left-end';\n } else if (outsideTop) {\n correctedPlacement = 'left-start';\n }\n }\n } else if (correctedPlacement.startsWith('right')) {\n if (outsideRight) {\n correctedPlacement = placement?.replace('right', 'left');\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'left';\n } else if (outsideBottom) {\n correctedPlacement = 'left-end';\n } else if (outsideTop) {\n correctedPlacement = 'left-start';\n }\n } else {\n if (outsideBottom && outsideTop) {\n correctedPlacement = 'right';\n } else if (outsideBottom) {\n correctedPlacement = 'right-end';\n } else if (outsideTop) {\n correctedPlacement = 'right-start';\n }\n }\n }\n return {\n top,\n bottom,\n right,\n height,\n width,\n left,\n childHeight: childRect.height,\n childWidth: childRect.width,\n correctedPlacement,\n innerWidth,\n innerHeight\n };\n};\nexport const handleFixedPopover = (element: HTMLElement, parent: HTMLElement, placement: string) => {\n const distance = getComputedStyle(element).getPropertyValue('--db-popover-distance') ?? '0px';\n const {\n top,\n height,\n width,\n childHeight,\n childWidth,\n right,\n left,\n bottom,\n correctedPlacement,\n innerWidth,\n innerHeight\n } = getFloatingProps(element, parent, placement);\n\n // Tooltip arrow position\n\n if (childWidth > width && (correctedPlacement.startsWith('bottom') || correctedPlacement.startsWith('top'))) {\n const diff = width / 2 / childWidth * 100;\n if (correctedPlacement.endsWith('start')) {\n element.style.setProperty('--db-tooltip-arrow-inline-start', `${diff}%`);\n } else if (correctedPlacement.endsWith('end')) {\n element.style.setProperty('--db-tooltip-arrow-inline-start', `${100 - diff}%`);\n }\n }\n if (childHeight > height && (correctedPlacement.startsWith('left') || correctedPlacement.startsWith('bottom'))) {\n const diff = height / 2 / childHeight * 100;\n if (correctedPlacement.endsWith('start')) {\n element.style.setProperty('--db-tooltip-arrow-block-start', `${diff}%`);\n } else if (correctedPlacement.endsWith('end')) {\n element.style.setProperty('--db-tooltip-arrow-block-start', `${100 - diff}%`);\n }\n }\n\n // Popover position\n\n if (correctedPlacement === 'right' || correctedPlacement === 'left') {\n // center horizontally\n element.style.insetBlockStart = `${top + height / 2}px`;\n } else if (correctedPlacement === 'right-start' || correctedPlacement === 'left-start') {\n const end = top + childHeight;\n element.style.insetBlockStart = `${top}px`;\n element.style.insetBlockEnd = `${end > innerHeight ? innerHeight : end}px`;\n } else if (correctedPlacement === 'right-end' || correctedPlacement === 'left-end') {\n const start = bottom - childHeight;\n element.style.insetBlockStart = `${start < 0 ? 0 : start}px`;\n element.style.insetBlockEnd = `${bottom}px`;\n } else if (correctedPlacement === 'top' || correctedPlacement === 'bottom') {\n // center vertically\n element.style.insetInlineStart = `${left + width / 2}px`;\n } else if (correctedPlacement === 'top-start' || correctedPlacement === 'bottom-start') {\n const end = left + childWidth;\n element.style.insetInlineStart = `${left}px`;\n element.style.insetInlineEnd = `${end > innerWidth ? innerWidth : end}px`;\n } else if (correctedPlacement === 'top-end' || correctedPlacement === 'bottom-end') {\n const start = left - childWidth;\n element.style.insetInlineStart = `${right - childWidth}px`;\n element.style.insetInlineEnd = `${start < 0 ? 0 : start}px`;\n }\n if (correctedPlacement?.startsWith('right')) {\n const end = right + childWidth;\n element.style.insetInlineStart = `calc(${right}px + ${distance})`;\n element.style.insetInlineEnd = `calc(${end > innerWidth ? innerWidth : end}px + ${distance})`;\n } else if (correctedPlacement?.startsWith('left')) {\n const start = left - childWidth;\n element.style.insetInlineStart = `calc(${start < 0 ? 0 : start}px - ${distance})`;\n element.style.insetInlineEnd = `calc(${right}px - ${distance})`;\n } else if (correctedPlacement?.startsWith('top')) {\n const start = top - childHeight;\n element.style.insetBlockStart = `calc(${start < 0 ? 0 : start}px - ${distance})`;\n element.style.insetBlockEnd = `calc(${bottom}px - ${distance})`;\n } else if (correctedPlacement?.startsWith('bottom')) {\n const end = bottom + childHeight;\n element.style.insetBlockStart = `calc(${bottom}px + ${distance})`;\n element.style.insetBlockEnd = `calc(${end > innerHeight ? innerHeight : end}px + ${distance})`;\n }\n element.style.position = 'fixed';\n element.setAttribute('data-corrected-placement', correctedPlacement);\n}"],"names":[],"mappings":"AAAA;AACA,MAAM,QAAQ,GAAG,CAAC,EAAe,KAAI;;AACnC,IAAA,MAAM,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACN,GAAG,EAAE,CAAC,qBAAqB,EAAE;AAC9B,IAAA,MAAM,EACJ,WAAW,EACX,UAAU,EACX,GAAG,MAAM;AACV,IAAA,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC;AACpB,IAAA,IAAI,SAAS,GAAG,MAAM,GAAG,WAAW;AACpC,IAAA,IAAI,OAAO,GAAG,IAAI,GAAG,CAAC;AACtB,IAAA,IAAI,QAAQ,GAAG,KAAK,GAAG,UAAU;;IAGjC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,IAAA,MAAM,UAAU,GAAG,CAAA,EAAA,GAAA,EAAE,KAAF,IAAA,IAAA,E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K,CAAC,aAAa,GAAG,QAAQ,MAAM,CAAA,KAAA,EAAQ,QAAQ,CAAA,CAAA,CAAG;;SAC1D,IAAI,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,KAAlB,MAAA,GAAA,MAAA,GAAA,kBAAkB,CAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;AACnD,QAAA,MAAM,GAAG,GAAG,MAAM,GAAG,WAAW;QAChC,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,MAAM,CAAA,KAAA,EAAQ,QAAQ,CAAA,CAAA,CAAG;QACjE,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,CAAQ,KAAA,EAAA,GAAG,GAAG,WAAW,GAAG,WAAW,GAAG,GAAG,CAAQ,KAAA,EAAA,QAAQ,GAAG;;AAEhG,IAAA,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO;AAChC,IAAA,OAAO,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;AACtE;;;;"}
package/dist/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import './index-Ctmm4hMW.js';
2
2
  export { x as COLOR, y as COLORS, z as COLORS_SIMPLE, C as COLOR_CONST, w as COLOR_SIMPLE, n as DEFAULT_BACK, p as DEFAULT_BURGER_MENU, s as DEFAULT_CLOSE_BUTTON, j as DEFAULT_DATALIST_ID_SUFFIX, q as DEFAULT_ICON, D as DEFAULT_ID, l as DEFAULT_INVALID_MESSAGE, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, a as DEFAULT_LABEL, d as DEFAULT_LABEL_ID_SUFFIX, c as DEFAULT_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, b as DEFAULT_PLACEHOLDER, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, m as DEFAULT_REMOVE, r as DEFAULT_ROWS, o as DEFAULT_SELECTED, e as DEFAULT_SELECT_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, B as DEFAULT_VIEWPORT, v as DENSITIES, u as DENSITY, t as DENSITY_CONST, E as DESKTOP_VIEWPORT, S as SEMANTIC, A as SEMANTICS, T as TESTING_VIEWPORTS } from './constants-DC9V_oNU.js';
3
3
  export { a as addAttributeToChildren, c as cls, d as delay, b as getBoolean, g as getBooleanAsString, j as getHideProp, f as getInputValue, e as getNumber, l as getOptionKey, k as getSearchInput, h as hasVoiceOver, i as isArrayOfStrings, s as stringPropVisible, u as uuid } from './index-BgQRUWMZ.js';
4
- export { N as NavigationItemSafeTriangle, i as isEventTargetNavigationItem } from './navigation-CE_2IUA4.js';
4
+ export { N as NavigationItemSafeTriangle, i as isEventTargetNavigationItem } from './navigation-C4qTkuYy.js';
5
5
  import './document-scroll-listener-CwWQuwL5.js';
6
6
  import './document-click-listener-CG0rJGJ-.js';
7
- import './floating-components-DYeQU2bY.js';
7
+ import './floating-components-BLKCMo7A.js';
8
8
 
9
9
  /* eslint-disable @typescript-eslint/no-explicit-any */
10
10
  const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'];
@@ -1,4 +1,4 @@
1
- import { a as handleDataOutside } from './floating-components-DYeQU2bY.js';
1
+ import { a as handleDataOutside } from './floating-components-BLKCMo7A.js';
2
2
 
3
3
  const isEventTargetNavigationItem = (event) => {
4
4
  var _a, _b;
@@ -133,6 +133,6 @@ class NavigationItemSafeTriangle {
133
133
  }
134
134
 
135
135
  export { NavigationItemSafeTriangle as N, isEventTargetNavigationItem as i };
136
- //# sourceMappingURL=navigation-CE_2IUA4.js.map
136
+ //# sourceMappingURL=navigation-C4qTkuYy.js.map
137
137
 
138
- //# sourceMappingURL=navigation-CE_2IUA4.js.map
138
+ //# sourceMappingURL=navigation-C4qTkuYy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-CE_2IUA4.js","sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './floating-components';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = event as {\n target: HTMLElement;\n };\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: HTMLElement | null;\n private readonly parentSubNavigation: HTMLElement | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: HTMLElement | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"],"names":[],"mappings":";;AASa,MAAA,2BAA2B,GAAG,CAAC,KAAc,KAAa;;AACrE,IAAA,MAAM,EACJ,MAAM,EACP,GAAG,KAEH;AACD,IAAA,OAAO,OAAO,CAAC,EAAC,CAAA,EAAA,GAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,CAAA,EAAA,GAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC;AACrJ;MACa,0BAA0B,CAAA;IAQrC,WAAY,CAAA,OAA2B,EAAE,aAAiC,EAAA;;QALzD,IAAmB,CAAA,mBAAA,GAAuB,IAAI;QAEvD,IAAW,CAAA,WAAA,GAAY,KAAK;QAC5B,IAAM,CAAA,MAAA,GAAW,CAAC;QAClB,IAAM,CAAA,MAAA,GAAW,CAAC;AAExB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AACtB,QAAA,IAAI,CAAC,aAAa,GAAG,aAA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E,CAAG,CAAA,CAAA,CAAC;QACvJ,IAAI,mBAAmB,EAAE;AACvB,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;;AAGlC;;;;"}
1
+ {"version":3,"file":"navigation-C4qTkuYy.js","sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './floating-components';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = event as {\n target: HTMLElement;\n };\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: HTMLElement | null;\n private readonly parentSubNavigation: HTMLElement | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: HTMLElement | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"],"names":[],"mappings":";;AASa,MAAA,2BAA2B,GAAG,CAAC,KAAc,KAAa;;AACrE,IAAA,MAAM,EACJ,MAAM,EACP,GAAG,KAEH;AACD,IAAA,OAAO,OAAO,CAAC,EAAC,CAAA,EAAA,GAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,CAAA,EAAA,GAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC;AACrJ;MACa,0BAA0B,CAAA;IAQrC,WAAY,CAAA,OAA2B,EAAE,aAAiC,EA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,CAAC,WAAW,EAAE;YAChB;;QAEF,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,CAAW,QAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAK,EAAA,EAAA,WAAW,CAAC,EAAE,CAAG,CAAA,CAAA,CAAC;QACvJ,IAAI,mBAAmB,EAAE;AACvB,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;;AAGlC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/wc-core-components",
3
- "version": "2.2.2",
3
+ "version": "2.2.3-getBoundingClientRect-a18038f",
4
4
  "description": "Stencil components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "web-types": "./dist/web-types.json",
44
44
  "dependencies": {
45
- "@db-ux/core-components": "2.2.2",
46
- "@db-ux/core-foundations": "2.2.2"
45
+ "@db-ux/core-components": "2.2.3-getBoundingClientRect-a18038f",
46
+ "@db-ux/core-foundations": "2.2.3-getBoundingClientRect-a18038f"
47
47
  }
48
48
  }