@progress/kendo-react-layout 7.2.4-develop.3 → 7.2.4-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,238 @@
|
|
|
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 S from "react";
|
|
10
|
+
import { SplitterPane as T } from "./SplitterPane.mjs";
|
|
11
|
+
import { SplitterBar as b } from "./SplitterBar.mjs";
|
|
12
|
+
import { validatePackage as w, classNames as B } from "@progress/kendo-react-common";
|
|
13
|
+
import { packageMetadata as N } from "../package-metadata.mjs";
|
|
14
|
+
import { splitBarLabel as O, messages as R } from "./messages/index.mjs";
|
|
15
|
+
import { provideLocalizationService as _ } from "@progress/kendo-react-intl";
|
|
16
|
+
const k = {
|
|
17
|
+
collapsible: !1,
|
|
18
|
+
collapsed: !1,
|
|
19
|
+
resizable: !0,
|
|
20
|
+
scrollable: !0
|
|
21
|
+
}, K = 150, D = class D extends S.Component {
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
constructor(s) {
|
|
26
|
+
super(s), this._container = null, this.validatePanes = (t) => {
|
|
27
|
+
if (!t.filter((i) => i.size === void 0).length)
|
|
28
|
+
throw new Error("The Splitter should have at least one pane without a set size.");
|
|
29
|
+
}, this.mapPaneOptions = (t, e) => {
|
|
30
|
+
const i = this.orientation, { dragIndex: r, isDragging: a } = this.state, l = [];
|
|
31
|
+
for (let n = 0; n < e.length; n++) {
|
|
32
|
+
let o = !1;
|
|
33
|
+
const p = e[n];
|
|
34
|
+
S.isValidElement(p) && (o = p.type.displayName === "Splitter");
|
|
35
|
+
let h = !1;
|
|
36
|
+
a && r !== void 0 && (h = r === n || r + 1 === n), l.push({
|
|
37
|
+
...k,
|
|
38
|
+
orientation: i,
|
|
39
|
+
containsSplitter: o,
|
|
40
|
+
overlay: h,
|
|
41
|
+
...(t || [])[n]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return l;
|
|
45
|
+
}, this.mapSplitterPanes = (t, e) => {
|
|
46
|
+
const i = _(this).toLanguageString(O, R[O]);
|
|
47
|
+
return t.map((r, a) => {
|
|
48
|
+
let l;
|
|
49
|
+
const n = a * 2, o = n + 1;
|
|
50
|
+
if (a + 1 < t.length) {
|
|
51
|
+
const h = t[a + 1];
|
|
52
|
+
l = /* @__PURE__ */ S.createElement(
|
|
53
|
+
b,
|
|
54
|
+
{
|
|
55
|
+
key: o,
|
|
56
|
+
index: a,
|
|
57
|
+
orientation: r.orientation,
|
|
58
|
+
prev: r,
|
|
59
|
+
next: h,
|
|
60
|
+
ariaLabel: i,
|
|
61
|
+
onDrag: this.onBarDragResize,
|
|
62
|
+
onToggle: this.onBarToggle,
|
|
63
|
+
onKeyboardResize: this.onBarKeyboardResize,
|
|
64
|
+
isRtl: this.isRtl
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return [/* @__PURE__ */ S.createElement(
|
|
69
|
+
T,
|
|
70
|
+
{
|
|
71
|
+
key: n,
|
|
72
|
+
...r
|
|
73
|
+
},
|
|
74
|
+
e[a]
|
|
75
|
+
), l];
|
|
76
|
+
});
|
|
77
|
+
}, this.onBarToggle = (t, e) => {
|
|
78
|
+
const r = this.panesOptions(this.panesContent).map((a, l) => {
|
|
79
|
+
const n = this.getPaneProps(a);
|
|
80
|
+
return l === t ? {
|
|
81
|
+
...n,
|
|
82
|
+
collapsed: !a.collapsed
|
|
83
|
+
} : {
|
|
84
|
+
...n
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
this.props.onChange && this.props.onChange({
|
|
88
|
+
newState: r,
|
|
89
|
+
isLast: !0,
|
|
90
|
+
nativeEvent: e
|
|
91
|
+
});
|
|
92
|
+
}, this.onBarDragResize = (t, e, i, r, a) => {
|
|
93
|
+
const l = (/* @__PURE__ */ new Date()).getTime(), { pageX: n, pageY: o } = t, { prevElement: p, nextElement: h } = this.surroudingPanes(e);
|
|
94
|
+
if (!p || !h)
|
|
95
|
+
return;
|
|
96
|
+
if (r) {
|
|
97
|
+
this.setState({
|
|
98
|
+
isDragging: !0,
|
|
99
|
+
dragIndex: i,
|
|
100
|
+
startTime: l,
|
|
101
|
+
originalX: n,
|
|
102
|
+
originalY: o,
|
|
103
|
+
originalPrevSize: this.elementSize(p),
|
|
104
|
+
originalNextSize: this.elementSize(h)
|
|
105
|
+
});
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const { originalPrevSize: d, originalNextSize: g, startTime: P, originalX: f, originalY: u } = this.state;
|
|
109
|
+
if (!r && l - P < K) {
|
|
110
|
+
a && this.resetDragState();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let c;
|
|
114
|
+
this.orientation === "vertical" ? c = o - u : this.isRtl ? c = f - n : c = n - f, this.resize(i, i + 1, d, g, c, a, t), a && this.resetDragState();
|
|
115
|
+
}, this.onBarKeyboardResize = (t, e, i, r) => {
|
|
116
|
+
const { prevElement: a, nextElement: l } = this.surroudingPanes(t), n = this.elementSize(a), o = this.elementSize(l);
|
|
117
|
+
this.resize(e, e + 1, n, o, i, !0, r);
|
|
118
|
+
}, this.containerSize = () => this._container ? this.elementSize(this._container, !0) : 0, this.panesOptions = (t) => this.mapPaneOptions(this.panes, t), this.elementSize = (t, e) => {
|
|
119
|
+
const i = e ? "client" : "offset";
|
|
120
|
+
return this.orientation === "vertical" ? t[`${i}Height`] : t[`${i}Width`];
|
|
121
|
+
}, this.clamp = (t, e, i) => Math.min(e, Math.max(t, i)), this.fixedSize = (t) => t && t.length > 0, w(N), this.state = {
|
|
122
|
+
isDragging: !1,
|
|
123
|
+
dragIndex: void 0,
|
|
124
|
+
startTime: 0,
|
|
125
|
+
originalX: 0,
|
|
126
|
+
originalY: 0,
|
|
127
|
+
originalPrevSize: 0,
|
|
128
|
+
originalNextSize: 0,
|
|
129
|
+
panes: s.defaultPanes || []
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
get isControlledState() {
|
|
133
|
+
return this.props.panes !== void 0;
|
|
134
|
+
}
|
|
135
|
+
get panes() {
|
|
136
|
+
return this.panesDuringOnChange !== void 0 ? this.panesDuringOnChange : this.isControlledState ? this.props.panes : this.state.panes;
|
|
137
|
+
}
|
|
138
|
+
get orientation() {
|
|
139
|
+
return this.props.orientation || "horizontal";
|
|
140
|
+
}
|
|
141
|
+
get isRtl() {
|
|
142
|
+
return this._container && getComputedStyle(this._container).direction === "rtl" || !1;
|
|
143
|
+
}
|
|
144
|
+
get panesContent() {
|
|
145
|
+
return S.Children.toArray(this.props.children).filter((s) => s);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @hidden
|
|
149
|
+
*/
|
|
150
|
+
render() {
|
|
151
|
+
const s = this.panesContent, t = this.panesOptions(s), e = B(
|
|
152
|
+
"k-widget",
|
|
153
|
+
"k-splitter",
|
|
154
|
+
"k-splitter-flex",
|
|
155
|
+
`k-splitter-${this.orientation}`,
|
|
156
|
+
this.props.className
|
|
157
|
+
);
|
|
158
|
+
return this.validatePanes(t), /* @__PURE__ */ S.createElement(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
style: this.props.style,
|
|
162
|
+
ref: (i) => this._container = i,
|
|
163
|
+
className: e
|
|
164
|
+
},
|
|
165
|
+
this.mapSplitterPanes(t, s)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
surroudingPanes(s) {
|
|
169
|
+
return {
|
|
170
|
+
prevElement: s.previousElementSibling,
|
|
171
|
+
nextElement: s.nextElementSibling
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
isPercent(s) {
|
|
175
|
+
return /%$/.test(s);
|
|
176
|
+
}
|
|
177
|
+
toPixels(s, t) {
|
|
178
|
+
let e = parseInt(s, 10);
|
|
179
|
+
return this.isPercent(s) && (e = t * e / 100), e;
|
|
180
|
+
}
|
|
181
|
+
resetDragState() {
|
|
182
|
+
this.setState({
|
|
183
|
+
isDragging: !1,
|
|
184
|
+
dragIndex: void 0,
|
|
185
|
+
startTime: 0,
|
|
186
|
+
originalX: 0,
|
|
187
|
+
originalY: 0,
|
|
188
|
+
originalPrevSize: 0,
|
|
189
|
+
originalNextSize: 0
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
resize(s, t, e, i, r, a, l) {
|
|
193
|
+
const n = this.panesOptions(this.panesContent), o = n[s], p = n[t], h = e + i, d = this.containerSize(), g = (m) => this.toPixels(m, d), P = {
|
|
194
|
+
index: s,
|
|
195
|
+
initialSize: e,
|
|
196
|
+
min: g(o.min) || h - g(p.max) || 0,
|
|
197
|
+
max: g(o.max) || h - g(p.min) || h
|
|
198
|
+
}, f = {
|
|
199
|
+
index: t,
|
|
200
|
+
initialSize: i,
|
|
201
|
+
min: g(p.min) || h - g(o.max) || 0,
|
|
202
|
+
max: g(p.max) || h - g(o.min) || h
|
|
203
|
+
}, u = (m, v) => {
|
|
204
|
+
const z = n[m.index], E = this.clamp(m.min, m.max, m.initialSize + v);
|
|
205
|
+
return this.isPercent(z.size || "") ? 100 * E / d + "%" : E + "px";
|
|
206
|
+
};
|
|
207
|
+
let c, x;
|
|
208
|
+
this.fixedSize(o.size) && this.fixedSize(p.size) ? (c = u(P, r), x = u(f, -r)) : p.collapsible || this.fixedSize(p.size) ? x = u(f, -r) : c = u(P, r);
|
|
209
|
+
const C = n.map((m, v) => {
|
|
210
|
+
const z = this.getPaneProps(m);
|
|
211
|
+
return v === s ? {
|
|
212
|
+
...z,
|
|
213
|
+
size: c
|
|
214
|
+
} : v === t ? {
|
|
215
|
+
...z,
|
|
216
|
+
size: x
|
|
217
|
+
} : {
|
|
218
|
+
...z
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
this.panesDuringOnChange = C, this.isControlledState || this.setState({
|
|
222
|
+
panes: C
|
|
223
|
+
}), this.props.onChange && this.props.onChange({
|
|
224
|
+
newState: C,
|
|
225
|
+
isLast: a,
|
|
226
|
+
nativeEvent: l
|
|
227
|
+
}), this.panesDuringOnChange = void 0;
|
|
228
|
+
}
|
|
229
|
+
getPaneProps(s) {
|
|
230
|
+
const { orientation: t, overlay: e, containsSplitter: i, ...r } = s;
|
|
231
|
+
return r;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
D.displayName = "Splitter";
|
|
235
|
+
let y = D;
|
|
236
|
+
export {
|
|
237
|
+
y as Splitter
|
|
238
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),r=require("@progress/kendo-react-common"),a=require("@progress/kendo-svg-icons");function u(c){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>c[t]})}}return o.default=c,Object.freeze(o)}const n=u(d);class f extends n.Component{constructor(o){super(o),this.draggable=null,this.onDrag=(t,e,l)=>{const{event:s}=t,{onDrag:i,index:p}=this.props,h=this.draggable&&this.draggable.element;h&&!this.isStatic&&this.isDraggable&&i(s,h,p,e,l)},this.onFocus=()=>{this.setState({focused:!0})},this.onBlur=()=>{this.setState({focused:!1})},this.onToggle=t=>{const{onToggle:e,index:l,prev:s,next:i}=this.props;(s.collapsible||i.collapsible)&&e(s.collapsible?l:l+1,t)},this.onPrevToggle=t=>{const{onToggle:e,index:l,prev:s}=this.props;s.collapsible&&e(l,t)},this.onNextToggle=t=>{const{onToggle:e,index:l,next:s}=this.props;s.collapsible&&e(l+1,t)},this.onKeyDown=t=>{const e=t&&t.keyCode,l=this.isHorizontal,{index:s}=this.props,i=this.draggable&&this.draggable.element,p=(h,g,b)=>{t.preventDefault(),this.props.onKeyboardResize(h,g,b,t)};i&&(e===r.Keys.enter?(t.preventDefault(),this.onToggle(t)):this.isDraggable&&(l&&e===r.Keys.left?p(i,s,-10):l&&e===r.Keys.right?p(i,s,10):!l&&e===r.Keys.up?p(i,s,-10):!l&&e===r.Keys.down&&p(i,s,10)))},this.state={focused:!1}}get isStatic(){const{prev:o,next:t}=this.props,e=o.resizable&&t.resizable,l=o.collapsible||t.collapsible;return!e&&!l}get isDraggable(){const{prev:o,next:t}=this.props,e=o.resizable&&t.resizable,l=o.collapsed||t.collapsed;return!!e&&!l}get isHorizontal(){return this.props.orientation==="horizontal"}render(){const o=this.isDraggable,t=this.isStatic,e=this.isHorizontal,l=r.classNames("k-splitbar",{"k-focus":this.state.focused,"k-splitbar-horizontal":e,"k-splitbar-vertical":!e,"k-splitbar-draggable-horizontal":e&&o,"k-splitbar-draggable-vertical":!e&&o,"k-splitbar-static-horizontal":e&&t,"k-splitbar-static-vertical":!e&&t});return n.createElement(r.Draggable,{onPress:s=>this.onDrag(s,!0,!1),onDrag:s=>this.onDrag(s,!1,!1),onRelease:s=>this.onDrag(s,!1,!0),ref:s=>{this.draggable=s}},n.createElement("div",{tabIndex:t?-1:0,role:"separator","aria-valuenow":0,"aria-label":this.props.ariaLabel,"aria-orientation":e?"vertical":void 0,className:l,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},this.props.prev.collapsible&&n.createElement("div",{className:"k-collapse-prev",onClick:this.onPrevToggle},n.createElement(r.IconWrap,{name:this.props.prev.collapsible?e?this.props.prev.collapsed?this.props.isRtl?"caret-alt-left":"caret-alt-right":this.props.isRtl?"caret-alt-right":"caret-alt-left":this.props.prev.collapsed?"caret-alt-down":"caret-alt-up":void 0,icon:this.props.prev.collapsible?e?this.props.prev.collapsed?this.props.isRtl?a.caretAltLeftIcon:a.caretAltRightIcon:this.props.isRtl?a.caretAltRightIcon:a.caretAltLeftIcon:this.props.prev.collapsed?a.caretAltDownIcon:a.caretAltUpIcon:void 0,size:"xsmall"})),n.createElement("div",{className:"k-resize-handle"}),this.props.next.collapsible&&n.createElement("div",{className:"k-collapse-next",onClick:this.onNextToggle},n.createElement(r.IconWrap,{name:this.props.next.collapsible?e?this.props.next.collapsed?this.props.isRtl?"caret-alt-right":"caret-alt-left":this.props.isRtl?"caret-alt-left":"caret-alt-right":this.props.next.collapsed?"caret-alt-up":"caret-alt-down":void 0,icon:this.props.next.collapsible?e?this.props.next.collapsed?this.props.isRtl?a.caretAltRightIcon:a.caretAltLeftIcon:this.props.isRtl?a.caretAltLeftIcon:a.caretAltRightIcon:this.props.next.collapsed?a.caretAltUpIcon:a.caretAltDownIcon:void 0,size:"xsmall"}))))}}exports.SplitterBar=f;
|
|
@@ -0,0 +1,129 @@
|
|
|
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 { Keys as n, classNames as m, Draggable as v, IconWrap as g } from "@progress/kendo-react-common";
|
|
11
|
+
import { caretAltLeftIcon as c, caretAltRightIcon as h, caretAltDownIcon as b, caretAltUpIcon as d } from "@progress/kendo-svg-icons";
|
|
12
|
+
class k extends a.Component {
|
|
13
|
+
constructor(o) {
|
|
14
|
+
super(o), this.draggable = null, this.onDrag = (t, e, l) => {
|
|
15
|
+
const { event: s } = t, { onDrag: i, index: r } = this.props, p = this.draggable && this.draggable.element;
|
|
16
|
+
p && !this.isStatic && this.isDraggable && i(s, p, r, e, l);
|
|
17
|
+
}, this.onFocus = () => {
|
|
18
|
+
this.setState({
|
|
19
|
+
focused: !0
|
|
20
|
+
});
|
|
21
|
+
}, this.onBlur = () => {
|
|
22
|
+
this.setState({
|
|
23
|
+
focused: !1
|
|
24
|
+
});
|
|
25
|
+
}, this.onToggle = (t) => {
|
|
26
|
+
const { onToggle: e, index: l, prev: s, next: i } = this.props;
|
|
27
|
+
(s.collapsible || i.collapsible) && e(s.collapsible ? l : l + 1, t);
|
|
28
|
+
}, this.onPrevToggle = (t) => {
|
|
29
|
+
const { onToggle: e, index: l, prev: s } = this.props;
|
|
30
|
+
s.collapsible && e(l, t);
|
|
31
|
+
}, this.onNextToggle = (t) => {
|
|
32
|
+
const { onToggle: e, index: l, next: s } = this.props;
|
|
33
|
+
s.collapsible && e(l + 1, t);
|
|
34
|
+
}, this.onKeyDown = (t) => {
|
|
35
|
+
const e = t && t.keyCode, l = this.isHorizontal, { index: s } = this.props, i = this.draggable && this.draggable.element, r = (p, f, u) => {
|
|
36
|
+
t.preventDefault(), this.props.onKeyboardResize(p, f, u, t);
|
|
37
|
+
};
|
|
38
|
+
i && (e === n.enter ? (t.preventDefault(), this.onToggle(t)) : this.isDraggable && (l && e === n.left ? r(i, s, -10) : l && e === n.right ? r(i, s, 10) : !l && e === n.up ? r(i, s, -10) : !l && e === n.down && r(i, s, 10)));
|
|
39
|
+
}, this.state = {
|
|
40
|
+
focused: !1
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
get isStatic() {
|
|
44
|
+
const { prev: o, next: t } = this.props, e = o.resizable && t.resizable, l = o.collapsible || t.collapsible;
|
|
45
|
+
return !e && !l;
|
|
46
|
+
}
|
|
47
|
+
get isDraggable() {
|
|
48
|
+
const { prev: o, next: t } = this.props, e = o.resizable && t.resizable, l = o.collapsed || t.collapsed;
|
|
49
|
+
return !!e && !l;
|
|
50
|
+
}
|
|
51
|
+
get isHorizontal() {
|
|
52
|
+
return this.props.orientation === "horizontal";
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
const o = this.isDraggable, t = this.isStatic, e = this.isHorizontal, l = m(
|
|
56
|
+
"k-splitbar",
|
|
57
|
+
{
|
|
58
|
+
"k-focus": this.state.focused,
|
|
59
|
+
"k-splitbar-horizontal": e,
|
|
60
|
+
"k-splitbar-vertical": !e,
|
|
61
|
+
"k-splitbar-draggable-horizontal": e && o,
|
|
62
|
+
"k-splitbar-draggable-vertical": !e && o,
|
|
63
|
+
"k-splitbar-static-horizontal": e && t,
|
|
64
|
+
"k-splitbar-static-vertical": !e && t
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ a.createElement(
|
|
68
|
+
v,
|
|
69
|
+
{
|
|
70
|
+
onPress: (s) => this.onDrag(s, !0, !1),
|
|
71
|
+
onDrag: (s) => this.onDrag(s, !1, !1),
|
|
72
|
+
onRelease: (s) => this.onDrag(s, !1, !0),
|
|
73
|
+
ref: (s) => {
|
|
74
|
+
this.draggable = s;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
/* @__PURE__ */ a.createElement(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
tabIndex: t ? -1 : 0,
|
|
81
|
+
role: "separator",
|
|
82
|
+
"aria-valuenow": 0,
|
|
83
|
+
"aria-label": this.props.ariaLabel,
|
|
84
|
+
"aria-orientation": e ? "vertical" : void 0,
|
|
85
|
+
className: l,
|
|
86
|
+
style: { touchAction: "none" },
|
|
87
|
+
onFocus: this.onFocus,
|
|
88
|
+
onBlur: this.onBlur,
|
|
89
|
+
onDoubleClick: this.onToggle,
|
|
90
|
+
onKeyDown: this.onKeyDown
|
|
91
|
+
},
|
|
92
|
+
this.props.prev.collapsible && /* @__PURE__ */ a.createElement(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: "k-collapse-prev",
|
|
96
|
+
onClick: this.onPrevToggle
|
|
97
|
+
},
|
|
98
|
+
/* @__PURE__ */ a.createElement(
|
|
99
|
+
g,
|
|
100
|
+
{
|
|
101
|
+
name: this.props.prev.collapsible ? e ? this.props.prev.collapsed ? this.props.isRtl ? "caret-alt-left" : "caret-alt-right" : this.props.isRtl ? "caret-alt-right" : "caret-alt-left" : this.props.prev.collapsed ? "caret-alt-down" : "caret-alt-up" : void 0,
|
|
102
|
+
icon: this.props.prev.collapsible ? e ? this.props.prev.collapsed ? this.props.isRtl ? c : h : this.props.isRtl ? h : c : this.props.prev.collapsed ? b : d : void 0,
|
|
103
|
+
size: "xsmall"
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-resize-handle" }),
|
|
108
|
+
this.props.next.collapsible && /* @__PURE__ */ a.createElement(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: "k-collapse-next",
|
|
112
|
+
onClick: this.onNextToggle
|
|
113
|
+
},
|
|
114
|
+
/* @__PURE__ */ a.createElement(
|
|
115
|
+
g,
|
|
116
|
+
{
|
|
117
|
+
name: this.props.next.collapsible ? e ? this.props.next.collapsed ? this.props.isRtl ? "caret-alt-right" : "caret-alt-left" : this.props.isRtl ? "caret-alt-left" : "caret-alt-right" : this.props.next.collapsed ? "caret-alt-up" : "caret-alt-down" : void 0,
|
|
118
|
+
icon: this.props.next.collapsible ? e ? this.props.next.collapsed ? this.props.isRtl ? h : c : this.props.isRtl ? c : h : this.props.next.collapsed ? d : b : void 0,
|
|
119
|
+
size: "xsmall"
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
k as SplitterBar
|
|
129
|
+
};
|
|
@@ -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 m=require("react"),b=require("@progress/kendo-react-common");function k(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(l,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return l.default=t,Object.freeze(l)}const s=k(m);class g extends s.Component{render(){const{id:l,size:e,collapsed:n,overlay:r,containsSplitter:a,collapsible:o,resizable:c,scrollable:i,keepMounted:p}=this.props,d=e&&e.length>0,u={flexBasis:e},f=b.classNames("k-pane",{"k-hidden":n,hidden:n,"k-pane-flex":a,"k-pane-static":!c&&!o||d,"k-scrollable":i});return s.createElement("div",{id:l,role:"group",style:u,className:f},!n||p?this.props.children:void 0,r?s.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)}}exports.SplitterPane=g;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 l from "react";
|
|
10
|
+
import { classNames as k } from "@progress/kendo-react-common";
|
|
11
|
+
class f extends l.Component {
|
|
12
|
+
render() {
|
|
13
|
+
const {
|
|
14
|
+
id: t,
|
|
15
|
+
size: e,
|
|
16
|
+
collapsed: s,
|
|
17
|
+
overlay: a,
|
|
18
|
+
containsSplitter: o,
|
|
19
|
+
collapsible: r,
|
|
20
|
+
resizable: i,
|
|
21
|
+
scrollable: n,
|
|
22
|
+
keepMounted: c
|
|
23
|
+
} = this.props, p = e && e.length > 0, d = {
|
|
24
|
+
flexBasis: e
|
|
25
|
+
}, m = k(
|
|
26
|
+
"k-pane",
|
|
27
|
+
{
|
|
28
|
+
"k-hidden": s,
|
|
29
|
+
hidden: s,
|
|
30
|
+
"k-pane-flex": o,
|
|
31
|
+
"k-pane-static": !i && !r || p,
|
|
32
|
+
"k-scrollable": n
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
return /* @__PURE__ */ l.createElement(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
id: t,
|
|
39
|
+
role: "group",
|
|
40
|
+
style: d,
|
|
41
|
+
className: m
|
|
42
|
+
},
|
|
43
|
+
!s || c ? this.props.children : void 0,
|
|
44
|
+
a ? /* @__PURE__ */ l.createElement("div", { className: "k-splitter-overlay k-overlay" }) : void 0
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
f as SplitterPane
|
|
50
|
+
};
|
|
@@ -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 e="splitBarLabel",s={[e]:"split bar"};exports.messages=s;exports.splitBarLabel=e;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const s = "splitBarLabel", e = {
|
|
10
|
+
[s]: "split bar"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as messages,
|
|
14
|
+
s as splitBarLabel
|
|
15
|
+
};
|
|
@@ -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 j=require("react"),n=require("prop-types"),O=require("../package-metadata.js"),d=require("@progress/kendo-react-common");function z(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(s,c,l.get?l:{enumerable:!0,get:()=>t[c]})}}return s.default=t,Object.freeze(s)}const i=z(j),g=i.forwardRef((t,s)=>{d.validatePackage(O.packageMetadata);const c=i.useRef(null),l=i.useCallback(()=>({element:c.current}),[]);i.useImperativeHandle(s,l);const{className:m,style:f,id:y,children:k}=t,h=d.useId(),r=i.useMemo(()=>t.orientation||u.orientation,[t.orientation]),e=r==="horizontal",a=i.useMemo(()=>t.align&&t.align.horizontal?t.align.horizontal:u.hAlign,[t.align]),o=i.useMemo(()=>t.align&&t.align.vertical?t.align.vertical:u.vAlign,[t.align]),b=i.useMemo(()=>d.classNames("k-stack-layout",{"k-hstack":r==="horizontal","k-vstack":r==="vertical","k-justify-content-start":e&&a==="start"||!e&&o==="top","k-justify-content-center":e&&a==="center"||!e&&o==="middle","k-justify-content-end":e&&a==="end"||!e&&o==="bottom","k-justify-content-stretch":e&&a==="stretch"||!e&&o==="stretch","k-align-items-start":!e&&a==="start"||e&&o==="top","k-align-items-center":!e&&a==="center"||e&&o==="middle","k-align-items-end":!e&&a==="end"||e&&o==="bottom","k-align-items-stretch":!e&&a==="stretch"||e&&o==="stretch"},m),[r,e,a,o,m]),v={gap:`${typeof t.gap=="number"?t.gap+"px":t.gap}`,...f};return i.createElement("div",{ref:c,className:b,style:v,id:y||h},k)}),u={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};g.propTypes={className:n.string,style:n.object,children:n.any,id:n.string,orientation:n.oneOf(["horizontal","vertical"]),gap:n.oneOfType([n.string,n.number]),align:n.shape({vertical:n.oneOf(["top","middle","bottom","stretch"]),horizontal:n.oneOf(["start","center","end","stretch"])})};g.defaultProps=u;g.displayName="KendoReactStackLayout";exports.StackLayout=g;
|
|
@@ -0,0 +1,84 @@
|
|
|
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 o from "react";
|
|
10
|
+
import n from "prop-types";
|
|
11
|
+
import { packageMetadata as z } from "../package-metadata.mjs";
|
|
12
|
+
import { validatePackage as b, useId as A, classNames as j } from "@progress/kendo-react-common";
|
|
13
|
+
const c = o.forwardRef((e, g) => {
|
|
14
|
+
b(z);
|
|
15
|
+
const r = o.useRef(null), d = o.useCallback(
|
|
16
|
+
() => ({
|
|
17
|
+
element: r.current
|
|
18
|
+
}),
|
|
19
|
+
[]
|
|
20
|
+
);
|
|
21
|
+
o.useImperativeHandle(g, d);
|
|
22
|
+
const { className: m, style: u, id: h, children: k } = e, f = A(), s = o.useMemo(
|
|
23
|
+
() => e.orientation || l.orientation,
|
|
24
|
+
[e.orientation]
|
|
25
|
+
), t = s === "horizontal", a = o.useMemo(
|
|
26
|
+
() => e.align && e.align.horizontal ? e.align.horizontal : l.hAlign,
|
|
27
|
+
[e.align]
|
|
28
|
+
), i = o.useMemo(
|
|
29
|
+
() => e.align && e.align.vertical ? e.align.vertical : l.vAlign,
|
|
30
|
+
[e.align]
|
|
31
|
+
), y = o.useMemo(
|
|
32
|
+
() => j(
|
|
33
|
+
"k-stack-layout",
|
|
34
|
+
{
|
|
35
|
+
"k-hstack": s === "horizontal",
|
|
36
|
+
"k-vstack": s === "vertical",
|
|
37
|
+
"k-justify-content-start": t && a === "start" || !t && i === "top",
|
|
38
|
+
"k-justify-content-center": t && a === "center" || !t && i === "middle",
|
|
39
|
+
"k-justify-content-end": t && a === "end" || !t && i === "bottom",
|
|
40
|
+
"k-justify-content-stretch": t && a === "stretch" || !t && i === "stretch",
|
|
41
|
+
"k-align-items-start": !t && a === "start" || t && i === "top",
|
|
42
|
+
"k-align-items-center": !t && a === "center" || t && i === "middle",
|
|
43
|
+
"k-align-items-end": !t && a === "end" || t && i === "bottom",
|
|
44
|
+
"k-align-items-stretch": !t && a === "stretch" || t && i === "stretch"
|
|
45
|
+
},
|
|
46
|
+
m
|
|
47
|
+
),
|
|
48
|
+
[s, t, a, i, m]
|
|
49
|
+
), v = {
|
|
50
|
+
gap: `${typeof e.gap == "number" ? e.gap + "px" : e.gap}`,
|
|
51
|
+
...u
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ o.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
ref: r,
|
|
57
|
+
className: y,
|
|
58
|
+
style: v,
|
|
59
|
+
id: h || f
|
|
60
|
+
},
|
|
61
|
+
k
|
|
62
|
+
);
|
|
63
|
+
}), l = {
|
|
64
|
+
orientation: "horizontal",
|
|
65
|
+
hAlign: "stretch",
|
|
66
|
+
vAlign: "stretch"
|
|
67
|
+
};
|
|
68
|
+
c.propTypes = {
|
|
69
|
+
className: n.string,
|
|
70
|
+
style: n.object,
|
|
71
|
+
children: n.any,
|
|
72
|
+
id: n.string,
|
|
73
|
+
orientation: n.oneOf(["horizontal", "vertical"]),
|
|
74
|
+
gap: n.oneOfType([n.string, n.number]),
|
|
75
|
+
align: n.shape({
|
|
76
|
+
vertical: n.oneOf(["top", "middle", "bottom", "stretch"]),
|
|
77
|
+
horizontal: n.oneOf(["start", "center", "end", "stretch"])
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
c.defaultProps = l;
|
|
81
|
+
c.displayName = "KendoReactStackLayout";
|
|
82
|
+
export {
|
|
83
|
+
c as StackLayout
|
|
84
|
+
};
|
package/stepper/Step.js
ADDED
|
@@ -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 te=require("react"),n=require("prop-types"),ne=require("./context/StepperContext.js"),c=require("@progress/kendo-react-common"),ae=require("@progress/kendo-react-intl"),D=require("@progress/kendo-svg-icons"),L=require("./contants.js"),P=require("./messages/index.js");function se(s){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const l in s)if(l!=="default"){const p=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(d,l,p.get?p:{enumerable:!0,get:()=>s[l]})}}return d.default=s,Object.freeze(d)}const e=se(te),f=e.forwardRef((s,d)=>{const{children:l,className:p,current:v,disabled:o,focused:I,icon:m,svgIcon:O,index:a,isValid:t,label:b,optional:g,style:M,tabIndex:T,text:q,..._}=s,{animationDuration:N,isVertical:x,item:z,linear:V,mode:F,numOfSteps:i,value:r,onChange:E,onFocus:C,successIcon:w,errorIcon:H,successSVGIcon:W,errorSVGIcon:$}=e.useContext(ne.StepperContext),k=e.useRef(null),R=e.useCallback(()=>{k.current&&c.focusFirstFocusableChild(k.current)},[]),S=e.useCallback(()=>({element:k.current,focus:R}),[R]);e.useImperativeHandle(d,S);const h=!V||a===r-1||a===r||a===r+1,A=F==="labels"||!!m&&!!b,B=ae.useLocalization(),G=(u=>B.toLanguageString(u,P.messages[u]))(P.optionalText),U=typeof N=="number"?N:N!==!1?L.DEFAULT_ANIMATION_DURATION:L.NO_ANIMATION,K=e.useCallback(u=>{E&&!o&&c.dispatchEvent(E,u,S(),{value:a})},[E,r,o]),J=e.useCallback(u=>{C&&!o&&c.dispatchEvent(C,u,S(),void 0)},[C,o]),Q=e.useMemo(()=>c.classNames("k-step",{"k-step-first":a===0,"k-step-last":i&&a===i-1,"k-step-done":a<r,"k-step-current":v,"k-step-optional":g,"k-step-error":t!==void 0&&!t,"k-step-success":t},{"k-disabled":o,"k-focus":I},p),[a,i,r,v,g,o,I,t,p]),X=e.useMemo(()=>({maxWidth:x?void 0:`calc(100% / ${i})`,maxHeight:x?`calc(100% / ${i})`:void 0,pointerEvents:h?void 0:"none",...M}),[x,i,M,h]),j=t?w:H,y=j?e.createElement("span",{className:"k-step-indicator-icon "+j,"aria-hidden":"true"}):e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:t?"check-circle":"exclamation-circle",icon:t?W||D.checkOutlineIcon:$||D.exclamationCircleIcon}),Y=e.createElement(e.Fragment,null,F!=="labels"?e.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:U+"ms"}},m||O?!A&&t!==void 0?y:e.createElement(c.IconWrap,{className:"k-step-indicator-icon",name:m&&c.toIconName(m),icon:O}):t!==void 0?y:e.createElement("span",{className:"k-step-indicator-text"},q||a+1)):null),Z=e.createElement("span",{className:"k-step-label"},b&&e.createElement("span",{className:"k-step-text"},b),A&&t!==void 0&&y,g&&e.createElement("span",{className:"k-step-label-optional"},G)),ee=e.createElement(e.Fragment,null,Y,Z);return e.createElement("li",{ref:k,className:Q,style:X,..._},e.createElement("a",{className:"k-step-link",title:b||void 0,onClick:K,onFocus:J,tabIndex:T||(I?0:-1),"aria-current":v,"aria-disabled":o||!h||void 0,"aria-invalid":t!==void 0&&!t||void 0},z?l:ee))});f.propTypes={children:n.any,className:n.string,current:n.bool,disabled:n.bool,icon:n.string,index:n.number,isValid:n.bool,label:n.string,optional:n.bool,style:n.object,tabIndex:n.number,text:n.string};const oe={tabIndex:0};f.defaultProps=oe;f.displayName="KendoStep";exports.Step=f;
|