@progress/kendo-react-layout 9.3.1 → 9.4.0-develop.10
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 +1 -1
- package/actionsheet/ActionSheet.mjs +0 -1
- package/actionsheet/ActionSheetContent.js +1 -1
- package/actionsheet/ActionSheetContent.mjs +5 -6
- package/actionsheet/ActionSheetFooter.js +1 -1
- package/actionsheet/ActionSheetFooter.mjs +0 -1
- package/actionsheet/ActionSheetHeader.js +1 -1
- package/actionsheet/ActionSheetHeader.mjs +7 -8
- package/actionsheet/ActionSheetItem.js +1 -1
- package/actionsheet/ActionSheetItem.mjs +0 -1
- package/appbar/AppBar.js +1 -1
- package/appbar/AppBar.mjs +10 -11
- package/appbar/AppBarSection.js +1 -1
- package/appbar/AppBarSection.mjs +11 -12
- package/appbar/AppBarSpacer.js +1 -1
- package/appbar/AppBarSpacer.mjs +3 -4
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +23 -24
- package/bottomnavigation/BottomNavigationItem.js +1 -1
- package/bottomnavigation/BottomNavigationItem.mjs +11 -12
- package/bottomnavigation/models/utils.js +1 -1
- package/bottomnavigation/models/utils.mjs +4 -5
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +0 -1
- package/breadcrumb/BreadcrumbDelimiter.js +1 -1
- package/breadcrumb/BreadcrumbDelimiter.mjs +0 -1
- package/breadcrumb/BreadcrumbLink.js +1 -1
- package/breadcrumb/BreadcrumbLink.mjs +0 -1
- package/breadcrumb/BreadcrumbListItem.js +1 -1
- package/breadcrumb/BreadcrumbListItem.mjs +0 -1
- package/breadcrumb/BreadcrumbOrderedList.js +1 -1
- package/breadcrumb/BreadcrumbOrderedList.mjs +6 -7
- package/card/Avatar.js +1 -1
- package/card/Avatar.mjs +0 -1
- package/card/Card.js +1 -1
- package/card/Card.mjs +0 -1
- package/card/CardActions.js +1 -1
- package/card/CardActions.mjs +4 -5
- package/card/CardBody.js +1 -1
- package/card/CardBody.mjs +4 -5
- package/card/CardFooter.js +1 -1
- package/card/CardFooter.mjs +0 -1
- package/card/CardHeader.js +1 -1
- package/card/CardHeader.mjs +0 -1
- package/card/CardImage.js +1 -1
- package/card/CardImage.mjs +3 -4
- package/card/CardSubtitle.js +1 -1
- package/card/CardSubtitle.mjs +0 -1
- package/card/CardTitle.js +1 -1
- package/card/CardTitle.mjs +4 -5
- package/card/interfaces/Enums.js +1 -1
- package/card/interfaces/Enums.mjs +4 -5
- package/contextmenu/ContextMenu.js +1 -1
- package/contextmenu/ContextMenu.mjs +0 -1
- package/dist/cdn/js/kendo-react-layout.js +8 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +6 -7
- package/drawer/DrawerContent.js +1 -1
- package/drawer/DrawerContent.mjs +0 -1
- package/drawer/DrawerItem.js +1 -1
- package/drawer/DrawerItem.mjs +4 -5
- package/drawer/DrawerNavigation.js +1 -1
- package/drawer/DrawerNavigation.mjs +0 -1
- package/drawer/context/DrawerContext.js +1 -1
- package/drawer/context/DrawerContext.mjs +2 -3
- package/expansionpanel/ExpansionPanel.js +1 -1
- package/expansionpanel/ExpansionPanel.mjs +21 -22
- package/expansionpanel/ExpansionPanelContent.js +1 -1
- package/expansionpanel/ExpansionPanelContent.mjs +0 -1
- package/gridlayout/GridLayout.js +1 -1
- package/gridlayout/GridLayout.mjs +9 -10
- package/gridlayout/GridLayoutItem.js +1 -1
- package/gridlayout/GridLayoutItem.mjs +0 -1
- package/index.d.mts +96 -16
- package/index.d.ts +96 -16
- package/index.js +2 -1
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +0 -1
- package/menu/components/MenuItem.js +1 -1
- package/menu/components/MenuItem.mjs +2 -3
- package/menu/components/MenuItemArrow.js +1 -1
- package/menu/components/MenuItemArrow.mjs +0 -1
- package/menu/components/MenuItemInternal.js +1 -1
- package/menu/components/MenuItemInternal.mjs +1 -2
- package/menu/components/MenuItemLink.js +1 -1
- package/menu/components/MenuItemLink.mjs +0 -1
- package/menu/consts.js +1 -1
- package/menu/consts.mjs +0 -1
- package/menu/utils/DirectionHolder.js +1 -1
- package/menu/utils/DirectionHolder.mjs +0 -1
- package/menu/utils/MouseOverHandler.js +1 -1
- package/menu/utils/MouseOverHandler.mjs +0 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.js +1 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +0 -1
- package/menu/utils/hoverDelay.js +1 -1
- package/menu/utils/hoverDelay.mjs +0 -1
- package/menu/utils/itemsIdsUtils.js +1 -1
- package/menu/utils/itemsIdsUtils.mjs +0 -1
- package/menu/utils/misc.js +1 -1
- package/menu/utils/misc.mjs +11 -12
- package/menu/utils/prepareInputItemsForInternalWork.js +1 -1
- package/menu/utils/prepareInputItemsForInternalWork.mjs +3 -4
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +7 -7
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +33 -34
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +0 -1
- package/panelbar/interfaces/NavigationAction.js +1 -1
- package/panelbar/interfaces/NavigationAction.mjs +0 -1
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +18 -19
- package/splitter/Splitter.js +1 -1
- package/splitter/Splitter.mjs +0 -1
- package/splitter/SplitterBar.js +1 -1
- package/splitter/SplitterBar.mjs +0 -1
- package/splitter/SplitterPane.js +1 -1
- package/splitter/SplitterPane.mjs +9 -10
- package/splitter/messages/index.js +1 -1
- package/splitter/messages/index.mjs +2 -3
- package/stacklayout/StackLayout.js +1 -1
- package/stacklayout/StackLayout.mjs +3 -4
- package/stepper/Step.js +1 -1
- package/stepper/Step.mjs +15 -16
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +0 -1
- package/stepper/contants.js +1 -1
- package/stepper/contants.mjs +0 -1
- package/stepper/context/StepperContext.js +1 -1
- package/stepper/context/StepperContext.mjs +0 -1
- package/stepper/messages/index.js +1 -1
- package/stepper/messages/index.mjs +0 -1
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +110 -79
- package/tabstrip/TabStripContent.js +1 -1
- package/tabstrip/TabStripContent.mjs +0 -1
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +110 -117
- package/tabstrip/TabStripNavigationItem.js +1 -1
- package/tabstrip/TabStripNavigationItem.mjs +7 -8
- package/tabstrip/TabStripTab.js +1 -1
- package/tabstrip/TabStripTab.mjs +4 -5
- package/tabstrip/messages/index.js +1 -1
- package/tabstrip/messages/index.mjs +0 -1
- package/tilelayout/InternalTile.js +1 -1
- package/tilelayout/InternalTile.mjs +0 -1
- package/tilelayout/ResizeHandlers.js +1 -1
- package/tilelayout/ResizeHandlers.mjs +10 -11
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +0 -1
- package/timeline/Timeline.js +1 -1
- package/timeline/Timeline.mjs +17 -18
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +4 -5
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +0 -1
- package/timeline/TimelineVertical.js +1 -1
- package/timeline/TimelineVertical.mjs +0 -1
- package/timeline/utils.js +1 -1
- package/timeline/utils.mjs +6 -7
package/tabstrip/TabStrip.mjs
CHANGED
|
@@ -5,28 +5,39 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
import * as c from "react";
|
|
9
|
+
import r from "prop-types";
|
|
10
|
+
import { TabStripNavigation as m } from "./TabStripNavigation.mjs";
|
|
11
|
+
import { TabStripContent as g } from "./TabStripContent.mjs";
|
|
12
|
+
import { validatePackage as v, shouldShowValidationUI as y, Navigation as k, classNames as x, kendoThemeMaps as I, WatermarkOverlay as P } from "@progress/kendo-react-common";
|
|
13
|
+
import { packageMetadata as u } from "../package-metadata.mjs";
|
|
14
|
+
const p = class p extends c.Component {
|
|
15
|
+
constructor(l) {
|
|
16
|
+
super(l), this.tabStripRef = c.createRef(), this.itemsNavRef = c.createRef(), this.showLicenseWatermark = !1, this.onScroll = () => {
|
|
17
|
+
const i = this.horizontalScroll(), o = this.itemsNavRef.current;
|
|
18
|
+
if (!o)
|
|
19
|
+
return;
|
|
20
|
+
const e = o.scrollLeft, t = o.clientWidth, n = o.scrollWidth, s = o.scrollTop, a = o.scrollHeight, d = o.clientHeight;
|
|
21
|
+
let h = null;
|
|
22
|
+
const S = i ? n > t : a > d, f = this.props.dir === "rtl";
|
|
23
|
+
S ? i ? e + t === n || (f && t - e) === n ? h = "end" : e === 0 || f && -e === 0 ? h = "start" : e > 0 && e + t < n || -e > 0 && t - e < n ? h = "middle" : h = null : a - (s + d) === 0 ? h = "bottom" : s === 0 ? h = "top" : s > 0 && a - (s + d) > 0 ? h = "middle" : h = null : h = null, this.setState({ containerScrollPosition: h });
|
|
24
|
+
}, this.handleResize = () => {
|
|
25
|
+
this.onScroll();
|
|
26
|
+
}, this.onSelect = (i) => {
|
|
27
|
+
this.props.selected !== i && this.props.onSelect && this.props.onSelect({
|
|
28
|
+
selected: i
|
|
20
29
|
});
|
|
21
|
-
}, this.onKeyDown = (
|
|
22
|
-
this.navigation.triggerKeyboardEvent(
|
|
23
|
-
}, this.onKeyboardSelect = (
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
}, this.renderContent = (
|
|
27
|
-
const { selected:
|
|
28
|
-
return
|
|
29
|
-
}, u
|
|
30
|
+
}, this.onKeyDown = (i) => {
|
|
31
|
+
this.navigation && this.navigation.triggerKeyboardEvent(i);
|
|
32
|
+
}, this.onKeyboardSelect = (i) => {
|
|
33
|
+
const o = this.children();
|
|
34
|
+
o && o[i].props.disabled || this.onSelect(i);
|
|
35
|
+
}, this.renderContent = (i) => {
|
|
36
|
+
const { selected: o, children: e, tabContentStyle: t } = i, n = c.Children.count(e);
|
|
37
|
+
return o < n && o > -1 ? /* @__PURE__ */ c.createElement(g, { index: o, ...i, style: t }) : null;
|
|
38
|
+
}, v(u), this.showLicenseWatermark = y(u), this.state = {
|
|
39
|
+
containerScrollPosition: null
|
|
40
|
+
}, this.itemsNavRef = c.createRef();
|
|
30
41
|
}
|
|
31
42
|
get contentPanelId() {
|
|
32
43
|
return this.props.id + "-content-panel-id";
|
|
@@ -36,9 +47,9 @@ const d = class d extends a.Component {
|
|
|
36
47
|
}
|
|
37
48
|
/** @hidden */
|
|
38
49
|
componentDidMount() {
|
|
39
|
-
var
|
|
40
|
-
const
|
|
41
|
-
|
|
50
|
+
var o;
|
|
51
|
+
const l = this.tabStripRef.current, i = l && getComputedStyle(l).direction === "rtl" || !1;
|
|
52
|
+
l && (this.navigation = new k({
|
|
42
53
|
tabIndex: 0,
|
|
43
54
|
root: this.tabStripRef,
|
|
44
55
|
rovingTabIndex: !0,
|
|
@@ -46,106 +57,126 @@ const d = class d extends a.Component {
|
|
|
46
57
|
selectors: [".k-tabstrip .k-tabstrip-item"],
|
|
47
58
|
keyboardEvents: {
|
|
48
59
|
keydown: {
|
|
49
|
-
ArrowLeft: (
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
60
|
+
ArrowLeft: (e, t, n) => {
|
|
61
|
+
n.preventDefault();
|
|
62
|
+
const s = t.elements.indexOf(e), a = s !== 0 ? s - 1 : t.elements.length - 1, d = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
63
|
+
i ? (t.focusNext(e), this.onKeyboardSelect(d)) : (t.focusPrevious(e), this.onKeyboardSelect(a));
|
|
53
64
|
},
|
|
54
|
-
ArrowRight: (
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
65
|
+
ArrowRight: (e, t, n) => {
|
|
66
|
+
n.preventDefault();
|
|
67
|
+
const s = t.elements.indexOf(e), a = s !== 0 ? s - 1 : t.elements.length - 1, d = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
68
|
+
i ? (t.focusPrevious(e), this.onKeyboardSelect(a)) : (t.focusNext(e), this.onKeyboardSelect(d));
|
|
58
69
|
},
|
|
59
|
-
ArrowDown: (
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
70
|
+
ArrowDown: (e, t, n) => {
|
|
71
|
+
n.preventDefault();
|
|
72
|
+
const s = t.elements.indexOf(e), a = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
73
|
+
t.focusNext(e), this.onKeyboardSelect(a);
|
|
63
74
|
},
|
|
64
|
-
ArrowUp: (
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
75
|
+
ArrowUp: (e, t, n) => {
|
|
76
|
+
n.preventDefault();
|
|
77
|
+
const s = t.elements.indexOf(e), a = s !== 0 ? s - 1 : t.elements.length - 1;
|
|
78
|
+
t.focusPrevious(e), this.onKeyboardSelect(a);
|
|
68
79
|
},
|
|
69
|
-
Home: (
|
|
70
|
-
|
|
80
|
+
Home: (e, t, n) => {
|
|
81
|
+
n.preventDefault(), t.focusElement(t.first, e), this.onKeyboardSelect(0);
|
|
71
82
|
},
|
|
72
|
-
End: (
|
|
73
|
-
|
|
83
|
+
End: (e, t, n) => {
|
|
84
|
+
n.preventDefault(), t.focusElement(t.last, e), this.onKeyboardSelect(t.elements.length - 1);
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
}
|
|
77
|
-
}), (
|
|
88
|
+
}), (o = this.navigation) == null || o.initializeRovingTab(this.props.selected), this.onScroll(), this.resizeObserver = new ResizeObserver(() => this.onScroll()), this.tabStripRef.current && this.resizeObserver.observe(this.tabStripRef.current));
|
|
78
89
|
}
|
|
79
90
|
/** @hidden */
|
|
80
91
|
componentWillUnmount() {
|
|
81
|
-
var
|
|
82
|
-
(
|
|
92
|
+
var l;
|
|
93
|
+
(l = this.navigation) == null || l.removeFocusListener();
|
|
94
|
+
}
|
|
95
|
+
horizontalScroll() {
|
|
96
|
+
return /top|bottom/.test(this.props.tabPosition || "top");
|
|
83
97
|
}
|
|
84
98
|
/**
|
|
85
99
|
* @hidden
|
|
86
100
|
*/
|
|
87
101
|
render() {
|
|
88
|
-
const
|
|
102
|
+
const l = {
|
|
103
|
+
itemsNavRef: this.itemsNavRef,
|
|
89
104
|
...this.props,
|
|
90
105
|
children: this.children(),
|
|
91
106
|
contentPanelId: this.contentPanelId,
|
|
92
107
|
renderAllContent: this.props.renderAllContent,
|
|
93
108
|
navItemId: this.navItemId,
|
|
94
109
|
onKeyDown: this.onKeyDown,
|
|
95
|
-
onSelect: this.onSelect
|
|
96
|
-
|
|
110
|
+
onSelect: this.onSelect,
|
|
111
|
+
onScroll: this.onScroll,
|
|
112
|
+
containerScrollPosition: this.state.containerScrollPosition,
|
|
113
|
+
scrollButtons: this.props.scrollButtons === "hidden" || this.state.containerScrollPosition === null && this.props.scrollButtons === "auto" ? "hidden" : "visible"
|
|
114
|
+
}, { scrollable: i, scrollButtons: o, size: e, tabPosition: t, tabIndex: n } = l, s = t === "bottom", a = x(
|
|
97
115
|
"k-tabstrip k-pos-relative",
|
|
98
116
|
{
|
|
99
|
-
|
|
100
|
-
"k-tabstrip-
|
|
101
|
-
"k-tabstrip-
|
|
102
|
-
"k-tabstrip-
|
|
103
|
-
"k-tabstrip-
|
|
117
|
+
[`k-tabstrip-${I.sizeMap[e] || e}`]: e,
|
|
118
|
+
"k-tabstrip-left": t === "left",
|
|
119
|
+
"k-tabstrip-right": t === "right",
|
|
120
|
+
"k-tabstrip-bottom": t === "bottom",
|
|
121
|
+
"k-tabstrip-top": t === "top",
|
|
122
|
+
"k-tabstrip-scrollable": i,
|
|
123
|
+
"k-tabstrip-scrollable-start k-tabstrip-scrollable-end": i && o === "visible",
|
|
124
|
+
"k-tabstrip-scrollable-start": i && (o === "auto" || !o) && (this.state.containerScrollPosition === "end" || this.state.containerScrollPosition === "middle"),
|
|
125
|
+
"k-tabstrip-scrollable-end": i && o === "auto" && (this.state.containerScrollPosition === "start" || this.state.containerScrollPosition === "middle")
|
|
104
126
|
},
|
|
105
127
|
this.props.className
|
|
106
128
|
);
|
|
107
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ c.createElement(
|
|
108
130
|
"div",
|
|
109
131
|
{
|
|
110
132
|
id: this.props.id,
|
|
111
133
|
ref: this.tabStripRef,
|
|
112
134
|
dir: this.props.dir,
|
|
113
|
-
className:
|
|
114
|
-
style: this.props.style
|
|
135
|
+
className: a,
|
|
136
|
+
style: this.props.style,
|
|
137
|
+
onScroll: this.onScroll,
|
|
138
|
+
onResize: this.handleResize
|
|
115
139
|
},
|
|
116
|
-
!
|
|
117
|
-
this.renderContent(
|
|
118
|
-
|
|
119
|
-
this.showLicenseWatermark && /* @__PURE__ */
|
|
140
|
+
!s && /* @__PURE__ */ c.createElement(m, { ...l, tabIndex: n }),
|
|
141
|
+
this.renderContent(l),
|
|
142
|
+
s && /* @__PURE__ */ c.createElement(m, { ...l, tabIndex: n }),
|
|
143
|
+
this.showLicenseWatermark && /* @__PURE__ */ c.createElement(P, null)
|
|
120
144
|
);
|
|
121
145
|
}
|
|
122
146
|
children() {
|
|
123
|
-
return
|
|
147
|
+
return c.Children.toArray(this.props.children).filter((l) => l);
|
|
124
148
|
}
|
|
125
149
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
p.propTypes = {
|
|
151
|
+
id: r.string,
|
|
152
|
+
animation: r.bool,
|
|
153
|
+
children: r.node,
|
|
154
|
+
onSelect: r.func,
|
|
155
|
+
selected: r.number,
|
|
156
|
+
style: r.object,
|
|
157
|
+
tabContentStyle: r.object,
|
|
158
|
+
tabPosition: r.string,
|
|
159
|
+
tabAlignment: r.string,
|
|
160
|
+
tabIndex: r.number,
|
|
161
|
+
className: r.string,
|
|
162
|
+
dir: r.string,
|
|
163
|
+
renderAllContent: r.bool,
|
|
164
|
+
size: r.oneOf(["small", "medium", "large", null]),
|
|
165
|
+
scrollButtons: r.oneOf(["auto", "visible", "hidden"]),
|
|
166
|
+
scrollButtonsPosition: r.oneOf(["split", "start", "end", "around", "before", "after"])
|
|
167
|
+
}, p.defaultProps = {
|
|
139
168
|
animation: !0,
|
|
140
169
|
tabPosition: "top",
|
|
141
170
|
tabAlignment: "start",
|
|
142
171
|
keepTabsMounted: !1,
|
|
143
172
|
buttonScrollSpeed: 100,
|
|
144
|
-
scrollButtonsPosition: "around",
|
|
145
173
|
mouseScrollSpeed: 10,
|
|
174
|
+
scrollButtons: "auto",
|
|
175
|
+
scrollButtonsPosition: "split",
|
|
176
|
+
size: "medium",
|
|
146
177
|
renderAllContent: !1
|
|
147
178
|
};
|
|
148
|
-
let
|
|
179
|
+
let b = p;
|
|
149
180
|
export {
|
|
150
|
-
|
|
181
|
+
b as TabStrip
|
|
151
182
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),i=require("prop-types"),h=require("@progress/kendo-react-animation"),u=require("@progress/kendo-react-common");function b(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const r=b(y),c=class c extends r.Component{constructor(){super(...arguments),this.contentId=this.props.contentPanelId,this.childFactory=e=>r.cloneElement(e,{...e.props,in:e.props.children.props.id===String(this.contentId+this.props.selected)})}render(){const{children:e,selected:t,contentPanelId:n,keepTabsMounted:s,navItemId:o,renderAllContent:l}=this.props,d=e&&typeof t=="number"&&r.Children.toArray(e)[t],m=u.classNames("k-tabstrip-content","k-active",d&&d.props.contentClassName);return l?this.renderAllContent(e):r.createElement("div",{className:m,style:this.props.style,id:n,role:"tabpanel","aria-hidden":s,"aria-labelledby":`${o}-${(t==null?void 0:t.toString())||""}`,tabIndex:0},this.renderContent(e))}renderContent(e){return this.props.keepTabsMounted?r.Children.map(this.props.children,(t,n)=>this.renderChild(t,n)):this.renderChild(r.Children.toArray(e)[this.props.selected],this.props.selected)}renderAllContent(e){return r.Children.map(e,(t,n)=>{const s=t,o=n===this.props.selected,l=u.classNames("k-tabstrip-content",{"k-active":o},s.props.contentClassName);return r.createElement("div",{className:l,style:this.props.style,id:`${this.props.contentPanelId}-${n}`,role:"tabpanel","aria-hidden":!o,hidden:!o,"aria-labelledby":`${this.props.navItemId}-${n}`},this.props.animation?r.createElement(h.Fade,{key:`${n}-${o}`,appear:!0,enter:!0,exit:!1},s.props.children):s.props.children)})}renderChild(e,t){const n=t===this.props.selected,s={style:{display:n?void 0:"none"}},o={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?r.createElement(h.Fade,{appear:!0,exit:this.props.keepTabsMounted,style:o,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},r.createElement("div",{...s,id:String(this.contentId+t),key:t},e.props.children)):r.createElement("div",{...s,key:t},e.props.children)}};c.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object};let p=c;exports.TabStripContent=p;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
9
|
import i from "prop-types";
|
|
11
10
|
import { Fade as d } from "@progress/kendo-react-animation";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),n=require("prop-types"),E=require("./TabStripNavigationItem.js"),w=require("@progress/kendo-react-common"),B=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-svg-icons"),x=require("@progress/kendo-react-intl"),b=require("./messages/index.js");function y(d){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>d[e]})}}return t.default=d,Object.freeze(t)}const h=y(L),M=d=>Array.apply(null,Array(d)),v="smooth",f="prev",S="next",I=class I extends h.Component{constructor(){super(...arguments),this.itemsNavRef=this.props.itemsNavRef||h.createRef(),this.onScroll=()=>{var t,e;(e=(t=this.props).onScroll)==null||e.call(t)},this.isRtl=()=>this.props.dir==="rtl",this.arrowClickPrev=t=>{this.handleArrowClick(f,t)},this.arrowClickNext=t=>{this.handleArrowClick(S,t)},this.handleArrowClick=(t,e)=>{this.setNewScrollPosition(t,e)},this.setNewScrollPosition=(t,e)=>{const o=this.itemsNavRef.current;if(!o)return;const r=this.horizontalScroll(),l=r?o.scrollWidth-o.offsetWidth:o.scrollHeight-o.offsetHeight,i=(e.type==="click"?this.props.buttonScrollSpeed:this.props.mouseScrollSpeed)||0;let s=r?o.scrollLeft:o.scrollTop;this.isRtl()&&this.horizontalScroll()?(t===f&&s<0&&(s+=i),t===S&&s<l&&(s-=i),s=Math.min(0,Math.min(l,s))):(t===f&&s>0&&(s-=i),t===S&&s<l&&(s+=i),s=Math.max(0,Math.min(l,s)));const c=e.type==="click"?v:void 0;r?o.scrollTo({left:s,behavior:c}):o.scrollTo({top:s,behavior:c})},this.renderArrow=t=>{const e=this.horizontalScroll(),o=x.provideLocalizationService(this),r={prev:{arrowTab:"k-tabstrip-prev",fontIcon:e?this.isRtl()?"caret-alt-right":"caret-alt-left":"caret-alt-up",svgIcon:e?this.isRtl()?m.caretAltRightIcon:m.caretAltLeftIcon:m.caretAltUpIcon,title:o.toLanguageString(b.prevArrowTitle,b.messages[b.prevArrowTitle])},next:{arrowTab:"k-tabstrip-next",fontIcon:e?this.isRtl()?"caret-alt-left":"caret-alt-right":"caret-alt-down",svgIcon:e?this.isRtl()?m.caretAltLeftIcon:m.caretAltRightIcon:m.caretAltDownIcon,title:o.toLanguageString(b.nextArrowTitle,b.messages[b.nextArrowTitle])}},l=(t===f?this.props.prevButton:this.props.nextButton)||B.Button,i=t===f?this.arrowClickPrev:this.arrowClickNext,s=this.props.containerScrollPosition===null||t===f&&(this.props.containerScrollPosition==="start"||this.props.containerScrollPosition==="top")||t===S&&(this.props.containerScrollPosition==="end"||this.props.containerScrollPosition==="bottom");return h.createElement(l,{disabled:s,className:w.classNames(`${r[t].arrowTab}`),onClick:i,icon:r[t].fontIcon,svgIcon:r[t].svgIcon,size:this.props.size,tabIndex:-1,fillMode:"flat",title:r[t].title})}}componentDidMount(){this.props.scrollable&&this.scrollToSelected()}componentDidUpdate(t){const{scrollable:e,selected:o}=this.props;e&&t.selected!==o&&this.scrollToSelected()}render(){const{selected:t,tabPosition:e,tabAlignment:o,children:r,onSelect:l,onKeyDown:i,navItemId:s,contentPanelId:c,renderAllContent:a,scrollable:R,scrollButtons:g,scrollButtonsPosition:p}=this.props,N=h.Children.count(r),A=h.Children.toArray(r);let T;r&&(T=M(N).map((D,u,O)=>{const z={active:t===u,disabled:A[u].props.disabled,index:u,title:A[u].props.title,first:u===0,last:u===O.length-1,contentPanelId:c,renderAllContent:a,id:s,onSelect:l,onScroll:this.onScroll};return h.createElement(E.TabStripNavigationItem,{key:u,...z})}));const C=w.classNames("k-tabstrip-items-wrapper k-tabstrip-items-wrapper-scroll",{"k-hstack":e==="top"||e==="bottom","k-vstack":e==="left"||e==="right"}),P=w.classNames("k-tabstrip-items k-tabstrip-items-scroll k-reset",`k-tabstrip-items-${o}`);return h.createElement("div",{className:C},R?h.createElement(h.Fragment,null,g!=="hidden"&&p&&["split","start","around","before"].includes(p)&&this.renderArrow(f),g!=="hidden"&&(p==="start"||p==="before")&&this.renderArrow(S),h.createElement("ul",{ref:this.itemsNavRef,className:P,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:i,onScroll:this.onScroll,"aria-orientation":e==="left"||e==="right"?"vertical":void 0},T),g!=="hidden"&&(p==="end"||p==="after")&&this.renderArrow(f),g!=="hidden"&&p&&["split","end","around","after"].includes(p)&&this.renderArrow(S)):h.createElement("ul",{className:P,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:i},T))}scrollToSelected(){const t=this.itemsNavRef.current,e=t&&t.children[this.props.selected||0];if(e instanceof HTMLElement&&t instanceof HTMLElement){const o=this.horizontalScroll(),r=o?t.offsetWidth:t.offsetHeight,l=o?e.offsetWidth:e.offsetHeight,i=o?"left":"top";let s=o?t.scrollLeft:t.scrollTop,c=0;if(this.isRtl()){const a=e.offsetLeft;s=s*-1,a<0?(c=a-l+t.offsetLeft,t.scrollTo({[i]:c,behavior:v})):a+l>r-s&&(c=s+a-l,t.scrollTo({[i]:c,behavior:v}))}else{const a=o?e.offsetLeft-t.offsetLeft:e.offsetTop-t.offsetTop;s+r<a+l?(c=a+l-r,t.scrollTo({[i]:c,behavior:v})):s>a&&(c=a,t.scrollTo({[i]:c,behavior:v}))}}}horizontalScroll(){return/top|bottom/.test(this.props.tabPosition||"top")}};I.propTypes={children:n.oneOfType([n.element,n.arrayOf(n.element)]),onSelect:n.func,onKeyDown:n.func,onScroll:n.func,selected:n.number,tabIndex:n.number,scrollable:n.bool,size:n.oneOf(["small","medium","large"]),scrollButtons:n.oneOf(["auto","visible","hidden"]),scrollButtonsPosition:n.oneOf(["split","start","end","around","before","after"]),containerScrollPosition:n.oneOf(["start","end","top","bottom","middle",null])};let k=I;exports.TabStripNavigation=k;
|
|
@@ -5,78 +5,63 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { caretAltRightIcon as k, caretAltLeftIcon as A, caretAltUpIcon as D, caretAltDownIcon as H } from "@progress/kendo-svg-icons";
|
|
8
|
+
import * as h from "react";
|
|
9
|
+
import n from "prop-types";
|
|
10
|
+
import { TabStripNavigationItem as x } from "./TabStripNavigationItem.mjs";
|
|
11
|
+
import { classNames as v } from "@progress/kendo-react-common";
|
|
12
|
+
import { Button as M } from "@progress/kendo-react-buttons";
|
|
13
|
+
import { caretAltRightIcon as k, caretAltLeftIcon as I, caretAltUpIcon as D, caretAltDownIcon as H } from "@progress/kendo-svg-icons";
|
|
15
14
|
import { provideLocalizationService as y } from "@progress/kendo-react-intl";
|
|
16
|
-
import { prevArrowTitle as
|
|
17
|
-
const
|
|
18
|
-
constructor(
|
|
19
|
-
super(
|
|
20
|
-
t
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.handleArrowClick(d, t);
|
|
15
|
+
import { prevArrowTitle as A, messages as P, nextArrowTitle as R } from "./messages/index.mjs";
|
|
16
|
+
const W = (z) => Array.apply(null, Array(z)), b = "smooth", f = "prev", m = "next", w = class w extends h.Component {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.itemsNavRef = this.props.itemsNavRef || h.createRef(), this.onScroll = () => {
|
|
19
|
+
var t, o;
|
|
20
|
+
(o = (t = this.props).onScroll) == null || o.call(t);
|
|
21
|
+
}, this.isRtl = () => this.props.dir === "rtl", this.arrowClickPrev = (t) => {
|
|
22
|
+
this.handleArrowClick(f, t);
|
|
25
23
|
}, this.arrowClickNext = (t) => {
|
|
26
|
-
this.handleArrowClick(
|
|
27
|
-
}, this.handleArrowClick = (t,
|
|
28
|
-
this.setNewScrollPosition(t,
|
|
29
|
-
}, this.setNewScrollPosition = (t,
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
24
|
+
this.handleArrowClick(m, t);
|
|
25
|
+
}, this.handleArrowClick = (t, o) => {
|
|
26
|
+
this.setNewScrollPosition(t, o);
|
|
27
|
+
}, this.setNewScrollPosition = (t, o) => {
|
|
28
|
+
const s = this.itemsNavRef.current;
|
|
29
|
+
if (!s)
|
|
32
30
|
return;
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
this.isRtl() && this.horizontalScroll() ? (t ===
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
disabledPrev: h,
|
|
41
|
-
disabledNext: S
|
|
42
|
-
}), e.scrollTo({ left: o, behavior: v });
|
|
43
|
-
} else
|
|
44
|
-
this.setState({
|
|
45
|
-
disabledPrev: h,
|
|
46
|
-
disabledNext: Math.round(i) <= e.clientHeight || Math.floor(i) <= e.clientHeight
|
|
47
|
-
}), e.scrollTo({ top: o, behavior: v });
|
|
48
|
-
}, this.renderArrow = (t, l) => {
|
|
49
|
-
const e = this.horizontalScroll(), c = y(this), n = {
|
|
31
|
+
const r = this.horizontalScroll(), l = r ? s.scrollWidth - s.offsetWidth : s.scrollHeight - s.offsetHeight, i = (o.type === "click" ? this.props.buttonScrollSpeed : this.props.mouseScrollSpeed) || 0;
|
|
32
|
+
let e = r ? s.scrollLeft : s.scrollTop;
|
|
33
|
+
this.isRtl() && this.horizontalScroll() ? (t === f && e < 0 && (e += i), t === m && e < l && (e -= i), e = Math.min(0, Math.min(l, e))) : (t === f && e > 0 && (e -= i), t === m && e < l && (e += i), e = Math.max(0, Math.min(l, e)));
|
|
34
|
+
const c = o.type === "click" ? b : void 0;
|
|
35
|
+
r ? s.scrollTo({ left: e, behavior: c }) : s.scrollTo({ top: e, behavior: c });
|
|
36
|
+
}, this.renderArrow = (t) => {
|
|
37
|
+
const o = this.horizontalScroll(), s = y(this), r = {
|
|
50
38
|
prev: {
|
|
51
39
|
arrowTab: "k-tabstrip-prev",
|
|
52
|
-
fontIcon:
|
|
53
|
-
svgIcon:
|
|
54
|
-
title:
|
|
40
|
+
fontIcon: o ? this.isRtl() ? "caret-alt-right" : "caret-alt-left" : "caret-alt-up",
|
|
41
|
+
svgIcon: o ? this.isRtl() ? k : I : D,
|
|
42
|
+
title: s.toLanguageString(A, P[A])
|
|
55
43
|
},
|
|
56
44
|
next: {
|
|
57
45
|
arrowTab: "k-tabstrip-next",
|
|
58
|
-
fontIcon:
|
|
59
|
-
svgIcon:
|
|
60
|
-
title:
|
|
46
|
+
fontIcon: o ? this.isRtl() ? "caret-alt-left" : "caret-alt-right" : "caret-alt-down",
|
|
47
|
+
svgIcon: o ? this.isRtl() ? I : k : H,
|
|
48
|
+
title: s.toLanguageString(R, P[R])
|
|
61
49
|
}
|
|
62
|
-
},
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
50
|
+
}, l = (t === f ? this.props.prevButton : this.props.nextButton) || M, i = t === f ? this.arrowClickPrev : this.arrowClickNext, e = this.props.containerScrollPosition === null || t === f && (this.props.containerScrollPosition === "start" || this.props.containerScrollPosition === "top") || t === m && (this.props.containerScrollPosition === "end" || this.props.containerScrollPosition === "bottom");
|
|
51
|
+
return /* @__PURE__ */ h.createElement(
|
|
52
|
+
l,
|
|
65
53
|
{
|
|
66
|
-
disabled:
|
|
67
|
-
className: `${
|
|
68
|
-
onClick:
|
|
69
|
-
icon:
|
|
70
|
-
svgIcon:
|
|
71
|
-
|
|
54
|
+
disabled: e,
|
|
55
|
+
className: v(`${r[t].arrowTab}`),
|
|
56
|
+
onClick: i,
|
|
57
|
+
icon: r[t].fontIcon,
|
|
58
|
+
svgIcon: r[t].svgIcon,
|
|
59
|
+
size: this.props.size,
|
|
72
60
|
tabIndex: -1,
|
|
73
61
|
fillMode: "flat",
|
|
74
|
-
title:
|
|
62
|
+
title: r[t].title
|
|
75
63
|
}
|
|
76
64
|
);
|
|
77
|
-
}, this.state = {
|
|
78
|
-
disabledPrev: this.props.selected === 0,
|
|
79
|
-
disabledNext: this.props.selected === a.Children.count(this.props.children) - 1
|
|
80
65
|
};
|
|
81
66
|
}
|
|
82
67
|
/**
|
|
@@ -88,75 +73,77 @@ const B = (w) => Array.apply(null, Array(w)), O = (w) => w.preventDefault(), u =
|
|
|
88
73
|
/**
|
|
89
74
|
* @hidden
|
|
90
75
|
*/
|
|
91
|
-
componentDidUpdate(
|
|
92
|
-
const { scrollable:
|
|
93
|
-
|
|
94
|
-
disabledPrev: l === 0,
|
|
95
|
-
disabledNext: l === a.Children.count(this.props.children) - 1
|
|
96
|
-
}));
|
|
76
|
+
componentDidUpdate(t) {
|
|
77
|
+
const { scrollable: o, selected: s } = this.props;
|
|
78
|
+
o && t.selected !== s && this.scrollToSelected();
|
|
97
79
|
}
|
|
98
80
|
/**
|
|
99
81
|
* @hidden
|
|
100
82
|
*/
|
|
101
83
|
render() {
|
|
102
84
|
const {
|
|
103
|
-
selected:
|
|
104
|
-
tabPosition:
|
|
105
|
-
tabAlignment:
|
|
106
|
-
children:
|
|
107
|
-
onSelect:
|
|
108
|
-
onKeyDown:
|
|
109
|
-
navItemId:
|
|
110
|
-
contentPanelId:
|
|
111
|
-
renderAllContent:
|
|
112
|
-
scrollable:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
85
|
+
selected: t,
|
|
86
|
+
tabPosition: o,
|
|
87
|
+
tabAlignment: s,
|
|
88
|
+
children: r,
|
|
89
|
+
onSelect: l,
|
|
90
|
+
onKeyDown: i,
|
|
91
|
+
navItemId: e,
|
|
92
|
+
contentPanelId: c,
|
|
93
|
+
renderAllContent: a,
|
|
94
|
+
scrollable: L,
|
|
95
|
+
scrollButtons: u,
|
|
96
|
+
scrollButtonsPosition: p
|
|
97
|
+
} = this.props, E = h.Children.count(r), g = h.Children.toArray(r);
|
|
98
|
+
let S;
|
|
99
|
+
r && (S = W(E).map((U, d, B) => {
|
|
100
|
+
const O = {
|
|
101
|
+
active: t === d,
|
|
102
|
+
disabled: g[d].props.disabled,
|
|
103
|
+
index: d,
|
|
104
|
+
title: g[d].props.title,
|
|
105
|
+
first: d === 0,
|
|
106
|
+
last: d === B.length - 1,
|
|
107
|
+
contentPanelId: c,
|
|
108
|
+
renderAllContent: a,
|
|
109
|
+
id: e,
|
|
110
|
+
onSelect: l,
|
|
111
|
+
onScroll: this.onScroll
|
|
128
112
|
};
|
|
129
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ h.createElement(x, { key: d, ...O });
|
|
130
114
|
}));
|
|
131
|
-
const
|
|
132
|
-
"k-hstack":
|
|
133
|
-
"k-vstack":
|
|
134
|
-
}),
|
|
135
|
-
|
|
115
|
+
const N = v("k-tabstrip-items-wrapper k-tabstrip-items-wrapper-scroll", {
|
|
116
|
+
"k-hstack": o === "top" || o === "bottom",
|
|
117
|
+
"k-vstack": o === "left" || o === "right"
|
|
118
|
+
}), T = v(
|
|
119
|
+
"k-tabstrip-items k-tabstrip-items-scroll k-reset",
|
|
120
|
+
`k-tabstrip-items-${s}`
|
|
121
|
+
);
|
|
122
|
+
return /* @__PURE__ */ h.createElement("div", { className: N }, L ? /* @__PURE__ */ h.createElement(h.Fragment, null, u !== "hidden" && p && ["split", "start", "around", "before"].includes(p) && this.renderArrow(f), u !== "hidden" && (p === "start" || p === "before") && this.renderArrow(m), /* @__PURE__ */ h.createElement(
|
|
136
123
|
"ul",
|
|
137
124
|
{
|
|
138
125
|
ref: this.itemsNavRef,
|
|
139
|
-
className:
|
|
126
|
+
className: T,
|
|
140
127
|
role: "tablist",
|
|
141
128
|
tabIndex: this.props.tabIndex,
|
|
142
|
-
onKeyDown:
|
|
143
|
-
|
|
144
|
-
"aria-orientation":
|
|
129
|
+
onKeyDown: i,
|
|
130
|
+
onScroll: this.onScroll,
|
|
131
|
+
"aria-orientation": o === "left" || o === "right" ? "vertical" : void 0
|
|
145
132
|
},
|
|
146
|
-
|
|
147
|
-
),
|
|
133
|
+
S
|
|
134
|
+
), u !== "hidden" && (p === "end" || p === "after") && this.renderArrow(f), u !== "hidden" && p && ["split", "end", "around", "after"].includes(p) && this.renderArrow(m)) : /* @__PURE__ */ h.createElement("ul", { className: T, role: "tablist", tabIndex: this.props.tabIndex, onKeyDown: i }, S));
|
|
148
135
|
}
|
|
149
136
|
scrollToSelected() {
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
let
|
|
137
|
+
const t = this.itemsNavRef.current, o = t && t.children[this.props.selected || 0];
|
|
138
|
+
if (o instanceof HTMLElement && t instanceof HTMLElement) {
|
|
139
|
+
const s = this.horizontalScroll(), r = s ? t.offsetWidth : t.offsetHeight, l = s ? o.offsetWidth : o.offsetHeight, i = s ? "left" : "top";
|
|
140
|
+
let e = s ? t.scrollLeft : t.scrollTop, c = 0;
|
|
154
141
|
if (this.isRtl()) {
|
|
155
|
-
const
|
|
156
|
-
|
|
142
|
+
const a = o.offsetLeft;
|
|
143
|
+
e = e * -1, a < 0 ? (c = a - l + t.offsetLeft, t.scrollTo({ [i]: c, behavior: b })) : a + l > r - e && (c = e + a - l, t.scrollTo({ [i]: c, behavior: b }));
|
|
157
144
|
} else {
|
|
158
|
-
const
|
|
159
|
-
|
|
145
|
+
const a = s ? o.offsetLeft - t.offsetLeft : o.offsetTop - t.offsetTop;
|
|
146
|
+
e + r < a + l ? (c = a + l - r, t.scrollTo({ [i]: c, behavior: b })) : e > a && (c = a, t.scrollTo({ [i]: c, behavior: b }));
|
|
160
147
|
}
|
|
161
148
|
}
|
|
162
149
|
}
|
|
@@ -164,14 +151,20 @@ const B = (w) => Array.apply(null, Array(w)), O = (w) => w.preventDefault(), u =
|
|
|
164
151
|
return /top|bottom/.test(this.props.tabPosition || "top");
|
|
165
152
|
}
|
|
166
153
|
};
|
|
167
|
-
|
|
168
|
-
children:
|
|
169
|
-
onSelect:
|
|
170
|
-
onKeyDown:
|
|
171
|
-
|
|
172
|
-
|
|
154
|
+
w.propTypes = {
|
|
155
|
+
children: n.oneOfType([n.element, n.arrayOf(n.element)]),
|
|
156
|
+
onSelect: n.func,
|
|
157
|
+
onKeyDown: n.func,
|
|
158
|
+
onScroll: n.func,
|
|
159
|
+
selected: n.number,
|
|
160
|
+
tabIndex: n.number,
|
|
161
|
+
scrollable: n.bool,
|
|
162
|
+
size: n.oneOf(["small", "medium", "large"]),
|
|
163
|
+
scrollButtons: n.oneOf(["auto", "visible", "hidden"]),
|
|
164
|
+
scrollButtonsPosition: n.oneOf(["split", "start", "end", "around", "before", "after"]),
|
|
165
|
+
containerScrollPosition: n.oneOf(["start", "end", "top", "bottom", "middle", null])
|
|
173
166
|
};
|
|
174
|
-
let
|
|
167
|
+
let C = w;
|
|
175
168
|
export {
|
|
176
|
-
|
|
169
|
+
C as TabStripNavigation
|
|
177
170
|
};
|