@progress/kendo-react-layout 13.3.0 → 13.4.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.
- 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,52 @@
|
|
|
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 { DrawerProps } from './interfaces/DrawerProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* The Drawer ref.
|
|
12
|
+
*/
|
|
13
|
+
export interface DrawerHandle {
|
|
14
|
+
/**
|
|
15
|
+
* The Drawer element.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLDivElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Focuses the Drawer component.
|
|
20
|
+
*/
|
|
21
|
+
focus: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents the [KendoReact Drawer component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* const App = () => {
|
|
29
|
+
* const items = [
|
|
30
|
+
* { text: 'Inbox', icon: 'k-i-inbox', selected: true },
|
|
31
|
+
* { separator: true },
|
|
32
|
+
* { text: 'Notifications', icon: 'k-i-bell', disabled: true },
|
|
33
|
+
* { text: 'Calendar', icon: 'k-i-calendar' },
|
|
34
|
+
* { separator: true },
|
|
35
|
+
* { text: 'Attachments', icon: 'k-i-hyperlink-email' },
|
|
36
|
+
* { text: 'Favourites', icon: 'k-i-star-outline' }
|
|
37
|
+
* ];
|
|
38
|
+
*
|
|
39
|
+
* const [expanded, setExpanded] = React.useState(true);
|
|
40
|
+
* const handleClick = () => setExpanded(prevState => !prevState);
|
|
41
|
+
*
|
|
42
|
+
* return (
|
|
43
|
+
* <Drawer expanded={expanded} position='start' mode='push' items={items}>
|
|
44
|
+
* <DrawerContent>
|
|
45
|
+
* <Button onClick={handleClick}>Toggle the drawer state</Button>
|
|
46
|
+
* </DrawerContent>
|
|
47
|
+
* </Drawer>
|
|
48
|
+
* );
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<DrawerHandle | null>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { DrawerContentProps } from './interfaces/DrawerContentProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* The DrawerContent ref.
|
|
12
|
+
*/
|
|
13
|
+
export interface DrawerContentHandle {
|
|
14
|
+
/**
|
|
15
|
+
* The DrawerContent element.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLDivElement | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents the [KendoReact Drawer component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```jsx
|
|
24
|
+
* const App = () => {
|
|
25
|
+
* const items = [
|
|
26
|
+
* { text: 'Inbox', icon: 'k-i-inbox', selected: true },
|
|
27
|
+
* { separator: true },
|
|
28
|
+
* { text: 'Notifications', icon: 'k-i-bell', disabled: true },
|
|
29
|
+
* { text: 'Calendar', icon: 'k-i-calendar' },
|
|
30
|
+
* { separator: true },
|
|
31
|
+
* { text: 'Attachments', icon: 'k-i-hyperlink-email' },
|
|
32
|
+
* { text: 'Favourites', icon: 'k-i-star-outline' }
|
|
33
|
+
* ];
|
|
34
|
+
*
|
|
35
|
+
* const [expanded, setExpanded] = React.useState(true);
|
|
36
|
+
* const handleClick = () => setExpanded(prevState => !prevState);
|
|
37
|
+
*
|
|
38
|
+
* return (
|
|
39
|
+
* <Drawer expanded={expanded} position='start' mode='push' items={items}>
|
|
40
|
+
* <DrawerContent>
|
|
41
|
+
* <Button onClick={handleClick}>Toggle the drawer state</Button>
|
|
42
|
+
* </DrawerContent>
|
|
43
|
+
* </Drawer>
|
|
44
|
+
* );
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const DrawerContent: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<DrawerContentHandle | null>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { DrawerItemHandle } from './interfaces/DrawerItemHandle.js';
|
|
9
|
+
import { DrawerItemProps } from './interfaces/DrawerItemProps.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Represents the [KendoReact Drawer component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```jsx
|
|
16
|
+
* const App = () => {
|
|
17
|
+
* const [stateVisible, setStateVisible] = React.useState(true);
|
|
18
|
+
* const handleClick = () => { setStateVisible(prevState => !prevState); };
|
|
19
|
+
*
|
|
20
|
+
* return (
|
|
21
|
+
* <Drawer expanded={stateVisible} mode={'push'}>
|
|
22
|
+
* <DrawerNavigation>
|
|
23
|
+
* <DrawerItem text="Inbox" icon="k-i-inbox" />
|
|
24
|
+
* <DrawerItem separator={true} />
|
|
25
|
+
* <DrawerItem text="Notifications" icon="k-i-bell" disabled={true}/>
|
|
26
|
+
* <DrawerItem text="Calendar" icon="k-i-calendar"/>
|
|
27
|
+
* <DrawerItem separator={true} />
|
|
28
|
+
* <DrawerItem text="Attachments" icon="k-i-hyperlink-email" selected={true}/>
|
|
29
|
+
* <DrawerItem text="Favourites" icon="k-i-star-outline"/>
|
|
30
|
+
* </DrawerNavigation>
|
|
31
|
+
* <DrawerContent><Button onClick={handleClick}>Toggle the drawer state</Button></DrawerContent>
|
|
32
|
+
* </Drawer>
|
|
33
|
+
* );
|
|
34
|
+
* };
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const DrawerItem: React.ForwardRefExoticComponent<Omit<DrawerItemProps, "ref"> & React.RefAttributes<DrawerItemHandle | null>>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { DrawerNavigationProps } from './interfaces/DrawerNavigationProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface DrawerNavigationHandle {
|
|
14
|
+
element: HTMLDivElement | null;
|
|
15
|
+
focus: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Represents the [KendoReact Drawer component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```jsx
|
|
22
|
+
* const App = () => {
|
|
23
|
+
* const [expanded, setExpanded] = React.useState(true);
|
|
24
|
+
* const handleClick = () => setExpanded(prevState => !prevState);
|
|
25
|
+
*
|
|
26
|
+
* return (
|
|
27
|
+
* <Drawer expanded={expanded} position='start' mode='push'>
|
|
28
|
+
* <DrawerNavigation>
|
|
29
|
+
* <ul className="k-drawer-items">
|
|
30
|
+
* <li className="k-drawer-item k-selected">
|
|
31
|
+
* <span className="k-item-text">Home</span>
|
|
32
|
+
* </li>
|
|
33
|
+
* <li className="k-drawer-item">
|
|
34
|
+
* <span className="k-item-text">Products</span>
|
|
35
|
+
* </li>
|
|
36
|
+
* <li className="k-drawer-item">
|
|
37
|
+
* <span className="k-item-text">About</span>
|
|
38
|
+
* </li>
|
|
39
|
+
* </ul>
|
|
40
|
+
* </DrawerNavigation>
|
|
41
|
+
* <DrawerContent>
|
|
42
|
+
* <Button onClick={handleClick}>Toggle the drawer state</Button>
|
|
43
|
+
* </DrawerContent>
|
|
44
|
+
* </Drawer>
|
|
45
|
+
* );
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const DrawerNavigation: React.ForwardRefExoticComponent<DrawerNavigationProps & React.RefAttributes<DrawerNavigationHandle | null>>;
|
|
@@ -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 B=require("react"),u=require("prop-types"),G=require("./context/DrawerContext.js"),J=require("./DrawerItem.js"),v=require("@progress/kendo-react-common");function Q(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(i,o,d.get?d:{enumerable:!0,get:()=>n[o]})}}return i.default=n,Object.freeze(i)}const t=Q(B),V=240,Y={
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),u=require("prop-types"),G=require("./context/DrawerContext.js"),J=require("./DrawerItem.js"),v=require("@progress/kendo-react-common");function Q(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(i,o,d.get?d:{enumerable:!0,get:()=>n[o]})}}return i.default=n,Object.freeze(i)}const t=Q(B),V=240,Y={duration:200},Z={duration:0},b=t.forwardRef((n,i)=>{const{children:o,className:d,style:I}=n,{animation:f,expanded:p,mode:w,position:l,onOverlayClick:O,mini:c,dir:k,width:N,miniWidth:D,items:g,item:C,onSelect:W}=t.useContext(G.DrawerContext),m=t.useRef(null),x=t.useCallback(()=>{m.current&&m.current.focus()},[]),e=typeof f!="boolean"?f:f===!1?Z:Y,A=N||V;t.useImperativeHandle(i,()=>({element:m.current,focus:x}));const P=t.useMemo(()=>"k-drawer "+v.classNames({"k-drawer-start":l==="start","k-drawer-end":l==="end"},d),[l]),S={opacity:1,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},_={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},M={opacity:c?1:0,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},R={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},j={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},T={transform:"translateX(0%)",WebkitTransitionDuration:(e&&e.duration)+"ms",transitionDuration:(e&&e.duration)+"ms"},q=p?w==="push"?S:_:w==="push"?M:k==="ltr"&&l==="start"||k==="rtl"&&l==="end"?c?T:R:c?T:j,h=t.useMemo(()=>new v.Navigation({root:m,selectors:["ul.k-drawer-items li.k-drawer-item:not(.k-drawer-separator)"],keyboardEvents:{keydown:{ArrowDown:(a,r,s)=>{s.preventDefault(),r.focusNext(a)},ArrowUp:(a,r,s)=>{s.preventDefault(),r.focusPrevious(a)},Enter:(a,r,s)=>{s.preventDefault(),a.click()}}},tabIndex:0,rovingTabIndex:!0}),[]),X=t.useCallback(h.triggerKeyboardEvent.bind(h),[]),F=g&&t.createElement("ul",{className:"k-drawer-items",role:"menubar","aria-orientation":"vertical",onKeyDown:X},g.map((a,r)=>{const{className:s,level:y,...L}=a,U=y!=null?y:0,H=v.classNames(s,c?"":`k-level-${U}`),z={index:r,className:H,...L,onSelect:W},$=C||J.DrawerItem;return t.createElement($,{key:r,...z})})),K=()=>{let a;const r=!p;return p&&(a={width:A}),r&&(c?D!==void 0?a={width:D}:a={}:a={width:0}),e?{...q,...a}:a},E=t.createElement("div",{style:I,className:P,ref:m},t.createElement("div",{className:"k-drawer-wrapper",style:K()},F||o));return w==="overlay"?t.createElement(t.Fragment,null,p&&t.createElement("div",{className:"k-overlay",onClick:O}),E):E});b.propTypes={children:u.any,className:u.string,style:u.object,item:u.any,tabIndex:u.number};b.displayName="KendoDrawerNavigation";exports.DrawerNavigation=b;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as e from "react";
|
|
9
9
|
import l from "prop-types";
|
|
10
10
|
import { DrawerContext as B } from "./context/DrawerContext.mjs";
|
|
11
11
|
import { DrawerItem as G } from "./DrawerItem.mjs";
|
|
12
12
|
import { classNames as b, Navigation as J } from "@progress/kendo-react-common";
|
|
13
|
-
const Q = 240, V = {
|
|
13
|
+
const Q = 240, V = { duration: 200 }, Y = { duration: 0 }, D = e.forwardRef(
|
|
14
14
|
(h, E) => {
|
|
15
15
|
const { children: T, className: g, style: I } = h, {
|
|
16
16
|
animation: m,
|
|
@@ -21,21 +21,21 @@ const Q = 240, V = { type: "slide", duration: 200 }, Y = { type: "slide", durati
|
|
|
21
21
|
mini: o,
|
|
22
22
|
dir: p,
|
|
23
23
|
width: f,
|
|
24
|
-
miniWidth:
|
|
25
|
-
items:
|
|
24
|
+
miniWidth: v,
|
|
25
|
+
items: w,
|
|
26
26
|
item: x,
|
|
27
27
|
onSelect: A
|
|
28
|
-
} =
|
|
28
|
+
} = e.useContext(B), i = e.useRef(null), C = e.useCallback(() => {
|
|
29
29
|
i.current && i.current.focus();
|
|
30
|
-
}, []),
|
|
31
|
-
|
|
30
|
+
}, []), t = typeof m != "boolean" ? m : m === !1 ? Y : V, O = f || Q;
|
|
31
|
+
e.useImperativeHandle(
|
|
32
32
|
E,
|
|
33
33
|
() => ({
|
|
34
34
|
element: i.current,
|
|
35
35
|
focus: C
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
|
-
const P =
|
|
38
|
+
const P = e.useMemo(
|
|
39
39
|
() => "k-drawer " + b(
|
|
40
40
|
{
|
|
41
41
|
"k-drawer-start": s === "start",
|
|
@@ -46,32 +46,32 @@ const Q = 240, V = { type: "slide", duration: 200 }, Y = { type: "slide", durati
|
|
|
46
46
|
[s]
|
|
47
47
|
), M = {
|
|
48
48
|
opacity: 1,
|
|
49
|
-
WebkitTransition: "all " + (
|
|
50
|
-
transition: "all " + (
|
|
49
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
50
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
51
51
|
}, R = {
|
|
52
52
|
opacity: 1,
|
|
53
53
|
transform: "translateX(0px)",
|
|
54
|
-
WebkitTransition: "all " + (
|
|
55
|
-
transition: "all " + (
|
|
54
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
55
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
56
56
|
}, X = {
|
|
57
57
|
opacity: o ? 1 : 0,
|
|
58
|
-
WebkitTransition: "all " + (
|
|
59
|
-
transition: "all " + (
|
|
58
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
59
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
60
60
|
}, _ = {
|
|
61
61
|
opacity: 0,
|
|
62
62
|
transform: "translateX(-100%)",
|
|
63
|
-
WebkitTransition: "all " + (
|
|
64
|
-
transition: "all " + (
|
|
63
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
64
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
65
65
|
}, S = {
|
|
66
66
|
opacity: 0,
|
|
67
67
|
transform: "translateX(100%)",
|
|
68
|
-
WebkitTransition: "all " + (
|
|
69
|
-
transition: "all " + (
|
|
70
|
-
},
|
|
68
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
69
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
70
|
+
}, y = {
|
|
71
71
|
transform: "translateX(0%)",
|
|
72
|
-
WebkitTransitionDuration: (
|
|
73
|
-
transitionDuration: (
|
|
74
|
-
}, F = c ? d === "push" ? M : R : d === "push" ? X : p === "ltr" && s === "start" || p === "rtl" && s === "end" ? o ?
|
|
72
|
+
WebkitTransitionDuration: (t && t.duration) + "ms",
|
|
73
|
+
transitionDuration: (t && t.duration) + "ms"
|
|
74
|
+
}, F = c ? d === "push" ? M : R : d === "push" ? X : p === "ltr" && s === "start" || p === "rtl" && s === "end" ? o ? y : _ : o ? y : S, k = e.useMemo(
|
|
75
75
|
() => new J({
|
|
76
76
|
root: i,
|
|
77
77
|
selectors: ["ul.k-drawer-items li.k-drawer-item:not(.k-drawer-separator)"],
|
|
@@ -92,20 +92,20 @@ const Q = 240, V = { type: "slide", duration: 200 }, Y = { type: "slide", durati
|
|
|
92
92
|
rovingTabIndex: !0
|
|
93
93
|
}),
|
|
94
94
|
[]
|
|
95
|
-
), K =
|
|
95
|
+
), K = e.useCallback(k.triggerKeyboardEvent.bind(k), []), L = w && /* @__PURE__ */ e.createElement("ul", { className: "k-drawer-items", role: "menubar", "aria-orientation": "vertical", onKeyDown: K }, w.map((a, r) => {
|
|
96
96
|
const { className: n, level: u, ...H } = a, j = u != null ? u : 0, $ = b(n, o ? "" : `k-level-${j}`), q = {
|
|
97
97
|
index: r,
|
|
98
98
|
className: $,
|
|
99
99
|
...H,
|
|
100
100
|
onSelect: A
|
|
101
101
|
}, z = x || G;
|
|
102
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ e.createElement(z, { key: r, ...q });
|
|
103
103
|
})), U = () => {
|
|
104
104
|
let a;
|
|
105
105
|
const r = !c;
|
|
106
|
-
return c && (a = { width: O }), r && (o ?
|
|
107
|
-
}, N = /* @__PURE__ */
|
|
108
|
-
return d === "overlay" ? /* @__PURE__ */
|
|
106
|
+
return c && (a = { width: O }), r && (o ? v !== void 0 ? a = { width: v } : a = {} : a = { width: 0 }), t ? { ...F, ...a } : a;
|
|
107
|
+
}, N = /* @__PURE__ */ e.createElement("div", { style: I, className: P, ref: i }, /* @__PURE__ */ e.createElement("div", { className: "k-drawer-wrapper", style: U() }, L || T));
|
|
108
|
+
return d === "overlay" ? /* @__PURE__ */ e.createElement(e.Fragment, null, c && /* @__PURE__ */ e.createElement("div", { className: "k-overlay", onClick: W }), N) : N;
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
D.propTypes = {
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { DrawerAnimation } from '../interfaces/DrawerAnimation.js';
|
|
9
|
+
import { DrawerItemProps } from '../interfaces/DrawerItemProps.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/** @hidden */
|
|
12
|
+
export type DrawerContextType = {
|
|
13
|
+
animation?: boolean | DrawerAnimation;
|
|
14
|
+
expanded?: boolean;
|
|
15
|
+
mode?: 'overlay' | 'push';
|
|
16
|
+
position?: 'start' | 'end';
|
|
17
|
+
mini?: boolean;
|
|
18
|
+
dir?: string;
|
|
19
|
+
items?: Array<DrawerItemProps>;
|
|
20
|
+
item?: React.ComponentType<DrawerItemProps>;
|
|
21
|
+
width?: number;
|
|
22
|
+
miniWidth?: number;
|
|
23
|
+
onOverlayClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
24
|
+
onSelect?: (target: any, idx: number, event: React.SyntheticEvent<HTMLElement>) => void;
|
|
25
|
+
};
|
|
26
|
+
/** @hidden */
|
|
27
|
+
export declare const DrawerContext: React.Context<DrawerContextType>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* Specifies the animation settings of the Drawer.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export interface DrawerAnimation {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the type of the Drawer animation.
|
|
15
|
+
*/
|
|
16
|
+
type?: 'slide';
|
|
17
|
+
/**
|
|
18
|
+
* Specifies the duration of the Drawer animation ([see example](https://www.telerik.com/kendo-react-ui/components/layout/drawer/display_modes#toc-expand-modes)) .
|
|
19
|
+
*/
|
|
20
|
+
duration: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* The properties of the [KendoReact DrawerContent component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
10
|
+
*/
|
|
11
|
+
export interface DrawerContentProps {
|
|
12
|
+
/**
|
|
13
|
+
* Sets the DrawerContent items declaratively.
|
|
14
|
+
*/
|
|
15
|
+
children?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies a list of CSS classes that will be added to the DrawerContent element.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sets additional CSS styles to the DrawerContent.
|
|
22
|
+
*/
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* The DrawerItem ref.
|
|
10
|
+
*/
|
|
11
|
+
export interface DrawerItemHandle {
|
|
12
|
+
/**
|
|
13
|
+
* The DrawerItem element.
|
|
14
|
+
*/
|
|
15
|
+
element: HTMLLIElement | null;
|
|
16
|
+
/**
|
|
17
|
+
* Focus the DrawerItem.
|
|
18
|
+
*/
|
|
19
|
+
focus: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* The props of the DrawerItem.
|
|
22
|
+
*/
|
|
23
|
+
props: any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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 { SVGIcon } from '@progress/kendo-react-common';
|
|
9
|
+
/**
|
|
10
|
+
* An interface for the Drawer items.
|
|
11
|
+
*/
|
|
12
|
+
export interface DrawerItemProps {
|
|
13
|
+
/**
|
|
14
|
+
* Represents the children that are passed to the DrawerItem.
|
|
15
|
+
*
|
|
16
|
+
* Example:
|
|
17
|
+
* ```jsx
|
|
18
|
+
* <DrawerItem>Item Content</DrawerItem>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
children?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies a list of CSS classes that will be added to the DrawerItem element.
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Sets additional CSS styles to the Drawer item.
|
|
28
|
+
*/
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* Specifies if the Drawer item is disabled.
|
|
32
|
+
*
|
|
33
|
+
* Example:
|
|
34
|
+
* ```jsx
|
|
35
|
+
* <DrawerItem disabled={true} />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the name for an existing icon in a KendoReact theme.
|
|
43
|
+
*
|
|
44
|
+
* Example:
|
|
45
|
+
* ```jsx
|
|
46
|
+
* <DrawerItem icon="home" />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
icon?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the SVG icon of the item.
|
|
52
|
+
*
|
|
53
|
+
* Example:
|
|
54
|
+
* ```jsx
|
|
55
|
+
* import { gearIcon } from '@progress/kendo-svg-icons';
|
|
56
|
+
*
|
|
57
|
+
* <DrawerItem svgIcon={gearIcon} />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
svgIcon?: SVGIcon;
|
|
61
|
+
/**
|
|
62
|
+
* Specifies if the Drawer item is initially selected.
|
|
63
|
+
*
|
|
64
|
+
* Example:
|
|
65
|
+
* ```jsx
|
|
66
|
+
* <DrawerItem selected={true} />
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
selected?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies if this is a separator item.
|
|
74
|
+
*
|
|
75
|
+
* Example:
|
|
76
|
+
* ```jsx
|
|
77
|
+
* <DrawerItem separator={true} />
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
separator?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Specifies the text content of the Drawer item.
|
|
85
|
+
*
|
|
86
|
+
* Example:
|
|
87
|
+
* ```jsx
|
|
88
|
+
* <DrawerItem text="Dashboard" />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
text?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Sets the index of the DrawerItem that is used to identify it.
|
|
94
|
+
*
|
|
95
|
+
* Example:
|
|
96
|
+
* ```jsx
|
|
97
|
+
* <DrawerItem index={0} />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
index?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the `tabIndex` property of the DrawerItem.
|
|
103
|
+
*
|
|
104
|
+
* Example:
|
|
105
|
+
* ```jsx
|
|
106
|
+
* <DrawerItem tabIndex={1} />
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @default 0
|
|
110
|
+
*/
|
|
111
|
+
tabIndex?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Sets a custom property. Contained in the DrawerItem props that are returned from the `onSelect` Drawer event.
|
|
114
|
+
*/
|
|
115
|
+
[customProp: string]: any;
|
|
116
|
+
/**
|
|
117
|
+
* This property is used in scenarios with hierarchical drawer. The rendering of the component requires each node to have a "`k-level-` + the level of nesting" className.
|
|
118
|
+
*
|
|
119
|
+
* Example:
|
|
120
|
+
* ```jsx
|
|
121
|
+
* <DrawerItem level={1} />
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
level?: number;
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
onSelect?(target?: any, idx?: number, event?: React.SyntheticEvent<Element>): void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* The properties of the [KendoReact DrawerNavigation component](https://www.telerik.com/kendo-react-ui/components/layout/drawer).
|
|
10
|
+
*/
|
|
11
|
+
export interface DrawerNavigationProps {
|
|
12
|
+
/**
|
|
13
|
+
* Sets the DrawerNavigation items declaratively.
|
|
14
|
+
*/
|
|
15
|
+
children?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies a list of CSS classes that will be added to the DrawerNavigation element.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sets additional CSS styles to the DrawerNavigation.
|
|
22
|
+
*/
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|