@aquera/nile-elements 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index-6faafdf4.cjs.js +2 -0
- package/dist/index-6faafdf4.cjs.js.map +1 -0
- package/dist/index-9931b440.esm.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +375 -226
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/index.esm.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.esm.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js.map +1 -1
- package/dist/nile-context-menu/nile-context-menu.esm.js +2 -2
- package/dist/nile-context-menu-item/nile-context-menu-item.cjs.js +1 -1
- package/dist/nile-context-menu-item/nile-context-menu-item.cjs.js.map +1 -1
- package/dist/nile-context-menu-item/nile-context-menu-item.esm.js +3 -3
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js.map +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.esm.js +2 -2
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.esm.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
- package/dist/nile-slider/nile-slider.cjs.js +1 -1
- package/dist/nile-slider/nile-slider.cjs.js.map +1 -1
- package/dist/nile-slider/nile-slider.css.cjs.js +1 -1
- package/dist/nile-slider/nile-slider.css.cjs.js.map +1 -1
- package/dist/nile-slider/nile-slider.css.esm.js +162 -41
- package/dist/nile-slider/nile-slider.esm.js +5 -3
- package/dist/nile-slider/nile-slider.template.cjs.js +1 -1
- package/dist/nile-slider/nile-slider.template.cjs.js.map +1 -1
- package/dist/nile-slider/nile-slider.template.esm.js +49 -23
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js +1 -1
- package/dist/nile-slider/utils/nile-slider.utils.cjs.js.map +1 -1
- package/dist/nile-slider/utils/nile-slider.utils.esm.js +1 -1
- package/dist/src/nile-context-menu/nile-context-menu.d.ts +10 -1
- package/dist/src/nile-context-menu/nile-context-menu.js +85 -5
- package/dist/src/nile-context-menu/nile-context-menu.js.map +1 -1
- package/dist/src/nile-context-menu-item/nile-context-menu-item.d.ts +1 -0
- package/dist/src/nile-context-menu-item/nile-context-menu-item.js +5 -1
- package/dist/src/nile-context-menu-item/nile-context-menu-item.js.map +1 -1
- package/dist/src/nile-context-submenu/nile-context-submenu.d.ts +9 -0
- package/dist/src/nile-context-submenu/nile-context-submenu.js +100 -16
- package/dist/src/nile-context-submenu/nile-context-submenu.js.map +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +2 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.js +4 -0
- package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.css.js +160 -39
- package/dist/src/nile-slider/nile-slider.css.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.d.ts +5 -1
- package/dist/src/nile-slider/nile-slider.js +23 -1
- package/dist/src/nile-slider/nile-slider.js.map +1 -1
- package/dist/src/nile-slider/nile-slider.template.d.ts +2 -0
- package/dist/src/nile-slider/nile-slider.template.js +38 -1
- package/dist/src/nile-slider/nile-slider.template.js.map +1 -1
- package/dist/src/nile-slider/types/nile-slider.types.d.ts +1 -0
- package/dist/src/nile-slider/types/nile-slider.types.js.map +1 -1
- package/dist/src/nile-slider/utils/nile-slider.utils.js +4 -0
- package/dist/src/nile-slider/utils/nile-slider.utils.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-context-menu/nile-context-menu.ts +86 -8
- package/src/nile-context-menu-item/nile-context-menu-item.ts +3 -1
- package/src/nile-context-submenu/nile-context-submenu.ts +97 -12
- package/src/nile-floating-panel/nile-floating-panel.ts +5 -0
- package/src/nile-slider/nile-slider.css.ts +160 -39
- package/src/nile-slider/nile-slider.template.ts +45 -2
- package/src/nile-slider/nile-slider.ts +11 -3
- package/src/nile-slider/types/nile-slider.types.ts +2 -0
- package/src/nile-slider/utils/nile-slider.utils.ts +2 -0
- package/vscode-html-custom-data.json +51 -12
- package/dist/index-644974d4.esm.js +0 -1
- package/dist/index-dd2af8ec.cjs.js +0 -2
- package/dist/index-dd2af8ec.cjs.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-floating-panel.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { CSSResultArray, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, {\n Instance,\n Props,\n roundArrow,\n followCursor as followCursorPlugin,\n} from 'tippy.js';\nimport {\n parseFollowCursor,\n parseDuration,\n} from '../nile-lite-tooltip/utils';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n/**\n * Nile floating-panel component.\n *\n * A popover that supports rich content (title, body, actions).\n *\n * **Wrapper mode** (default): first child element is the trigger.\n * **For mode**: set `for=\"elementId\"` to attach to an external element.\n *\n * @tag nile-floating-panel\n *\n * @fires nile-init - Component initialized.\n * @fires nile-destroy - Component destroyed.\n * @fires nile-show - Panel opened.\n * @fires nile-hide - Panel closed.\n * @fires nile-after-show - Panel fully visible after animation.\n * @fires nile-after-hide - Panel fully hidden after animation.\n * @fires nile-toggle - Open/close transition (detail.open).\n * @fires nile-visibility-change - Hidden by scroll/tab change.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n private static _groups = new Map<string, Set<NileFloatingPanel>>();\n\n private static _reducedMotionQuery: MediaQueryList | null = null;\n\n private static get prefersReducedMotion(): boolean {\n if (!NileFloatingPanel._reducedMotionQuery) {\n NileFloatingPanel._reducedMotionQuery =\n window.matchMedia('(prefers-reduced-motion: reduce)');\n }\n return NileFloatingPanel._reducedMotionQuery.matches;\n }\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n // ─── Tippy.js props ───\n\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'bottom';\n\n @property({ type: String }) trigger: string = 'click';\n\n @property({ type: Number }) distance = 12;\n\n @property({ type: Number }) skidding = 0;\n\n @property({ type: String, reflect: true })\n arrow: 'round' | 'default' | 'none' = 'round';\n\n @property({ type: String, reflect: true }) animation: string = 'fade';\n\n @property({ type: String, reflect: true }) duration:\n | string\n | number\n | [number, number] = 200;\n\n @property({ type: String, reflect: true }) delay:\n | number\n | [number, number] = 0;\n\n @property({ type: Boolean, reflect: true }) interactive = true;\n\n @property({ type: Number, reflect: true }) interactiveBorder = 2;\n\n @property({ type: String, reflect: true }) maxWidth: string | number = 'none';\n\n @property({ type: Number, reflect: true }) zIndex = 9999;\n\n @property({ type: String, reflect: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n @property({ type: Boolean, reflect: true }) hideOnClick:\n | boolean\n | 'toggle' = true;\n\n @property({ type: Boolean, reflect: true }) inertia = false;\n\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n @property({ type: Boolean, reflect: true }) flip = true;\n\n // ─── Popover-like props ───\n\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n @property({ type: String, reflect: true }) title = '';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: String, reflect: true }) width?: string;\n\n @property({ type: String, reflect: true }) height?: string;\n\n /** When set, only one panel in the same group can be open at a time. */\n @property({ type: String, reflect: true }) group: string | null = null;\n\n /** Close the panel when Escape is pressed. */\n @property({ type: Boolean, reflect: true }) closeOnEscape = true;\n\n /** Custom CSS class(es) added to the Tippy popper element, allowing per-instance styling from the host. */\n @property({ type: String, reflect: true, attribute: true}) panelClass: string = '';\n\n // ─── Visibility manager props ───\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n // ─── Internal state ───\n\n private tippyInstance: Instance | null = null;\n private visibilityManager?: VisibilityManager;\n private panelContainer: HTMLElement | null = null;\n private anchorEl: HTMLElement | null = null;\n private _suppressOpenWatch = false;\n private _panelId = `nile-fp-${Math.random().toString(36).slice(2, 9)}`;\n private _boundEscHandler = this._handleEscapeKey.bind(this);\n private _pendingShowListener: (() => void) | null = null;\n private _pendingHideListener: (() => void) | null = null;\n\n // ─── Lifecycle ───\n\n protected firstUpdated(): void {\n this._buildDOM();\n this._attachTippy();\n this._joinGroup();\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.anchorEl || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n this.emit('nile-init');\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cleanupPendingShowListener();\n this._cleanupPendingHideListener();\n this.visibilityManager?.cleanup();\n this._leaveGroup();\n this._removeEscListener();\n this._destroyTippy();\n this.emit('nile-destroy');\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (!this.panelContainer) return;\n\n if (changed.has('open') && !this._suppressOpenWatch) {\n if (this.open) {\n this.visibilityManager?.setup();\n queueMicrotask(() => this.tippyInstance?.show());\n } else {\n this.visibilityManager?.cleanup();\n this.tippyInstance?.hide();\n }\n }\n\n if (changed.has('group')) {\n this._leaveGroup(changed.get('group') as string | null);\n this._joinGroup();\n }\n\n const rebuildProps: string[] = [\n 'placement', 'trigger', 'distance', 'skidding', 'arrow',\n 'animation', 'duration', 'delay', 'interactive', 'interactiveBorder',\n 'maxWidth', 'zIndex', 'followCursor', 'hideOnClick', 'inertia',\n 'allowHTML', 'flip', 'preventOverlayClose', 'disabled', 'width', 'height',\n 'panelClass'\n ];\n\n if (rebuildProps.some(p => changed.has(p))) {\n this._attachTippy();\n }\n }\n\n // ─── Public API ───\n\n /** Programmatically shows the panel. Returns a promise that resolves after the show animation. */\n public show(): Promise<void> {\n this.open = true;\n return new Promise<void>(resolve => {\n this._cleanupPendingShowListener();\n const handler = () => {\n this._pendingShowListener = null;\n resolve();\n };\n this._pendingShowListener = handler;\n this.addEventListener('nile-after-show', handler, { once: true });\n });\n }\n\n /** Programmatically hides the panel. Returns a promise that resolves after the hide animation. */\n public hide(): Promise<void> {\n this.open = false;\n return new Promise<void>(resolve => {\n this._cleanupPendingHideListener();\n const handler = () => {\n this._pendingHideListener = null;\n resolve();\n };\n this._pendingHideListener = handler;\n this.addEventListener('nile-after-hide', handler, { once: true });\n });\n }\n\n private _cleanupPendingShowListener(): void {\n if (this._pendingShowListener) {\n this.removeEventListener('nile-after-show', this._pendingShowListener);\n this._pendingShowListener = null;\n }\n }\n\n private _cleanupPendingHideListener(): void {\n if (this._pendingHideListener) {\n this.removeEventListener('nile-after-hide', this._pendingHideListener);\n this._pendingHideListener = null;\n }\n }\n\n public toggle(): void {\n this.open = !this.open;\n }\n\n public refresh(): void {\n this._attachTippy();\n }\n\n /** Returns the current resolved placement from Tippy/Popper. */\n public getCurrentPlacement(): string {\n const popper = this.tippyInstance?.popper;\n const box = popper?.querySelector('.tippy-box') as HTMLElement | null;\n return box?.dataset.placement ?? this.placement;\n }\n\n /** Returns true if the resolved placement matches the requested placement. */\n public isPositioningOptimal(): boolean {\n return this.getCurrentPlacement() === this.placement;\n }\n\n // ─── Group management ───\n\n private _joinGroup(): void {\n if (!this.group) return;\n let set = NileFloatingPanel._groups.get(this.group);\n if (!set) {\n set = new Set();\n NileFloatingPanel._groups.set(this.group, set);\n }\n set.add(this);\n }\n\n private _leaveGroup(oldGroup?: string | null): void {\n const key = oldGroup ?? this.group;\n if (!key) return;\n const set = NileFloatingPanel._groups.get(key);\n if (set) {\n set.delete(this);\n if (set.size === 0) NileFloatingPanel._groups.delete(key);\n }\n }\n\n private _hideGroupSiblings(): void {\n if (!this.group) return;\n const set = NileFloatingPanel._groups.get(this.group);\n if (!set) return;\n set.forEach(panel => {\n if (panel !== this && panel.open) {\n panel._setOpen(false);\n panel.tippyInstance?.hide();\n }\n });\n }\n\n // ─── Escape key ───\n\n private _addEscListener(): void {\n if (this.closeOnEscape) {\n document.addEventListener('keydown', this._boundEscHandler);\n }\n }\n\n private _removeEscListener(): void {\n document.removeEventListener('keydown', this._boundEscHandler);\n }\n\n private _handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.open) {\n this._setOpen(false);\n this.tippyInstance?.hide();\n }\n }\n\n // ─── ARIA ───\n\n private _applyAria(): void {\n if (!this.anchorEl || !this.panelContainer) return;\n this.panelContainer.setAttribute('role', 'dialog');\n this.panelContainer.id = this._panelId;\n this.anchorEl.setAttribute('aria-haspopup', 'dialog');\n this._syncAriaExpanded();\n }\n\n private _syncAriaExpanded(): void {\n this.anchorEl?.setAttribute('aria-expanded', String(this.open));\n if (this.open) {\n this.anchorEl?.setAttribute('aria-describedby', this._panelId);\n } else {\n this.anchorEl?.removeAttribute('aria-describedby');\n }\n }\n\n // ─── DOM construction ───\n\n private _buildDOM(): void {\n const children = Array.from(this.childNodes);\n\n this.anchorEl = null;\n const titleNodes: Node[] = [];\n const actionNodes: Node[] = [];\n const bodyNodes: Node[] = [];\n let firstElementSeen = false;\n\n for (const child of children) {\n if (child instanceof HTMLElement) {\n const slot = child.getAttribute('slot');\n if (slot === 'title') {\n child.removeAttribute('slot');\n titleNodes.push(child);\n continue;\n }\n if (slot === 'action') {\n child.removeAttribute('slot');\n actionNodes.push(child);\n continue;\n }\n if (!firstElementSeen && !this.for) {\n this.anchorEl = child;\n firstElementSeen = true;\n continue;\n }\n }\n bodyNodes.push(child);\n }\n\n if (this.for) {\n const anchor = document.getElementById(this.for);\n if (anchor) {\n this.anchorEl = anchor;\n }\n }\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n if (this.anchorEl && !this.for) {\n this.appendChild(this.anchorEl);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.className = 'nile-floating-panel__content';\n this.panelContainer.style.display = 'none';\n\n const body = document.createElement('div');\n body.className = 'nile-floating-panel__body';\n\n if (titleNodes.length > 0 || this.title) {\n const titleDiv = document.createElement('div');\n titleDiv.className = 'nile-floating-panel__title';\n if (this.title) {\n titleDiv.textContent = this.title;\n } else {\n titleNodes.forEach(n => titleDiv.appendChild(n));\n }\n body.appendChild(titleDiv);\n }\n\n if (bodyNodes.length > 0) {\n const mainDiv = document.createElement('div');\n mainDiv.className = 'nile-floating-panel__main';\n bodyNodes.forEach(n => mainDiv.appendChild(n));\n body.appendChild(mainDiv);\n }\n\n if (actionNodes.length > 0) {\n const actionDiv = document.createElement('div');\n actionDiv.className = 'nile-floating-panel__action';\n actionNodes.forEach(n => actionDiv.appendChild(n));\n body.appendChild(actionDiv);\n }\n\n this.panelContainer.appendChild(body);\n this.appendChild(this.panelContainer);\n\n this._applyAria();\n }\n\n // ─── Tippy management ───\n\n private _resolveArrow() {\n switch (this.arrow) {\n case 'round': return roundArrow;\n case 'none': return false as const;\n default: return true as const;\n }\n }\n\n private _setOpen(value: boolean): void {\n this._suppressOpenWatch = true;\n this.open = value;\n this._syncAriaExpanded();\n this._suppressOpenWatch = false;\n }\n\n private _getEffectiveDuration(): number | [number, number] {\n if (NileFloatingPanel.prefersReducedMotion) return 0;\n return parseDuration(this.duration);\n }\n\n private _getEffectiveAnimation(): string | false {\n if (NileFloatingPanel.prefersReducedMotion) return false;\n return this.animation;\n }\n\n private _attachTippy(): void {\n this._destroyTippy();\n\n if (this.disabled || !this.anchorEl || !this.panelContainer) return;\n\n const resolvedFollowCursor = parseFollowCursor(this.followCursor);\n const effectiveHideOnClick = this.preventOverlayClose ? false : this.hideOnClick;\n\n const options: Partial<Props> = {\n content: this.panelContainer,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'floating-panel',\n animation: this._getEffectiveAnimation(),\n interactive: this.interactive,\n arrow: this._resolveArrow(),\n duration: this._getEffectiveDuration(),\n allowHTML: this.allowHTML,\n delay: this.delay as any,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: effectiveHideOnClick,\n inertia: NileFloatingPanel.prefersReducedMotion ? false : this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: document.body,\n followCursor: resolvedFollowCursor,\n plugins: resolvedFollowCursor ? [followCursorPlugin] : [],\n popperOptions: {\n modifiers: [{ name: 'flip', enabled: this.flip }],\n },\n onMount: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n if (this.panelClass) {\n this.panelClass.split(/\\s+/).filter(Boolean).forEach(cls => {\n instance.popper.classList.add(cls);\n });\n }\n },\n onShow: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n const tc = instance.popper.querySelector('.tippy-content') as HTMLElement | null;\n if (tc) {\n if (this.width) tc.style.width = this.width;\n if (this.height) { tc.style.height = this.height; tc.style.overflow = 'auto'; }\n }\n this._hideGroupSiblings();\n this._setOpen(true);\n this._addEscListener();\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onShown: (instance) => {\n this.dispatchEvent(new CustomEvent('nile-after-show', { detail: { instance, target: instance.reference } }));\n },\n onHide: (instance) => {\n this._setOpen(false);\n this._removeEscListener();\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n onHidden: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = 'none';\n this.dispatchEvent(new CustomEvent('nile-after-hide', { detail: { instance, target: instance.reference } }));\n },\n };\n\n this.tippyInstance = tippy(this.anchorEl, options);\n\n if (this.open) {\n queueMicrotask(() => this.tippyInstance?.show());\n }\n }\n\n private _destroyTippy(): void {\n if (this.tippyInstance) {\n this.tippyInstance.destroy();\n this.tippyInstance = null;\n }\n if (this.panelContainer) {\n this.panelContainer.style.display = 'none';\n if (this.panelContainer.parentElement !== this) {\n this.appendChild(this.panelContainer);\n }\n }\n }\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"],"names":["NileFloatingPanel","NileFloatingPanel_1","d","this","placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","for","open","preventOverlayClose","title","disabled","group","closeOnEscape","panelClass","enableVisibilityEffect","enableTabClose","tippyInstance","panelContainer","anchorEl","_suppressOpenWatch","_panelId","concat","Math","random","toString","slice","_boundEscHandler","_handleEscapeKey","bind","_pendingShowListener","_pendingHideListener","_this","_inherits","_n","_createClass","key","value","createRenderRoot","firstUpdated","_buildDOM","_attachTippy","_joinGroup","visibilityManager","VisibilityManager","host","target","isOpen","onAnchorOutOfView","_this2$tippyInstance","_setOpen","hide","emit","visible","reason","onDocumentHidden","event","detail","disconnectedCallback","super","_cleanupPendingShowListener","_cleanupPendingHideListener","cleanup","_leaveGroup","_removeEscListener","_destroyTippy","updated","changed","has","setup","queueMicrotask","_this3$tippyInstance","show","get","some","p","Promise","resolve","handler","i","addEventListener","once","removeEventListener","toggle","refresh","getCurrentPlacement","popper","box","querySelector","_i$dataset$placement","dataset","isPositioningOptimal","set","_groups","Set","add","oldGroup","size","_hideGroupSiblings","forEach","panel","_addEscListener","document","e","_applyAria","setAttribute","id","_syncAriaExpanded","String","removeAttribute","children","Array","from","childNodes","titleNodes","actionNodes","bodyNodes","firstElementSeen","_i","_t","child","HTMLElement","slot","getAttribute","push","anchor","getElementById","firstChild","removeChild","appendChild","createElement","className","style","display","body","length","titleDiv","textContent","n","mainDiv","actionDiv","_resolveArrow","roundArrow","_getEffectiveDuration","prefersReducedMotion","parseDuration","_getEffectiveAnimation","resolvedFollowCursor","parseFollowCursor","effectiveHideOnClick","options","content","offset","theme","appendTo","plugins","followCursorPlugin","popperOptions","modifiers","name","enabled","onMount","instance","split","filter","Boolean","cls","classList","onShow","tc","width","height","overflow","dispatchEvent","CustomEvent","reference","onShown","onHide","onHidden","tippy","_this7$tippyInstance","destroy","parentElement","_reducedMotionQuery","window","matchMedia","matches","styles","NileElement","Map","__decorate","property","type","prototype","Number","reflect","attribute","customElement"],"mappings":"6rIA2CaA,CAAAA,CAAiBC,6BAAvB,SAAAC,EAAA,uEAwBLC,KAAAA,CAASC,SAAAA,CAeQ,SAEWD,KAAAA,CAAOE,OAAAA,CAAW,QAElBF,KAAAA,CAAQG,QAAAA,CAAG,GAE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AAEC,KAAM3B,OAAS8B,CAAAA,OAAAA,CAAAA,CAAS,KAA+BjN,CAAA+M,CAAAA,SAAAA,CAAA,qBAAA,EArHxD/M,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAiBC,GAAA2M,CAAA,CAAA,CAD7BO,CAAc,CAAA,qBAAA,CAAA,CAAA,CACFnN"}
|
|
1
|
+
{"version":3,"file":"nile-floating-panel.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { CSSResultArray, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, {\n Instance,\n Props,\n roundArrow,\n followCursor as followCursorPlugin,\n} from 'tippy.js';\nimport {\n parseFollowCursor,\n parseDuration,\n} from '../nile-lite-tooltip/utils';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n/**\n * Nile floating-panel component.\n *\n * A popover that supports rich content (title, body, actions).\n *\n * **Wrapper mode** (default): first child element is the trigger.\n * **For mode**: set `for=\"elementId\"` to attach to an external element.\n *\n * @tag nile-floating-panel\n *\n * @fires nile-init - Component initialized.\n * @fires nile-destroy - Component destroyed.\n * @fires nile-show - Panel opened.\n * @fires nile-hide - Panel closed.\n * @fires nile-after-show - Panel fully visible after animation.\n * @fires nile-after-hide - Panel fully hidden after animation.\n * @fires nile-toggle - Open/close transition (detail.open).\n * @fires nile-visibility-change - Hidden by scroll/tab change.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n private static _groups = new Map<string, Set<NileFloatingPanel>>();\n\n private static _reducedMotionQuery: MediaQueryList | null = null;\n\n private static get prefersReducedMotion(): boolean {\n if (!NileFloatingPanel._reducedMotionQuery) {\n NileFloatingPanel._reducedMotionQuery =\n window.matchMedia('(prefers-reduced-motion: reduce)');\n }\n return NileFloatingPanel._reducedMotionQuery.matches;\n }\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n // ─── Tippy.js props ───\n\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'bottom';\n\n @property({ type: String }) trigger: string = 'click';\n\n @property({ type: Number }) distance = 12;\n\n @property({ type: Number }) skidding = 0;\n\n @property({ type: String, reflect: true })\n arrow: 'round' | 'default' | 'none' = 'round';\n\n @property({ type: String, reflect: true }) animation: string = 'fade';\n\n @property({ type: String, reflect: true }) duration:\n | string\n | number\n | [number, number] = 200;\n\n @property({ type: String, reflect: true }) delay:\n | number\n | [number, number] = 0;\n\n @property({ type: Boolean, reflect: true }) interactive = true;\n\n @property({ type: Number, reflect: true }) interactiveBorder = 2;\n\n @property({ type: String, reflect: true }) maxWidth: string | number = 'none';\n\n @property({ type: Number, reflect: true }) zIndex = 9999;\n\n @property({ type: String, reflect: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n @property({ type: Boolean, reflect: true }) hideOnClick:\n | boolean\n | 'toggle' = true;\n\n @property({ type: Boolean, reflect: true }) inertia = false;\n\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n @property({ type: Boolean, reflect: true }) flip = true;\n\n // ─── Popover-like props ───\n\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n @property({ type: String, reflect: true }) title = '';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: String, reflect: true }) width?: string;\n\n @property({ type: String, reflect: true }) height?: string;\n\n /** When set, only one panel in the same group can be open at a time. */\n @property({ type: String, reflect: true }) group: string | null = null;\n\n /** Close the panel when Escape is pressed. */\n @property({ type: Boolean, reflect: true }) closeOnEscape = true;\n\n /** Custom CSS class(es) added to the Tippy popper element, allowing per-instance styling from the host. */\n @property({ type: String, reflect: true, attribute: true}) panelClass: string = '';\n\n // ─── Visibility manager props ───\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n // ─── Internal state ───\n\n private tippyInstance: Instance | null = null;\n private visibilityManager?: VisibilityManager;\n private panelContainer: HTMLElement | null = null;\n private anchorEl: HTMLElement | null = null;\n private _suppressOpenWatch = false;\n private _panelId = `nile-fp-${Math.random().toString(36).slice(2, 9)}`;\n private _boundEscHandler = this._handleEscapeKey.bind(this);\n private _pendingShowListener: (() => void) | null = null;\n private _pendingHideListener: (() => void) | null = null;\n\n // ─── Lifecycle ───\n\n protected firstUpdated(): void {\n this._buildDOM();\n this._attachTippy();\n this._joinGroup();\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.anchorEl || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n this.emit('nile-init');\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cleanupPendingShowListener();\n this._cleanupPendingHideListener();\n this.visibilityManager?.cleanup();\n this._leaveGroup();\n this._removeEscListener();\n this._destroyTippy();\n this.emit('nile-destroy');\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (!this.panelContainer) return;\n\n if (changed.has('open') && !this._suppressOpenWatch) {\n if (this.open) {\n this.visibilityManager?.setup();\n queueMicrotask(() => this.tippyInstance?.show());\n } else {\n this.visibilityManager?.cleanup();\n this.tippyInstance?.hide();\n }\n }\n\n if (changed.has('group')) {\n this._leaveGroup(changed.get('group') as string | null);\n this._joinGroup();\n }\n\n const rebuildProps: string[] = [\n 'placement', 'trigger', 'distance', 'skidding', 'arrow',\n 'animation', 'duration', 'delay', 'interactive', 'interactiveBorder',\n 'maxWidth', 'zIndex', 'followCursor', 'hideOnClick', 'inertia',\n 'allowHTML', 'flip', 'preventOverlayClose', 'disabled', 'width', 'height',\n 'panelClass'\n ];\n\n if (rebuildProps.some(p => changed.has(p))) {\n this._attachTippy();\n }\n }\n\n // ─── Public API ───\n\n /** Programmatically shows the panel. Returns a promise that resolves after the show animation. */\n public show(): Promise<void> {\n this.open = true;\n return new Promise<void>(resolve => {\n this._cleanupPendingShowListener();\n const handler = () => {\n this._pendingShowListener = null;\n resolve();\n };\n this._pendingShowListener = handler;\n this.addEventListener('nile-after-show', handler, { once: true });\n });\n }\n\n /** Programmatically hides the panel. Returns a promise that resolves after the hide animation. */\n public hide(): Promise<void> {\n this.open = false;\n return new Promise<void>(resolve => {\n this._cleanupPendingHideListener();\n const handler = () => {\n this._pendingHideListener = null;\n resolve();\n };\n this._pendingHideListener = handler;\n this.addEventListener('nile-after-hide', handler, { once: true });\n });\n }\n\n private _cleanupPendingShowListener(): void {\n if (this._pendingShowListener) {\n this.removeEventListener('nile-after-show', this._pendingShowListener);\n this._pendingShowListener = null;\n }\n }\n\n private _cleanupPendingHideListener(): void {\n if (this._pendingHideListener) {\n this.removeEventListener('nile-after-hide', this._pendingHideListener);\n this._pendingHideListener = null;\n }\n }\n\n public toggle(): void {\n this.open = !this.open;\n }\n\n public refresh(): void {\n this._attachTippy();\n }\n\n /** Recomputes the panel position against its anchor (e.g. after the anchor moved). */\n public reposition(): void {\n this.tippyInstance?.popperInstance?.update();\n }\n\n /** Returns the current resolved placement from Tippy/Popper. */\n public getCurrentPlacement(): string {\n const popper = this.tippyInstance?.popper;\n const box = popper?.querySelector('.tippy-box') as HTMLElement | null;\n return box?.dataset.placement ?? this.placement;\n }\n\n /** Returns true if the resolved placement matches the requested placement. */\n public isPositioningOptimal(): boolean {\n return this.getCurrentPlacement() === this.placement;\n }\n\n // ─── Group management ───\n\n private _joinGroup(): void {\n if (!this.group) return;\n let set = NileFloatingPanel._groups.get(this.group);\n if (!set) {\n set = new Set();\n NileFloatingPanel._groups.set(this.group, set);\n }\n set.add(this);\n }\n\n private _leaveGroup(oldGroup?: string | null): void {\n const key = oldGroup ?? this.group;\n if (!key) return;\n const set = NileFloatingPanel._groups.get(key);\n if (set) {\n set.delete(this);\n if (set.size === 0) NileFloatingPanel._groups.delete(key);\n }\n }\n\n private _hideGroupSiblings(): void {\n if (!this.group) return;\n const set = NileFloatingPanel._groups.get(this.group);\n if (!set) return;\n set.forEach(panel => {\n if (panel !== this && panel.open) {\n panel._setOpen(false);\n panel.tippyInstance?.hide();\n }\n });\n }\n\n // ─── Escape key ───\n\n private _addEscListener(): void {\n if (this.closeOnEscape) {\n document.addEventListener('keydown', this._boundEscHandler);\n }\n }\n\n private _removeEscListener(): void {\n document.removeEventListener('keydown', this._boundEscHandler);\n }\n\n private _handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.open) {\n this._setOpen(false);\n this.tippyInstance?.hide();\n }\n }\n\n // ─── ARIA ───\n\n private _applyAria(): void {\n if (!this.anchorEl || !this.panelContainer) return;\n this.panelContainer.setAttribute('role', 'dialog');\n this.panelContainer.id = this._panelId;\n this.anchorEl.setAttribute('aria-haspopup', 'dialog');\n this._syncAriaExpanded();\n }\n\n private _syncAriaExpanded(): void {\n this.anchorEl?.setAttribute('aria-expanded', String(this.open));\n if (this.open) {\n this.anchorEl?.setAttribute('aria-describedby', this._panelId);\n } else {\n this.anchorEl?.removeAttribute('aria-describedby');\n }\n }\n\n // ─── DOM construction ───\n\n private _buildDOM(): void {\n const children = Array.from(this.childNodes);\n\n this.anchorEl = null;\n const titleNodes: Node[] = [];\n const actionNodes: Node[] = [];\n const bodyNodes: Node[] = [];\n let firstElementSeen = false;\n\n for (const child of children) {\n if (child instanceof HTMLElement) {\n const slot = child.getAttribute('slot');\n if (slot === 'title') {\n child.removeAttribute('slot');\n titleNodes.push(child);\n continue;\n }\n if (slot === 'action') {\n child.removeAttribute('slot');\n actionNodes.push(child);\n continue;\n }\n if (!firstElementSeen && !this.for) {\n this.anchorEl = child;\n firstElementSeen = true;\n continue;\n }\n }\n bodyNodes.push(child);\n }\n\n if (this.for) {\n const anchor = document.getElementById(this.for);\n if (anchor) {\n this.anchorEl = anchor;\n }\n }\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n if (this.anchorEl && !this.for) {\n this.appendChild(this.anchorEl);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.className = 'nile-floating-panel__content';\n this.panelContainer.style.display = 'none';\n\n const body = document.createElement('div');\n body.className = 'nile-floating-panel__body';\n\n if (titleNodes.length > 0 || this.title) {\n const titleDiv = document.createElement('div');\n titleDiv.className = 'nile-floating-panel__title';\n if (this.title) {\n titleDiv.textContent = this.title;\n } else {\n titleNodes.forEach(n => titleDiv.appendChild(n));\n }\n body.appendChild(titleDiv);\n }\n\n if (bodyNodes.length > 0) {\n const mainDiv = document.createElement('div');\n mainDiv.className = 'nile-floating-panel__main';\n bodyNodes.forEach(n => mainDiv.appendChild(n));\n body.appendChild(mainDiv);\n }\n\n if (actionNodes.length > 0) {\n const actionDiv = document.createElement('div');\n actionDiv.className = 'nile-floating-panel__action';\n actionNodes.forEach(n => actionDiv.appendChild(n));\n body.appendChild(actionDiv);\n }\n\n this.panelContainer.appendChild(body);\n this.appendChild(this.panelContainer);\n\n this._applyAria();\n }\n\n // ─── Tippy management ───\n\n private _resolveArrow() {\n switch (this.arrow) {\n case 'round': return roundArrow;\n case 'none': return false as const;\n default: return true as const;\n }\n }\n\n private _setOpen(value: boolean): void {\n this._suppressOpenWatch = true;\n this.open = value;\n this._syncAriaExpanded();\n this._suppressOpenWatch = false;\n }\n\n private _getEffectiveDuration(): number | [number, number] {\n if (NileFloatingPanel.prefersReducedMotion) return 0;\n return parseDuration(this.duration);\n }\n\n private _getEffectiveAnimation(): string | false {\n if (NileFloatingPanel.prefersReducedMotion) return false;\n return this.animation;\n }\n\n private _attachTippy(): void {\n this._destroyTippy();\n\n if (this.disabled || !this.anchorEl || !this.panelContainer) return;\n\n const resolvedFollowCursor = parseFollowCursor(this.followCursor);\n const effectiveHideOnClick = this.preventOverlayClose ? false : this.hideOnClick;\n\n const options: Partial<Props> = {\n content: this.panelContainer,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'floating-panel',\n animation: this._getEffectiveAnimation(),\n interactive: this.interactive,\n arrow: this._resolveArrow(),\n duration: this._getEffectiveDuration(),\n allowHTML: this.allowHTML,\n delay: this.delay as any,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: effectiveHideOnClick,\n inertia: NileFloatingPanel.prefersReducedMotion ? false : this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: document.body,\n followCursor: resolvedFollowCursor,\n plugins: resolvedFollowCursor ? [followCursorPlugin] : [],\n popperOptions: {\n modifiers: [{ name: 'flip', enabled: this.flip }],\n },\n onMount: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n if (this.panelClass) {\n this.panelClass.split(/\\s+/).filter(Boolean).forEach(cls => {\n instance.popper.classList.add(cls);\n });\n }\n },\n onShow: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n const tc = instance.popper.querySelector('.tippy-content') as HTMLElement | null;\n if (tc) {\n if (this.width) tc.style.width = this.width;\n if (this.height) { tc.style.height = this.height; tc.style.overflow = 'auto'; }\n }\n this._hideGroupSiblings();\n this._setOpen(true);\n this._addEscListener();\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onShown: (instance) => {\n this.dispatchEvent(new CustomEvent('nile-after-show', { detail: { instance, target: instance.reference } }));\n },\n onHide: (instance) => {\n this._setOpen(false);\n this._removeEscListener();\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n onHidden: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = 'none';\n this.dispatchEvent(new CustomEvent('nile-after-hide', { detail: { instance, target: instance.reference } }));\n },\n };\n\n this.tippyInstance = tippy(this.anchorEl, options);\n\n if (this.open) {\n queueMicrotask(() => this.tippyInstance?.show());\n }\n }\n\n private _destroyTippy(): void {\n if (this.tippyInstance) {\n this.tippyInstance.destroy();\n this.tippyInstance = null;\n }\n if (this.panelContainer) {\n this.panelContainer.style.display = 'none';\n if (this.panelContainer.parentElement !== this) {\n this.appendChild(this.panelContainer);\n }\n }\n }\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"],"names":["NileFloatingPanel","NileFloatingPanel_1","d","this","placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","for","open","preventOverlayClose","title","disabled","group","closeOnEscape","panelClass","enableVisibilityEffect","enableTabClose","tippyInstance","panelContainer","anchorEl","_suppressOpenWatch","_panelId","concat","Math","random","toString","slice","_boundEscHandler","_handleEscapeKey","bind","_pendingShowListener","_pendingHideListener","_this","_inherits","_n","_createClass","key","value","createRenderRoot","firstUpdated","_buildDOM","_attachTippy","_joinGroup","visibilityManager","VisibilityManager","host","target","isOpen","onAnchorOutOfView","_setOpen","hide","emit","visible","reason","onDocumentHidden","event","detail","disconnectedCallback","super","_cleanupPendingShowListener","_cleanupPendingHideListener","cleanup","_leaveGroup","_removeEscListener","_destroyTippy","updated","changed","has","setup","queueMicrotask","_this3$tippyInstance","show","get","some","p","Promise","resolve","handler","addEventListener","once","_this5","i","removeEventListener","toggle","refresh","reposition","popperInstance","update","getCurrentPlacement","_this$tippyInstance3","_i$dataset$placement","popper","box","querySelector","dataset","isPositioningOptimal","set","_groups","Set","add","oldGroup","delete","size","_hideGroupSiblings","forEach","panel","_addEscListener","document","e","_this$tippyInstance4","_applyAria","setAttribute","id","_syncAriaExpanded","String","removeAttribute","children","Array","from","childNodes","titleNodes","actionNodes","bodyNodes","firstElementSeen","_i","_t","child","HTMLElement","slot","getAttribute","push","anchor","getElementById","firstChild","removeChild","appendChild","createElement","className","style","display","body","length","titleDiv","textContent","n","mainDiv","actionDiv","_resolveArrow","roundArrow","_getEffectiveDuration","prefersReducedMotion","parseDuration","_getEffectiveAnimation","resolvedFollowCursor","parseFollowCursor","effectiveHideOnClick","options","content","offset","theme","appendTo","plugins","followCursorPlugin","popperOptions","modifiers","name","enabled","onMount","instance","split","filter","Boolean","cls","classList","onShow","tc","width","height","overflow","dispatchEvent","CustomEvent","reference","onShown","onHide","onHidden","tippy","_this7$tippyInstance","destroy","parentElement","_reducedMotionQuery","window","matchMedia","matches","styles","NileElement","Map","__decorate","property","type","prototype","Number","reflect","attribute","customElement"],"mappings":"6rIA2CaA,CAAAA,CAAiBC,6BAAvB,SAAAC,EAAA,uEAwBLC,KAAAA,CAASC,SAAAA,CAeQ,SAEWD,KAAAA,CAAOE,OAAAA,CAAW,QAElBF,KAAAA,CAAQG,QAAAA,CAAG,GAEXH,KAAAA,CAAQI,QAAAA,CAAG,EAGvCJ,KAAAA,CAAKK,KAAAA,CAAiC,QAEKL,KAAAA,CAASM,SAAAA,CAAW,OAEpBN,KAAAA,CAAQO,QAAAA,CAG5B,IAEoBP,KAAAA,CAAKQ,KAAAA,CAEzB,EAEqBR,KAAAA,CAAWS,WAAA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,CAA3CC,CAAS,CAAA,CAAEC,KAAM3B,OAAS8B,CAAAA,OAAAA,CAAAA,CAAS,KAA+BvN,CAAAqN,CAAAA,SAAAA,CAAA,qBAAA,EArHxDrN,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAiBC,GAAAiN,CAAA,CAAA,CAD7BO,CAAc,CAAA,qBAAA,CAAA,CAAA,CACFzN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{property as i,customElement as e}from"lit/decorators.js";import{s}from"./nile-floating-panel.css.esm.js";import{N as n}from"../internal/nile-element.esm.js";import{R as h,f as o,t as r}from"../tippy.esm-57628c2b.esm.js";import{p as l,a}from"../nile-lite-tooltip/utils.esm.js";import{V as d}from"../utilities/visibility-manager.esm.js";import"lit";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";var c;let p=c=class extends n{constructor(){super(...arguments),this.placement="bottom",this.trigger="click",this.distance=12,this.skidding=0,this.arrow="round",this.animation="fade",this.duration=200,this.delay=0,this.interactive=!0,this.interactiveBorder=2,this.maxWidth="none",this.zIndex=9999,this.followCursor=!1,this.hideOnClick=!0,this.inertia=!1,this.allowHTML=!1,this.flip=!0,this.for=null,this.open=!1,this.preventOverlayClose=!1,this.title="",this.disabled=!1,this.group=null,this.closeOnEscape=!0,this.panelClass="",this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.tippyInstance=null,this.panelContainer=null,this.anchorEl=null,this._suppressOpenWatch=!1,this._panelId=`nile-fp-${Math.random().toString(36).slice(2,9)}`,this._boundEscHandler=this._handleEscapeKey.bind(this),this._pendingShowListener=null,this._pendingHideListener=null}static get prefersReducedMotion(){return c._reducedMotionQuery||(c._reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),c._reducedMotionQuery.matches}static get styles(){return[s]}createRenderRoot(){return this}firstUpdated(){this._buildDOM(),this._attachTippy(),this._joinGroup(),this.visibilityManager=new d({host:this,target:this.anchorEl||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)}),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this._cleanupPendingShowListener(),this._cleanupPendingHideListener(),this.visibilityManager?.cleanup(),this._leaveGroup(),this._removeEscListener(),this._destroyTippy(),this.emit("nile-destroy")}updated(t){if(super.updated(t),!this.panelContainer)return;t.has("open")&&!this._suppressOpenWatch&&(this.open?(this.visibilityManager?.setup(),queueMicrotask((()=>this.tippyInstance?.show()))):(this.visibilityManager?.cleanup(),this.tippyInstance?.hide())),t.has("group")&&(this._leaveGroup(t.get("group")),this._joinGroup());["placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","preventOverlayClose","disabled","width","height","panelClass"].some((i=>t.has(i)))&&this._attachTippy()}show(){return this.open=!0,new Promise((t=>{this._cleanupPendingShowListener();const i=()=>{this._pendingShowListener=null,t()};this._pendingShowListener=i,this.addEventListener("nile-after-show",i,{once:!0})}))}hide(){return this.open=!1,new Promise((t=>{this._cleanupPendingHideListener();const i=()=>{this._pendingHideListener=null,t()};this._pendingHideListener=i,this.addEventListener("nile-after-hide",i,{once:!0})}))}_cleanupPendingShowListener(){this._pendingShowListener&&(this.removeEventListener("nile-after-show",this._pendingShowListener),this._pendingShowListener=null)}_cleanupPendingHideListener(){this._pendingHideListener&&(this.removeEventListener("nile-after-hide",this._pendingHideListener),this._pendingHideListener=null)}toggle(){this.open=!this.open}refresh(){this._attachTippy()}getCurrentPlacement(){const t=this.tippyInstance?.popper,i=t?.querySelector(".tippy-box");return i?.dataset.placement??this.placement}isPositioningOptimal(){return this.getCurrentPlacement()===this.placement}_joinGroup(){if(!this.group)return;let t=c._groups.get(this.group);t||(t=new Set,c._groups.set(this.group,t)),t.add(this)}_leaveGroup(t){const i=t??this.group;if(!i)return;const e=c._groups.get(i);e&&(e.delete(this),0===e.size&&c._groups.delete(i))}_hideGroupSiblings(){if(!this.group)return;const t=c._groups.get(this.group);t&&t.forEach((t=>{t!==this&&t.open&&(t._setOpen(!1),t.tippyInstance?.hide())}))}_addEscListener(){this.closeOnEscape&&document.addEventListener("keydown",this._boundEscHandler)}_removeEscListener(){document.removeEventListener("keydown",this._boundEscHandler)}_handleEscapeKey(t){"Escape"===t.key&&this.open&&(this._setOpen(!1),this.tippyInstance?.hide())}_applyAria(){this.anchorEl&&this.panelContainer&&(this.panelContainer.setAttribute("role","dialog"),this.panelContainer.id=this._panelId,this.anchorEl.setAttribute("aria-haspopup","dialog"),this._syncAriaExpanded())}_syncAriaExpanded(){this.anchorEl?.setAttribute("aria-expanded",String(this.open)),this.open?this.anchorEl?.setAttribute("aria-describedby",this._panelId):this.anchorEl?.removeAttribute("aria-describedby")}_buildDOM(){const t=Array.from(this.childNodes);this.anchorEl=null;const i=[],e=[],s=[];let n=!1;for(const h of t){if(h instanceof HTMLElement){const t=h.getAttribute("slot");if("title"===t){h.removeAttribute("slot"),i.push(h);continue}if("action"===t){h.removeAttribute("slot"),e.push(h);continue}if(!n&&!this.for){this.anchorEl=h,n=!0;continue}}s.push(h)}if(this.for){const t=document.getElementById(this.for);t&&(this.anchorEl=t)}for(;this.firstChild;)this.removeChild(this.firstChild);this.anchorEl&&!this.for&&this.appendChild(this.anchorEl),this.panelContainer=document.createElement("div"),this.panelContainer.className="nile-floating-panel__content",this.panelContainer.style.display="none";const h=document.createElement("div");if(h.className="nile-floating-panel__body",i.length>0||this.title){const t=document.createElement("div");t.className="nile-floating-panel__title",this.title?t.textContent=this.title:i.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(s.length>0){const t=document.createElement("div");t.className="nile-floating-panel__main",s.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(e.length>0){const t=document.createElement("div");t.className="nile-floating-panel__action",e.forEach((i=>t.appendChild(i))),h.appendChild(t)}this.panelContainer.appendChild(h),this.appendChild(this.panelContainer),this._applyAria()}_resolveArrow(){switch(this.arrow){case"round":return h;case"none":return!1;default:return!0}}_setOpen(t){this._suppressOpenWatch=!0,this.open=t,this._syncAriaExpanded(),this._suppressOpenWatch=!1}_getEffectiveDuration(){return c.prefersReducedMotion?0:l(this.duration)}_getEffectiveAnimation(){return!c.prefersReducedMotion&&this.animation}_attachTippy(){if(this._destroyTippy(),this.disabled||!this.anchorEl||!this.panelContainer)return;const t=a(this.followCursor),i=!this.preventOverlayClose&&this.hideOnClick,e={content:this.panelContainer,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"floating-panel",animation:this._getEffectiveAnimation(),interactive:this.interactive,arrow:this._resolveArrow(),duration:this._getEffectiveDuration(),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:i,inertia:!c.prefersReducedMotion&&this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:t,plugins:t?[o]:[],popperOptions:{modifiers:[{name:"flip",enabled:this.flip}]},onMount:t=>{this.panelContainer&&(this.panelContainer.style.display=""),this.panelClass&&this.panelClass.split(/\s+/).filter(Boolean).forEach((i=>{t.popper.classList.add(i)}))},onShow:t=>{this.panelContainer&&(this.panelContainer.style.display="");const i=t.popper.querySelector(".tippy-content");i&&(this.width&&(i.style.width=this.width),this.height&&(i.style.height=this.height,i.style.overflow="auto")),this._hideGroupSiblings(),this._setOpen(!0),this._addEscListener(),this.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:t,target:t.reference}}))},onShown:t=>{this.dispatchEvent(new CustomEvent("nile-after-show",{detail:{instance:t,target:t.reference}}))},onHide:t=>{this._setOpen(!1),this._removeEscListener(),this.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:t,target:t.reference}}))},onHidden:t=>{this.panelContainer&&(this.panelContainer.style.display="none"),this.dispatchEvent(new CustomEvent("nile-after-hide",{detail:{instance:t,target:t.reference}}))}};this.tippyInstance=r(this.anchorEl,e),this.open&&queueMicrotask((()=>this.tippyInstance?.show()))}_destroyTippy(){this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.panelContainer&&(this.panelContainer.style.display="none",this.panelContainer.parentElement!==this&&this.appendChild(this.panelContainer))}};p._groups=new Map,p._reducedMotionQuery=null,t([i({type:String})],p.prototype,"placement",void 0),t([i({type:String})],p.prototype,"trigger",void 0),t([i({type:Number})],p.prototype,"distance",void 0),t([i({type:Number})],p.prototype,"skidding",void 0),t([i({type:String,reflect:!0})],p.prototype,"arrow",void 0),t([i({type:String,reflect:!0})],p.prototype,"animation",void 0),t([i({type:String,reflect:!0})],p.prototype,"duration",void 0),t([i({type:String,reflect:!0})],p.prototype,"delay",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"interactive",void 0),t([i({type:Number,reflect:!0})],p.prototype,"interactiveBorder",void 0),t([i({type:String,reflect:!0})],p.prototype,"maxWidth",void 0),t([i({type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([i({type:String,reflect:!0})],p.prototype,"followCursor",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"hideOnClick",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"inertia",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"allowHTML",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"flip",void 0),t([i({type:String,attribute:"for"})],p.prototype,"for",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"open",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"preventOverlayClose",void 0),t([i({type:String,reflect:!0})],p.prototype,"title",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([i({type:String,reflect:!0})],p.prototype,"width",void 0),t([i({type:String,reflect:!0})],p.prototype,"height",void 0),t([i({type:String,reflect:!0})],p.prototype,"group",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"closeOnEscape",void 0),t([i({type:String,reflect:!0,attribute:!0})],p.prototype,"panelClass",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableVisibilityEffect",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableTabClose",void 0),p=c=t([e("nile-floating-panel")],p);export{p as N};
|
|
1
|
+
import{__decorate as t}from"tslib";import{property as i,customElement as e}from"lit/decorators.js";import{s}from"./nile-floating-panel.css.esm.js";import{N as n}from"../internal/nile-element.esm.js";import{R as h,f as o,t as r}from"../tippy.esm-57628c2b.esm.js";import{p as l,a}from"../nile-lite-tooltip/utils.esm.js";import{V as d}from"../utilities/visibility-manager.esm.js";import"lit";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";var c;let p=c=class extends n{constructor(){super(...arguments),this.placement="bottom",this.trigger="click",this.distance=12,this.skidding=0,this.arrow="round",this.animation="fade",this.duration=200,this.delay=0,this.interactive=!0,this.interactiveBorder=2,this.maxWidth="none",this.zIndex=9999,this.followCursor=!1,this.hideOnClick=!0,this.inertia=!1,this.allowHTML=!1,this.flip=!0,this.for=null,this.open=!1,this.preventOverlayClose=!1,this.title="",this.disabled=!1,this.group=null,this.closeOnEscape=!0,this.panelClass="",this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.tippyInstance=null,this.panelContainer=null,this.anchorEl=null,this._suppressOpenWatch=!1,this._panelId=`nile-fp-${Math.random().toString(36).slice(2,9)}`,this._boundEscHandler=this._handleEscapeKey.bind(this),this._pendingShowListener=null,this._pendingHideListener=null}static get prefersReducedMotion(){return c._reducedMotionQuery||(c._reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),c._reducedMotionQuery.matches}static get styles(){return[s]}createRenderRoot(){return this}firstUpdated(){this._buildDOM(),this._attachTippy(),this._joinGroup(),this.visibilityManager=new d({host:this,target:this.anchorEl||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)}),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this._cleanupPendingShowListener(),this._cleanupPendingHideListener(),this.visibilityManager?.cleanup(),this._leaveGroup(),this._removeEscListener(),this._destroyTippy(),this.emit("nile-destroy")}updated(t){if(super.updated(t),!this.panelContainer)return;t.has("open")&&!this._suppressOpenWatch&&(this.open?(this.visibilityManager?.setup(),queueMicrotask((()=>this.tippyInstance?.show()))):(this.visibilityManager?.cleanup(),this.tippyInstance?.hide())),t.has("group")&&(this._leaveGroup(t.get("group")),this._joinGroup());["placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","preventOverlayClose","disabled","width","height","panelClass"].some((i=>t.has(i)))&&this._attachTippy()}show(){return this.open=!0,new Promise((t=>{this._cleanupPendingShowListener();const i=()=>{this._pendingShowListener=null,t()};this._pendingShowListener=i,this.addEventListener("nile-after-show",i,{once:!0})}))}hide(){return this.open=!1,new Promise((t=>{this._cleanupPendingHideListener();const i=()=>{this._pendingHideListener=null,t()};this._pendingHideListener=i,this.addEventListener("nile-after-hide",i,{once:!0})}))}_cleanupPendingShowListener(){this._pendingShowListener&&(this.removeEventListener("nile-after-show",this._pendingShowListener),this._pendingShowListener=null)}_cleanupPendingHideListener(){this._pendingHideListener&&(this.removeEventListener("nile-after-hide",this._pendingHideListener),this._pendingHideListener=null)}toggle(){this.open=!this.open}refresh(){this._attachTippy()}reposition(){this.tippyInstance?.popperInstance?.update()}getCurrentPlacement(){const t=this.tippyInstance?.popper,i=t?.querySelector(".tippy-box");return i?.dataset.placement??this.placement}isPositioningOptimal(){return this.getCurrentPlacement()===this.placement}_joinGroup(){if(!this.group)return;let t=c._groups.get(this.group);t||(t=new Set,c._groups.set(this.group,t)),t.add(this)}_leaveGroup(t){const i=t??this.group;if(!i)return;const e=c._groups.get(i);e&&(e.delete(this),0===e.size&&c._groups.delete(i))}_hideGroupSiblings(){if(!this.group)return;const t=c._groups.get(this.group);t&&t.forEach((t=>{t!==this&&t.open&&(t._setOpen(!1),t.tippyInstance?.hide())}))}_addEscListener(){this.closeOnEscape&&document.addEventListener("keydown",this._boundEscHandler)}_removeEscListener(){document.removeEventListener("keydown",this._boundEscHandler)}_handleEscapeKey(t){"Escape"===t.key&&this.open&&(this._setOpen(!1),this.tippyInstance?.hide())}_applyAria(){this.anchorEl&&this.panelContainer&&(this.panelContainer.setAttribute("role","dialog"),this.panelContainer.id=this._panelId,this.anchorEl.setAttribute("aria-haspopup","dialog"),this._syncAriaExpanded())}_syncAriaExpanded(){this.anchorEl?.setAttribute("aria-expanded",String(this.open)),this.open?this.anchorEl?.setAttribute("aria-describedby",this._panelId):this.anchorEl?.removeAttribute("aria-describedby")}_buildDOM(){const t=Array.from(this.childNodes);this.anchorEl=null;const i=[],e=[],s=[];let n=!1;for(const h of t){if(h instanceof HTMLElement){const t=h.getAttribute("slot");if("title"===t){h.removeAttribute("slot"),i.push(h);continue}if("action"===t){h.removeAttribute("slot"),e.push(h);continue}if(!n&&!this.for){this.anchorEl=h,n=!0;continue}}s.push(h)}if(this.for){const t=document.getElementById(this.for);t&&(this.anchorEl=t)}for(;this.firstChild;)this.removeChild(this.firstChild);this.anchorEl&&!this.for&&this.appendChild(this.anchorEl),this.panelContainer=document.createElement("div"),this.panelContainer.className="nile-floating-panel__content",this.panelContainer.style.display="none";const h=document.createElement("div");if(h.className="nile-floating-panel__body",i.length>0||this.title){const t=document.createElement("div");t.className="nile-floating-panel__title",this.title?t.textContent=this.title:i.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(s.length>0){const t=document.createElement("div");t.className="nile-floating-panel__main",s.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(e.length>0){const t=document.createElement("div");t.className="nile-floating-panel__action",e.forEach((i=>t.appendChild(i))),h.appendChild(t)}this.panelContainer.appendChild(h),this.appendChild(this.panelContainer),this._applyAria()}_resolveArrow(){switch(this.arrow){case"round":return h;case"none":return!1;default:return!0}}_setOpen(t){this._suppressOpenWatch=!0,this.open=t,this._syncAriaExpanded(),this._suppressOpenWatch=!1}_getEffectiveDuration(){return c.prefersReducedMotion?0:l(this.duration)}_getEffectiveAnimation(){return!c.prefersReducedMotion&&this.animation}_attachTippy(){if(this._destroyTippy(),this.disabled||!this.anchorEl||!this.panelContainer)return;const t=a(this.followCursor),i=!this.preventOverlayClose&&this.hideOnClick,e={content:this.panelContainer,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"floating-panel",animation:this._getEffectiveAnimation(),interactive:this.interactive,arrow:this._resolveArrow(),duration:this._getEffectiveDuration(),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:i,inertia:!c.prefersReducedMotion&&this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:t,plugins:t?[o]:[],popperOptions:{modifiers:[{name:"flip",enabled:this.flip}]},onMount:t=>{this.panelContainer&&(this.panelContainer.style.display=""),this.panelClass&&this.panelClass.split(/\s+/).filter(Boolean).forEach((i=>{t.popper.classList.add(i)}))},onShow:t=>{this.panelContainer&&(this.panelContainer.style.display="");const i=t.popper.querySelector(".tippy-content");i&&(this.width&&(i.style.width=this.width),this.height&&(i.style.height=this.height,i.style.overflow="auto")),this._hideGroupSiblings(),this._setOpen(!0),this._addEscListener(),this.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:t,target:t.reference}}))},onShown:t=>{this.dispatchEvent(new CustomEvent("nile-after-show",{detail:{instance:t,target:t.reference}}))},onHide:t=>{this._setOpen(!1),this._removeEscListener(),this.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:t,target:t.reference}}))},onHidden:t=>{this.panelContainer&&(this.panelContainer.style.display="none"),this.dispatchEvent(new CustomEvent("nile-after-hide",{detail:{instance:t,target:t.reference}}))}};this.tippyInstance=r(this.anchorEl,e),this.open&&queueMicrotask((()=>this.tippyInstance?.show()))}_destroyTippy(){this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.panelContainer&&(this.panelContainer.style.display="none",this.panelContainer.parentElement!==this&&this.appendChild(this.panelContainer))}};p._groups=new Map,p._reducedMotionQuery=null,t([i({type:String})],p.prototype,"placement",void 0),t([i({type:String})],p.prototype,"trigger",void 0),t([i({type:Number})],p.prototype,"distance",void 0),t([i({type:Number})],p.prototype,"skidding",void 0),t([i({type:String,reflect:!0})],p.prototype,"arrow",void 0),t([i({type:String,reflect:!0})],p.prototype,"animation",void 0),t([i({type:String,reflect:!0})],p.prototype,"duration",void 0),t([i({type:String,reflect:!0})],p.prototype,"delay",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"interactive",void 0),t([i({type:Number,reflect:!0})],p.prototype,"interactiveBorder",void 0),t([i({type:String,reflect:!0})],p.prototype,"maxWidth",void 0),t([i({type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([i({type:String,reflect:!0})],p.prototype,"followCursor",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"hideOnClick",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"inertia",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"allowHTML",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"flip",void 0),t([i({type:String,attribute:"for"})],p.prototype,"for",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"open",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"preventOverlayClose",void 0),t([i({type:String,reflect:!0})],p.prototype,"title",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([i({type:String,reflect:!0})],p.prototype,"width",void 0),t([i({type:String,reflect:!0})],p.prototype,"height",void 0),t([i({type:String,reflect:!0})],p.prototype,"group",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"closeOnEscape",void 0),t([i({type:String,reflect:!0,attribute:!0})],p.prototype,"panelClass",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableVisibilityEffect",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableTabClose",void 0),p=c=t([e("nile-floating-panel")],p);export{p as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","./nile-slider.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js","lit","lit/decorators.js","./nile-slider.template.cjs.js","./utils/nile-slider.utils.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,s,i,e,h,a,l,n,r,o,c,p,d,m,u,v,b,y,_templateObject,_templateObject2,g;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_nileSliderCssCjsJs){s=_nileSliderCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_lit){h=_lit.html;},function(_litDecoratorsJs){a=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileSliderTemplateCjsJs){n=_nileSliderTemplateCjsJs.l;r=_nileSliderTemplateCjsJs.r;o=_nileSliderTemplateCjsJs.s;},function(_utilsNileSliderUtilsCjsJs){c=_utilsNileSliderUtilsCjsJs.h;p=_utilsNileSliderUtilsCjsJs.a;d=_utilsNileSliderUtilsCjsJs.b;m=_utilsNileSliderUtilsCjsJs.v;u=_utilsNileSliderUtilsCjsJs.r;v=_utilsNileSliderUtilsCjsJs.c;b=_utilsNileSliderUtilsCjsJs.d;y=_utilsNileSliderUtilsCjsJs.g;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",g=/*#__PURE__*/function(_i){function g(){var _this;_classCallCheck(this,g);_this=_callSuper(this,g,arguments),_this.minValue=0,_this.value=_this.minValue,_this.maxValue=100,_this.rangeOneValue=_this.minValue,_this.rangeTwoValue=_this.maxValue,_this.showLabel=!1,_this.labelStart="",_this.labelEnd="",_this.rangeSlider=!1,_this.labelPosition="top",_this.tooltipPosition="top",_this.activeThumb=null,_this.onMouseMove=function(t){var s=_this.range.getBoundingClientRect();if(_this.rangeSlider){"one"===_this.activeThumb?p(t,s,_assertThisInitialized(_this)):"two"===_this.activeThumb&&d(t,s,_assertThisInitialized(_this));var _i2=m(_this.rangeOneValue,_assertThisInitialized(_this)),_e=m(_this.rangeTwoValue,_assertThisInitialized(_this)),_h=Math.min(_i2,_e),_a=Math.abs(_e-_i2);_this.rangeTwoValue>=_this.rangeOneValue&&(_this.completed.style.left="".concat(_h,"%"),_this.completed.style.width="".concat(_a,"%"));}else c(t,s,_assertThisInitialized(_this));},_this.onMouseUp=function(){_this.rangeSlider?(_this.emit("nile-button-first-change-end",{value:_this.rangeOneValue}),_this.emit("nile-button-last-change-end",{value:_this.rangeTwoValue})):_this.emit("nile-change-end",{value:_this.value}),_this.activeThumb=null,u(_assertThisInitialized(_this));},_this.onMouseDown=function(t){var s=_this.range.getBoundingClientRect(),i=(t.clientX-s.left)/s.width*100,e=_this.minValue+i/100*(_this.maxValue-_this.minValue);if(_this.rangeSlider){b(e,_assertThisInitialized(_this));var _t=Math.abs(e-_this.rangeOneValue),_s=Math.abs(e-_this.rangeTwoValue);_this.activeThumb=_t<=_s?"one":"two",v(_assertThisInitialized(_this));}else c(t,s,_assertThisInitialized(_this)),_this.activeThumb="one",v(_assertThisInitialized(_this));};return _this;}_inherits(g,_i);return _createClass(g,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(g,"connectedCallback",this,3)([]),this.emit("nile-init"),this.rangeSlider&&this.checkRangeValidity();}},{key:"firstUpdated",value:function firstUpdated(t){if(y(this),!this.rangeSlider&&t.has("value")){this.value=this.checkValueValidity(this.value,this.minValue,this.maxValue);var _t2=m(this.value,this);this.buttonOne.style.left="".concat(_t2,"%"),this.completed.style.width="".concat(_t2,"%");}else if(this.rangeSlider){var _t3=m(this.rangeOneValue,this),_s2=m(this.rangeTwoValue,this);this.buttonOne&&(this.buttonOne.style.left="".concat(_t3,"%")),this.buttonTwo&&(this.buttonTwo.style.left="".concat(_s2,"%"));var _i3=Math.min(_t3,_s2),_e2=Math.abs(_s2-_t3);this.completed.style.left="".concat(_i3,"%"),this.completed.style.width="".concat(_e2,"%");}}},{key:"checkValueValidity",value:function checkValueValidity(t,s,i){return i-s<=1?Math.max(s,Math.min(t,i)):Math.floor(Math.max(s,Math.min(t,i)));}},{key:"checkRangeValidity",value:function checkRangeValidity(){this.rangeTwoValue>this.maxValue?this.rangeTwoValue=this.maxValue:this.rangeTwoValue<this.rangeOneValue&&(this.rangeTwoValue=this.rangeOneValue),this.rangeOneValue<this.minValue?this.rangeOneValue=this.minValue:this.rangeOneValue>this.rangeTwoValue&&(this.rangeOneValue=this.rangeTwoValue);}},{key:"render",value:function render(){var t=this.showLabel,s=t?"label-start label-end":void 0;return h(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <slot class=\"span\" name=\"prefix\"></slot>\n \n <div\n part=\"range-container\"\n class=","\n >\n ","\n \n <div\n class=\"range\"\n part=\"range\"\n role=\"group\"\n aria-labelledby=","\n >\n <span class=\"range-completed\" part=\"range-completed\"></span>\n ","\n </div>\n </div>\n \n <slot class=\"span\" name=\"suffix\"></slot>\n </div>\n "])),e({container:!0,"align-item-center":!t}),e({"range-container":!0,"column-reverse":"bottom"===this.labelPosition}),t?n(this):h(_templateObject2||(_templateObject2=_taggedTemplateLiteral([""]))),s,this.rangeSlider?r(this):o(this));}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(g,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}}],[{key:"styles",get:function get(){return[s];}}]);}(i));t([a({type:Number})],g.prototype,"minValue",void 0),t([a({type:Number})],g.prototype,"value",void 0),t([a({type:Number})],g.prototype,"maxValue",void 0),t([a({type:Number})],g.prototype,"rangeOneValue",void 0),t([a({type:Number})],g.prototype,"rangeTwoValue",void 0),t([a({type:Boolean})],g.prototype,"showLabel",void 0),t([a({type:String})],g.prototype,"labelStart",void 0),t([a({type:String})],g.prototype,"labelEnd",void 0),t([a({type:Boolean})],g.prototype,"rangeSlider",void 0),t([a({type:String})],g.prototype,"labelPosition",void 0),t([a({type:String})],g.prototype,"tooltipPosition",void 0),_export("N",g=t([l("nile-slider")],g));}};});
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","./nile-slider.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js","lit","lit/decorators.js","./nile-slider.template.cjs.js","./utils/nile-slider.utils.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,s,i,e,h,a,l,r,n,o,c,p,d,m,u,v,b,y,f,g,_templateObject,_templateObject2,_templateObject3,_templateObject4,j;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_nileSliderCssCjsJs){s=_nileSliderCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_lit){h=_lit.html;},function(_litDecoratorsJs){a=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileSliderTemplateCjsJs){r=_nileSliderTemplateCjsJs.f;n=_nileSliderTemplateCjsJs.l;o=_nileSliderTemplateCjsJs.r;c=_nileSliderTemplateCjsJs.s;p=_nileSliderTemplateCjsJs.b;},function(_utilsNileSliderUtilsCjsJs){d=_utilsNileSliderUtilsCjsJs.h;m=_utilsNileSliderUtilsCjsJs.a;u=_utilsNileSliderUtilsCjsJs.b;v=_utilsNileSliderUtilsCjsJs.v;b=_utilsNileSliderUtilsCjsJs.r;y=_utilsNileSliderUtilsCjsJs.c;f=_utilsNileSliderUtilsCjsJs.d;g=_utilsNileSliderUtilsCjsJs.g;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",j=/*#__PURE__*/function(_i){function j(){var _this;_classCallCheck(this,j);_this=_callSuper(this,j,arguments),_this.minValue=0,_this.value=_this.minValue,_this.maxValue=100,_this.rangeOneValue=_this.minValue,_this.rangeTwoValue=_this.maxValue,_this.showLabel=!1,_this.labelStart="",_this.labelEnd="",_this.rangeSlider=!1,_this.labelPosition="top",_this.tooltipPosition="top",_this.label="",_this.disabled=!1,_this.error=!1,_this.valueLabel="tooltip",_this.activeThumb=null,_this.onMouseMove=function(t){if(_this.disabled)return;var s=_this.range.getBoundingClientRect();if(_this.rangeSlider){"one"===_this.activeThumb?m(t,s,_assertThisInitialized(_this)):"two"===_this.activeThumb&&u(t,s,_assertThisInitialized(_this));var _i2=v(_this.rangeOneValue,_assertThisInitialized(_this)),_e=v(_this.rangeTwoValue,_assertThisInitialized(_this)),_h=Math.min(_i2,_e),_a=Math.abs(_e-_i2);_this.rangeTwoValue>=_this.rangeOneValue&&(_this.completed.style.left="".concat(_h,"%"),_this.completed.style.width="".concat(_a,"%"));}else d(t,s,_assertThisInitialized(_this));},_this.onMouseUp=function(){_this.rangeSlider?(_this.emit("nile-button-first-change-end",{value:_this.rangeOneValue}),_this.emit("nile-button-last-change-end",{value:_this.rangeTwoValue})):_this.emit("nile-change-end",{value:_this.value}),_this.activeThumb=null,b(_assertThisInitialized(_this));},_this.onMouseDown=function(t){if(_this.disabled)return;var s=_this.range.getBoundingClientRect(),i=(t.clientX-s.left)/s.width*100,e=_this.minValue+i/100*(_this.maxValue-_this.minValue);if(_this.rangeSlider){f(e,_assertThisInitialized(_this));var _t=Math.abs(e-_this.rangeOneValue),_s=Math.abs(e-_this.rangeTwoValue);_this.activeThumb=_t<=_s?"one":"two",y(_assertThisInitialized(_this));}else d(t,s,_assertThisInitialized(_this)),_this.activeThumb="one",y(_assertThisInitialized(_this));};return _this;}_inherits(j,_i);return _createClass(j,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(j,"connectedCallback",this,3)([]),this.emit("nile-init"),this.rangeSlider&&this.checkRangeValidity();}},{key:"firstUpdated",value:function firstUpdated(t){if(g(this),!this.rangeSlider&&t.has("value")){this.value=this.checkValueValidity(this.value,this.minValue,this.maxValue);var _t2=v(this.value,this);this.buttonOne.style.left="".concat(_t2,"%"),this.completed.style.width="".concat(_t2,"%");}else if(this.rangeSlider){var _t3=v(this.rangeOneValue,this),_s2=v(this.rangeTwoValue,this);this.buttonOne&&(this.buttonOne.style.left="".concat(_t3,"%")),this.buttonTwo&&(this.buttonTwo.style.left="".concat(_s2,"%"));var _i3=Math.min(_t3,_s2),_e2=Math.abs(_s2-_t3);this.completed.style.left="".concat(_i3,"%"),this.completed.style.width="".concat(_e2,"%");}}},{key:"checkValueValidity",value:function checkValueValidity(t,s,i){return i-s<=1?Math.max(s,Math.min(t,i)):Math.floor(Math.max(s,Math.min(t,i)));}},{key:"checkRangeValidity",value:function checkRangeValidity(){this.rangeTwoValue>this.maxValue?this.rangeTwoValue=this.maxValue:this.rangeTwoValue<this.rangeOneValue&&(this.rangeTwoValue=this.rangeOneValue),this.rangeOneValue<this.minValue?this.rangeOneValue=this.minValue:this.rangeOneValue>this.rangeTwoValue&&(this.rangeOneValue=this.rangeTwoValue);}},{key:"render",value:function render(){var t=this.showLabel,s=t?"label-start label-end":void 0;return h(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n <div\n part=\"base\"\n class=","\n >\n <slot class=\"span\" name=\"prefix\"></slot>\n \n <div\n part=\"range-container\"\n class=","\n >\n ","\n \n <div\n class=\"range\"\n part=\"range\"\n role=\"group\"\n aria-labelledby=","\n >\n <span class=\"range-completed\" part=\"range-completed\"></span>\n ","\n ","\n </div>\n </div>\n \n <slot class=\"span\" name=\"suffix\"></slot>\n </div>\n "])),this.label?r(this):h(_templateObject2||(_templateObject2=_taggedTemplateLiteral([""]))),e({container:!0,"align-item-center":!t}),e({"range-container":!0,"column-reverse":"bottom"===this.labelPosition}),t?n(this):h(_templateObject3||(_templateObject3=_taggedTemplateLiteral([""]))),s,this.rangeSlider?o(this):c(this),"bottom"===this.valueLabel?p(this):h(_templateObject4||(_templateObject4=_taggedTemplateLiteral([""]))));}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(j,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}}],[{key:"styles",get:function get(){return[s];}}]);}(i));t([a({type:Number})],j.prototype,"minValue",void 0),t([a({type:Number})],j.prototype,"value",void 0),t([a({type:Number})],j.prototype,"maxValue",void 0),t([a({type:Number})],j.prototype,"rangeOneValue",void 0),t([a({type:Number})],j.prototype,"rangeTwoValue",void 0),t([a({type:Boolean})],j.prototype,"showLabel",void 0),t([a({type:String})],j.prototype,"labelStart",void 0),t([a({type:String})],j.prototype,"labelEnd",void 0),t([a({type:Boolean})],j.prototype,"rangeSlider",void 0),t([a({type:String})],j.prototype,"labelPosition",void 0),t([a({type:String})],j.prototype,"tooltipPosition",void 0),t([a({type:String})],j.prototype,"label",void 0),t([a({type:Boolean,reflect:!0})],j.prototype,"disabled",void 0),t([a({type:Boolean,reflect:!0})],j.prototype,"error",void 0),t([a({type:String,reflect:!0})],j.prototype,"valueLabel",void 0),_export("N",j=t([l("nile-slider")],j));}};});
|
|
2
2
|
//# sourceMappingURL=nile-slider.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-slider.cjs.js","sources":["../../../src/nile-slider/nile-slider.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-slider.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TooltipPosition } from './types/nile-slider.types';\nimport { NileSliderEvents } from './types/nile-slider.enums';\nimport { rangeSlider, singleSlider, lableContaier } from './nile-slider.template';\nimport { \n handleSingleSlider, \n handleRangeOne, \n handleRangeTwo, \n getHtmlElements, \n removeMoveListeners,\n valueToPercent,\n handleTwoThumbClick,\n addMoveListeners\n} from './utils/nile-slider.utils'\n\n/** \n * Nile slider component.\n *\n * @tag nile-slider\n */\n@customElement('nile-slider')\nexport class NileSlider extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number }) minValue: number = 0;\n @property({ type: Number }) value: number = this.minValue;\n @property({ type: Number }) maxValue: number = 100;\n @property({ type: Number }) rangeOneValue: number = this.minValue;\n @property({ type: Number }) rangeTwoValue: number = this.maxValue;\n @property({ type: Boolean}) showLabel: boolean = false;\n @property({ type: String }) labelStart: string = \"\";\n @property({ type: String }) labelEnd: string = \"\";\n @property({ type: Boolean}) rangeSlider: boolean = false;\n @property({ type: String }) labelPosition: string = \"top\";\n @property({ type: String }) tooltipPosition: TooltipPosition = \"top\";\n\n public buttonOne!: HTMLElement;\n public buttonTwo!: HTMLElement;\n public range!: HTMLElement;\n public completed!: HTMLElement;\n public activeThumb: 'one' | 'two' | null = null;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(NileSliderEvents.NILE_INIT); \n\n if(this.rangeSlider) {\n this.checkRangeValidity();\n }\n }\n\n firstUpdated(changedProps: Map<string, any>): void {\n getHtmlElements(this);\n\n if (!this.rangeSlider && changedProps.has('value')) {\n this.value = this.checkValueValidity(this.value, this.minValue, this.maxValue);\n const percent = valueToPercent(this.value, this);\n \n this.buttonOne.style.left = `${percent}%`;\n this.completed.style.width = `${percent}%`;\n } else if (this.rangeSlider) {\n \n const percentOne = valueToPercent(this.rangeOneValue, this);\n const percentTwo = valueToPercent(this.rangeTwoValue, this);\n \n if (this.buttonOne) this.buttonOne.style.left = `${percentOne}%`;\n if (this.buttonTwo) this.buttonTwo.style.left = `${percentTwo}%`;\n \n const left = Math.min(percentOne, percentTwo);\n const width = Math.abs(percentTwo - percentOne);\n \n this.completed.style.left = `${left}%`;\n this.completed.style.width = `${width}%`;\n }\n }\n\n checkValueValidity(value: number, min: number, max: number): number {\n if(max - min <= 1) { \n return Math.max(min, Math.min(value, max));\n }\n return Math.floor(Math.max(min, Math.min(value, max)));\n }\n\n checkRangeValidity(): void {\n if(this.rangeTwoValue > this.maxValue) {\n this.rangeTwoValue = this.maxValue;\n } else if(this.rangeTwoValue < this.rangeOneValue) {\n this.rangeTwoValue = this.rangeOneValue;\n }\n\n if(this.rangeOneValue < this.minValue) {\n this.rangeOneValue = this.minValue;\n } else if(this.rangeOneValue > this.rangeTwoValue) {\n this.rangeOneValue = this.rangeTwoValue;\n }\n } \n\n public onMouseMove = (e: MouseEvent): void => {\n const rect = this.range.getBoundingClientRect();\n\n if (!this.rangeSlider) {\n handleSingleSlider(e, rect, this);\n } else {\n if (this.activeThumb === 'one') {\n handleRangeOne(e, rect, this);\n } else if (this.activeThumb === 'two') {\n handleRangeTwo(e, rect, this);\n }\n\n const start = valueToPercent(this.rangeOneValue, this);\n const end = valueToPercent(this.rangeTwoValue, this);\n const left = Math.min(start, end);\n const width = Math.abs(end - start);\n\n if(this.rangeTwoValue >= this.rangeOneValue) {\n this.completed.style.left = `${left}%`;\n this.completed.style.width = `${width}%`;\n }\n }\n };\n\n public onMouseUp = (): void => {\n if(!this.rangeSlider) this.emit(NileSliderEvents.NILE_CHANGE_END, { value: this.value });\n else {\n this.emit(NileSliderEvents.NILE_BUTTON_FIRST_CHANGE_END, { value: this.rangeOneValue });\n this.emit(NileSliderEvents.NILE_BUTTON_LAST_CHANGE_END, { value: this.rangeTwoValue });\n }\n this.activeThumb = null;\n removeMoveListeners(this);\n };\n\n public onMouseDown = (e: MouseEvent): void => {\n const rect = this.range.getBoundingClientRect();\n const clickX = e.clientX - rect.left;\n const percent = (clickX / rect.width) * 100;\n const value = this.minValue + (percent / 100) * (this.maxValue - this.minValue);\n \n if (!this.rangeSlider) {\n handleSingleSlider(e, rect, this);\n this.activeThumb = 'one';\n addMoveListeners(this);\n } else {\n handleTwoThumbClick(value, this);\n const distToOne = Math.abs(value - this.rangeOneValue);\n const distToTwo = Math.abs(value - this.rangeTwoValue);\n this.activeThumb = distToOne <= distToTwo ? 'one' : 'two';\n addMoveListeners(this);\n }\n };\n\n public render(): TemplateResult {\n const hasLabels = this.showLabel;\n const ariaLabelledby = hasLabels ? 'label-start label-end' : undefined;\n \n return html`\n <div\n part=\"base\"\n class=${classMap({\n 'container': true,\n 'align-item-center': !hasLabels\n })}\n >\n <slot class=\"span\" name=\"prefix\"></slot>\n \n <div\n part=\"range-container\"\n class=${classMap({\n 'range-container': true,\n 'column-reverse': this.labelPosition === 'bottom'\n })}\n >\n ${hasLabels ? lableContaier(this) : html``}\n \n <div\n class=\"range\"\n part=\"range\"\n role=\"group\"\n aria-labelledby=${ariaLabelledby}\n >\n <span class=\"range-completed\" part=\"range-completed\"></span>\n ${this.rangeSlider ? rangeSlider(this) : singleSlider(this)}\n </div>\n </div>\n \n <slot class=\"span\" name=\"suffix\"></slot>\n </div>\n `;\n } \n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.emit(NileSliderEvents.NILE_DESTROY);\n }\n}\n\nexport default NileSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-slider': NileSlider;\n }\n}\n"],"names":["NileSlider","_i","g","constructor","this","minValue","value","maxValue","rangeOneValue","rangeTwoValue","showLabel","labelStart","labelEnd","rangeSlider","labelPosition","tooltipPosition","activeThumb","onMouseMove","e","rect","range","getBoundingClientRect","handleRangeOne","handleRangeTwo","start","valueToPercent","end","left","Math","min","width","abs","completed","style","concat","handleSingleSlider","onMouseUp","emit","removeMoveListeners","onMouseDown","percent","clientX","handleTwoThumbClick","distToOne","distToTwo","addMoveListeners","_this","_inherits","_createClass","key","connectedCallback","super","checkRangeValidity","firstUpdated","changedProps","getHtmlElements","has","checkValueValidity","buttonOne","percentOne","percentTwo","buttonTwo","max","floor","render","hasLabels","ariaLabelledby","undefined","html","_templateObject","_taggedTemplateLiteral","classMap","container","lableContaier","_templateObject2","singleSlider","disconnectedCallback","__decorate","get","styles","NileElement","property","type","Number","prototype","Boolean","String","customElement"],"mappings":"yiJAgCaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAKuBC,KAAAA,CAAQC,QAAAA,CAAW,EACnBD,KAAAA,CAAAE,KAAAA,CAAgBF,KAAAA,CAAKC,QAAAA,CACrBD,KAAAA,CAAQG,QAAAA,CAAW,IACnBH,KAAAA,CAAAI,aAAAA,CAAwBJ,KAAAA,CAAKC,QAAAA,CAC7BD,KAAAA,CAAAK,aAAAA,CAAwBL,KAAAA,CAAKG,QAC7BH,CAAAA,KAAAA,CAASM,WAAY,CACrBN,CAAAA,KAAAA,CAAUO,WAAW,EACrBP,CAAAA,KAAAA,CAAQQ,QAAW,CAAA,EAAA,CACnBR,KAAAA,CAAWS,WAAAA,CAAAA,CAAY,EACvBT,KAAAA,CAAaU,aAAAA,CAAW,KACxBV,CAAAA,KAAAA,CAAeW,eAAoB,CAAA,KAAA,CAMxDX,KAAAA,CAAWY,WAA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AA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoF,SAAA,CAAA,aAAA,CAAA,IAAA,EAC7BP,CAAAA,CAAAA,CAAAA,CAAA,CAA3BI,CAAAA,CAAS,CAAEC,IAAAA,CAAMI,MAAwCtF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoF,SAAA,CAAA,eAAA,CAAA,IAAA,EAC9BP,CAAAA,CAAAA,CAAAA,CAAA,CAA3BI,CAAAA,CAAS,CAAEC,IAAAA,CAAMI,MAAmDtF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAoF,SAAA,CAAA,iBAAA,CAAA,IAAA,EAf1DpF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAU6E,CAAA,CAAA,CADtBU,CAAc,CAAA,aAAA,CAAA,CAAA,CACFvF"}
|
|
1
|
+
{"version":3,"file":"nile-slider.cjs.js","sources":["../../../src/nile-slider/nile-slider.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-slider.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TooltipPosition, ValueLabelMode } from './types/nile-slider.types';\nimport { NileSliderEvents } from './types/nile-slider.enums';\nimport { rangeSlider, singleSlider, lableContaier, fieldHeader, bottomValueLabels } from './nile-slider.template';\nimport { \n handleSingleSlider, \n handleRangeOne, \n handleRangeTwo, \n getHtmlElements, \n removeMoveListeners,\n valueToPercent,\n handleTwoThumbClick,\n addMoveListeners\n} from './utils/nile-slider.utils'\n\n/** \n * Nile slider component.\n *\n * @tag nile-slider\n */\n@customElement('nile-slider')\nexport class NileSlider extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number }) minValue: number = 0;\n @property({ type: Number }) value: number = this.minValue;\n @property({ type: Number }) maxValue: number = 100;\n @property({ type: Number }) rangeOneValue: number = this.minValue;\n @property({ type: Number }) rangeTwoValue: number = this.maxValue;\n @property({ type: Boolean}) showLabel: boolean = false;\n @property({ type: String }) labelStart: string = \"\";\n @property({ type: String }) labelEnd: string = \"\";\n @property({ type: Boolean}) rangeSlider: boolean = false;\n @property({ type: String }) labelPosition: string = \"top\";\n @property({ type: String }) tooltipPosition: TooltipPosition = \"top\";\n @property({ type: String }) label = \"\";\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property({ type: Boolean, reflect: true }) error = false;\n @property({ type: String, reflect: true }) valueLabel: ValueLabelMode = 'tooltip';\n\n public buttonOne!: HTMLElement;\n public buttonTwo!: HTMLElement;\n public range!: HTMLElement;\n public completed!: HTMLElement;\n public activeThumb: 'one' | 'two' | null = null;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(NileSliderEvents.NILE_INIT); \n\n if(this.rangeSlider) {\n this.checkRangeValidity();\n }\n }\n\n firstUpdated(changedProps: Map<string, any>): void {\n getHtmlElements(this);\n\n if (!this.rangeSlider && changedProps.has('value')) {\n this.value = this.checkValueValidity(this.value, this.minValue, this.maxValue);\n const percent = valueToPercent(this.value, this);\n \n this.buttonOne.style.left = `${percent}%`;\n this.completed.style.width = `${percent}%`;\n } else if (this.rangeSlider) {\n \n const percentOne = valueToPercent(this.rangeOneValue, this);\n const percentTwo = valueToPercent(this.rangeTwoValue, this);\n \n if (this.buttonOne) this.buttonOne.style.left = `${percentOne}%`;\n if (this.buttonTwo) this.buttonTwo.style.left = `${percentTwo}%`;\n \n const left = Math.min(percentOne, percentTwo);\n const width = Math.abs(percentTwo - percentOne);\n \n this.completed.style.left = `${left}%`;\n this.completed.style.width = `${width}%`;\n }\n }\n\n checkValueValidity(value: number, min: number, max: number): number {\n if(max - min <= 1) {\n return Math.max(min, Math.min(value, max));\n }\n return Math.floor(Math.max(min, Math.min(value, max)));\n }\n\n checkRangeValidity(): void {\n if(this.rangeTwoValue > this.maxValue) {\n this.rangeTwoValue = this.maxValue;\n } else if(this.rangeTwoValue < this.rangeOneValue) {\n this.rangeTwoValue = this.rangeOneValue;\n }\n\n if(this.rangeOneValue < this.minValue) {\n this.rangeOneValue = this.minValue;\n } else if(this.rangeOneValue > this.rangeTwoValue) {\n this.rangeOneValue = this.rangeTwoValue;\n }\n } \n\n public onMouseMove = (e: MouseEvent): void => {\n if (this.disabled) return;\n const rect = this.range.getBoundingClientRect();\n\n if (!this.rangeSlider) {\n handleSingleSlider(e, rect, this);\n } else {\n if (this.activeThumb === 'one') {\n handleRangeOne(e, rect, this);\n } else if (this.activeThumb === 'two') {\n handleRangeTwo(e, rect, this);\n }\n\n const start = valueToPercent(this.rangeOneValue, this);\n const end = valueToPercent(this.rangeTwoValue, this);\n const left = Math.min(start, end);\n const width = Math.abs(end - start);\n\n if(this.rangeTwoValue >= this.rangeOneValue) {\n this.completed.style.left = `${left}%`;\n this.completed.style.width = `${width}%`;\n }\n }\n };\n\n public onMouseUp = (): void => {\n if(!this.rangeSlider) this.emit(NileSliderEvents.NILE_CHANGE_END, { value: this.value });\n else {\n this.emit(NileSliderEvents.NILE_BUTTON_FIRST_CHANGE_END, { value: this.rangeOneValue });\n this.emit(NileSliderEvents.NILE_BUTTON_LAST_CHANGE_END, { value: this.rangeTwoValue });\n }\n this.activeThumb = null;\n removeMoveListeners(this);\n };\n\n public onMouseDown = (e: MouseEvent): void => {\n if (this.disabled) return;\n const rect = this.range.getBoundingClientRect();\n const clickX = e.clientX - rect.left;\n const percent = (clickX / rect.width) * 100;\n const value = this.minValue + (percent / 100) * (this.maxValue - this.minValue);\n \n if (!this.rangeSlider) {\n handleSingleSlider(e, rect, this);\n this.activeThumb = 'one';\n addMoveListeners(this);\n } else {\n handleTwoThumbClick(value, this);\n const distToOne = Math.abs(value - this.rangeOneValue);\n const distToTwo = Math.abs(value - this.rangeTwoValue);\n this.activeThumb = distToOne <= distToTwo ? 'one' : 'two';\n addMoveListeners(this);\n }\n };\n\n public render(): TemplateResult {\n const hasLabels = this.showLabel;\n const ariaLabelledby = hasLabels ? 'label-start label-end' : undefined;\n \n return html`\n ${this.label ? fieldHeader(this) : html``}\n <div\n part=\"base\"\n class=${classMap({\n 'container': true,\n 'align-item-center': !hasLabels\n })}\n >\n <slot class=\"span\" name=\"prefix\"></slot>\n \n <div\n part=\"range-container\"\n class=${classMap({\n 'range-container': true,\n 'column-reverse': this.labelPosition === 'bottom'\n })}\n >\n ${hasLabels ? lableContaier(this) : html``}\n \n <div\n class=\"range\"\n part=\"range\"\n role=\"group\"\n aria-labelledby=${ariaLabelledby}\n >\n <span class=\"range-completed\" part=\"range-completed\"></span>\n ${this.rangeSlider ? rangeSlider(this) : singleSlider(this)}\n ${this.valueLabel === 'bottom' ? bottomValueLabels(this) : html``}\n </div>\n </div>\n \n <slot class=\"span\" name=\"suffix\"></slot>\n </div>\n `;\n } \n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.emit(NileSliderEvents.NILE_DESTROY);\n }\n}\n\nexport default NileSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-slider': NileSlider;\n }\n}\n"],"names":["NileSlider","_i","j","constructor","this","minValue","value","maxValue","rangeOneValue","rangeTwoValue","showLabel","labelStart","labelEnd","rangeSlider","labelPosition","tooltipPosition","label","disabled","error","valueLabel","activeThumb","onMouseMove","e","rect","range","getBoundingClientRect","handleRangeOne","handleRangeTwo","start","valueToPercent","end","left","Math","min","width","abs","completed","style","concat","handleSingleSlider","onMouseUp","emit","removeMoveListeners","onMouseDown","percent","clientX","handleTwoThumbClick","distToOne","distToTwo","addMoveListeners","_this","_inherits","_createClass","key","connectedCallback","super","checkRangeValidity","firstUpdated","changedProps","getHtmlElements","has","checkValueValidity","buttonOne","percentOne","percentTwo","buttonTwo","max","floor","render","hasLabels","ariaLabelledby","undefined","html","_templateObject","_taggedTemplateLiteral","fieldHeader","_templateObject2","classMap","container","lableContaier","_templateObject3","singleSlider","bottomValueLabels","_templateObject4","disconnectedCallback","get","styles","NileElement","__decorate","property","type","Number","prototype","Boolean","String","reflect","customElement"],"mappings":"yoJAgCaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAKuBC,KAAAA,CAAQC,QAAAA,CAAW,EACnBD,KAAAA,CAAAE,KAAAA,CAAgBF,KAAAA,CAAKC,QAAAA,CACrBD,KAAAA,CAAQG,QAAAA,CAAW,IACnBH,KAAAA,CAAAI,aAAAA,CAAwBJ,KAAAA,CAAKC,QAAAA,CAC7BD,KAAAA,CAAAK,aAAAA,CAAwBL,KAAAA,CAAKG,QAC7BH,CAAAA,KAAAA,CAASM,SAAY,CAAA,CAAA,CAAA,CACrBN,KAAAA,CAAUO,UAAAA,CAAW,GACrBP,KAAAA,CAAQQ,QAAAA,CAAW,EACnBR,CAAAA,KAAAA,CAAWS,WAAY,CAAA,CAAA,CAAA,CACvBT,KAAAA,CAAaU,aAAW,CAAA,KAAA,CACxBV,KAAAA,CAAeW,eAAAA,CAAoB,KACnCX,CAAAA,KAAAA,CAAKY,MAAI,EACOZ,CAAAA,KAAAA,CAAQa,QAAI,CAAA,CAAA,CAAA,CACZb,KAAAA,CAAKc,KAAAA,CAAAA,CAAG,EACTd,KAAAA,CAAUe,UAAAA,CAAmB,SAMjEf,CAAAA,KAAAA,CAAWgB,WAAyB,CAAA,IAAA,CAyDpChB,KAAAA,CAAAiB,WAAeC,CAAAA,SAAAA,CAAAA,CAAAA,CACpB,GAAIlB,KAAAA,CAAKa,QAAU,CAAA,OACnB,GAAMM,CAAAA,CAAOnB,CAAAA,KAAAA,CAAKoB,KAAMC,CAAAA,qBAAAA,CAAAA,CAAAA,CAExB,GAAKrB,KAAAA,CAAKS,WAEH,CAAA,CACoB,KAArBT,GAAAA,KAAAA,CAAKgB,WACPM,CAAAA,CAAAA,CAAeJ,CAAGC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA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A,CAAAA,CAAuC7F,CAAA4F,CAAAA,SAAAA,CAAA,kBAAA,EAC7BJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMI,MAAwC9F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4F,SAAA,CAAA,eAAA,CAAA,IAAA,IAC9BJ,CAAA,CAAA,CAA3BC,EAAS,CAAEC,IAAAA,CAAMI,UAAmD9F,CAAA4F,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CACzCJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAsB9F,EAAA4F,SAAA,CAAA,OAAA,CAAA,IAAA,EACIJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,KAAMG,OAASE,CAAAA,OAAAA,CAAAA,CAAS,KAA0B/F,CAAA4F,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAClBJ,EAAA,CAA3CC,CAAAA,CAAS,CAAEC,IAAMG,CAAAA,OAAAA,CAASE,SAAS,CAAsB/F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4F,SAAA,CAAA,OAAA,CAAA,IAAA,IACfJ,CAAA,CAAA,CAA1CC,EAAS,CAAEC,IAAAA,CAAMI,OAAQC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+C/F,CAAA4F,CAAAA,SAAAA,CAAA,iBAAA,EAnBvE5F,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAUwF,EAAA,CADtBQ,CAAAA,CAAc,gBACFhG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var r,_templateObject,
|
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var r,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){r=_lit.css;}],execute:function execute(){_export("s",e=r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n }\n\n /* Field header */\n\n .field-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .field-label {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n }\n\n /* Layout */\n\n .container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n min-height: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n .align-item-center {\n align-items: center;\n }\n\n slot.span {\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n }\n\n .range-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .column-reverse {\n flex-direction: column-reverse;\n }\n\n .label-container {\n display: flex;\n justify-content: space-between;\n }\n\n .label-container span {\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* track & fill */\n\n .range {\n position: relative;\n width: var(--nile-slider-width, 228px);\n height: var(--nile-spacing-xs, var(--ng-spacing-sm));\n background-color: var(--nile-colors-neutral-400, var(--ng-colors-bg-quaternary));\n user-select: none;\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n }\n\n .range:hover {\n cursor: pointer;\n }\n\n .range-completed {\n position: absolute;\n height: 100%;\n width: 0%;\n background-color: var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));\n top: 0px;\n left: 0px;\n z-index: 98;\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n }\n\n /* ------------------------------------------------------------------ */\n /* Inline value label (valueLabel=\"bottom\") */\n /* ------------------------------------------------------------------ */\n\n .value-label {\n position: absolute;\n /* Start at the track bottom, then push down past the handle and the\n largest (pressed, 8px) ring */\n top: 100%;\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n transform: translateX(-50%);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n font-variant-numeric: tabular-nums;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n /* Reserve room below the track for the inline value label */\n :host([valuelabel='bottom']) .container {\n padding-bottom: var(--nile-spacing-2xl, var(--ng-spacing-2xl));\n }\n\n /* Handles */\n\n .range-button,\n .range-button-two {\n height: var(--nile-spacing-lg, var(--ng-spacing-2xl));\n width: var(--nile-spacing-lg, var(--ng-spacing-2xl));\n box-sizing: border-box;\n /* Enterprise: solid brand dot - NextGen: white fill + brand border */\n background-color: var(--nile-colors-primary-600, var(--ng-colors-bg-primary));\n border: var(--nile-spacing-xxs, var(--ng-spacing-xxs)) solid\n var(--nile-colors-primary-600, var(--ng-colors-border-brand-alt));\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n left: 0;\n z-index: 100;\n cursor: grab;\n transition:\n box-shadow var(--nile-transition-duration-short, 120ms) ease,\n background-color var(--nile-transition-duration-short, 120ms) ease,\n transform var(--nile-transition-duration-shorter, 80ms) ease;\n }\n\n .range-button-two {\n left: 100%;\n }\n\n /* Hover: ring (Enterprise 2px - NextGen 6px) */\n .range-button:hover,\n .range-button-two:hover {\n cursor: grab;\n box-shadow: 0 0 0 var(--nile-spacing-xxs, var(--ng-spacing-sm))\n var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n }\n\n /* Focused: theme focus ring */\n .range-button:focus-visible,\n .range-button-two:focus-visible {\n outline: none;\n box-shadow: var(--nile-focus-ring,\n var(--ng-focus-ring,\n 0 0 0 var(--nile-spacing-xs) var(--nile-colors-primary-100)));\n }\n\n /* Pressed: ring (Enterprise 4px - NextGen 8px) + 1.1x scale */\n .range-button:active,\n .range-button-two:active {\n cursor: grabbing;\n transform: translate(-50%, -50%) scale(1.1);\n box-shadow: 0 0 0 var(--nile-spacing-xs, var(--ng-spacing-md))\n var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n }\n\n /* Error state */\n :host([error]) .range-completed {\n background-color: var(--nile-colors-red-700, var(--ng-colors-bg-error-solid));\n }\n\n :host([error]) .range-button,\n :host([error]) .range-button-two {\n background-color: var(--nile-colors-red-700, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-red-700, var(--ng-colors-border-error));\n }\n\n :host([error]) .range-button:hover,\n :host([error]) .range-button-two:hover {\n box-shadow: 0 0 0 var(--nile-spacing-xxs, var(--ng-spacing-sm))\n var(--nile-colors-red-100, var(--ng-colors-bg-error-secondary, var(--ng-color-error-100)));\n }\n\n :host([error]) .range-button:focus-visible,\n :host([error]) .range-button-two:focus-visible {\n box-shadow: var(--nile-focus-ring-error,\n var(--ng-focus-ring-error,\n 0 0 0 var(--nile-spacing-xs) var(--nile-colors-red-100)));\n }\n\n /* Disabled state */\n :host([disabled]) .range,\n :host([disabled]) .range:hover {\n cursor: not-allowed;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled));\n }\n\n :host([disabled]) .range-completed {\n background-color: var(--nile-colors-neutral-500, var(--ng-colors-fg-disabled));\n }\n\n :host([disabled]) .range-button,\n :host([disabled]) .range-button-two {\n background-color: var(--nile-colors-neutral-500, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n cursor: not-allowed;\n }\n\n :host([disabled]) .range-button:hover,\n :host([disabled]) .range-button-two:hover,\n :host([disabled]) .range-button:active,\n :host([disabled]) .range-button-two:active {\n box-shadow: none;\n transform: translate(-50%, -50%);\n }\n\n :host([disabled]) .field-label,\n :host([disabled]) .value-label,\n :host([disabled]) .label-container span {\n color: var(--nile-colors-neutral-500, var(--ng-colors-fg-disabled));\n user-select: none;\n -webkit-user-select: none;\n }\n"]))));}};});
|
|
2
2
|
//# sourceMappingURL=nile-slider.css.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-slider.css.cjs.js","sources":["../../../src/nile-slider/nile-slider.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2025\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\nimport { css } from 'lit';\n\n/**\n* Slider CSS\n*/\nexport const styles = css`\n :host {\n display: block;\n }\n\n .container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap:
|
|
1
|
+
{"version":3,"file":"nile-slider.css.cjs.js","sources":["../../../src/nile-slider/nile-slider.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2025\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\nimport { css } from 'lit';\n\n/**\n* Slider CSS\n*/\nexport const styles = css`\n :host {\n display: block;\n }\n\n /* Field header */\n\n .field-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .field-label {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n }\n\n /* Layout */\n\n .container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n min-height: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n .align-item-center {\n align-items: center;\n }\n\n slot.span {\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n }\n\n .range-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .column-reverse {\n flex-direction: column-reverse;\n }\n\n .label-container {\n display: flex;\n justify-content: space-between;\n }\n\n .label-container span {\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* track & fill */\n\n .range {\n position: relative;\n width: var(--nile-slider-width, 228px);\n height: var(--nile-spacing-xs, var(--ng-spacing-sm));\n background-color: var(--nile-colors-neutral-400, var(--ng-colors-bg-quaternary));\n user-select: none;\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n }\n\n .range:hover {\n cursor: pointer;\n }\n\n .range-completed {\n position: absolute;\n height: 100%;\n width: 0%;\n background-color: var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));\n top: 0px;\n left: 0px;\n z-index: 98;\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n }\n\n /* ------------------------------------------------------------------ */\n /* Inline value label (valueLabel=\"bottom\") */\n /* ------------------------------------------------------------------ */\n\n .value-label {\n position: absolute;\n /* Start at the track bottom, then push down past the handle and the\n largest (pressed, 8px) ring */\n top: 100%;\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n transform: translateX(-50%);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-font-size-micro, var(--ng-font-size-text-xs));\n font-variant-numeric: tabular-nums;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n /* Reserve room below the track for the inline value label */\n :host([valuelabel='bottom']) .container {\n padding-bottom: var(--nile-spacing-2xl, var(--ng-spacing-2xl));\n }\n\n /* Handles */\n\n .range-button,\n .range-button-two {\n height: var(--nile-spacing-lg, var(--ng-spacing-2xl));\n width: var(--nile-spacing-lg, var(--ng-spacing-2xl));\n box-sizing: border-box;\n /* Enterprise: solid brand dot - NextGen: white fill + brand border */\n background-color: var(--nile-colors-primary-600, var(--ng-colors-bg-primary));\n border: var(--nile-spacing-xxs, var(--ng-spacing-xxs)) solid\n var(--nile-colors-primary-600, var(--ng-colors-border-brand-alt));\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-full));\n left: 0;\n z-index: 100;\n cursor: grab;\n transition:\n box-shadow var(--nile-transition-duration-short, 120ms) ease,\n background-color var(--nile-transition-duration-short, 120ms) ease,\n transform var(--nile-transition-duration-shorter, 80ms) ease;\n }\n\n .range-button-two {\n left: 100%;\n }\n\n /* Hover: ring (Enterprise 2px - NextGen 6px) */\n .range-button:hover,\n .range-button-two:hover {\n cursor: grab;\n box-shadow: 0 0 0 var(--nile-spacing-xxs, var(--ng-spacing-sm))\n var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n }\n\n /* Focused: theme focus ring */\n .range-button:focus-visible,\n .range-button-two:focus-visible {\n outline: none;\n box-shadow: var(--nile-focus-ring,\n var(--ng-focus-ring,\n 0 0 0 var(--nile-spacing-xs) var(--nile-colors-primary-100)));\n }\n\n /* Pressed: ring (Enterprise 4px - NextGen 8px) + 1.1x scale */\n .range-button:active,\n .range-button-two:active {\n cursor: grabbing;\n transform: translate(-50%, -50%) scale(1.1);\n box-shadow: 0 0 0 var(--nile-spacing-xs, var(--ng-spacing-md))\n var(--nile-colors-primary-100, var(--ng-colors-bg-brand-secondary));\n }\n\n /* Error state */\n :host([error]) .range-completed {\n background-color: var(--nile-colors-red-700, var(--ng-colors-bg-error-solid));\n }\n\n :host([error]) .range-button,\n :host([error]) .range-button-two {\n background-color: var(--nile-colors-red-700, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-red-700, var(--ng-colors-border-error));\n }\n\n :host([error]) .range-button:hover,\n :host([error]) .range-button-two:hover {\n box-shadow: 0 0 0 var(--nile-spacing-xxs, var(--ng-spacing-sm))\n var(--nile-colors-red-100, var(--ng-colors-bg-error-secondary, var(--ng-color-error-100)));\n }\n\n :host([error]) .range-button:focus-visible,\n :host([error]) .range-button-two:focus-visible {\n box-shadow: var(--nile-focus-ring-error,\n var(--ng-focus-ring-error,\n 0 0 0 var(--nile-spacing-xs) var(--nile-colors-red-100)));\n }\n\n /* Disabled state */\n :host([disabled]) .range,\n :host([disabled]) .range:hover {\n cursor: not-allowed;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled));\n }\n\n :host([disabled]) .range-completed {\n background-color: var(--nile-colors-neutral-500, var(--ng-colors-fg-disabled));\n }\n\n :host([disabled]) .range-button,\n :host([disabled]) .range-button-two {\n background-color: var(--nile-colors-neutral-500, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n cursor: not-allowed;\n }\n\n :host([disabled]) .range-button:hover,\n :host([disabled]) .range-button-two:hover,\n :host([disabled]) .range-button:active,\n :host([disabled]) .range-button-two:active {\n box-shadow: none;\n transform: translate(-50%, -50%);\n }\n\n :host([disabled]) .field-label,\n :host([disabled]) .value-label,\n :host([disabled]) .label-container span {\n color: var(--nile-colors-neutral-500, var(--ng-colors-fg-disabled));\n user-select: none;\n -webkit-user-select: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAWaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|