@progress/kendo-react-layout 14.5.0-develop.8 → 15.0.0-develop.1

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 (86) hide show
  1. package/MenuMcpWrapper.d.ts +17 -0
  2. package/MenuMcpWrapper.js +8 -0
  3. package/MenuMcpWrapper.mjs +18 -0
  4. package/README.md +4 -4
  5. package/actionsheet/ActionSheet.d.ts +12 -0
  6. package/actionsheet/ActionSheet.js +1 -1
  7. package/actionsheet/ActionSheet.mjs +69 -68
  8. package/actionsheet/ActionSheetItem.js +1 -1
  9. package/actionsheet/ActionSheetItem.mjs +1 -3
  10. package/appbar/interfaces/AppBarProps.d.ts +2 -14
  11. package/bottomnavigation/BottomNavigation.js +1 -1
  12. package/bottomnavigation/BottomNavigation.mjs +81 -76
  13. package/bottomnavigation/BottomNavigationItem.js +1 -1
  14. package/bottomnavigation/BottomNavigationItem.mjs +34 -33
  15. package/bottomnavigation/BottomNavigationProps.d.ts +3 -13
  16. package/bottomnavigation/messages/index.d.ts +17 -0
  17. package/bottomnavigation/messages/index.js +8 -0
  18. package/bottomnavigation/messages/index.mjs +14 -0
  19. package/breadcrumb/Breadcrumb.js +1 -1
  20. package/breadcrumb/Breadcrumb.mjs +30 -28
  21. package/breadcrumb/BreadcrumbLink.js +1 -1
  22. package/breadcrumb/BreadcrumbLink.mjs +26 -26
  23. package/breadcrumb/messages/index.d.ts +17 -0
  24. package/breadcrumb/messages/index.js +8 -0
  25. package/breadcrumb/messages/index.mjs +14 -0
  26. package/card/Avatar.js +1 -1
  27. package/card/Avatar.mjs +14 -26
  28. package/card/interfaces/AvatarProps.d.ts +1 -8
  29. package/dist/cdn/js/kendo-react-layout.js +1 -1
  30. package/drawer/Drawer.d.ts +1 -1
  31. package/drawer/Drawer.js +1 -1
  32. package/drawer/Drawer.mjs +63 -63
  33. package/drawer/DrawerContent.d.ts +1 -1
  34. package/drawer/DrawerItem.d.ts +1 -1
  35. package/drawer/DrawerItem.js +1 -1
  36. package/drawer/DrawerItem.mjs +22 -23
  37. package/drawer/interfaces/DrawerProps.d.ts +8 -0
  38. package/expansionpanel/ExpansionPanel.js +1 -1
  39. package/expansionpanel/ExpansionPanel.mjs +50 -50
  40. package/expansionpanel/ExpansionPanelContent.js +1 -1
  41. package/expansionpanel/ExpansionPanelContent.mjs +7 -4
  42. package/index.d.mts +1 -2
  43. package/index.d.ts +1 -2
  44. package/index.js +1 -1
  45. package/index.mjs +128 -130
  46. package/menu/MenuProps.d.ts +6 -0
  47. package/menu/components/MenuItemArrow.d.ts +3 -3
  48. package/menu/components/MenuItemArrow.js +1 -1
  49. package/menu/components/MenuItemArrow.mjs +13 -23
  50. package/package-metadata.js +1 -1
  51. package/package-metadata.mjs +2 -2
  52. package/package.json +14 -9
  53. package/panelbar/PanelBar.js +1 -1
  54. package/panelbar/PanelBar.mjs +94 -91
  55. package/panelbar/PanelBarItem.js +1 -1
  56. package/panelbar/PanelBarItem.mjs +13 -15
  57. package/panelbar/interfaces/PanelBarProps.d.ts +8 -0
  58. package/panelbar/interfaces/RenderPanelBarItem.d.ts +1 -0
  59. package/panelbar/util.d.ts +1 -1
  60. package/panelbar/util.js +1 -1
  61. package/panelbar/util.mjs +62 -59
  62. package/splitter/SplitterBar.d.ts +1 -0
  63. package/splitter/SplitterBar.js +1 -1
  64. package/splitter/SplitterBar.mjs +81 -72
  65. package/stepper/Step.js +1 -1
  66. package/stepper/Step.mjs +79 -85
  67. package/stepper/Stepper.js +1 -1
  68. package/stepper/Stepper.mjs +134 -133
  69. package/stepper/interfaces/StepperProps.d.ts +8 -1
  70. package/stepper/messages/index.d.ts +12 -2
  71. package/stepper/messages/index.js +1 -1
  72. package/stepper/messages/index.mjs +8 -4
  73. package/tabstrip/TabStrip.d.ts +8 -1
  74. package/tabstrip/TabStrip.js +1 -1
  75. package/tabstrip/TabStrip.mjs +126 -125
  76. package/tabstrip/TabStripNavigation.js +1 -1
  77. package/tabstrip/TabStripNavigation.mjs +31 -31
  78. package/tilelayout/InternalTile.js +1 -1
  79. package/tilelayout/InternalTile.mjs +119 -115
  80. package/tilelayout/TileLayout.js +1 -1
  81. package/tilelayout/TileLayout.mjs +58 -58
  82. package/timeline/TimelineCard.d.ts +2 -0
  83. package/timeline/TimelineCard.js +1 -1
  84. package/timeline/TimelineCard.mjs +27 -18
  85. package/timeline/TimelineHorizontal.js +1 -1
  86. package/timeline/TimelineHorizontal.mjs +113 -109
@@ -6,16 +6,16 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as s from "react";
9
- import ft from "prop-types";
10
- import { TimelineCard as ut } from "./TimelineCard.mjs";
11
- import { addYearsFlags as mt } from "./utils.mjs";
12
- import { caretAltLeftIcon as dt, caretAltRightIcon as Tt } from "@progress/kendo-svg-icons";
13
- import { useInternationalization as ht } from "@progress/kendo-react-intl";
14
- import { Navigation as Et, canUseDOM as vt, classNames as R } from "@progress/kendo-react-common";
15
- import { Button as z } from "@progress/kendo-react-buttons";
16
- const gt = (g) => {
17
- const M = ht(), [_, j] = s.useState(!1), [y, K] = s.useState(!0), [X, Y] = s.useState(), [f, S] = s.useState(0), [b, B] = s.useState(), [l, q] = s.useState(0), [d, G] = s.useState(0), [a, L] = s.useState(1), [u, I] = s.useState(), [c, J] = s.useState(), [w, O] = s.useState([0, 0, 0]), [N, F] = s.useState(0), [Q, Z] = s.useState(1), m = s.useRef(null), i = s.useRef(null), W = s.useRef(null), { eventsData: tt, dateFormat: et, navigatable: nt, onActionClick: st } = g, D = b ? `${b}%` : "150px", T = s.useRef(
18
- new Et({
9
+ import ut from "prop-types";
10
+ import { TimelineCard as mt } from "./TimelineCard.mjs";
11
+ import { addYearsFlags as dt } from "./utils.mjs";
12
+ import { chevronLeftIcon as ht, chevronRightIcon as vt } from "@progress/kendo-svg-icons";
13
+ import { useInternationalization as Et } from "@progress/kendo-react-intl";
14
+ import { useId as Tt, Navigation as gt, canUseDOM as pt, classNames as C } from "@progress/kendo-react-common";
15
+ import { Button as X } from "@progress/kendo-react-buttons";
16
+ const kt = (g) => {
17
+ const R = Et(), [_, Y] = s.useState(!1), [A, B] = s.useState(!0), [q, G] = s.useState(), [f, S] = s.useState(0), [b, J] = s.useState(), [l, Q] = s.useState(0), [d, Z] = s.useState(0), [a, L] = s.useState(1), [u, I] = s.useState(), [i, tt] = s.useState(), [F, O] = s.useState([0, 0, 0]), [w, W] = s.useState(0), [U, et] = s.useState(1), D = Tt(), m = s.useRef(null), c = s.useRef(null), V = s.useRef(null), { eventsData: nt, dateFormat: x, navigatable: st, onActionClick: rt } = g, P = b ? `${b}%` : "150px", h = s.useRef(
18
+ new gt({
19
19
  tabIndex: 0,
20
20
  root: m,
21
21
  selectors: [".k-timeline-scrollable-wrap"]
@@ -23,160 +23,161 @@ const gt = (g) => {
23
23
  );
24
24
  s.useEffect(() => {
25
25
  m.current && g.navigatable && (setTimeout(() => {
26
- const t = T.current.first;
26
+ const t = h.current.first;
27
27
  t && t.setAttribute("tabindex", String(0));
28
- }, 0), T.current.keyboardEvents = {
28
+ }, 0), h.current.keyboardEvents = {
29
29
  keydown: {
30
- ArrowRight: at,
31
- ArrowLeft: ot,
32
- End: ct,
33
- Home: it
30
+ ArrowRight: ot,
31
+ ArrowLeft: it,
32
+ End: lt,
33
+ Home: ct
34
34
  }
35
35
  });
36
36
  }, [g.navigatable, a, l]), s.useEffect(() => {
37
- T.current.update();
37
+ h.current.update();
38
38
  });
39
- const rt = (t) => {
40
- nt && T.current && T.current.triggerKeyboardEvent(t);
39
+ const at = (t) => {
40
+ st && h.current && h.current.triggerKeyboardEvent(t);
41
41
  };
42
42
  s.useEffect(() => {
43
43
  var r;
44
- const t = vt && window.ResizeObserver && new window.ResizeObserver(p), e = i.current, n = ((r = m == null ? void 0 : m.current) == null ? void 0 : r.offsetWidth) || 0;
45
- return t && e && t.observe(e), U(), p(), O([n, 0, -n]), () => {
44
+ const t = pt && window.ResizeObserver && new window.ResizeObserver(k), e = c.current, n = ((r = m == null ? void 0 : m.current) == null ? void 0 : r.offsetWidth) || 0;
45
+ return t && e && t.observe(e), $(), k(), O([n, 0, -n]), () => {
46
46
  t && t.disconnect();
47
47
  };
48
48
  }, []), s.useEffect(() => {
49
- const t = i.current, e = t && t.children[a];
49
+ const t = c.current, e = t && t.children[a];
50
50
  if (e) {
51
51
  const n = e.offsetWidth, r = !(f >= 0);
52
- if (j(r), c) {
53
- const o = c.length * n > l * n * ((f * -1 + 100) / 100);
54
- K(o);
52
+ if (Y(r), i) {
53
+ const o = i.length * n > l * n * ((f * -1 + 100) / 100);
54
+ B(o);
55
55
  }
56
- (t == null ? void 0 : t.offsetWidth) * -f / 100 >= t.children.length * n && (U(), p(), S(
56
+ (t == null ? void 0 : t.offsetWidth) * -f / 100 >= t.children.length * n && ($(), k(), S(
57
57
  (e.offsetLeft - e.offsetWidth) / (l * e.offsetWidth) * 100 * -1
58
- )), V(e);
58
+ )), M(e);
59
59
  }
60
60
  }, [l, b, a]);
61
- const at = (t, e, n) => {
62
- if (i.current) {
63
- const r = i.current.children[a + 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a + 2 : a + 1;
64
- if (c && c.length <= o)
61
+ const ot = (t, e, n) => {
62
+ if (c.current) {
63
+ const r = c.current.children[a + 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a + 2 : a + 1;
64
+ if (i && i.length <= o)
65
65
  return;
66
- l + d <= o && P(), E(o, n);
66
+ l + d <= o && z(), E(o, n);
67
67
  }
68
- }, ot = (t, e, n) => {
69
- if (i.current) {
70
- const r = i.current && i.current.children[a - 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a - 2 : a - 1;
68
+ }, it = (t, e, n) => {
69
+ if (c.current) {
70
+ const r = c.current && c.current.children[a - 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a - 2 : a - 1;
71
71
  if (o <= 0)
72
72
  return;
73
- o < d && x(), E(o, n);
73
+ o < d && H(), E(o, n);
74
74
  }
75
- }, it = (t, e, n) => {
76
- if (i.current) {
75
+ }, ct = (t, e, n) => {
76
+ if (c.current) {
77
77
  if (a <= 1)
78
78
  return;
79
79
  const r = 1;
80
- k(!0, r, 0, 0), E(r, n);
80
+ p(!0, r, 0, 0), E(r, n);
81
81
  }
82
- }, ct = (t, e, n) => {
83
- if (i.current) {
84
- const r = i.current && i.current.children.length - 1;
82
+ }, lt = (t, e, n) => {
83
+ if (c.current) {
84
+ const r = c.current && c.current.children.length - 1;
85
85
  if (r <= a)
86
86
  return;
87
- const o = Math.floor(r / l), v = o * -100, C = o * l;
88
- k(!0, r, C, v), E(r, n);
87
+ const o = Math.floor(r / l), T = o * -100, y = o * l;
88
+ p(!0, r, y, T), E(r, n);
89
89
  }
90
- }, U = () => {
91
- const t = mt(tt);
92
- J(t), I([t[a - 1], t[a], t[a + 1]]);
93
- }, x = () => {
90
+ }, $ = () => {
91
+ const t = dt(nt);
92
+ tt(t), I([t[a - 1], t[a], t[a + 1]]);
93
+ }, H = () => {
94
94
  var e;
95
- if (i.current && c) {
96
- const n = d - l, r = d - 1, o = c[r] && ((e = c[r]) != null && e.yearFlag) ? r - 1 : r, v = f + 100 > 0 ? 0 : f + 100;
97
- k(!1, o, n, v);
95
+ if (c.current && i) {
96
+ const n = d - l, r = d - 1, o = i[r] && ((e = i[r]) != null && e.yearFlag) ? r - 1 : r, T = f + 100 > 0 ? 0 : f + 100;
97
+ p(!1, o, n, T);
98
98
  }
99
- }, P = () => {
100
- if (i.current && c) {
101
- const e = d + l, n = c[e] && c[e].yearFlag ? e + 1 : e, r = f - 100;
102
- k(!0, n, e, r);
99
+ }, z = () => {
100
+ if (c.current && i) {
101
+ const e = d + l, n = i[e] && i[e].yearFlag ? e + 1 : e, r = f - 100;
102
+ p(!0, n, e, r);
103
103
  }
104
- }, k = (t, e, n, r) => {
105
- A(t, e), p(), G(n), S(r), L(e);
106
- }, A = (t, e) => {
107
- if (u && c) {
108
- const n = h(t, Q), r = Object.assign([], u, { [n]: c[e] });
109
- I(r), Z(n), F(t ? -100 : 100), setTimeout(() => {
110
- var H;
111
- const o = (H = m.current) == null ? void 0 : H.offsetWidth, v = Object.assign([], w, {
104
+ }, p = (t, e, n, r) => {
105
+ N(t, e), k(), Z(n), S(r), L(e);
106
+ }, N = (t, e) => {
107
+ if (u && i) {
108
+ const n = v(t, U), r = Object.assign([], u, { [n]: i[e] });
109
+ I(r), et(n), W(t ? -100 : 100), setTimeout(() => {
110
+ var K;
111
+ const o = (K = m.current) == null ? void 0 : K.offsetWidth, T = Object.assign([], F, {
112
112
  [n]: 0,
113
- [h(!0, n)]: o,
114
- [h(!1, n)]: o && -o
115
- }), C = Object.assign([], r, {
116
- [h(!0, n)]: {},
117
- [h(!1, n)]: {}
113
+ [v(!0, n)]: o,
114
+ [v(!1, n)]: o && -o
115
+ }), y = Object.assign([], r, {
116
+ [v(!0, n)]: {},
117
+ [v(!1, n)]: {}
118
118
  });
119
- I(C), O(v), F(0);
119
+ I(y), O(T), W(0);
120
120
  }, g.transitionDuration || 300);
121
121
  }
122
- }, h = (t, e) => {
122
+ }, v = (t, e) => {
123
123
  const n = t ? e + 1 : e - 1;
124
124
  return u ? n < 0 ? u.length - 1 : n % u.length : 0;
125
- }, V = (t) => {
125
+ }, M = (t) => {
126
126
  var n, r;
127
- const e = (a - d) * t.offsetWidth + t.offsetWidth / 2 + (((r = (n = W.current) == null ? void 0 : n.element) == null ? void 0 : r.clientWidth) || 0);
128
- Y(e);
127
+ const e = (a - d) * t.offsetWidth + t.offsetWidth / 2 + (((r = (n = V.current) == null ? void 0 : n.element) == null ? void 0 : r.clientWidth) || 0);
128
+ G(e);
129
129
  }, E = (t, e) => {
130
- e.preventDefault(), t > a ? A(!0, t) : t < a && A(!1, t), L(t);
131
- }, p = s.useCallback(() => {
132
- const t = i.current, e = t && t.children[a];
130
+ e.preventDefault(), t > a ? N(!0, t) : t < a && N(!1, t), L(t);
131
+ }, k = s.useCallback(() => {
132
+ const t = c.current, e = t && t.children[a];
133
133
  if (t instanceof HTMLElement && e) {
134
134
  const n = Math.round(t.offsetWidth / 150);
135
- V(e), B(100 / n), q(n);
135
+ M(e), J(100 / n), Q(n);
136
136
  }
137
- }, []), lt = () => ({
137
+ }, []), ft = () => ({
138
138
  transitionDuration: "300ms"
139
- }), $ = (t) => ({
139
+ }), j = (t) => ({
140
140
  transform: `translateX(${t}%)`,
141
141
  transformOrigin: "left top"
142
142
  });
143
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track-wrap", ref: m, onKeyDown: rt }, /* @__PURE__ */ s.createElement(
144
- z,
143
+ return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track-wrap", ref: m, onKeyDown: at }, /* @__PURE__ */ s.createElement(
144
+ X,
145
145
  {
146
- ref: W,
146
+ ref: V,
147
147
  "aria-hidden": "true",
148
148
  rounded: "full",
149
- svgIcon: dt,
150
- icon: "caret-alt-left",
151
- onClick: () => _ && x(),
152
- className: R("k-timeline-arrow", "k-timeline-arrow-left", { "k-disabled": !_ })
149
+ svgIcon: ht,
150
+ icon: "chevron-left",
151
+ onClick: () => _ && H(),
152
+ className: C("k-timeline-arrow", "k-timeline-arrow-left", { "k-disabled": !_ })
153
153
  }
154
154
  ), /* @__PURE__ */ s.createElement(
155
- z,
155
+ X,
156
156
  {
157
157
  "aria-hidden": "true",
158
158
  rounded: "full",
159
- svgIcon: Tt,
160
- icon: "caret-alt-right",
161
- onClick: () => y && P(),
162
- className: R("k-timeline-arrow", "k-timeline-arrow-right", { "k-disabled": !y })
159
+ svgIcon: vt,
160
+ icon: "chevron-right",
161
+ onClick: () => A && z(),
162
+ className: C("k-timeline-arrow", "k-timeline-arrow-right", { "k-disabled": !A })
163
163
  }
164
164
  ), /* @__PURE__ */ s.createElement("div", { className: "k-timeline-track" }, /* @__PURE__ */ s.createElement(
165
165
  "ul",
166
166
  {
167
- ref: i,
167
+ ref: c,
168
168
  className: "k-timeline-scrollable-wrap",
169
169
  role: "tablist",
170
170
  tabIndex: 0,
171
171
  style: { transform: `translateX(${f}%)` }
172
172
  },
173
- c && c.map(
173
+ i == null ? void 0 : i.map(
174
174
  (t, e) => t.yearFlag ? /* @__PURE__ */ s.createElement(
175
175
  "li",
176
176
  {
177
177
  role: "none",
178
+ "aria-hidden": "true",
178
179
  className: "k-timeline-track-item k-timeline-flag-wrap",
179
- style: { flex: `1 0 ${D}` },
180
+ style: { flex: `1 0 ${P}` },
180
181
  key: e
181
182
  },
182
183
  /* @__PURE__ */ s.createElement("span", { className: "k-timeline-flag" }, t.yearFlag)
@@ -184,14 +185,15 @@ const gt = (g) => {
184
185
  "li",
185
186
  {
186
187
  role: "tab",
187
- className: R("k-timeline-track-item", {
188
+ className: C("k-timeline-track-item", {
188
189
  "k-focus": e === a
189
190
  }),
190
- "aria-selected": e === a,
191
- style: { flex: `1 0 ${D}` },
191
+ "aria-selected": e === a || void 0,
192
+ "aria-describedby": e === a ? D : void 0,
193
+ style: { flex: `1 0 ${P}` },
192
194
  key: e
193
195
  },
194
- /* @__PURE__ */ s.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ s.createElement("span", { className: "k-timeline-date" }, M.formatDate(t.date, et))),
196
+ /* @__PURE__ */ s.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ s.createElement("span", { className: "k-timeline-date" }, R.formatDate(t.date, x))),
195
197
  /* @__PURE__ */ s.createElement("span", { onClick: (n) => E(e, n), className: "k-timeline-circle" })
196
198
  )
197
199
  )
@@ -199,32 +201,34 @@ const gt = (g) => {
199
201
  "ul",
200
202
  {
201
203
  className: "k-timeline-scrollable-wrap",
202
- style: N === 0 ? { ...$(N) } : { ...$(N), ...lt() }
204
+ style: w === 0 ? { ...j(w) } : { ...j(w), ...ft() }
203
205
  },
204
- u && u.map((t, e) => /* @__PURE__ */ s.createElement(
206
+ u && u.map((t, e) => e === U ? /* @__PURE__ */ s.createElement(
205
207
  "li",
206
208
  {
207
209
  key: e,
208
210
  className: "k-timeline-event",
209
- style: { transform: `translate3d(${w[e]}px, 0px, 0px)` }
211
+ style: { transform: `translate3d(${F[e]}px, 0px, 0px)` }
210
212
  },
211
213
  t && /* @__PURE__ */ s.createElement(
212
- ut,
214
+ mt,
213
215
  {
214
- tabindex: w[e] === 0 ? 0 : -1,
216
+ tabindex: 0,
217
+ panelId: D,
215
218
  eventData: t,
216
- onActionClick: st,
219
+ ariaLabel: t.date ? R.formatDate(t.date, x) : void 0,
220
+ onActionClick: rt,
217
221
  horizontal: !0,
218
222
  collapsible: !1,
219
- calloutStyle: { left: `${X}px` }
223
+ calloutStyle: { left: `${q}px` }
220
224
  }
221
225
  )
222
- ))
226
+ ) : null)
223
227
  )));
224
228
  };
225
- gt.propTypes = {
226
- onActionClick: ft.func
229
+ kt.propTypes = {
230
+ onActionClick: ut.func
227
231
  };
228
232
  export {
229
- gt as TimelineHorizontal
233
+ kt as TimelineHorizontal
230
234
  };