@progress/kendo-react-data-tools
Version:
Includes React Pager & React Filter component, an intuitive interface to create complex filter descriptions. KendoReact Data Tools package
60 lines (59 loc) • 1.98 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use client";
import * as e from "react";
import { createPortal as r } from "react-dom";
import { canUseDOM as a, IconWrap as i } from "@progress/kendo-react-common";
import { cancelIcon as l, plusIcon as o } from "@progress/kendo-svg-icons";
class u extends e.PureComponent {
constructor(t) {
super(t), this.elementRef = e.createRef(), this.state = {
visible: !1,
top: 0,
left: 0,
innerText: "",
status: "k-i-cancel"
}, this.hiddenElementRef = e.createRef();
}
get element() {
return this.elementRef.current || this.hiddenElementRef.current;
}
render() {
const t = this.hiddenElementRef.current, { status: n } = this.state, s = this.state.visible && a && r(
/* @__PURE__ */ e.createElement(
"div",
{
ref: this.elementRef,
className: "k-header k-drag-clue",
style: {
display: "block",
position: "absolute",
zIndex: 2e4,
padding: "8px 12px",
top: this.state.top + "px",
left: this.state.left + "px"
}
},
/* @__PURE__ */ e.createElement(
i,
{
className: "k-drag-status",
name: n,
icon: n === "k-i-cancel" ? l : o
}
),
this.state.innerText
),
t && t.ownerDocument ? t.ownerDocument.body : document.body
);
return /* @__PURE__ */ e.createElement(e.Fragment, null, s, /* @__PURE__ */ e.createElement("div", { ref: this.hiddenElementRef, style: { display: "none" } }));
}
}
export {
u as DragClue
};