@progress/kendo-react-layout 7.2.4-develop.2 → 7.2.4-develop.4

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 (288) hide show
  1. package/actionsheet/ActionSheet.js +8 -0
  2. package/actionsheet/ActionSheet.mjs +184 -0
  3. package/actionsheet/ActionSheetContent.js +8 -0
  4. package/actionsheet/ActionSheetContent.mjs +32 -0
  5. package/actionsheet/ActionSheetFooter.js +8 -0
  6. package/actionsheet/ActionSheetFooter.mjs +32 -0
  7. package/actionsheet/ActionSheetHeader.js +8 -0
  8. package/actionsheet/ActionSheetHeader.mjs +32 -0
  9. package/actionsheet/ActionSheetItem.js +8 -0
  10. package/actionsheet/ActionSheetItem.mjs +52 -0
  11. package/appbar/AppBar.js +8 -0
  12. package/appbar/AppBar.mjs +86 -0
  13. package/appbar/AppBarSection.js +8 -0
  14. package/appbar/AppBarSection.mjs +47 -0
  15. package/appbar/AppBarSpacer.js +8 -0
  16. package/appbar/AppBarSpacer.mjs +55 -0
  17. package/bottomnavigation/BottomNavigation.js +8 -0
  18. package/bottomnavigation/BottomNavigation.mjs +160 -0
  19. package/bottomnavigation/BottomNavigationItem.js +8 -0
  20. package/bottomnavigation/BottomNavigationItem.mjs +93 -0
  21. package/bottomnavigation/models/utils.js +8 -0
  22. package/bottomnavigation/models/utils.mjs +19 -0
  23. package/breadcrumb/Breadcrumb.js +8 -0
  24. package/breadcrumb/Breadcrumb.mjs +158 -0
  25. package/breadcrumb/BreadcrumbDelimiter.js +8 -0
  26. package/breadcrumb/BreadcrumbDelimiter.mjs +48 -0
  27. package/breadcrumb/BreadcrumbLink.js +8 -0
  28. package/breadcrumb/BreadcrumbLink.mjs +82 -0
  29. package/breadcrumb/BreadcrumbListItem.js +8 -0
  30. package/breadcrumb/BreadcrumbListItem.mjs +52 -0
  31. package/breadcrumb/BreadcrumbOrderedList.js +8 -0
  32. package/breadcrumb/BreadcrumbOrderedList.mjs +67 -0
  33. package/card/Avatar.js +8 -0
  34. package/card/Avatar.mjs +53 -0
  35. package/card/Card.js +8 -0
  36. package/card/Card.mjs +52 -0
  37. package/card/CardActions.js +8 -0
  38. package/card/CardActions.mjs +40 -0
  39. package/card/CardBody.js +8 -0
  40. package/card/CardBody.mjs +28 -0
  41. package/card/CardFooter.js +8 -0
  42. package/card/CardFooter.mjs +28 -0
  43. package/card/CardHeader.js +8 -0
  44. package/card/CardHeader.mjs +28 -0
  45. package/card/CardImage.js +8 -0
  46. package/card/CardImage.mjs +36 -0
  47. package/card/CardSubtitle.js +8 -0
  48. package/card/CardSubtitle.mjs +28 -0
  49. package/card/CardTitle.js +8 -0
  50. package/card/CardTitle.mjs +28 -0
  51. package/card/interfaces/Enums.js +8 -0
  52. package/card/interfaces/Enums.mjs +15 -0
  53. package/contextmenu/ContextMenu.js +8 -0
  54. package/contextmenu/ContextMenu.mjs +48 -0
  55. package/dist/cdn/js/kendo-react-layout.js +8 -5
  56. package/drawer/Drawer.js +8 -0
  57. package/drawer/Drawer.mjs +130 -0
  58. package/drawer/DrawerContent.js +8 -0
  59. package/drawer/DrawerContent.mjs +33 -0
  60. package/drawer/DrawerItem.js +8 -0
  61. package/drawer/DrawerItem.mjs +89 -0
  62. package/drawer/DrawerNavigation.js +8 -0
  63. package/drawer/DrawerNavigation.mjs +132 -0
  64. package/drawer/context/DrawerContext.js +8 -0
  65. package/drawer/context/DrawerContext.mjs +22 -0
  66. package/expansionpanel/ExpansionPanel.js +8 -0
  67. package/expansionpanel/ExpansionPanel.mjs +116 -0
  68. package/expansionpanel/ExpansionPanelContent.js +8 -0
  69. package/expansionpanel/ExpansionPanelContent.mjs +23 -0
  70. package/gridlayout/GridLayout.js +8 -0
  71. package/gridlayout/GridLayout.mjs +83 -0
  72. package/gridlayout/GridLayoutItem.js +8 -0
  73. package/gridlayout/GridLayoutItem.mjs +46 -0
  74. package/index.d.mts +4593 -5
  75. package/index.d.ts +4593 -103
  76. package/index.js +8 -5
  77. package/index.mjs +139 -5037
  78. package/menu/components/Menu.js +8 -0
  79. package/menu/components/Menu.mjs +193 -0
  80. package/menu/components/MenuItem.js +8 -0
  81. package/menu/components/MenuItem.mjs +34 -0
  82. package/menu/components/MenuItemArrow.js +8 -0
  83. package/menu/components/MenuItemArrow.mjs +49 -0
  84. package/menu/components/MenuItemInternal.js +8 -0
  85. package/menu/components/MenuItemInternal.mjs +222 -0
  86. package/menu/components/MenuItemLink.js +8 -0
  87. package/menu/components/MenuItemLink.mjs +54 -0
  88. package/menu/consts.js +8 -0
  89. package/menu/consts.mjs +59 -0
  90. package/menu/utils/DirectionHolder.js +8 -0
  91. package/menu/utils/DirectionHolder.mjs +25 -0
  92. package/menu/utils/MouseOverHandler.js +8 -0
  93. package/menu/utils/MouseOverHandler.mjs +34 -0
  94. package/menu/utils/getNewItemIdUponKeyboardNavigation.js +8 -0
  95. package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +124 -0
  96. package/menu/utils/hoverDelay.js +8 -0
  97. package/menu/utils/hoverDelay.mjs +18 -0
  98. package/menu/utils/itemsIdsUtils.js +8 -0
  99. package/menu/utils/itemsIdsUtils.mjs +81 -0
  100. package/menu/utils/misc.js +8 -0
  101. package/menu/utils/misc.mjs +29 -0
  102. package/menu/utils/prepareInputItemsForInternalWork.js +8 -0
  103. package/menu/utils/prepareInputItemsForInternalWork.mjs +59 -0
  104. package/package-metadata.js +8 -0
  105. package/package-metadata.mjs +19 -0
  106. package/package.json +6 -6
  107. package/panelbar/PanelBar.js +8 -0
  108. package/panelbar/PanelBar.mjs +195 -0
  109. package/panelbar/PanelBarItem.js +8 -0
  110. package/panelbar/PanelBarItem.mjs +148 -0
  111. package/panelbar/interfaces/NavigationAction.js +8 -0
  112. package/panelbar/interfaces/NavigationAction.mjs +12 -0
  113. package/panelbar/util.js +8 -0
  114. package/panelbar/util.mjs +122 -0
  115. package/splitter/Splitter.js +8 -0
  116. package/splitter/Splitter.mjs +238 -0
  117. package/splitter/SplitterBar.js +8 -0
  118. package/splitter/SplitterBar.mjs +129 -0
  119. package/splitter/SplitterPane.js +8 -0
  120. package/splitter/SplitterPane.mjs +50 -0
  121. package/splitter/messages/index.js +8 -0
  122. package/splitter/messages/index.mjs +15 -0
  123. package/stacklayout/StackLayout.js +8 -0
  124. package/stacklayout/StackLayout.mjs +84 -0
  125. package/stepper/Step.js +8 -0
  126. package/stepper/Step.mjs +177 -0
  127. package/stepper/Stepper.js +8 -0
  128. package/stepper/Stepper.mjs +252 -0
  129. package/stepper/contants.js +8 -0
  130. package/stepper/contants.mjs +13 -0
  131. package/stepper/context/StepperContext.js +8 -0
  132. package/stepper/context/StepperContext.mjs +17 -0
  133. package/stepper/messages/index.js +8 -0
  134. package/stepper/messages/index.mjs +17 -0
  135. package/tabstrip/TabStrip.js +8 -0
  136. package/tabstrip/TabStrip.mjs +163 -0
  137. package/tabstrip/TabStripContent.js +8 -0
  138. package/tabstrip/TabStripContent.mjs +81 -0
  139. package/tabstrip/TabStripNavigation.js +8 -0
  140. package/tabstrip/TabStripNavigation.mjs +171 -0
  141. package/tabstrip/TabStripNavigationItem.js +8 -0
  142. package/tabstrip/TabStripNavigationItem.mjs +55 -0
  143. package/tabstrip/TabStripTab.js +8 -0
  144. package/tabstrip/TabStripTab.mjs +35 -0
  145. package/tilelayout/InternalTile.js +8 -0
  146. package/tilelayout/InternalTile.mjs +203 -0
  147. package/tilelayout/ResizeHandlers.js +8 -0
  148. package/tilelayout/ResizeHandlers.mjs +53 -0
  149. package/tilelayout/TileLayout.js +8 -0
  150. package/tilelayout/TileLayout.mjs +122 -0
  151. package/timeline/Timeline.js +8 -0
  152. package/timeline/Timeline.mjs +79 -0
  153. package/timeline/TimelineCard.js +8 -0
  154. package/timeline/TimelineCard.mjs +109 -0
  155. package/timeline/TimelineHorizontal.js +8 -0
  156. package/timeline/TimelineHorizontal.mjs +239 -0
  157. package/timeline/TimelineVertical.js +8 -0
  158. package/timeline/TimelineVertical.mjs +78 -0
  159. package/timeline/utils.js +8 -0
  160. package/timeline/utils.mjs +16 -0
  161. package/actionsheet/ActionSheet.d.ts +0 -138
  162. package/actionsheet/ActionSheetContent.d.ts +0 -14
  163. package/actionsheet/ActionSheetFooter.d.ts +0 -14
  164. package/actionsheet/ActionSheetHeader.d.ts +0 -14
  165. package/actionsheet/ActionSheetItem.d.ts +0 -10
  166. package/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +0 -17
  167. package/actionsheet/interfaces/ActionSheetItemProps.d.ts +0 -70
  168. package/appbar/AppBar.d.ts +0 -54
  169. package/appbar/AppBarSection.d.ts +0 -53
  170. package/appbar/AppBarSpacer.d.ts +0 -54
  171. package/appbar/interfaces/AppBarProps.d.ts +0 -83
  172. package/appbar/interfaces/AppBarSectionProps.d.ts +0 -22
  173. package/appbar/interfaces/AppBarSpacerProps.d.ts +0 -23
  174. package/bottomnavigation/BottomNavigation.d.ts +0 -42
  175. package/bottomnavigation/BottomNavigationItem.d.ts +0 -16
  176. package/bottomnavigation/BottomNavigationItemProps.d.ts +0 -64
  177. package/bottomnavigation/BottomNavigationProps.d.ts +0 -157
  178. package/bottomnavigation/models/events.d.ts +0 -24
  179. package/bottomnavigation/models/utils.d.ts +0 -40
  180. package/breadcrumb/Breadcrumb.d.ts +0 -163
  181. package/breadcrumb/BreadcrumbDelimiter.d.ts +0 -47
  182. package/breadcrumb/BreadcrumbLink.d.ts +0 -135
  183. package/breadcrumb/BreadcrumbListItem.d.ts +0 -55
  184. package/breadcrumb/BreadcrumbOrderedList.d.ts +0 -59
  185. package/card/Avatar.d.ts +0 -7
  186. package/card/Card.d.ts +0 -8
  187. package/card/CardActions.d.ts +0 -7
  188. package/card/CardBody.d.ts +0 -7
  189. package/card/CardFooter.d.ts +0 -7
  190. package/card/CardHeader.d.ts +0 -7
  191. package/card/CardImage.d.ts +0 -7
  192. package/card/CardSubtitle.d.ts +0 -7
  193. package/card/CardTitle.d.ts +0 -7
  194. package/card/interfaces/AvatarProps.d.ts +0 -88
  195. package/card/interfaces/CardActionsProps.d.ts +0 -38
  196. package/card/interfaces/CardBodyProps.d.ts +0 -18
  197. package/card/interfaces/CardFooterProps.d.ts +0 -18
  198. package/card/interfaces/CardHandle.d.ts +0 -18
  199. package/card/interfaces/CardHeaderProps.d.ts +0 -18
  200. package/card/interfaces/CardImageProps.d.ts +0 -22
  201. package/card/interfaces/CardProps.d.ts +0 -48
  202. package/card/interfaces/CardSubtitleProps.d.ts +0 -18
  203. package/card/interfaces/CardTitleProps.d.ts +0 -18
  204. package/card/interfaces/Enums.d.ts +0 -27
  205. package/contextmenu/ContextMenu.d.ts +0 -31
  206. package/drawer/Drawer.d.ts +0 -44
  207. package/drawer/DrawerContent.d.ts +0 -43
  208. package/drawer/DrawerItem.d.ts +0 -36
  209. package/drawer/DrawerNavigation.d.ts +0 -47
  210. package/drawer/context/DrawerContext.d.ts +0 -24
  211. package/drawer/interfaces/DrawerAnimation.d.ts +0 -18
  212. package/drawer/interfaces/DrawerContentProps.d.ts +0 -21
  213. package/drawer/interfaces/DrawerItemHandle.d.ts +0 -21
  214. package/drawer/interfaces/DrawerItemProps.d.ts +0 -64
  215. package/drawer/interfaces/DrawerNavigationProps.d.ts +0 -21
  216. package/drawer/interfaces/DrawerProps.d.ts +0 -86
  217. package/drawer/interfaces/DrawerSelectEvent.d.ts +0 -19
  218. package/expansionpanel/ExpansionPanel.d.ts +0 -10
  219. package/expansionpanel/ExpansionPanelContent.d.ts +0 -9
  220. package/expansionpanel/index.d.ts +0 -7
  221. package/expansionpanel/interfaces.d.ts +0 -92
  222. package/gridlayout/GridLayout.d.ts +0 -43
  223. package/gridlayout/GridLayoutItem.d.ts +0 -42
  224. package/gridlayout/interfaces/GridLayoutColumnProps.d.ts +0 -13
  225. package/gridlayout/interfaces/GridLayoutItemProps.d.ts +0 -44
  226. package/gridlayout/interfaces/GridLayoutProps.d.ts +0 -99
  227. package/gridlayout/interfaces/GridLayoutRowProps.d.ts +0 -13
  228. package/menu/BaseMenuItemInternalProps.d.ts +0 -24
  229. package/menu/MenuProps.d.ts +0 -75
  230. package/menu/components/Menu.d.ts +0 -118
  231. package/menu/components/MenuItem.d.ts +0 -33
  232. package/menu/components/MenuItemArrow.d.ts +0 -50
  233. package/menu/components/MenuItemInternal.d.ts +0 -63
  234. package/menu/components/MenuItemLink.d.ts +0 -34
  235. package/menu/consts.d.ts +0 -58
  236. package/menu/events.d.ts +0 -20
  237. package/menu/models/BaseMenuItem.d.ts +0 -58
  238. package/menu/models/MenuItemModel.d.ts +0 -23
  239. package/menu/utils/DirectionHolder.d.ts +0 -15
  240. package/menu/utils/MouseOverHandler.d.ts +0 -21
  241. package/menu/utils/getNewItemIdUponKeyboardNavigation.d.ts +0 -11
  242. package/menu/utils/hoverDelay.d.ts +0 -13
  243. package/menu/utils/itemsIdsUtils.d.ts +0 -68
  244. package/menu/utils/misc.d.ts +0 -20
  245. package/menu/utils/prepareInputItemsForInternalWork.d.ts +0 -10
  246. package/package-metadata.d.ts +0 -9
  247. package/panelbar/PanelBar.d.ts +0 -81
  248. package/panelbar/PanelBarItem.d.ts +0 -52
  249. package/panelbar/interfaces/NavigationAction.d.ts +0 -12
  250. package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +0 -12
  251. package/panelbar/interfaces/PanelBarItemProps.d.ts +0 -98
  252. package/panelbar/interfaces/PanelBarProps.d.ts +0 -66
  253. package/panelbar/interfaces/PanelBarSelectEventArguments.d.ts +0 -18
  254. package/panelbar/interfaces/RenderPanelBarItem.d.ts +0 -19
  255. package/panelbar/util.d.ts +0 -56
  256. package/splitter/Splitter.d.ts +0 -136
  257. package/splitter/SplitterBar.d.ts +0 -44
  258. package/splitter/SplitterPane.d.ts +0 -57
  259. package/splitter/messages/index.d.ts +0 -14
  260. package/stacklayout/StackLayout.d.ts +0 -41
  261. package/stacklayout/StackLayoutProps.d.ts +0 -92
  262. package/stepper/Step.d.ts +0 -27
  263. package/stepper/Stepper.d.ts +0 -27
  264. package/stepper/contants.d.ts +0 -12
  265. package/stepper/context/StepperContext.d.ts +0 -27
  266. package/stepper/interfaces/StepChangeEvent.d.ts +0 -15
  267. package/stepper/interfaces/StepFocusEvent.d.ts +0 -11
  268. package/stepper/interfaces/StepHandle.d.ts +0 -17
  269. package/stepper/interfaces/StepProps.d.ts +0 -83
  270. package/stepper/interfaces/StepperChangeEvent.d.ts +0 -15
  271. package/stepper/interfaces/StepperFocusEvent.d.ts +0 -11
  272. package/stepper/interfaces/StepperHandle.d.ts +0 -17
  273. package/stepper/interfaces/StepperProps.d.ts +0 -98
  274. package/stepper/messages/index.d.ts +0 -19
  275. package/tabstrip/TabStrip.d.ts +0 -158
  276. package/tabstrip/TabStripContent.d.ts +0 -62
  277. package/tabstrip/TabStripNavigation.d.ts +0 -110
  278. package/tabstrip/TabStripNavigationItem.d.ts +0 -75
  279. package/tabstrip/TabStripTab.d.ts +0 -42
  280. package/tilelayout/InternalTile.d.ts +0 -94
  281. package/tilelayout/ResizeHandlers.d.ts +0 -24
  282. package/tilelayout/TileLayout.d.ts +0 -153
  283. package/tilelayout/interfaces/index.d.ts +0 -145
  284. package/timeline/Timeline.d.ts +0 -102
  285. package/timeline/TimelineCard.d.ts +0 -38
  286. package/timeline/TimelineHorizontal.d.ts +0 -7
  287. package/timeline/TimelineVertical.d.ts +0 -16
  288. package/timeline/utils.d.ts +0 -19
@@ -0,0 +1,239 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as n from "react";
10
+ import ft from "prop-types";
11
+ import { TimelineCard as ut } from "./TimelineCard.mjs";
12
+ import { addYearsFlags as mt } from "./utils.mjs";
13
+ import { caretAltLeftIcon as dt, caretAltRightIcon as kt } from "@progress/kendo-svg-icons";
14
+ import { useInternationalization as bt } from "@progress/kendo-react-intl";
15
+ import { Navigation as Et, canUseDOM as Tt, classNames as _, SvgIcon as z } from "@progress/kendo-react-common";
16
+ const vt = (v) => {
17
+ const M = bt(), [y, j] = n.useState(!1), [R, K] = n.useState(!0), [X, Y] = n.useState(), [f, S] = n.useState(0), [g, q] = n.useState(), [l, B] = n.useState(0), [d, G] = n.useState(0), [a, O] = n.useState(1), [u, w] = n.useState(), [c, J] = n.useState(), [N, L] = n.useState([0, 0, 0]), [I, W] = n.useState(0), [Q, Z] = n.useState(1), m = n.useRef(null), i = n.useRef(null), D = n.useRef(null), { eventsData: tt, dateFormat: et, navigatable: nt, onActionClick: st } = v, U = g ? `${g}%` : "150px", k = n.useRef(new Et({
18
+ tabIndex: 0,
19
+ root: m,
20
+ selectors: [".k-timeline-scrollable-wrap"]
21
+ }));
22
+ n.useEffect(() => {
23
+ m.current && v.navigatable && (setTimeout(() => {
24
+ const t = k.current.first;
25
+ t && t.setAttribute("tabindex", String(0));
26
+ }, 0), k.current.keyboardEvents = {
27
+ keydown: {
28
+ ArrowRight: at,
29
+ ArrowLeft: ot,
30
+ End: ct,
31
+ Home: it
32
+ }
33
+ });
34
+ }, [v.navigatable, a, l]), n.useEffect(() => {
35
+ k.current.update();
36
+ });
37
+ const rt = (t) => {
38
+ nt && k.current && k.current.triggerKeyboardEvent(t);
39
+ };
40
+ n.useEffect(() => {
41
+ var r;
42
+ const t = Tt && window.ResizeObserver && new window.ResizeObserver(p), e = i.current, s = ((r = m == null ? void 0 : m.current) == null ? void 0 : r.offsetWidth) || 0;
43
+ return t && e && t.observe(e), x(), p(), L([s, 0, -s]), () => {
44
+ t && t.disconnect();
45
+ };
46
+ }, []), n.useEffect(() => {
47
+ const t = i.current, e = t && t.children[a];
48
+ if (e) {
49
+ const s = e.offsetWidth, r = !(f >= 0);
50
+ if (j(r), c) {
51
+ const o = c.length * s > l * s * ((f * -1 + 100) / 100);
52
+ K(o);
53
+ }
54
+ (t == null ? void 0 : t.offsetWidth) * -f / 100 >= t.children.length * s && (x(), p(), S((e.offsetLeft - e.offsetWidth) / (l * e.offsetWidth) * 100 * -1)), V(e);
55
+ }
56
+ }, [l, g, a]);
57
+ const at = (t, e, s) => {
58
+ if (i.current) {
59
+ const r = i.current.children[a + 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a + 2 : a + 1;
60
+ if (c && c.length <= o)
61
+ return;
62
+ l + d <= o && P(), E(o, s);
63
+ }
64
+ }, ot = (t, e, s) => {
65
+ if (i.current) {
66
+ const r = i.current && i.current.children[a - 1], o = r && r.classList.contains("k-timeline-flag-wrap") ? a - 2 : a - 1;
67
+ if (o <= 0)
68
+ return;
69
+ o < d && F(), E(o, s);
70
+ }
71
+ }, it = (t, e, s) => {
72
+ if (i.current) {
73
+ if (a <= 1)
74
+ return;
75
+ const r = 1;
76
+ h(!0, r, 0, 0), E(r, s);
77
+ }
78
+ }, ct = (t, e, s) => {
79
+ if (i.current) {
80
+ const r = i.current && i.current.children.length - 1;
81
+ if (r <= a)
82
+ return;
83
+ const o = Math.floor(r / l), T = o * -100, C = o * l;
84
+ h(!0, r, C, T), E(r, s);
85
+ }
86
+ }, x = () => {
87
+ const t = mt(tt);
88
+ J(t), w([t[a - 1], t[a], t[a + 1]]);
89
+ }, F = () => {
90
+ var e;
91
+ if (i.current && c) {
92
+ const s = d - l, r = d - 1, o = c[r] && ((e = c[r]) != null && e.yearFlag) ? r - 1 : r, T = f + 100 > 0 ? 0 : f + 100;
93
+ h(!1, o, s, T);
94
+ }
95
+ }, P = () => {
96
+ if (i.current && c) {
97
+ const e = d + l, s = c[e] && c[e].yearFlag ? e + 1 : e, r = f - 100;
98
+ h(!0, s, e, r);
99
+ }
100
+ }, h = (t, e, s, r) => {
101
+ A(t, e), p(), G(s), S(r), O(e);
102
+ }, A = (t, e) => {
103
+ if (u && c) {
104
+ const s = b(t, Q), r = Object.assign([], u, { [s]: c[e] });
105
+ w(r), Z(s), W(t ? -100 : 100), setTimeout(() => {
106
+ var H;
107
+ const o = (H = m.current) == null ? void 0 : H.offsetWidth, T = Object.assign([], N, {
108
+ [s]: 0,
109
+ [b(!0, s)]: o,
110
+ [b(!1, s)]: o && -o
111
+ }), C = Object.assign([], r, {
112
+ [b(!0, s)]: {},
113
+ [b(!1, s)]: {}
114
+ });
115
+ w(C), L(T), W(0);
116
+ }, v.transitionDuration || 300);
117
+ }
118
+ }, b = (t, e) => {
119
+ const s = t ? e + 1 : e - 1;
120
+ return u ? s < 0 ? u.length - 1 : s % u.length : 0;
121
+ }, V = (t) => {
122
+ var s;
123
+ const e = (a - d) * t.offsetWidth + t.offsetWidth / 2 + (((s = D.current) == null ? void 0 : s.offsetWidth) || 0);
124
+ Y(e);
125
+ }, E = (t, e) => {
126
+ e.preventDefault(), t > a ? A(!0, t) : t < a && A(!1, t), O(t);
127
+ }, p = n.useCallback(() => {
128
+ const t = i.current, e = t && t.children[a];
129
+ if (t instanceof HTMLElement && e) {
130
+ const s = Math.round(t.offsetWidth / 150);
131
+ V(e), q(100 / s), B(s);
132
+ }
133
+ }, []), lt = () => ({
134
+ transitionDuration: "300ms"
135
+ }), $ = (t) => ({
136
+ transform: `translateX(${t}%)`,
137
+ transformOrigin: "left top"
138
+ });
139
+ return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("div", { className: "k-timeline-track-wrap", ref: m, onKeyDown: rt }, /* @__PURE__ */ n.createElement(
140
+ "button",
141
+ {
142
+ ref: D,
143
+ "aria-hidden": "true",
144
+ onClick: () => y && F(),
145
+ className: _(
146
+ "k-timeline-arrow",
147
+ "k-timeline-arrow-left",
148
+ "k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button",
149
+ { "k-disabled": !y }
150
+ )
151
+ },
152
+ /* @__PURE__ */ n.createElement(z, { icon: dt })
153
+ ), /* @__PURE__ */ n.createElement(
154
+ "button",
155
+ {
156
+ "aria-hidden": "true",
157
+ onClick: () => R && P(),
158
+ className: _(
159
+ "k-timeline-arrow",
160
+ "k-timeline-arrow-right",
161
+ "k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button",
162
+ { "k-disabled": !R }
163
+ )
164
+ },
165
+ /* @__PURE__ */ n.createElement(z, { icon: kt })
166
+ ), /* @__PURE__ */ n.createElement("div", { className: "k-timeline-track" }, /* @__PURE__ */ n.createElement(
167
+ "ul",
168
+ {
169
+ ref: i,
170
+ className: "k-timeline-scrollable-wrap",
171
+ role: "tablist",
172
+ tabIndex: 0,
173
+ style: { transform: `translateX(${f}%)` }
174
+ },
175
+ c && c.map((t, e) => t.yearFlag ? /* @__PURE__ */ n.createElement(
176
+ "li",
177
+ {
178
+ role: "none",
179
+ className: "k-timeline-track-item k-timeline-flag-wrap",
180
+ style: { flex: `1 0 ${U}` },
181
+ key: e
182
+ },
183
+ /* @__PURE__ */ n.createElement("span", { className: "k-timeline-flag" }, t.yearFlag)
184
+ ) : /* @__PURE__ */ n.createElement(
185
+ "li",
186
+ {
187
+ role: "tab",
188
+ className: _(
189
+ "k-timeline-track-item",
190
+ { "k-focus": e === a }
191
+ ),
192
+ "aria-selected": e === a,
193
+ style: { flex: `1 0 ${U}` },
194
+ key: e
195
+ },
196
+ /* @__PURE__ */ n.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ n.createElement("span", { className: "k-timeline-date" }, M.formatDate(t.date, et))),
197
+ /* @__PURE__ */ n.createElement(
198
+ "span",
199
+ {
200
+ onClick: (s) => E(e, s),
201
+ className: "k-timeline-circle"
202
+ }
203
+ )
204
+ ))
205
+ ))), /* @__PURE__ */ n.createElement("div", { className: "k-timeline-events-list" }, /* @__PURE__ */ n.createElement(
206
+ "ul",
207
+ {
208
+ className: "k-timeline-scrollable-wrap",
209
+ style: I === 0 ? { ...$(I) } : { ...$(I), ...lt() }
210
+ },
211
+ u && u.map(
212
+ (t, e) => /* @__PURE__ */ n.createElement(
213
+ "li",
214
+ {
215
+ key: e,
216
+ className: "k-timeline-event",
217
+ style: { transform: `translate3d(${N[e]}px, 0px, 0px)` }
218
+ },
219
+ t && /* @__PURE__ */ n.createElement(
220
+ ut,
221
+ {
222
+ tabindex: N[e] === 0 ? 0 : -1,
223
+ eventData: t,
224
+ onActionClick: st,
225
+ horizontal: !0,
226
+ collapsible: !1,
227
+ calloutStyle: { left: `${X}px` }
228
+ }
229
+ )
230
+ )
231
+ )
232
+ )));
233
+ };
234
+ vt.propTypes = {
235
+ onActionClick: ft.func
236
+ };
237
+ export {
238
+ vt as TimelineHorizontal
239
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),q=require("prop-types"),w=require("./TimelineCard.js"),R=require("./utils.js"),m=require("@progress/kendo-react-common"),F=require("@progress/kendo-react-intl");function O(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}return r.default=n,Object.freeze(r)}const e=O(S),p=n=>{const r=F.useInternationalization(),[a,l]=e.useState(),{collapsibleEvents:b,transitionDuration:k,eventsData:E,dateFormat:y,alterMode:d,navigatable:f,onChange:C,onActionClick:D}=n,u=e.useRef(null),i=e.useRef(new m.Navigation({tabIndex:0,root:u,selectors:[".k-card-vertical"]}));e.useEffect(()=>{u.current&&n.navigatable&&(setTimeout(()=>{const t=i.current.first;t&&t.setAttribute("tabindex",String(0))},0),i.current.keyboardEvents={keydown:{Space:g,Enter:g}})},[n.navigatable]),e.useEffect(()=>{l(R.addYearsFlags(E))},[]),e.useEffect(()=>{i.current.update()});const N=t=>{f&&i.current&&i.current.triggerKeyboardEvent(t)},g=(t,s,o)=>{o.preventDefault();const c=t.querySelector(".k-card-title .k-event-collapse");c&&c.click()};let v=0;const T=m.useId();return e.createElement("ul",{ref:u,onKeyDown:N},a&&a.map((t,s)=>{const o=(s+v)%2===0;t.yearFlag&&(v+=1);const c=T+"-"+s,I=d?{"k-reverse":o}:void 0;return e.createElement(e.Fragment,{key:s},t.yearFlag?e.createElement("li",{className:"k-timeline-flag-wrap"},e.createElement("span",{className:"k-timeline-flag"},t.yearFlag)):e.createElement("li",{className:m.classNames("k-timeline-event",I)},e.createElement("div",{className:"k-timeline-date-wrap"},e.createElement("span",{className:"k-timeline-date",id:c},r.formatDate(t.date,y))),e.createElement("span",{className:"k-timeline-circle"}),e.createElement(w.TimelineCard,{id:c,tabindex:f?0:-1,eventData:t,alternated:d&&o,collapsible:b,transitionDuration:k,onChange:C,onActionClick:D})))}))};p.propTypes={onActionClick:q.func};exports.TimelineVertical=p;
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import I from "prop-types";
11
+ import { TimelineCard as w } from "./TimelineCard.mjs";
12
+ import { addYearsFlags as F } from "./utils.mjs";
13
+ import { Navigation as T, useId as x, classNames as A } from "@progress/kendo-react-common";
14
+ import { useInternationalization as R } from "@progress/kendo-react-intl";
15
+ const S = (l) => {
16
+ const u = R(), [c, p] = e.useState(), {
17
+ collapsibleEvents: v,
18
+ transitionDuration: E,
19
+ eventsData: g,
20
+ dateFormat: k,
21
+ alterMode: o,
22
+ navigatable: m,
23
+ onChange: y,
24
+ onActionClick: b
25
+ } = l, s = e.useRef(null), a = e.useRef(new T({
26
+ tabIndex: 0,
27
+ root: s,
28
+ selectors: [".k-card-vertical"]
29
+ }));
30
+ e.useEffect(() => {
31
+ s.current && l.navigatable && (setTimeout(() => {
32
+ const t = a.current.first;
33
+ t && t.setAttribute("tabindex", String(0));
34
+ }, 0), a.current.keyboardEvents = {
35
+ keydown: {
36
+ Space: d,
37
+ Enter: d
38
+ }
39
+ });
40
+ }, [l.navigatable]), e.useEffect(() => {
41
+ p(F(g));
42
+ }, []), e.useEffect(() => {
43
+ a.current.update();
44
+ });
45
+ const N = (t) => {
46
+ m && a.current && a.current.triggerKeyboardEvent(t);
47
+ }, d = (t, r, i) => {
48
+ i.preventDefault();
49
+ const n = t.querySelector(".k-card-title .k-event-collapse");
50
+ n && n.click();
51
+ };
52
+ let f = 0;
53
+ const C = x();
54
+ return /* @__PURE__ */ e.createElement("ul", { ref: s, onKeyDown: N }, c && c.map((t, r) => {
55
+ const i = (r + f) % 2 === 0;
56
+ t.yearFlag && (f += 1);
57
+ const n = C + "-" + r, D = o ? { "k-reverse": i } : void 0;
58
+ return /* @__PURE__ */ e.createElement(e.Fragment, { key: r }, t.yearFlag ? /* @__PURE__ */ e.createElement("li", { className: "k-timeline-flag-wrap" }, /* @__PURE__ */ e.createElement("span", { className: "k-timeline-flag" }, t.yearFlag)) : /* @__PURE__ */ e.createElement("li", { className: A("k-timeline-event", D) }, /* @__PURE__ */ e.createElement("div", { className: "k-timeline-date-wrap" }, /* @__PURE__ */ e.createElement("span", { className: "k-timeline-date", id: n }, u.formatDate(t.date, k))), /* @__PURE__ */ e.createElement("span", { className: "k-timeline-circle" }), /* @__PURE__ */ e.createElement(
59
+ w,
60
+ {
61
+ id: n,
62
+ tabindex: m ? 0 : -1,
63
+ eventData: t,
64
+ alternated: o && i,
65
+ collapsible: v,
66
+ transitionDuration: E,
67
+ onChange: y,
68
+ onActionClick: b
69
+ }
70
+ )));
71
+ }));
72
+ };
73
+ S.propTypes = {
74
+ onActionClick: I.func
75
+ };
76
+ export {
77
+ S as TimelineVertical
78
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=r=>r.sort((a,e)=>a.date.getTime()-e.date.getTime()),l=r=>{let t;return r.reduce((e,s)=>(t!==s.date.getFullYear()?(t=s.date.getFullYear(),e.push({yearFlag:t},s)):e.push(s),e),[])};exports.addYearsFlags=l;exports.sortEventList=d;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const a = (r) => r.sort((u, e) => u.date.getTime() - e.date.getTime()), d = (r) => {
10
+ let t;
11
+ return r.reduce((e, s) => (t !== s.date.getFullYear() ? (t = s.date.getFullYear(), e.push({ yearFlag: t }, s)) : e.push(s), e), []);
12
+ };
13
+ export {
14
+ d as addYearsFlags,
15
+ a as sortEventList
16
+ };
@@ -1,138 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import { ActionSheetItemProps } from './interfaces/ActionSheetItemProps';
8
- /**
9
- * The props of the ActionSheet component.
10
- */
11
- export interface ActionSheetProps {
12
- /**
13
- * The collection of items that will be rendered in the ActionSheet.
14
- */
15
- items?: ActionSheetItemProps[];
16
- /**
17
- * Specifies the text that is rendered under the title.
18
- */
19
- subTitle?: string;
20
- /**
21
- * Specifies the text that is rendered as title.
22
- */
23
- title?: string;
24
- /**
25
- * **Deprecated**. Fires when the modal overlay is clicked. Use `onClose` event instead.
26
- *
27
- * @deprecated
28
- */
29
- onOverlayClick?: (event: React.SyntheticEvent) => void;
30
- /**
31
- * Fires when the modal overlay is clicked.
32
- */
33
- onClose?: (event: React.SyntheticEvent) => void;
34
- /**
35
- * Fires when an ActionSheet item is clicked.
36
- */
37
- onItemSelect?: (event: {
38
- syntheticEvent: React.SyntheticEvent;
39
- title?: string;
40
- item?: any;
41
- }) => void;
42
- /**
43
- * **Deprecated**. Fires when an ActionSheet item is clicked. Use `onItemSelect` event instead.
44
- *
45
- * @deprecated
46
- */
47
- onItemClick?: (event: {
48
- syntheticEvent: React.SyntheticEvent;
49
- title?: string;
50
- item?: any;
51
- }) => void;
52
- /**
53
- * Represents the children that are passed to the ActionSheet.
54
- */
55
- children?: any;
56
- /**
57
- * Specifies the `tabIndex` of the ActionSheet.
58
- */
59
- tabIndex?: number;
60
- /**
61
- * Specifies if the ActionSheet can be navigatable with keyboard.
62
- * Defaults to `true`.
63
- */
64
- navigatable: boolean;
65
- /**
66
- * Specifies the selectors of the navigatable elements inside the templates of the ActionSheet.
67
- */
68
- navigatableElements: string[];
69
- /**
70
- * Controls the popup animation. By default, the open and close animations are disabled.
71
- */
72
- animation?: boolean;
73
- /**
74
- * @hidden
75
- */
76
- animationStyles?: React.CSSProperties;
77
- /**
78
- * Specifies the duration of the transition for the entering and closing Animation. Defaults to `300ms`.
79
- */
80
- animationDuration?: number;
81
- /**
82
- * The CSS classes that will be rendered on the inner ActionSheet element.
83
- */
84
- className?: string;
85
- /**
86
- * Specifies the state of the ActionSheet.
87
- */
88
- expand?: boolean;
89
- }
90
- /**
91
- * @hidden
92
- */
93
- export interface ActionSheetState {
94
- show?: boolean;
95
- slide?: boolean;
96
- }
97
- /**
98
- * Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
99
- */
100
- export declare class ActionSheet extends React.Component<ActionSheetProps, ActionSheetState> {
101
- /** @hidden */
102
- static displayName: string;
103
- /** @hidden */
104
- static propTypes: {
105
- items: PropTypes.Requireable<any[]>;
106
- subTitle: PropTypes.Requireable<string>;
107
- title: PropTypes.Requireable<string>;
108
- navigatable: PropTypes.Requireable<boolean>;
109
- navigatableElements: PropTypes.Requireable<any[]>;
110
- };
111
- /** @hidden */
112
- static defaultProps: {
113
- navigatable: boolean;
114
- navigatableElements: never[];
115
- };
116
- private actionSheetRef;
117
- private actionSheetTitleClass;
118
- private ariaLabeledBy;
119
- private navigation?;
120
- private animationDuration;
121
- private bottomPosition;
122
- /** @hidden */
123
- constructor(props: ActionSheetProps);
124
- /** @hidden */
125
- componentDidMount(): void;
126
- /** @hidden */
127
- componentDidUpdate(_prevProps: Readonly<ActionSheetProps>, prevState: Readonly<ActionSheetState>): void;
128
- /** @hidden */
129
- render(): import("react/jsx-runtime").JSX.Element;
130
- private handleKeyDown;
131
- private onTab;
132
- private handleOverlayClick;
133
- private handleItemClick;
134
- private onEnter;
135
- private onEscape;
136
- private hideActionSheet;
137
- private children;
138
- }
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { ActionSheetChildrenProps } from './interfaces/ActionSheetChildrenProps';
7
- /**
8
- * @hidden
9
- */
10
- export declare const contentDisplayName = "ActionSheetContent";
11
- /**
12
- * The KendoReact ActionSheetContent component.
13
- */
14
- export declare const ActionSheetContent: React.FunctionComponent<ActionSheetChildrenProps>;
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { ActionSheetChildrenProps } from './interfaces/ActionSheetChildrenProps';
7
- /**
8
- * @hidden
9
- */
10
- export declare const footerDisplayName = "ActionSheetFooter";
11
- /**
12
- * The KendoReact ActionSheetFooter component.
13
- */
14
- export declare const ActionSheetFooter: React.FunctionComponent<ActionSheetChildrenProps>;
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { ActionSheetChildrenProps } from './interfaces/ActionSheetChildrenProps';
7
- /**
8
- * @hidden
9
- */
10
- export declare const headerDisplayName = "ActionSheetHeader";
11
- /**
12
- * The KendoReact ActionSheetHeader component.
13
- */
14
- export declare const ActionSheetHeader: React.FunctionComponent<ActionSheetChildrenProps>;
@@ -1,10 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { ActionSheetItemProps } from './interfaces/ActionSheetItemProps';
7
- /**
8
- * The KendoReact ActionSheetItem component.
9
- */
10
- export declare const ActionSheetItem: React.FunctionComponent<ActionSheetItemProps>;
@@ -1,17 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export interface ActionSheetChildrenProps {
9
- /**
10
- * ClassName of the rendered element.
11
- */
12
- className?: any;
13
- /**
14
- * Represents the children that are passed to the ActionSheet.
15
- */
16
- children?: any;
17
- }
@@ -1,70 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- /**
7
- * Represents the props of the KendoReact ActionSheet component.
8
- */
9
- export interface ActionSheetItemProps {
10
- /**
11
- * Sets additional CSS classes to the ActionSheet.
12
- */
13
- className?: string;
14
- /**
15
- * Sets additional CSS styles to the ActionSheet.
16
- */
17
- style?: React.CSSProperties;
18
- /**
19
- * **Deprecated**. Specifies the `tabIndex` of the ActionSheetItem.
20
- *
21
- * Set the tabIndex to the ActionSheet component instead.
22
- *
23
- * @deprecated
24
- */
25
- tabIndex?: number;
26
- /**
27
- * Specifies additional text rendered under the item's title.
28
- */
29
- description?: string;
30
- /**
31
- * Specifies if the ActionSheet item is initially disabled.
32
- */
33
- disabled?: boolean;
34
- /**
35
- * Defines the group of the item. Items can be segregated in two groups - `top` and `bottom`.
36
- * Each specifying whether the ActionSheet item will be rendered over the separator or under it.
37
- */
38
- group?: 'top' | 'bottom';
39
- /**
40
- * Defines the icon rendered inside the ActionSheet item.
41
- */
42
- icon?: React.ReactElement;
43
- /**
44
- * Specifies the text content of the ActionSheet item.
45
- */
46
- title?: string;
47
- /**
48
- * Specifies the ActionSheet item.
49
- */
50
- item?: any;
51
- /**
52
- * @hidden
53
- */
54
- onClick?: (event: {
55
- syntheticEvent: React.SyntheticEvent;
56
- title?: string;
57
- }) => void;
58
- /**
59
- * @hidden
60
- */
61
- onKeyDown?: (event: React.SyntheticEvent, title: string | undefined, id: number | undefined) => void;
62
- /**
63
- * @hidden
64
- */
65
- focused?: boolean;
66
- /**
67
- * @hidden
68
- */
69
- id?: number;
70
- }