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

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 (44) 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 +16 -1
  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/dist/types/utils/floating-components.d.ts +13 -0
  35. package/package.json +3 -3
  36. package/dist/cjs/floating-components-BNCfdqZJ.js.map +0 -1
  37. package/dist/db-ux/p-DYeQU2bY.js +0 -2
  38. package/dist/db-ux/p-DYeQU2bY.js.map +0 -1
  39. package/dist/esm/floating-components-DYeQU2bY.js.map +0 -1
  40. /package/dist/db-ux/{p-c8666f4b.entry.js.map → p-010a7372.entry.js.map} +0 -0
  41. /package/dist/db-ux/{p-a2e130ba.entry.js.map → p-02e09419.entry.js.map} +0 -0
  42. /package/dist/db-ux/{p-695bf91e.entry.js.map → p-34d4f584.entry.js.map} +0 -0
  43. /package/dist/db-ux/{p-3fe511ce.entry.js.map → p-d22637ab.entry.js.map} +0 -0
  44. /package/dist/db-ux/{p-854c0012.entry.js.map → p-f3ac974b.entry.js.map} +0 -0
@@ -5,7 +5,7 @@ var index$1 = require('./index-ArRmNC2k.js');
5
5
  var constants = require('./constants-CTtyzyuo.js');
6
6
  var documentClickListener = require('./document-click-listener-DT5rWFez.js');
7
7
  var documentScrollListener = require('./document-scroll-listener-Dr1OKmow.js');
8
- var floatingComponents = require('./floating-components-BNCfdqZJ.js');
8
+ var floatingComponents = require('./floating-components-TczCINdL.js');
9
9
 
10
10
  const DBCustomSelect = class {
11
11
  constructor(hostRef) {
@@ -3,8 +3,8 @@
3
3
  var index = require('./index-DiwURPCd.js');
4
4
  var index$1 = require('./index-ArRmNC2k.js');
5
5
  var constants = require('./constants-CTtyzyuo.js');
6
- var navigation = require('./navigation-U4SBgT7D.js');
7
- require('./floating-components-BNCfdqZJ.js');
6
+ var navigation = require('./navigation--rlUdgeW.js');
7
+ require('./floating-components-TczCINdL.js');
8
8
 
9
9
  const DBHeader = class {
10
10
  constructor(hostRef) {
@@ -2,9 +2,9 @@
2
2
 
3
3
  var index = require('./index-DiwURPCd.js');
4
4
  var index$1 = require('./index-ArRmNC2k.js');
5
- var navigation = require('./navigation-U4SBgT7D.js');
5
+ var navigation = require('./navigation--rlUdgeW.js');
6
6
  var constants = require('./constants-CTtyzyuo.js');
7
- require('./floating-components-BNCfdqZJ.js');
7
+ require('./floating-components-TczCINdL.js');
8
8
 
9
9
  const DBNavigationItem = class {
10
10
  constructor(hostRef) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-DiwURPCd.js');
4
4
  var index$1 = require('./index-ArRmNC2k.js');
5
- var floatingComponents = require('./floating-components-BNCfdqZJ.js');
5
+ var floatingComponents = require('./floating-components-TczCINdL.js');
6
6
  var documentScrollListener = require('./document-scroll-listener-Dr1OKmow.js');
7
7
 
8
8
  const DBPopover = class {
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-DiwURPCd.js');
4
4
  var index$1 = require('./index-ArRmNC2k.js');
5
5
  var constants = require('./constants-CTtyzyuo.js');
6
- var floatingComponents = require('./floating-components-BNCfdqZJ.js');
6
+ var floatingComponents = require('./floating-components-TczCINdL.js');
7
7
  var documentScrollListener = require('./document-scroll-listener-Dr1OKmow.js');
8
8
 
9
9
  const DBTooltip = class {
@@ -85,6 +85,21 @@ const handleFixedDropdown = (element, parent, placement) => {
85
85
  element.style.position = 'fixed';
86
86
  };
87
87
  const getFloatingProps = (element, parent, placement) => {
88
+ if (!element || !parent) {
89
+ return {
90
+ top: 0,
91
+ bottom: 0,
92
+ right: 0,
93
+ height: 0,
94
+ width: 0,
95
+ left: 0,
96
+ childHeight: 0,
97
+ childWidth: 0,
98
+ correctedPlacement: placement,
99
+ innerWidth: window.innerWidth,
100
+ innerHeight: window.innerHeight
101
+ };
102
+ }
88
103
  const childRect = element.getBoundingClientRect();
89
104
  const { top, height, bottom, right, left, width } = parent.getBoundingClientRect();
90
105
  const { innerHeight, innerWidth } = window;
@@ -294,6 +309,6 @@ const handleFixedPopover = (element, parent, placement) => {
294
309
  exports.handleDataOutside = handleDataOutside;
295
310
  exports.handleFixedDropdown = handleFixedDropdown;
296
311
  exports.handleFixedPopover = handleFixedPopover;
297
- //# sourceMappingURL=floating-components-BNCfdqZJ.js.map
312
+ //# sourceMappingURL=floating-components-TczCINdL.js.map
298
313
 
299
- //# sourceMappingURL=floating-components-BNCfdqZJ.js.map
314
+ //# sourceMappingURL=floating-components-TczCINdL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-components-TczCINdL.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};\nexport const 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,E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.js');
4
4
  var constants = require('./constants-CTtyzyuo.js');
5
5
  var index = require('./index-ArRmNC2k.js');
6
- var navigation = require('./navigation-U4SBgT7D.js');
6
+ var navigation = require('./navigation--rlUdgeW.js');
7
7
  require('./document-scroll-listener-Dr1OKmow.js');
8
8
  require('./document-click-listener-DT5rWFez.js');
9
- require('./floating-components-BNCfdqZJ.js');
9
+ require('./floating-components-TczCINdL.js');
10
10
 
11
11
  /* eslint-disable @typescript-eslint/no-explicit-any */
12
12
  const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'];
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var floatingComponents = require('./floating-components-BNCfdqZJ.js');
3
+ var floatingComponents = require('./floating-components-TczCINdL.js');
4
4
 
5
5
  const isEventTargetNavigationItem = (event) => {
6
6
  var _a, _b;
@@ -136,6 +136,6 @@ class NavigationItemSafeTriangle {
136
136
 
137
137
  exports.NavigationItemSafeTriangle = NavigationItemSafeTriangle;
138
138
  exports.isEventTargetNavigationItem = isEventTargetNavigationItem;
139
- //# sourceMappingURL=navigation-U4SBgT7D.js.map
139
+ //# sourceMappingURL=navigation--rlUdgeW.js.map
140
140
 
141
- //# sourceMappingURL=navigation-U4SBgT7D.js.map
141
+ //# sourceMappingURL=navigation--rlUdgeW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-U4SBgT7D.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":["handleDataOutside"],"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,aAAa;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACxC;;AAEF,QAAA,IAAI,CAAC,mBAAmB,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,OAAO,CAAC,oBAAoB,CAAC;AAEtE;;;;AAIG;AACH,Q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ChC,QAAA,MAAM,EAAE,GAAG,CAAA,EAAG,IAAI,CAAM,GAAA,EAAA,IAAI,IAAI;QAChC,OAAO;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;;;;;"}
1
+ {"version":3,"file":"navigation--rlUdgeW.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":["handleDataOutside"],"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,aAAa;QAClC,IAAI,CAAC,I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CAAC;QACvJ,IAAI,mBAAmB,EAAE;AACvB,YAAA,IAAI,CAAC,YAAY,GAAG,SAAS;;;AAGlC;;;;;"}
@@ -82,7 +82,22 @@ export const handleFixedDropdown = (element, parent, placement) => {
82
82
  }
83
83
  element.style.position = 'fixed';
84
84
  };
85
- const getFloatingProps = (element, parent, placement) => {
85
+ export 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;
@@ -1 +1 @@
1
- {"version":3,"file":"floating-components.js","sourceRoot":"","sources":["../../src/utils/floating-components.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,MAAM,QAAQ,GAAG,CAAC,EAAe,EAAE,EAAE;;IACnC,MAAM,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACN,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;IAC/B,MAAM,EACJ,WAAW,EACX,UAAU,EACX,GAAG,MAAM,CAAC;IACX,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC;IACrB,IAAI,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;IACrC,IAAI,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;IAElC,6CAA6C;IAC7C,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MA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AK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,QAAQ,GAAG,CAAC;QAClF,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,QAAQ,KAAK,QAAQ,QAAQ,GAAG,CAAC;IAClE,CAAC;SAAM,IAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,GAAG,GAAG,WAAW,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,QAAQ,GAAG,CAAC;QACjF,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,QAAQ,MAAM,QAAQ,QAAQ,GAAG,CAAC;IAClE,CAAC;SAAM,IAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,MAAM,GAAG,GAAG,MAAM,GAAG,WAAW,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,MAAM,QAAQ,QAAQ,GAAG,CAAC;QAClE,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,QAAQ,QAAQ,GAAG,CAAC;IACjG,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IACjC,OAAO,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AACvE,CAAC,CAAA","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 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}"]}
1
+ {"version":3,"file":"floating-components.js","sourceRoot":"","sources":["../../src/utils/floating-components.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,MAAM,QAAQ,GAAG,CAAC,EAAe,EAAE,EAAE;;IACnC,MAAM,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACN,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;IAC/B,MAAM,EACJ,WAAW,EACX,UAAU,EACX,GAAG,MAAM,CAAC;IACX,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC;IACrB,IAAI,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;IACrC,IAAI,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;IAElC,6CAA6C;IAC7C,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,aAAa,0CAAE,qBAAqB,EAAE,CAAC;IAC9D,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACzC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAA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// 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};\nexport const 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}"]}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-Ctmm4hMW.js";export{s as setNonce}from"./p-Ctmm4hMW.js";import{g as i}from"./p-DQuL1Twl.js";var l=()=>{const a=import.meta.url;const i={};if(a!==""){i.resourcesUrl=new URL(".",a).href}return e(i)};l().then((async e=>{await i();return a(JSON.parse('[["p-a2e130ba",[[4,"db-custom-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"ariaDescribedBy":[1,"aria-described-by"],"showNoResults":[4,"show-no-results"],"multiple":[8],"showSelectAll":[4,"show-select-all"],"showSearch":[4,"show-search"],"values":[16],"validation":[1],"options":[16],"searchValue":[1,"search-value"],"selectedLabels":[1,"selected-labels"],"transformSelectedLabels":[16,"transform-selected-labels"],"selectedType":[1,"selected-type"],"amountText":[1,"amount-text"],"validMessage":[1,"valid-message"],"required":[8],"selectAllLabel":[1,"select-all-label"],"removeTagsTexts":[16,"remove-tags-texts"],"placement":[1],"searchFilter":[16,"search-filter"],"className":[1,"classname"],"formFieldWidth":[1,"form-field-width"],"variant":[1],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"form":[1],"name":[1],"disabled":[8],"open":[4],"dropdownWidth":[1,"dropdown-width"],"searchLabel":[1,"search-label"],"searchPlaceholder":[1,"search-placeholder"],"showLoading":[4,"show-loading"],"ariaListLabel":[1,"aria-list-label"],"noResultsText":[1,"no-results-text"],"loadingText":[1,"loading-text"],"mobileCloseButtonText":[1,"mobile-close-button-text"],"showClearSelection":[4,"show-clear-selection"],"clearSelectionText":[1,"clear-selection-text"],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_selectId":[32],"_labelId":[32],"_summaryId":[32],"_placeholderId":[32],"_infoTextId":[32],"_validity":[32],"_descByIds":[32],"_selectedLabels":[32],"_selectedLabelsId":[32],"_voiceOverFallback":[32],"_selectedOptions":[32],"selectAllEnabled":[32],"searchEnabled":[32],"amountOptions":[32],"_values":[32],"_options":[32],"_hasNoOptions":[32],"_documentClickListenerCallbackId":[32],"_internalChangeTimestamp":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32],"_searchValue":[32],"selectAllChecked":[32],"selectAllIndeterminate":[32]},null,{"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"]}]]],["p-77ce5cb6",[[4,"db-tabs",{"id":[1],"name":[1],"tabs":[1],"arrowScrollDistance":[8,"arrow-scroll-distance"],"orientation":[1],"behavior":[1],"initialSelectedMode":[1,"initial-selected-mode"],"initialSelectedIndex":[8,"initial-selected-index"],"className":[1,"classname"],"alignment":[1],"width":[1],"_id":[32],"_name":[32],"initialized":[32],"showScrollLeft":[32],"showScrollRight":[32],"scrollContainer":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-695bf91e",[[4,"db-header",{"id":[1],"forceMobile":[8,"force-mobile"],"drawerOpen":[8,"drawer-open"],"className":[1,"classname"],"width":[1],"burgerMenuLabel":[1,"burger-menu-label"],"_id":[32],"initialized":[32],"forcedToMobile":[32]},null,{"initialized":["watch0"]}]]],["p-55f53705",[[4,"db-accordion",{"id":[1],"name":[1],"behavior":[1],"initOpenIndex":[16,"init-open-index"],"items":[1],"className":[1,"classname"],"variant":[1],"_id":[32],"_name":[32],"initialized":[32],"_initOpenIndexDone":[32]},null,{"initialized":["watch0"],"name":["watch0"],"behavior":["watch0"],"_id":["watch0"],"_ref":["watch1","watch2"],"_name":["watch1"],"_initOpenIndexDone":["watch2"],"initOpenIndex":["watch2"]}]]],["p-0d8b6ecd",[[4,"db-checkbox",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"indeterminate":[8],"checked":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"size":[1],"showLabel":[8,"show-label"],"name":[1],"disabled":[8],"value":[8],"ariaDescribedBy":[1,"aria-described-by"],"label":[1],"messageIcon":[1,"message-icon"],"initialized":[32],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0","watch2","watch3"],"invalidMessage":["watch0"],"_id":["watch1"],"initialized":["watch2","watch3"],"indeterminate":["watch2"],"checked":["watch3"]}]]],["p-3fe511ce",[[4,"db-navigation-item",{"subNavigationExpanded":[8,"sub-navigation-expanded"],"id":[1],"className":[1,"classname"],"width":[1],"icon":[1],"showIcon":[8,"show-icon"],"active":[4],"wrap":[8],"disabled":[8],"text":[1],"backButtonId":[1,"back-button-id"],"backButtonText":[1,"back-button-text"],"initialized":[32],"hasAreaPopup":[32],"hasSubNavigation":[32],"isSubNavigationExpanded":[32],"autoClose":[32],"subNavigationId":[32],"navigationItemSafeTriangle":[32]},null,{"subNavigationExpanded":["watch0"],"initialized":["watch1"],"_ref":["watch1"]}]]],["p-0f107c11",[[4,"db-notification",{"id":[1],"className":[1,"classname"],"ariaLive":[1,"aria-live"],"semantic":[1],"variant":[1],"icon":[1],"showIcon":[8,"show-icon"],"linkVariant":[1,"link-variant"],"headline":[8],"showHeadline":[8,"show-headline"],"text":[1],"timestamp":[1],"showTimestamp":[8,"show-timestamp"],"closeable":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]}]]],["p-4c47f2d7",[[4,"db-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"disabled":[8],"name":[1],"size":[2],"autocomplete":[1],"multiple":[4],"ariaDescribedBy":[1,"aria-described-by"],"options":[16],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_placeholderId":[32],"_descByIds":[32],"_value":[32],"initialized":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"initialized":["watch1"],"value":["watch2"]}]]],["p-b0c5f546",[[0,"db-textarea",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"label":[1],"fieldSizing":[1,"field-sizing"],"resize":[1],"showResizer":[8,"show-resizer"],"disabled":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"maxlength":[8],"minlength":[8],"name":[1],"wrap":[1],"spellCheck":[4,"spell-check"],"autocomplete":[1],"ariaDescribedBy":[1,"aria-described-by"],"placeholder":[1],"rows":[8],"cols":[8],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"value":["watch2"]}]]],["p-a107ec7c",[[4,"db-badge",{"placement":[1],"id":[1],"className":[1,"classname"],"semantic":[1],"size":[1],"emphasis":[1],"label":[1],"text":[1],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-36b32211",[[4,"db-brand",{"hideLogo":[4,"hide-logo"],"icon":[1],"showIcon":[8,"show-icon"],"id":[1],"className":[1,"classname"],"text":[1]}]]],["p-5c63036a",[[4,"db-card",{"id":[1],"className":[1,"classname"],"behavior":[1],"elevationLevel":[1,"elevation-level"],"spacing":[1]}]]],["p-cff88428",[[4,"db-custom-select-form-field",{"id":[1],"className":[1,"classname"]}]]],["p-6f1226da",[[0,"db-divider",{"id":[1],"margin":[1],"variant":[1],"emphasis":[1],"width":[1],"className":[1,"classname"]}]]],["p-1face452",[[4,"db-icon",{"id":[1],"className":[1,"classname"],"icon":[1],"weight":[1],"variant":[1],"text":[1]}]]],["p-d5e0c0b5",[[4,"db-link",{"id":[1],"className":[1,"classname"],"href":[1],"target":[1],"rel":[1],"role":[1],"hreflang":[1],"disabled":[8],"selected":[8],"label":[1],"current":[8],"size":[1],"showIcon":[8,"show-icon"],"variant":[1],"content":[1],"text":[1]}]]],["p-87a03fc0",[[4,"db-navigation",{"id":[1],"labelledBy":[1,"labelled-by"],"className":[1,"classname"],"_id":[32]}]]],["p-f71fe126",[[4,"db-page",{"fadeIn":[8,"fade-in"],"documentOverflow":[1,"document-overflow"],"variant":[1],"id":[1],"className":[1,"classname"],"mainClass":[1,"main-class"],"fontsLoaded":[32]}]]],["p-854c0012",[[4,"db-popover",{"placement":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"gap":[8],"animation":[8],"open":[8],"delay":[1],"width":[1],"initialized":[32],"isExpanded":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":["watch0","watch1"],"initialized":["watch0"],"isExpanded":["watch1"]}]]],["p-833f8694",[[4,"db-radio",{"id":[1],"checked":[8],"size":[1],"showLabel":[8,"show-label"],"className":[1,"classname"],"validation":[1],"name":[1],"disabled":[8],"describedbyid":[1],"ariaDescribedBy":[1,"aria-described-by"],"value":[8],"required":[8],"label":[1],"initialized":[32],"_id":[32]},null,{"initialized":["watch0"],"_ref":["watch0"],"checked":["watch0"]}]]],["p-c673c483",[[4,"db-section",{"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"_id":[32]}]]],["p-ca134c76",[[4,"db-stack",{"id":[1],"className":[1,"classname"],"gap":[1],"variant":[1],"direction":[1],"alignment":[1],"justifyContent":[1,"justify-content"],"wrap":[8]}]]],["p-144ebba2",[[4,"db-switch",{"id":[1],"checked":[8],"visualAid":[8,"visual-aid"],"size":[1],"showLabel":[8,"show-label"],"emphasis":[1],"className":[1,"classname"],"value":[8],"disabled":[8],"describedbyid":[1],"ariaDescribedBy":[1,"aria-described-by"],"validation":[1],"name":[1],"required":[8],"icon":[1],"iconAfter":[1,"icon-after"],"label":[1],"_id":[32],"_checked":[32]},null,{"checked":["watch0"]}]]],["p-f60fc221",[[4,"db-drawer",{"open":[8],"backdrop":[1],"variant":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"direction":[1],"rounded":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]},null,{"open":["watch0"]}]]],["p-ef6cda9f",[[4,"db-accordion-item",{"id":[1],"defaultOpen":[4,"default-open"],"name":[1],"className":[1,"classname"],"disabled":[8],"headlinePlain":[1,"headline-plain"],"text":[1],"_id":[32],"_open":[32],"_name":[32],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"],"name":["watch1"]}]]],["p-c8666f4b",[[4,"db-tooltip",{"id":[1],"variant":[1],"placement":[1],"className":[1,"classname"],"emphasis":[1],"animation":[8],"delay":[1],"width":[1],"showArrow":[8,"show-arrow"],"_id":[32],"initialized":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-53f83d20",[[4,"db-tab-item",{"active":[8],"name":[1],"className":[1,"classname"],"id":[1],"icon":[1],"iconAfter":[1,"icon-after"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"disabled":[8],"controls":[1],"checked":[8],"label":[1],"_selected":[32],"_name":[32],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"],"name":["watch1"]}],[4,"db-tab-list",{"id":[1],"className":[1,"classname"],"_id":[32]}],[4,"db-tab-panel",{"className":[1,"classname"],"id":[1],"labelledBy":[1,"labelled-by"],"content":[1]}]]],["p-0bb2fc14",[[4,"db-infotext",{"id":[1],"className":[1,"classname"],"icon":[1],"semantic":[1],"size":[1],"showIcon":[8,"show-icon"],"text":[1]}]]],["p-04fb737c",[[4,"db-input",{"id":[1],"invalidMessage":[1,"invalid-message"],"dataListId":[1,"data-list-id"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"pattern":[1],"dataList":[16,"data-list"],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showIcon":[8,"show-icon"],"icon":[1],"iconAfter":[1,"icon-after"],"label":[1],"fieldSizing":[1,"field-sizing"],"name":[1],"type":[1],"placeholder":[1],"disabled":[8],"step":[8],"maxlength":[8],"minlength":[8],"max":[8],"min":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"size":[2],"autocomplete":[1],"autofocus":[8],"ariaDescribedBy":[1,"aria-described-by"],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_dataListId":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"value":["watch2"]}],[4,"db-tag",{"disabled":[8],"removeButton":[1,"remove-button"],"id":[1],"className":[1,"classname"],"semantic":[1],"emphasis":[1],"icon":[1],"showCheckState":[8,"show-check-state"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"overflow":[8],"text":[1],"behavior":[1],"initialized":[32]},null,{"initialized":["watch0"],"disabled":["watch0"],"_ref":["watch0"]}],[4,"db-custom-select-dropdown",{"id":[1],"className":[1,"classname"],"width":[1]}],[4,"db-custom-select-list",{"multiple":[4],"label":[1],"id":[1],"className":[1,"classname"]}],[4,"db-custom-select-list-item",{"id":[1],"isGroupTitle":[4,"is-group-title"],"showDivider":[4,"show-divider"],"type":[1],"checked":[8],"className":[1,"classname"],"groupTitle":[1,"group-title"],"icon":[1],"showIcon":[8,"show-icon"],"name":[1],"disabled":[8],"value":[8],"label":[1],"_id":[32],"hasDivider":[32]},null,{"isGroupTitle":["watch0"],"showDivider":["watch0"]}]]],["p-c40a990b",[[4,"db-button",{"id":[1],"className":[1,"classname"],"type":[1],"disabled":[8],"label":[1],"icon":[1],"showIcon":[8,"show-icon"],"size":[1],"state":[1],"width":[1],"variant":[1],"noText":[8,"no-text"],"name":[1],"form":[1],"value":[1],"describedbyid":[1],"ariaexpanded":[4],"ariapressed":[4],"text":[1]}]]]]'),e)}));
1
+ import{p as e,b as a}from"./p-Ctmm4hMW.js";export{s as setNonce}from"./p-Ctmm4hMW.js";import{g as i}from"./p-DQuL1Twl.js";var l=()=>{const a=import.meta.url;const i={};if(a!==""){i.resourcesUrl=new URL(".",a).href}return e(i)};l().then((async e=>{await i();return a(JSON.parse('[["p-02e09419",[[4,"db-custom-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"ariaDescribedBy":[1,"aria-described-by"],"showNoResults":[4,"show-no-results"],"multiple":[8],"showSelectAll":[4,"show-select-all"],"showSearch":[4,"show-search"],"values":[16],"validation":[1],"options":[16],"searchValue":[1,"search-value"],"selectedLabels":[1,"selected-labels"],"transformSelectedLabels":[16,"transform-selected-labels"],"selectedType":[1,"selected-type"],"amountText":[1,"amount-text"],"validMessage":[1,"valid-message"],"required":[8],"selectAllLabel":[1,"select-all-label"],"removeTagsTexts":[16,"remove-tags-texts"],"placement":[1],"searchFilter":[16,"search-filter"],"className":[1,"classname"],"formFieldWidth":[1,"form-field-width"],"variant":[1],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"form":[1],"name":[1],"disabled":[8],"open":[4],"dropdownWidth":[1,"dropdown-width"],"searchLabel":[1,"search-label"],"searchPlaceholder":[1,"search-placeholder"],"showLoading":[4,"show-loading"],"ariaListLabel":[1,"aria-list-label"],"noResultsText":[1,"no-results-text"],"loadingText":[1,"loading-text"],"mobileCloseButtonText":[1,"mobile-close-button-text"],"showClearSelection":[4,"show-clear-selection"],"clearSelectionText":[1,"clear-selection-text"],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_selectId":[32],"_labelId":[32],"_summaryId":[32],"_placeholderId":[32],"_infoTextId":[32],"_validity":[32],"_descByIds":[32],"_selectedLabels":[32],"_selectedLabelsId":[32],"_voiceOverFallback":[32],"_selectedOptions":[32],"selectAllEnabled":[32],"searchEnabled":[32],"amountOptions":[32],"_values":[32],"_options":[32],"_hasNoOptions":[32],"_documentClickListenerCallbackId":[32],"_internalChangeTimestamp":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32],"_searchValue":[32],"selectAllChecked":[32],"selectAllIndeterminate":[32]},null,{"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"]}]]],["p-77ce5cb6",[[4,"db-tabs",{"id":[1],"name":[1],"tabs":[1],"arrowScrollDistance":[8,"arrow-scroll-distance"],"orientation":[1],"behavior":[1],"initialSelectedMode":[1,"initial-selected-mode"],"initialSelectedIndex":[8,"initial-selected-index"],"className":[1,"classname"],"alignment":[1],"width":[1],"_id":[32],"_name":[32],"initialized":[32],"showScrollLeft":[32],"showScrollRight":[32],"scrollContainer":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-34d4f584",[[4,"db-header",{"id":[1],"forceMobile":[8,"force-mobile"],"drawerOpen":[8,"drawer-open"],"className":[1,"classname"],"width":[1],"burgerMenuLabel":[1,"burger-menu-label"],"_id":[32],"initialized":[32],"forcedToMobile":[32]},null,{"initialized":["watch0"]}]]],["p-55f53705",[[4,"db-accordion",{"id":[1],"name":[1],"behavior":[1],"initOpenIndex":[16,"init-open-index"],"items":[1],"className":[1,"classname"],"variant":[1],"_id":[32],"_name":[32],"initialized":[32],"_initOpenIndexDone":[32]},null,{"initialized":["watch0"],"name":["watch0"],"behavior":["watch0"],"_id":["watch0"],"_ref":["watch1","watch2"],"_name":["watch1"],"_initOpenIndexDone":["watch2"],"initOpenIndex":["watch2"]}]]],["p-0d8b6ecd",[[4,"db-checkbox",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"indeterminate":[8],"checked":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"size":[1],"showLabel":[8,"show-label"],"name":[1],"disabled":[8],"value":[8],"ariaDescribedBy":[1,"aria-described-by"],"label":[1],"messageIcon":[1,"message-icon"],"initialized":[32],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0","watch2","watch3"],"invalidMessage":["watch0"],"_id":["watch1"],"initialized":["watch2","watch3"],"indeterminate":["watch2"],"checked":["watch3"]}]]],["p-d22637ab",[[4,"db-navigation-item",{"subNavigationExpanded":[8,"sub-navigation-expanded"],"id":[1],"className":[1,"classname"],"width":[1],"icon":[1],"showIcon":[8,"show-icon"],"active":[4],"wrap":[8],"disabled":[8],"text":[1],"backButtonId":[1,"back-button-id"],"backButtonText":[1,"back-button-text"],"initialized":[32],"hasAreaPopup":[32],"hasSubNavigation":[32],"isSubNavigationExpanded":[32],"autoClose":[32],"subNavigationId":[32],"navigationItemSafeTriangle":[32]},null,{"subNavigationExpanded":["watch0"],"initialized":["watch1"],"_ref":["watch1"]}]]],["p-0f107c11",[[4,"db-notification",{"id":[1],"className":[1,"classname"],"ariaLive":[1,"aria-live"],"semantic":[1],"variant":[1],"icon":[1],"showIcon":[8,"show-icon"],"linkVariant":[1,"link-variant"],"headline":[8],"showHeadline":[8,"show-headline"],"text":[1],"timestamp":[1],"showTimestamp":[8,"show-timestamp"],"closeable":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]}]]],["p-4c47f2d7",[[4,"db-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"disabled":[8],"name":[1],"size":[2],"autocomplete":[1],"multiple":[4],"ariaDescribedBy":[1,"aria-described-by"],"options":[16],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_placeholderId":[32],"_descByIds":[32],"_value":[32],"initialized":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"initialized":["watch1"],"value":["watch2"]}]]],["p-b0c5f546",[[0,"db-textarea",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"label":[1],"fieldSizing":[1,"field-sizing"],"resize":[1],"showResizer":[8,"show-resizer"],"disabled":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"maxlength":[8],"minlength":[8],"name":[1],"wrap":[1],"spellCheck":[4,"spell-check"],"autocomplete":[1],"ariaDescribedBy":[1,"aria-described-by"],"placeholder":[1],"rows":[8],"cols":[8],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"value":["watch2"]}]]],["p-a107ec7c",[[4,"db-badge",{"placement":[1],"id":[1],"className":[1,"classname"],"semantic":[1],"size":[1],"emphasis":[1],"label":[1],"text":[1],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-36b32211",[[4,"db-brand",{"hideLogo":[4,"hide-logo"],"icon":[1],"showIcon":[8,"show-icon"],"id":[1],"className":[1,"classname"],"text":[1]}]]],["p-5c63036a",[[4,"db-card",{"id":[1],"className":[1,"classname"],"behavior":[1],"elevationLevel":[1,"elevation-level"],"spacing":[1]}]]],["p-cff88428",[[4,"db-custom-select-form-field",{"id":[1],"className":[1,"classname"]}]]],["p-6f1226da",[[0,"db-divider",{"id":[1],"margin":[1],"variant":[1],"emphasis":[1],"width":[1],"className":[1,"classname"]}]]],["p-1face452",[[4,"db-icon",{"id":[1],"className":[1,"classname"],"icon":[1],"weight":[1],"variant":[1],"text":[1]}]]],["p-d5e0c0b5",[[4,"db-link",{"id":[1],"className":[1,"classname"],"href":[1],"target":[1],"rel":[1],"role":[1],"hreflang":[1],"disabled":[8],"selected":[8],"label":[1],"current":[8],"size":[1],"showIcon":[8,"show-icon"],"variant":[1],"content":[1],"text":[1]}]]],["p-87a03fc0",[[4,"db-navigation",{"id":[1],"labelledBy":[1,"labelled-by"],"className":[1,"classname"],"_id":[32]}]]],["p-f71fe126",[[4,"db-page",{"fadeIn":[8,"fade-in"],"documentOverflow":[1,"document-overflow"],"variant":[1],"id":[1],"className":[1,"classname"],"mainClass":[1,"main-class"],"fontsLoaded":[32]}]]],["p-f3ac974b",[[4,"db-popover",{"placement":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"gap":[8],"animation":[8],"open":[8],"delay":[1],"width":[1],"initialized":[32],"isExpanded":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":["watch0","watch1"],"initialized":["watch0"],"isExpanded":["watch1"]}]]],["p-833f8694",[[4,"db-radio",{"id":[1],"checked":[8],"size":[1],"showLabel":[8,"show-label"],"className":[1,"classname"],"validation":[1],"name":[1],"disabled":[8],"describedbyid":[1],"ariaDescribedBy":[1,"aria-described-by"],"value":[8],"required":[8],"label":[1],"initialized":[32],"_id":[32]},null,{"initialized":["watch0"],"_ref":["watch0"],"checked":["watch0"]}]]],["p-c673c483",[[4,"db-section",{"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"_id":[32]}]]],["p-ca134c76",[[4,"db-stack",{"id":[1],"className":[1,"classname"],"gap":[1],"variant":[1],"direction":[1],"alignment":[1],"justifyContent":[1,"justify-content"],"wrap":[8]}]]],["p-144ebba2",[[4,"db-switch",{"id":[1],"checked":[8],"visualAid":[8,"visual-aid"],"size":[1],"showLabel":[8,"show-label"],"emphasis":[1],"className":[1,"classname"],"value":[8],"disabled":[8],"describedbyid":[1],"ariaDescribedBy":[1,"aria-described-by"],"validation":[1],"name":[1],"required":[8],"icon":[1],"iconAfter":[1,"icon-after"],"label":[1],"_id":[32],"_checked":[32]},null,{"checked":["watch0"]}]]],["p-f60fc221",[[4,"db-drawer",{"open":[8],"backdrop":[1],"variant":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"direction":[1],"rounded":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]},null,{"open":["watch0"]}]]],["p-ef6cda9f",[[4,"db-accordion-item",{"id":[1],"defaultOpen":[4,"default-open"],"name":[1],"className":[1,"classname"],"disabled":[8],"headlinePlain":[1,"headline-plain"],"text":[1],"_id":[32],"_open":[32],"_name":[32],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"],"name":["watch1"]}]]],["p-010a7372",[[4,"db-tooltip",{"id":[1],"variant":[1],"placement":[1],"className":[1,"classname"],"emphasis":[1],"animation":[8],"delay":[1],"width":[1],"showArrow":[8,"show-arrow"],"_id":[32],"initialized":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":["watch0"],"initialized":["watch0"]}]]],["p-53f83d20",[[4,"db-tab-item",{"active":[8],"name":[1],"className":[1,"classname"],"id":[1],"icon":[1],"iconAfter":[1,"icon-after"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"disabled":[8],"controls":[1],"checked":[8],"label":[1],"_selected":[32],"_name":[32],"initialized":[32]},null,{"_ref":["watch0"],"initialized":["watch0"],"name":["watch1"]}],[4,"db-tab-list",{"id":[1],"className":[1,"classname"],"_id":[32]}],[4,"db-tab-panel",{"className":[1,"classname"],"id":[1],"labelledBy":[1,"labelled-by"],"content":[1]}]]],["p-0bb2fc14",[[4,"db-infotext",{"id":[1],"className":[1,"classname"],"icon":[1],"semantic":[1],"size":[1],"showIcon":[8,"show-icon"],"text":[1]}]]],["p-04fb737c",[[4,"db-input",{"id":[1],"invalidMessage":[1,"invalid-message"],"dataListId":[1,"data-list-id"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"pattern":[1],"dataList":[16,"data-list"],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showIcon":[8,"show-icon"],"icon":[1],"iconAfter":[1,"icon-after"],"label":[1],"fieldSizing":[1,"field-sizing"],"name":[1],"type":[1],"placeholder":[1],"disabled":[8],"step":[8],"maxlength":[8],"minlength":[8],"max":[8],"min":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"size":[2],"autocomplete":[1],"autofocus":[8],"ariaDescribedBy":[1,"aria-described-by"],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_dataListId":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32]},null,{"_ref":["watch0"],"invalidMessage":["watch0"],"_id":["watch1"],"value":["watch2"]}],[4,"db-tag",{"disabled":[8],"removeButton":[1,"remove-button"],"id":[1],"className":[1,"classname"],"semantic":[1],"emphasis":[1],"icon":[1],"showCheckState":[8,"show-check-state"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"overflow":[8],"text":[1],"behavior":[1],"initialized":[32]},null,{"initialized":["watch0"],"disabled":["watch0"],"_ref":["watch0"]}],[4,"db-custom-select-dropdown",{"id":[1],"className":[1,"classname"],"width":[1]}],[4,"db-custom-select-list",{"multiple":[4],"label":[1],"id":[1],"className":[1,"classname"]}],[4,"db-custom-select-list-item",{"id":[1],"isGroupTitle":[4,"is-group-title"],"showDivider":[4,"show-divider"],"type":[1],"checked":[8],"className":[1,"classname"],"groupTitle":[1,"group-title"],"icon":[1],"showIcon":[8,"show-icon"],"name":[1],"disabled":[8],"value":[8],"label":[1],"_id":[32],"hasDivider":[32]},null,{"isGroupTitle":["watch0"],"showDivider":["watch0"]}]]],["p-c40a990b",[[4,"db-button",{"id":[1],"className":[1,"classname"],"type":[1],"disabled":[8],"label":[1],"icon":[1],"showIcon":[8,"show-icon"],"size":[1],"state":[1],"width":[1],"variant":[1],"noText":[8,"no-text"],"name":[1],"form":[1],"value":[1],"describedbyid":[1],"ariaexpanded":[4],"ariapressed":[4],"text":[1]}]]]]'),e)}));
2
2
  //# sourceMappingURL=db-ux.esm.js.map
@@ -1,2 +1,2 @@
1
- import"./p-Ctmm4hMW.js";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"./p-DC9V_oNU.js";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"./p-BgQRUWMZ.js";export{N as NavigationItemSafeTriangle,i as isEventTargetNavigationItem}from"./p-BDA9dlfd.js";import"./p-Dgkqk5fN.js";import"./p-BbHrTk7a.js";import"./p-DYeQU2bY.js";const _=["adaptive","neutral","critical","informational","warning","successful"];const L=["medium","small","large","none"];const I=["medium","small","large","none"];const F=["left","right","left-start","left-end","right-start","right-end"];const U=["top","bottom","top-start","top-end","bottom-start","bottom-end"];const O=[...F,...U];const R=["none","3x-large","2x-large","x-large","large","medium","small","x-small","2x-small","3x-small"];const M=["horizontal","vertical"];const V=["full","auto"];const P=["full","medium","large","small"];const G=["none","slow","fast"];const X=["auto","fixed"];const W=["small","medium"];const H=["weak","strong"];const Y=["invalid","valid","no-validation"];const K=["fixed","content"];const Q=["above","floating"];const Z=["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","shipping","billing","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo","webauthn"];const J=["time","true","false","date","page","step","location"];const $=["_self","_blank","_parent","_top"];const aa=["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"];const ea=["start","center"];export{ea as AlignmentList,Z as AutoCompleteList,H as EmphasisList,K as FieldSizingList,R as GapSpacingList,Q as LabelVariantList,J as LinkCurrentList,aa as LinkReferrerPolicyList,$ as LinkTargetList,I as MarginList,P as MaxWidthList,M as OrientationList,F as PlacementHorizontalList,O as PlacementList,U as PlacementVerticalList,G as PopoverDelayList,X as PopoverWidthList,_ as SemanticList,W as SizeList,L as SpacingList,Y as ValidationList,V as WidthList};
1
+ import"./p-Ctmm4hMW.js";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"./p-DC9V_oNU.js";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"./p-BgQRUWMZ.js";export{N as NavigationItemSafeTriangle,i as isEventTargetNavigationItem}from"./p-BFvCp0MI.js";import"./p-Dgkqk5fN.js";import"./p-BbHrTk7a.js";import"./p-BLKCMo7A.js";const _=["adaptive","neutral","critical","informational","warning","successful"];const L=["medium","small","large","none"];const I=["medium","small","large","none"];const F=["left","right","left-start","left-end","right-start","right-end"];const U=["top","bottom","top-start","top-end","bottom-start","bottom-end"];const O=[...F,...U];const M=["none","3x-large","2x-large","x-large","large","medium","small","x-small","2x-small","3x-small"];const R=["horizontal","vertical"];const V=["full","auto"];const P=["full","medium","large","small"];const G=["none","slow","fast"];const X=["auto","fixed"];const W=["small","medium"];const H=["weak","strong"];const K=["invalid","valid","no-validation"];const Y=["fixed","content"];const Q=["above","floating"];const Z=["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","shipping","billing","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo","webauthn"];const J=["time","true","false","date","page","step","location"];const $=["_self","_blank","_parent","_top"];const aa=["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"];const ea=["start","center"];export{ea as AlignmentList,Z as AutoCompleteList,H as EmphasisList,Y as FieldSizingList,M as GapSpacingList,Q as LabelVariantList,J as LinkCurrentList,aa as LinkReferrerPolicyList,$ as LinkTargetList,I as MarginList,P as MaxWidthList,R as OrientationList,F as PlacementHorizontalList,O as PlacementList,U as PlacementVerticalList,G as PopoverDelayList,X as PopoverWidthList,_ as SemanticList,W as SizeList,L as SpacingList,K as ValidationList,V as WidthList};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i}from"./p-Ctmm4hMW.js";import{d as s,u as e,g as a,c as o}from"./p-BgQRUWMZ.js";import{D as d}from"./p-DC9V_oNU.js";import{b as h}from"./p-DYeQU2bY.js";import{D as n}from"./p-Dgkqk5fN.js";const l=class{constructor(i){t(this,i);this._id=d;this.initialized=false;this._documentScrollListenerCallbackId=undefined;this._observer=undefined}handleClick(t){t.stopPropagation()}handleEscape(t){if((!t||t.key==="Escape")&&this._ref&&getComputedStyle(this._ref).visibility==="visible"){this.getParent().blur()}}getParent(){let t=this._ref.parentElement;if(t&&t.localName.includes("tooltip")){t=t.parentElement}return t}handleAutoPlacement(t){if(!t)return;if(this._ref){s((()=>{var i;h(this._ref,t,(i=this.placement)!==null&&i!==void 0?i:"bottom")}),1)}}handleDocumentScroll(t,i){var s,e;if(((s=t===null||t===void 0?void 0:t.target)===null||s===void 0?void 0:s.contains)&&((e=t===null||t===void 0?void 0:t.target)===null||e===void 0?void 0:e.contains(this._ref))){this.handleAutoPlacement(i)}}handleLeave(){var t;if(this._documentScrollListenerCallbackId){(new n).removeCallback(this._documentScrollListenerCallbackId)}(t=this._observer)===null||t===void 0?void 0:t.unobserve(this.getParent())}handleEnter(t){var i;this._documentScrollListenerCallbackId=(new n).addCallback((i=>this.handleDocumentScroll(i,t)));this.handleAutoPlacement(t);(i=this._observer)===null||i===void 0?void 0:i.observe(this.getParent())}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._id){const t=this.getParent();if(t){["mouseenter","focusin"].forEach((i=>{t.addEventListener(i,(()=>this.handleEnter(t)))}));t.addEventListener("keydown",(t=>this.handleEscape(t)));["mouseleave","focusout"].forEach((i=>{t.addEventListener(i,(()=>this.handleLeave()))}));t.setAttribute("data-has-tooltip","true");if(this.variant==="label"){t.setAttribute("aria-labelledby",this._id)}else{t.setAttribute("aria-describedby",this._id)}}if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getParent()));if(i&&!i.isIntersecting){this.handleEscape(false)}}))}this.initialized=false}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tooltip");this._id=this.id||"tooltip-"+e();this.initialized=true;this.watch0Fn()}render(){var t,s;return i("i",{key:"a0d44adddbd75a245b5d3313535d7c62e6559ac1",class:o("db-tooltip",this.className),role:"tooltip","aria-hidden":"true","data-gap":"true",ref:t=>{this._ref=t},id:this._id,"data-emphasis":this.emphasis,"data-animation":a((t=this.animation)!==null&&t!==void 0?t:true),"data-delay":this.delay,"data-width":this.width,"data-show-arrow":a((s=this.showArrow)!==null&&s!==void 0?s:true),"data-placement":this.placement,onClick:t=>this.handleClick(t)},i("slot",{key:"a240d107f6c147f54301bb27f7b528e11a4edd16"}))}static get watchers(){return{_ref:["watch0"],initialized:["watch0"]}}};export{l as db_tooltip};
2
- //# sourceMappingURL=p-c8666f4b.entry.js.map
1
+ import{r as t,h as i}from"./p-Ctmm4hMW.js";import{d as s,u as e,g as a,c as o}from"./p-BgQRUWMZ.js";import{D as d}from"./p-DC9V_oNU.js";import{b as h}from"./p-BLKCMo7A.js";import{D as n}from"./p-Dgkqk5fN.js";const l=class{constructor(i){t(this,i);this._id=d;this.initialized=false;this._documentScrollListenerCallbackId=undefined;this._observer=undefined}handleClick(t){t.stopPropagation()}handleEscape(t){if((!t||t.key==="Escape")&&this._ref&&getComputedStyle(this._ref).visibility==="visible"){this.getParent().blur()}}getParent(){let t=this._ref.parentElement;if(t&&t.localName.includes("tooltip")){t=t.parentElement}return t}handleAutoPlacement(t){if(!t)return;if(this._ref){s((()=>{var i;h(this._ref,t,(i=this.placement)!==null&&i!==void 0?i:"bottom")}),1)}}handleDocumentScroll(t,i){var s,e;if(((s=t===null||t===void 0?void 0:t.target)===null||s===void 0?void 0:s.contains)&&((e=t===null||t===void 0?void 0:t.target)===null||e===void 0?void 0:e.contains(this._ref))){this.handleAutoPlacement(i)}}handleLeave(){var t;if(this._documentScrollListenerCallbackId){(new n).removeCallback(this._documentScrollListenerCallbackId)}(t=this._observer)===null||t===void 0?void 0:t.unobserve(this.getParent())}handleEnter(t){var i;this._documentScrollListenerCallbackId=(new n).addCallback((i=>this.handleDocumentScroll(i,t)));this.handleAutoPlacement(t);(i=this._observer)===null||i===void 0?void 0:i.observe(this.getParent())}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._id){const t=this.getParent();if(t){["mouseenter","focusin"].forEach((i=>{t.addEventListener(i,(()=>this.handleEnter(t)))}));t.addEventListener("keydown",(t=>this.handleEscape(t)));["mouseleave","focusout"].forEach((i=>{t.addEventListener(i,(()=>this.handleLeave()))}));t.setAttribute("data-has-tooltip","true");if(this.variant==="label"){t.setAttribute("aria-labelledby",this._id)}else{t.setAttribute("aria-describedby",this._id)}}if(typeof window!=="undefined"&&"IntersectionObserver"in window){this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getParent()));if(i&&!i.isIntersecting){this.handleEscape(false)}}))}this.initialized=false}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tooltip");this._id=this.id||"tooltip-"+e();this.initialized=true;this.watch0Fn()}render(){var t,s;return i("i",{key:"a0d44adddbd75a245b5d3313535d7c62e6559ac1",class:o("db-tooltip",this.className),role:"tooltip","aria-hidden":"true","data-gap":"true",ref:t=>{this._ref=t},id:this._id,"data-emphasis":this.emphasis,"data-animation":a((t=this.animation)!==null&&t!==void 0?t:true),"data-delay":this.delay,"data-width":this.width,"data-show-arrow":a((s=this.showArrow)!==null&&s!==void 0?s:true),"data-placement":this.placement,onClick:t=>this.handleClick(t)},i("slot",{key:"a240d107f6c147f54301bb27f7b528e11a4edd16"}))}static get watchers(){return{_ref:["watch0"],initialized:["watch0"]}}};export{l as db_tooltip};
2
+ //# sourceMappingURL=p-010a7372.entry.js.map