@progress/kendo-react-layout 10.1.0-develop.1 → 10.1.0-develop.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/contextmenu/ContextMenu.js +1 -1
- package/contextmenu/ContextMenu.mjs +16 -14
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/index.d.mts +12 -0
- package/index.d.ts +12 -0
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +28 -17
- package/menu/components/MenuItemInternal.js +1 -1
- package/menu/components/MenuItemInternal.mjs +81 -78
- package/menu/consts.js +1 -1
- package/menu/consts.mjs +26 -16
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +23 -8
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),s=require("@progress/kendo-react-common"),d=require("@progress/kendo-react-popup"),b=require("../menu/components/Menu.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=g(f),i=e=>{const t=c.useRef(null),[n,u]=c.useState(e.show),l=s.useId(e.id),{animate:r=v.animate}=e;return c.useEffect(()=>{u(e.show),e.show&&setTimeout(()=>{const a=t.current&&t.current.element,o=a&&a.querySelector(".k-menu-item"),m=s.getActiveElement(o&&o.ownerDocument);o&&o!==m&&o.focus()})},[e.show]),c.createElement(d.Popup,{show:n,offset:e.offset,popupClass:"k-menu-popup k-overflow-visible",animate:r},c.createElement(b.Menu,{id:l,vertical:!0,...e,ref:t,className:s.classNames("k-context-menu",e.className),onClose:e.onClose,role:"menu"},e.children))},v={animate:{openDuration:300,closeDuration:300}};i.displayName="KendoReactContextMenu";exports.ContextMenu=i;
|
|
@@ -6,31 +6,33 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
|
-
import { useId as
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { Menu as
|
|
12
|
-
const
|
|
13
|
-
const o = n.useRef(null), c = u(e.id);
|
|
9
|
+
import { useId as l, getActiveElement as r, classNames as f } from "@progress/kendo-react-common";
|
|
10
|
+
import { Popup as d } from "@progress/kendo-react-popup";
|
|
11
|
+
import { Menu as w } from "../menu/components/Menu.mjs";
|
|
12
|
+
const h = (e) => {
|
|
13
|
+
const o = n.useRef(null), [s, c] = n.useState(e.show), u = l(e.id), { animate: a = v.animate } = e;
|
|
14
14
|
return n.useEffect(() => {
|
|
15
|
-
e.show && setTimeout(() => {
|
|
16
|
-
const m = o.current && o.current.element, t = m && m.querySelector(".k-menu-item"),
|
|
17
|
-
t && t !==
|
|
15
|
+
c(e.show), e.show && setTimeout(() => {
|
|
16
|
+
const m = o.current && o.current.element, t = m && m.querySelector(".k-menu-item"), i = r(t && t.ownerDocument);
|
|
17
|
+
t && t !== i && t.focus();
|
|
18
18
|
});
|
|
19
|
-
}, [e.show]), /* @__PURE__ */ n.createElement(
|
|
20
|
-
|
|
19
|
+
}, [e.show]), /* @__PURE__ */ n.createElement(d, { show: s, offset: e.offset, popupClass: "k-menu-popup k-overflow-visible", animate: a }, /* @__PURE__ */ n.createElement(
|
|
20
|
+
w,
|
|
21
21
|
{
|
|
22
|
-
id:
|
|
22
|
+
id: u,
|
|
23
23
|
vertical: !0,
|
|
24
24
|
...e,
|
|
25
25
|
ref: o,
|
|
26
|
-
className:
|
|
26
|
+
className: f("k-context-menu", e.className),
|
|
27
27
|
onClose: e.onClose,
|
|
28
28
|
role: "menu"
|
|
29
29
|
},
|
|
30
30
|
e.children
|
|
31
31
|
));
|
|
32
|
+
}, v = {
|
|
33
|
+
animate: { openDuration: 300, closeDuration: 300 }
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
h.displayName = "KendoReactContextMenu";
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
h as ContextMenu
|
|
36
38
|
};
|