@progress/kendo-react-layout 9.0.0-develop.1 → 9.0.0-develop.3

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.
Files changed (63) hide show
  1. package/README.md +82 -82
  2. package/actionsheet/ActionSheet.js +1 -1
  3. package/actionsheet/ActionSheet.mjs +25 -38
  4. package/actionsheet/ActionSheetFooter.mjs +1 -10
  5. package/actionsheet/ActionSheetHeader.mjs +1 -10
  6. package/actionsheet/ActionSheetItem.mjs +10 -7
  7. package/appbar/AppBar.mjs +5 -30
  8. package/appbar/AppBarSection.mjs +4 -17
  9. package/appbar/AppBarSpacer.mjs +6 -16
  10. package/bottomnavigation/BottomNavigation.mjs +30 -54
  11. package/bottomnavigation/BottomNavigationItem.mjs +63 -61
  12. package/breadcrumb/Breadcrumb.mjs +39 -63
  13. package/breadcrumb/BreadcrumbDelimiter.mjs +29 -24
  14. package/breadcrumb/BreadcrumbLink.mjs +16 -18
  15. package/breadcrumb/BreadcrumbListItem.mjs +31 -29
  16. package/breadcrumb/BreadcrumbOrderedList.mjs +47 -42
  17. package/card/Avatar.mjs +15 -1
  18. package/card/CardBody.mjs +1 -11
  19. package/card/CardFooter.mjs +1 -11
  20. package/card/CardHeader.mjs +1 -11
  21. package/card/CardImage.mjs +1 -4
  22. package/card/CardSubtitle.mjs +1 -11
  23. package/card/CardTitle.mjs +1 -11
  24. package/dist/cdn/js/kendo-react-layout.js +1 -1
  25. package/drawer/Drawer.mjs +10 -21
  26. package/drawer/DrawerContent.mjs +6 -3
  27. package/drawer/DrawerItem.mjs +10 -10
  28. package/drawer/DrawerNavigation.mjs +109 -130
  29. package/expansionpanel/ExpansionPanel.mjs +12 -15
  30. package/expansionpanel/ExpansionPanelContent.mjs +3 -9
  31. package/gridlayout/GridLayout.mjs +1 -10
  32. package/gridlayout/GridLayoutItem.mjs +1 -10
  33. package/menu/components/MenuItemLink.mjs +4 -17
  34. package/menu/utils/getNewItemIdUponKeyboardNavigation.js +1 -1
  35. package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +55 -57
  36. package/menu/utils/hoverDelay.js +1 -1
  37. package/menu/utils/hoverDelay.mjs +2 -2
  38. package/menu/utils/itemsIdsUtils.js +1 -1
  39. package/menu/utils/itemsIdsUtils.mjs +14 -18
  40. package/menu/utils/misc.js +1 -1
  41. package/menu/utils/misc.mjs +2 -2
  42. package/menu/utils/prepareInputItemsForInternalWork.js +1 -1
  43. package/menu/utils/prepareInputItemsForInternalWork.mjs +30 -31
  44. package/package-metadata.mjs +1 -1
  45. package/package.json +6 -6
  46. package/panelbar/PanelBar.mjs +2 -7
  47. package/panelbar/util.js +1 -1
  48. package/panelbar/util.mjs +27 -40
  49. package/splitter/SplitterBar.mjs +23 -40
  50. package/splitter/SplitterPane.mjs +1 -11
  51. package/stacklayout/StackLayout.mjs +2 -14
  52. package/stepper/Step.mjs +25 -46
  53. package/stepper/Stepper.js +1 -1
  54. package/stepper/Stepper.mjs +59 -78
  55. package/tabstrip/TabStripContent.mjs +2 -14
  56. package/tabstrip/TabStripTab.mjs +2 -9
  57. package/tilelayout/InternalTile.mjs +31 -19
  58. package/tilelayout/ResizeHandlers.mjs +7 -1
  59. package/tilelayout/TileLayout.mjs +24 -20
  60. package/timeline/TimelineCard.mjs +1 -4
  61. package/timeline/TimelineHorizontal.mjs +52 -63
  62. package/timeline/TimelineVertical.mjs +7 -5
  63. package/timeline/utils.mjs +4 -1
package/drawer/Drawer.mjs CHANGED
@@ -30,16 +30,16 @@ const u = t.forwardRef((l, p) => {
30
30
  tabIndex: g,
31
31
  onOverlayClick: E,
32
32
  onSelect: s
33
- } = l, a = t.useRef(null), N = t.useCallback(
34
- () => {
35
- a.current && a.current.focus();
36
- },
37
- []
33
+ } = l, a = t.useRef(null), N = t.useCallback(() => {
34
+ a.current && a.current.focus();
35
+ }, []);
36
+ t.useImperativeHandle(
37
+ p,
38
+ () => ({
39
+ element: a.current,
40
+ focus: N
41
+ })
38
42
  );
39
- t.useImperativeHandle(p, () => ({
40
- element: a.current,
41
- focus: N
42
- }));
43
43
  const C = t.useCallback(
44
44
  (P, R, d) => {
45
45
  if (i && s) {
@@ -82,18 +82,7 @@ const u = t.forwardRef((l, p) => {
82
82
  onSelect: C
83
83
  }
84
84
  },
85
- /* @__PURE__ */ t.createElement(
86
- "div",
87
- {
88
- className: D,
89
- ref: a,
90
- dir: c,
91
- style: h,
92
- tabIndex: g
93
- },
94
- i && /* @__PURE__ */ t.createElement(I, null),
95
- w
96
- )
85
+ /* @__PURE__ */ t.createElement("div", { className: D, ref: a, dir: c, style: h, tabIndex: g }, i && /* @__PURE__ */ t.createElement(I, null), w)
97
86
  );
98
87
  });
99
88
  u.propTypes = {
@@ -11,9 +11,12 @@ import t from "prop-types";
11
11
  import { classNames as p } from "@progress/kendo-react-common";
12
12
  const s = e.forwardRef((n, a) => {
13
13
  const { children: o, className: c, style: l } = n, r = e.useRef(null);
14
- e.useImperativeHandle(a, () => ({
15
- element: r.current
16
- }));
14
+ e.useImperativeHandle(
15
+ a,
16
+ () => ({
17
+ element: r.current
18
+ })
19
+ );
17
20
  const m = p(
18
21
  {
19
22
  "k-drawer-content": !0
@@ -25,17 +25,17 @@ const d = e.forwardRef((s, u) => {
25
25
  tabIndex: x,
26
26
  children: k,
27
27
  ...g
28
- } = s, { expanded: F, mini: H, item: N } = e.useContext(j), r = e.useRef(null), i = e.useCallback(
29
- () => {
30
- r.current && r.current.focus();
31
- },
32
- []
28
+ } = s, { expanded: F, mini: H, item: N } = e.useContext(j), r = e.useRef(null), i = e.useCallback(() => {
29
+ r.current && r.current.focus();
30
+ }, []);
31
+ e.useImperativeHandle(
32
+ u,
33
+ () => ({
34
+ element: r.current,
35
+ focus: i,
36
+ props: s
37
+ })
33
38
  );
34
- e.useImperativeHandle(u, () => ({
35
- element: r.current,
36
- focus: i,
37
- props: s
38
- }));
39
39
  const w = v(
40
40
  "k-drawer-item",
41
41
  {
@@ -12,141 +12,120 @@ import { DrawerContext as G } from "./context/DrawerContext.mjs";
12
12
  import { DrawerItem as J } from "./DrawerItem.mjs";
13
13
  import { validatePackage as Q, shouldShowValidationUI as Y, classNames as h, Navigation as Z, WatermarkOverlay as ee } from "@progress/kendo-react-common";
14
14
  import { packageMetadata as E } from "../package-metadata.mjs";
15
- const te = 240, ae = 50, re = { type: "slide", duration: 200 }, ne = { type: "slide", duration: 0 }, T = t.forwardRef((g, W) => {
16
- const { children: x, className: A, style: p } = g;
17
- Q(E);
18
- const C = Y(E), {
19
- animation: m,
20
- expanded: d,
21
- mode: c,
22
- position: o,
23
- onOverlayClick: O,
24
- mini: s,
25
- dir: v,
26
- width: y,
27
- miniWidth: w,
28
- items: f,
29
- item: M,
30
- onSelect: P
31
- } = t.useContext(G), i = t.useRef(null), _ = t.useCallback(
32
- () => {
15
+ const te = 240, ae = 50, re = { type: "slide", duration: 200 }, ne = { type: "slide", duration: 0 }, T = t.forwardRef(
16
+ (g, W) => {
17
+ const { children: x, className: A, style: p } = g;
18
+ Q(E);
19
+ const C = Y(E), {
20
+ animation: m,
21
+ expanded: d,
22
+ mode: c,
23
+ position: o,
24
+ onOverlayClick: O,
25
+ mini: s,
26
+ dir: v,
27
+ width: y,
28
+ miniWidth: w,
29
+ items: f,
30
+ item: M,
31
+ onSelect: P
32
+ } = t.useContext(G), i = t.useRef(null), _ = t.useCallback(() => {
33
33
  i.current && i.current.focus();
34
- },
35
- []
36
- ), e = typeof m != "boolean" ? m : m === !1 ? ne : re, k = y || te, N = w || ae;
37
- t.useImperativeHandle(W, () => ({
38
- element: i.current,
39
- focus: _
40
- }));
41
- const L = t.useMemo(
42
- () => "k-drawer " + h(
43
- {
44
- "k-drawer-start": o === "start",
45
- "k-drawer-end": o === "end"
46
- },
47
- A
48
- ),
49
- [o]
50
- ), R = {
51
- opacity: 1,
52
- flexBasis: k,
53
- WebkitTransition: "all " + (e && e.duration) + "ms",
54
- /* Safari */
55
- transition: "all " + (e && e.duration) + "ms"
56
- }, U = {
57
- opacity: 1,
58
- transform: "translateX(0px)",
59
- WebkitTransition: "all " + (e && e.duration) + "ms",
60
- /* Safari */
61
- transition: "all " + (e && e.duration) + "ms"
62
- }, X = {
63
- opacity: s ? 1 : 0,
64
- flexBasis: s ? N : 0,
65
- WebkitTransition: "all " + (e && e.duration) + "ms",
66
- /* Safari */
67
- transition: "all " + (e && e.duration) + "ms"
68
- }, F = {
69
- opacity: 0,
70
- transform: "translateX(-100%)",
71
- WebkitTransition: "all " + (e && e.duration) + "ms",
72
- /* Safari */
73
- transition: "all " + (e && e.duration) + "ms"
74
- }, H = {
75
- opacity: 0,
76
- transform: "translateX(100%)",
77
- WebkitTransition: "all " + (e && e.duration) + "ms",
78
- /* Safari */
79
- transition: "all " + (e && e.duration) + "ms"
80
- }, b = {
81
- transform: "translateX(0%)",
82
- WebkitTransitionDuration: (e && e.duration) + "ms",
83
- /* Safari */
84
- transitionDuration: (e && e.duration) + "ms"
85
- }, K = d ? c === "push" ? R : U : c === "push" ? X : v === "ltr" && o === "start" || v === "rtl" && o === "end" ? s ? b : F : s ? b : H, D = t.useMemo(
86
- () => new Z({
87
- root: i,
88
- selectors: ["ul.k-drawer-items li.k-drawer-item:not(.k-drawer-separator)"],
89
- keyboardEvents: {
90
- keydown: {
91
- ArrowDown: (a, r, n) => {
92
- n.preventDefault(), r.focusNext(a);
93
- },
94
- ArrowUp: (a, r, n) => {
95
- n.preventDefault(), r.focusPrevious(a);
96
- },
97
- Enter: (a, r, n) => {
98
- n.preventDefault(), a.click();
34
+ }, []), e = typeof m != "boolean" ? m : m === !1 ? ne : re, k = y || te, N = w || ae;
35
+ t.useImperativeHandle(
36
+ W,
37
+ () => ({
38
+ element: i.current,
39
+ focus: _
40
+ })
41
+ );
42
+ const L = t.useMemo(
43
+ () => "k-drawer " + h(
44
+ {
45
+ "k-drawer-start": o === "start",
46
+ "k-drawer-end": o === "end"
47
+ },
48
+ A
49
+ ),
50
+ [o]
51
+ ), R = {
52
+ opacity: 1,
53
+ flexBasis: k,
54
+ WebkitTransition: "all " + (e && e.duration) + "ms",
55
+ transition: "all " + (e && e.duration) + "ms"
56
+ }, U = {
57
+ opacity: 1,
58
+ transform: "translateX(0px)",
59
+ WebkitTransition: "all " + (e && e.duration) + "ms",
60
+ transition: "all " + (e && e.duration) + "ms"
61
+ }, X = {
62
+ opacity: s ? 1 : 0,
63
+ flexBasis: s ? N : 0,
64
+ WebkitTransition: "all " + (e && e.duration) + "ms",
65
+ transition: "all " + (e && e.duration) + "ms"
66
+ }, F = {
67
+ opacity: 0,
68
+ transform: "translateX(-100%)",
69
+ WebkitTransition: "all " + (e && e.duration) + "ms",
70
+ transition: "all " + (e && e.duration) + "ms"
71
+ }, H = {
72
+ opacity: 0,
73
+ transform: "translateX(100%)",
74
+ WebkitTransition: "all " + (e && e.duration) + "ms",
75
+ transition: "all " + (e && e.duration) + "ms"
76
+ }, b = {
77
+ transform: "translateX(0%)",
78
+ WebkitTransitionDuration: (e && e.duration) + "ms",
79
+ transitionDuration: (e && e.duration) + "ms"
80
+ }, K = d ? c === "push" ? R : U : c === "push" ? X : v === "ltr" && o === "start" || v === "rtl" && o === "end" ? s ? b : F : s ? b : H, D = t.useMemo(
81
+ () => new Z({
82
+ root: i,
83
+ selectors: ["ul.k-drawer-items li.k-drawer-item:not(.k-drawer-separator)"],
84
+ keyboardEvents: {
85
+ keydown: {
86
+ ArrowDown: (a, r, n) => {
87
+ n.preventDefault(), r.focusNext(a);
88
+ },
89
+ ArrowUp: (a, r, n) => {
90
+ n.preventDefault(), r.focusPrevious(a);
91
+ },
92
+ Enter: (a, r, n) => {
93
+ n.preventDefault(), a.click();
94
+ }
99
95
  }
100
- }
101
- },
102
- tabIndex: 0,
103
- rovingTabIndex: !0
104
- }),
105
- []
106
- ), S = t.useCallback(
107
- D.triggerKeyboardEvent.bind(D),
108
- []
109
- ), B = f && /* @__PURE__ */ t.createElement(
110
- "ul",
111
- {
112
- className: "k-drawer-items",
113
- role: "menubar",
114
- "aria-orientation": "vertical",
115
- onKeyDown: S
116
- },
117
- f.map(
118
- (a, r) => {
119
- const { className: n, level: u, ...j } = a, V = u != null ? u : 0, $ = h(
120
- n,
121
- s ? "" : `k-level-${V}`
122
- ), q = {
123
- index: r,
124
- className: $,
125
- ...j,
126
- onSelect: P
127
- }, z = M || J;
128
- return /* @__PURE__ */ t.createElement(z, { key: r, ...q });
129
- }
130
- )
131
- ), I = /* @__PURE__ */ t.createElement(
132
- "div",
133
- {
134
- style: e ? { ...K, ...p } : p,
135
- className: L,
136
- ref: i
137
- },
138
- /* @__PURE__ */ t.createElement(
96
+ },
97
+ tabIndex: 0,
98
+ rovingTabIndex: !0
99
+ }),
100
+ []
101
+ ), S = t.useCallback(D.triggerKeyboardEvent.bind(D), []), B = f && /* @__PURE__ */ t.createElement("ul", { className: "k-drawer-items", role: "menubar", "aria-orientation": "vertical", onKeyDown: S }, f.map((a, r) => {
102
+ const { className: n, level: u, ...j } = a, V = u != null ? u : 0, $ = h(n, s ? "" : `k-level-${V}`), q = {
103
+ index: r,
104
+ className: $,
105
+ ...j,
106
+ onSelect: P
107
+ }, z = M || J;
108
+ return /* @__PURE__ */ t.createElement(z, { key: r, ...q });
109
+ })), I = /* @__PURE__ */ t.createElement(
139
110
  "div",
140
111
  {
141
- className: "k-drawer-wrapper",
142
- style: !d && s && c === "overlay" ? { width: N } : { width: k }
112
+ style: e ? { ...K, ...p } : p,
113
+ className: L,
114
+ ref: i
143
115
  },
144
- B || x
145
- ),
146
- C && /* @__PURE__ */ t.createElement(ee, null)
147
- );
148
- return c === "overlay" ? /* @__PURE__ */ t.createElement(t.Fragment, null, d && /* @__PURE__ */ t.createElement("div", { className: "k-overlay", onClick: O }), I) : I;
149
- });
116
+ /* @__PURE__ */ t.createElement(
117
+ "div",
118
+ {
119
+ className: "k-drawer-wrapper",
120
+ style: !d && s && c === "overlay" ? { width: N } : { width: k }
121
+ },
122
+ B || x
123
+ ),
124
+ C && /* @__PURE__ */ t.createElement(ee, null)
125
+ );
126
+ return c === "overlay" ? /* @__PURE__ */ t.createElement(t.Fragment, null, d && /* @__PURE__ */ t.createElement("div", { className: "k-overlay", onClick: O }), I) : I;
127
+ }
128
+ );
150
129
  T.propTypes = {
151
130
  children: l.any,
152
131
  className: l.string,
@@ -13,10 +13,7 @@ import { packageMetadata as P } from "../package-metadata.mjs";
13
13
  import { chevronDownIcon as A, chevronUpIcon as T } from "@progress/kendo-svg-icons";
14
14
  const I = e.forwardRef((n, y) => {
15
15
  w(P);
16
- const i = e.useRef(null), [g, u] = e.useState(!1), r = e.useCallback(
17
- () => ({ element: i.current }),
18
- []
19
- );
16
+ const i = e.useRef(null), [g, u] = e.useState(!1), r = e.useCallback(() => ({ element: i.current }), []);
20
17
  e.useImperativeHandle(y, r);
21
18
  const {
22
19
  expanded: t = !1,
@@ -30,12 +27,16 @@ const I = e.forwardRef((n, y) => {
30
27
  collapseSVGIcon: k
31
28
  } = n, N = e.useCallback(
32
29
  (l) => {
33
- p(s, l, r(), { expanded: t });
30
+ p(s, l, r(), {
31
+ expanded: t
32
+ });
34
33
  },
35
34
  [s, t]
36
35
  ), h = e.useCallback(
37
36
  (l) => {
38
- (l.keyCode === x.enter || l.keyCode === x.space) && (l.preventDefault(), p(s, l, r(), { expanded: t }));
37
+ (l.keyCode === x.enter || l.keyCode === x.space) && (l.preventDefault(), p(s, l, r(), {
38
+ expanded: t
39
+ }));
39
40
  },
40
41
  [s, t]
41
42
  ), C = e.useCallback(() => {
@@ -47,15 +48,11 @@ const I = e.forwardRef((n, y) => {
47
48
  "div",
48
49
  {
49
50
  ref: i,
50
- className: v(
51
- "k-expander",
52
- n.className,
53
- {
54
- "k-expanded": t,
55
- "k-focus": g && !o,
56
- "k-disabled": o
57
- }
58
- ),
51
+ className: v("k-expander", n.className, {
52
+ "k-expanded": t,
53
+ "k-focus": g && !o,
54
+ "k-disabled": o
55
+ }),
59
56
  onFocus: B,
60
57
  onBlur: R,
61
58
  style: n.style,
@@ -8,15 +8,9 @@
8
8
  "use client";
9
9
  import { classNames as t } from "@progress/kendo-react-common";
10
10
  import * as a from "react";
11
- const r = a.forwardRef((e, n) => /* @__PURE__ */ a.createElement(
12
- "div",
13
- {
14
- ref: n,
15
- ...e,
16
- className: t("k-expander-content-wrapper", e.className)
17
- },
18
- /* @__PURE__ */ a.createElement("div", { className: "k-expander-content" }, e.children)
19
- ));
11
+ const r = a.forwardRef(
12
+ (e, n) => /* @__PURE__ */ a.createElement("div", { ref: n, ...e, className: t("k-expander-content-wrapper", e.className) }, /* @__PURE__ */ a.createElement("div", { className: "k-expander-content" }, e.children))
13
+ );
20
14
  r.displayName = "KendoReactExpansionPanelContent";
21
15
  export {
22
16
  r as ExpansionPanelContent
@@ -47,16 +47,7 @@ const c = i.forwardRef((t, g) => {
47
47
  gridTemplateRows: v,
48
48
  ...u
49
49
  };
50
- return /* @__PURE__ */ i.createElement(
51
- "div",
52
- {
53
- ref: r,
54
- className: p,
55
- style: w,
56
- id: h || f
57
- },
58
- y
59
- );
50
+ return /* @__PURE__ */ i.createElement("div", { ref: r, className: p, style: w, id: h || f }, y);
60
51
  }), o = {
61
52
  hAlign: "stretch",
62
53
  vAlign: "stretch",
@@ -23,16 +23,7 @@ const s = e.forwardRef((n, i) => {
23
23
  gridArea: `${u || "auto"} / ${y || "auto"} / ${r ? "span " + r : "auto"} / ${o ? "span " + o : "auto"}`,
24
24
  ...m
25
25
  };
26
- return /* @__PURE__ */ e.createElement(
27
- "div",
28
- {
29
- ref: a,
30
- className: c,
31
- style: g,
32
- id: d || f
33
- },
34
- p
35
- );
26
+ return /* @__PURE__ */ e.createElement("div", { ref: a, className: c, style: g, id: d || f }, p);
36
27
  });
37
28
  s.propTypes = {
38
29
  className: t.string,
@@ -14,16 +14,7 @@ const s = class s extends e.Component {
14
14
  * @hidden
15
15
  */
16
16
  render() {
17
- return this.props.url ? /* @__PURE__ */ e.createElement(
18
- "a",
19
- {
20
- className: this.getMenuItemClassName(),
21
- role: "presentation",
22
- href: this.props.url,
23
- tabIndex: -1
24
- },
25
- this.props.children
26
- ) : /* @__PURE__ */ e.createElement(
17
+ return this.props.url ? /* @__PURE__ */ e.createElement("a", { className: this.getMenuItemClassName(), role: "presentation", href: this.props.url, tabIndex: -1 }, this.props.children) : /* @__PURE__ */ e.createElement(
27
18
  "span",
28
19
  {
29
20
  id: this.props.id,
@@ -35,13 +26,9 @@ const s = class s extends e.Component {
35
26
  );
36
27
  }
37
28
  getMenuItemClassName() {
38
- return r(
39
- "k-link",
40
- "k-menu-link",
41
- {
42
- "k-active": this.props.opened
43
- }
44
- );
29
+ return r("k-link", "k-menu-link", {
30
+ "k-active": this.props.opened
31
+ });
45
32
  }
46
33
  };
47
34
  s.propTypes = {
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@progress/kendo-react-common"),n=require("./itemsIdsUtils.js"),A=/\S/;function M(g,e,P,y,a,u){const Z=l();switch(P){case i.Keys.left:return E();case i.Keys.right:return w();case i.Keys.up:return O();case i.Keys.down:return N();case i.Keys.enter:case i.Keys.space:return R();case i.Keys.home:return D();case i.Keys.end:return G();case i.Keys.esc:return H();default:return q()?B():e}function E(){return a?u?v():S():u?p():b()}function w(){return a?u?S():v():u?b():p()}function N(){return a?s():n.isIdZeroLevel(e)?d():s()}function O(){return a?c():n.isIdZeroLevel(e)?L():c()}function R(){return Z.disabled?e:f()?n.getFirstChildId(e):n.getRootParentId(e)}function D(){return K()[0].id}function G(){const t=K();return t[t.length-1].id}function H(){return n.isIdZeroLevel(e)?e:n.getDirectParentId(e)}function B(){const t=y.toLowerCase(),r=K(),o=Number(n.getShortId(e)),h=r.slice(o+1).concat(r.slice(0,o+1)).find(z=>(z.text||"").toLowerCase().startsWith(t));return h?h.id:e}function b(){return n.isIdZeroLevel(e)?c():n.isIdFirstLevel(e)?d(c(n.getRootParentId(e))):n.getDirectParentId(e)}function S(){return n.isIdZeroLevel(e)?L():n.getDirectParentId(e)}function p(){return n.isIdZeroLevel(e)?s():d(f()?e:s(n.getRootParentId(e)))}function v(){return d(n.isIdZeroLevel(e)||f()?e:s(n.getRootParentId(e)))}function d(t){return U(!0,t)}function L(t){return U(!1,t)}function q(){return y.length===1&&A.test(y)}function l(t,r){return t===void 0&&(t=e),r===void 0&&(r=g),n.getItemById(t,r)}function f(t){return l(t).items.length>0}function c(t){return C(!1,t)}function s(t){return C(!0,t)}function x(t){const r=l(t).items;return r[r.length-1].id}function K(){return n.isIdZeroLevel(e)?g:l(n.getDirectParentId(e),g).items}function U(t,r){r===void 0&&(r=e);const o=l(r);return f(r)&&!o.disabled?t?n.getFirstChildId(r):x(r):r}function C(t,r){if(r===void 0&&(r=e),n.isIdZeroLevel(r))return n.getDirectSiblingIdForLevelZero(t,r,g.length);{const o=n.getDirectParentId(r),F=n.getShortId(r),h=l(o).items.length;return n.createId(n.getDirectSiblingIdForLevelZero(t,F,h),o)}}}exports.getNewItemIdUponKeyboardNavigation=M;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@progress/kendo-react-common"),n=require("./itemsIdsUtils.js"),A=/\S/;function M(u,e,P,y,l,d){const Z=g();switch(P){case i.Keys.left:return E();case i.Keys.right:return w();case i.Keys.up:return O();case i.Keys.down:return N();case i.Keys.enter:case i.Keys.space:return R();case i.Keys.home:return D();case i.Keys.end:return G();case i.Keys.esc:return H();default:return q()?B():e}function E(){return l?d?v():S():d?p():b()}function w(){return l?d?S():v():d?b():p()}function N(){return l?a():n.isIdZeroLevel(e)?s():a()}function O(){return l?c():n.isIdZeroLevel(e)?L():c()}function R(){return Z.disabled?e:f()?n.getFirstChildId(e):n.getRootParentId(e)}function D(){return K()[0].id}function G(){const t=K();return t[t.length-1].id}function H(){return n.isIdZeroLevel(e)?e:n.getDirectParentId(e)}function B(){const t=y.toLowerCase(),r=K(),o=Number(n.getShortId(e)),h=r.slice(o+1).concat(r.slice(0,o+1)).find(z=>(z.text||"").toLowerCase().startsWith(t));return h?h.id:e}function b(){return n.isIdZeroLevel(e)?c():n.isIdFirstLevel(e)?s(c(n.getRootParentId(e))):n.getDirectParentId(e)}function S(){return n.isIdZeroLevel(e)?L():n.getDirectParentId(e)}function p(){return n.isIdZeroLevel(e)?a():s(f()?e:a(n.getRootParentId(e)))}function v(){return s(n.isIdZeroLevel(e)||f()?e:a(n.getRootParentId(e)))}function s(t){return U(!0,t)}function L(t){return U(!1,t)}function q(){return y.length===1&&A.test(y)}function g(t,r){return t===void 0&&(t=e),r===void 0&&(r=u),n.getItemById(t,r)}function f(t){return g(t).items.length>0}function c(t){return C(!1,t)}function a(t){return C(!0,t)}function x(t){const r=g(t).items;return r[r.length-1].id}function K(){return n.isIdZeroLevel(e)?u:g(n.getDirectParentId(e),u).items}function U(t,r){r===void 0&&(r=e);const o=g(r);return f(r)&&!o.disabled?t?n.getFirstChildId(r):x(r):r}function C(t,r){if(r===void 0&&(r=e),n.isIdZeroLevel(r))return n.getDirectSiblingIdForLevelZero(t,r,u.length);const o=n.getDirectParentId(r),F=n.getShortId(r),h=g(o).items.length;return n.createId(n.getDirectSiblingIdForLevelZero(t,F,h),o)}}exports.getNewItemIdUponKeyboardNavigation=M;