@nuralyui/tooltips 0.0.7 → 0.0.8
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/index.js.map +1 -1
- package/package.json +1 -1
- package/react.js.map +1 -1
- package/tooltips.component.d.ts +1 -1
- package/tooltips.component.js.map +1 -1
- package/tooltips.constant.js.map +1 -1
- package/tooltips.style.js.map +1 -1
- package/tooltips.variables.js.map +1 -1
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/tooltips/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './tooltips.component.js';\n"]}
|
package/package.json
CHANGED
package/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../src/components/tooltips/react.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/tooltips.component.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ export declare class TooltipElement extends LitElement {
|
|
|
28
28
|
onPopConfirmConfirm(): void;
|
|
29
29
|
onClickOutside: (onClickEvent: Event) => void;
|
|
30
30
|
disconnectedCallback(): void;
|
|
31
|
-
render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
31
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=tooltips.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltips.component.js","sourceRoot":"","sources":["../../../src/components/tooltips/tooltips.component.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAoB,MAAM,KAAK,CAAC;AAClE,OAAO,E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CAAC,CAAC,IAAI,CAAC,IAAI;gBACX,CAAC,CAAC,IAAI,CAAA;;0CAE8B,IAAI,CAAC,eAAe;gDACd,IAAI,CAAC,qBAAqB;;iCAEzC,OAAO,SAAS,SAAS,WAAW,IAAI,CAAC,mBAAmB;mBAC1E,IAAI,CAAC,MAAM;;iCAEG,OAAO,SAAS,QAAQ,WAAW,IAAI,CAAC,kBAAkB;mBACxE,IAAI,CAAC,UAAU;;;;SAIzB;gBACH,CAAC,CAAC,OAAO,CAAC;IACd,CAAC;CACF,CAAA;AAlRiB,qBAAM,GAAG,MAAO,CAAA;AAGhC;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;gDACQ;AAGlC;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;kDACW;AAGrC;IADC,KAAK,EAAE;8CACS;AAEjB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;4CAC5B;AAEb;IADC,QAAQ,EAAE;oDACU;AAErB;IADC,QAAQ,EAAE;uDACU;AAErB;IADC,QAAQ,EAAE;6DACgB;AAE3B;IADC,QAAQ,EAAE;8CACI;AAEf;IADC,QAAQ,EAAE;kDACO;AAtBP,cAAc;IAD1B,aAAa,CAAC,YAAY,CAAC;GACf,cAAc,CAmR1B;SAnRY,cAAc","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { html, LitElement, nothing, PropertyValueMap } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './tooltips.style.js';\nimport { EMPTY_STRING, TooltipAlignment, TooltipPosition } from './tooltips.constant.js';\n@customElement('hy-tooltip')\nexport class TooltipElement extends LitElement {\n static override styles = styles;\n\n @property({reflect: true})\n position = TooltipPosition.Bottom;\n\n @property({reflect: true})\n alignement = TooltipAlignment.Center;\n\n @state()\n target!: Element;\n @property({reflect: true, type: Boolean})\n show = false;\n @property()\n isPopConfirm = false;\n @property()\n popConfirmTitle = '';\n @property()\n popConfirmDescription = '';\n @property()\n okText = 'Yes';\n @property()\n cancelText = 'No';\n\n horizontalOffset = 10;\n verticalOffset = 10;\n override connectedCallback(): void {\n super.connectedCallback();\n\n // Assign the target to a previous sibling or expect it to be set via property.\n this.target = this.target || this.previousElementSibling;\n\n if (!this.target) {\n console.error('Tooltip target is not defined or found. Ensure target is explicitly set or precedes the tooltip.');\n return;\n }\n\n if (!this.isPopConfirm) {\n this.target.addEventListener('mouseover', this.onMouseOver);\n this.target.addEventListener('mouseleave', this.onMouseLeave);\n } else {\n document.addEventListener('scroll', this.calculatePosition);\n this.target.addEventListener('click', this.onClick);\n document.addEventListener('click', this.onClickOutside);\n }\n }\n\n private onMouseOver = () => {\n this.show = true;\n };\n\n private onMouseLeave = () => {\n this.show = false;\n this.initStyles();\n };\n\n private onClick = () => {\n this.show = !this.show;\n };\n\n private initStyles() {\n this.style.top = EMPTY_STRING;\n this.style.left = EMPTY_STRING;\n this.style.width = EMPTY_STRING;\n this.classList.remove(...this.classList.values());\n }\n\n override updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n if (this.show) this.calculatePosition();\n }\n\n private calculatePosition = () => {\n this.initStyles();\n\n this.style.width = `${this.clientWidth}px`;\n if (this.position == TooltipPosition.Bottom || this.position == TooltipPosition.Top) {\n this.calculateYposition();\n this.calculateYalignement();\n } else {\n this.calculateXposition();\n this.calculateXalignement();\n }\n };\n private calculateYposition = () => {\n const targetRect = this.target.getBoundingClientRect();\n const targetWithTopSpaceHeight = targetRect.bottom;\n const topAvailableSpace = targetRect.top;\n const totalViewPortHeight = window.visualViewport!.height;\n const tooltipHeight = this.clientHeight;\n const isAvailableBottomSpace = tooltipHeight + this.verticalOffset < totalViewPortHeight - targetWithTopSpaceHeight;\n const isAvailableTopSpace = tooltipHeight + this.verticalOffset < topAvailableSpace;\n\n if (this.position == TooltipPosition.Bottom) {\n if (isAvailableBottomSpace || !isAvailableTopSpace) {\n this.classList.add('bottom-position');\n this.style.top = `${targetWithTopSpaceHeight + this.verticalOffset}px`;\n } else {\n this.classList.add('top-position');\n this.style.top = `${topAvailableSpace - tooltipHeight - this.verticalOffset}px`;\n }\n } else {\n if (isAvailableTopSpace || !isAvailableBottomSpace) {\n this.classList.add('top-position');\n this.style.top = `${topAvailableSpace - tooltipHeight - this.verticalOffset}px`;\n } else {\n this.classList.add('bottom-position');\n this.style.top = `${targetWithTopSpaceHeight + this.verticalOffset}px`;\n }\n }\n };\n private calculateYalignement = () => {\n const targetRect = this.target.getBoundingClientRect();\n const leftSpaceAndTargetWidth = targetRect.right;\n const targetWidth = targetRect.width;\n const leftSpace = targetRect.left;\n const tooltipWidth = this.clientWidth;\n const leftSpaceAndHalfOfTargetWidth = leftSpace + targetWidth / 2;\n const totalViewPortWidth = window.visualViewport!.width;\n const rightSpaceAndHalfOfTargetWidth = totalViewPortWidth - leftSpaceAndTargetWidth + targetWidth / 2;\n\n if (this.alignement == TooltipAlignment.Start) {\n const canBeAtStart = tooltipWidth + leftSpace < totalViewPortWidth;\n if (canBeAtStart) {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n }\n } else if (this.alignement == TooltipAlignment.End) {\n const canBeAtEnd = tooltipWidth < leftSpace;\n if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n }\n } else {\n const canBeCentered =\n (tooltipWidth / 2 < leftSpaceAndHalfOfTargetWidth && tooltipWidth / 2 < rightSpaceAndHalfOfTargetWidth) ||\n (tooltipWidth > leftSpaceAndHalfOfTargetWidth && tooltipWidth > rightSpaceAndHalfOfTargetWidth);\n const canBeAtEnd = tooltipWidth < leftSpaceAndHalfOfTargetWidth;\n if (canBeCentered) {\n this.classList.add('alignement-center');\n this.style.left = `${leftSpace - tooltipWidth / 2 + targetWidth / 2}px`;\n } else if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n }\n }\n };\n private calculateXposition = () => {\n const targetRect = this.target.getBoundingClientRect();\n const leftSpace = targetRect.left;\n const leftSpaceAndTargetWidth = targetRect.right;\n const totalViewPortWidth = window.visualViewport!.width;\n const tooltipWidth = this.clientWidth;\n const isAvailableRightSpace = tooltipWidth + this.horizontalOffset < totalViewPortWidth - leftSpaceAndTargetWidth;\n const isAvailableLeftSpace = tooltipWidth + this.horizontalOffset < leftSpace;\n\n if (this.position == TooltipPosition.Right) {\n if (isAvailableRightSpace || !isAvailableLeftSpace) {\n this.classList.add('right-position');\n this.style.left = `${leftSpaceAndTargetWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('left-position');\n this.style.left = `${leftSpace - tooltipWidth - this.horizontalOffset}px`;\n }\n } else {\n if (isAvailableLeftSpace || !isAvailableRightSpace) {\n this.classList.add('left-position');\n this.style.left = `${leftSpace - tooltipWidth - this.horizontalOffset}px`;\n } else {\n this.classList.add('right-position');\n this.style.left = `${leftSpaceAndTargetWidth + this.horizontalOffset}px`;\n }\n }\n };\n private calculateXalignement = () => {\n const targetRect = this.target.getBoundingClientRect();\n const topSpace = targetRect.top;\n const targetHeight = targetRect.height;\n const targetWithTopSpaceHeight = targetRect.bottom;\n const tooltipHeight = this.clientHeight;\n const totalViewPortHeight = window.visualViewport!.height;\n const bottomSpace = totalViewPortHeight - targetWithTopSpaceHeight;\n\n if (this.alignement == TooltipAlignment.End) {\n const canBeAtEnd = tooltipHeight < topSpace;\n if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n }\n } else if (this.alignement == TooltipAlignment.Start) {\n const canBeAtStart = tooltipHeight < totalViewPortHeight - targetWithTopSpaceHeight;\n if (canBeAtStart) {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n } else {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n }\n } else {\n const canBeCentered =\n (tooltipHeight / 2 < topSpace && tooltipHeight / 2 < bottomSpace) ||\n (tooltipHeight > topSpace && tooltipHeight > bottomSpace);\n const canBeAtEnd = tooltipHeight < topSpace;\n if (canBeCentered) {\n this.classList.add('alignement-center');\n this.style.top = `${topSpace + targetHeight / 2 - tooltipHeight / 2}px`;\n } else if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n }\n }\n };\n\n onPopConfirmCancel() {\n this.dispatchEvent(new CustomEvent('onCancel'));\n this.show = false;\n this.initStyles();\n }\n onPopConfirmConfirm() {\n this.dispatchEvent(new CustomEvent('onConfirm'));\n this.show = false;\n this.initStyles();\n }\n onClickOutside = (onClickEvent: Event) => {\n const eventPath = onClickEvent.composedPath();\n const outsideClick = !eventPath.includes(this.target) && !eventPath.includes(this);\n if (outsideClick) this.show = false;\n };\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (!this.isPopConfirm) {\n this.target.removeEventListener('mouseover', this.onMouseOver);\n this.target.removeEventListener('mouseleave', this.onMouseLeave);\n } else {\n this.target.removeEventListener('click', this.onClick);\n document.removeEventListener('scroll', this.calculatePosition);\n }\n }\n\n override render() {\n return !this.isPopConfirm\n ? this.show\n ? html`<slot></slot>`\n : nothing\n : this.show\n ? html`\n <div class=\"popconfirm-container\">\n <p class=\"popconfirm-title\">${this.popConfirmTitle}</p>\n <p class=\"popconfirm-description\">${this.popConfirmDescription}</p>\n <div class=\"btn-block\">\n <nr-button .size=${'small'} type=${'primary'} @click=${this.onPopConfirmConfirm}\n >${this.okText}</nr-button\n >\n <nr-button .size=${'small'} type=${'danger'} @click=${this.onPopConfirmCancel}\n >${this.cancelText}</nr-button\n >\n </div>\n </div>\n `\n : nothing;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tooltips.component.js","sourceRoot":"","sources":["../../../../src/components/tooltips/tooltips.component.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAoB,MAAM,KAAK,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzF,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,UAAU;IAA9C;;QAIE,aAAQ,GAAG,eAAe,CAAC,MAAM,CAAC;QAGlC,eAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAKrC,SAAI,GAAG,KAAK,CAAC;QAEb,iBAAY,GAAG,KAAK,CAAC;QAErB,oBAAe,GAAG,EAAE,CAAC;QAErB,0BAAqB,GAAG,EAAE,CAAC;QAE3B,WAAM,GAAG,KAAK,CAAC;QAEf,eAAU,GAAG,IAAI,CAAC;QAElB,qBAAgB,GAAG,EAAE,CAAC;QACtB,mBAAc,GAAG,EAAE,CAAC;QAsBZ,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QAEM,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC;QAEM,YAAO,GAAG,GAAG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,CAmR1B;SAnRY,cAAc","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { html, LitElement, nothing, PropertyValueMap } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './tooltips.style.js';\nimport { EMPTY_STRING, TooltipAlignment, TooltipPosition } from './tooltips.constant.js';\n@customElement('hy-tooltip')\nexport class TooltipElement extends LitElement {\n static override styles = styles;\n\n @property({reflect: true})\n position = TooltipPosition.Bottom;\n\n @property({reflect: true})\n alignement = TooltipAlignment.Center;\n\n @state()\n target!: Element;\n @property({reflect: true, type: Boolean})\n show = false;\n @property()\n isPopConfirm = false;\n @property()\n popConfirmTitle = '';\n @property()\n popConfirmDescription = '';\n @property()\n okText = 'Yes';\n @property()\n cancelText = 'No';\n\n horizontalOffset = 10;\n verticalOffset = 10;\n override connectedCallback(): void {\n super.connectedCallback();\n\n // Assign the target to a previous sibling or expect it to be set via property.\n this.target = this.target || this.previousElementSibling;\n\n if (!this.target) {\n console.error('Tooltip target is not defined or found. Ensure target is explicitly set or precedes the tooltip.');\n return;\n }\n\n if (!this.isPopConfirm) {\n this.target.addEventListener('mouseover', this.onMouseOver);\n this.target.addEventListener('mouseleave', this.onMouseLeave);\n } else {\n document.addEventListener('scroll', this.calculatePosition);\n this.target.addEventListener('click', this.onClick);\n document.addEventListener('click', this.onClickOutside);\n }\n }\n\n private onMouseOver = () => {\n this.show = true;\n };\n\n private onMouseLeave = () => {\n this.show = false;\n this.initStyles();\n };\n\n private onClick = () => {\n this.show = !this.show;\n };\n\n private initStyles() {\n this.style.top = EMPTY_STRING;\n this.style.left = EMPTY_STRING;\n this.style.width = EMPTY_STRING;\n this.classList.remove(...this.classList.values());\n }\n\n override updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n if (this.show) this.calculatePosition();\n }\n\n private calculatePosition = () => {\n this.initStyles();\n\n this.style.width = `${this.clientWidth}px`;\n if (this.position == TooltipPosition.Bottom || this.position == TooltipPosition.Top) {\n this.calculateYposition();\n this.calculateYalignement();\n } else {\n this.calculateXposition();\n this.calculateXalignement();\n }\n };\n private calculateYposition = () => {\n const targetRect = this.target.getBoundingClientRect();\n const targetWithTopSpaceHeight = targetRect.bottom;\n const topAvailableSpace = targetRect.top;\n const totalViewPortHeight = window.visualViewport!.height;\n const tooltipHeight = this.clientHeight;\n const isAvailableBottomSpace = tooltipHeight + this.verticalOffset < totalViewPortHeight - targetWithTopSpaceHeight;\n const isAvailableTopSpace = tooltipHeight + this.verticalOffset < topAvailableSpace;\n\n if (this.position == TooltipPosition.Bottom) {\n if (isAvailableBottomSpace || !isAvailableTopSpace) {\n this.classList.add('bottom-position');\n this.style.top = `${targetWithTopSpaceHeight + this.verticalOffset}px`;\n } else {\n this.classList.add('top-position');\n this.style.top = `${topAvailableSpace - tooltipHeight - this.verticalOffset}px`;\n }\n } else {\n if (isAvailableTopSpace || !isAvailableBottomSpace) {\n this.classList.add('top-position');\n this.style.top = `${topAvailableSpace - tooltipHeight - this.verticalOffset}px`;\n } else {\n this.classList.add('bottom-position');\n this.style.top = `${targetWithTopSpaceHeight + this.verticalOffset}px`;\n }\n }\n };\n private calculateYalignement = () => {\n const targetRect = this.target.getBoundingClientRect();\n const leftSpaceAndTargetWidth = targetRect.right;\n const targetWidth = targetRect.width;\n const leftSpace = targetRect.left;\n const tooltipWidth = this.clientWidth;\n const leftSpaceAndHalfOfTargetWidth = leftSpace + targetWidth / 2;\n const totalViewPortWidth = window.visualViewport!.width;\n const rightSpaceAndHalfOfTargetWidth = totalViewPortWidth - leftSpaceAndTargetWidth + targetWidth / 2;\n\n if (this.alignement == TooltipAlignment.Start) {\n const canBeAtStart = tooltipWidth + leftSpace < totalViewPortWidth;\n if (canBeAtStart) {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n }\n } else if (this.alignement == TooltipAlignment.End) {\n const canBeAtEnd = tooltipWidth < leftSpace;\n if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n }\n } else {\n const canBeCentered =\n (tooltipWidth / 2 < leftSpaceAndHalfOfTargetWidth && tooltipWidth / 2 < rightSpaceAndHalfOfTargetWidth) ||\n (tooltipWidth > leftSpaceAndHalfOfTargetWidth && tooltipWidth > rightSpaceAndHalfOfTargetWidth);\n const canBeAtEnd = tooltipWidth < leftSpaceAndHalfOfTargetWidth;\n if (canBeCentered) {\n this.classList.add('alignement-center');\n this.style.left = `${leftSpace - tooltipWidth / 2 + targetWidth / 2}px`;\n } else if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.left = `${leftSpace - tooltipWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.left = `${leftSpace - this.horizontalOffset}px`;\n }\n }\n };\n private calculateXposition = () => {\n const targetRect = this.target.getBoundingClientRect();\n const leftSpace = targetRect.left;\n const leftSpaceAndTargetWidth = targetRect.right;\n const totalViewPortWidth = window.visualViewport!.width;\n const tooltipWidth = this.clientWidth;\n const isAvailableRightSpace = tooltipWidth + this.horizontalOffset < totalViewPortWidth - leftSpaceAndTargetWidth;\n const isAvailableLeftSpace = tooltipWidth + this.horizontalOffset < leftSpace;\n\n if (this.position == TooltipPosition.Right) {\n if (isAvailableRightSpace || !isAvailableLeftSpace) {\n this.classList.add('right-position');\n this.style.left = `${leftSpaceAndTargetWidth + this.horizontalOffset}px`;\n } else {\n this.classList.add('left-position');\n this.style.left = `${leftSpace - tooltipWidth - this.horizontalOffset}px`;\n }\n } else {\n if (isAvailableLeftSpace || !isAvailableRightSpace) {\n this.classList.add('left-position');\n this.style.left = `${leftSpace - tooltipWidth - this.horizontalOffset}px`;\n } else {\n this.classList.add('right-position');\n this.style.left = `${leftSpaceAndTargetWidth + this.horizontalOffset}px`;\n }\n }\n };\n private calculateXalignement = () => {\n const targetRect = this.target.getBoundingClientRect();\n const topSpace = targetRect.top;\n const targetHeight = targetRect.height;\n const targetWithTopSpaceHeight = targetRect.bottom;\n const tooltipHeight = this.clientHeight;\n const totalViewPortHeight = window.visualViewport!.height;\n const bottomSpace = totalViewPortHeight - targetWithTopSpaceHeight;\n\n if (this.alignement == TooltipAlignment.End) {\n const canBeAtEnd = tooltipHeight < topSpace;\n if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n }\n } else if (this.alignement == TooltipAlignment.Start) {\n const canBeAtStart = tooltipHeight < totalViewPortHeight - targetWithTopSpaceHeight;\n if (canBeAtStart) {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n } else {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n }\n } else {\n const canBeCentered =\n (tooltipHeight / 2 < topSpace && tooltipHeight / 2 < bottomSpace) ||\n (tooltipHeight > topSpace && tooltipHeight > bottomSpace);\n const canBeAtEnd = tooltipHeight < topSpace;\n if (canBeCentered) {\n this.classList.add('alignement-center');\n this.style.top = `${topSpace + targetHeight / 2 - tooltipHeight / 2}px`;\n } else if (canBeAtEnd) {\n this.classList.add('alignement-end');\n this.style.top = `${targetWithTopSpaceHeight - tooltipHeight}px`;\n } else {\n this.classList.add('alignement-start');\n this.style.top = `${topSpace - targetHeight / 4}px`;\n }\n }\n };\n\n onPopConfirmCancel() {\n this.dispatchEvent(new CustomEvent('onCancel'));\n this.show = false;\n this.initStyles();\n }\n onPopConfirmConfirm() {\n this.dispatchEvent(new CustomEvent('onConfirm'));\n this.show = false;\n this.initStyles();\n }\n onClickOutside = (onClickEvent: Event) => {\n const eventPath = onClickEvent.composedPath();\n const outsideClick = !eventPath.includes(this.target) && !eventPath.includes(this);\n if (outsideClick) this.show = false;\n };\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (!this.isPopConfirm) {\n this.target.removeEventListener('mouseover', this.onMouseOver);\n this.target.removeEventListener('mouseleave', this.onMouseLeave);\n } else {\n this.target.removeEventListener('click', this.onClick);\n document.removeEventListener('scroll', this.calculatePosition);\n }\n }\n\n override render() {\n return !this.isPopConfirm\n ? this.show\n ? html`<slot></slot>`\n : nothing\n : this.show\n ? html`\n <div class=\"popconfirm-container\">\n <p class=\"popconfirm-title\">${this.popConfirmTitle}</p>\n <p class=\"popconfirm-description\">${this.popConfirmDescription}</p>\n <div class=\"btn-block\">\n <nr-button .size=${'small'} type=${'primary'} @click=${this.onPopConfirmConfirm}\n >${this.okText}</nr-button\n >\n <nr-button .size=${'small'} type=${'danger'} @click=${this.onPopConfirmCancel}\n >${this.cancelText}</nr-button\n >\n </div>\n </div>\n `\n : nothing;\n }\n}\n"]}
|
package/tooltips.constant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltips.constant.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"tooltips.constant.js","sourceRoot":"","sources":["../../../../src/components/tooltips/tooltips.constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,kCAAe,CAAA;IACf,gCAAa,CAAA;AACf,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,+BAAW,CAAA;AACb,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAGD,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC","sourcesContent":["export enum TooltipPosition {\n Top = 'top',\n Bottom = 'bottom',\n Right = 'right',\n Left = 'left',\n}\n\nexport enum TooltipAlignment {\n Start = 'start',\n Center = 'center',\n End = 'end',\n}\n\n\nexport const EMPTY_STRING = '';"]}
|
package/tooltips.style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltips.style.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"tooltips.style.js","sourceRoot":"","sources":["../../../../src/components/tooltips/tooltips.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGxB,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\nimport { styleVariables } from './tooltips.variables.js';\n\nconst tooltipStyles = css`\n :host([show]) {\n background-color: var(--nuraly-tooltip-background-color);\n color: var(--nuraly-tooltip-text-color);\n position: fixed;\n padding: 5px;\n text-align: center;\n opacity: 0;\n font-size: 14px;\n z-index: 9999;\n border-radius: 4px;\n animation-name: show-animation;\n animation-duration: 0.4s;\n animation-fill-mode: forwards;\n }\n\n .popconfirm-container {\n display: flex;\n flex-direction: column;\n }\n .btn-block {\n display: flex;\n justify-content: end;\n gap: 10px;\n margin: 10px;\n }\n\n .popconfirm-description,\n .popconfirm-title {\n margin: 5px;\n text-align: left;\n }\n .popconfirm-title {\n font-weight: bold;\n }\n\n @keyframes show-animation {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host::after {\n content: '';\n height: 0;\n width: 0;\n position: absolute;\n border: 5px solid transparent;\n }\n :host(.top-position)::after {\n border-top-color: var(--nuraly-tooltip-background-color);\n top: 100%;\n }\n :host(.left-position)::after {\n border-left-color: var(--nuraly-tooltip-background-color);\n left: 100%;\n }\n\n :host(.right-position)::after {\n border-right-color: var(--nuraly-tooltip-background-color);\n right: 100%;\n }\n :host(.bottom-position)::after {\n border-bottom-color: var(--nuraly-tooltip-background-color);\n bottom: 100%;\n }\n :host(.alignement-center.top-position)::after,\n :host(.alignement-center.bottom-position)::after {\n right: 50%;\n transform: translate(50%);\n }\n\n :host(.alignement-start.top-position)::after,\n :host(.alignement-start.bottom-position)::after {\n left: 4%;\n }\n :host(.top-position.alignement-end)::after,\n :host(.alignement-end.bottom-position)::after {\n right: 4%;\n }\n\n :host(.alignement-center.left-position)::after,\n :host(.alignement-center.right-position)::after {\n top: 50%;\n transform: translate(0%, -50%);\n }\n\n :host(.alignement-start.left-position)::after,\n :host(.alignement-start.right-position)::after {\n top: 5px;\n }\n :host(.alignement-end.left-position)::after,\n :host(.alignement-end.right-position)::after {\n bottom: 5px;\n }\n`;\nexport const styles = [tooltipStyles, styleVariables];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltips.variables.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"tooltips.variables.js","sourceRoot":"","sources":["../../../../src/components/tooltips/tooltips.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;CAWhC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styleVariables = css`\n :host {\n --nuraly-tooltip-background-color: #393939;\n --nuraly-tooltip-text-color: #ffffff;\n }\n @media (prefers-color-scheme: dark) {\n :host {\n --nuraly-tooltip-background-color: #f4f4f4;\n --nuraly-tooltip-text-color: #161616;\n }\n }\n`;\n"]}
|