@progress/kendo-react-layout 14.5.0-develop.9 → 15.0.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.
Files changed (72) 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.js +1 -1
  6. package/actionsheet/ActionSheet.mjs +18 -19
  7. package/actionsheet/ActionSheetItem.js +1 -1
  8. package/actionsheet/ActionSheetItem.mjs +1 -3
  9. package/bottomnavigation/BottomNavigation.js +1 -1
  10. package/bottomnavigation/BottomNavigation.mjs +85 -69
  11. package/bottomnavigation/BottomNavigationItem.js +1 -1
  12. package/bottomnavigation/BottomNavigationItem.mjs +34 -33
  13. package/bottomnavigation/messages/index.d.ts +17 -0
  14. package/bottomnavigation/messages/index.js +8 -0
  15. package/bottomnavigation/messages/index.mjs +14 -0
  16. package/breadcrumb/Breadcrumb.js +1 -1
  17. package/breadcrumb/Breadcrumb.mjs +30 -28
  18. package/breadcrumb/BreadcrumbLink.js +1 -1
  19. package/breadcrumb/BreadcrumbLink.mjs +26 -26
  20. package/breadcrumb/messages/index.d.ts +17 -0
  21. package/breadcrumb/messages/index.js +8 -0
  22. package/breadcrumb/messages/index.mjs +14 -0
  23. package/dist/cdn/js/kendo-react-layout.js +1 -1
  24. package/drawer/Drawer.js +1 -1
  25. package/drawer/Drawer.mjs +63 -63
  26. package/drawer/DrawerItem.js +1 -1
  27. package/drawer/DrawerItem.mjs +22 -23
  28. package/drawer/interfaces/DrawerProps.d.ts +8 -0
  29. package/expansionpanel/ExpansionPanel.js +1 -1
  30. package/expansionpanel/ExpansionPanel.mjs +50 -50
  31. package/expansionpanel/ExpansionPanelContent.js +1 -1
  32. package/expansionpanel/ExpansionPanelContent.mjs +7 -4
  33. package/index.d.mts +1 -2
  34. package/index.d.ts +1 -2
  35. package/index.js +1 -1
  36. package/index.mjs +128 -130
  37. package/menu/MenuProps.d.ts +6 -0
  38. package/package-metadata.js +1 -1
  39. package/package-metadata.mjs +2 -2
  40. package/package.json +8 -8
  41. package/panelbar/PanelBar.js +1 -1
  42. package/panelbar/PanelBar.mjs +94 -91
  43. package/panelbar/PanelBarItem.js +1 -1
  44. package/panelbar/PanelBarItem.mjs +13 -15
  45. package/panelbar/interfaces/PanelBarProps.d.ts +8 -0
  46. package/panelbar/interfaces/RenderPanelBarItem.d.ts +1 -0
  47. package/panelbar/util.d.ts +1 -1
  48. package/panelbar/util.js +1 -1
  49. package/panelbar/util.mjs +62 -59
  50. package/splitter/SplitterBar.d.ts +1 -0
  51. package/splitter/SplitterBar.js +1 -1
  52. package/splitter/SplitterBar.mjs +64 -56
  53. package/stepper/Step.js +1 -1
  54. package/stepper/Step.mjs +79 -85
  55. package/stepper/Stepper.js +1 -1
  56. package/stepper/Stepper.mjs +134 -133
  57. package/stepper/interfaces/StepperProps.d.ts +8 -1
  58. package/stepper/messages/index.d.ts +12 -2
  59. package/stepper/messages/index.js +1 -1
  60. package/stepper/messages/index.mjs +8 -4
  61. package/tabstrip/TabStrip.d.ts +8 -1
  62. package/tabstrip/TabStrip.js +1 -1
  63. package/tabstrip/TabStrip.mjs +126 -125
  64. package/tilelayout/InternalTile.js +1 -1
  65. package/tilelayout/InternalTile.mjs +119 -115
  66. package/tilelayout/TileLayout.js +1 -1
  67. package/tilelayout/TileLayout.mjs +58 -58
  68. package/timeline/TimelineCard.d.ts +2 -0
  69. package/timeline/TimelineCard.js +1 -1
  70. package/timeline/TimelineCard.mjs +16 -15
  71. package/timeline/TimelineHorizontal.js +1 -1
  72. package/timeline/TimelineHorizontal.mjs +105 -101
@@ -6,217 +6,221 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as n from "react";
9
- import o from "prop-types";
10
- import { getScrollbarWidth as G, canUseDOM as J, classNames as Y, Draggable as Q } from "@progress/kendo-react-common";
11
- import { ResizeHandlers as Z } from "./ResizeHandlers.mjs";
12
- const O = 200, T = {
9
+ import a from "prop-types";
10
+ import { getScrollbarWidth as J, canUseDOM as Q, classNames as O, Draggable as Z } from "@progress/kendo-react-common";
11
+ import { ResizeHandlers as ee } from "./ResizeHandlers.mjs";
12
+ const H = 200, L = {
13
13
  resizable: !0,
14
14
  reorderable: !0
15
- }, N = (t) => {
16
- var B, X;
17
- const b = (B = t.reorderable) != null ? B : T.reorderable, H = (X = t.resizable) != null ? X : T.resizable, s = n.useRef(null), c = n.useRef(null), k = n.useRef(null), v = n.useRef({}), E = n.useRef(!1), D = n.useRef(!1), z = n.useRef(!1), $ = n.useRef({ x: 0, y: 0 }), w = n.useRef({ x: 0, y: 0 }), u = n.useRef({ x: 0, y: 0 }), P = n.useRef(void 0), x = n.useRef(t), [R, F] = n.useState(!1), [q, I] = n.useState(!1), d = n.useCallback(() => k.current ? k.current.element : void 0, []), S = n.useCallback(() => {
18
- if (s.current && c.current) {
19
- const e = s.current.getBoundingClientRect();
20
- c.current.style.top = e.top + "px", c.current.style.left = e.left + "px", c.current.style.height = s.current.offsetHeight + "px", c.current.style.width = s.current.offsetWidth + "px";
15
+ }, T = (t) => {
16
+ var M, X, Y;
17
+ const b = (M = t.reorderable) != null ? M : L.reorderable, p = (X = t.resizable) != null ? X : L.resizable, c = n.useRef(null), s = n.useRef(null), v = n.useRef(null), k = n.useRef(!1), E = n.useRef(!1), D = n.useRef(!1), z = n.useRef({ x: 0, y: 0 }), w = n.useRef({ x: 0, y: 0 }), u = n.useRef({ x: 0, y: 0 }), C = n.useRef(void 0), x = n.useRef(t), [R, F] = n.useState(!1), [q, N] = n.useState(!1), d = n.useCallback(() => v.current ? v.current.element : void 0, []), S = n.useCallback(() => {
18
+ if (c.current && s.current) {
19
+ const e = c.current.getBoundingClientRect();
20
+ s.current.style.top = e.top + "px", s.current.style.left = e.left + "px", s.current.style.height = c.current.offsetHeight + "px", s.current.style.width = c.current.offsetWidth + "px";
21
21
  }
22
22
  }, []), A = n.useCallback(() => {
23
23
  S();
24
- }, [S]), p = n.useCallback(() => {
24
+ }, [S]), U = n.useCallback(() => {
25
25
  setTimeout(() => {
26
26
  S();
27
27
  }, 100);
28
- }, [S]), U = n.useCallback(() => {
28
+ }, [S]), W = n.useCallback(() => {
29
29
  const e = d();
30
- if (!e || !c.current)
30
+ if (!e || !s.current)
31
31
  return;
32
- const r = e.getBoundingClientRect(), i = r.top + u.current.y, a = r.left + u.current.x;
33
- c.current.style.top = `${i}px`, c.current.style.left = `${a}px`, c.current.style.display = "block";
34
- }, [d]), L = n.useCallback(() => {
35
- E.current = D.current = !1, u.current = { x: 0, y: 0 }, s.current && c.current && (s.current.style.zIndex = "1", c.current.classList.remove("k-layout-item-hint-resize"), I(!1));
32
+ const r = e.getBoundingClientRect(), i = r.top + u.current.y, o = r.left + u.current.x;
33
+ s.current.style.top = `${i}px`, s.current.style.left = `${o}px`, s.current.style.display = "block";
34
+ }, [d]), $ = n.useCallback(() => {
35
+ k.current = E.current = !1, u.current = { x: 0, y: 0 }, c.current && s.current && (c.current.style.zIndex = "1", s.current.classList.remove("k-layout-item-hint-resize"), N(!1));
36
36
  const e = d();
37
- e && (e.style.transform = "translate(0px, 0px)", e.style.transition = `transform ${O}ms cubic-bezier(0.2, 0, 0, 1) 0s`, e.style.marginRight = "0px", e.style.marginLeft = "0px", e.style.height = "100%", e.classList.remove("k-cursor-grabbing"), b && e.classList.add("k-cursor-move")), t.onRelease();
38
- }, [t, b, d]), W = n.useCallback(
37
+ e && (e.style.transform = "translate(0px, 0px)", e.style.transition = `transform ${H}ms cubic-bezier(0.2, 0, 0, 1) 0s`, e.style.marginRight = "0px", e.style.marginLeft = "0px", e.style.height = "100%", e.classList.remove("k-cursor-grabbing"), b && e.classList.add("k-cursor-move")), t.onRelease();
38
+ }, [t, b, d]), j = n.useCallback(
39
39
  (e, r) => {
40
40
  if (r.end) {
41
- L();
41
+ $();
42
42
  return;
43
43
  }
44
- if (!s.current || !c.current)
44
+ if (!c.current || !s.current)
45
45
  return;
46
- const i = e.clientX, a = e.clientY;
47
- D.current = !0;
48
- const f = (r.direction !== "ns" ? i - w.current.x : 0) * (R ? -1 : 1), l = r.direction !== "ew" ? a - w.current.y : 0, h = d();
49
- if (h && (R ? h.style.marginLeft = -f + "px" : h.style.marginRight = -f + "px", h.style.height = `calc(100% + ${l}px)`), c.current.classList.add("k-layout-item-hint-resize"), P.current)
46
+ const i = e.clientX, o = e.clientY;
47
+ E.current = !0;
48
+ const f = (r.direction !== "ns" ? i - w.current.x : 0) * (R ? -1 : 1), l = r.direction !== "ew" ? o - w.current.y : 0, h = d();
49
+ if (h && (R ? h.style.marginLeft = -f + "px" : h.style.marginRight = -f + "px", h.style.height = `calc(100% + ${l}px)`), s.current.classList.add("k-layout-item-hint-resize"), C.current)
50
50
  return;
51
- let g = 0, y = 0;
52
- const C = s.current.getBoundingClientRect();
53
- f > C.width / t.defaultPosition.colSpan / 3 && (g = 1), f < -C.width / t.defaultPosition.colSpan / 1.25 && (g = -1), l > C.height / t.defaultPosition.rowSpan / 3 && (y = 1), l < -C.height / t.defaultPosition.rowSpan / 1.25 && (y = -1), (g !== 0 || y !== 0) && t.update(t.index, 0, 0, y, g);
51
+ let g = 0, m = 0;
52
+ const P = c.current.getBoundingClientRect();
53
+ f > P.width / t.defaultPosition.colSpan / 3 && (g = 1), f < -P.width / t.defaultPosition.colSpan / 1.25 && (g = -1), l > P.height / t.defaultPosition.rowSpan / 3 && (m = 1), l < -P.height / t.defaultPosition.rowSpan / 1.25 && (m = -1), (g !== 0 || m !== 0) && t.update(t.index, 0, 0, m, g);
54
54
  },
55
- [R, t, L, d]
56
- ), M = n.useCallback(
55
+ [R, t, $, d]
56
+ ), B = n.useCallback(
57
57
  (e) => {
58
- var a;
58
+ var o;
59
59
  const r = d();
60
60
  if (!r)
61
61
  return;
62
62
  if (w.current = {
63
63
  x: e.event.clientX,
64
64
  y: e.event.clientY
65
- }, z.current = !1, (a = t.ignoreDrag) != null && a.call(t, e.event.originalEvent)) {
66
- z.current = !0;
65
+ }, D.current = !1, (o = t.ignoreDrag) != null && o.call(t, e.event.originalEvent)) {
66
+ D.current = !0;
67
67
  return;
68
68
  }
69
- s.current && (s.current.style.zIndex = "10", I(!0)), r.classList.remove("k-cursor-move"), r.classList.add("k-cursor-grabbing");
69
+ c.current && (c.current.style.zIndex = "10", N(!0)), r.classList.remove("k-cursor-move"), r.classList.add("k-cursor-grabbing");
70
70
  const i = r.getBoundingClientRect();
71
- $.current = {
71
+ z.current = {
72
72
  x: e.event.clientX - i.x,
73
73
  y: e.event.clientY - i.y
74
74
  }, t.onPress();
75
75
  },
76
76
  [t, d]
77
- ), j = n.useCallback(
77
+ ), K = n.useCallback(
78
78
  (e) => {
79
79
  var h;
80
- if (z.current)
80
+ if (D.current)
81
81
  return;
82
82
  const r = d();
83
83
  if (e.event.originalEvent.defaultPrevented || !r)
84
84
  return;
85
- E.current = !0, e.event.originalEvent.preventDefault();
85
+ k.current = !0, e.event.originalEvent.preventDefault();
86
86
  const i = r.getBoundingClientRect();
87
87
  if (u.current = {
88
- x: e.event.clientX - i.x - $.current.x + u.current.x,
89
- y: e.event.clientY - i.y - $.current.y + u.current.y
90
- }, r.style.transform = `translate(${u.current.x}px, ${u.current.y}px)`, r.style.transition = "transform 0s", P.current)
88
+ x: e.event.clientX - i.x - z.current.x + u.current.x,
89
+ y: e.event.clientY - i.y - z.current.y + u.current.y
90
+ }, r.style.transform = `translate(${u.current.x}px, ${u.current.y}px)`, r.style.transition = "transform 0s", C.current)
91
91
  return;
92
- let a = 0, f = 0;
93
- u.current.y > 0.7 * i.height / t.defaultPosition.rowSpan && (f = 1), u.current.y < 0.7 * -i.height / t.defaultPosition.rowSpan && (f = -1), u.current.x > 0.7 * i.width / t.defaultPosition.colSpan && (a = 1), u.current.x < 0.7 * -i.width / t.defaultPosition.colSpan && (a = -1), t.update(t.index, f, R ? -a : a, 0, 0);
94
- const l = (h = s.current) == null ? void 0 : h.closest(".k-tilelayout");
95
- if (l && c.current) {
96
- const g = l.getBoundingClientRect(), y = G() || 50;
97
- e.event.clientX < g.left - y || e.event.clientX > g.right - y || e.event.clientY < g.top || e.event.clientY > g.bottom ? c.current.style.display = "none" : c.current.style.display = "block";
92
+ let o = 0, f = 0;
93
+ u.current.y > 0.7 * i.height / t.defaultPosition.rowSpan && (f = 1), u.current.y < 0.7 * -i.height / t.defaultPosition.rowSpan && (f = -1), u.current.x > 0.7 * i.width / t.defaultPosition.colSpan && (o = 1), u.current.x < 0.7 * -i.width / t.defaultPosition.colSpan && (o = -1), t.update(t.index, f, R ? -o : o, 0, 0);
94
+ const l = (h = c.current) == null ? void 0 : h.closest(".k-tilelayout");
95
+ if (l && s.current) {
96
+ const g = l.getBoundingClientRect(), m = J() || 50;
97
+ e.event.clientX < g.left - m || e.event.clientX > g.right - m || e.event.clientY < g.top || e.event.clientY > g.bottom ? s.current.style.display = "none" : s.current.style.display = "block";
98
98
  }
99
99
  },
100
100
  [t, R, d]
101
101
  );
102
102
  n.useEffect(() => {
103
- s.current && (getComputedStyle(s.current).direction === "rtl" && F(!0), c.current && (c.current.style.height = s.current.offsetHeight + "px", c.current.style.width = s.current.offsetWidth + "px"));
104
- }, []), n.useLayoutEffect(() => {
103
+ c.current && (getComputedStyle(c.current).direction === "rtl" && F(!0), s.current && (s.current.style.height = c.current.offsetHeight + "px", s.current.style.width = c.current.offsetWidth + "px"));
104
+ }, []);
105
+ const I = n.useRef(null);
106
+ (Y = v.current) != null && Y.element && (I.current = v.current.element.getBoundingClientRect()), n.useLayoutEffect(() => {
105
107
  const e = d();
106
108
  if (!e)
107
109
  return;
108
- const r = e.getBoundingClientRect(), i = v.current;
110
+ const r = e.getBoundingClientRect(), i = I.current;
109
111
  if (!(i != null && i.width)) {
110
- v.current = r, x.current = t;
112
+ x.current = t;
111
113
  return;
112
114
  }
113
- if (D.current) {
115
+ if (E.current) {
114
116
  const l = r.width - i.width;
115
117
  if (R) {
116
- const y = parseFloat(e.style.marginLeft || "0");
117
- e.style.marginLeft = y - l + "px";
118
+ const m = parseFloat(e.style.marginLeft || "0");
119
+ e.style.marginLeft = m - l + "px";
118
120
  } else {
119
- const y = parseFloat(e.style.marginRight || "0");
120
- e.style.marginRight = y + l + "px";
121
+ const m = parseFloat(e.style.marginRight || "0");
122
+ e.style.marginRight = m + l + "px";
121
123
  }
122
124
  w.current.x += R ? -l : l;
123
125
  const h = r.height - i.height, g = parseFloat(e.style.height.substring(12));
124
126
  e.style.height = `calc(100% + ${g + h}px)`, w.current.y += h;
125
127
  }
126
- const a = i.left - r.left, f = i.top - r.top;
127
- if (a === 0 && f === 0) {
128
- v.current = r, x.current = t;
128
+ const o = i.left - r.left, f = i.top - r.top;
129
+ if (o === 0 && f === 0) {
130
+ x.current = t;
129
131
  return;
130
132
  }
131
- if (E.current) {
132
- (x.current.defaultPosition.order !== t.defaultPosition.order || x.current.defaultPosition.col !== t.defaultPosition.col) && (u.current.x = 0, u.current.y = 0, e.style.transform = "", U()), v.current = r, x.current = t;
133
+ if (k.current) {
134
+ (x.current.defaultPosition.order !== t.defaultPosition.order || x.current.defaultPosition.col !== t.defaultPosition.col) && (u.current.x = 0, u.current.y = 0, e.style.transform = "", W()), x.current = t;
133
135
  return;
134
136
  }
135
- if (Math.abs(f) < 15 && Math.abs(a) < 15) {
136
- v.current = r, x.current = t;
137
+ if (Math.abs(f) < 15 && Math.abs(o) < 15) {
138
+ x.current = t;
137
139
  return;
138
140
  }
139
141
  requestAnimationFrame(() => {
140
- const l = s.current;
141
- l && (l.style.transform = `translate(${a}px, ${f}px)`, l.style.transition = "transform 0s", requestAnimationFrame(() => {
142
- l.style.transform = "", l.style.transition = `transform ${O}ms cubic-bezier(0.2, 0, 0, 1) 0s`;
142
+ const l = c.current;
143
+ l && (l.style.transform = `translate(${o}px, ${f}px)`, l.style.transition = "transform 0s", requestAnimationFrame(() => {
144
+ l.style.transform = "", l.style.transition = `transform ${H}ms cubic-bezier(0.2, 0, 0, 1) 0s`;
143
145
  }));
144
- }), v.current = r, x.current = t;
145
- }), J && clearTimeout && typeof clearTimeout == "function" && (clearTimeout(P.current), P.current = window.setTimeout(() => {
146
- P.current = void 0;
146
+ }), x.current = t;
147
+ }), Q && clearTimeout && typeof clearTimeout == "function" && (clearTimeout(C.current), C.current = window.setTimeout(() => {
148
+ C.current = void 0;
147
149
  }, 200));
148
- const m = t.defaultPosition, K = {
149
- gridColumnStart: m.col,
150
- gridColumnEnd: `span ${m.colSpan}`,
151
- gridRowStart: m.row,
152
- gridRowEnd: `span ${m.rowSpan}`,
150
+ const y = t.defaultPosition, V = {
151
+ gridColumnStart: y.col,
152
+ gridColumnEnd: `span ${y.colSpan}`,
153
+ gridRowStart: y.row,
154
+ gridRowEnd: `span ${y.rowSpan}`,
153
155
  outline: "none",
154
- order: m.order,
156
+ order: y.order,
155
157
  display: "block",
156
158
  ...t.hintStyle
157
- }, V = {
158
- gridColumnStart: m.col,
159
- gridColumnEnd: `span ${m.colSpan}`,
160
- gridRowStart: m.row,
161
- gridRowEnd: `span ${m.rowSpan}`,
162
- order: m.order
163
- }, _ = /* @__PURE__ */ n.createElement(
159
+ }, _ = {
160
+ gridColumnStart: y.col,
161
+ gridColumnEnd: `span ${y.colSpan}`,
162
+ gridRowStart: y.row,
163
+ gridRowEnd: `span ${y.rowSpan}`,
164
+ order: y.order
165
+ }, G = /* @__PURE__ */ n.createElement(
164
166
  "div",
165
167
  {
166
168
  role: "listitem",
167
169
  tabIndex: 0,
168
170
  "aria-labelledby": typeof t.header == "string" ? t.header : `tile-${t.index}`,
169
171
  "aria-keyshortcuts": "Enter",
170
- className: Y("k-tilelayout-item k-card", { "k-cursor-move": b }, t.className),
171
- style: { height: "100%", ...V, ...t.style },
172
+ "aria-dropeffect": "execute",
173
+ "aria-grabbed": !1,
174
+ className: O("k-tilelayout-item k-card", t.className),
175
+ style: { height: "100%", ..._, ...t.style },
172
176
  onMouseDown: A,
173
- onMouseUp: p
177
+ onMouseUp: U
174
178
  },
175
179
  t.children,
176
- /* @__PURE__ */ n.createElement(Z, { onPress: M, onResize: W, resizable: H, rtl: R })
180
+ /* @__PURE__ */ n.createElement(ee, { onPress: B, onResize: j, resizable: p, rtl: R })
177
181
  );
178
182
  return /* @__PURE__ */ n.createElement(n.Fragment, null, q && /* @__PURE__ */ n.createElement(
179
183
  "div",
180
184
  {
181
185
  ref: (e) => {
182
- c.current = e;
186
+ s.current = e;
183
187
  },
184
- style: { position: "fixed", ...K },
185
- className: Y("k-layout-item-hint", t.hintClassName)
188
+ style: { position: "fixed", ...V },
189
+ className: O("k-layout-item-hint", t.hintClassName)
186
190
  }
187
191
  ), /* @__PURE__ */ n.createElement(
188
- Q,
192
+ Z,
189
193
  {
190
194
  ref: (e) => {
191
- k.current = e, s.current = e ? e.element : null;
195
+ v.current = e, c.current = e ? e.element : null;
192
196
  },
193
- onDrag: b ? j : void 0,
194
- onRelease: b ? L : void 0,
195
- onPress: b ? M : void 0
197
+ onDrag: b ? K : void 0,
198
+ onRelease: b ? $ : void 0,
199
+ onPress: b ? B : void 0
196
200
  },
197
- _
201
+ G
198
202
  ));
199
203
  };
200
- N.propTypes = {
201
- update: o.func.isRequired,
202
- index: o.number.isRequired,
203
- defaultPosition: o.object.isRequired,
204
- ignoreDrag: o.func,
205
- onPress: o.func.isRequired,
206
- onRelease: o.func.isRequired,
207
- children: o.node,
208
- style: o.object,
209
- className: o.string,
210
- hintStyle: o.object,
211
- hintClassName: o.string,
212
- header: o.any,
213
- body: o.any,
214
- item: o.any,
215
- resizable: o.oneOf(["horizontal", "vertical", !0, !1]),
216
- reorderable: o.bool
204
+ T.propTypes = {
205
+ update: a.func.isRequired,
206
+ index: a.number.isRequired,
207
+ defaultPosition: a.object.isRequired,
208
+ ignoreDrag: a.func,
209
+ onPress: a.func.isRequired,
210
+ onRelease: a.func.isRequired,
211
+ children: a.node,
212
+ style: a.object,
213
+ className: a.string,
214
+ hintStyle: a.object,
215
+ hintClassName: a.string,
216
+ header: a.any,
217
+ body: a.any,
218
+ item: a.any,
219
+ resizable: a.oneOf(["horizontal", "vertical", !0, !1]),
220
+ reorderable: a.bool
217
221
  };
218
- N.displayName = "KendoTileLayoutItem";
219
- N.defaultProps = T;
222
+ T.displayName = "KendoTileLayoutItem";
223
+ T.defaultProps = L;
220
224
  export {
221
- N as InternalTile
225
+ T as InternalTile
222
226
  };
@@ -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 r=require("react"),t=require("prop-types"),O=require("@progress/kendo-react-common"),Q=require("./InternalTile.js");function X(c){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const m in c)if(m!=="default"){const l=Object.getOwnPropertyDescriptor(c,m);Object.defineProperty(d,m,l.get?l:{enumerable:!0,get:()=>c[m]})}}return d.default=c,Object.freeze(d)}const o=X(r),Y={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},y={columns:3,columnWidth:"1fr",rowHeight:"1fr",autoFlow:"column",items:[]},$=o.forwardRef((c,d)=>{const{className:m,columns:l=y.columns,columnWidth:g=y.columnWidth,gap:i,rowHeight:h=y.rowHeight,style:j,autoFlow:q=y.autoFlow,items:u=y.items,positions:w,onReposition:P,dataItemKey:C,id:N,dir:z,ignoreDrag:A}=c,K=r.useCallback(()=>{k.current&&k.current.focus()},[]),b=r.useRef(null),k=r.useRef(null);o.useImperativeHandle(b,()=>({element:k.current,focus:K})),o.useImperativeHandle(d,()=>b.current);const p=w!==void 0,R=r.useCallback(e=>e.map((n,a)=>({order:a,rowSpan:1,colSpan:1,...n.defaultPosition})),[]),U=r.useMemo(()=>{if(w)return w.map((e,n)=>({order:n,rowSpan:1,colSpan:1,...e}))},[w]),[V,D]=r.useState(()=>R(u)),[B,M]=r.useState(!1),W=r.useRef(u.length);r.useEffect(()=>{!p&&u.length!==W.current&&(D(R(u)),W.current=u.length)},[u,p,R]);const T=p?U:V,G=r.useCallback((e,n,a,S=0,I=0)=>{if(n===0&&a===0&&!I&&!S)return;let f=!1;const v=T.map(F=>({...F})),s=v[e],H=v.find(F=>F.order===s.order+n);H&&H!==s&&(s.order+=n,H.order+=-n,f=!0);const L=s.col+a;a!==0&&L>=1&&L+s.colSpan<=l+1&&(s.col=L,f=!0);const x=s.colSpan+I;I&&x>=1&&x+s.col<=l+1&&(s.colSpan=x,f=!0);const _=s.rowSpan+S;S&&_>=1&&(s.rowSpan=_,f=!0),f&&(p||D(v),P&&O.dispatchEvent(P,{},b.current,{value:v}))},[T,l,p,P,b]),E=r.useMemo(()=>i?`${typeof i.rows=="number"?i.rows+"px":i.rows} ${typeof i.columns=="number"?i.columns+"px":i.columns}`:16,[i]),J=r.useMemo(()=>({gridTemplateColumns:`repeat(${l}, minmax(0px, ${typeof g=="number"?g+"px":g}))`,gridAutoRows:`minmax(0px, ${typeof h=="number"?h+"px":h})`,gap:E,padding:E,...j}),[l,g,h,E,j]);return o.createElement("div",{ref:k,dir:z,className:O.classNames("k-tilelayout k-pos-relative",Y[q],m),style:J,id:N,role:"list"},u.map((e,n)=>{let a;return typeof e.header=="string"?a=e.header:a=`tilelayout-${N?`${N}-`:""}${n}`,o.createElement(o.Fragment,{key:C?O.getter(C)(e):n},o.createElement(Q.InternalTile,{update:G,defaultPosition:T[n],index:n,resizable:e.resizable,reorderable:e.reorderable,style:e.style,header:e.header,className:e.className,hintClassName:e.hintClassName,hintStyle:e.hintStyle,ignoreDrag:A,onPress:()=>M(!0),onRelease:()=>M(!1)},e.item?e.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(e.header)?e.header:o.createElement("div",{id:a,className:"k-card-title"},e.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},e.body))))}),!B&&o.createElement("div",{className:"k-layout-item-hint",style:{display:"none",zIndex:"1",height:"auto"}}))});$.displayName="KendoTileLayout";$.propTypes={id:t.string,style:t.object,className:t.string,dir:t.string,gap:t.object,columns:t.number,columnWidth:t.oneOfType([t.number,t.string]),rowHeight:t.oneOfType([t.number,t.string]),dataItemKey:t.string,items:t.array,positions:t.array,autoFlow:t.oneOf(["column","row","column dense","row dense","unset"]),onReposition:t.func,ignoreDrag:t.func};exports.TileLayout=$;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),t=require("prop-types"),P=require("@progress/kendo-react-common"),Q=require("./InternalTile.js");function X(c){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const m in c)if(m!=="default"){const l=Object.getOwnPropertyDescriptor(c,m);Object.defineProperty(d,m,l.get?l:{enumerable:!0,get:()=>c[m]})}}return d.default=c,Object.freeze(d)}const o=X(n),Y={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:void 0},y={columns:3,columnWidth:"1fr",rowHeight:"1fr",autoFlow:"column",items:[]},$=o.forwardRef((c,d)=>{const{className:m,columns:l=y.columns,columnWidth:g=y.columnWidth,gap:i,rowHeight:h=y.rowHeight,style:j,autoFlow:q=y.autoFlow,items:u=y.items,positions:b,onReposition:N,dataItemKey:C,id:R,dir:z,ignoreDrag:A}=c,K=n.useCallback(()=>{v.current&&v.current.focus()},[]),w=n.useRef(null),v=n.useRef(null);o.useImperativeHandle(w,()=>({element:v.current,focus:K})),o.useImperativeHandle(d,()=>w.current);const p=b!==void 0,T=n.useCallback(e=>e.map((r,a)=>({order:a,rowSpan:1,colSpan:1,...r.defaultPosition})),[]),U=n.useMemo(()=>{if(b)return b.map((e,r)=>({order:r,rowSpan:1,colSpan:1,...e}))},[b]),[V,D]=n.useState(()=>T(u)),[B,M]=n.useState(!1),W=n.useRef(u.length);n.useEffect(()=>{!p&&u.length!==W.current&&(D(T(u)),W.current=u.length)},[u,p,T]);const E=p?U:V,G=n.useCallback((e,r,a,S=0,H=0)=>{if(r===0&&a===0&&!H&&!S)return;let f=!1;const k=E.map(O=>({...O})),s=k[e],L=k.find(O=>O.order===s.order+r);L&&L!==s&&(s.order+=r,L.order+=-r,f=!0);const x=s.col+a;a!==0&&x>=1&&x+s.colSpan<=l+1&&(s.col=x,f=!0);const F=s.colSpan+H;H&&F>=1&&F+s.col<=l+1&&(s.colSpan=F,f=!0);const _=s.rowSpan+S;S&&_>=1&&(s.rowSpan=_,f=!0),f&&(p||D(k),N&&P.dispatchEvent(N,{},w.current,{value:k}))},[E,l,p,N,w]),I=n.useMemo(()=>i?`${typeof i.rows=="number"?i.rows+"px":i.rows} ${typeof i.columns=="number"?i.columns+"px":i.columns}`:16,[i]),J=n.useMemo(()=>({gridTemplateColumns:`repeat(${l}, minmax(0px, ${typeof g=="number"?g+"px":g}))`,gridAutoRows:`minmax(0px, ${typeof h=="number"?h+"px":h})`,gap:I,padding:I,...j}),[l,g,h,I,j]);return o.createElement("div",{ref:v,dir:z,className:P.classNames("k-tilelayout",Y[q],m),style:J,id:R,role:"list"},u.map((e,r)=>{let a;return typeof e.header=="string"?a=e.header:a=`tilelayout-${R?`${R}-`:""}${r}`,o.createElement(o.Fragment,{key:C?P.getter(C)(e):r},o.createElement(Q.InternalTile,{update:G,defaultPosition:E[r],index:r,resizable:e.resizable,reorderable:e.reorderable,style:e.style,header:e.header,className:e.className,hintClassName:e.hintClassName,hintStyle:e.hintStyle,ignoreDrag:A,onPress:()=>M(!0),onRelease:()=>M(!1)},e.item?e.item:o.createElement(o.Fragment,null,o.createElement("div",{className:P.classNames("k-tilelayout-item-header k-card-header",{"k-cursor-move":e.reorderable!==!1})},o.isValidElement(e.header)?e.header:o.createElement("div",{id:a,className:"k-card-title"},e.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},e.body))))}),!B&&o.createElement("div",{className:"k-layout-item-hint",style:{display:"none",zIndex:"1",height:"auto"}}))});$.displayName="KendoTileLayout";$.propTypes={id:t.string,style:t.object,className:t.string,dir:t.string,gap:t.object,columns:t.number,columnWidth:t.oneOfType([t.number,t.string]),rowHeight:t.oneOfType([t.number,t.string]),dataItemKey:t.string,items:t.array,positions:t.array,autoFlow:t.oneOf(["column","row","column dense","row dense","unset"]),onReposition:t.func,ignoreDrag:t.func};exports.TileLayout=$;
@@ -5,76 +5,76 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as o from "react";
9
- import { useCallback as R, useRef as T, useMemo as F, useState as z, useEffect as Y } from "react";
10
- import t from "prop-types";
11
- import { dispatchEvent as Z, classNames as ee, getter as te } from "@progress/kendo-react-common";
12
- import { InternalTile as oe } from "./InternalTile.mjs";
8
+ import * as t from "react";
9
+ import { useCallback as R, useRef as T, useMemo as F, useState as z, useEffect as Z } from "react";
10
+ import o from "prop-types";
11
+ import { dispatchEvent as ee, classNames as K, getter as oe } from "@progress/kendo-react-common";
12
+ import { InternalTile as te } from "./InternalTile.mjs";
13
13
  const re = {
14
14
  column: "k-grid-flow-col",
15
15
  row: "k-grid-flow-row",
16
16
  "column dense": "k-grid-flow-col-dense",
17
17
  "row dense": "k-grid-flow-row-dense",
18
- unset: "k-grid-flow-unset"
19
- }, m = {
18
+ unset: void 0
19
+ }, u = {
20
20
  columns: 3,
21
21
  columnWidth: "1fr",
22
22
  rowHeight: "1fr",
23
23
  autoFlow: "column",
24
24
  items: []
25
- }, K = o.forwardRef((U, j) => {
25
+ }, U = t.forwardRef((j, O) => {
26
26
  const {
27
- className: O,
28
- columns: i = m.columns,
29
- columnWidth: d = m.columnWidth,
27
+ className: V,
28
+ columns: i = u.columns,
29
+ columnWidth: d = u.columnWidth,
30
30
  gap: a,
31
- rowHeight: p = m.rowHeight,
31
+ rowHeight: p = u.rowHeight,
32
32
  style: L,
33
- autoFlow: V = m.autoFlow,
34
- items: l = m.items,
33
+ autoFlow: _ = u.autoFlow,
34
+ items: l = u.items,
35
35
  positions: f,
36
36
  onReposition: b,
37
37
  dataItemKey: $,
38
38
  id: v,
39
- dir: _,
40
- ignoreDrag: M
41
- } = U, q = R(() => {
39
+ dir: M,
40
+ ignoreDrag: q
41
+ } = j, B = R(() => {
42
42
  g.current && g.current.focus();
43
43
  }, []), y = T(null), g = T(null);
44
- o.useImperativeHandle(
44
+ t.useImperativeHandle(
45
45
  y,
46
46
  () => ({
47
47
  element: g.current,
48
- focus: q
48
+ focus: B
49
49
  })
50
- ), o.useImperativeHandle(j, () => y.current);
51
- const c = f !== void 0, k = R((e) => e.map((r, s) => ({ order: s, rowSpan: 1, colSpan: 1, ...r.defaultPosition })), []), B = F(() => {
50
+ ), t.useImperativeHandle(O, () => y.current);
51
+ const c = f !== void 0, k = R((e) => e.map((r, s) => ({ order: s, rowSpan: 1, colSpan: 1, ...r.defaultPosition })), []), G = F(() => {
52
52
  if (f)
53
53
  return f.map(
54
54
  (e, r) => ({ order: r, rowSpan: 1, colSpan: 1, ...e })
55
55
  );
56
- }, [f]), [G, W] = z(
56
+ }, [f]), [J, W] = z(
57
57
  () => k(l)
58
- ), [J, A] = z(!1), C = T(l.length);
59
- Y(() => {
58
+ ), [Q, A] = z(!1), C = T(l.length);
59
+ Z(() => {
60
60
  !c && l.length !== C.current && (W(k(l)), C.current = l.length);
61
61
  }, [l, c, k]);
62
- const S = c ? B : G, Q = R(
62
+ const S = c ? G : J, X = R(
63
63
  (e, r, s, h = 0, P = 0) => {
64
64
  if (r === 0 && s === 0 && !P && !h)
65
65
  return;
66
- let u = !1;
66
+ let m = !1;
67
67
  const w = S.map((I) => ({ ...I })), n = w[e], E = w.find((I) => I.order === n.order + r);
68
- E && E !== n && (n.order += r, E.order += -r, u = !0);
68
+ E && E !== n && (n.order += r, E.order += -r, m = !0);
69
69
  const x = n.col + s;
70
- s !== 0 && x >= 1 && x + n.colSpan <= i + 1 && (n.col = x, u = !0);
70
+ s !== 0 && x >= 1 && x + n.colSpan <= i + 1 && (n.col = x, m = !0);
71
71
  const H = n.colSpan + P;
72
- P && H >= 1 && H + n.col <= i + 1 && (n.colSpan = H, u = !0);
72
+ P && H >= 1 && H + n.col <= i + 1 && (n.colSpan = H, m = !0);
73
73
  const D = n.rowSpan + h;
74
- h && D >= 1 && (n.rowSpan = D, u = !0), u && (c || W(w), b && Z(b, {}, y.current, { value: w }));
74
+ h && D >= 1 && (n.rowSpan = D, m = !0), m && (c || W(w), b && ee(b, {}, y.current, { value: w }));
75
75
  },
76
76
  [S, i, c, b, y]
77
- ), N = F(() => a ? `${typeof a.rows == "number" ? a.rows + "px" : a.rows} ${typeof a.columns == "number" ? a.columns + "px" : a.columns}` : 16, [a]), X = F(
77
+ ), N = F(() => a ? `${typeof a.rows == "number" ? a.rows + "px" : a.rows} ${typeof a.columns == "number" ? a.columns + "px" : a.columns}` : 16, [a]), Y = F(
78
78
  () => ({
79
79
  gridTemplateColumns: `repeat(${i}, minmax(0px, ${typeof d == "number" ? d + "px" : d}))`,
80
80
  gridAutoRows: `minmax(0px, ${typeof p == "number" ? p + "px" : p})`,
@@ -84,22 +84,22 @@ const re = {
84
84
  }),
85
85
  [i, d, p, N, L]
86
86
  );
87
- return /* @__PURE__ */ o.createElement(
87
+ return /* @__PURE__ */ t.createElement(
88
88
  "div",
89
89
  {
90
90
  ref: g,
91
- dir: _,
92
- className: ee("k-tilelayout k-pos-relative", re[V], O),
93
- style: X,
91
+ dir: M,
92
+ className: K("k-tilelayout", re[_], V),
93
+ style: Y,
94
94
  id: v,
95
95
  role: "list"
96
96
  },
97
97
  l.map((e, r) => {
98
98
  let s;
99
- return typeof e.header == "string" ? s = e.header : s = `tilelayout-${v ? `${v}-` : ""}${r}`, /* @__PURE__ */ o.createElement(o.Fragment, { key: $ ? te($)(e) : r }, /* @__PURE__ */ o.createElement(
100
- oe,
99
+ return typeof e.header == "string" ? s = e.header : s = `tilelayout-${v ? `${v}-` : ""}${r}`, /* @__PURE__ */ t.createElement(t.Fragment, { key: $ ? oe($)(e) : r }, /* @__PURE__ */ t.createElement(
100
+ te,
101
101
  {
102
- update: Q,
102
+ update: X,
103
103
  defaultPosition: S[r],
104
104
  index: r,
105
105
  resizable: e.resizable,
@@ -109,33 +109,33 @@ const re = {
109
109
  className: e.className,
110
110
  hintClassName: e.hintClassName,
111
111
  hintStyle: e.hintStyle,
112
- ignoreDrag: M,
112
+ ignoreDrag: q,
113
113
  onPress: () => A(!0),
114
114
  onRelease: () => A(!1)
115
115
  },
116
- e.item ? e.item : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", { className: "k-tilelayout-item-header k-card-header" }, o.isValidElement(e.header) ? e.header : /* @__PURE__ */ o.createElement("div", { id: s, className: "k-card-title" }, e.header)), /* @__PURE__ */ o.createElement("div", { className: "k-tilelayout-item-body k-card-body" }, e.body))
116
+ e.item ? e.item : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: K("k-tilelayout-item-header k-card-header", { "k-cursor-move": e.reorderable !== !1 }) }, t.isValidElement(e.header) ? e.header : /* @__PURE__ */ t.createElement("div", { id: s, className: "k-card-title" }, e.header)), /* @__PURE__ */ t.createElement("div", { className: "k-tilelayout-item-body k-card-body" }, e.body))
117
117
  ));
118
118
  }),
119
- !J && /* @__PURE__ */ o.createElement("div", { className: "k-layout-item-hint", style: { display: "none", zIndex: "1", height: "auto" } })
119
+ !Q && /* @__PURE__ */ t.createElement("div", { className: "k-layout-item-hint", style: { display: "none", zIndex: "1", height: "auto" } })
120
120
  );
121
121
  });
122
- K.displayName = "KendoTileLayout";
123
- K.propTypes = {
124
- id: t.string,
125
- style: t.object,
126
- className: t.string,
127
- dir: t.string,
128
- gap: t.object,
129
- columns: t.number,
130
- columnWidth: t.oneOfType([t.number, t.string]),
131
- rowHeight: t.oneOfType([t.number, t.string]),
132
- dataItemKey: t.string,
133
- items: t.array,
134
- positions: t.array,
135
- autoFlow: t.oneOf(["column", "row", "column dense", "row dense", "unset"]),
136
- onReposition: t.func,
137
- ignoreDrag: t.func
122
+ U.displayName = "KendoTileLayout";
123
+ U.propTypes = {
124
+ id: o.string,
125
+ style: o.object,
126
+ className: o.string,
127
+ dir: o.string,
128
+ gap: o.object,
129
+ columns: o.number,
130
+ columnWidth: o.oneOfType([o.number, o.string]),
131
+ rowHeight: o.oneOfType([o.number, o.string]),
132
+ dataItemKey: o.string,
133
+ items: o.array,
134
+ positions: o.array,
135
+ autoFlow: o.oneOf(["column", "row", "column dense", "row dense", "unset"]),
136
+ onReposition: o.func,
137
+ ignoreDrag: o.func
138
138
  };
139
139
  export {
140
- K as TileLayout
140
+ U as TileLayout
141
141
  };
@@ -13,11 +13,13 @@ import * as React from 'react';
13
13
  interface TimelineCardProps {
14
14
  tabindex?: number;
15
15
  id?: string;
16
+ panelId?: string;
16
17
  eventData: TimelineEventProps;
17
18
  alternated?: boolean;
18
19
  horizontal?: boolean;
19
20
  collapsible?: boolean;
20
21
  navigatable?: boolean;
22
+ ariaLabel?: string;
21
23
  calloutStyle?: React.CSSProperties;
22
24
  transitionDuration?: number;
23
25
  onChange?: (event: EventDataProps) => void;
@@ -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 N=require("react"),k=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),O=require("../card/CardBody.js"),T=require("../card/CardImage.js"),h=require("../card/CardActions.js"),v=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function x(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return i.default=e,Object.freeze(i)}const t=x(N),E=e=>{const{title:l,subtitle:c,actions:r,images:o,description:C}=e.eventData,[d,b]=t.useState(e.eventData.opened||!1),[s,u]=t.useState(e.eventData.opened||!!e.collapsible),f=a=>{if(b(!d),e.onChange){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,n)}},g=a=>{if(e.onActionClick){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,n)}},m=()=>t.createElement(t.Fragment,null,t.createElement(O.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,C),o&&o.map((a,n)=>t.createElement(T.CardImage,{key:n,src:a.src})))),r&&t.createElement(h.CardActions,null,r.map((a,n)=>t.createElement("a",{key:n,href:a.url,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},a.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:v.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&s})},t.createElement(y.Card,{"aria-live":"polite","aria-describedby":e.id,"aria-atomic":"true",tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible&&s,className:"k-card-with-callout",onClick:a=>f(a)},t.createElement("span",{style:e.calloutStyle,className:v.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",size:"xs",svgIcon:R.chevronRightIcon})),c&&t.createElement(I.CardSubtitle,null,c)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>u(!1),onAfterExited:()=>u(!0)},d?m():null):m())))};E.propTypes={onChange:k.func,onActionClick:k.func};exports.TimelineCard=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),v=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),h=require("../card/CardBody.js"),O=require("../card/CardImage.js"),T=require("../card/CardActions.js"),k=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function x(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return i.default=e,Object.freeze(i)}const t=x(N),E=e=>{const{title:l,subtitle:c,actions:r,images:o,description:b}=e.eventData,[d,C]=t.useState(e.eventData.opened||!1),[s,u]=t.useState(e.eventData.opened||!!e.collapsible),f=a=>{if(C(!d),e.onChange){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,n)}},g=a=>{if(e.onActionClick){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,n)}},m=()=>t.createElement(t.Fragment,null,t.createElement(h.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,b),o&&o.map((a,n)=>t.createElement(O.CardImage,{key:n,src:a.src})))),r&&t.createElement(T.CardActions,null,r.map((a,n)=>t.createElement("a",{key:n,href:a.url,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},a.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:k.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&s})},t.createElement(y.Card,{id:e.panelId,"aria-label":e.ariaLabel,"aria-live":e.horizontal?void 0:"polite","aria-describedby":e.id,tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible?s:void 0,className:"k-card-with-callout",onClick:a=>f(a)},t.createElement("span",{style:e.calloutStyle,className:k.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",size:"xs",svgIcon:R.chevronRightIcon})),c&&t.createElement(I.CardSubtitle,null,c)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>u(!1),onAfterExited:()=>u(!0)},d?m():null):m())))};E.propTypes={onChange:v.func,onActionClick:v.func};exports.TimelineCard=E;