UNPKG

@progress/kendo-react-editor

Version:

React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package

51 lines (50 loc) 2.27 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as d from "react"; import { keys as e, messages as r } from "../messages/index.mjs"; const a = { onMouseDown: (t) => t.preventDefault(), onPointerDown: (t) => t.preventDefault() }, s = { userSelect: "none" }, u = function(t, ...o) { return o.forEach((n, l) => { t = t.replace("{" + l + "}", String(n)); }), t; }, S = (t, o) => o.dataItem.style ? d.cloneElement(t, t.props, /* @__PURE__ */ d.createElement("span", { style: o.dataItem.style }, t.props.children)) : t, i = ["px", "em", "%"], b = { animate: { openDuration: 150, closeDuration: 150 } }, x = [ { textKey: e.borderStyleNone, text: r[e.borderStyleNone], value: "none" }, { textKey: e.borderStyleSolid, text: r[e.borderStyleSolid], value: "solid" }, { textKey: e.borderStyleDotted, text: r[e.borderStyleDotted], value: "dotted" }, { textKey: e.borderStyleDashed, text: r[e.borderStyleDashed], value: "dashed" }, { textKey: e.borderStyleDouble, text: r[e.borderStyleDouble], value: "double" }, { textKey: e.borderStyleGroove, text: r[e.borderStyleGroove], value: "groove" }, { textKey: e.borderStyleRidge, text: r[e.borderStyleRidge], value: "ridge" }, { textKey: e.borderStyleInset, text: r[e.borderStyleInset], value: "inset" }, { textKey: e.borderStyleOutset, text: r[e.borderStyleOutset], value: "outset" }, { textKey: e.borderStyleInitial, text: r[e.borderStyleInitial], value: "initial" }, { textKey: e.borderStyleInherit, text: r[e.borderStyleInherit], value: "inherit" }, { textKey: e.borderStyleHidden, text: r[e.borderStyleHidden], value: "hidden" } ]; function c(t, o) { for (let n = t.depth; n > 0; n--) { const l = t.node(n); if (o(l)) return { node: l, depth: n }; } return null; } export { x as borderStyles, u as formatString, S as itemRender, a as onDownPreventDefault, c as parentNode, b as popupSettings, i as units, s as userSelectNone };