wj-elements 0.6.0 → 0.7.0

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 (32) hide show
  1. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +1 -1
  2. package/dist/packages/wje-dropdown/dropdown.element.d.ts +18 -0
  3. package/dist/packages/wje-orgchart/orgchart.element.d.ts +15 -0
  4. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +3 -1
  5. package/dist/packages/wje-popup/popup.element.d.ts +48 -1
  6. package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +360 -3
  7. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +11 -0
  8. package/dist/{popup.element-C8-g3WLs.js → popup.element-CwXvVFK7.js} +275 -43
  9. package/dist/popup.element-CwXvVFK7.js.map +1 -0
  10. package/dist/styles.css +0 -38
  11. package/dist/wje-animation.js +1 -1
  12. package/dist/wje-breadcrumbs.js +4 -0
  13. package/dist/wje-breadcrumbs.js.map +1 -1
  14. package/dist/wje-dropdown.js +28 -4
  15. package/dist/wje-dropdown.js.map +1 -1
  16. package/dist/wje-master.js +1 -1
  17. package/dist/wje-orgchart-group.js +1 -1
  18. package/dist/wje-orgchart-item.js +13 -4
  19. package/dist/wje-orgchart-item.js.map +1 -1
  20. package/dist/wje-orgchart.js +27 -0
  21. package/dist/wje-orgchart.js.map +1 -1
  22. package/dist/wje-popup.js +1 -1
  23. package/dist/wje-select.js +28 -5
  24. package/dist/wje-select.js.map +1 -1
  25. package/dist/wje-sliding-container.js +865 -14
  26. package/dist/wje-sliding-container.js.map +1 -1
  27. package/dist/wje-toolbar-action.js +25 -1
  28. package/dist/wje-toolbar-action.js.map +1 -1
  29. package/dist/wje-toolbar.js +1 -1
  30. package/dist/wje-tooltip.js +1 -1
  31. package/package.json +2 -1
  32. package/dist/popup.element-C8-g3WLs.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"wje-sliding-container.js","sources":["../packages/wje-sliding-container/sliding-container.element.js","../packages/wje-sliding-container/sliding-container.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * @summary SlidingContainer is a custom web component that extends WJElement.\n * @documentation https://elements.webjet.sk/components/SlidingContainer\n * @status stable\n * @augments WJElement\n * @csspart - Styles the element.\n * @slot - The default slot for the SlidingContainer.\n * @property {string} maxWidth - The maximum width of the SlidingContainer.\n * @property {string} maxHeight - The maximum height of the SlidingContainer.\n * @property {string} trigger - The trigger for the SlidingContainer.\n * @property {string} direction - Specifies the sliding direction of the container (e.g., 'left' or 'right').\n * @property {string} variant - Determines how the SlidingContainer behaves, such as 'over' or 'in-place'.\n * @property {string} screenBreakPoint - The width (in pixels) at which the SlidingContainer switches to the \"over\" variant for smaller screens.\n * @property {boolean} removeChildAfterClose - Removes the child after the SlidingContainer is closed.\n * @property {string} animationDuration - Specifies the duration (in milliseconds) of the sliding animation.\n * @property {string} animationEasing - Specifies the easing function used for the sliding animation (e.g., 'linear', 'ease-in', 'ease-out').\n * @property {boolean} hasOpacity - Sets the opacity of the SlidingContainer.\n * @tag wje-sliding-container\n * @example\n * <wje-sliding-container trigger=\"test-resize-container-event-right\" id=\"left-in-place\" direction=\"left\" max-width=\"100px\" max-height=\"100%\">\n * <wje-card>\n * <wje-card-header>\n * <wje-card-subtitle>CONTENT Subtitle</wje-card-subtitle>\n * <wje-card-title>CONTENT Title</wje-card-title>\n * </wje-card-header>\n * <wje-card-content>\n * CONTENT Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n * </wje-card-content>\n * </wje-card>\n * </wje-sliding-container>\n */\nexport default class SlidingContainer extends WJElement {\n /**\n * Creates an instance of SlidingContainer.\n * @class\n */\n constructor() {\n super();\n\n this._isOpen = false;\n this._lastCaller = null;\n\n this._resizeObserver = new ResizeObserver((entries) => {\n for (let entry of entries) {\n if (entry.contentBoxSize) {\n if (this.drawingStatus < 3) return;\n\n if (this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {\n if (this.variant !== 'over') {\n this.variant = 'over';\n } else {\n this.checkForVariant(this.variant);\n }\n } else {\n if (this.variant !== 'in-place') {\n this.variant = 'in-place';\n } else {\n this.checkForVariant(this.variant);\n }\n }\n }\n }\n });\n\n this._resizeObserver.observe(document.documentElement);\n }\n\n /**\n * Sets the maximum width of an element by updating the 'max-width' attribute.\n * @param {string} value The maximum width value to be set (e.g., '100px', '50%', etc.).\n */\n set maxWidth(value) {\n this.setAttribute('max-width', value);\n }\n\n /**\n * Gets the maximum width value of the element.\n * Retrieves the value of the 'max-width' attribute. If the attribute is not set, it defaults to 'auto'.\n * @returns {string} The maximum width value of the element or 'auto' if the attribute is not defined.\n */\n get maxWidth() {\n return this.getAttribute('max-width') ?? 'auto';\n }\n\n /**\n * Sets the maximum height for the element.\n * @param {string} value The maximum height value to be applied to the element. This can include units such as \"px\", \"em\", \"%\", etc.\n */\n set maxHeight(value) {\n this.setAttribute('max-height', value);\n }\n\n /**\n * Retrieves the maximum height value of the element, or returns 'auto' if not set.\n * @returns {string} The maximum height value or 'auto' if the attribute is not specified.\n */\n get maxHeight() {\n return this.getAttribute('max-height') ?? 'auto';\n }\n\n /**\n * Sets the 'trigger' attribute for the element.\n * @param {string} value The value to set for the 'trigger' attribute.\n */\n set trigger(value) {\n this.setAttribute('trigger', value);\n }\n\n /**\n * Retrieves the value of the 'trigger' attribute. If the attribute is not set, it defaults to 'sliding-container'.\n * @returns {string} The value of the 'trigger' attribute or the default value 'sliding-container' if not defined.\n */\n get trigger() {\n return this.getAttribute('trigger') ?? 'sliding-container';\n }\n\n /**\n * Sets the direction attribute for the element.\n * @param {string} value The direction value to be assigned. Possible values are typically 'ltr' (left-to-right), 'rtl' (right-to-left), or 'auto'.\n */\n set direction(value) {\n this.setAttribute('direction', value);\n }\n\n /**\n * Retrieves the direction attribute of the instance.\n * If the direction attribute is not set, it defaults to 'right'.\n * @returns {string} The value of the direction attribute or 'right' if not set.\n */\n get direction() {\n return this.getAttribute('direction') ?? 'right';\n }\n\n /**\n * Sets the value of the `remove-child-after-close` attribute.\n * This attribute determines if a child element should be removed after a close operation.\n * @param {boolean|string} value The value to set for the `remove-child-after-close` attribute. The value can be a boolean or a string representation of a boolean.\n */\n set removeChildAfterClose(value) {\n this.setAttribute('remove-child-after-close', value);\n }\n\n /**\n * Gets the value indicating whether the child element should be removed after closing.\n *\n * This property checks the presence of the 'remove-child-after-close' attribute on the element.\n * Returns `false` if the attribute does not exist.\n * @returns {boolean} True if the 'remove-child-after-close' attribute is present, otherwise false.\n */\n get removeChildAfterClose() {\n return this.hasAttribute('remove-child-after-close') ?? false;\n }\n\n /**\n * Sets the 'variant' attribute to the specified value.\n * @param {string} value The value to set for the 'variant' attribute.\n */\n set variant(value) {\n this.setAttribute('variant', value);\n }\n\n /**\n * Retrieves the value of the \"variant\" attribute. If the attribute is not set,\n * it returns the default value 'in-place'.\n * @returns {string} The variant value or the default value 'in-place'.\n */\n get variant() {\n return this.getAttribute('variant') ?? 'in-place';\n }\n\n /**\n * Retrieves the value of the 'screen-break-point' attribute.\n * @returns {string} The value of the 'screen-break-point' attribute.\n */\n get screenBreakPoint() {\n return this.getAttribute('screen-break-point');\n }\n\n /**\n * Sets the screen break point value to determine responsive behavior.\n * @param {string} value The value to set as the screen break point.\n */\n set screenBreakPoint(value) {\n this.setAttribute('screen-break-point', value);\n }\n\n /**\n * Sets the duration of the animation by updating the `animation-duration` attribute.\n * @param {string} value The duration value for the animation, specified in a format\n * such as seconds (e.g., \"2s\") or milliseconds (e.g., \"200ms\").\n */\n set animationDuration(value) {\n this.setAttribute('animation-duration', value);\n }\n\n /**\n * Gets the animation duration for an element.\n * It retrieves the value of the 'animation-duration' attribute if present; otherwise, it defaults to '500'.\n * @returns {string} The value of the animation duration, either from the attribute or the default '500'.\n */\n get animationDuration() {\n return this.getAttribute('animation-duration') ?? '500';\n }\n\n /**\n * Sets the easing function for the animation.\n * @param {string} value The easing function to use for the animation. This can be any valid CSS timing function such as \"ease\", \"linear\", \"ease-in\", \"ease-out\", etc.\n */\n set animationEasing(value) {\n this.setAttribute('animation-easing', value);\n }\n\n /**\n * Retrieves the easing function for the animation.\n * @returns {string} The value of the 'animation-easing' attribute if set, otherwise defaults to 'linear'.\n */\n get animationEasing() {\n return this.getAttribute('animation-easing') ?? 'linear';\n }\n\n /**\n * Determines if the element has an 'has-opacity' attribute.\n * @returns {boolean} True if the element has the 'has-opacity' attribute, otherwise false.\n */\n get hasOpacity() {\n return this.hasAttribute('has-opacity') ?? false;\n }\n\n /**\n * Sets the value of the 'add-to-height' attribute.\n * This attribute is used to modify or adjust the height dynamically.\n * @param {string} value The value to be assigned to the 'add-to-height' attribute.\n */\n set addToHeight(value) {\n this.setAttribute('add-to-height', value);\n }\n\n /**\n * Retrieves the value of the 'add-to-height' attribute from the element.\n * If the attribute is not set, it defaults to '0'.\n * @returns {string} The value of the 'add-to-height' attribute or '0' if the attribute is not present.\n */\n get addToHeight() {\n return this.getAttribute('add-to-height') ?? '0';\n }\n\n /**\n * Determines whether the current state is open.\n * @returns {boolean} True if the state is open, otherwise false.\n */\n get isOpen() {\n return this._isOpen;\n }\n\n className = 'SlidingContainer';\n\n /**\n * Returns the observed attributes for the component.\n * @returns {string[]}\n */\n static get observedAttributes() {\n return ['max-width', 'max-height', 'trigger', 'direction', 'variant', 'screen-break-point', 'remove-child-after-close', 'animation-duration', 'animation-easing', 'has-opacity'];\n }\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n this.syncAria();\n }\n\n /**\n * Executes before drawing the element.\n */\n beforeDraw() {\n this.animation?.cancel();\n this.nativeAnimation?.cancel();\n\n document.removeEventListener(this.trigger, this.triggerEvent);\n }\n\n /**\n * Draws the component.\n * @param {object} context The context for drawing.\n * @param {object} store The store for drawing.\n * @param {object} params The parameters for drawing.\n * @returns {DocumentFragment}\n */\n draw(context, store, params) {\n let fragment = document.createDocumentFragment();\n\n let wrapperDiv = document.createElement('div');\n wrapperDiv.classList.add('sliding-container-wrapper');\n\n let transparentDiv = document.createElement('div');\n transparentDiv.classList.add('sliding-container-transparent');\n\n if (this._isOpen) {\n transparentDiv.style.width = this.maxWidth;\n }\n\n let native = document.createElement('div');\n native.setAttribute('part', 'sliding-container');\n native.classList.add('native-sliding-container');\n native.style.width = 0;\n if (this.hasOpacity) {\n native.style.opacity = 0;\n }\n\n if (this._isOpen) {\n native.style.width = this.maxWidth;\n if (this.hasOpacity) {\n native.style.opacity = 1;\n }\n }\n\n if (this.direction === 'right') {\n native.style.right = 0;\n } else {\n native.style.left = 0;\n }\n\n let slot = document.createElement('slot');\n\n const nativeInner = document.createElement('div');\n nativeInner.classList.add('native-sliding-container-inner');\n nativeInner.style.width = this.maxWidth;\n\n // APPEND\n nativeInner.append(slot);\n nativeInner.append(this.htmlCloseButton());\n\n native.append(nativeInner);\n\n wrapperDiv.append(transparentDiv);\n wrapperDiv.append(native);\n\n fragment.append(wrapperDiv);\n\n this.transparentDiv = transparentDiv;\n this.wrapperDiv = wrapperDiv\n this.nativeElement = native;\n\n return fragment;\n }\n\n /**\n * Performs actions after the element is drawn on the screen.\n * Attaches an event listener to the document based on the specified trigger.\n * Sets the variant to \"over\" if the document width is smaller than the screen break point.\n * Calls the checkForVariant method with the current variant.\n */\n afterDraw() {\n this.syncAria();\n document.addEventListener(this.trigger, this.triggerEvent);\n\n // if document width is on small screen set variant to over\n if (this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {\n this.variant = 'over';\n }\n\n this.checkForVariant(this.variant);\n }\n\n /**\n * Sync ARIA attributes on host.\n */\n syncAria() {\n if (!this.hasAttribute('role')) {\n this.setAriaState({ role: 'region' });\n }\n\n this.setAriaState({ hidden: !this.isOpen });\n\n const ariaLabel = this.getAttribute('aria-label');\n const label = this.getAttribute('label');\n if (!ariaLabel && label) {\n this.setAriaState({ label });\n }\n }\n\n /**\n * Creates and returns a styled close button element with an icon,\n * including an event listener to trigger the close method.\n * @returns {HTMLElement} The close button element configured with styles, an icon, and event listener.\n */\n htmlCloseButton() {\n let closeButton = document.createElement('wje-button');\n closeButton.setAttribute('part', 'close-button');\n closeButton.classList.add('close-button');\n\n let icon = document.createElement('wje-icon');\n icon.setAttribute('slot', 'icon-only');\n icon.setAttribute('name', 'x');\n\n closeButton.append(icon);\n\n event.addListener(closeButton, 'wje-button:click', null,(e) => {\n this.close();\n });\n\n return closeButton;\n }\n\n /**\n * Retrieves the parent element of the current element.\n * If the parent element is not found, it attempts to find the root host element.\n * @returns {Element|null} The parent element or the root host element if no parent exists. Returns null if neither is found.\n */\n getParentElement() {\n let parentElement = this.parentElement;\n\n if (!parentElement) {\n parentElement = this.getRootNode().host;\n }\n\n return parentElement;\n }\n\n /**\n * Adjusts the position and dimensions of the current element based on the specified variant.\n *\n * The method handles modifications to the element's positioning style, aligns it relative to its parent,\n * and manages alignment to its siblings based on the specified direction.\n * @param {string} variant The variant to determine how the element should be updated. For example, when set to 'over', specific adjustments to the position and size are performed.\n * @returns {void} No value is returned, the method modifies the element's style properties directly.\n */\n checkForVariant(variant) {\n if (variant === 'over') {\n this.style.position = 'fixed';\n let computentStyleOfParent = window.getComputedStyle(this.getParentElement());\n let parentElementBoundingbox = this.getParentElement().getBoundingClientRect();\n let heightOfParrentElement = parseFloat(computentStyleOfParent.height);\n\n let topOfParrentElement = parseFloat(computentStyleOfParent.top);\n\n this.style.height = heightOfParrentElement + +this.addToHeight + 'px';\n this.wrapperDiv.style.height = heightOfParrentElement + +this.addToHeight + 'px';\n this.style.top = topOfParrentElement + 'px';\n\n const leftSibling = this.previousElementSibling;\n const rightSibling = this.nextElementSibling;\n const leftSiblingBoundingbox = leftSibling?.getBoundingClientRect();\n const rightSiblingBoundingbox = rightSibling?.getBoundingClientRect();\n\n if (this.direction === 'right') {\n // attach to left sibling\n if (leftSiblingBoundingbox) {\n this.style.left = leftSiblingBoundingbox.left + leftSiblingBoundingbox.width + 'px';\n } else {\n this.style.left = parentElementBoundingbox.left + 'px';\n }\n } else {\n // attach to right sibling\n if (rightSiblingBoundingbox) {\n this.style.right = window.innerWidth - rightSiblingBoundingbox.left + 'px';\n } else {\n this.style.right =\n window.innerWidth - (parentElementBoundingbox.left + parentElementBoundingbox.width) + 'px';\n }\n }\n }\n }\n\n /**\n * Triggers the event based on the target element.\n * If the target element is different from the last caller, it refreshes the children by calling the `open` method.\n * If the target element is the same as the last caller, it toggles the state by calling the `toggle` method.\n * @param {Event} e The event object.\n */\n triggerEvent = async (e) => {\n if (this._lastCaller && this._lastCaller !== e.composedPath()[0]) {\n // same oppener event but different caller so just refresh inner content\n await this.open(e);\n } else {\n // came caller so toggle\n await this.toggle(e);\n }\n\n this._lastCaller = e.composedPath()[0];\n };\n\n /**\n * Executes before the element is opened.\n */\n beforeOpen(e) {\n // Hook for extending behavior before the dialog opens\n }\n\n /**\n * Callback function called after the element is opened.\n */\n afterOpen(e) {\n // Hook for extending behavior before the dialog opens\n }\n\n /**\n * Executes before closing the element.\n */\n beforeClose(e) {\n // Hook for extending behavior before the dialog opens\n }\n\n /**\n * Callback function that is called after the container is closed.\n */\n afterClose(e) {\n // Hook for extending behavior before the dialog opens\n }\n\n /**\n * Animates the transition of elements with specified options, toggling the visibility and/or dimensions\n * of the associated elements based on their current state.\n *\n * This method handles both forward and reverse animations for two elements (`transparentDiv` and `nativeElement`)\n * with optional opacity changes. It ensures smooth transitioning by canceling any previous animations on the provided\n * elements before initiating a new animation sequence.\n * @returns {Promise<void>} A promise that resolves when the transition animation is completed.\n */\n doAnimateTransition() {\n const options = {\n delay: 0,\n endDelay: 0,\n fill: 'forwards',\n duration: +this.animationDuration,\n iterationStart: 0,\n iterations: 1,\n direction: 'normal',\n easing: this.animationEasing,\n };\n\n if (this.animation && this.animation?.effect?.target !== this.transparentDiv) {\n this.animation.cancel();\n this.animation = null;\n }\n\n if (this.nativeAnimation && this.nativeAnimation?.effect?.target !== this.nativeElement) {\n this.nativeAnimation.cancel();\n this.nativeAnimation = null;\n }\n\n if (!this._isOpen) {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.transparentDiv.animate(\n [\n {\n width: 0,\n },\n {\n width: this.maxWidth,\n },\n ],\n options\n );\n\n this.nativeAnimation = this.nativeElement.animate(\n [\n {\n ...(this.hasOpacity ? { opacity: 0 } : {}),\n width: 0,\n },\n {\n ...(this.hasOpacity ? { opacity: 1 } : {}),\n width: this.maxWidth,\n },\n ],\n options\n );\n }\n } else {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.transparentDiv.animate(\n [\n {\n width: this.maxWidth,\n },\n {\n width: 0,\n },\n ],\n options\n );\n\n this.nativeAnimation = this.nativeElement.animate(\n [\n {\n ...(this.hasOpacity ? { opacity: 1 } : {}),\n width: this.maxWidth,\n },\n {\n ...(this.hasOpacity ? { opacity: 0 } : {}),\n width: 0,\n },\n ],\n options\n );\n }\n }\n\n return new Promise((resolve, reject) => {\n this.animation.onfinish = () => {\n this._isOpen = !this._isOpen;\n resolve();\n };\n });\n }\n\n /**\n * Opens the sliding container by performing necessary preparatory and transitional operations.\n * @param {Event} e The event that triggered the open operation.\n * @returns {Promise<void>} A promise that resolves when the open operation, including animations and subsequent handlers, is complete.\n */\n async open(e) {\n await Promise.resolve(this.beforeOpen(e)).then(async () => {\n if (!this._isOpen) {\n this.classList.add('open');\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:beforeOpen')\n\n this.checkForVariant(this.variant);\n\n await this.doAnimateTransition();\n this.syncAria();\n\n await Promise.resolve(this.afterOpen(e)).then(() => {\n event.dispatchCustomEvent(this, 'wje-sliding-container:open')\n });\n }\n });\n }\n\n /**\n * Closes the sliding container and performs associated operations such as animations and event dispatches.\n * @param {Event} e The event object associated with the close action.\n * @returns {Promise<void>} A promise that resolves when the closing operation, including animations and child element removal, is completed.\n */\n async close(e) {\n await Promise.resolve(this.beforeClose(e)).then(async () => {\n if (this._isOpen) {\n this.classList.remove('open');\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:beforeClose');\n\n await this.doAnimateTransition();\n this.syncAria();\n\n await Promise.resolve(this.afterClose(e)).then(() => {\n if (this.removeChildAfterClose) {\n this.childNodes.forEach((child) => {\n child.remove();\n });\n }\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:afterClose');\n });\n }\n });\n }\n\n /**\n * Toggles the state between open and closed.\n * @param {Event} e The event object triggering the toggle.\n * @returns {Promise<void>} A promise that resolves once the toggle operation (open or close) is complete.\n */\n async toggle(e) {\n if (this._isOpen) {\n await this.close(event);\n } else {\n await this.open(event);\n }\n }\n\n /**\n * Cleans up resources associated with the component by disconnecting\n * the resize observer and setting it to null.\n * @returns {void} Does not return a value.\n */\n componentCleanup() {\n this._resizeObserver?.disconnect();\n this._resizeObserver = null;\n }\n}\n","import SlidingContainer from './sliding-container.element.js';\n\nexport default SlidingContainer;\n\nSlidingContainer.define('wje-sliding-container', SlidingContainer);\n"],"names":[],"mappings":";;;;;;AAkCe,MAAM,yBAAyB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,cAAc;AACV,UAAK;AAyNT,qCAAY;AAkOZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCAAe,OAAO,MAAM;AACxB,UAAI,KAAK,eAAe,KAAK,gBAAgB,EAAE,aAAY,EAAG,CAAC,GAAG;AAE9D,cAAM,KAAK,KAAK,CAAC;AAAA,MACrB,OAAO;AAEH,cAAM,KAAK,OAAO,CAAC;AAAA,MACvB;AAEA,WAAK,cAAc,EAAE,aAAY,EAAG,CAAC;AAAA,IACzC;AAncI,SAAK,UAAU;AACf,SAAK,cAAc;AAEnB,SAAK,kBAAkB,IAAI,eAAe,CAAC,YAAY;AACnD,eAAS,SAAS,SAAS;AACvB,YAAI,MAAM,gBAAgB;A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ages/wje-sliding-container/sliding-container.element.js","../packages/wje-sliding-container/sliding-container.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\nlet documentScrollLocks = 0;\nlet documentScrollState = null;\n\n/**\n * @summary SlidingContainer is a custom web component that extends WJElement.\n * @documentation https://elements.webjet.sk/components/SlidingContainer\n * @status stable\n * @augments WJElement\n * @csspart backdrop - Styles the mobile bottom sheet backdrop.\n * @csspart sliding-container - Styles the native sliding panel.\n * @csspart close-button - Styles the generated close button.\n * @csspart sheet-handle-area - Styles the draggable resize handle hit area.\n * @csspart sheet-handle - Styles the visible draggable resize handle.\n * @slot - The default slot for the SlidingContainer.\n * @property {string} maxWidth - The maximum width of the SlidingContainer.\n * @property {string} maxHeight - The maximum height of the SlidingContainer.\n * @property {string} trigger - The trigger for the SlidingContainer.\n * @property {string} direction - Specifies the sliding direction of the container (e.g., 'left' or 'right').\n * @property {string} variant - Determines how the SlidingContainer behaves, such as 'over' or 'in-place'.\n * @property {string} screenBreakPoint - The width (in pixels) at which the SlidingContainer switches to the \"over\" variant for smaller screens.\n * @property {boolean} removeChildAfterClose - Removes the child after the SlidingContainer is closed.\n * @property {string} animationDuration - Specifies the duration (in milliseconds) of the sliding animation.\n * @property {string} animationEasing - Specifies the easing function used for the sliding animation (e.g., 'linear', 'ease-in', 'ease-out').\n * @property {boolean} hasOpacity - Sets the opacity of the SlidingContainer.\n * @property {string} mobilePresentation - Enables mobile presentation, for example 'bottom-sheet'.\n * @property {string} mobileBreakPoint - The viewport width where mobile presentation becomes active.\n * @property {boolean} backdropDismiss - Closes the mobile bottom sheet when the backdrop is clicked.\n * @property {boolean} sheetResizable - Enables mobile bottom sheet resizing.\n * @property {string} sheetScope - Defines whether the mobile bottom sheet is scoped to the container or viewport.\n * @property {string} sheetBoundary - CSS selector for the composed ancestor that bounds the mobile bottom sheet.\n * @property {string} sheetHeight - The mobile bottom sheet height after opening.\n * @property {string} sheetMinHeight - The minimum mobile bottom sheet height while resizing.\n * @property {string} sheetMaxHeight - The maximum mobile bottom sheet height while resizing.\n * @attribute {string} mobile-presentation - Enables responsive mobile presentation. Use \"bottom-sheet\".\n * @attribute {string} mobile-break-point - Viewport width where mobile presentation becomes active. Defaults to \"768\".\n * @attribute {boolean} backdrop-dismiss - Closes the mobile bottom sheet when the backdrop is clicked.\n * @attribute {boolean} sheet-resizable - Enables resizing the mobile bottom sheet with a handle.\n * @attribute {string} sheet-scope - Defines whether the sheet is scoped to \"viewport\", \"parent\", or a bounded container.\n * @attribute {string} sheet-boundary - CSS selector for the composed ancestor that bounds the mobile bottom sheet.\n * @attribute {string} sheet-height - The mobile bottom sheet height after opening.\n * @attribute {string} sheet-min-height - The minimum mobile bottom sheet height while resizing.\n * @attribute {string} sheet-max-height - The maximum mobile bottom sheet height while resizing.\n * @cssproperty [--wje-sliding-container-background=var(--wje-background)] - Background of the sliding panel.\n * @cssproperty [--wje-sliding-container-backdrop-background=var(--wje-backdrop)] - Background of the mobile bottom sheet backdrop.\n * @cssproperty [--wje-sliding-container-backdrop-opacity=1] - Backdrop opacity while the mobile bottom sheet is open.\n * @cssproperty [--wje-sliding-container-box-shadow=var(--wje-sliding-container-shadow)] - Shadow of the mobile bottom sheet panel.\n * @cssproperty [--wje-sliding-container-sheet-border-radius=var(--wje-sliding-container-border-radius) var(--wje-sliding-container-border-radius) 0 0] - Border radius of the mobile bottom sheet panel.\n * @cssproperty [--wje-sliding-container-sheet-handle-area-height=24px] - Height of the resize handle hit area.\n * @cssproperty [--wje-sliding-container-sheet-handle-width=36px] - Width of the visible resize handle.\n * @cssproperty [--wje-sliding-container-sheet-handle-height=2px] - Height of the visible resize handle.\n * @cssproperty [--wje-sliding-container-sheet-handle-background=var(--wje-border-color)] - Background of the visible resize handle.\n * @cssproperty [--wje-sliding-container-sheet-handle-radius=999px] - Border radius of the visible resize handle.\n * @tag wje-sliding-container\n * @example\n * <wje-sliding-container trigger=\"test-resize-container-event-right\" id=\"left-in-place\" direction=\"left\" max-width=\"100px\" max-height=\"100%\">\n * <wje-card>\n * <wje-card-header>\n * <wje-card-subtitle>CONTENT Subtitle</wje-card-subtitle>\n * <wje-card-title>CONTENT Title</wje-card-title>\n * </wje-card-header>\n * <wje-card-content>\n * CONTENT Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n * </wje-card-content>\n * </wje-card>\n * </wje-sliding-container>\n */\nexport default class SlidingContainer extends WJElement {\n /**\n * Creates an instance of SlidingContainer.\n * @class\n */\n constructor() {\n super();\n\n this._isOpen = false;\n this._lastCaller = null;\n this._sheetDrag = null;\n this._sheetIgnoreDismissUntil = 0;\n this._sheetBackdropGesture = null;\n this._sheetBackdropHandledUntil = 0;\n this._hasLockedDocumentScroll = false;\n this._bottomSheetScopeFrame = null;\n\n this._resizeObserver = new ResizeObserver((entries) => {\n for (let entry of entries) {\n if (entry.contentBoxSize) {\n if (this.drawingStatus < 3) return;\n\n if (this.isBottomSheet()) {\n this.checkForVariant(this.variant);\n } else if (this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {\n if (this.variant !== 'over') {\n this.variant = 'over';\n } else {\n this.checkForVariant(this.variant);\n }\n } else {\n if (this.variant !== 'in-place') {\n this.variant = 'in-place';\n } else {\n this.checkForVariant(this.variant);\n }\n }\n }\n }\n });\n\n this._resizeObserver.observe(document.documentElement);\n }\n\n /**\n * Sets the maximum width of an element by updating the 'max-width' attribute.\n * @param {string} value The maximum width value to be set (e.g., '100px', '50%', etc.).\n */\n set maxWidth(value) {\n this.setAttribute('max-width', value);\n }\n\n /**\n * Gets the maximum width value of the element.\n * Retrieves the value of the 'max-width' attribute. If the attribute is not set, it defaults to 'auto'.\n * @returns {string} The maximum width value of the element or 'auto' if the attribute is not defined.\n */\n get maxWidth() {\n return this.getAttribute('max-width') ?? 'auto';\n }\n\n /**\n * Sets the maximum height for the element.\n * @param {string} value The maximum height value to be applied to the element. This can include units such as \"px\", \"em\", \"%\", etc.\n */\n set maxHeight(value) {\n this.setAttribute('max-height', value);\n }\n\n /**\n * Retrieves the maximum height value of the element, or returns 'auto' if not set.\n * @returns {string} The maximum height value or 'auto' if the attribute is not specified.\n */\n get maxHeight() {\n return this.getAttribute('max-height') ?? 'auto';\n }\n\n /**\n * Sets the 'trigger' attribute for the element.\n * @param {string} value The value to set for the 'trigger' attribute.\n */\n set trigger(value) {\n this.setAttribute('trigger', value);\n }\n\n /**\n * Retrieves the value of the 'trigger' attribute. If the attribute is not set, it defaults to 'sliding-container'.\n * @returns {string} The value of the 'trigger' attribute or the default value 'sliding-container' if not defined.\n */\n get trigger() {\n return this.getAttribute('trigger') ?? 'sliding-container';\n }\n\n /**\n * Sets the direction attribute for the element.\n * @param {string} value The direction value to be assigned. Possible values are typically 'ltr' (left-to-right), 'rtl' (right-to-left), or 'auto'.\n */\n set direction(value) {\n this.setAttribute('direction', value);\n }\n\n /**\n * Retrieves the direction attribute of the instance.\n * If the direction attribute is not set, it defaults to 'right'.\n * @returns {string} The value of the direction attribute or 'right' if not set.\n */\n get direction() {\n return this.getAttribute('direction') ?? 'right';\n }\n\n /**\n * Sets the value of the `remove-child-after-close` attribute.\n * This attribute determines if a child element should be removed after a close operation.\n * @param {boolean|string} value The value to set for the `remove-child-after-close` attribute. The value can be a boolean or a string representation of a boolean.\n */\n set removeChildAfterClose(value) {\n this.setAttribute('remove-child-after-close', value);\n }\n\n /**\n * Gets the value indicating whether the child element should be removed after closing.\n *\n * This property checks the presence of the 'remove-child-after-close' attribute on the element.\n * Returns `false` if the attribute does not exist.\n * @returns {boolean} True if the 'remove-child-after-close' attribute is present, otherwise false.\n */\n get removeChildAfterClose() {\n return this.hasAttribute('remove-child-after-close') ?? false;\n }\n\n /**\n * Sets the 'variant' attribute to the specified value.\n * @param {string} value The value to set for the 'variant' attribute.\n */\n set variant(value) {\n this.setAttribute('variant', value);\n }\n\n /**\n * Retrieves the value of the \"variant\" attribute. If the attribute is not set,\n * it returns the default value 'in-place'.\n * @returns {string} The variant value or the default value 'in-place'.\n */\n get variant() {\n return this.getAttribute('variant') ?? 'in-place';\n }\n\n /**\n * Retrieves the value of the 'screen-break-point' attribute.\n * @returns {string} The value of the 'screen-break-point' attribute.\n */\n get screenBreakPoint() {\n return this.getAttribute('screen-break-point');\n }\n\n /**\n * Sets the screen break point value to determine responsive behavior.\n * @param {string} value The value to set as the screen break point.\n */\n set screenBreakPoint(value) {\n this.setAttribute('screen-break-point', value);\n }\n\n /**\n * Sets mobile presentation mode.\n * @param {string} value The mobile presentation mode.\n */\n set mobilePresentation(value) {\n this.setAttribute('mobile-presentation', value);\n }\n\n /**\n * Gets mobile presentation mode.\n * @returns {string|null} The mobile presentation mode.\n */\n get mobilePresentation() {\n return this.getAttribute('mobile-presentation');\n }\n\n /**\n * Sets the breakpoint for mobile presentation.\n * @param {string} value The mobile breakpoint.\n */\n set mobileBreakPoint(value) {\n this.setAttribute('mobile-break-point', value);\n }\n\n /**\n * Gets the breakpoint for mobile presentation.\n * @returns {string} The mobile breakpoint.\n */\n get mobileBreakPoint() {\n return this.getAttribute('mobile-break-point') || '768';\n }\n\n /**\n * Sets the duration of the animation by updating the `animation-duration` attribute.\n * @param {string} value The duration value for the animation, specified in a format\n * such as seconds (e.g., \"2s\") or milliseconds (e.g., \"200ms\").\n */\n set animationDuration(value) {\n this.setAttribute('animation-duration', value);\n }\n\n /**\n * Gets the animation duration for an element.\n * It retrieves the value of the 'animation-duration' attribute if present; otherwise, it defaults to '500'.\n * @returns {string} The value of the animation duration, either from the attribute or the default '500'.\n */\n get animationDuration() {\n return this.getAttribute('animation-duration') ?? '500';\n }\n\n /**\n * Sets the easing function for the animation.\n * @param {string} value The easing function to use for the animation. This can be any valid CSS timing function such as \"ease\", \"linear\", \"ease-in\", \"ease-out\", etc.\n */\n set animationEasing(value) {\n this.setAttribute('animation-easing', value);\n }\n\n /**\n * Retrieves the easing function for the animation.\n * @returns {string} The value of the 'animation-easing' attribute if set, otherwise defaults to 'linear'.\n */\n get animationEasing() {\n return this.getAttribute('animation-easing') ?? 'linear';\n }\n\n /**\n * Determines if the element has an 'has-opacity' attribute.\n * @returns {boolean} True if the element has the 'has-opacity' attribute, otherwise false.\n */\n get hasOpacity() {\n return this.hasAttribute('has-opacity') ?? false;\n }\n\n /**\n * Determines if the bottom sheet should close when the backdrop is clicked.\n * @returns {boolean} True if backdrop dismiss is enabled.\n */\n get backdropDismiss() {\n return this.hasAttribute('backdrop-dismiss') ?? false;\n }\n\n /**\n * Enables resizing for the mobile bottom sheet.\n * @returns {boolean} True if the sheet can be resized.\n */\n get sheetResizable() {\n return this.hasAttribute('sheet-resizable') ?? false;\n }\n\n /**\n * Sets resizing for the mobile bottom sheet.\n * @param {boolean|string} value The value to set.\n */\n set sheetResizable(value) {\n this.setAttribute('sheet-resizable', value);\n }\n\n /**\n * Gets the mobile bottom sheet scope.\n * @returns {string} Either 'viewport', 'container', or 'parent'.\n */\n get sheetScope() {\n return this.getAttribute('sheet-scope') || 'viewport';\n }\n\n /**\n * Sets the mobile bottom sheet scope.\n * @param {string} value The new boundary mode for the mobile sheet.\n */\n set sheetScope(value) {\n this.setAttribute('sheet-scope', value);\n }\n\n /**\n * Gets the selector used for container-scoped mobile bottom sheets.\n * @returns {string|null} A CSS selector used to find the composed boundary ancestor.\n */\n get sheetBoundary() {\n return this.getAttribute('sheet-boundary');\n }\n\n /**\n * Sets the selector used for container-scoped mobile bottom sheets.\n * @param {string} value Selector for the boundary element.\n */\n set sheetBoundary(value) {\n this.setAttribute('sheet-boundary', value);\n }\n\n /**\n * Gets the mobile bottom sheet opening height.\n * @returns {string|null} The opening height.\n */\n get sheetHeight() {\n return this.getAttribute('sheet-height');\n }\n\n /**\n * Sets the mobile bottom sheet opening height.\n * @param {string} value The opening height.\n */\n set sheetHeight(value) {\n this.setAttribute('sheet-height', value);\n }\n\n /**\n * Gets the minimum mobile bottom sheet height while resizing.\n * @returns {string|null} The minimum height.\n */\n get sheetMinHeight() {\n return this.getAttribute('sheet-min-height');\n }\n\n /**\n * Sets the minimum mobile bottom sheet height while resizing.\n * @param {string} value The minimum height.\n */\n set sheetMinHeight(value) {\n this.setAttribute('sheet-min-height', value);\n }\n\n /**\n * Gets the maximum mobile bottom sheet height while resizing.\n * @returns {string|null} The maximum height.\n */\n get sheetMaxHeight() {\n return this.getAttribute('sheet-max-height');\n }\n\n /**\n * Sets the maximum mobile bottom sheet height while resizing.\n * @param {string} value The maximum height.\n */\n set sheetMaxHeight(value) {\n this.setAttribute('sheet-max-height', value);\n }\n\n /**\n * Sets the value of the 'add-to-height' attribute.\n * This attribute is used to modify or adjust the height dynamically.\n * @param {string} value The value to be assigned to the 'add-to-height' attribute.\n */\n set addToHeight(value) {\n this.setAttribute('add-to-height', value);\n }\n\n /**\n * Retrieves the value of the 'add-to-height' attribute from the element.\n * If the attribute is not set, it defaults to '0'.\n * @returns {string} The value of the 'add-to-height' attribute or '0' if the attribute is not present.\n */\n get addToHeight() {\n return this.getAttribute('add-to-height') ?? '0';\n }\n\n /**\n * Determines whether the current state is open.\n * @returns {boolean} True if the state is open, otherwise false.\n */\n get isOpen() {\n return this._isOpen;\n }\n\n className = 'SlidingContainer';\n\n /**\n * Returns the observed attributes for the component.\n * @returns {string[]}\n */\n static get observedAttributes() {\n return ['max-width', 'max-height', 'trigger', 'direction', 'variant', 'screen-break-point', 'remove-child-after-close', 'animation-duration', 'animation-easing', 'has-opacity', 'mobile-presentation', 'mobile-break-point', 'backdrop-dismiss', 'sheet-resizable', 'sheet-scope', 'sheet-boundary', 'sheet-height', 'sheet-min-height', 'sheet-max-height'];\n }\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n this.syncAria();\n }\n\n /**\n * Executes before drawing the element.\n */\n beforeDraw() {\n this.animation?.cancel();\n this.nativeAnimation?.cancel();\n this.endSheetDrag();\n\n document.removeEventListener(this.trigger, this.triggerEvent);\n }\n\n /**\n * Draws the component.\n * @param {object} context The context for drawing.\n * @param {object} store The store for drawing.\n * @param {object} params The parameters for drawing.\n * @returns {DocumentFragment}\n */\n draw(context, store, params) {\n let fragment = document.createDocumentFragment();\n const isBottomSheet = this.isBottomSheet();\n\n let backdrop = document.createElement('div');\n backdrop.setAttribute('part', 'backdrop');\n backdrop.classList.add('sliding-container-backdrop');\n if (this._isOpen && isBottomSheet) {\n backdrop.style.opacity = 'var(--wje-sliding-container-backdrop-opacity, 1)';\n }\n backdrop.addEventListener('wheel', this.preventBottomSheetScroll, { passive: false });\n backdrop.addEventListener('touchmove', this.preventBottomSheetScroll, { passive: false });\n\n if (this.backdropDismiss) {\n backdrop.addEventListener('pointerdown', this.handleBackdropPointerStart);\n backdrop.addEventListener('pointermove', this.handleBackdropPointerMove);\n backdrop.addEventListener('pointerup', this.handleBackdropPointerEnd);\n backdrop.addEventListener('pointercancel', this.handleBackdropPointerCancel);\n backdrop.addEventListener('click', (e) => {\n if (this.isEventInsideSheet(e) || Date.now() < this._sheetIgnoreDismissUntil || Date.now() < this._sheetBackdropHandledUntil) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (e.target === backdrop) {\n this.close(e);\n }\n });\n }\n\n let wrapperDiv = document.createElement('div');\n wrapperDiv.classList.add('sliding-container-wrapper');\n\n let transparentDiv = document.createElement('div');\n transparentDiv.classList.add('sliding-container-transparent');\n\n if (this._isOpen && !isBottomSheet) {\n transparentDiv.style.width = this.maxWidth;\n }\n\n let native = document.createElement('div');\n native.setAttribute('part', 'sliding-container');\n native.classList.add('native-sliding-container');\n native.style.width = isBottomSheet ? '100%' : 0;\n if (this.hasOpacity) {\n native.style.opacity = 0;\n }\n\n if (this._isOpen) {\n native.style.width = isBottomSheet ? '100%' : this.maxWidth;\n if (isBottomSheet) {\n native.style.transform = 'translateY(0)';\n }\n if (this.hasOpacity) {\n native.style.opacity = 1;\n }\n } else if (isBottomSheet) {\n native.style.transform = 'translateY(100%)';\n }\n\n if (isBottomSheet) {\n native.style.left = 0;\n native.style.right = 0;\n native.style.bottom = 0;\n native.style.maxHeight = this.maxHeight;\n } else if (this.direction === 'right') {\n native.style.right = 0;\n } else {\n native.style.left = 0;\n }\n\n const nativeInner = document.createElement('div');\n nativeInner.classList.add('native-sliding-container-inner');\n nativeInner.style.width = isBottomSheet ? '100%' : this.maxWidth;\n if (isBottomSheet) {\n nativeInner.style.maxHeight = this.maxHeight;\n }\n\n let slot = document.createElement('slot');\n this.sheetHandleArea = null;\n\n // APPEND\n nativeInner.append(slot);\n nativeInner.append(this.htmlCloseButton());\n\n if (this.sheetResizable) {\n native.append(this.htmlSheetHandle());\n }\n native.append(nativeInner);\n\n wrapperDiv.append(transparentDiv);\n wrapperDiv.append(native);\n\n fragment.append(backdrop);\n fragment.append(wrapperDiv);\n\n this.backdropElement = backdrop;\n this.transparentDiv = transparentDiv;\n this.wrapperDiv = wrapperDiv;\n this.nativeElement = native;\n this.nativeInner = nativeInner;\n\n return fragment;\n }\n\n /**\n * Performs actions after the element is drawn on the screen.\n * Attaches an event listener to the document based on the specified trigger.\n * Sets the variant to \"over\" if the document width is smaller than the screen break point.\n * Calls the checkForVariant method with the current variant.\n */\n afterDraw() {\n this.syncAria();\n document.addEventListener(this.trigger, this.triggerEvent);\n\n // if document width is on small screen set variant to over\n if (!this.isBottomSheet() && this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {\n this.variant = 'over';\n }\n\n this.checkForVariant(this.variant);\n }\n\n /**\n * Returns whether the mobile bottom sheet presentation is active.\n * @returns {boolean}\n */\n isBottomSheet() {\n return this.mobilePresentation === 'bottom-sheet' && window.innerWidth <= +this.mobileBreakPoint;\n }\n\n /**\n * Sync ARIA attributes on host.\n */\n syncAria() {\n if (!this.hasAttribute('role')) {\n this.setAriaState({ role: 'region' });\n }\n\n this.setAriaState({ hidden: !this.isOpen });\n\n const ariaLabel = this.getAttribute('aria-label');\n const label = this.getAttribute('label');\n if (!ariaLabel && label) {\n this.setAriaState({ label });\n }\n }\n\n /**\n * Creates and returns a styled close button element with an icon,\n * including an event listener to trigger the close method.\n * @returns {HTMLElement} The close button element configured with styles, an icon, and event listener.\n */\n htmlCloseButton() {\n let closeButton = document.createElement('wje-button');\n closeButton.setAttribute('part', 'close-button');\n closeButton.classList.add('close-button');\n\n let icon = document.createElement('wje-icon');\n icon.setAttribute('slot', 'icon-only');\n icon.setAttribute('name', 'x');\n\n closeButton.append(icon);\n\n event.addListener(closeButton, 'wje-button:click', null,(e) => {\n this.close();\n });\n\n return closeButton;\n }\n\n /**\n * Creates the mobile bottom sheet resize handle.\n * @returns {HTMLElement} The resize handle element.\n */\n htmlSheetHandle() {\n const handleArea = document.createElement('div');\n handleArea.setAttribute('part', 'sheet-handle-area');\n handleArea.setAttribute('role', 'separator');\n handleArea.setAttribute('aria-orientation', 'horizontal');\n handleArea.classList.add('sliding-container-sheet-handle-area');\n\n const handle = document.createElement('div');\n handle.setAttribute('part', 'sheet-handle');\n handle.classList.add('sliding-container-sheet-handle');\n\n handleArea.append(handle);\n handleArea.addEventListener('pointerdown', this.handleSheetDragStart, { capture: true });\n handleArea.addEventListener('touchstart', this.handleSheetTouchStart, { capture: true, passive: false });\n handleArea.addEventListener('click', this.stopSheetHandleEvent, { capture: true });\n handleArea.addEventListener('mousedown', this.stopSheetHandleEvent, { capture: true });\n handleArea.addEventListener('mouseup', this.stopSheetHandleEvent, { capture: true });\n\n this.sheetHandleArea = handleArea;\n\n return handleArea;\n }\n\n /**\n * Retrieves the parent element of the current element.\n * If the parent element is not found, it attempts to find the root host element.\n * @returns {Element|null} The parent element or the root host element if no parent exists. Returns null if neither is found.\n */\n getParentElement() {\n let parentElement = this.parentElement;\n\n if (!parentElement) {\n parentElement = this.getRootNode().host;\n }\n\n return parentElement;\n }\n\n /**\n * Finds the closest element across shadow DOM boundaries.\n * @param {string} selector The selector to match.\n * @returns {Element|null} The matched composed ancestor.\n */\n getClosestComposedElement(selector) {\n let currentElement = this;\n\n while (currentElement) {\n let matches = false;\n\n try {\n matches = currentElement instanceof Element && currentElement.matches(selector);\n } catch {\n return null;\n }\n\n if (matches) {\n return currentElement;\n }\n\n if (currentElement.parentElement) {\n currentElement = currentElement.parentElement;\n continue;\n }\n\n const root = currentElement.getRootNode?.();\n currentElement = root instanceof ShadowRoot ? root.host : null;\n }\n\n return null;\n }\n\n /**\n * Returns the viewport frame.\n * @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}\n */\n getViewportFrame() {\n return {\n top: 0,\n left: 0,\n right: window.innerWidth,\n bottom: window.innerHeight,\n width: window.innerWidth,\n height: window.innerHeight,\n };\n }\n\n /**\n * Returns the element that bounds the mobile bottom sheet.\n * @returns {Element|null} The scope element, or null for viewport scope.\n */\n getBottomSheetScopeElement() {\n if (this.sheetScope === 'viewport') return null;\n if (this.sheetScope === 'parent') return this.getParentElement();\n if (this.sheetBoundary) return this.getClosestComposedElement(this.sheetBoundary);\n\n return this.getParentElement();\n }\n\n /**\n * Returns the frame used by the mobile bottom sheet.\n * @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}\n */\n getBottomSheetScopeFrame() {\n const scopeElement = this.getBottomSheetScopeElement();\n if (!scopeElement) return this.getViewportFrame();\n\n const rect = scopeElement.getBoundingClientRect();\n const top = Math.max(rect.top, 0);\n const left = Math.max(rect.left, 0);\n const right = Math.min(rect.right, window.innerWidth);\n const bottom = Math.min(rect.bottom, window.innerHeight);\n const width = right - left;\n const height = bottom - top;\n\n if (width <= 0 || height <= 0) {\n return this.getViewportFrame();\n }\n\n return {\n top,\n left,\n right,\n bottom,\n width,\n height,\n };\n }\n\n /**\n * Applies a fixed frame to a bottom sheet layer.\n * @param {HTMLElement|SlidingContainer} element The element to update.\n * @param {object} frame The frame to apply.\n */\n setBottomSheetLayerFrame(element, frame) {\n element.style.top = frame.top + 'px';\n element.style.left = frame.left + 'px';\n element.style.right = 'auto';\n element.style.bottom = 'auto';\n element.style.width = frame.width + 'px';\n element.style.height = frame.height + 'px';\n }\n\n /**\n * Removes fixed frame styles from a bottom sheet layer.\n * @param {HTMLElement|SlidingContainer} element The element to reset.\n */\n resetBottomSheetLayerFrame(element) {\n element?.style.removeProperty('top');\n element?.style.removeProperty('left');\n element?.style.removeProperty('right');\n element?.style.removeProperty('bottom');\n element?.style.removeProperty('width');\n element?.style.removeProperty('height');\n }\n\n /**\n * Adjusts the position and dimensions of the current element based on the specified variant.\n *\n * The method handles modifications to the element's positioning style, aligns it relative to its parent,\n * and manages alignment to its siblings based on the specified direction.\n * @param {string} variant The variant to determine how the element should be updated. For example, when set to 'over', specific adjustments to the position and size are performed.\n * @returns {void} No value is returned, the method modifies the element's style properties directly.\n */\n checkForVariant(variant) {\n if (this.isBottomSheet()) {\n this.setBottomSheetVariant();\n return;\n }\n\n this.resetBottomSheetVariant();\n\n if (variant === 'over') {\n this.style.position = 'fixed';\n let computentStyleOfParent = window.getComputedStyle(this.getParentElement());\n let parentElementBoundingbox = this.getParentElement().getBoundingClientRect();\n let heightOfParrentElement = parseFloat(computentStyleOfParent.height);\n\n let topOfParrentElement = parseFloat(computentStyleOfParent.top);\n\n this.style.height = heightOfParrentElement + +this.addToHeight + 'px';\n this.wrapperDiv.style.height = heightOfParrentElement + +this.addToHeight + 'px';\n this.style.top = topOfParrentElement + 'px';\n\n const leftSibling = this.previousElementSibling;\n const rightSibling = this.nextElementSibling;\n const leftSiblingBoundingbox = leftSibling?.getBoundingClientRect();\n const rightSiblingBoundingbox = rightSibling?.getBoundingClientRect();\n\n if (this.direction === 'right') {\n // attach to left sibling\n if (leftSiblingBoundingbox) {\n this.style.left = leftSiblingBoundingbox.left + leftSiblingBoundingbox.width + 'px';\n } else {\n this.style.left = parentElementBoundingbox.left + 'px';\n }\n } else {\n // attach to right sibling\n if (rightSiblingBoundingbox) {\n this.style.right = window.innerWidth - rightSiblingBoundingbox.left + 'px';\n } else {\n this.style.right =\n window.innerWidth - (parentElementBoundingbox.left + parentElementBoundingbox.width) + 'px';\n }\n }\n }\n }\n\n /**\n * Applies the mobile bottom sheet layout.\n */\n setBottomSheetVariant() {\n const scopeFrame = this.getBottomSheetScopeFrame();\n this._bottomSheetScopeFrame = scopeFrame;\n\n this.classList.add('bottom-sheet');\n this.style.position = 'fixed';\n this.setBottomSheetLayerFrame(this, scopeFrame);\n this.setBottomSheetLayerFrame(this.backdropElement, scopeFrame);\n this.setBottomSheetLayerFrame(this.wrapperDiv, scopeFrame);\n\n this.wrapperDiv.style.height = '100%';\n this.transparentDiv.style.width = 0;\n\n this.nativeElement.style.left = scopeFrame.left + 'px';\n this.nativeElement.style.right = 'auto';\n this.nativeElement.style.bottom = window.innerHeight - scopeFrame.bottom + 'px';\n this.nativeElement.style.top = 'auto';\n this.nativeElement.style.width = scopeFrame.width + 'px';\n if (this._sheetDrag) {\n this.nativeElement.style.maxHeight = this.getSheetMaxHeightInPixels() + 'px';\n } else {\n this.setSheetHeight();\n }\n this.setBottomSheetVisualState(this.classList.contains('open'));\n\n this.nativeInner.style.width = '100%';\n this.nativeInner.style.maxHeight = this.nativeElement.style.maxHeight;\n }\n\n /**\n * Removes layout styles managed by the mobile bottom sheet mode.\n */\n resetBottomSheetVariant() {\n if (!this.classList.contains('bottom-sheet')) return;\n\n this.classList.remove('bottom-sheet');\n this.style.removeProperty('position');\n this.resetBottomSheetLayerFrame(this);\n\n this.resetBottomSheetLayerFrame(this.backdropElement);\n this.resetBottomSheetLayerFrame(this.wrapperDiv);\n if (this.transparentDiv) {\n this.transparentDiv.style.width = this._isOpen ? this.maxWidth : 0;\n }\n this.nativeElement?.style.removeProperty('left');\n this.nativeElement?.style.removeProperty('right');\n this.nativeElement?.style.removeProperty('bottom');\n this.nativeElement?.style.removeProperty('top');\n this.nativeElement?.style.removeProperty('height');\n this.nativeElement?.style.removeProperty('max-height');\n this.nativeElement?.style.removeProperty('transform');\n if (this.nativeElement) {\n if (this.direction === 'right') {\n this.nativeElement.style.right = 0;\n } else {\n this.nativeElement.style.left = 0;\n }\n this.nativeElement.style.width = this._isOpen ? this.maxWidth : 0;\n }\n this.nativeInner?.style.removeProperty('max-height');\n if (this.nativeInner) {\n this.nativeInner.style.width = this.maxWidth;\n }\n this.backdropElement?.style.removeProperty('opacity');\n this._bottomSheetScopeFrame = null;\n this.endSheetDrag();\n this.unlockDocumentScroll();\n }\n\n /**\n * Applies the current visual open or closed state to the mobile bottom sheet.\n * @param {boolean} isOpen True when the sheet should be visible.\n */\n setBottomSheetVisualState(isOpen) {\n this.nativeElement.style.transform = isOpen ? 'translateY(0)' : 'translateY(100%)';\n\n if (this.hasOpacity) {\n this.nativeElement.style.opacity = isOpen ? 1 : 0;\n }\n\n this.backdropElement.style.opacity = isOpen ? 'var(--wje-sliding-container-backdrop-opacity, 1)' : 0;\n }\n\n /**\n * Gets the CSS height limit used for the mobile bottom sheet.\n * @returns {string} The CSS max height.\n */\n getSheetMaxHeight() {\n return this.sheetMaxHeight || this.maxHeight;\n }\n\n /**\n * Applies the configured bottom sheet opening height.\n */\n setSheetHeight() {\n const maxHeightInPixels = this.getSheetMaxHeightInPixels();\n\n this.nativeElement.style.maxHeight = maxHeightInPixels + 'px';\n\n if (!this.sheetHeight) {\n this.nativeElement.style.removeProperty('height');\n return;\n }\n\n const minHeight = Math.min(this.getSheetMinHeightInPixels(), maxHeightInPixels);\n const height = this.resolveCssHeight(this.sheetHeight, maxHeightInPixels);\n const clampedHeight = this.clamp(height, minHeight, maxHeightInPixels);\n\n this.nativeElement.style.height = clampedHeight + 'px';\n }\n\n /**\n * Resolves the sheet minimum height in pixels.\n * @returns {number} The minimum height.\n */\n getSheetMinHeightInPixels() {\n const availableHeight = this.getBottomSheetAvailableHeight();\n\n return Math.min(\n this.resolveCssHeight(this.sheetMinHeight || '30vh', availableHeight * 0.3),\n availableHeight\n );\n }\n\n /**\n * Resolves the sheet maximum height in pixels.\n * @returns {number} The maximum height.\n */\n getSheetMaxHeightInPixels() {\n const availableHeight = this.getBottomSheetAvailableHeight();\n\n return Math.min(\n this.resolveCssHeight(this.getSheetMaxHeight(), availableHeight * 0.9),\n availableHeight\n );\n }\n\n /**\n * Returns available height for the bottom sheet scope.\n * @returns {number} Pixel height that can be used inside the current sheet frame.\n */\n getBottomSheetAvailableHeight() {\n return this._bottomSheetScopeFrame?.height || this.getBottomSheetScopeFrame().height || window.innerHeight;\n }\n\n /**\n * Resolves a CSS height value against the viewport.\n * @param {string} value The configured sheet height.\n * @param {number} fallback The fallback height in pixels.\n * @returns {number} The resolved height.\n */\n resolveCssHeight(value, fallback) {\n if (!value || value === 'auto') return fallback;\n\n const normalizedValue = `${value}`.trim();\n const parsedValue = Number.parseFloat(normalizedValue);\n\n if (Number.isNaN(parsedValue)) return fallback;\n if (normalizedValue.endsWith('px')) return parsedValue;\n if (normalizedValue.endsWith('vh')) return window.innerHeight * parsedValue / 100;\n if (normalizedValue.endsWith('vw')) return window.innerWidth * parsedValue / 100;\n if (normalizedValue.endsWith('%')) return window.innerHeight * parsedValue / 100;\n if (/^-?\\d+(\\.\\d+)?$/.test(normalizedValue)) return parsedValue;\n\n return fallback;\n }\n\n /**\n * Clamps a number between min and max.\n * @param {number} value The measured height.\n * @param {number} min The minimum.\n * @param {number} max The maximum.\n * @returns {number} The clamped value.\n */\n clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n }\n\n /**\n * Stops a handle interaction from dismissing the bottom sheet.\n * @param {Event} e The interaction emitted by the resize handle.\n */\n stopSheetHandleEvent = (e) => {\n if (!this.isBottomSheet()) return;\n\n this._sheetIgnoreDismissUntil = Date.now() + 500;\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n };\n\n /**\n * Checks whether an event came from the resize handle.\n * @param {Event} e The event to check.\n * @returns {boolean} True when the event belongs to the resize handle.\n */\n isSheetHandleEvent(e) {\n if (!e?.composedPath) return false;\n\n return e.composedPath().includes(this.sheetHandleArea);\n }\n\n /**\n * Checks whether an event happened inside the visible bottom sheet.\n * @param {Event} e The event to check.\n * @returns {boolean} True when the event coordinates are inside the sheet.\n */\n isEventInsideSheet(e) {\n if (!this.nativeElement || typeof e?.clientX !== 'number' || typeof e?.clientY !== 'number') return false;\n\n const rect = this.nativeElement.getBoundingClientRect();\n\n return e.clientX >= rect.left\n && e.clientX <= rect.right\n && e.clientY >= rect.top\n && e.clientY <= rect.bottom;\n }\n\n /**\n * Prevents scroll events from reaching the page behind the bottom sheet.\n * @param {Event} e The scroll event.\n */\n preventBottomSheetScroll = (e) => {\n if (!this.isBottomSheet() || !this.classList.contains('open')) return;\n\n e.preventDefault();\n e.stopPropagation();\n };\n\n /**\n * Prevents the page behind the mobile bottom sheet from scrolling.\n */\n lockDocumentScroll() {\n if (!this.isBottomSheet() || this.sheetScope !== 'viewport' || this._hasLockedDocumentScroll) return;\n\n if (documentScrollLocks === 0) {\n documentScrollState = {\n bodyOverflow: document.body.style.overflow,\n documentOverflow: document.documentElement.style.overflow,\n bodyOverscrollBehavior: document.body.style.overscrollBehavior,\n documentOverscrollBehavior: document.documentElement.style.overscrollBehavior,\n bodyPosition: document.body.style.position,\n bodyTop: document.body.style.top,\n bodyLeft: document.body.style.left,\n bodyRight: document.body.style.right,\n bodyWidth: document.body.style.width,\n scrollX: window.scrollX,\n scrollY: window.scrollY,\n };\n\n document.body.style.overflow = 'hidden';\n document.documentElement.style.overflow = 'hidden';\n document.body.style.overscrollBehavior = 'none';\n document.documentElement.style.overscrollBehavior = 'none';\n document.body.style.position = 'fixed';\n document.body.style.top = `-${documentScrollState.scrollY}px`;\n document.body.style.left = `-${documentScrollState.scrollX}px`;\n document.body.style.right = '0';\n document.body.style.width = '100%';\n }\n\n documentScrollLocks++;\n this._hasLockedDocumentScroll = true;\n }\n\n /**\n * Restores page scrolling after the mobile bottom sheet is closed.\n */\n unlockDocumentScroll() {\n if (!this._hasLockedDocumentScroll) return;\n\n documentScrollLocks = Math.max(documentScrollLocks - 1, 0);\n this._hasLockedDocumentScroll = false;\n\n if (documentScrollLocks > 0 || !documentScrollState) return;\n\n document.body.style.overflow = documentScrollState.bodyOverflow;\n document.documentElement.style.overflow = documentScrollState.documentOverflow;\n document.body.style.overscrollBehavior = documentScrollState.bodyOverscrollBehavior;\n document.documentElement.style.overscrollBehavior = documentScrollState.documentOverscrollBehavior;\n document.body.style.position = documentScrollState.bodyPosition;\n document.body.style.top = documentScrollState.bodyTop;\n document.body.style.left = documentScrollState.bodyLeft;\n document.body.style.right = documentScrollState.bodyRight;\n document.body.style.width = documentScrollState.bodyWidth;\n window.scrollTo(documentScrollState.scrollX, documentScrollState.scrollY);\n documentScrollState = null;\n }\n\n /**\n * Stores the initial drag state for the mobile bottom sheet.\n * @param {number|string} pointerId The pointer identifier.\n * @param {number} startY The starting Y coordinate.\n */\n startSheetDrag(pointerId, startY) {\n if (this.classList.contains('open')) {\n this.setBottomSheetVisualState(true);\n }\n\n this.animation?.cancel();\n this.nativeAnimation?.cancel();\n this.animation = null;\n this.nativeAnimation = null;\n\n const fallbackHeight = this.resolveCssHeight(this.sheetHeight, window.innerHeight * 0.5);\n const currentHeight = this.nativeElement.getBoundingClientRect().height || fallbackHeight;\n\n this._sheetDrag = {\n pointerId,\n startY,\n startHeight: currentHeight,\n minHeight: this.getSheetMinHeightInPixels(),\n maxHeight: this.getSheetMaxHeightInPixels(),\n hasMoved: false,\n };\n }\n\n /**\n * Applies a new height while the bottom sheet is being dragged.\n * @param {number} clientY The current Y coordinate.\n */\n updateSheetDrag(clientY) {\n const distance = this._sheetDrag.startY - clientY;\n if (Math.abs(distance) > 3) {\n this._sheetDrag.hasMoved = true;\n }\n\n const height = this.clamp(\n this._sheetDrag.startHeight + distance,\n this._sheetDrag.minHeight,\n this._sheetDrag.maxHeight\n );\n\n this.nativeElement.style.height = height + 'px';\n }\n\n /**\n * Starts mobile bottom sheet resizing.\n * @param {PointerEvent} e The pointer event.\n */\n handleSheetDragStart = (e) => {\n if (!this.sheetResizable || !this.isBottomSheet()) return;\n\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n\n this._sheetIgnoreDismissUntil = Date.now() + 500;\n\n if (this._sheetDrag) return;\n\n this.startSheetDrag(e.pointerId, e.clientY);\n\n try {\n this.sheetHandleArea?.setPointerCapture(e.pointerId);\n } catch {\n // Synthetic pointer events in tests may not own a pointer capture.\n }\n\n window.addEventListener('pointermove', this.handleSheetDragMove);\n window.addEventListener('pointerup', this.handleSheetDragEnd);\n window.addEventListener('pointercancel', this.handleSheetDragEnd);\n };\n\n /**\n * Starts mobile bottom sheet resizing from a touch event.\n * @param {TouchEvent} e The touch event.\n */\n handleSheetTouchStart = (e) => {\n if (!this.sheetResizable || !this.isBottomSheet() || this._sheetDrag) return;\n\n const touch = e.touches?.[0];\n if (!touch) return;\n\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n\n this._sheetIgnoreDismissUntil = Date.now() + 500;\n this.startSheetDrag('touch', touch.clientY);\n\n window.addEventListener('touchmove', this.handleSheetTouchMove, { passive: false });\n window.addEventListener('touchend', this.handleSheetTouchEnd, { passive: false });\n window.addEventListener('touchcancel', this.handleSheetTouchEnd, { passive: false });\n };\n\n /**\n * Starts tracking a possible backdrop dismiss tap.\n * @param {PointerEvent} e The pointer event.\n */\n handleBackdropPointerStart = (e) => {\n if (!this.isBottomSheet()\n || e.target !== this.backdropElement\n || this.isEventInsideSheet(e)\n || Date.now() < this._sheetIgnoreDismissUntil) {\n this._sheetBackdropGesture = null;\n return;\n }\n\n this._sheetBackdropGesture = {\n pointerId: e.pointerId,\n startX: e.clientX,\n startY: e.clientY,\n hasMoved: false,\n };\n };\n\n /**\n * Tracks movement during a possible backdrop dismiss tap.\n * @param {PointerEvent} e The pointer event.\n */\n handleBackdropPointerMove = (e) => {\n if (!this._sheetBackdropGesture || e.pointerId !== this._sheetBackdropGesture.pointerId) return;\n\n const distanceX = Math.abs(e.clientX - this._sheetBackdropGesture.startX);\n const distanceY = Math.abs(e.clientY - this._sheetBackdropGesture.startY);\n\n if (distanceX > 8 || distanceY > 8) {\n this._sheetBackdropGesture.hasMoved = true;\n }\n };\n\n /**\n * Finishes a possible backdrop dismiss tap.\n * @param {PointerEvent} e The pointer event.\n */\n handleBackdropPointerEnd = (e) => {\n if (!this._sheetBackdropGesture || e.pointerId !== this._sheetBackdropGesture.pointerId) return;\n\n const shouldClose = !this._sheetBackdropGesture.hasMoved\n && e.target === this.backdropElement\n && !this.isEventInsideSheet(e)\n && Date.now() >= this._sheetIgnoreDismissUntil;\n\n this._sheetBackdropGesture = null;\n this._sheetBackdropHandledUntil = Date.now() + 350;\n\n if (shouldClose) {\n e.preventDefault();\n e.stopPropagation();\n this.close(e);\n }\n };\n\n /**\n * Cancels a possible backdrop dismiss tap.\n */\n handleBackdropPointerCancel = () => {\n this._sheetBackdropGesture = null;\n this._sheetBackdropHandledUntil = Date.now() + 350;\n };\n\n /**\n * Resizes the mobile bottom sheet during dragging.\n * @param {PointerEvent} e The pointer event.\n */\n handleSheetDragMove = (e) => {\n if (!this._sheetDrag || e.pointerId !== this._sheetDrag.pointerId) return;\n\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n\n this.updateSheetDrag(e.clientY);\n };\n\n /**\n * Resizes the mobile bottom sheet during touch dragging.\n * @param {TouchEvent} e The touch event.\n */\n handleSheetTouchMove = (e) => {\n if (!this._sheetDrag || this._sheetDrag.pointerId !== 'touch') return;\n\n const touch = e.touches?.[0];\n if (!touch) return;\n\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n\n this.updateSheetDrag(touch.clientY);\n };\n\n /**\n * Ends mobile bottom sheet resizing.\n * @param {PointerEvent} e The pointer event.\n */\n handleSheetDragEnd = (e) => {\n const hasMoved = this._sheetDrag?.hasMoved;\n\n if (this._sheetDrag && e?.pointerId === this._sheetDrag.pointerId) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation?.();\n\n try {\n this.sheetHandleArea?.releasePointerCapture(e.pointerId);\n } catch {\n // Synthetic pointer events in tests may not own a pointer capture.\n }\n }\n\n if (hasMoved) {\n this._sheetIgnoreDismissUntil = Date.now() + 350;\n } else {\n this._sheetIgnoreDismissUntil = Date.now() + 500;\n }\n\n this.endSheetDrag();\n };\n\n /**\n * Ends mobile bottom sheet resizing from a touch event.\n * @param {TouchEvent} e The touch event.\n */\n handleSheetTouchEnd = (e) => {\n if (!this._sheetDrag || this._sheetDrag.pointerId !== 'touch') return;\n\n const hasMoved = this._sheetDrag.hasMoved;\n\n if (e.type !== 'touchcancel') {\n e.preventDefault();\n }\n e.stopPropagation();\n if (e.type !== 'touchcancel') {\n e.stopImmediatePropagation?.();\n }\n\n this._sheetIgnoreDismissUntil = Date.now() + (hasMoved ? 350 : 700);\n this.endSheetDrag();\n };\n\n /**\n * Cleans up mobile bottom sheet resizing listeners.\n */\n endSheetDrag() {\n window.removeEventListener('pointermove', this.handleSheetDragMove);\n window.removeEventListener('pointerup', this.handleSheetDragEnd);\n window.removeEventListener('pointercancel', this.handleSheetDragEnd);\n window.removeEventListener('touchmove', this.handleSheetTouchMove);\n window.removeEventListener('touchend', this.handleSheetTouchEnd);\n window.removeEventListener('touchcancel', this.handleSheetTouchEnd);\n this._sheetDrag = null;\n }\n\n /**\n * Triggers the event based on the target element.\n * If the target element is different from the last caller, it refreshes the children by calling the `open` method.\n * If the target element is the same as the last caller, it toggles the state by calling the `toggle` method.\n * @param {Event} e The event object.\n */\n triggerEvent = async (e) => {\n if (this._lastCaller && this._lastCaller !== e.composedPath()[0]) {\n // same oppener event but different caller so just refresh inner content\n await this.open(e);\n } else {\n // came caller so toggle\n await this.toggle(e);\n }\n\n this._lastCaller = e.composedPath()[0];\n };\n\n /**\n * Executes before the element is opened.\n */\n beforeOpen(e) {\n // Hook for extending behavior before the dialog opens\n }\n\n /**\n * Callback function called after the element is opened.\n */\n afterOpen(e) {\n // Hook for extending behavior after the dialog opens\n }\n\n /**\n * Executes before closing the element.\n */\n beforeClose(e) {\n // Hook for extending behavior before the dialog closes\n }\n\n /**\n * Callback function that is called after the container is closed.\n */\n afterClose(e) {\n // Hook for extending behavior after the dialog closes\n }\n\n /**\n * Animates the transition of elements with specified options, toggling the visibility and/or dimensions\n * of the associated elements based on their current state.\n *\n * This method handles both forward and reverse animations for two elements (`transparentDiv` and `nativeElement`)\n * with optional opacity changes. It ensures smooth transitioning by canceling any previous animations on the provided\n * elements before initiating a new animation sequence.\n * @returns {Promise<void>} A promise that resolves when the transition animation is completed.\n */\n doAnimateTransition() {\n const options = {\n delay: 0,\n endDelay: 0,\n fill: 'forwards',\n duration: +this.animationDuration,\n iterationStart: 0,\n iterations: 1,\n direction: 'normal',\n easing: this.animationEasing,\n };\n\n if (this.isBottomSheet()) {\n return this.doAnimateBottomSheetTransition(options);\n }\n\n if (this.animation && this.animation?.effect?.target !== this.transparentDiv) {\n this.animation.cancel();\n this.animation = null;\n }\n\n if (this.nativeAnimation && this.nativeAnimation?.effect?.target !== this.nativeElement) {\n this.nativeAnimation.cancel();\n this.nativeAnimation = null;\n }\n\n if (!this._isOpen) {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.transparentDiv.animate(\n [\n {\n width: 0,\n },\n {\n width: this.maxWidth,\n },\n ],\n options\n );\n\n this.nativeAnimation = this.nativeElement.animate(\n [\n {\n ...(this.hasOpacity ? { opacity: 0 } : {}),\n width: 0,\n },\n {\n ...(this.hasOpacity ? { opacity: 1 } : {}),\n width: this.maxWidth,\n },\n ],\n options\n );\n }\n } else {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.transparentDiv.animate(\n [\n {\n width: this.maxWidth,\n },\n {\n width: 0,\n },\n ],\n options\n );\n\n this.nativeAnimation = this.nativeElement.animate(\n [\n {\n ...(this.hasOpacity ? { opacity: 1 } : {}),\n width: this.maxWidth,\n },\n {\n ...(this.hasOpacity ? { opacity: 0 } : {}),\n width: 0,\n },\n ],\n options\n );\n }\n }\n\n return new Promise((resolve) => {\n this.animation.onfinish = () => {\n this._isOpen = !this._isOpen;\n resolve();\n };\n });\n }\n\n /**\n * Animates the mobile bottom sheet and its backdrop.\n * @param {object} options Web Animation options.\n * @returns {Promise<void>}\n */\n doAnimateBottomSheetTransition(options) {\n const shouldOpen = !this._isOpen;\n const closedBackdrop = {\n opacity: 0,\n };\n const openBackdrop = {\n opacity: 'var(--wje-sliding-container-backdrop-opacity, 1)',\n };\n const closedSheet = {\n ...(this.hasOpacity ? { opacity: 0 } : {}),\n transform: 'translateY(100%)',\n };\n const openSheet = {\n ...(this.hasOpacity ? { opacity: 1 } : {}),\n transform: 'translateY(0)',\n };\n\n if (this.animation && this.animation?.effect?.target !== this.backdropElement) {\n this.animation.cancel();\n this.animation = null;\n }\n\n if (this.nativeAnimation && this.nativeAnimation?.effect?.target !== this.nativeElement) {\n this.nativeAnimation.cancel();\n this.nativeAnimation = null;\n }\n\n if (shouldOpen) {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.backdropElement.animate([closedBackdrop, openBackdrop], options);\n this.nativeAnimation = this.nativeElement.animate([closedSheet, openSheet], options);\n }\n } else {\n if (this.animation && this.nativeAnimation) {\n this.animation.reverse();\n this.nativeAnimation.reverse();\n } else {\n this.animation = this.backdropElement.animate([openBackdrop, closedBackdrop], options);\n this.nativeAnimation = this.nativeElement.animate([openSheet, closedSheet], options);\n }\n }\n\n return new Promise((resolve) => {\n let isFinished = false;\n const finish = () => {\n if (isFinished) return;\n\n isFinished = true;\n this._isOpen = shouldOpen;\n this.classList.toggle('open', shouldOpen);\n this.setBottomSheetVisualState(shouldOpen);\n resolve();\n };\n\n this.nativeAnimation.onfinish = finish;\n this.nativeAnimation.oncancel = finish;\n });\n }\n\n /**\n * Opens the sliding container by performing necessary preparatory and transitional operations.\n * @param {Event} e The event that triggered the open operation.\n * @returns {Promise<void>} A promise that resolves when the open operation, including animations and subsequent handlers, is complete.\n */\n async open(e) {\n await Promise.resolve(this.beforeOpen(e)).then(async () => {\n if (!this._isOpen) {\n this.classList.add('open');\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:beforeOpen');\n\n this.checkForVariant(this.variant);\n this.lockDocumentScroll();\n\n await this.doAnimateTransition();\n this.syncAria();\n\n await Promise.resolve(this.afterOpen(e)).then(() => {\n event.dispatchCustomEvent(this, 'wje-sliding-container:open');\n });\n }\n });\n }\n\n /**\n * Closes the sliding container and performs associated operations such as animations and event dispatches.\n * @param {Event} e The event object associated with the close action.\n * @returns {Promise<void>} A promise that resolves when the closing operation, including animations and child element removal, is completed.\n */\n async close(e) {\n if (this.isBottomSheet()\n && e instanceof Event\n && (this.isSheetHandleEvent(e) || (e.target === this.backdropElement && Date.now() < this._sheetIgnoreDismissUntil))) {\n return;\n }\n\n await Promise.resolve(this.beforeClose(e)).then(async () => {\n if (this._isOpen) {\n this.classList.remove('open');\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:beforeClose');\n\n await this.doAnimateTransition().catch(() => {\n if (this.isBottomSheet()) {\n this.setBottomSheetClosedState();\n }\n });\n this.syncAria();\n this.unlockDocumentScroll();\n\n await Promise.resolve(this.afterClose(e)).then(() => {\n if (this.removeChildAfterClose) {\n this.childNodes.forEach((child) => {\n child.remove();\n });\n }\n\n event.dispatchCustomEvent(this, 'wje-sliding-container:afterClose');\n });\n }\n });\n }\n\n /**\n * Forces the closed visual state for the mobile bottom sheet.\n */\n setBottomSheetClosedState() {\n this._isOpen = false;\n this.classList.remove('open');\n this.setBottomSheetVisualState(false);\n }\n\n /**\n * Toggles the state between open and closed.\n * @param {Event} e The event object triggering the toggle.\n * @returns {Promise<void>} A promise that resolves once the toggle operation (open or close) is complete.\n */\n async toggle(e) {\n if (this._isOpen) {\n await this.close(e);\n } else {\n await this.open(e);\n }\n }\n\n /**\n * Cleans up resources associated with the component by disconnecting\n * the resize observer and setting it to null.\n * @returns {void} Does not return a value.\n */\n componentCleanup() {\n this.endSheetDrag();\n this.unlockDocumentScroll();\n this._resizeObserver?.disconnect();\n this._resizeObserver = null;\n }\n}\n","import SlidingContainer from './sliding-container.element.js';\n\nexport default SlidingContainer;\n\nSlidingContainer.define('wje-sliding-container', SlidingContainer);\n"],"names":[],"mappings":";;;;;;AAGA,IAAI,sBAAsB;AAC1B,IAAI,sBAAsB;AAiEX,MAAM,yBAAyB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,cAAc;AACV,UAAK;AAyWT,qCAAY;AAqmBZ;AAAA;AAAA;AAAA;AAAA,gDAAuB,CAAC,MAAM;;AAC1B,UAAI,CAAC,KAAK,gBAAiB;AAE3B,WAAK,2BAA2B,KAAK,IAAG,IAAK;AAC7C,QAAE,eAAc;AAChB,QAAE,gBAAe;AACjB,cAAE,6BAAF;AAAA,IACJ;AAiCA;AAAA;AAAA;AAAA;AAAA,oDAA2B,CAAC,MAAM;AAC9B,UAAI,CAAC,KAAK,mBAAmB,CAAC,KAAK,UAAU,SAAS,MAAM,EAAG;AAE/D,QAAE,eAAc;AAChB,QAAE,gBAAe;AAAA,IACrB;AAiHA;AAAA;AAAA;AAAA;AAAA,gDAAuB,CAAC,MAAM;;AAC1B,UAAI,CAAC,KAAK,kBAAkB,CAAC,KAAK,cAAa,EAAI;AAEnD,QAAE,eAAc;AAChB,QAAE,gBAAe;AACjB,cAAE,6BAAF;AAEA,WAAK,2BAA2B,KAAK,IAAG,IAAK;AAE7C,UAAI,KAAK,WAAY;AAErB,WAAK,eAAe,EAAE,WAAW,EAAE,OAAO;AAE1C,UAAI;AACA,mBAAK,oBAAL,mBAAsB,kBAAkB,EAAE;AAAA,MAC9C,QAAQ;AAAA,MAER;AAEA,aAAO,iBAAiB,eAAe,KAAK,mBAAmB;AAC/D,aAAO,iBAAiB,aAAa,KAAK,kBAAkB;AAC5D,aAAO,iBAAiB,iBAAiB,KAAK,kBAAkB;AAAA,IACpE;AAMA;AAAA;AAAA;AAAA;AAAA,iDAAwB,CAAC,MAAM;;AAC3B,UAAI,CAAC,KAAK,kBAAk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Action = class _ToolbarAction extends WJElement {
389
389
  */
390
390
  createMenuItem(action) {
391
391
  let menuItem = document.createElement("wje-menu-item");
392
- menuItem.replaceChildren(...Array.from(action.childNodes).map((node) => node.cloneNode(true)));
392
+ menuItem.replaceChildren(...Array.from(action.childNodes).map((node) => this.cloneActionMenuNode(node)));
393
393
  const label = this.getActionLabel(action);
394
394
  if (!menuItem.textContent.trim() && label) {
395
395
  menuItem.append(document.createTextNode(label));
@@ -405,6 +405,30 @@ const _ToolbarAction = class _ToolbarAction extends WJElement {
405
405
  this._managedOverflowNodes.add(menuItem);
406
406
  return menuItem;
407
407
  }
408
+ /**
409
+ * Clones action content for menu usage and normalizes button icon slots.
410
+ * @param {Node} node The source action child node.
411
+ * @returns {Node}
412
+ */
413
+ cloneActionMenuNode(node) {
414
+ const clone = node.cloneNode(true);
415
+ if (clone.nodeType === Node.ELEMENT_NODE) {
416
+ this.normalizeActionMenuIconSlot(clone);
417
+ }
418
+ return clone;
419
+ }
420
+ /**
421
+ * Moves button-only icon slots to the menu item start slot.
422
+ * @param {Element} element The cloned action content node.
423
+ */
424
+ normalizeActionMenuIconSlot(element) {
425
+ var _a;
426
+ if (((_a = element.tagName) == null ? void 0 : _a.toLowerCase()) !== "wje-icon") return;
427
+ const slot = element.getAttribute("slot");
428
+ if (!slot || slot === "icon-only") {
429
+ element.setAttribute("slot", "start");
430
+ }
431
+ }
408
432
  /**
409
433
  * Resolves readable text for a toolbar action copied into an overflow menu.
410
434
  * @param {HTMLElement} action The original action element.
@@ -1 +1 @@
1
- {"version":3,"file":"wje-toolbar-action.js","sources":["../packages/wje-toolbar-action/toolbar-action.element.js","../packages/wje-toolbar-action/toolbar-action.js"],"sourcesContent":["import { default as WJElement } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `ToolbarAction` is a custom web component that represents a toolbar action.\n * @summary This element represents a toolbar action.\n * @documentation https://elements.webjet.sk/components/toolbar-action\n * @status stable\n * @augments {WJElement}\n * @csspart native - The native toolbar action wrapper.\n * @slot - The default slot for the toolbar action.\n * @tag wje-toolbar-action\n */\nexport default class ToolbarAction extends WJElement {\n static BREAKPOINTS = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n '2xl': 1450,\n xxl: 1450,\n };\n\n /**\n * Creates an instance of ToolbarAction.\n */\n constructor() {\n super();\n this._managedHiddenActions = new WeakSet();\n this._isCollapsedByBreakpoint = null;\n this._managedOverflowNodes = new WeakSet();\n this._overflowRetryFrame = null;\n this._applyOverflowFrame = null;\n this._observedDropdown = null;\n }\n\n /**\n * The class name for the component.\n * @type {string}\n */\n className = 'ToolbarAction';\n\n /**\n * Returns the CSS stylesheet for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Returns the list of observed attributes.\n * @static\n * @returns {Array} An empty array\n */\n static get observedAttributes() {\n return ['breakpoint', 'max-items', 'visible-items'];\n }\n\n /**\n * Sets the collapse breakpoint token or value.\n * @param {string} value Breakpoint token or CSS size.\n */\n set breakpoint(value) {\n if (value) this.setAttribute('breakpoint', value);\n else this.removeAttribute('breakpoint');\n }\n\n /**\n * Gets the collapse breakpoint token or value.\n * @returns {string}\n */\n get breakpoint() {\n return this.getAttribute('breakpoint') || '';\n }\n\n /**\n * Sets the maximum number of visible actions.\n * @param {number|string} value The maximum number of visible actions.\n */\n set maxItems(value) {\n this.setAttribute('max-items', value || 0);\n }\n\n /**\n * Gets the maximum number of visible actions.\n * @returns {number}\n */\n get maxItems() {\n return +this.getAttribute('max-items') || 0;\n }\n\n /**\n * Sets the responsive visible action count.\n * @param {number|string} value The visible action count.\n */\n set visibleItems(value) {\n if (value === null || value === undefined || value === '') {\n this.removeAttribute('visible-items');\n return;\n }\n\n this.setAttribute('visible-items', value);\n }\n\n /**\n * Gets the responsive visible action count.\n * @returns {number|null}\n */\n get visibleItems() {\n if (!this.hasAttribute('visible-items')) return null;\n const value = +this.getAttribute('visible-items');\n return Number.isFinite(value) ? value : null;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the component for the toolbar action.\n * @returns {object} Document fragment\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let slot = document.createElement('slot');\n\n let element = document.createElement('div');\n element.setAttribute('part', 'native');\n element.classList.add('native-toolbar-action');\n\n let dropdown = document.createElement('wje-dropdown');\n dropdown.setAttribute('placement', 'bottom-end');\n dropdown.setAttribute('collapsible', '');\n dropdown.classList.add('toolbar-action-more');\n dropdown.hidden = true;\n\n let trigger = document.createElement('wje-button');\n trigger.setAttribute('slot', 'trigger');\n trigger.setAttribute('fill', 'link');\n trigger.setAttribute('aria-label', 'Show more actions');\n trigger.innerHTML = '<wje-icon name=\"dots\"></wje-icon>';\n\n let menu = document.createElement('wje-menu');\n menu.setAttribute('variant', 'context');\n\n dropdown.append(trigger, menu);\n\n element.appendChild(slot);\n element.appendChild(dropdown);\n\n fragment.appendChild(element);\n\n this.defaultSlot = slot;\n this.native = element;\n this.moreDropdown = dropdown;\n this.moreMenu = menu;\n\n return fragment;\n }\n\n /**\n * Applies the current visible action limit after the component is drawn.\n */\n afterDraw() {\n this.onSlotChange = () => {\n this.observeExistingDropdown();\n this.scheduleOverflow();\n };\n this.defaultSlot?.addEventListener('slotchange', this.onSlotChange);\n this.handleResize = () => this.handleBreakpointResize();\n\n if (this.getBreakpointWidth()) {\n window.addEventListener('resize', this.handleResize);\n }\n\n this.observeExistingDropdown();\n this.scheduleOverflow(true);\n }\n\n /**\n * Removes listeners after disconnect.\n */\n afterDisconnect() {\n this.defaultSlot?.removeEventListener('slotchange', this.onSlotChange);\n window.removeEventListener('resize', this.handleResize);\n this._isCollapsedByBreakpoint = null;\n\n if (this._overflowRetryFrame) {\n cancelAnimationFrame(this._overflowRetryFrame);\n this._overflowRetryFrame = null;\n }\n\n if (this._applyOverflowFrame) {\n cancelAnimationFrame(this._applyOverflowFrame);\n this._applyOverflowFrame = null;\n }\n\n this._dropdownObserver?.disconnect();\n this._dropdownObserver = null;\n this._observedDropdown = null;\n }\n\n /**\n * Schedules overflow application after layout settles.\n * @param {boolean} [doubleFrame] Wait an extra frame for initial render/hydration.\n */\n scheduleOverflow(doubleFrame = false) {\n if (this._applyOverflowFrame) return;\n\n this._applyOverflowFrame = requestAnimationFrame(() => {\n this._applyOverflowFrame = null;\n\n if (doubleFrame) {\n this.scheduleOverflow(false);\n return;\n }\n\n this.applyOverflow();\n });\n }\n\n /**\n * Returns the actions for the toolbar action.\n * @returns {Array<HTMLElement>} Managed toolbar actions.\n */\n getActions() {\n return this.getAssignedElements().filter(\n (element) =>\n element.getAttribute('slot') !== 'trigger' &&\n (element.tagName?.toLowerCase() === 'wje-button' || element.hasAttribute('data-toolbar-action'))\n );\n }\n\n /**\n * Returns direct children assigned to the default slot.\n * @returns {Array<HTMLElement>}\n */\n getAssignedElements() {\n return this.defaultSlot?.assignedElements?.() || Array.from(this.children);\n }\n\n /**\n * Returns an existing top-level dropdown if present.\n * @returns {HTMLElement|null}\n */\n getExistingDropdown() {\n return this.getAssignedElements().find((element) => element.tagName?.toLowerCase() === 'wje-dropdown') || null;\n }\n\n /**\n * Observes the external dropdown for late menu/content changes.\n */\n observeExistingDropdown() {\n const dropdown = this.getExistingDropdown();\n\n if (dropdown === this._observedDropdown) return;\n\n this._dropdownObserver?.disconnect();\n this._dropdownObserver = null;\n this._observedDropdown = dropdown;\n\n if (!dropdown || typeof MutationObserver !== 'function') return;\n\n this._dropdownObserver = new MutationObserver(() => this.scheduleOverflow());\n this._dropdownObserver.observe(dropdown, {\n childList: true,\n subtree: false,\n });\n }\n\n /**\n * Returns the dropdown that should receive overflow items.\n * @returns {HTMLElement}\n */\n getOverflowDropdown() {\n return this.getExistingDropdown() || this.moreDropdown;\n }\n\n /**\n * Returns the menu used for overflow items.\n * @returns {HTMLElement|null}\n */\n getOverflowMenu() {\n const existingDropdown = this.getExistingDropdown();\n\n if (existingDropdown) {\n return (\n Array.from(existingDropdown.children).find((element) => element.tagName?.toLowerCase() === 'wje-menu') ||\n null\n );\n }\n\n return this.moreMenu;\n }\n\n /**\n * Gets the number of actions that should stay visible.\n * @returns {number}\n */\n getVisibleLimit() {\n const actions = this.getActions();\n\n if (this.isCollapsedByBreakpoint()) {\n return 0;\n }\n\n const maxItems = this.maxItems > 0 ? this.maxItems : actions.length;\n const visibleItems = this.visibleItems;\n const limit = visibleItems === null ? maxItems : Math.min(visibleItems, maxItems);\n\n return Math.max(0, Math.min(limit, actions.length));\n }\n\n /**\n * Returns whether the toolbar action should collapse based on the configured breakpoint.\n * @returns {boolean}\n */\n shouldCollapseByBreakpoint() {\n const breakpointWidth = this.getBreakpointWidth();\n\n if (!breakpointWidth) return false;\n\n return window.innerWidth < breakpointWidth;\n }\n\n /**\n * Returns the cached breakpoint collapse state.\n * @returns {boolean}\n */\n isCollapsedByBreakpoint() {\n if (!this.getBreakpointWidth()) {\n this._isCollapsedByBreakpoint = false;\n return false;\n }\n\n const nextState = this.shouldCollapseByBreakpoint();\n this._isCollapsedByBreakpoint = nextState;\n\n return nextState;\n }\n\n /**\n * Reacts to viewport resize only when the breakpoint mode actually changes.\n * @returns {void}\n */\n handleBreakpointResize() {\n if (!this.getBreakpointWidth()) return;\n\n const nextState = this.shouldCollapseByBreakpoint();\n\n if (this._isCollapsedByBreakpoint === nextState) return;\n\n this._isCollapsedByBreakpoint = nextState;\n this.scheduleOverflow();\n }\n\n /**\n * Resolves the configured breakpoint to a pixel width.\n * @returns {number|null}\n */\n getBreakpointWidth() {\n if (!this.breakpoint) return null;\n\n const token = this.breakpoint.trim().toLowerCase();\n const cssValue = getComputedStyle(this).getPropertyValue(`--wje-toolbar-action-breakpoint-${token}`).trim();\n const namedBreakpoint = ToolbarAction.BREAKPOINTS[token];\n\n if (cssValue) {\n const cssNumber = parseFloat(cssValue);\n if (Number.isFinite(cssNumber)) return cssNumber;\n }\n\n if (Number.isFinite(namedBreakpoint)) {\n return namedBreakpoint;\n }\n\n const directNumber = parseFloat(token);\n return Number.isFinite(directNumber) ? directNumber : null;\n }\n\n /**\n * Updates visible actions and the overflow dropdown.\n * @returns {void}\n */\n applyOverflow() {\n const actions = this.getActions();\n const visibleLimit = this.getVisibleLimit();\n const overflowActions = actions.slice(visibleLimit);\n const existingDropdown = this.getExistingDropdown();\n const overflowMenu = this.getOverflowMenu();\n\n if (this._overflowRetryFrame) {\n cancelAnimationFrame(this._overflowRetryFrame);\n this._overflowRetryFrame = null;\n }\n\n this.restoreManagedActions(actions);\n this.restoreManagedOverflowContent();\n\n if (existingDropdown && overflowActions.length > 0 && !overflowMenu) {\n this._overflowRetryFrame = requestAnimationFrame(() => {\n this._overflowRetryFrame = null;\n this.scheduleOverflow();\n });\n\n return;\n }\n\n if (!existingDropdown) {\n this.moreMenu?.replaceChildren();\n }\n\n overflowActions.forEach((action) => {\n action.hidden = true;\n action.style.display = 'none';\n this._managedHiddenActions.add(action);\n });\n\n if (overflowMenu && existingDropdown && overflowActions.length > 0 && overflowMenu.children.length > 0) {\n overflowMenu.append(this.createOverflowDivider());\n }\n\n overflowActions.forEach((action) => {\n overflowMenu?.append(this.createMenuItem(action));\n });\n\n if (!existingDropdown && this.moreDropdown) {\n this.moreDropdown.hidden = overflowActions.length === 0;\n } else if (existingDropdown && this.moreDropdown) {\n this.moreDropdown.hidden = true;\n }\n }\n\n /**\n * Restores buttons hidden by this component.\n * @param {Array<HTMLElement>} actions Toolbar buttons.\n */\n restoreManagedActions(actions = this.getActions()) {\n actions.forEach((action) => {\n if (this._managedHiddenActions.has(action)) {\n action.hidden = false;\n action.style.removeProperty('display');\n this._managedHiddenActions.delete(action);\n }\n });\n }\n\n /**\n * Removes overflow menu nodes that were previously injected by this component.\n */\n restoreManagedOverflowContent() {\n const dropdown = this.getExistingDropdown();\n\n if (!dropdown) return;\n\n const menu = this.getOverflowMenu();\n if (!menu) return;\n\n Array.from(menu.children).forEach((child) => {\n if (this._managedOverflowNodes.has(child)) {\n child.remove();\n this._managedOverflowNodes.delete(child);\n }\n });\n }\n\n /**\n * Creates a dropdown menu proxy for an overflowed button.\n * @param {HTMLElement} action The original action button.\n * @returns {HTMLElement}\n */\n createMenuItem(action) {\n let menuItem = document.createElement('wje-menu-item');\n menuItem.replaceChildren(...Array.from(action.childNodes).map((node) => node.cloneNode(true)));\n\n const label = this.getActionLabel(action);\n if (!menuItem.textContent.trim() && label) {\n menuItem.append(document.createTextNode(label));\n }\n\n if (label) {\n menuItem.setAttribute('aria-label', label);\n }\n\n if (action.hasAttribute('disabled') || action.getAttribute('aria-disabled') === 'true') {\n menuItem.setAttribute('disabled', '');\n }\n\n menuItem.addEventListener('wje-menu-item:click', (e) => this.handleMenuItemClick(e, action));\n menuItem.addEventListener('click', (e) => this.handleMenuItemClick(e, action));\n this._managedOverflowNodes.add(menuItem);\n\n return menuItem;\n }\n\n /**\n * Resolves readable text for a toolbar action copied into an overflow menu.\n * @param {HTMLElement} action The original action element.\n * @returns {string}\n */\n getActionLabel(action) {\n if (!action) return '';\n\n const explicitLabel = ['aria-label', 'title', 'label', 'data-label', 'tooltip']\n .map((attr) => action.getAttribute(attr)?.trim())\n .find((value) => value && value !== 'true');\n\n if (explicitLabel) return explicitLabel;\n\n return action.textContent.trim();\n }\n\n /**\n * Creates a divider separating existing dropdown actions from responsive overflow actions.\n * @returns {HTMLElement}\n */\n createOverflowDivider() {\n const divider = document.createElement('wje-divider');\n this._managedOverflowNodes.add(divider);\n return divider;\n }\n\n /**\n * Forwards menu item activation to the original button.\n * @param {Event} e The menu event.\n * @param {HTMLElement} action The original action button.\n */\n handleMenuItemClick(e, action) {\n e.preventDefault?.();\n e.stopPropagation();\n\n if (!action || action.hasAttribute('disabled') || action.getAttribute('aria-disabled') === 'true') return;\n\n action.click();\n }\n\n /**\n * Measures action widths while preserving current overflow state.\n * @returns {{count: number, widths: number[], gap: number, moreWidth: number, getWidthForCount: Function}}\n */\n measureActionMetrics() {\n const actions = this.getActions();\n const hasExistingDropdown = !!this.getExistingDropdown();\n\n this.restoreManagedActions(actions);\n\n const widths = actions.map((action) => action.getBoundingClientRect().width);\n const style = this.native ? getComputedStyle(this.native) : null;\n const gap = style ? parseFloat(style.columnGap || style.gap || '0') || 0 : 0;\n const moreWidth = this.measureMoreWidth();\n\n this.applyOverflow();\n\n return {\n count: actions.length,\n widths,\n gap,\n moreWidth,\n getWidthForCount: (visibleCount) => {\n const count = Math.max(0, Math.min(visibleCount, actions.length));\n const overflowCount = actions.length - count;\n const visibleWidth = widths.slice(0, count).reduce((sum, width) => sum + width, 0);\n const visibleGaps = Math.max(count - 1, 0) * gap;\n const usesDropdown = hasExistingDropdown || overflowCount > 0;\n const moreGap = count > 0 && usesDropdown ? gap : 0;\n\n return visibleWidth + visibleGaps + (usesDropdown ? moreWidth + moreGap : 0);\n },\n };\n }\n\n /**\n * Measures the overflow dropdown trigger.\n * @returns {number}\n */\n measureMoreWidth() {\n const dropdown = this.getOverflowDropdown();\n if (!dropdown) return 48;\n\n const isInternalDropdown = dropdown === this.moreDropdown;\n const wasHidden = dropdown.hidden;\n const previousVisibility = dropdown.style.visibility;\n\n if (isInternalDropdown && wasHidden) {\n dropdown.hidden = false;\n dropdown.style.visibility = 'hidden';\n }\n\n const width = dropdown.getBoundingClientRect().width || 48;\n\n if (isInternalDropdown && wasHidden) {\n dropdown.hidden = true;\n dropdown.style.visibility = previousVisibility;\n }\n\n if (dropdown === this.moreDropdown && this.getExistingDropdown()) {\n this.moreDropdown.hidden = true;\n }\n\n return width;\n }\n}\n","import ToolbarAction from './toolbar-action.element.js';\n\nexport default ToolbarAction;\n\nToolbarAction.define('wje-toolbar-action', ToolbarAction);\n"],"names":[],"mappings":";;;;;AAae,MAAM,iBAAN,MAAM,uBAAsB,UAAU;AAAA;AAAA;AAAA;AAAA,EAajD,cAAc;AACV,UAAK;AAaT;AAAA;AAAA;AAAA;AAAA,qCAAY;AAZR,SAAK,wBAAwB,oBAAI,QAAO;AACxC,SAAK,2BAA2B;AA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QAAI,sBAAsB,WAAW;AACjC,eAAS,SAAS;AAClB,eAAS,MAAM,aAAa;AAAA,IAChC;AAEA,UAAM,QAAQ,SAAS,sBAAqB,EAAG,SAAS;AAExD,QAAI,sBAAsB,WAAW;AACjC,eAAS,SAAS;AAClB,eAAS,MAAM,aAAa;AAAA,IAChC;AAEA,QAAI,aAAa,KAAK,gBAAgB,KAAK,oBAAmB,GAAI;AAC9D,WAAK,aAAa,SAAS;AAAA,IAC/B;AAEA,WAAO;AAAA,EACX;AACJ;AAjlBI,cADiB,gBACV,eAAc;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,KAAK;AACb;AARe,IAAM,gBAAN;ACTf,cAAc,OAAO,sBAAsB,aAAa;"}
1
+ {"version":3,"file":"wje-toolbar-action.js","sources":["../packages/wje-toolbar-action/toolbar-action.element.js","../packages/wje-toolbar-action/toolbar-action.js"],"sourcesContent":["import { default as WJElement } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `ToolbarAction` is a custom web component that represents a toolbar action.\n * @summary This element represents a toolbar action.\n * @documentation https://elements.webjet.sk/components/toolbar-action\n * @status stable\n * @augments {WJElement}\n * @csspart native - The native toolbar action wrapper.\n * @slot - The default slot for the toolbar action.\n * @tag wje-toolbar-action\n */\nexport default class ToolbarAction extends WJElement {\n static BREAKPOINTS = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n '2xl': 1450,\n xxl: 1450,\n };\n\n /**\n * Creates an instance of ToolbarAction.\n */\n constructor() {\n super();\n this._managedHiddenActions = new WeakSet();\n this._isCollapsedByBreakpoint = null;\n this._managedOverflowNodes = new WeakSet();\n this._overflowRetryFrame = null;\n this._applyOverflowFrame = null;\n this._observedDropdown = null;\n }\n\n /**\n * The class name for the component.\n * @type {string}\n */\n className = 'ToolbarAction';\n\n /**\n * Returns the CSS stylesheet for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Returns the list of observed attributes.\n * @static\n * @returns {Array} An empty array\n */\n static get observedAttributes() {\n return ['breakpoint', 'max-items', 'visible-items'];\n }\n\n /**\n * Sets the collapse breakpoint token or value.\n * @param {string} value Breakpoint token or CSS size.\n */\n set breakpoint(value) {\n if (value) this.setAttribute('breakpoint', value);\n else this.removeAttribute('breakpoint');\n }\n\n /**\n * Gets the collapse breakpoint token or value.\n * @returns {string}\n */\n get breakpoint() {\n return this.getAttribute('breakpoint') || '';\n }\n\n /**\n * Sets the maximum number of visible actions.\n * @param {number|string} value The maximum number of visible actions.\n */\n set maxItems(value) {\n this.setAttribute('max-items', value || 0);\n }\n\n /**\n * Gets the maximum number of visible actions.\n * @returns {number}\n */\n get maxItems() {\n return +this.getAttribute('max-items') || 0;\n }\n\n /**\n * Sets the responsive visible action count.\n * @param {number|string} value The visible action count.\n */\n set visibleItems(value) {\n if (value === null || value === undefined || value === '') {\n this.removeAttribute('visible-items');\n return;\n }\n\n this.setAttribute('visible-items', value);\n }\n\n /**\n * Gets the responsive visible action count.\n * @returns {number|null}\n */\n get visibleItems() {\n if (!this.hasAttribute('visible-items')) return null;\n const value = +this.getAttribute('visible-items');\n return Number.isFinite(value) ? value : null;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the component for the toolbar action.\n * @returns {object} Document fragment\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let slot = document.createElement('slot');\n\n let element = document.createElement('div');\n element.setAttribute('part', 'native');\n element.classList.add('native-toolbar-action');\n\n let dropdown = document.createElement('wje-dropdown');\n dropdown.setAttribute('placement', 'bottom-end');\n dropdown.setAttribute('collapsible', '');\n dropdown.classList.add('toolbar-action-more');\n dropdown.hidden = true;\n\n let trigger = document.createElement('wje-button');\n trigger.setAttribute('slot', 'trigger');\n trigger.setAttribute('fill', 'link');\n trigger.setAttribute('aria-label', 'Show more actions');\n trigger.innerHTML = '<wje-icon name=\"dots\"></wje-icon>';\n\n let menu = document.createElement('wje-menu');\n menu.setAttribute('variant', 'context');\n\n dropdown.append(trigger, menu);\n\n element.appendChild(slot);\n element.appendChild(dropdown);\n\n fragment.appendChild(element);\n\n this.defaultSlot = slot;\n this.native = element;\n this.moreDropdown = dropdown;\n this.moreMenu = menu;\n\n return fragment;\n }\n\n /**\n * Applies the current visible action limit after the component is drawn.\n */\n afterDraw() {\n this.onSlotChange = () => {\n this.observeExistingDropdown();\n this.scheduleOverflow();\n };\n this.defaultSlot?.addEventListener('slotchange', this.onSlotChange);\n this.handleResize = () => this.handleBreakpointResize();\n\n if (this.getBreakpointWidth()) {\n window.addEventListener('resize', this.handleResize);\n }\n\n this.observeExistingDropdown();\n this.scheduleOverflow(true);\n }\n\n /**\n * Removes listeners after disconnect.\n */\n afterDisconnect() {\n this.defaultSlot?.removeEventListener('slotchange', this.onSlotChange);\n window.removeEventListener('resize', this.handleResize);\n this._isCollapsedByBreakpoint = null;\n\n if (this._overflowRetryFrame) {\n cancelAnimationFrame(this._overflowRetryFrame);\n this._overflowRetryFrame = null;\n }\n\n if (this._applyOverflowFrame) {\n cancelAnimationFrame(this._applyOverflowFrame);\n this._applyOverflowFrame = null;\n }\n\n this._dropdownObserver?.disconnect();\n this._dropdownObserver = null;\n this._observedDropdown = null;\n }\n\n /**\n * Schedules overflow application after layout settles.\n * @param {boolean} [doubleFrame] Wait an extra frame for initial render/hydration.\n */\n scheduleOverflow(doubleFrame = false) {\n if (this._applyOverflowFrame) return;\n\n this._applyOverflowFrame = requestAnimationFrame(() => {\n this._applyOverflowFrame = null;\n\n if (doubleFrame) {\n this.scheduleOverflow(false);\n return;\n }\n\n this.applyOverflow();\n });\n }\n\n /**\n * Returns the actions for the toolbar action.\n * @returns {Array<HTMLElement>} Managed toolbar actions.\n */\n getActions() {\n return this.getAssignedElements().filter(\n (element) =>\n element.getAttribute('slot') !== 'trigger' &&\n (element.tagName?.toLowerCase() === 'wje-button' || element.hasAttribute('data-toolbar-action'))\n );\n }\n\n /**\n * Returns direct children assigned to the default slot.\n * @returns {Array<HTMLElement>}\n */\n getAssignedElements() {\n return this.defaultSlot?.assignedElements?.() || Array.from(this.children);\n }\n\n /**\n * Returns an existing top-level dropdown if present.\n * @returns {HTMLElement|null}\n */\n getExistingDropdown() {\n return this.getAssignedElements().find((element) => element.tagName?.toLowerCase() === 'wje-dropdown') || null;\n }\n\n /**\n * Observes the external dropdown for late menu/content changes.\n */\n observeExistingDropdown() {\n const dropdown = this.getExistingDropdown();\n\n if (dropdown === this._observedDropdown) return;\n\n this._dropdownObserver?.disconnect();\n this._dropdownObserver = null;\n this._observedDropdown = dropdown;\n\n if (!dropdown || typeof MutationObserver !== 'function') return;\n\n this._dropdownObserver = new MutationObserver(() => this.scheduleOverflow());\n this._dropdownObserver.observe(dropdown, {\n childList: true,\n subtree: false,\n });\n }\n\n /**\n * Returns the dropdown that should receive overflow items.\n * @returns {HTMLElement}\n */\n getOverflowDropdown() {\n return this.getExistingDropdown() || this.moreDropdown;\n }\n\n /**\n * Returns the menu used for overflow items.\n * @returns {HTMLElement|null}\n */\n getOverflowMenu() {\n const existingDropdown = this.getExistingDropdown();\n\n if (existingDropdown) {\n return (\n Array.from(existingDropdown.children).find((element) => element.tagName?.toLowerCase() === 'wje-menu') ||\n null\n );\n }\n\n return this.moreMenu;\n }\n\n /**\n * Gets the number of actions that should stay visible.\n * @returns {number}\n */\n getVisibleLimit() {\n const actions = this.getActions();\n\n if (this.isCollapsedByBreakpoint()) {\n return 0;\n }\n\n const maxItems = this.maxItems > 0 ? this.maxItems : actions.length;\n const visibleItems = this.visibleItems;\n const limit = visibleItems === null ? maxItems : Math.min(visibleItems, maxItems);\n\n return Math.max(0, Math.min(limit, actions.length));\n }\n\n /**\n * Returns whether the toolbar action should collapse based on the configured breakpoint.\n * @returns {boolean}\n */\n shouldCollapseByBreakpoint() {\n const breakpointWidth = this.getBreakpointWidth();\n\n if (!breakpointWidth) return false;\n\n return window.innerWidth < breakpointWidth;\n }\n\n /**\n * Returns the cached breakpoint collapse state.\n * @returns {boolean}\n */\n isCollapsedByBreakpoint() {\n if (!this.getBreakpointWidth()) {\n this._isCollapsedByBreakpoint = false;\n return false;\n }\n\n const nextState = this.shouldCollapseByBreakpoint();\n this._isCollapsedByBreakpoint = nextState;\n\n return nextState;\n }\n\n /**\n * Reacts to viewport resize only when the breakpoint mode actually changes.\n * @returns {void}\n */\n handleBreakpointResize() {\n if (!this.getBreakpointWidth()) return;\n\n const nextState = this.shouldCollapseByBreakpoint();\n\n if (this._isCollapsedByBreakpoint === nextState) return;\n\n this._isCollapsedByBreakpoint = nextState;\n this.scheduleOverflow();\n }\n\n /**\n * Resolves the configured breakpoint to a pixel width.\n * @returns {number|null}\n */\n getBreakpointWidth() {\n if (!this.breakpoint) return null;\n\n const token = this.breakpoint.trim().toLowerCase();\n const cssValue = getComputedStyle(this).getPropertyValue(`--wje-toolbar-action-breakpoint-${token}`).trim();\n const namedBreakpoint = ToolbarAction.BREAKPOINTS[token];\n\n if (cssValue) {\n const cssNumber = parseFloat(cssValue);\n if (Number.isFinite(cssNumber)) return cssNumber;\n }\n\n if (Number.isFinite(namedBreakpoint)) {\n return namedBreakpoint;\n }\n\n const directNumber = parseFloat(token);\n return Number.isFinite(directNumber) ? directNumber : null;\n }\n\n /**\n * Updates visible actions and the overflow dropdown.\n * @returns {void}\n */\n applyOverflow() {\n const actions = this.getActions();\n const visibleLimit = this.getVisibleLimit();\n const overflowActions = actions.slice(visibleLimit);\n const existingDropdown = this.getExistingDropdown();\n const overflowMenu = this.getOverflowMenu();\n\n if (this._overflowRetryFrame) {\n cancelAnimationFrame(this._overflowRetryFrame);\n this._overflowRetryFrame = null;\n }\n\n this.restoreManagedActions(actions);\n this.restoreManagedOverflowContent();\n\n if (existingDropdown && overflowActions.length > 0 && !overflowMenu) {\n this._overflowRetryFrame = requestAnimationFrame(() => {\n this._overflowRetryFrame = null;\n this.scheduleOverflow();\n });\n\n return;\n }\n\n if (!existingDropdown) {\n this.moreMenu?.replaceChildren();\n }\n\n overflowActions.forEach((action) => {\n action.hidden = true;\n action.style.display = 'none';\n this._managedHiddenActions.add(action);\n });\n\n if (overflowMenu && existingDropdown && overflowActions.length > 0 && overflowMenu.children.length > 0) {\n overflowMenu.append(this.createOverflowDivider());\n }\n\n overflowActions.forEach((action) => {\n overflowMenu?.append(this.createMenuItem(action));\n });\n\n if (!existingDropdown && this.moreDropdown) {\n this.moreDropdown.hidden = overflowActions.length === 0;\n } else if (existingDropdown && this.moreDropdown) {\n this.moreDropdown.hidden = true;\n }\n }\n\n /**\n * Restores buttons hidden by this component.\n * @param {Array<HTMLElement>} actions Toolbar buttons.\n */\n restoreManagedActions(actions = this.getActions()) {\n actions.forEach((action) => {\n if (this._managedHiddenActions.has(action)) {\n action.hidden = false;\n action.style.removeProperty('display');\n this._managedHiddenActions.delete(action);\n }\n });\n }\n\n /**\n * Removes overflow menu nodes that were previously injected by this component.\n */\n restoreManagedOverflowContent() {\n const dropdown = this.getExistingDropdown();\n\n if (!dropdown) return;\n\n const menu = this.getOverflowMenu();\n if (!menu) return;\n\n Array.from(menu.children).forEach((child) => {\n if (this._managedOverflowNodes.has(child)) {\n child.remove();\n this._managedOverflowNodes.delete(child);\n }\n });\n }\n\n /**\n * Creates a dropdown menu proxy for an overflowed button.\n * @param {HTMLElement} action The original action button.\n * @returns {HTMLElement}\n */\n createMenuItem(action) {\n let menuItem = document.createElement('wje-menu-item');\n menuItem.replaceChildren(...Array.from(action.childNodes).map((node) => this.cloneActionMenuNode(node)));\n\n const label = this.getActionLabel(action);\n if (!menuItem.textContent.trim() && label) {\n menuItem.append(document.createTextNode(label));\n }\n\n if (label) {\n menuItem.setAttribute('aria-label', label);\n }\n\n if (action.hasAttribute('disabled') || action.getAttribute('aria-disabled') === 'true') {\n menuItem.setAttribute('disabled', '');\n }\n\n menuItem.addEventListener('wje-menu-item:click', (e) => this.handleMenuItemClick(e, action));\n menuItem.addEventListener('click', (e) => this.handleMenuItemClick(e, action));\n this._managedOverflowNodes.add(menuItem);\n\n return menuItem;\n }\n\n /**\n * Clones action content for menu usage and normalizes button icon slots.\n * @param {Node} node The source action child node.\n * @returns {Node}\n */\n cloneActionMenuNode(node) {\n const clone = node.cloneNode(true);\n\n if (clone.nodeType === Node.ELEMENT_NODE) {\n this.normalizeActionMenuIconSlot(clone);\n }\n\n return clone;\n }\n\n /**\n * Moves button-only icon slots to the menu item start slot.\n * @param {Element} element The cloned action content node.\n */\n normalizeActionMenuIconSlot(element) {\n if (element.tagName?.toLowerCase() !== 'wje-icon') return;\n\n const slot = element.getAttribute('slot');\n if (!slot || slot === 'icon-only') {\n element.setAttribute('slot', 'start');\n }\n }\n\n /**\n * Resolves readable text for a toolbar action copied into an overflow menu.\n * @param {HTMLElement} action The original action element.\n * @returns {string}\n */\n getActionLabel(action) {\n if (!action) return '';\n\n const explicitLabel = ['aria-label', 'title', 'label', 'data-label', 'tooltip']\n .map((attr) => action.getAttribute(attr)?.trim())\n .find((value) => value && value !== 'true');\n\n if (explicitLabel) return explicitLabel;\n\n return action.textContent.trim();\n }\n\n /**\n * Creates a divider separating existing dropdown actions from responsive overflow actions.\n * @returns {HTMLElement}\n */\n createOverflowDivider() {\n const divider = document.createElement('wje-divider');\n this._managedOverflowNodes.add(divider);\n return divider;\n }\n\n /**\n * Forwards menu item activation to the original button.\n * @param {Event} e The menu event.\n * @param {HTMLElement} action The original action button.\n */\n handleMenuItemClick(e, action) {\n e.preventDefault?.();\n e.stopPropagation();\n\n if (!action || action.hasAttribute('disabled') || action.getAttribute('aria-disabled') === 'true') return;\n\n action.click();\n }\n\n /**\n * Measures action widths while preserving current overflow state.\n * @returns {{count: number, widths: number[], gap: number, moreWidth: number, getWidthForCount: Function}}\n */\n measureActionMetrics() {\n const actions = this.getActions();\n const hasExistingDropdown = !!this.getExistingDropdown();\n\n this.restoreManagedActions(actions);\n\n const widths = actions.map((action) => action.getBoundingClientRect().width);\n const style = this.native ? getComputedStyle(this.native) : null;\n const gap = style ? parseFloat(style.columnGap || style.gap || '0') || 0 : 0;\n const moreWidth = this.measureMoreWidth();\n\n this.applyOverflow();\n\n return {\n count: actions.length,\n widths,\n gap,\n moreWidth,\n getWidthForCount: (visibleCount) => {\n const count = Math.max(0, Math.min(visibleCount, actions.length));\n const overflowCount = actions.length - count;\n const visibleWidth = widths.slice(0, count).reduce((sum, width) => sum + width, 0);\n const visibleGaps = Math.max(count - 1, 0) * gap;\n const usesDropdown = hasExistingDropdown || overflowCount > 0;\n const moreGap = count > 0 && usesDropdown ? gap : 0;\n\n return visibleWidth + visibleGaps + (usesDropdown ? moreWidth + moreGap : 0);\n },\n };\n }\n\n /**\n * Measures the overflow dropdown trigger.\n * @returns {number}\n */\n measureMoreWidth() {\n const dropdown = this.getOverflowDropdown();\n if (!dropdown) return 48;\n\n const isInternalDropdown = dropdown === this.moreDropdown;\n const wasHidden = dropdown.hidden;\n const previousVisibility = dropdown.style.visibility;\n\n if (isInternalDropdown && wasHidden) {\n dropdown.hidden = false;\n dropdown.style.visibility = 'hidden';\n }\n\n const width = dropdown.getBoundingClientRect().width || 48;\n\n if (isInternalDropdown && wasHidden) {\n dropdown.hidden = true;\n dropdown.style.visibility = previousVisibility;\n }\n\n if (dropdown === this.moreDropdown && this.getExistingDropdown()) {\n this.moreDropdown.hidden = true;\n }\n\n return width;\n }\n}\n","import ToolbarAction from './toolbar-action.element.js';\n\nexport default ToolbarAction;\n\nToolbarAction.define('wje-toolbar-action', ToolbarAction);\n"],"names":[],"mappings":";;;;;AAae,MAAM,iBAAN,MAAM,uBAAsB,UAAU;AAAA;AAAA;AAAA;AAAA,EAajD,cAAc;AACV,UAAK;AAaT;AAAA;AAAA;AAAA;AAAA,qCAAY;AAZR,SAAK,wBAAwB,oBAAI,QAAO;AACxC,SAAK,2BAA2B;AAChC,SAAK,wBAAwB,oBAAI,QAAO;AACxC,SAAK,sBAAsB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G,CAAC,IAAI;AAC7C,cAAM,eAAe,uBAAuB,gBAAgB;AAC5D,cAAM,UAAU,QAAQ,KAAK,eAAe,MAAM;AAElD,eAAO,eAAe,eAAe,eAAe,YAAY,UAAU;AAAA,MAC9E;AAAA,IACZ;AAAA,EACI;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,mBAAmB;AACf,UAAM,WAAW,KAAK,oBAAmB;AACzC,QAAI,CAAC,SAAU,QAAO;AAEtB,UAAM,qBAAqB,aAAa,KAAK;AAC7C,UAAM,YAAY,SAAS;AAC3B,UAAM,qBAAqB,SAAS,MAAM;AAE1C,QAAI,sBAAsB,WAAW;AACjC,eAAS,SAAS;AAClB,eAAS,MAAM,aAAa;AAAA,IAChC;AAEA,UAAM,QAAQ,SAAS,sBAAqB,EAAG,SAAS;AAExD,QAAI,sBAAsB,WAAW;AACjC,eAAS,SAAS;AAClB,eAAS,MAAM,aAAa;AAAA,IAChC;AAEA,QAAI,aAAa,KAAK,gBAAgB,KAAK,oBAAmB,GAAI;AAC9D,WAAK,aAAa,SAAS;AAAA,IAC/B;AAEA,WAAO;AAAA,EACX;AACJ;AA7mBI,cADiB,gBACV,eAAc;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,KAAK;AACb;AARe,IAAM,gBAAN;ACTf,cAAc,OAAO,sBAAsB,aAAa;"}
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import WJElement from "./wje-element.js";
5
- const styles = "/*\n[ WJ Toolbar ]\n*/\n\n:host {\n width: 100%;\n height: var(--wje-toolbar-height);\n}\n\n.native-toolbar {\n background-color: var(--wje-toolbar-background);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n justify-content: flex-start;\n border-bottom: 1px solid var(--wje-toolbar-border-color);\n padding-inline: var(--wje-toolbar-padding-inline);\n padding-block: var(--wje-toolbar-padding-block);\n margin-inline: var(--wje-toolbar-margin-inline);\n margin-block: var(--wje-toolbar-margin-block);\n box-shadow: var(--wje-toolbar-shadow);\n gap: var(--wje-toolbar-action-gap);\n overflow: hidden;\n}\n\n::slotted {\n grid-column: span 4;\n}\n\n::slotted([slot='start']) {\n min-width: 0;\n margin-right: auto;\n}\n\n::slotted([slot='end']) {\n flex: 0 0 auto;\n}\n\n:host([sticky]) {\n position: sticky;\n top: var(--wje-toolbar-top);\n z-index: 99;\n}\n";
5
+ const styles = "/*\n[ WJ Toolbar ]\n*/\n\n:host {\n width: 100%;\n height: var(--wje-toolbar-height);\n}\n\n.native-toolbar {\n background-color: var(--wje-toolbar-background);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n justify-content: flex-start;\n border-bottom: 1px solid var(--wje-toolbar-border-color);\n padding-inline: var(--wje-toolbar-padding-inline);\n padding-block: var(--wje-toolbar-padding-block);\n margin-inline: var(--wje-toolbar-margin-inline);\n margin-block: var(--wje-toolbar-margin-block);\n box-shadow: var(--wje-toolbar-shadow);\n gap: var(--wje-toolbar-action-gap);\n overflow: hidden;\n}\n\nslot[name='start'],\nslot[name='end'] {\n display: flex;\n align-items: center;\n gap: var(--wje-toolbar-action-gap);\n}\n\nslot[name='start'] {\n flex: 1 1 auto;\n min-width: 0;\n}\n\nslot[name='end'] {\n flex: 0 0 auto;\n justify-content: flex-end;\n}\n\n::slotted {\n grid-column: span 4;\n}\n\n::slotted([slot='start']) {\n min-width: 0;\n}\n\n::slotted([slot='end']) {\n flex: 0 0 auto;\n}\n\n:host([sticky]) {\n position: sticky;\n top: var(--wje-toolbar-top);\n z-index: 99;\n}\n";
6
6
  class Toolbar extends WJElement {
7
7
  /**
8
8
  * Creates an instance of Toolbar.
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import WJElement from "./wje-element.js";
5
5
  import "./wje-popup.js";
6
- import { P as Popup } from "./popup.element-C8-g3WLs.js";
6
+ import { P as Popup } from "./popup.element-CwXvVFK7.js";
7
7
  import { event } from "./event.js";
8
8
  const styles = "/*\n[ WJ Tooltip ]\n*/\n\n.native-tooltip {\n display: flex;\n align-items: center;\n padding: var(--wje-tooltip-spacing);\n color: var(--wje-tooltip-color);\n background-color: var(--wje-tooltip-background);\n font-weight: var(--wje-tooltip-font-weight);\n font-size: var(--wje-tooltip-font-size);\n border-radius: var(--wje-tooltip-border-radius);\n line-height: var(--wje-tooltip-line-height);\n box-sizing: border-box;\n box-shadow: var(--wje-tooltip-shadow);\n}\n\n::slotted([slot='start']) {\n margin: 0 0.3rem 0 0;\n}\n\n::slotted([slot='end']) {\n margin: 0 0 0 0.3rem;\n}\n\n.arrow {\n position: absolute;\n width: 10px;\n height: 10px;\n background: var(--wje-tooltip-arrow-color);\n transform: rotate(45deg);\n}\n";
9
9
  const _Tooltip = class _Tooltip extends WJElement {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
4
- "version": "0.6.0",
4
+ "version": "0.7.0",
5
5
  "homepage": "https://github.com/lencys/wj-elements",
6
6
  "author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
7
7
  "license": "MIT",
@@ -73,6 +73,7 @@
73
73
  "test:relative-time": "web-test-runner --files packages/wje-relative-time/relative-time.test.js",
74
74
  "test:select": "web-test-runner --files packages/wje-select/select.test.js",
75
75
  "test:slider": "web-test-runner --files packages/wje-slider/slider.test.js",
76
+ "test:sliding-container": "web-test-runner --files packages/wje-sliding-container/sliding-container.test.js",
76
77
  "test:status": "web-test-runner --files packages/wje-status/status.test.js",
77
78
  "test:tab-group": "web-test-runner --files packages/wje-tab-group/tab-group.test.js",
78
79
  "test:textarea": "web-test-runner --files packages/wje-textarea/textarea.test.js",