@progress/kendo-react-layout 7.2.4-develop.3 → 7.3.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.js +8 -0
- package/actionsheet/ActionSheet.mjs +184 -0
- package/actionsheet/ActionSheetContent.js +8 -0
- package/actionsheet/ActionSheetContent.mjs +32 -0
- package/actionsheet/ActionSheetFooter.js +8 -0
- package/actionsheet/ActionSheetFooter.mjs +32 -0
- package/actionsheet/ActionSheetHeader.js +8 -0
- package/actionsheet/ActionSheetHeader.mjs +32 -0
- package/actionsheet/ActionSheetItem.js +8 -0
- package/actionsheet/ActionSheetItem.mjs +52 -0
- package/appbar/AppBar.js +8 -0
- package/appbar/AppBar.mjs +86 -0
- package/appbar/AppBarSection.js +8 -0
- package/appbar/AppBarSection.mjs +47 -0
- package/appbar/AppBarSpacer.js +8 -0
- package/appbar/AppBarSpacer.mjs +55 -0
- package/bottomnavigation/BottomNavigation.js +8 -0
- package/bottomnavigation/BottomNavigation.mjs +160 -0
- package/bottomnavigation/BottomNavigationItem.js +8 -0
- package/bottomnavigation/BottomNavigationItem.mjs +93 -0
- package/bottomnavigation/models/utils.js +8 -0
- package/bottomnavigation/models/utils.mjs +19 -0
- package/breadcrumb/Breadcrumb.js +8 -0
- package/breadcrumb/Breadcrumb.mjs +158 -0
- package/breadcrumb/BreadcrumbDelimiter.js +8 -0
- package/breadcrumb/BreadcrumbDelimiter.mjs +48 -0
- package/breadcrumb/BreadcrumbLink.js +8 -0
- package/breadcrumb/BreadcrumbLink.mjs +82 -0
- package/breadcrumb/BreadcrumbListItem.js +8 -0
- package/breadcrumb/BreadcrumbListItem.mjs +52 -0
- package/breadcrumb/BreadcrumbOrderedList.js +8 -0
- package/breadcrumb/BreadcrumbOrderedList.mjs +67 -0
- package/card/Avatar.js +8 -0
- package/card/Avatar.mjs +53 -0
- package/card/Card.js +8 -0
- package/card/Card.mjs +52 -0
- package/card/CardActions.js +8 -0
- package/card/CardActions.mjs +40 -0
- package/card/CardBody.js +8 -0
- package/card/CardBody.mjs +28 -0
- package/card/CardFooter.js +8 -0
- package/card/CardFooter.mjs +28 -0
- package/card/CardHeader.js +8 -0
- package/card/CardHeader.mjs +28 -0
- package/card/CardImage.js +8 -0
- package/card/CardImage.mjs +36 -0
- package/card/CardSubtitle.js +8 -0
- package/card/CardSubtitle.mjs +28 -0
- package/card/CardTitle.js +8 -0
- package/card/CardTitle.mjs +28 -0
- package/card/interfaces/Enums.js +8 -0
- package/card/interfaces/Enums.mjs +15 -0
- package/contextmenu/ContextMenu.js +8 -0
- package/contextmenu/ContextMenu.mjs +48 -0
- package/dist/cdn/js/kendo-react-layout.js +8 -5
- package/drawer/Drawer.js +8 -0
- package/drawer/Drawer.mjs +130 -0
- package/drawer/DrawerContent.js +8 -0
- package/drawer/DrawerContent.mjs +33 -0
- package/drawer/DrawerItem.js +8 -0
- package/drawer/DrawerItem.mjs +89 -0
- package/drawer/DrawerNavigation.js +8 -0
- package/drawer/DrawerNavigation.mjs +132 -0
- package/drawer/context/DrawerContext.js +8 -0
- package/drawer/context/DrawerContext.mjs +22 -0
- package/expansionpanel/ExpansionPanel.js +8 -0
- package/expansionpanel/ExpansionPanel.mjs +116 -0
- package/expansionpanel/ExpansionPanelContent.js +8 -0
- package/expansionpanel/ExpansionPanelContent.mjs +23 -0
- package/gridlayout/GridLayout.js +8 -0
- package/gridlayout/GridLayout.mjs +83 -0
- package/gridlayout/GridLayoutItem.js +8 -0
- package/gridlayout/GridLayoutItem.mjs +46 -0
- package/index.d.mts +4593 -5
- package/index.d.ts +4593 -103
- package/index.js +8 -5
- package/index.mjs +139 -5037
- package/menu/components/Menu.js +8 -0
- package/menu/components/Menu.mjs +193 -0
- package/menu/components/MenuItem.js +8 -0
- package/menu/components/MenuItem.mjs +34 -0
- package/menu/components/MenuItemArrow.js +8 -0
- package/menu/components/MenuItemArrow.mjs +49 -0
- package/menu/components/MenuItemInternal.js +8 -0
- package/menu/components/MenuItemInternal.mjs +222 -0
- package/menu/components/MenuItemLink.js +8 -0
- package/menu/components/MenuItemLink.mjs +54 -0
- package/menu/consts.js +8 -0
- package/menu/consts.mjs +59 -0
- package/menu/utils/DirectionHolder.js +8 -0
- package/menu/utils/DirectionHolder.mjs +25 -0
- package/menu/utils/MouseOverHandler.js +8 -0
- package/menu/utils/MouseOverHandler.mjs +34 -0
- package/menu/utils/getNewItemIdUponKeyboardNavigation.js +8 -0
- package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +124 -0
- package/menu/utils/hoverDelay.js +8 -0
- package/menu/utils/hoverDelay.mjs +18 -0
- package/menu/utils/itemsIdsUtils.js +8 -0
- package/menu/utils/itemsIdsUtils.mjs +81 -0
- package/menu/utils/misc.js +8 -0
- package/menu/utils/misc.mjs +29 -0
- package/menu/utils/prepareInputItemsForInternalWork.js +8 -0
- package/menu/utils/prepareInputItemsForInternalWork.mjs +59 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +6 -6
- package/panelbar/PanelBar.js +8 -0
- package/panelbar/PanelBar.mjs +195 -0
- package/panelbar/PanelBarItem.js +8 -0
- package/panelbar/PanelBarItem.mjs +148 -0
- package/panelbar/interfaces/NavigationAction.js +8 -0
- package/panelbar/interfaces/NavigationAction.mjs +12 -0
- package/panelbar/util.js +8 -0
- package/panelbar/util.mjs +122 -0
- package/splitter/Splitter.js +8 -0
- package/splitter/Splitter.mjs +238 -0
- package/splitter/SplitterBar.js +8 -0
- package/splitter/SplitterBar.mjs +129 -0
- package/splitter/SplitterPane.js +8 -0
- package/splitter/SplitterPane.mjs +50 -0
- package/splitter/messages/index.js +8 -0
- package/splitter/messages/index.mjs +15 -0
- package/stacklayout/StackLayout.js +8 -0
- package/stacklayout/StackLayout.mjs +84 -0
- package/stepper/Step.js +8 -0
- package/stepper/Step.mjs +177 -0
- package/stepper/Stepper.js +8 -0
- package/stepper/Stepper.mjs +252 -0
- package/stepper/contants.js +8 -0
- package/stepper/contants.mjs +13 -0
- package/stepper/context/StepperContext.js +8 -0
- package/stepper/context/StepperContext.mjs +17 -0
- package/stepper/messages/index.js +8 -0
- package/stepper/messages/index.mjs +17 -0
- package/tabstrip/TabStrip.js +8 -0
- package/tabstrip/TabStrip.mjs +163 -0
- package/tabstrip/TabStripContent.js +8 -0
- package/tabstrip/TabStripContent.mjs +81 -0
- package/tabstrip/TabStripNavigation.js +8 -0
- package/tabstrip/TabStripNavigation.mjs +171 -0
- package/tabstrip/TabStripNavigationItem.js +8 -0
- package/tabstrip/TabStripNavigationItem.mjs +55 -0
- package/tabstrip/TabStripTab.js +8 -0
- package/tabstrip/TabStripTab.mjs +35 -0
- package/tilelayout/InternalTile.js +8 -0
- package/tilelayout/InternalTile.mjs +203 -0
- package/tilelayout/ResizeHandlers.js +8 -0
- package/tilelayout/ResizeHandlers.mjs +53 -0
- package/tilelayout/TileLayout.js +8 -0
- package/tilelayout/TileLayout.mjs +122 -0
- package/timeline/Timeline.js +8 -0
- package/timeline/Timeline.mjs +79 -0
- package/timeline/TimelineCard.js +8 -0
- package/timeline/TimelineCard.mjs +109 -0
- package/timeline/TimelineHorizontal.js +8 -0
- package/timeline/TimelineHorizontal.mjs +239 -0
- package/timeline/TimelineVertical.js +8 -0
- package/timeline/TimelineVertical.mjs +78 -0
- package/timeline/utils.js +8 -0
- package/timeline/utils.mjs +16 -0
- package/actionsheet/ActionSheet.d.ts +0 -138
- package/actionsheet/ActionSheetContent.d.ts +0 -14
- package/actionsheet/ActionSheetFooter.d.ts +0 -14
- package/actionsheet/ActionSheetHeader.d.ts +0 -14
- package/actionsheet/ActionSheetItem.d.ts +0 -10
- package/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +0 -17
- package/actionsheet/interfaces/ActionSheetItemProps.d.ts +0 -70
- package/appbar/AppBar.d.ts +0 -54
- package/appbar/AppBarSection.d.ts +0 -53
- package/appbar/AppBarSpacer.d.ts +0 -54
- package/appbar/interfaces/AppBarProps.d.ts +0 -83
- package/appbar/interfaces/AppBarSectionProps.d.ts +0 -22
- package/appbar/interfaces/AppBarSpacerProps.d.ts +0 -23
- package/bottomnavigation/BottomNavigation.d.ts +0 -42
- package/bottomnavigation/BottomNavigationItem.d.ts +0 -16
- package/bottomnavigation/BottomNavigationItemProps.d.ts +0 -64
- package/bottomnavigation/BottomNavigationProps.d.ts +0 -157
- package/bottomnavigation/models/events.d.ts +0 -24
- package/bottomnavigation/models/utils.d.ts +0 -40
- package/breadcrumb/Breadcrumb.d.ts +0 -163
- package/breadcrumb/BreadcrumbDelimiter.d.ts +0 -47
- package/breadcrumb/BreadcrumbLink.d.ts +0 -135
- package/breadcrumb/BreadcrumbListItem.d.ts +0 -55
- package/breadcrumb/BreadcrumbOrderedList.d.ts +0 -59
- package/card/Avatar.d.ts +0 -7
- package/card/Card.d.ts +0 -8
- package/card/CardActions.d.ts +0 -7
- package/card/CardBody.d.ts +0 -7
- package/card/CardFooter.d.ts +0 -7
- package/card/CardHeader.d.ts +0 -7
- package/card/CardImage.d.ts +0 -7
- package/card/CardSubtitle.d.ts +0 -7
- package/card/CardTitle.d.ts +0 -7
- package/card/interfaces/AvatarProps.d.ts +0 -88
- package/card/interfaces/CardActionsProps.d.ts +0 -38
- package/card/interfaces/CardBodyProps.d.ts +0 -18
- package/card/interfaces/CardFooterProps.d.ts +0 -18
- package/card/interfaces/CardHandle.d.ts +0 -18
- package/card/interfaces/CardHeaderProps.d.ts +0 -18
- package/card/interfaces/CardImageProps.d.ts +0 -22
- package/card/interfaces/CardProps.d.ts +0 -48
- package/card/interfaces/CardSubtitleProps.d.ts +0 -18
- package/card/interfaces/CardTitleProps.d.ts +0 -18
- package/card/interfaces/Enums.d.ts +0 -27
- package/contextmenu/ContextMenu.d.ts +0 -31
- package/drawer/Drawer.d.ts +0 -44
- package/drawer/DrawerContent.d.ts +0 -43
- package/drawer/DrawerItem.d.ts +0 -36
- package/drawer/DrawerNavigation.d.ts +0 -47
- package/drawer/context/DrawerContext.d.ts +0 -24
- package/drawer/interfaces/DrawerAnimation.d.ts +0 -18
- package/drawer/interfaces/DrawerContentProps.d.ts +0 -21
- package/drawer/interfaces/DrawerItemHandle.d.ts +0 -21
- package/drawer/interfaces/DrawerItemProps.d.ts +0 -64
- package/drawer/interfaces/DrawerNavigationProps.d.ts +0 -21
- package/drawer/interfaces/DrawerProps.d.ts +0 -86
- package/drawer/interfaces/DrawerSelectEvent.d.ts +0 -19
- package/expansionpanel/ExpansionPanel.d.ts +0 -10
- package/expansionpanel/ExpansionPanelContent.d.ts +0 -9
- package/expansionpanel/index.d.ts +0 -7
- package/expansionpanel/interfaces.d.ts +0 -92
- package/gridlayout/GridLayout.d.ts +0 -43
- package/gridlayout/GridLayoutItem.d.ts +0 -42
- package/gridlayout/interfaces/GridLayoutColumnProps.d.ts +0 -13
- package/gridlayout/interfaces/GridLayoutItemProps.d.ts +0 -44
- package/gridlayout/interfaces/GridLayoutProps.d.ts +0 -99
- package/gridlayout/interfaces/GridLayoutRowProps.d.ts +0 -13
- package/menu/BaseMenuItemInternalProps.d.ts +0 -24
- package/menu/MenuProps.d.ts +0 -75
- package/menu/components/Menu.d.ts +0 -118
- package/menu/components/MenuItem.d.ts +0 -33
- package/menu/components/MenuItemArrow.d.ts +0 -50
- package/menu/components/MenuItemInternal.d.ts +0 -63
- package/menu/components/MenuItemLink.d.ts +0 -34
- package/menu/consts.d.ts +0 -58
- package/menu/events.d.ts +0 -20
- package/menu/models/BaseMenuItem.d.ts +0 -58
- package/menu/models/MenuItemModel.d.ts +0 -23
- package/menu/utils/DirectionHolder.d.ts +0 -15
- package/menu/utils/MouseOverHandler.d.ts +0 -21
- package/menu/utils/getNewItemIdUponKeyboardNavigation.d.ts +0 -11
- package/menu/utils/hoverDelay.d.ts +0 -13
- package/menu/utils/itemsIdsUtils.d.ts +0 -68
- package/menu/utils/misc.d.ts +0 -20
- package/menu/utils/prepareInputItemsForInternalWork.d.ts +0 -10
- package/package-metadata.d.ts +0 -9
- package/panelbar/PanelBar.d.ts +0 -81
- package/panelbar/PanelBarItem.d.ts +0 -52
- package/panelbar/interfaces/NavigationAction.d.ts +0 -12
- package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +0 -12
- package/panelbar/interfaces/PanelBarItemProps.d.ts +0 -98
- package/panelbar/interfaces/PanelBarProps.d.ts +0 -66
- package/panelbar/interfaces/PanelBarSelectEventArguments.d.ts +0 -18
- package/panelbar/interfaces/RenderPanelBarItem.d.ts +0 -19
- package/panelbar/util.d.ts +0 -56
- package/splitter/Splitter.d.ts +0 -136
- package/splitter/SplitterBar.d.ts +0 -44
- package/splitter/SplitterPane.d.ts +0 -57
- package/splitter/messages/index.d.ts +0 -14
- package/stacklayout/StackLayout.d.ts +0 -41
- package/stacklayout/StackLayoutProps.d.ts +0 -92
- package/stepper/Step.d.ts +0 -27
- package/stepper/Stepper.d.ts +0 -27
- package/stepper/contants.d.ts +0 -12
- package/stepper/context/StepperContext.d.ts +0 -27
- package/stepper/interfaces/StepChangeEvent.d.ts +0 -15
- package/stepper/interfaces/StepFocusEvent.d.ts +0 -11
- package/stepper/interfaces/StepHandle.d.ts +0 -17
- package/stepper/interfaces/StepProps.d.ts +0 -83
- package/stepper/interfaces/StepperChangeEvent.d.ts +0 -15
- package/stepper/interfaces/StepperFocusEvent.d.ts +0 -11
- package/stepper/interfaces/StepperHandle.d.ts +0 -17
- package/stepper/interfaces/StepperProps.d.ts +0 -98
- package/stepper/messages/index.d.ts +0 -19
- package/tabstrip/TabStrip.d.ts +0 -158
- package/tabstrip/TabStripContent.d.ts +0 -62
- package/tabstrip/TabStripNavigation.d.ts +0 -110
- package/tabstrip/TabStripNavigationItem.d.ts +0 -75
- package/tabstrip/TabStripTab.d.ts +0 -42
- package/tilelayout/InternalTile.d.ts +0 -94
- package/tilelayout/ResizeHandlers.d.ts +0 -24
- package/tilelayout/TileLayout.d.ts +0 -153
- package/tilelayout/interfaces/index.d.ts +0 -145
- package/timeline/Timeline.d.ts +0 -102
- package/timeline/TimelineCard.d.ts +0 -38
- package/timeline/TimelineHorizontal.d.ts +0 -7
- package/timeline/TimelineVertical.d.ts +0 -16
- package/timeline/utils.d.ts +0 -19
|
@@ -0,0 +1,130 @@
|
|
|
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 t from "react";
|
|
10
|
+
import e from "prop-types";
|
|
11
|
+
import { DrawerContext as S } from "./context/DrawerContext.mjs";
|
|
12
|
+
import { DrawerNavigation as I } from "./DrawerNavigation.mjs";
|
|
13
|
+
import { validatePackage as W, useDir as O, classNames as T } from "@progress/kendo-react-common";
|
|
14
|
+
import { packageMetadata as j } from "../package-metadata.mjs";
|
|
15
|
+
const s = t.forwardRef((l, u) => {
|
|
16
|
+
W(j);
|
|
17
|
+
const {
|
|
18
|
+
expanded: d,
|
|
19
|
+
mode: n,
|
|
20
|
+
position: p,
|
|
21
|
+
className: f,
|
|
22
|
+
children: v,
|
|
23
|
+
style: w,
|
|
24
|
+
animation: y,
|
|
25
|
+
mini: m,
|
|
26
|
+
width: h,
|
|
27
|
+
miniWidth: b,
|
|
28
|
+
items: a,
|
|
29
|
+
item: k,
|
|
30
|
+
tabIndex: g,
|
|
31
|
+
onOverlayClick: x,
|
|
32
|
+
onSelect: i
|
|
33
|
+
} = l, r = t.useRef(null), E = t.useCallback(
|
|
34
|
+
() => {
|
|
35
|
+
r.current && r.current.focus();
|
|
36
|
+
},
|
|
37
|
+
[]
|
|
38
|
+
);
|
|
39
|
+
t.useImperativeHandle(u, () => ({
|
|
40
|
+
element: r.current,
|
|
41
|
+
focus: E
|
|
42
|
+
}));
|
|
43
|
+
const N = t.useCallback(
|
|
44
|
+
(D, P, o) => {
|
|
45
|
+
if (a && i) {
|
|
46
|
+
const R = {
|
|
47
|
+
itemTarget: D,
|
|
48
|
+
itemIndex: P,
|
|
49
|
+
syntheticEvent: o,
|
|
50
|
+
nativeEvent: o && o.nativeEvent,
|
|
51
|
+
target: void 0
|
|
52
|
+
};
|
|
53
|
+
i.call(void 0, R);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[a, i]
|
|
57
|
+
), c = O(r, l.dir), C = T(
|
|
58
|
+
{
|
|
59
|
+
"k-drawer-container": !0,
|
|
60
|
+
"k-drawer-expanded": d,
|
|
61
|
+
"k-drawer-overlay": n === "overlay",
|
|
62
|
+
"k-drawer-push": n === "push",
|
|
63
|
+
"k-drawer-mini": m
|
|
64
|
+
},
|
|
65
|
+
f
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ t.createElement(
|
|
68
|
+
S.Provider,
|
|
69
|
+
{
|
|
70
|
+
value: {
|
|
71
|
+
animation: y,
|
|
72
|
+
expanded: d,
|
|
73
|
+
mode: n,
|
|
74
|
+
position: p,
|
|
75
|
+
mini: m,
|
|
76
|
+
dir: c,
|
|
77
|
+
items: a,
|
|
78
|
+
item: k,
|
|
79
|
+
width: h,
|
|
80
|
+
miniWidth: b,
|
|
81
|
+
onOverlayClick: x,
|
|
82
|
+
onSelect: N
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
/* @__PURE__ */ t.createElement(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: C,
|
|
89
|
+
ref: r,
|
|
90
|
+
dir: c,
|
|
91
|
+
style: w,
|
|
92
|
+
tabIndex: g
|
|
93
|
+
},
|
|
94
|
+
a && /* @__PURE__ */ t.createElement(I, null),
|
|
95
|
+
v
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
s.propTypes = {
|
|
100
|
+
animation: e.any,
|
|
101
|
+
expanded: e.bool,
|
|
102
|
+
children: e.any,
|
|
103
|
+
className: e.string,
|
|
104
|
+
dir: e.string,
|
|
105
|
+
mode: e.string,
|
|
106
|
+
position: e.string,
|
|
107
|
+
mini: e.bool,
|
|
108
|
+
style: e.object,
|
|
109
|
+
tabIndex: e.number,
|
|
110
|
+
width: e.number,
|
|
111
|
+
miniWidth: e.number,
|
|
112
|
+
selected: e.number,
|
|
113
|
+
onSelect: e.func,
|
|
114
|
+
onOverlayClick: e.func
|
|
115
|
+
};
|
|
116
|
+
const H = {
|
|
117
|
+
animation: !0,
|
|
118
|
+
expanded: !1,
|
|
119
|
+
mode: "overlay",
|
|
120
|
+
position: "start",
|
|
121
|
+
mini: !1,
|
|
122
|
+
dir: "ltr",
|
|
123
|
+
width: 240,
|
|
124
|
+
miniWidth: 50
|
|
125
|
+
};
|
|
126
|
+
s.defaultProps = H;
|
|
127
|
+
s.displayName = "KendoDrawer";
|
|
128
|
+
export {
|
|
129
|
+
s as Drawer
|
|
130
|
+
};
|
|
@@ -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 i=require("react"),c=require("prop-types"),m=require("@progress/kendo-react-common");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=d(i),o=a.forwardRef((e,n)=>{const{children:t,className:r,style:l}=e,s=a.useRef(null);a.useImperativeHandle(n,()=>({element:s.current}));const u=m.classNames({"k-drawer-content":!0},r);return a.createElement("div",{className:u,style:l,ref:s},t)});o.propTypes={children:c.any,className:c.string,style:c.object};o.displayName="KendoDrawerContent";exports.DrawerContent=o;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 t from "prop-types";
|
|
11
|
+
import { classNames as p } from "@progress/kendo-react-common";
|
|
12
|
+
const s = e.forwardRef((n, a) => {
|
|
13
|
+
const { children: o, className: c, style: l } = n, r = e.useRef(null);
|
|
14
|
+
e.useImperativeHandle(a, () => ({
|
|
15
|
+
element: r.current
|
|
16
|
+
}));
|
|
17
|
+
const m = p(
|
|
18
|
+
{
|
|
19
|
+
"k-drawer-content": !0
|
|
20
|
+
},
|
|
21
|
+
c
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ e.createElement("div", { className: m, style: l, ref: r }, o);
|
|
24
|
+
});
|
|
25
|
+
s.propTypes = {
|
|
26
|
+
children: t.any,
|
|
27
|
+
className: t.string,
|
|
28
|
+
style: t.object
|
|
29
|
+
};
|
|
30
|
+
s.displayName = "KendoDrawerContent";
|
|
31
|
+
export {
|
|
32
|
+
s as DrawerContent
|
|
33
|
+
};
|
|
@@ -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 R=require("react"),n=require("prop-types"),o=require("@progress/kendo-react-common"),T=require("./context/DrawerContext.js");function P(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const e=P(R),d=e.forwardRef((t,a)=>{const{className:r,style:l,text:u,icon:i,svgIcon:b,separator:g,disabled:s,selected:I,onSelect:m,index:f,tabIndex:k,children:y,...w}=t,{expanded:x,mini:C,item:N}=e.useContext(T.DrawerContext),c=e.useRef(null),p=e.useCallback(()=>{c.current&&c.current.focus()},[]);e.useImperativeHandle(a,()=>({element:c.current,focus:p,props:t}));const D=o.classNames("k-drawer-item",{"k-selected":I,"k-disabled":s},r),j=e.useCallback(E=>{if(m&&!s){const O={element:c.current,focus:p,props:t};m(O,f,E)}},[m,f,s]),v=e.createElement(e.Fragment,null,(i||b)&&e.createElement(o.IconWrap,{name:i&&o.toIconName(i),icon:b}),!x&&C?null:e.createElement("span",{className:"k-item-text"},u));return g?e.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"separator"}):e.createElement("li",{ref:c,className:D,style:l,role:"menuitem","aria-label":u,"aria-disabled":s,onClick:j,tabIndex:o.getTabIndex(k,s),...w},N?y:v)});d.propTypes={className:n.string,style:n.object,text:n.string,icon:n.string,svgIcon:o.svgIconPropType,separator:n.bool,selected:n.bool,disabled:n.bool,targetItem:n.any};d.displayName="KendoDrawerItem";exports.DrawerItem=d;
|
|
@@ -0,0 +1,89 @@
|
|
|
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 t from "prop-types";
|
|
11
|
+
import { classNames as T, IconWrap as D, toIconName as P, getTabIndex as j, svgIconPropType as F } from "@progress/kendo-react-common";
|
|
12
|
+
import { DrawerContext as H } from "./context/DrawerContext.mjs";
|
|
13
|
+
const d = e.forwardRef((s, u) => {
|
|
14
|
+
const {
|
|
15
|
+
className: p,
|
|
16
|
+
style: f,
|
|
17
|
+
text: o,
|
|
18
|
+
icon: n,
|
|
19
|
+
svgIcon: c,
|
|
20
|
+
separator: b,
|
|
21
|
+
disabled: a,
|
|
22
|
+
selected: I,
|
|
23
|
+
onSelect: l,
|
|
24
|
+
index: m,
|
|
25
|
+
tabIndex: x,
|
|
26
|
+
children: k,
|
|
27
|
+
...g
|
|
28
|
+
} = s, { expanded: N, mini: w, item: C } = e.useContext(H), r = e.useRef(null), i = e.useCallback(
|
|
29
|
+
() => {
|
|
30
|
+
r.current && r.current.focus();
|
|
31
|
+
},
|
|
32
|
+
[]
|
|
33
|
+
);
|
|
34
|
+
e.useImperativeHandle(u, () => ({
|
|
35
|
+
element: r.current,
|
|
36
|
+
focus: i,
|
|
37
|
+
props: s
|
|
38
|
+
}));
|
|
39
|
+
const y = T(
|
|
40
|
+
"k-drawer-item",
|
|
41
|
+
{
|
|
42
|
+
"k-selected": I,
|
|
43
|
+
"k-disabled": a
|
|
44
|
+
},
|
|
45
|
+
p
|
|
46
|
+
), E = e.useCallback(
|
|
47
|
+
(v) => {
|
|
48
|
+
if (l && !a) {
|
|
49
|
+
const R = {
|
|
50
|
+
element: r.current,
|
|
51
|
+
focus: i,
|
|
52
|
+
props: s
|
|
53
|
+
};
|
|
54
|
+
l(R, m, v);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
[l, m, a]
|
|
58
|
+
), h = /* @__PURE__ */ e.createElement(e.Fragment, null, (n || c) && /* @__PURE__ */ e.createElement(D, { name: n && P(n), icon: c }), !N && w ? null : /* @__PURE__ */ e.createElement("span", { className: "k-item-text" }, o));
|
|
59
|
+
return b ? /* @__PURE__ */ e.createElement("li", { className: "k-drawer-item k-drawer-separator", role: "separator" }) : /* @__PURE__ */ e.createElement(
|
|
60
|
+
"li",
|
|
61
|
+
{
|
|
62
|
+
ref: r,
|
|
63
|
+
className: y,
|
|
64
|
+
style: f,
|
|
65
|
+
role: "menuitem",
|
|
66
|
+
"aria-label": o,
|
|
67
|
+
"aria-disabled": a,
|
|
68
|
+
onClick: E,
|
|
69
|
+
tabIndex: j(x, a),
|
|
70
|
+
...g
|
|
71
|
+
},
|
|
72
|
+
C ? k : h
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
d.propTypes = {
|
|
76
|
+
className: t.string,
|
|
77
|
+
style: t.object,
|
|
78
|
+
text: t.string,
|
|
79
|
+
icon: t.string,
|
|
80
|
+
svgIcon: F,
|
|
81
|
+
separator: t.bool,
|
|
82
|
+
selected: t.bool,
|
|
83
|
+
disabled: t.bool,
|
|
84
|
+
targetItem: t.any
|
|
85
|
+
};
|
|
86
|
+
d.displayName = "KendoDrawerItem";
|
|
87
|
+
export {
|
|
88
|
+
d as DrawerItem
|
|
89
|
+
};
|
|
@@ -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 U=require("react"),i=require("prop-types"),H=require("./context/DrawerContext.js"),B=require("./DrawerItem.js"),u=require("@progress/kendo-react-common"),h=require("../package-metadata.js");function z(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>a[n]})}}return r.default=a,Object.freeze(r)}const t=z(U),K=240,V=50,G={type:"slide",duration:200},J={type:"slide",duration:0},y=t.forwardRef((a,r)=>{const{children:n,className:l,style:f}=a;u.validatePackage(h.packageMetadata);const O=u.shouldShowValidationUI(h.packageMetadata),{animation:p,expanded:c,mode:d,position:s,onOverlayClick:E,mini:o,dir:w,width:k,miniWidth:v,items:b,item:W,onSelect:M}=t.useContext(H.DrawerContext),m=t.useRef(null),x=t.useCallback(()=>{m.current&&m.current.focus()},[]),e=typeof p!="boolean"?p:p===!1?J:G,N=k||K,g=v||V;t.useImperativeHandle(r,()=>({element:m.current,focus:x}));const A=t.useMemo(()=>"k-widget k-drawer "+u.classNames({"k-drawer-start":s==="start","k-drawer-end":s==="end"},l),[s]),C={opacity:1,flexBasis:N,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},P={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},_={opacity:o?1:0,flexBasis:o?g: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"},S={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(e&&e.duration)+"ms",transitionDuration:(e&&e.duration)+"ms"},j=c?d==="push"?C:P:d==="push"?_:w==="ltr"&&s==="start"||w==="rtl"&&s==="end"?o?D:R:o?D:S,q=b&&t.createElement("ul",{className:"k-drawer-items",role:"menubar","aria-label":"drawer-list","aria-expanded":c},b.map((X,I)=>{const F={index:I,...X,onSelect:M},L=W||B.DrawerItem;return t.createElement(L,{key:I,...F})})),T=t.createElement("div",{style:e?{...j,...f}:f,className:A,ref:m},t.createElement("div",{className:"k-drawer-wrapper",style:!c&&o&&d==="overlay"?{width:g}:{width:N}},q||n),O&&t.createElement(u.WatermarkOverlay,null));return d==="overlay"?t.createElement(t.Fragment,null,c&&t.createElement("div",{className:"k-overlay",onClick:E}),T):T});y.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number};y.displayName="KendoDrawerNavigation";exports.DrawerNavigation=y;
|
|
@@ -0,0 +1,132 @@
|
|
|
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 a from "react";
|
|
10
|
+
import n from "prop-types";
|
|
11
|
+
import { DrawerContext as S } from "./context/DrawerContext.mjs";
|
|
12
|
+
import { DrawerItem as B } from "./DrawerItem.mjs";
|
|
13
|
+
import { validatePackage as j, shouldShowValidationUI as K, classNames as V, WatermarkOverlay as q } from "@progress/kendo-react-common";
|
|
14
|
+
import { packageMetadata as N } from "../package-metadata.mjs";
|
|
15
|
+
const z = 240, G = 50, J = { type: "slide", duration: 200 }, Q = { type: "slide", duration: 0 }, h = a.forwardRef((I, T) => {
|
|
16
|
+
const { children: b, className: D, style: m } = I;
|
|
17
|
+
j(N);
|
|
18
|
+
const E = K(N), {
|
|
19
|
+
animation: l,
|
|
20
|
+
expanded: s,
|
|
21
|
+
mode: o,
|
|
22
|
+
position: e,
|
|
23
|
+
onOverlayClick: W,
|
|
24
|
+
mini: r,
|
|
25
|
+
dir: c,
|
|
26
|
+
width: d,
|
|
27
|
+
miniWidth: u,
|
|
28
|
+
items: p,
|
|
29
|
+
item: g,
|
|
30
|
+
onSelect: x
|
|
31
|
+
} = a.useContext(S), i = a.useRef(null), A = a.useCallback(
|
|
32
|
+
() => {
|
|
33
|
+
i.current && i.current.focus();
|
|
34
|
+
},
|
|
35
|
+
[]
|
|
36
|
+
), t = typeof l != "boolean" ? l : l === !1 ? Q : J, y = d || z, f = u || G;
|
|
37
|
+
a.useImperativeHandle(T, () => ({
|
|
38
|
+
element: i.current,
|
|
39
|
+
focus: A
|
|
40
|
+
}));
|
|
41
|
+
const O = a.useMemo(
|
|
42
|
+
() => "k-widget k-drawer " + V(
|
|
43
|
+
{
|
|
44
|
+
"k-drawer-start": e === "start",
|
|
45
|
+
"k-drawer-end": e === "end"
|
|
46
|
+
},
|
|
47
|
+
D
|
|
48
|
+
),
|
|
49
|
+
[e]
|
|
50
|
+
), C = {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
flexBasis: y,
|
|
53
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
54
|
+
/* Safari */
|
|
55
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
56
|
+
}, M = {
|
|
57
|
+
opacity: 1,
|
|
58
|
+
transform: "translateX(0px)",
|
|
59
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
60
|
+
/* Safari */
|
|
61
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
62
|
+
}, P = {
|
|
63
|
+
opacity: r ? 1 : 0,
|
|
64
|
+
flexBasis: r ? f : 0,
|
|
65
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
66
|
+
/* Safari */
|
|
67
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
68
|
+
}, _ = {
|
|
69
|
+
opacity: 0,
|
|
70
|
+
transform: "translateX(-100%)",
|
|
71
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
72
|
+
/* Safari */
|
|
73
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
74
|
+
}, R = {
|
|
75
|
+
opacity: 0,
|
|
76
|
+
transform: "translateX(100%)",
|
|
77
|
+
WebkitTransition: "all " + (t && t.duration) + "ms",
|
|
78
|
+
/* Safari */
|
|
79
|
+
transition: "all " + (t && t.duration) + "ms"
|
|
80
|
+
}, w = {
|
|
81
|
+
transform: "translateX(0%)",
|
|
82
|
+
WebkitTransitionDuration: (t && t.duration) + "ms",
|
|
83
|
+
/* Safari */
|
|
84
|
+
transitionDuration: (t && t.duration) + "ms"
|
|
85
|
+
}, X = s ? o === "push" ? C : M : o === "push" ? P : c === "ltr" && e === "start" || c === "rtl" && e === "end" ? r ? w : _ : r ? w : R, F = p && /* @__PURE__ */ a.createElement(
|
|
86
|
+
"ul",
|
|
87
|
+
{
|
|
88
|
+
className: "k-drawer-items",
|
|
89
|
+
role: "menubar",
|
|
90
|
+
"aria-label": "drawer-list",
|
|
91
|
+
"aria-expanded": s
|
|
92
|
+
},
|
|
93
|
+
p.map(
|
|
94
|
+
(L, v) => {
|
|
95
|
+
const U = {
|
|
96
|
+
index: v,
|
|
97
|
+
...L,
|
|
98
|
+
onSelect: x
|
|
99
|
+
}, H = g || B;
|
|
100
|
+
return /* @__PURE__ */ a.createElement(H, { key: v, ...U });
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
), k = /* @__PURE__ */ a.createElement(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
style: t ? { ...X, ...m } : m,
|
|
107
|
+
className: O,
|
|
108
|
+
ref: i
|
|
109
|
+
},
|
|
110
|
+
/* @__PURE__ */ a.createElement(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
className: "k-drawer-wrapper",
|
|
114
|
+
style: !s && r && o === "overlay" ? { width: f } : { width: y }
|
|
115
|
+
},
|
|
116
|
+
F || b
|
|
117
|
+
),
|
|
118
|
+
E && /* @__PURE__ */ a.createElement(q, null)
|
|
119
|
+
);
|
|
120
|
+
return o === "overlay" ? /* @__PURE__ */ a.createElement(a.Fragment, null, s && /* @__PURE__ */ a.createElement("div", { className: "k-overlay", onClick: W }), k) : k;
|
|
121
|
+
});
|
|
122
|
+
h.propTypes = {
|
|
123
|
+
children: n.any,
|
|
124
|
+
className: n.string,
|
|
125
|
+
style: n.object,
|
|
126
|
+
item: n.any,
|
|
127
|
+
tabIndex: n.number
|
|
128
|
+
};
|
|
129
|
+
h.displayName = "KendoDrawerNavigation";
|
|
130
|
+
export {
|
|
131
|
+
h as DrawerNavigation
|
|
132
|
+
};
|
|
@@ -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 o=require("react");function a(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=a(o),c={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},l=i.createContext(c);exports.DrawerContext=l;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 t from "react";
|
|
10
|
+
const e = {
|
|
11
|
+
animation: !0,
|
|
12
|
+
expanded: !1,
|
|
13
|
+
mode: "overlay",
|
|
14
|
+
position: "start",
|
|
15
|
+
mini: !1,
|
|
16
|
+
dir: "ltr",
|
|
17
|
+
width: 240,
|
|
18
|
+
miniWidth: 50
|
|
19
|
+
}, i = t.createContext(e);
|
|
20
|
+
export {
|
|
21
|
+
i as DrawerContext
|
|
22
|
+
};
|
|
@@ -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 P=require("react"),n=require("prop-types"),t=require("@progress/kendo-react-common"),R=require("../package-metadata.js"),y=require("@progress/kendo-svg-icons");function j(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(d,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return d.default=e,Object.freeze(d)}const a=j(P),f=a.forwardRef((e,d)=>{t.validatePackage(R.packageMetadata);const o=a.useRef(null),[i,k]=a.useState(!1),m=a.useCallback(()=>({element:o.current}),[]);a.useImperativeHandle(d,m);const{expanded:c=!1,disabled:s,title:p,subtitle:v,onAction:r,expandIcon:u,collapseIcon:b,expandSVGIcon:g,collapseSVGIcon:x}=e,I=a.useCallback(l=>{t.dispatchEvent(r,l,m(),{expanded:c})},[r,c]),N=a.useCallback(l=>{(l.keyCode===t.Keys.enter||l.keyCode===t.Keys.space)&&(l.preventDefault(),t.dispatchEvent(r,l,m(),{expanded:c}))},[r,c]),E=a.useCallback(()=>{e.disabled||k(!0)},[e.disabled]),h=a.useCallback(()=>{e.disabled||k(!1)},[e.disabled]),{onFocus:C,onBlur:S}=t.useAsyncFocusBlur({onFocus:E,onBlur:h});return a.createElement("div",{ref:o,className:t.classNames("k-expander",e.className,{"k-expanded":c,"k-focus":i&&!s,"k-disabled":s}),onFocus:C,onBlur:S,style:e.style,id:e.id,dir:t.useRtl(o,e.dir),onKeyDown:s?void 0:N},a.createElement("div",{role:"button","aria-controls":e.ariaControls,"aria-expanded":c,"aria-disabled":s,tabIndex:t.getTabIndex(e.tabIndex,s),className:"k-expander-header",onClick:s?void 0:I},p!==void 0?a.createElement("div",{className:"k-expander-title"},p):void 0,a.createElement("span",{className:"k-spacer"}),v!==void 0?a.createElement("div",{className:"k-expander-sub-title"},v):void 0,a.createElement("span",{className:"k-expander-indicator"},a.createElement(t.IconWrap,{name:c?b?void 0:"chevron-up":u?void 0:"chevron-down",icon:c?!x&&!b?y.chevronUpIcon:x:!g&&!u?y.chevronDownIcon:g,className:t.classNames(c?{[String(b)]:!!b}:{[String(u)]:!!u})}))),e.children)});f.propTypes={children:n.node,className:n.string,style:n.object,dir:n.string,id:n.string,tabIndex:n.number,title:n.node,subtitle:n.node,expandIcon:n.string,collapseIcon:n.string,expanded:n.bool,disabled:n.bool,onAction:n.func};f.displayName="KendoReactExpansionPanel";exports.ExpansionPanel=f;
|
|
@@ -0,0 +1,116 @@
|
|
|
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 a from "prop-types";
|
|
11
|
+
import { validatePackage as w, dispatchEvent as p, Keys as x, useAsyncFocusBlur as F, classNames as v, useRtl as S, getTabIndex as D, IconWrap as K } from "@progress/kendo-react-common";
|
|
12
|
+
import { packageMetadata as P } from "../package-metadata.mjs";
|
|
13
|
+
import { chevronDownIcon as A, chevronUpIcon as T } from "@progress/kendo-svg-icons";
|
|
14
|
+
const I = e.forwardRef((n, y) => {
|
|
15
|
+
w(P);
|
|
16
|
+
const i = e.useRef(null), [g, u] = e.useState(!1), r = e.useCallback(
|
|
17
|
+
() => ({ element: i.current }),
|
|
18
|
+
[]
|
|
19
|
+
);
|
|
20
|
+
e.useImperativeHandle(y, r);
|
|
21
|
+
const {
|
|
22
|
+
expanded: t = !1,
|
|
23
|
+
disabled: o,
|
|
24
|
+
title: m,
|
|
25
|
+
subtitle: b,
|
|
26
|
+
onAction: s,
|
|
27
|
+
expandIcon: c,
|
|
28
|
+
collapseIcon: d,
|
|
29
|
+
expandSVGIcon: f,
|
|
30
|
+
collapseSVGIcon: k
|
|
31
|
+
} = n, N = e.useCallback(
|
|
32
|
+
(l) => {
|
|
33
|
+
p(s, l, r(), { expanded: t });
|
|
34
|
+
},
|
|
35
|
+
[s, t]
|
|
36
|
+
), h = e.useCallback(
|
|
37
|
+
(l) => {
|
|
38
|
+
(l.keyCode === x.enter || l.keyCode === x.space) && (l.preventDefault(), p(s, l, r(), { expanded: t }));
|
|
39
|
+
},
|
|
40
|
+
[s, t]
|
|
41
|
+
), C = e.useCallback(() => {
|
|
42
|
+
n.disabled || u(!0);
|
|
43
|
+
}, [n.disabled]), E = e.useCallback(() => {
|
|
44
|
+
n.disabled || u(!1);
|
|
45
|
+
}, [n.disabled]), { onFocus: B, onBlur: R } = F({ onFocus: C, onBlur: E });
|
|
46
|
+
return /* @__PURE__ */ e.createElement(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref: i,
|
|
50
|
+
className: v(
|
|
51
|
+
"k-expander",
|
|
52
|
+
n.className,
|
|
53
|
+
{
|
|
54
|
+
"k-expanded": t,
|
|
55
|
+
"k-focus": g && !o,
|
|
56
|
+
"k-disabled": o
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
onFocus: B,
|
|
60
|
+
onBlur: R,
|
|
61
|
+
style: n.style,
|
|
62
|
+
id: n.id,
|
|
63
|
+
dir: S(i, n.dir),
|
|
64
|
+
onKeyDown: o ? void 0 : h
|
|
65
|
+
},
|
|
66
|
+
/* @__PURE__ */ e.createElement(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
role: "button",
|
|
70
|
+
"aria-controls": n.ariaControls,
|
|
71
|
+
"aria-expanded": t,
|
|
72
|
+
"aria-disabled": o,
|
|
73
|
+
tabIndex: D(n.tabIndex, o),
|
|
74
|
+
className: "k-expander-header",
|
|
75
|
+
onClick: o ? void 0 : N
|
|
76
|
+
},
|
|
77
|
+
m !== void 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-expander-title" }, m) : void 0,
|
|
78
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-spacer" }),
|
|
79
|
+
b !== void 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-expander-sub-title" }, b) : void 0,
|
|
80
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-expander-indicator" }, /* @__PURE__ */ e.createElement(
|
|
81
|
+
K,
|
|
82
|
+
{
|
|
83
|
+
name: t ? d ? void 0 : "chevron-up" : c ? void 0 : "chevron-down",
|
|
84
|
+
icon: t ? !k && !d ? T : k : !f && !c ? A : f,
|
|
85
|
+
className: v(
|
|
86
|
+
t ? {
|
|
87
|
+
[String(d)]: !!d
|
|
88
|
+
} : {
|
|
89
|
+
[String(c)]: !!c
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
))
|
|
94
|
+
),
|
|
95
|
+
n.children
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
I.propTypes = {
|
|
99
|
+
children: a.node,
|
|
100
|
+
className: a.string,
|
|
101
|
+
style: a.object,
|
|
102
|
+
dir: a.string,
|
|
103
|
+
id: a.string,
|
|
104
|
+
tabIndex: a.number,
|
|
105
|
+
title: a.node,
|
|
106
|
+
subtitle: a.node,
|
|
107
|
+
expandIcon: a.string,
|
|
108
|
+
collapseIcon: a.string,
|
|
109
|
+
expanded: a.bool,
|
|
110
|
+
disabled: a.bool,
|
|
111
|
+
onAction: a.func
|
|
112
|
+
};
|
|
113
|
+
I.displayName = "KendoReactExpansionPanel";
|
|
114
|
+
export {
|
|
115
|
+
I as ExpansionPanel
|
|
116
|
+
};
|
|
@@ -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 o=require("@progress/kendo-react-common"),l=require("react");function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=s(l),r=a.forwardRef((e,t)=>a.createElement("div",{ref:t,...e,className:o.classNames("k-expander-content-wrapper",e.className)},a.createElement("div",{className:"k-expander-content"},e.children)));r.displayName="KendoReactExpansionPanelContent";exports.ExpansionPanelContent=r;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { classNames as t } from "@progress/kendo-react-common";
|
|
10
|
+
import * as a from "react";
|
|
11
|
+
const r = a.forwardRef((e, n) => /* @__PURE__ */ a.createElement(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
ref: n,
|
|
15
|
+
...e,
|
|
16
|
+
className: t("k-expander-content-wrapper", e.className)
|
|
17
|
+
},
|
|
18
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-expander-content" }, e.children)
|
|
19
|
+
));
|
|
20
|
+
r.displayName = "KendoReactExpansionPanelContent";
|
|
21
|
+
export {
|
|
22
|
+
r as ExpansionPanelContent
|
|
23
|
+
};
|
|
@@ -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 O=require("react"),t=require("prop-types"),T=require("../package-metadata.js"),d=require("@progress/kendo-react-common");function R(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(l,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return l.default=e,Object.freeze(l)}const n=R(O),u=n.forwardRef((e,l)=>{d.validatePackage(T.packageMetadata);const a=n.useRef(null),c=n.useCallback(()=>({element:a.current}),[]);n.useImperativeHandle(l,c);const{className:m,style:y,id:f,children:h,gap:i}=e,p=d.useId(),o=n.useMemo(()=>e.align&&e.align.horizontal?e.align.horizontal:g.hAlign,[e.align]),r=n.useMemo(()=>e.align&&e.align.vertical?e.align.vertical:g.vAlign,[e.align]),b=n.useMemo(()=>d.classNames("k-grid-layout",{"k-justify-items-start":o==="start","k-justify-items-center":o==="center","k-justify-items-end":o==="end","k-justify-items-stretch":o==="stretch","k-align-items-start":r==="top","k-align-items-center":r==="middle","k-align-items-end":r==="bottom","k-align-items-stretch":r==="stretch"},m),[o,r,m]),k=i?`${typeof i.rows=="number"?i.rows+"px":i.rows} ${typeof i.cols=="number"?i.cols+"px":i.cols}`:void 0,v=e.rows&&e.rows.map(s=>`${typeof s.height=="number"?s.height+"px":s.height}`).join(" "),j=e.cols&&e.cols.map(s=>`${typeof s.width=="number"?s.width+"px":s.width}`).join(" "),w={gap:k,gridTemplateColumns:j,gridTemplateRows:v,...y};return n.createElement("div",{ref:a,className:b,style:w,id:f||p},h)}),g={hAlign:"stretch",vAlign:"stretch",gap:void 0};u.propTypes={className:t.string,style:t.object,children:t.any,id:t.string,gap:t.shape({rows:t.oneOfType([t.string,t.number]),columns:t.oneOfType([t.string,t.number])}),align:t.shape({vertical:t.oneOf(["top","middle","bottom","stretch"]),horizontal:t.oneOf(["start","center","end","stretch"])})};u.defaultProps=g;u.displayName="KendoReactGridLayout";exports.GridLayout=u;
|