@progress/kendo-react-layout 13.3.0 → 13.4.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.
- package/actionsheet/ActionSheet.d.ts +242 -0
- package/actionsheet/ActionSheetContent.d.ts +17 -0
- package/actionsheet/ActionSheetFooter.d.ts +42 -0
- package/actionsheet/ActionSheetHeader.d.ts +17 -0
- package/actionsheet/ActionSheetItem.d.ts +13 -0
- package/actionsheet/ActionSheetView.d.ts +16 -0
- package/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +20 -0
- package/actionsheet/interfaces/ActionSheetItemProps.d.ts +76 -0
- package/appbar/AppBar.d.ts +56 -0
- package/appbar/AppBar.js +1 -1
- package/appbar/AppBar.mjs +10 -10
- package/appbar/AppBarSection.d.ts +55 -0
- package/appbar/AppBarSpacer.d.ts +56 -0
- package/appbar/interfaces/AppBarProps.d.ts +143 -0
- package/appbar/interfaces/AppBarSectionProps.d.ts +25 -0
- package/appbar/interfaces/AppBarSpacerProps.d.ts +26 -0
- package/bottomnavigation/BottomNavigation.d.ts +44 -0
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +13 -13
- package/bottomnavigation/BottomNavigationItem.d.ts +19 -0
- package/bottomnavigation/BottomNavigationItem.mjs +3 -3
- package/bottomnavigation/BottomNavigationItemProps.d.ts +120 -0
- package/bottomnavigation/BottomNavigationProps.d.ts +238 -0
- package/bottomnavigation/models/events.d.ts +27 -0
- package/bottomnavigation/models/utils.d.ts +43 -0
- package/breadcrumb/Breadcrumb.d.ts +276 -0
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +0 -1
- package/breadcrumb/BreadcrumbDelimiter.d.ts +50 -0
- package/breadcrumb/BreadcrumbLink.d.ts +136 -0
- package/breadcrumb/BreadcrumbLink.mjs +3 -3
- package/breadcrumb/BreadcrumbListItem.d.ts +58 -0
- package/breadcrumb/BreadcrumbOrderedList.d.ts +62 -0
- package/breadcrumb/BreadcrumbOrderedList.mjs +5 -5
- package/card/Avatar.d.ts +10 -0
- package/card/Avatar.js +1 -1
- package/card/Avatar.mjs +20 -22
- package/card/Card.d.ts +11 -0
- package/card/CardActions.d.ts +10 -0
- package/card/CardActions.mjs +1 -1
- package/card/CardBody.d.ts +10 -0
- package/card/CardFooter.d.ts +10 -0
- package/card/CardHeader.d.ts +10 -0
- package/card/CardImage.d.ts +10 -0
- package/card/CardSubtitle.d.ts +10 -0
- package/card/CardTitle.d.ts +10 -0
- package/card/interfaces/AvatarProps.d.ts +141 -0
- package/card/interfaces/CardActionsProps.d.ts +76 -0
- package/card/interfaces/CardBodyProps.d.ts +36 -0
- package/card/interfaces/CardFooterProps.d.ts +36 -0
- package/card/interfaces/CardHandle.d.ts +21 -0
- package/card/interfaces/CardHeaderProps.d.ts +36 -0
- package/card/interfaces/CardImageProps.d.ts +45 -0
- package/card/interfaces/CardProps.d.ts +91 -0
- package/card/interfaces/CardSubtitleProps.d.ts +36 -0
- package/card/interfaces/CardTitleProps.d.ts +21 -0
- package/card/interfaces/Enums.d.ts +30 -0
- package/contextmenu/ContextMenu.d.ts +50 -0
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.d.ts +52 -0
- package/drawer/DrawerContent.d.ts +48 -0
- package/drawer/DrawerItem.d.ts +37 -0
- package/drawer/DrawerNavigation.d.ts +49 -0
- package/drawer/DrawerNavigation.js +1 -1
- package/drawer/DrawerNavigation.mjs +27 -27
- package/drawer/context/DrawerContext.d.ts +27 -0
- package/drawer/interfaces/DrawerAnimation.d.ts +21 -0
- package/drawer/interfaces/DrawerContentProps.d.ts +24 -0
- package/drawer/interfaces/DrawerItemHandle.d.ts +24 -0
- package/drawer/interfaces/DrawerItemProps.d.ts +129 -0
- package/drawer/interfaces/DrawerNavigationProps.d.ts +24 -0
- package/drawer/interfaces/DrawerProps.d.ts +171 -0
- package/drawer/interfaces/DrawerSelectEvent.d.ts +22 -0
- package/expansionpanel/ExpansionPanel.d.ts +13 -0
- package/expansionpanel/ExpansionPanel.mjs +1 -1
- package/expansionpanel/ExpansionPanelContent.d.ts +12 -0
- package/expansionpanel/index.d.ts +10 -0
- package/expansionpanel/interfaces.d.ts +99 -0
- package/gridlayout/GridLayout.d.ts +45 -0
- package/gridlayout/GridLayoutItem.d.ts +44 -0
- package/gridlayout/interfaces/GridLayoutColumnProps.d.ts +21 -0
- package/gridlayout/interfaces/GridLayoutItemProps.d.ts +87 -0
- package/gridlayout/interfaces/GridLayoutProps.d.ts +144 -0
- package/gridlayout/interfaces/GridLayoutRowProps.d.ts +21 -0
- package/index.d.mts +101 -6278
- package/index.d.ts +101 -6278
- package/menu/BaseMenuItemInternalProps.d.ts +29 -0
- package/menu/MenuProps.d.ts +189 -0
- package/menu/components/Menu.d.ts +132 -0
- package/menu/components/Menu.mjs +1 -1
- package/menu/components/MenuItem.d.ts +43 -0
- package/menu/components/MenuItemArrow.d.ts +53 -0
- package/menu/components/MenuItemInternal.d.ts +70 -0
- package/menu/components/MenuItemLink.d.ts +37 -0
- package/menu/consts.d.ts +65 -0
- package/menu/events.d.ts +45 -0
- package/menu/models/BaseMenuItem.d.ts +65 -0
- package/menu/models/MenuItemModel.d.ts +30 -0
- package/menu/utils/DirectionHolder.d.ts +18 -0
- package/menu/utils/MouseOverHandler.d.ts +24 -0
- package/menu/utils/getNewItemIdUponKeyboardNavigation.d.ts +14 -0
- package/menu/utils/hoverDelay.d.ts +16 -0
- package/menu/utils/itemsIdsUtils.d.ts +71 -0
- package/menu/utils/itemsIdsUtils.mjs +49 -49
- package/menu/utils/misc.d.ts +23 -0
- package/menu/utils/prepareInputItemsForInternalWork.d.ts +13 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +8 -8
- package/panelbar/PanelBar.d.ts +89 -0
- package/panelbar/PanelBarItem.d.ts +61 -0
- package/panelbar/interfaces/NavigationAction.d.ts +19 -0
- package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +15 -0
- package/panelbar/interfaces/PanelBarItemProps.d.ts +116 -0
- package/panelbar/interfaces/PanelBarProps.d.ts +140 -0
- package/panelbar/interfaces/PanelBarSelectEventArguments.d.ts +21 -0
- package/panelbar/interfaces/RenderPanelBarItem.d.ts +22 -0
- package/panelbar/util.d.ts +63 -0
- package/splitter/Splitter.d.ts +150 -0
- package/splitter/SplitterBar.d.ts +51 -0
- package/splitter/SplitterPane.d.ts +76 -0
- package/splitter/messages/index.d.ts +17 -0
- package/stacklayout/StackLayout.d.ts +43 -0
- package/stacklayout/StackLayoutProps.d.ts +97 -0
- package/stepper/Step.d.ts +29 -0
- package/stepper/Stepper.d.ts +29 -0
- package/stepper/contants.d.ts +15 -0
- package/stepper/context/StepperContext.d.ts +30 -0
- package/stepper/interfaces/StepChangeEvent.d.ts +18 -0
- package/stepper/interfaces/StepFocusEvent.d.ts +14 -0
- package/stepper/interfaces/StepHandle.d.ts +20 -0
- package/stepper/interfaces/StepProps.d.ts +95 -0
- package/stepper/interfaces/StepperChangeEvent.d.ts +18 -0
- package/stepper/interfaces/StepperFocusEvent.d.ts +14 -0
- package/stepper/interfaces/StepperHandle.d.ts +20 -0
- package/stepper/interfaces/StepperOnNavigateEvent.d.ts +38 -0
- package/stepper/interfaces/StepperProps.d.ts +216 -0
- package/stepper/messages/index.d.ts +22 -0
- package/tabstrip/TabStrip.d.ts +297 -0
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +1 -1
- package/tabstrip/TabStripContent.d.ts +70 -0
- package/tabstrip/TabStripNavigation.d.ts +144 -0
- package/tabstrip/TabStripNavigation.mjs +6 -6
- package/tabstrip/TabStripNavigationItem.d.ts +82 -0
- package/tabstrip/TabStripTab.d.ts +50 -0
- package/tabstrip/messages/index.d.ts +22 -0
- package/tilelayout/InternalTile.d.ts +112 -0
- package/tilelayout/ResizeHandlers.d.ts +27 -0
- package/tilelayout/TileLayout.d.ts +228 -0
- package/tilelayout/interfaces/index.d.ts +159 -0
- package/timeline/Timeline.d.ts +205 -0
- package/timeline/TimelineCard.d.ts +44 -0
- package/timeline/TimelineHorizontal.d.ts +10 -0
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +0 -2
- package/timeline/TimelineVertical.d.ts +19 -0
- package/timeline/utils.d.ts +22 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
|
+
import { TileLayout } from '../TileLayout.js';
|
|
10
|
+
/**
|
|
11
|
+
* The interface for describing items that can be passed to the `items` prop of the TileLayout component.
|
|
12
|
+
*/
|
|
13
|
+
export interface TileLayoutItem {
|
|
14
|
+
/**
|
|
15
|
+
* The TileLayoutItem position which is used when the TileLayout is in uncontrolled mode
|
|
16
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-position-and-dimensions)).
|
|
17
|
+
*/
|
|
18
|
+
defaultPosition?: TilePosition;
|
|
19
|
+
/**
|
|
20
|
+
* Sets additional CSS styles to the TileLayoutItem.
|
|
21
|
+
*/
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/**
|
|
24
|
+
* Sets additional classes to the TileLayoutItem.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Sets additional CSS styles to the TileLayoutItem hint element.
|
|
29
|
+
*/
|
|
30
|
+
hintStyle?: React.CSSProperties;
|
|
31
|
+
/**
|
|
32
|
+
* Sets additional classes to the TileLayoutItem hint element.
|
|
33
|
+
*/
|
|
34
|
+
hintClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the TileLayoutItem title in the header
|
|
37
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles)).
|
|
38
|
+
*/
|
|
39
|
+
header?: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the TileLayoutItem content in the body
|
|
42
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles)).
|
|
43
|
+
*/
|
|
44
|
+
body?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Overrides the default rendering of the TileLayoutItem
|
|
47
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-custom-rendering)).
|
|
48
|
+
*/
|
|
49
|
+
item?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Specifies if the user can resize the TileLayoutItem and in which direction
|
|
52
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-resizing)).
|
|
53
|
+
* If `resizable` is not specified, the resizing of the TileLayoutItem is enabled for both directions.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
resizable?: TileResizeMode;
|
|
58
|
+
/**
|
|
59
|
+
* Specifies if the user can reorder the TileLayoutItem by dragging and dropping it
|
|
60
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-reordering)).
|
|
61
|
+
* If `reorderable` is not specified, the dragging functionality of the TileLayoutItem is enabled.
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
reorderable?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Specifies the position of each tile.
|
|
69
|
+
*/
|
|
70
|
+
export interface TilePosition {
|
|
71
|
+
/**
|
|
72
|
+
* Defines the order index of the TileLayoutItem.
|
|
73
|
+
* If not set, items will receive a sequential order.
|
|
74
|
+
*/
|
|
75
|
+
order?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Defines on which column-line the TileLayoutItem starts.
|
|
78
|
+
* It is required in order reordering and resizing functionalities to work as expected as they rely on it.
|
|
79
|
+
*/
|
|
80
|
+
col: number;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies how many columns the TileLayoutItem spans.
|
|
83
|
+
*
|
|
84
|
+
* @default 1
|
|
85
|
+
*/
|
|
86
|
+
colSpan?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Defines on which row-line the TileLayoutItem starts.
|
|
89
|
+
*/
|
|
90
|
+
row?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Specifies how many rows the TileLayoutItem spans.
|
|
93
|
+
*
|
|
94
|
+
* @default 1
|
|
95
|
+
*/
|
|
96
|
+
rowSpan?: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Specifies the strict position of each tile.
|
|
100
|
+
* Used in the [TileLayoutRepositionEvent](https://www.telerik.com/kendo-react-ui/components/layout/api/tilelayoutrepositionevent).
|
|
101
|
+
*/
|
|
102
|
+
export interface TileStrictPosition extends TilePosition {
|
|
103
|
+
/**
|
|
104
|
+
* Defines the order index of the TileLayoutItem.
|
|
105
|
+
* If not set, items will receive a sequential order.
|
|
106
|
+
*/
|
|
107
|
+
order: number;
|
|
108
|
+
/**
|
|
109
|
+
* Specifies how many rows the TileLayoutItem spans.
|
|
110
|
+
*
|
|
111
|
+
* @default 1
|
|
112
|
+
*/
|
|
113
|
+
rowSpan: number;
|
|
114
|
+
/**
|
|
115
|
+
* Specifies how many columns the TileLayoutItem spans.
|
|
116
|
+
*
|
|
117
|
+
* @default 1
|
|
118
|
+
*/
|
|
119
|
+
colSpan: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Specifies if the user can resize the TileLayoutItem and in which direction
|
|
123
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/layout/tilelayout/tiles#toc-resizing)).
|
|
124
|
+
* If `resizable` is not specified, the resizing of the TileLayoutItem is enabled for both directions.
|
|
125
|
+
*/
|
|
126
|
+
export type TileResizeMode = 'horizontal' | 'vertical' | boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Specifies the gaps between the tiles.
|
|
129
|
+
*/
|
|
130
|
+
export interface TileLayoutGap {
|
|
131
|
+
/**
|
|
132
|
+
* The rows gap between tiles.
|
|
133
|
+
*
|
|
134
|
+
* @default 16px
|
|
135
|
+
*/
|
|
136
|
+
rows?: number | string;
|
|
137
|
+
/**
|
|
138
|
+
* The columns gap between tiles.
|
|
139
|
+
*
|
|
140
|
+
* @default 16px
|
|
141
|
+
*/
|
|
142
|
+
columns?: number | string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the TileLayout.
|
|
146
|
+
* For further reference, check [grid-auto-flow CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow) article.
|
|
147
|
+
*
|
|
148
|
+
* @default column
|
|
149
|
+
*/
|
|
150
|
+
export type TileLayoutAutoFlow = 'column' | 'row' | 'column dense' | 'row dense' | 'unset';
|
|
151
|
+
/**
|
|
152
|
+
* The arguments for the `onReposition` TileLayout event.
|
|
153
|
+
*/
|
|
154
|
+
export interface TileLayoutRepositionEvent extends BaseEvent<TileLayout> {
|
|
155
|
+
/**
|
|
156
|
+
* The new positions of the TileLayout tiles.
|
|
157
|
+
*/
|
|
158
|
+
value: Array<TileStrictPosition>;
|
|
159
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Navigation } from '@progress/kendo-react-common';
|
|
9
|
+
import { EventDataProps } from './TimelineCard.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
export type { EventDataProps };
|
|
12
|
+
export interface TimelineEventProps {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies if the TimelineEvent card is default collapsed.
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```jsx
|
|
20
|
+
* <Timeline events={[{ opened: true, title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
opened?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the text that is rendered as TimelineEvent card body.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <Timeline events={[{ description: 'Event details', title: 'Event 1', date: new Date() }]} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
description: string;
|
|
33
|
+
/**
|
|
34
|
+
* Represents the TimelineEvent point on the axis.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```jsx
|
|
38
|
+
* <Timeline events={[{ date: new Date(), title: 'Event 1', description: 'Details' }]} />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
date: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the text that is rendered as the TimelineEvent card title.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```jsx
|
|
47
|
+
* <Timeline events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
title: string;
|
|
51
|
+
/**
|
|
52
|
+
* Specifies the text that is rendered under the `title`.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```jsx
|
|
56
|
+
* <Timeline events={[{ subtitle: 'Subtitle', title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
subtitle?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies the images that are rendered under the `description`.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```jsx
|
|
65
|
+
* <Timeline events={[{ images: [{ src: 'image.jpg', alt: 'Image' }], title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
images?: {
|
|
69
|
+
src: string;
|
|
70
|
+
alt?: string;
|
|
71
|
+
}[];
|
|
72
|
+
/**
|
|
73
|
+
* Specifies the corresponding links that are rendered under the `images`.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```jsx
|
|
77
|
+
* <Timeline events={[{ actions: [{ text: 'Learn More', url: 'https://example.com' }], title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
actions?: {
|
|
81
|
+
text: string;
|
|
82
|
+
url: string;
|
|
83
|
+
}[];
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
yearFlag?: number;
|
|
88
|
+
}
|
|
89
|
+
export interface TimelineProps {
|
|
90
|
+
/**
|
|
91
|
+
* The collection of TimelineEvents to be displayed in the Timeline.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```jsx
|
|
95
|
+
* <Timeline events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
events: TimelineEventProps[];
|
|
99
|
+
/**
|
|
100
|
+
* Specifies the CSS class names which are set to the Timeline.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```jsx
|
|
104
|
+
* <Timeline className="custom-class" events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
className?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Specifies whether the TimelineEvent cards can be expanded or collapsed.
|
|
110
|
+
*
|
|
111
|
+
* @default false
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```jsx
|
|
115
|
+
* <Timeline collapsibleEvents={true} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
collapsibleEvents?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Switches the Timeline to horizontal mode.
|
|
121
|
+
*
|
|
122
|
+
* @default false
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```jsx
|
|
126
|
+
* <Timeline horizontal={true} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
horizontal?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The date format for displaying the TimelineEvent date.
|
|
132
|
+
*
|
|
133
|
+
* @default MMM dd, yyyy
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```jsx
|
|
137
|
+
* <Timeline dateFormat="dd/MM/yyyy" events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
dateFormat?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Renders TimelineEvents alternatingly on both sides of the axis.
|
|
143
|
+
*
|
|
144
|
+
* @default false
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```jsx
|
|
148
|
+
* <Timeline alterMode={true} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
alterMode?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Specifies the time for sliding to the next TimelineEvent in horizontal mode and collapsing the TimelineEvent in vertical mode.
|
|
154
|
+
* The default value are:
|
|
155
|
+
* - `300ms` for horizontal
|
|
156
|
+
* - `400ms` for vertical
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```jsx
|
|
160
|
+
* <Timeline transitionDuration={500} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
transitionDuration?: number;
|
|
164
|
+
/**
|
|
165
|
+
* Enables keyboard navigation for the Timeline.
|
|
166
|
+
*
|
|
167
|
+
* @default false
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```jsx
|
|
171
|
+
* <Timeline navigatable={true} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
navigatable?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Fires when a TimelineEvent card is toggled.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```jsx
|
|
180
|
+
* <Timeline onChange={(event) => console.log(event)} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
onChange?: (event: EventDataProps) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Fires when a TimelineEvent card action is clicked.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```jsx
|
|
189
|
+
* <Timeline onActionClick={(event) => console.log(event)} events={[{ title: 'Event 1', date: new Date(), description: 'Details' }]} />
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
onActionClick?: (event: EventDataProps) => void;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @hidden
|
|
196
|
+
*/
|
|
197
|
+
export interface TimelineDirectionsProps {
|
|
198
|
+
eventsData: TimelineEventProps[];
|
|
199
|
+
dateFormat?: string;
|
|
200
|
+
transitionDuration?: number;
|
|
201
|
+
navigatable?: boolean;
|
|
202
|
+
navigation?: React.MutableRefObject<Navigation>;
|
|
203
|
+
onActionClick?: (event: EventDataProps) => void;
|
|
204
|
+
}
|
|
205
|
+
export declare const Timeline: React.FunctionComponent<TimelineProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TimelineEventProps } from './Timeline.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
interface TimelineCardProps {
|
|
14
|
+
tabindex?: number;
|
|
15
|
+
id?: string;
|
|
16
|
+
eventData: TimelineEventProps;
|
|
17
|
+
alternated?: boolean;
|
|
18
|
+
horizontal?: boolean;
|
|
19
|
+
collapsible?: boolean;
|
|
20
|
+
navigatable?: boolean;
|
|
21
|
+
calloutStyle?: React.CSSProperties;
|
|
22
|
+
transitionDuration?: number;
|
|
23
|
+
onChange?: (event: EventDataProps) => void;
|
|
24
|
+
onActionClick?: (event: EventDataProps) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents the event data props.
|
|
28
|
+
*/
|
|
29
|
+
export interface EventDataProps {
|
|
30
|
+
/**
|
|
31
|
+
* A React Synthetic Event.
|
|
32
|
+
*/
|
|
33
|
+
syntheticEvent?: React.SyntheticEvent<any>;
|
|
34
|
+
/**
|
|
35
|
+
* A native DOM event.
|
|
36
|
+
*/
|
|
37
|
+
nativeEvent?: any;
|
|
38
|
+
/**
|
|
39
|
+
* The selected TimelineEvent card value.
|
|
40
|
+
*/
|
|
41
|
+
eventData: TimelineEventProps;
|
|
42
|
+
}
|
|
43
|
+
export declare const TimelineCard: React.FunctionComponent<TimelineCardProps>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TimelineDirectionsProps } from './Timeline.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export declare const TimelineHorizontal: React.FunctionComponent<TimelineDirectionsProps>;
|
|
@@ -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 gt=require("react"),Tt=require("prop-types"),kt=require("./TimelineCard.js"),vt=require("./utils.js"),M=require("@progress/kendo-svg-icons"),ht=require("@progress/kendo-react-intl"),b=require("@progress/kendo-react-common"),B=require("@progress/kendo-react-buttons");function Et(l){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const T in l)if(T!=="default"){const I=Object.getOwnPropertyDescriptor(l,T);Object.defineProperty(p,T,I.get?I:{enumerable:!0,get:()=>l[T]})}}return p.default=l,Object.freeze(p)}const s=Et(gt),K=l=>{const I=ht.useInternationalization(),[O,X]=s.useState(!1),[L,Y]=s.useState(!0),[G,J]=s.useState(),[
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const gt=require("react"),Tt=require("prop-types"),kt=require("./TimelineCard.js"),vt=require("./utils.js"),M=require("@progress/kendo-svg-icons"),ht=require("@progress/kendo-react-intl"),b=require("@progress/kendo-react-common"),B=require("@progress/kendo-react-buttons");function Et(l){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const T in l)if(T!=="default"){const I=Object.getOwnPropertyDescriptor(l,T);Object.defineProperty(p,T,I.get?I:{enumerable:!0,get:()=>l[T]})}}return p.default=l,Object.freeze(p)}const s=Et(gt),K=l=>{const I=ht.useInternationalization(),[O,X]=s.useState(!1),[L,Y]=s.useState(!0),[G,J]=s.useState(),[f,D]=s.useState(0),[A,Q]=s.useState(),[u,Z]=s.useState(0),[g,tt]=s.useState(0),[a,F]=s.useState(1),[d,y]=s.useState(),[i,et]=s.useState(),[R,W]=s.useState([0,0,0]),[_,U]=s.useState(0),[nt,st]=s.useState(1),m=s.useRef(null),c=s.useRef(null),P=s.useRef(null),{eventsData:rt,dateFormat:at,navigatable:ot,onActionClick:ct}=l,x=A?`${A}%`:"150px",k=s.useRef(new b.Navigation({tabIndex:0,root:m,selectors:[".k-timeline-scrollable-wrap"]}));s.useEffect(()=>{m.current&&l.navigatable&&(setTimeout(()=>{const t=k.current.first;t&&t.setAttribute("tabindex",String(0))},0),k.current.keyboardEvents={keydown:{ArrowRight:lt,ArrowLeft:ut,End:dt,Home:ft}})},[l.navigatable,a,u]),s.useEffect(()=>{k.current.update()});const it=t=>{ot&&k.current&&k.current.triggerKeyboardEvent(t)};s.useEffect(()=>{var r;const t=b.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(w),e=c.current,n=((r=m==null?void 0:m.current)==null?void 0:r.offsetWidth)||0;return t&&e&&t.observe(e),V(),w(),W([n,0,-n]),()=>{t&&t.disconnect()}},[]),s.useEffect(()=>{const t=c.current,e=t&&t.children[a];if(e){const n=e.offsetWidth,r=!(f>=0);if(X(r),i){const o=i.length*n>u*n*((f*-1+100)/100);Y(o)}(t==null?void 0:t.offsetWidth)*-f/100>=t.children.length*n&&(V(),w(),D((e.offsetLeft-e.offsetWidth)/(u*e.offsetWidth)*100*-1)),q(e)}},[u,A,a]);const lt=(t,e,n)=>{if(c.current){const r=c.current.children[a+1],o=r&&r.classList.contains("k-timeline-flag-wrap")?a+2:a+1;if(i&&i.length<=o)return;u+g<=o&&j(),h(o,n)}},ut=(t,e,n)=>{if(c.current){const r=c.current&&c.current.children[a-1],o=r&&r.classList.contains("k-timeline-flag-wrap")?a-2:a-1;if(o<=0)return;o<g&&$(),h(o,n)}},ft=(t,e,n)=>{if(c.current){if(a<=1)return;const r=1;N(!0,r,0,0),h(r,n)}},dt=(t,e,n)=>{if(c.current){const r=c.current&&c.current.children.length-1;if(r<=a)return;const o=Math.floor(r/u),E=o*-100,S=o*u;N(!0,r,S,E),h(r,n)}},V=()=>{const t=vt.addYearsFlags(rt);et(t),y([t[a-1],t[a],t[a+1]])},$=()=>{var e;if(c.current&&i){const n=g-u,r=g-1,o=i[r]&&((e=i[r])!=null&&e.yearFlag)?r-1:r,E=f+100>0?0:f+100;N(!1,o,n,E)}},j=()=>{if(c.current&&i){const e=g+u,n=i[e]&&i[e].yearFlag?e+1:e,r=f-100;N(!0,n,e,r)}},N=(t,e,n,r)=>{C(t,e),w(),tt(n),D(r),F(e)},C=(t,e)=>{if(d&&i){const n=v(t,nt),r=Object.assign([],d,{[n]:i[e]});y(r),st(n),U(t?-100:100),setTimeout(()=>{var H;const o=(H=m.current)==null?void 0:H.offsetWidth,E=Object.assign([],R,{[n]:0,[v(!0,n)]:o,[v(!1,n)]:o&&-o}),S=Object.assign([],r,{[v(!0,n)]:{},[v(!1,n)]:{}});y(S),W(E),U(0)},l.transitionDuration||300)}},v=(t,e)=>{const n=t?e+1:e-1;return d?n<0?d.length-1:n%d.length:0},q=t=>{var n,r;const e=(a-g)*t.offsetWidth+t.offsetWidth/2+(((r=(n=P.current)==null?void 0:n.element)==null?void 0:r.clientWidth)||0);J(e)},h=(t,e)=>{e.preventDefault(),t>a?C(!0,t):t<a&&C(!1,t),F(t)},w=s.useCallback(()=>{const t=c.current,e=t&&t.children[a];if(t instanceof HTMLElement&&e){const n=Math.round(t.offsetWidth/150);q(e),Q(100/n),Z(n)}},[]),mt=()=>({transitionDuration:"300ms"}),z=t=>({transform:`translateX(${t}%)`,transformOrigin:"left top"});return s.createElement(s.Fragment,null,s.createElement("div",{className:"k-timeline-track-wrap",ref:m,onKeyDown:it},s.createElement(B.Button,{ref:P,"aria-hidden":"true",rounded:"full",svgIcon:M.caretAltLeftIcon,icon:"caret-alt-left",onClick:()=>O&&$(),className:b.classNames("k-timeline-arrow","k-timeline-arrow-left",{"k-disabled":!O})}),s.createElement(B.Button,{"aria-hidden":"true",rounded:"full",svgIcon:M.caretAltRightIcon,icon:"caret-alt-right",onClick:()=>L&&j(),className:b.classNames("k-timeline-arrow","k-timeline-arrow-right",{"k-disabled":!L})}),s.createElement("div",{className:"k-timeline-track"},s.createElement("ul",{ref:c,className:"k-timeline-scrollable-wrap",role:"tablist",tabIndex:0,style:{transform:`translateX(${f}%)`}},i&&i.map((t,e)=>t.yearFlag?s.createElement("li",{role:"none",className:"k-timeline-track-item k-timeline-flag-wrap",style:{flex:`1 0 ${x}`},key:e},s.createElement("span",{className:"k-timeline-flag"},t.yearFlag)):s.createElement("li",{role:"tab",className:b.classNames("k-timeline-track-item",{"k-focus":e===a}),"aria-selected":e===a,style:{flex:`1 0 ${x}`},key:e},s.createElement("div",{className:"k-timeline-date-wrap"},s.createElement("span",{className:"k-timeline-date"},I.formatDate(t.date,at))),s.createElement("span",{onClick:n=>h(e,n),className:"k-timeline-circle"})))))),s.createElement("div",{className:"k-timeline-events-list"},s.createElement("ul",{className:"k-timeline-scrollable-wrap",style:_===0?{...z(_)}:{...z(_),...mt()}},d&&d.map((t,e)=>s.createElement("li",{key:e,className:"k-timeline-event",style:{transform:`translate3d(${R[e]}px, 0px, 0px)`}},t&&s.createElement(kt.TimelineCard,{tabindex:R[e]===0?0:-1,eventData:t,onActionClick:ct,horizontal:!0,collapsible:!1,calloutStyle:{left:`${G}px`}}))))))};K.propTypes={onActionClick:Tt.func};exports.TimelineHorizontal=K;
|
|
@@ -145,7 +145,6 @@ const gt = (g) => {
|
|
|
145
145
|
{
|
|
146
146
|
ref: W,
|
|
147
147
|
"aria-hidden": "true",
|
|
148
|
-
fillMode: "solid",
|
|
149
148
|
rounded: "full",
|
|
150
149
|
svgIcon: dt,
|
|
151
150
|
icon: "caret-alt-left",
|
|
@@ -156,7 +155,6 @@ const gt = (g) => {
|
|
|
156
155
|
z,
|
|
157
156
|
{
|
|
158
157
|
"aria-hidden": "true",
|
|
159
|
-
fillMode: "solid",
|
|
160
158
|
rounded: "full",
|
|
161
159
|
svgIcon: Tt,
|
|
162
160
|
icon: "caret-alt-right",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { EventDataProps } from './TimelineCard.js';
|
|
9
|
+
import { TimelineDirectionsProps } from './Timeline.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface TimelineVerticalProps extends TimelineDirectionsProps {
|
|
15
|
+
alterMode?: boolean;
|
|
16
|
+
collapsibleEvents?: boolean;
|
|
17
|
+
onChange?: (event: EventDataProps) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const TimelineVertical: React.FunctionComponent<TimelineVerticalProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TimelineEventProps } from './Timeline.js';
|
|
9
|
+
/**
|
|
10
|
+
* Sort the events list based on event date.
|
|
11
|
+
*/
|
|
12
|
+
export declare const sortEventList: (eventList: TimelineEventProps[]) => TimelineEventProps[];
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface yearFlagProps {
|
|
17
|
+
yearFlag?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export declare const addYearsFlags: (eventsData: TimelineEventProps[]) => (TimelineEventProps | yearFlagProps)[];
|