@progress/kendo-react-layout 9.4.0-develop.9 → 9.4.1-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/NOTICE.txt +40 -51
- package/contextmenu/ContextMenu.js +1 -1
- package/contextmenu/ContextMenu.mjs +10 -9
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/index.d.mts +93 -17
- package/index.d.ts +93 -17
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +44 -35
- package/menu/components/MenuItemInternal.js +1 -1
- package/menu/components/MenuItemInternal.mjs +41 -33
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -8
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +110 -78
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +109 -115
package/index.d.mts
CHANGED
|
@@ -3199,6 +3199,16 @@ export declare interface RenderPanelBarItem {
|
|
|
3199
3199
|
*/
|
|
3200
3200
|
export declare const rightArrowName = "caret-alt-right";
|
|
3201
3201
|
|
|
3202
|
+
/**
|
|
3203
|
+
* Represents the values of the scrollButtons property of the TabStrip.
|
|
3204
|
+
*/
|
|
3205
|
+
declare type ScrollButtons = 'auto' | 'visible' | 'hidden';
|
|
3206
|
+
|
|
3207
|
+
/**
|
|
3208
|
+
* Represents the values of the scrollButtonsPosition property of the TabStrip.
|
|
3209
|
+
*/
|
|
3210
|
+
declare type ScrollButtonsPosition = 'split' | 'start' | 'end' | 'around' | 'before' | 'after';
|
|
3211
|
+
|
|
3202
3212
|
/**
|
|
3203
3213
|
* Sort the events list based on event date.
|
|
3204
3214
|
*/
|
|
@@ -3552,6 +3562,11 @@ export declare interface StackLayoutProps {
|
|
|
3552
3562
|
align?: StackLayoutAlign;
|
|
3553
3563
|
}
|
|
3554
3564
|
|
|
3565
|
+
/**
|
|
3566
|
+
* @hidden
|
|
3567
|
+
*/
|
|
3568
|
+
declare type StateScrollPosition = 'start' | 'end' | 'top' | 'bottom' | 'middle' | null;
|
|
3569
|
+
|
|
3555
3570
|
/**
|
|
3556
3571
|
* Represents the [KendoReact Step component]({% slug overview_stepper %}).
|
|
3557
3572
|
*
|
|
@@ -3831,11 +3846,12 @@ export declare interface StepProps {
|
|
|
3831
3846
|
/** @hidden */
|
|
3832
3847
|
export declare const TabStrip: ForwardRefExoticComponent<TabStripProps & RefAttributes<any>>;
|
|
3833
3848
|
|
|
3834
|
-
export declare class TabStripClassComponent extends React_2.Component<TabStripProps, {}> {
|
|
3849
|
+
export declare class TabStripClassComponent extends React_2.Component<TabStripProps, TabStripStateProps, {}> {
|
|
3835
3850
|
/**
|
|
3836
3851
|
* @hidden
|
|
3837
3852
|
*/
|
|
3838
3853
|
static propTypes: {
|
|
3854
|
+
id: default_2.Requireable<string>;
|
|
3839
3855
|
animation: default_2.Requireable<boolean>;
|
|
3840
3856
|
children: default_2.Requireable<default_2.ReactNodeLike>;
|
|
3841
3857
|
onSelect: default_2.Requireable<(...args: any[]) => any>;
|
|
@@ -3847,6 +3863,10 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3847
3863
|
tabIndex: default_2.Requireable<number>;
|
|
3848
3864
|
className: default_2.Requireable<string>;
|
|
3849
3865
|
dir: default_2.Requireable<string>;
|
|
3866
|
+
renderAllContent: default_2.Requireable<boolean>;
|
|
3867
|
+
size: default_2.Requireable<string | null>;
|
|
3868
|
+
scrollButtons: default_2.Requireable<string>;
|
|
3869
|
+
scrollButtonsPosition: default_2.Requireable<string>;
|
|
3850
3870
|
};
|
|
3851
3871
|
/**
|
|
3852
3872
|
* @hidden
|
|
@@ -3857,11 +3877,15 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3857
3877
|
tabAlignment: string;
|
|
3858
3878
|
keepTabsMounted: boolean;
|
|
3859
3879
|
buttonScrollSpeed: number;
|
|
3860
|
-
scrollButtonsPosition: string;
|
|
3861
3880
|
mouseScrollSpeed: number;
|
|
3881
|
+
scrollButtons: string;
|
|
3882
|
+
scrollButtonsPosition: string;
|
|
3883
|
+
size: string;
|
|
3862
3884
|
renderAllContent: boolean;
|
|
3863
3885
|
};
|
|
3864
3886
|
private tabStripRef;
|
|
3887
|
+
private itemsNavRef;
|
|
3888
|
+
private resizeObserver?;
|
|
3865
3889
|
private get contentPanelId();
|
|
3866
3890
|
private get navItemId();
|
|
3867
3891
|
private showLicenseWatermark;
|
|
@@ -3871,6 +3895,15 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3871
3895
|
componentDidMount(): void;
|
|
3872
3896
|
/** @hidden */
|
|
3873
3897
|
componentWillUnmount(): void;
|
|
3898
|
+
private horizontalScroll;
|
|
3899
|
+
/**
|
|
3900
|
+
* @hidden
|
|
3901
|
+
*/
|
|
3902
|
+
private onScroll;
|
|
3903
|
+
/**
|
|
3904
|
+
* @hidden
|
|
3905
|
+
*/
|
|
3906
|
+
private handleResize;
|
|
3874
3907
|
/**
|
|
3875
3908
|
* @hidden
|
|
3876
3909
|
*/
|
|
@@ -3954,7 +3987,7 @@ export declare interface TabStripContentProps {
|
|
|
3954
3987
|
navItemId?: string;
|
|
3955
3988
|
}
|
|
3956
3989
|
|
|
3957
|
-
export declare class TabStripNavigation extends React_2.Component<TabStripNavigationProps,
|
|
3990
|
+
export declare class TabStripNavigation extends React_2.Component<TabStripNavigationProps, {}> {
|
|
3958
3991
|
/**
|
|
3959
3992
|
* @hidden
|
|
3960
3993
|
*/
|
|
@@ -3962,11 +3995,16 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3962
3995
|
children: default_2.Requireable<NonNullable<default_2.ReactElementLike | (default_2.ReactElementLike | null | undefined)[] | null | undefined>>;
|
|
3963
3996
|
onSelect: default_2.Requireable<(...args: any[]) => any>;
|
|
3964
3997
|
onKeyDown: default_2.Requireable<(...args: any[]) => any>;
|
|
3998
|
+
onScroll: default_2.Requireable<(...args: any[]) => any>;
|
|
3965
3999
|
selected: default_2.Requireable<number>;
|
|
3966
4000
|
tabIndex: default_2.Requireable<number>;
|
|
4001
|
+
scrollable: default_2.Requireable<boolean>;
|
|
4002
|
+
size: default_2.Requireable<string>;
|
|
4003
|
+
scrollButtons: default_2.Requireable<string>;
|
|
4004
|
+
scrollButtonsPosition: default_2.Requireable<string>;
|
|
4005
|
+
containerScrollPosition: default_2.Requireable<string | null>;
|
|
3967
4006
|
};
|
|
3968
4007
|
private itemsNavRef;
|
|
3969
|
-
constructor(props: TabStripNavigationProps);
|
|
3970
4008
|
/**
|
|
3971
4009
|
* @hidden
|
|
3972
4010
|
*/
|
|
@@ -3975,6 +4013,7 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3975
4013
|
* @hidden
|
|
3976
4014
|
*/
|
|
3977
4015
|
componentDidUpdate(prevProps: Readonly<TabStripNavigationProps>): void;
|
|
4016
|
+
private onScroll;
|
|
3978
4017
|
/**
|
|
3979
4018
|
* @hidden
|
|
3980
4019
|
*/
|
|
@@ -3982,7 +4021,6 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3982
4021
|
private scrollToSelected;
|
|
3983
4022
|
private horizontalScroll;
|
|
3984
4023
|
private isRtl;
|
|
3985
|
-
private onWheel;
|
|
3986
4024
|
private arrowClickPrev;
|
|
3987
4025
|
private arrowClickNext;
|
|
3988
4026
|
private handleArrowClick;
|
|
@@ -4097,6 +4135,10 @@ export declare interface TabStripNavigationProps {
|
|
|
4097
4135
|
* @hidden
|
|
4098
4136
|
*/
|
|
4099
4137
|
onSelect?(idx: number): void;
|
|
4138
|
+
/**
|
|
4139
|
+
* @hidden
|
|
4140
|
+
*/
|
|
4141
|
+
onScroll?(): void;
|
|
4100
4142
|
/**
|
|
4101
4143
|
* @hidden
|
|
4102
4144
|
*/
|
|
@@ -4104,7 +4146,15 @@ export declare interface TabStripNavigationProps {
|
|
|
4104
4146
|
/**
|
|
4105
4147
|
* @hidden
|
|
4106
4148
|
*/
|
|
4107
|
-
|
|
4149
|
+
scrollButtons?: ScrollButtons;
|
|
4150
|
+
/**
|
|
4151
|
+
* @hidden
|
|
4152
|
+
*/
|
|
4153
|
+
scrollButtonsPosition?: ScrollButtonsPosition;
|
|
4154
|
+
/**
|
|
4155
|
+
* @hidden
|
|
4156
|
+
*/
|
|
4157
|
+
size?: TabStripSize;
|
|
4108
4158
|
/**
|
|
4109
4159
|
* @hidden
|
|
4110
4160
|
*/
|
|
@@ -4137,14 +4187,14 @@ export declare interface TabStripNavigationProps {
|
|
|
4137
4187
|
* @hidden
|
|
4138
4188
|
*/
|
|
4139
4189
|
renderAllContent?: boolean;
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4190
|
+
/**
|
|
4191
|
+
* @hidden
|
|
4192
|
+
*/
|
|
4193
|
+
containerScrollPosition?: 'start' | 'end' | 'top' | 'bottom' | 'middle' | null;
|
|
4194
|
+
/**
|
|
4195
|
+
* @hidden
|
|
4196
|
+
*/
|
|
4197
|
+
itemsNavRef?: React_2.RefObject<HTMLUListElement>;
|
|
4148
4198
|
}
|
|
4149
4199
|
|
|
4150
4200
|
/**
|
|
@@ -4200,6 +4250,11 @@ export declare interface TabStripProps extends KendoReactComponentBaseProps, Tab
|
|
|
4200
4250
|
* Specifies the CSS class names of the TabStrip component.
|
|
4201
4251
|
*/
|
|
4202
4252
|
className?: string;
|
|
4253
|
+
/**
|
|
4254
|
+
* Specifies the possible sizes of the TabStrip.
|
|
4255
|
+
* * @default `medium`
|
|
4256
|
+
*/
|
|
4257
|
+
size?: TabStripSize;
|
|
4203
4258
|
/**
|
|
4204
4259
|
* Defines if the tabs will remain mounted after another tab is selected. Defaults to `false`.
|
|
4205
4260
|
*/
|
|
@@ -4233,17 +4288,26 @@ export declare interface TabStripScrollableProps {
|
|
|
4233
4288
|
*/
|
|
4234
4289
|
buttonScrollSpeed?: number;
|
|
4235
4290
|
/**
|
|
4236
|
-
*
|
|
4291
|
+
* **Deprecated**. The mouse scroll is implemented via CSS and the property is no longer needed.
|
|
4292
|
+
*
|
|
4293
|
+
* @deprecated
|
|
4237
4294
|
*
|
|
4238
4295
|
* @default 10
|
|
4239
4296
|
*/
|
|
4240
4297
|
mouseScrollSpeed?: number;
|
|
4298
|
+
/**
|
|
4299
|
+
* Sets the visibility of the scroll buttons.
|
|
4300
|
+
*
|
|
4301
|
+
* @default `auto`
|
|
4302
|
+
*/
|
|
4303
|
+
scrollButtons?: ScrollButtons;
|
|
4241
4304
|
/**
|
|
4242
4305
|
* Sets the scroll buttons position according to the tab list.
|
|
4306
|
+
* The previous options 'around', 'before', 'after' are going to be deprecated in favor of 'split', 'start', 'end'.
|
|
4243
4307
|
*
|
|
4244
|
-
* @default `
|
|
4308
|
+
* @default `split`
|
|
4245
4309
|
*/
|
|
4246
|
-
scrollButtonsPosition?:
|
|
4310
|
+
scrollButtonsPosition?: ScrollButtonsPosition;
|
|
4247
4311
|
/**
|
|
4248
4312
|
* Defines the custom component that will be rendered as a previous button.
|
|
4249
4313
|
* To remove the button, set a function which returns null `() => null`.
|
|
@@ -4266,6 +4330,18 @@ export declare interface TabStripSelectEventArguments {
|
|
|
4266
4330
|
selected: number;
|
|
4267
4331
|
}
|
|
4268
4332
|
|
|
4333
|
+
/**
|
|
4334
|
+
* Represents the values of the size property of the TabStrip.
|
|
4335
|
+
*/
|
|
4336
|
+
declare type TabStripSize = 'small' | 'medium' | 'large' | null;
|
|
4337
|
+
|
|
4338
|
+
/**
|
|
4339
|
+
* @hidden
|
|
4340
|
+
*/
|
|
4341
|
+
declare interface TabStripStateProps {
|
|
4342
|
+
containerScrollPosition: StateScrollPosition;
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4269
4345
|
export declare class TabStripTab extends React_2.Component<TabStripTabProps, {}> {
|
|
4270
4346
|
/**
|
|
4271
4347
|
* @hidden
|
package/index.d.ts
CHANGED
|
@@ -3199,6 +3199,16 @@ export declare interface RenderPanelBarItem {
|
|
|
3199
3199
|
*/
|
|
3200
3200
|
export declare const rightArrowName = "caret-alt-right";
|
|
3201
3201
|
|
|
3202
|
+
/**
|
|
3203
|
+
* Represents the values of the scrollButtons property of the TabStrip.
|
|
3204
|
+
*/
|
|
3205
|
+
declare type ScrollButtons = 'auto' | 'visible' | 'hidden';
|
|
3206
|
+
|
|
3207
|
+
/**
|
|
3208
|
+
* Represents the values of the scrollButtonsPosition property of the TabStrip.
|
|
3209
|
+
*/
|
|
3210
|
+
declare type ScrollButtonsPosition = 'split' | 'start' | 'end' | 'around' | 'before' | 'after';
|
|
3211
|
+
|
|
3202
3212
|
/**
|
|
3203
3213
|
* Sort the events list based on event date.
|
|
3204
3214
|
*/
|
|
@@ -3552,6 +3562,11 @@ export declare interface StackLayoutProps {
|
|
|
3552
3562
|
align?: StackLayoutAlign;
|
|
3553
3563
|
}
|
|
3554
3564
|
|
|
3565
|
+
/**
|
|
3566
|
+
* @hidden
|
|
3567
|
+
*/
|
|
3568
|
+
declare type StateScrollPosition = 'start' | 'end' | 'top' | 'bottom' | 'middle' | null;
|
|
3569
|
+
|
|
3555
3570
|
/**
|
|
3556
3571
|
* Represents the [KendoReact Step component]({% slug overview_stepper %}).
|
|
3557
3572
|
*
|
|
@@ -3831,11 +3846,12 @@ export declare interface StepProps {
|
|
|
3831
3846
|
/** @hidden */
|
|
3832
3847
|
export declare const TabStrip: ForwardRefExoticComponent<TabStripProps & RefAttributes<any>>;
|
|
3833
3848
|
|
|
3834
|
-
export declare class TabStripClassComponent extends React_2.Component<TabStripProps, {}> {
|
|
3849
|
+
export declare class TabStripClassComponent extends React_2.Component<TabStripProps, TabStripStateProps, {}> {
|
|
3835
3850
|
/**
|
|
3836
3851
|
* @hidden
|
|
3837
3852
|
*/
|
|
3838
3853
|
static propTypes: {
|
|
3854
|
+
id: default_2.Requireable<string>;
|
|
3839
3855
|
animation: default_2.Requireable<boolean>;
|
|
3840
3856
|
children: default_2.Requireable<default_2.ReactNodeLike>;
|
|
3841
3857
|
onSelect: default_2.Requireable<(...args: any[]) => any>;
|
|
@@ -3847,6 +3863,10 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3847
3863
|
tabIndex: default_2.Requireable<number>;
|
|
3848
3864
|
className: default_2.Requireable<string>;
|
|
3849
3865
|
dir: default_2.Requireable<string>;
|
|
3866
|
+
renderAllContent: default_2.Requireable<boolean>;
|
|
3867
|
+
size: default_2.Requireable<string | null>;
|
|
3868
|
+
scrollButtons: default_2.Requireable<string>;
|
|
3869
|
+
scrollButtonsPosition: default_2.Requireable<string>;
|
|
3850
3870
|
};
|
|
3851
3871
|
/**
|
|
3852
3872
|
* @hidden
|
|
@@ -3857,11 +3877,15 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3857
3877
|
tabAlignment: string;
|
|
3858
3878
|
keepTabsMounted: boolean;
|
|
3859
3879
|
buttonScrollSpeed: number;
|
|
3860
|
-
scrollButtonsPosition: string;
|
|
3861
3880
|
mouseScrollSpeed: number;
|
|
3881
|
+
scrollButtons: string;
|
|
3882
|
+
scrollButtonsPosition: string;
|
|
3883
|
+
size: string;
|
|
3862
3884
|
renderAllContent: boolean;
|
|
3863
3885
|
};
|
|
3864
3886
|
private tabStripRef;
|
|
3887
|
+
private itemsNavRef;
|
|
3888
|
+
private resizeObserver?;
|
|
3865
3889
|
private get contentPanelId();
|
|
3866
3890
|
private get navItemId();
|
|
3867
3891
|
private showLicenseWatermark;
|
|
@@ -3871,6 +3895,15 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
|
|
|
3871
3895
|
componentDidMount(): void;
|
|
3872
3896
|
/** @hidden */
|
|
3873
3897
|
componentWillUnmount(): void;
|
|
3898
|
+
private horizontalScroll;
|
|
3899
|
+
/**
|
|
3900
|
+
* @hidden
|
|
3901
|
+
*/
|
|
3902
|
+
private onScroll;
|
|
3903
|
+
/**
|
|
3904
|
+
* @hidden
|
|
3905
|
+
*/
|
|
3906
|
+
private handleResize;
|
|
3874
3907
|
/**
|
|
3875
3908
|
* @hidden
|
|
3876
3909
|
*/
|
|
@@ -3954,7 +3987,7 @@ export declare interface TabStripContentProps {
|
|
|
3954
3987
|
navItemId?: string;
|
|
3955
3988
|
}
|
|
3956
3989
|
|
|
3957
|
-
export declare class TabStripNavigation extends React_2.Component<TabStripNavigationProps,
|
|
3990
|
+
export declare class TabStripNavigation extends React_2.Component<TabStripNavigationProps, {}> {
|
|
3958
3991
|
/**
|
|
3959
3992
|
* @hidden
|
|
3960
3993
|
*/
|
|
@@ -3962,11 +3995,16 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3962
3995
|
children: default_2.Requireable<NonNullable<default_2.ReactElementLike | (default_2.ReactElementLike | null | undefined)[] | null | undefined>>;
|
|
3963
3996
|
onSelect: default_2.Requireable<(...args: any[]) => any>;
|
|
3964
3997
|
onKeyDown: default_2.Requireable<(...args: any[]) => any>;
|
|
3998
|
+
onScroll: default_2.Requireable<(...args: any[]) => any>;
|
|
3965
3999
|
selected: default_2.Requireable<number>;
|
|
3966
4000
|
tabIndex: default_2.Requireable<number>;
|
|
4001
|
+
scrollable: default_2.Requireable<boolean>;
|
|
4002
|
+
size: default_2.Requireable<string>;
|
|
4003
|
+
scrollButtons: default_2.Requireable<string>;
|
|
4004
|
+
scrollButtonsPosition: default_2.Requireable<string>;
|
|
4005
|
+
containerScrollPosition: default_2.Requireable<string | null>;
|
|
3967
4006
|
};
|
|
3968
4007
|
private itemsNavRef;
|
|
3969
|
-
constructor(props: TabStripNavigationProps);
|
|
3970
4008
|
/**
|
|
3971
4009
|
* @hidden
|
|
3972
4010
|
*/
|
|
@@ -3975,6 +4013,7 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3975
4013
|
* @hidden
|
|
3976
4014
|
*/
|
|
3977
4015
|
componentDidUpdate(prevProps: Readonly<TabStripNavigationProps>): void;
|
|
4016
|
+
private onScroll;
|
|
3978
4017
|
/**
|
|
3979
4018
|
* @hidden
|
|
3980
4019
|
*/
|
|
@@ -3982,7 +4021,6 @@ export declare class TabStripNavigation extends React_2.Component<TabStripNaviga
|
|
|
3982
4021
|
private scrollToSelected;
|
|
3983
4022
|
private horizontalScroll;
|
|
3984
4023
|
private isRtl;
|
|
3985
|
-
private onWheel;
|
|
3986
4024
|
private arrowClickPrev;
|
|
3987
4025
|
private arrowClickNext;
|
|
3988
4026
|
private handleArrowClick;
|
|
@@ -4097,6 +4135,10 @@ export declare interface TabStripNavigationProps {
|
|
|
4097
4135
|
* @hidden
|
|
4098
4136
|
*/
|
|
4099
4137
|
onSelect?(idx: number): void;
|
|
4138
|
+
/**
|
|
4139
|
+
* @hidden
|
|
4140
|
+
*/
|
|
4141
|
+
onScroll?(): void;
|
|
4100
4142
|
/**
|
|
4101
4143
|
* @hidden
|
|
4102
4144
|
*/
|
|
@@ -4104,7 +4146,15 @@ export declare interface TabStripNavigationProps {
|
|
|
4104
4146
|
/**
|
|
4105
4147
|
* @hidden
|
|
4106
4148
|
*/
|
|
4107
|
-
|
|
4149
|
+
scrollButtons?: ScrollButtons;
|
|
4150
|
+
/**
|
|
4151
|
+
* @hidden
|
|
4152
|
+
*/
|
|
4153
|
+
scrollButtonsPosition?: ScrollButtonsPosition;
|
|
4154
|
+
/**
|
|
4155
|
+
* @hidden
|
|
4156
|
+
*/
|
|
4157
|
+
size?: TabStripSize;
|
|
4108
4158
|
/**
|
|
4109
4159
|
* @hidden
|
|
4110
4160
|
*/
|
|
@@ -4137,14 +4187,14 @@ export declare interface TabStripNavigationProps {
|
|
|
4137
4187
|
* @hidden
|
|
4138
4188
|
*/
|
|
4139
4189
|
renderAllContent?: boolean;
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4190
|
+
/**
|
|
4191
|
+
* @hidden
|
|
4192
|
+
*/
|
|
4193
|
+
containerScrollPosition?: 'start' | 'end' | 'top' | 'bottom' | 'middle' | null;
|
|
4194
|
+
/**
|
|
4195
|
+
* @hidden
|
|
4196
|
+
*/
|
|
4197
|
+
itemsNavRef?: React_2.RefObject<HTMLUListElement>;
|
|
4148
4198
|
}
|
|
4149
4199
|
|
|
4150
4200
|
/**
|
|
@@ -4200,6 +4250,11 @@ export declare interface TabStripProps extends KendoReactComponentBaseProps, Tab
|
|
|
4200
4250
|
* Specifies the CSS class names of the TabStrip component.
|
|
4201
4251
|
*/
|
|
4202
4252
|
className?: string;
|
|
4253
|
+
/**
|
|
4254
|
+
* Specifies the possible sizes of the TabStrip.
|
|
4255
|
+
* * @default `medium`
|
|
4256
|
+
*/
|
|
4257
|
+
size?: TabStripSize;
|
|
4203
4258
|
/**
|
|
4204
4259
|
* Defines if the tabs will remain mounted after another tab is selected. Defaults to `false`.
|
|
4205
4260
|
*/
|
|
@@ -4233,17 +4288,26 @@ export declare interface TabStripScrollableProps {
|
|
|
4233
4288
|
*/
|
|
4234
4289
|
buttonScrollSpeed?: number;
|
|
4235
4290
|
/**
|
|
4236
|
-
*
|
|
4291
|
+
* **Deprecated**. The mouse scroll is implemented via CSS and the property is no longer needed.
|
|
4292
|
+
*
|
|
4293
|
+
* @deprecated
|
|
4237
4294
|
*
|
|
4238
4295
|
* @default 10
|
|
4239
4296
|
*/
|
|
4240
4297
|
mouseScrollSpeed?: number;
|
|
4298
|
+
/**
|
|
4299
|
+
* Sets the visibility of the scroll buttons.
|
|
4300
|
+
*
|
|
4301
|
+
* @default `auto`
|
|
4302
|
+
*/
|
|
4303
|
+
scrollButtons?: ScrollButtons;
|
|
4241
4304
|
/**
|
|
4242
4305
|
* Sets the scroll buttons position according to the tab list.
|
|
4306
|
+
* The previous options 'around', 'before', 'after' are going to be deprecated in favor of 'split', 'start', 'end'.
|
|
4243
4307
|
*
|
|
4244
|
-
* @default `
|
|
4308
|
+
* @default `split`
|
|
4245
4309
|
*/
|
|
4246
|
-
scrollButtonsPosition?:
|
|
4310
|
+
scrollButtonsPosition?: ScrollButtonsPosition;
|
|
4247
4311
|
/**
|
|
4248
4312
|
* Defines the custom component that will be rendered as a previous button.
|
|
4249
4313
|
* To remove the button, set a function which returns null `() => null`.
|
|
@@ -4266,6 +4330,18 @@ export declare interface TabStripSelectEventArguments {
|
|
|
4266
4330
|
selected: number;
|
|
4267
4331
|
}
|
|
4268
4332
|
|
|
4333
|
+
/**
|
|
4334
|
+
* Represents the values of the size property of the TabStrip.
|
|
4335
|
+
*/
|
|
4336
|
+
declare type TabStripSize = 'small' | 'medium' | 'large' | null;
|
|
4337
|
+
|
|
4338
|
+
/**
|
|
4339
|
+
* @hidden
|
|
4340
|
+
*/
|
|
4341
|
+
declare interface TabStripStateProps {
|
|
4342
|
+
containerScrollPosition: StateScrollPosition;
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4269
4345
|
export declare class TabStripTab extends React_2.Component<TabStripTabProps, {}> {
|
|
4270
4346
|
/**
|
|
4271
4347
|
* @hidden
|
package/menu/components/Menu.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),r=require("prop-types"),n=require("@progress/kendo-react-common"),i=require("../utils/itemsIdsUtils.js"),v=require("../utils/prepareInputItemsForInternalWork.js"),h=require("../utils/getNewItemIdUponKeyboardNavigation.js"),c=require("../utils/hoverDelay.js"),f=require("./MenuItemInternal.js"),g=require("../utils/DirectionHolder.js"),b=require("../utils/MouseOverHandler.js"),D=require("../../package-metadata.js");function y(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const d=y(p),u={focusedItemId:i.EMPTY_ID,hoveredItemId:i.EMPTY_ID,tabbableItemId:i.ZERO_LEVEL_ZERO_ITEM_ID},l=class l extends d.Component{constructor(t){super(t),this.menuWrapperEl=null,this.directionHolder=new g.DirectionHolder,this.inputItems=[],this.items=[],this.reset=()=>{this.clearItemHoverAndLeaveRequestsIfApplicable(),this.setState(u)},this.onKeyDown=e=>{if(this.state.focusedItemId!==i.EMPTY_ID){const s=i.getItemById(this.state.focusedItemId,this.items);let o=h.getNewItemIdUponKeyboardNavigation(this.items,s.id,e.keyCode,e.key,this.props.vertical,this.directionHolder.getIsDirectionRightToLeft());const m=i.getItemById(o,this.items);m&&m.separator&&(o=h.getNewItemIdUponKeyboardNavigation(this.items,o,e.keyCode,e.key,this.props.vertical,this.directionHolder.getIsDirectionRightToLeft())),s.id!==o&&(e.preventDefault(),this.setFocusedItemId(o)),(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space)&&!s.disabled&&(this.mouseOverHandler.handleItemSelectedViaKeyboard(),this.dispatchSelectEventIfWired(e,s.id),!e.isDefaultPrevented()&&s.items.length===0&&s.url&&window.location.assign(s.url))}e.keyCode===n.Keys.esc&&this.props.onClose&&this.props.onClose.call(void 0,e)},this.onItemMouseOver=e=>{this.mouseOverHandler.IsMouseOverEnabled&&(this.clearItemHoverAndLeaveRequestsIfApplicable(),this.itemHoverRequest=window.setTimeout(()=>{this.setHoveredItemId(e),this.itemHoverRequest=null},c.getHoverOpenDelay(this.props)))},this.onItemMouseLeave=e=>{this.mouseOverHandler.IsMouseOverEnabled&&this.isItemWithDefaultClose(e)&&(this.clearItemHoverAndLeaveRequestsIfApplicable(),this.itemLeaveRequest=window.setTimeout(()=>{this.setHoveredItemId(i.EMPTY_ID),this.itemLeaveRequest=null},c.getHoverCloseDelay(this.props)))},this.onItemMouseDown=()=>{this.mouseOverHandler.handleItemMouseDown()},this.onItemFocus=e=>{this.setFocusedItemId(e),this.mouseOverHandler.handleItemFocus()},this.onItemClick=(e,s)=>{const o=i.getItemById(s,this.items);o.disabled||(this.setFocusedItemId(s),this.mouseOverHandler.handleItemClick(s,this.isItemWithDefaultClose(s)),this.dispatchSelectEventIfWired(e,s),!e.isDefaultPrevented()&&o.url&&window.location.assign(o.url))},this.onItemBlur=(e,s)=>{if(this.isItemWithDefaultClose(e)&&this.setFocusedItemId(i.EMPTY_ID),s.relatedTarget&&s.relatedTarget.nodeName==="LI"){const o=s.relatedTarget.getAttribute("id");if(o&&o.includes(this.menuItemId))return}this.props.onClose&&this.props.onClose.call(void 0,s)},this.getInputItem=e=>i.getItemById(e,this.inputItems),n.validatePackage(D.packageMetadata),this.mouseOverHandler=new b.MouseOverHandler(this.props.openOnClick,this.reset,this.onItemMouseOver),this.state=Object.assign({},u,{isFirstRender:!0})}get menuItemId(){return this.props.id}get element(){return this.menuWrapperEl}render(){this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());const t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?i.getDirectParentId(this.state.focusedItemId):i.EMPTY_ID;return d.createElement("div",{id:this.props.id,onKeyDown:this.onKeyDown,style:this.props.style,className:this.directionHolder.getIsDirectionRightToLeft()?"k-rtl":void 0,ref:e=>this.menuWrapperEl=e},d.createElement(f.MenuItemInternalsList,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.menuItemId,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem,role:this.props.role}))}componentDidMount(){this.setState({isFirstRender:!1})}componentDidUpdate(t){(!!t.vertical!=!!this.props.vertical||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick}componentWillUnmount(){this.clearItemHoverAndLeaveRequestsIfApplicable()}setFocusedItemId(t){this.setState(e=>{const s=t===i.EMPTY_ID?e.tabbableItemId:i.getRootParentId(t);return{hoveredItemId:t===i.EMPTY_ID||i.isIdEmptyOrZeroLevel(e.hoveredItemId)&&i.isIdEmptyOrZeroLevel(t)?e.hoveredItemId:i.EMPTY_ID,focusedItemId:t,tabbableItemId:s}})}setHoveredItemId(t){this.setState(e=>i.isIdEmptyOrZeroLevel(t)&&i.isIdEmptyOrZeroLevel(e.focusedItemId)?{hoveredItemId:t,focusedItemId:e.focusedItemId,tabbableItemId:e.tabbableItemId}:{hoveredItemId:t,focusedItemId:i.EMPTY_ID,tabbableItemId:i.ZERO_LEVEL_ZERO_ITEM_ID})}getMenuClassName(){return n.classNames("k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical},this.props.className)}clearItemHoverAndLeaveRequestsIfApplicable(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)}isItemWithDefaultClose(t){return!this.props.customCloseItemIds||this.props.customCloseItemIds.indexOf(t)===-1}checkIsDirectionRightToLeft(){return!!(this.props.dir!==void 0?this.props.dir==="rtl":this.menuWrapperEl&&getComputedStyle(this.menuWrapperEl).direction==="rtl")}prepareItems(){const{items:t,inputItems:e}=v.prepareInputItemsForInternalWork(this.props.items,this.props.children);this.items=t,this.inputItems=e}dispatchSelectEventIfWired(t,e){n.dispatchEvent(this.props.onSelect,t,this,{item:this.getInputItem(e),itemId:e})}};l.propTypes={vertical:r.bool,items:r.arrayOf(r.object),style:r.object,dir:r.string,hoverOpenDelay:r.number,hoverCloseDelay:r.number,openOnClick:r.bool,itemRender:r.any,linkRender:r.any,customCloseItemIds:r.arrayOf(r.string),onSelect:r.func,role:r.string},l.defaultProps={vertical:!1};let I=l;exports.Menu=I;
|