@elliemae/ds-tabs 2.0.0-rc.1 → 2.0.0-rc.13
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/cjs/DSTabs.js +27 -108
- package/cjs/DSTabsCTX.js +30 -0
- package/cjs/DSTabsDatatestid.js +18 -0
- package/cjs/DSTabsTypes.js +2 -0
- package/cjs/config/useCrossRef.js +17 -0
- package/cjs/config/useTabs.js +51 -0
- package/cjs/defaultProps.js +27 -0
- package/cjs/{PanelContainer.js → exportsRelated/DSTab.js} +14 -30
- package/cjs/index.js +5 -5
- package/cjs/parts/carousel/Carousel.js +71 -0
- package/cjs/parts/carousel/styles.js +60 -0
- package/cjs/parts/carousel/useCarousel.js +91 -0
- package/cjs/parts/carousel/useCarouselCallbacks.js +72 -0
- package/cjs/parts/tabBar/TabBar.js +160 -0
- package/cjs/parts/tabBar/styles.js +199 -0
- package/cjs/parts/tabBar/useTabBar.js +98 -0
- package/cjs/parts/tabsContent/TabsContent.js +49 -0
- package/cjs/parts/tabsContent/styles.js +15 -0
- package/cjs/parts/tabsPanel/TabsPanels.js +77 -0
- package/cjs/parts/tabsPanel/styles.js +30 -0
- package/cjs/propTypes.js +33 -0
- package/cjs/utils/constants.js +29 -0
- package/cjs/utils/helpers.js +47 -0
- package/cjs/utils/hooks/useKeyboardNavigation.js +61 -0
- package/cjs/{useResize.js → utils/hooks/useResize.js} +8 -4
- package/cjs/utils/hooks/useTabsCallbacks.js +59 -0
- package/esm/DSTabs.js +29 -110
- package/esm/DSTabsCTX.js +25 -0
- package/esm/DSTabsDatatestid.js +14 -0
- package/esm/DSTabsTypes.js +1 -0
- package/esm/config/useCrossRef.js +13 -0
- package/esm/config/useTabs.js +47 -0
- package/esm/defaultProps.js +23 -0
- package/esm/{PanelContainer.js → exportsRelated/DSTab.js} +7 -26
- package/esm/index.js +4 -3
- package/esm/parts/carousel/Carousel.js +63 -0
- package/esm/parts/carousel/styles.js +49 -0
- package/esm/parts/carousel/useCarousel.js +87 -0
- package/esm/parts/carousel/useCarouselCallbacks.js +68 -0
- package/esm/parts/tabBar/TabBar.js +151 -0
- package/esm/parts/tabBar/styles.js +185 -0
- package/esm/parts/tabBar/useTabBar.js +90 -0
- package/esm/parts/tabsContent/TabsContent.js +40 -0
- package/esm/parts/tabsContent/styles.js +7 -0
- package/esm/parts/tabsPanel/TabsPanels.js +67 -0
- package/esm/parts/tabsPanel/styles.js +22 -0
- package/esm/propTypes.js +28 -0
- package/esm/utils/constants.js +21 -0
- package/esm/utils/helpers.js +37 -0
- package/esm/utils/hooks/useKeyboardNavigation.js +57 -0
- package/esm/{useResize.js → utils/hooks/useResize.js} +9 -5
- package/esm/utils/hooks/useTabsCallbacks.js +55 -0
- package/package.json +103 -36
- package/types/DSTabs.d.ts +10 -60
- package/types/DSTabsCTX.d.ts +4 -0
- package/types/DSTabsDatatestid.d.ts +12 -0
- package/types/DSTabsTypes.d.ts +202 -0
- package/types/config/useCrossRef.d.ts +2 -0
- package/types/config/useTabs.d.ts +2 -0
- package/types/defaultProps.d.ts +2 -0
- package/types/exportsRelated/DSTab.d.ts +14 -0
- package/types/index.d.ts +4 -3
- package/types/parts/carousel/Carousel.d.ts +3 -0
- package/types/parts/carousel/styles.d.ts +9 -0
- package/types/parts/carousel/useCarousel.d.ts +2 -0
- package/types/parts/carousel/useCarouselCallbacks.d.ts +2 -0
- package/types/parts/tabBar/TabBar.d.ts +2 -0
- package/types/parts/tabBar/styles.d.ts +7 -0
- package/types/parts/tabBar/useTabBar.d.ts +2 -0
- package/types/parts/tabsContent/TabsContent.d.ts +2 -0
- package/types/parts/tabsContent/styles.d.ts +1 -0
- package/types/parts/tabsPanel/TabsPanels.d.ts +2 -0
- package/types/parts/tabsPanel/styles.d.ts +2 -0
- package/types/propTypes.d.ts +54 -0
- package/types/tests/{DSTabs.events.test.d.ts → DSTabs.callbacks.test.d.ts} +0 -0
- package/types/tests/DSTabs.func.test.d.ts +1 -0
- package/types/tests/DSTabs.keyboard.test.d.ts +1 -0
- package/types/utils/constants.d.ts +19 -0
- package/types/utils/helpers.d.ts +8 -0
- package/types/utils/hooks/useKeyboardNavigation.d.ts +2 -0
- package/types/utils/hooks/useResize.d.ts +2 -0
- package/types/utils/hooks/useTabsCallbacks.d.ts +2 -0
- package/cjs/Carousel.js +0 -205
- package/cjs/DSTab.js +0 -46
- package/cjs/SubTabBar.js +0 -54
- package/cjs/TabBar.js +0 -421
- package/cjs/TabTypes.js +0 -15
- package/cjs/TabsImpl.js +0 -120
- package/cjs/TabsPanels.js +0 -85
- package/esm/Carousel.js +0 -196
- package/esm/DSTab.js +0 -36
- package/esm/SubTabBar.js +0 -48
- package/esm/TabBar.js +0 -410
- package/esm/TabTypes.js +0 -10
- package/esm/TabsImpl.js +0 -113
- package/esm/TabsPanels.js +0 -75
- package/types/Carousel.d.ts +0 -16
- package/types/DSTab.d.ts +0 -22
- package/types/PanelContainer.d.ts +0 -20
- package/types/SubTabBar.d.ts +0 -23
- package/types/TabBar.d.ts +0 -30
- package/types/TabTypes.d.ts +0 -5
- package/types/TabsImpl.d.ts +0 -37
- package/types/TabsPanels.d.ts +0 -5
- package/types/useResize.d.ts +0 -1
package/types/DSTabs.d.ts
CHANGED
|
@@ -1,64 +1,14 @@
|
|
|
1
|
-
/// <reference
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import type { WeakValidationMap } from 'react';
|
|
3
|
+
import type { DSTabsPropsT } from './DSTabsTypes';
|
|
2
4
|
declare const DSTabs: {
|
|
3
|
-
(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tabsListAriaLabel?: string | undefined;
|
|
11
|
-
type?: string | undefined;
|
|
12
|
-
tabBarExtraContent?: undefined;
|
|
13
|
-
children: any;
|
|
14
|
-
onlyRenderActiveTab?: boolean | undefined;
|
|
15
|
-
activeTab: any;
|
|
16
|
-
withCarousel?: boolean | undefined;
|
|
17
|
-
firstSubtabRef: any;
|
|
18
|
-
lastTabRef: any;
|
|
19
|
-
flexibleTabsHeaders: any;
|
|
20
|
-
fixedTabsHeaders: any;
|
|
21
|
-
isDSMobile?: boolean | undefined;
|
|
22
|
-
}): JSX.Element;
|
|
23
|
-
propTypes: {
|
|
24
|
-
/** Whether the tab transition should animate or not */
|
|
25
|
-
animated: any;
|
|
26
|
-
/** Enables tab transition with mouse drag events */
|
|
27
|
-
enableMouseEvents: any;
|
|
28
|
-
/** Allow text selection when mouse drag events are active */
|
|
29
|
-
allowTextSelection: any;
|
|
30
|
-
/** Handler when a user clicks on a different tab */
|
|
31
|
-
onTabChange: any;
|
|
32
|
-
/** Tab type */
|
|
33
|
-
type: any;
|
|
34
|
-
/** Extra content next to the tabs pills */
|
|
35
|
-
tabBarExtraContent: any;
|
|
36
|
-
/** Only renders the active tab in the DOM */
|
|
37
|
-
onlyRenderActiveTab: any;
|
|
38
|
-
/** Mobile only flexible tabs mode */
|
|
39
|
-
flexibleTabsHeaders: any;
|
|
40
|
-
/** Mobile only fixed tabs mode */
|
|
41
|
-
fixedTabsHeaders: any;
|
|
42
|
-
/** Whether or not it's a ds-tab from DSMobile tabs */
|
|
43
|
-
isDSMobile: any;
|
|
44
|
-
/** Activate carousel behavior */
|
|
45
|
-
withCarousel: any;
|
|
46
|
-
/** The active tabId */
|
|
47
|
-
activeTab: any;
|
|
48
|
-
/** tabs children */
|
|
49
|
-
children: any;
|
|
50
|
-
/** Aria label for the list */
|
|
51
|
-
tabsListAriaLabel: any;
|
|
52
|
-
/** Additional properties for the container */
|
|
53
|
-
containerProps: any;
|
|
54
|
-
/** REF */
|
|
55
|
-
innerRef: any;
|
|
56
|
-
/** internal ref to handle keyboard a11y behavior */
|
|
57
|
-
firstSubtabRef: any;
|
|
58
|
-
/** internal ref to handle keyboard a11y behavior */
|
|
59
|
-
lastTabRef: any;
|
|
60
|
-
};
|
|
5
|
+
(props: DSTabsPropsT): JSX.Element;
|
|
6
|
+
propTypes: WeakValidationMap<unknown>;
|
|
7
|
+
};
|
|
8
|
+
declare const DSTabsWithSchema: {
|
|
9
|
+
(props?: DSTabsPropsT | undefined): JSX.Element;
|
|
10
|
+
propTypes: unknown;
|
|
11
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
61
12
|
};
|
|
62
|
-
declare const DSTabsWithSchema: any;
|
|
63
13
|
export { DSTabs, DSTabsWithSchema };
|
|
64
14
|
export default DSTabs;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DSTabsUseCrossRefContextT, DSTabsUseTabsContextT } from './DSTabsTypes';
|
|
3
|
+
export declare const DSTabsContext: import("react").Context<DSTabsUseTabsContextT>;
|
|
4
|
+
export declare const DSTabsCrossRefContext: import("react").Context<DSTabsUseCrossRefContextT>;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { TabTypes } from './utils/constants';
|
|
3
|
+
declare type TabTypesT = typeof TabTypes[keyof typeof TabTypes];
|
|
4
|
+
export interface DSTabsPropsT {
|
|
5
|
+
containerProps?: Record<string, unknown>;
|
|
6
|
+
innerRef?: React.MutableRefObject<HTMLDivElement>;
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
enableMouseEvents?: boolean;
|
|
9
|
+
allowTextSelection?: boolean;
|
|
10
|
+
onTabChange?: (tabId: string, e?: React.MouseEvent) => void;
|
|
11
|
+
tabsListAriaLabel?: string;
|
|
12
|
+
type?: TabTypesT;
|
|
13
|
+
tabBarExtraContent?: React.ReactNode;
|
|
14
|
+
children: React.ReactElement<DSTabPropsWithDefaultT>[];
|
|
15
|
+
onlyRenderActiveTab?: boolean;
|
|
16
|
+
activeTab?: string;
|
|
17
|
+
withCarousel?: boolean;
|
|
18
|
+
firstSubtabRef?: React.MutableRefObject<HTMLElement>;
|
|
19
|
+
lastTabRef?: React.MutableRefObject<HTMLElement>;
|
|
20
|
+
fixedTabsHeaders?: boolean;
|
|
21
|
+
isDSMobile?: boolean;
|
|
22
|
+
showSelectionIndicator?: boolean;
|
|
23
|
+
showSeparator?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface DSTabsPropsWithDefaultsT {
|
|
26
|
+
containerProps: Record<string, unknown>;
|
|
27
|
+
innerRef?: React.MutableRefObject<HTMLDivElement>;
|
|
28
|
+
animated: boolean;
|
|
29
|
+
enableMouseEvents: boolean;
|
|
30
|
+
allowTextSelection: boolean;
|
|
31
|
+
onTabChange: (tabId: string, e?: React.MouseEvent) => void;
|
|
32
|
+
tabsListAriaLabel: string;
|
|
33
|
+
type: TabTypesT;
|
|
34
|
+
tabBarExtraContent?: React.ReactNode;
|
|
35
|
+
children: React.ReactElement<DSTabPropsWithDefaultT>[];
|
|
36
|
+
onlyRenderActiveTab: boolean;
|
|
37
|
+
activeTab?: string;
|
|
38
|
+
withCarousel: boolean;
|
|
39
|
+
firstSubtabRef?: React.MutableRefObject<HTMLElement>;
|
|
40
|
+
lastTabRef?: React.MutableRefObject<HTMLElement>;
|
|
41
|
+
fixedTabsHeaders: boolean;
|
|
42
|
+
isDSMobile: boolean;
|
|
43
|
+
showSelectionIndicator: boolean;
|
|
44
|
+
showSeparator: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface DSTabsDefaultPropsT {
|
|
47
|
+
containerProps: Record<string, unknown>;
|
|
48
|
+
animated: boolean;
|
|
49
|
+
enableMouseEvents: boolean;
|
|
50
|
+
allowTextSelection: boolean;
|
|
51
|
+
onTabChange: (tabId: string, e?: React.MouseEvent) => void;
|
|
52
|
+
tabsListAriaLabel: string;
|
|
53
|
+
type: TabTypesT;
|
|
54
|
+
onlyRenderActiveTab: boolean;
|
|
55
|
+
fixedTabsHeaders: boolean;
|
|
56
|
+
children: React.ReactElement<DSTabPropsWithDefaultT>[];
|
|
57
|
+
withCarousel: boolean;
|
|
58
|
+
isDSMobile: boolean;
|
|
59
|
+
showSelectionIndicator: boolean;
|
|
60
|
+
showSeparator: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface CarouselPropsT {
|
|
63
|
+
children: React.ReactNode[];
|
|
64
|
+
updateIndicatorStyle?: () => void;
|
|
65
|
+
}
|
|
66
|
+
export interface DSTabPropsT {
|
|
67
|
+
tabId: string;
|
|
68
|
+
title?: string;
|
|
69
|
+
required?: boolean;
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
style?: Record<string, unknown>;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
ref?: React.MutableRefObject<HTMLButtonElement>;
|
|
74
|
+
onClick?: (tabId: string, e: React.MouseEvent) => null | void;
|
|
75
|
+
onKeyDown?: (e: React.KeyboardEvent) => null | void;
|
|
76
|
+
}
|
|
77
|
+
export interface DSTabPropsWithDefaultT {
|
|
78
|
+
tabId: string;
|
|
79
|
+
title: string;
|
|
80
|
+
required: boolean;
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
style?: Record<string, unknown>;
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
ref?: React.MutableRefObject<HTMLButtonElement>;
|
|
85
|
+
onClick?: (tabId: string, e: React.MouseEvent) => null | void;
|
|
86
|
+
onKeyDown?: (e: React.KeyboardEvent) => null | void;
|
|
87
|
+
}
|
|
88
|
+
export interface CarouselButtonsPropsT {
|
|
89
|
+
leftButtonOnClick: () => void;
|
|
90
|
+
rightButtonOnClick: () => void;
|
|
91
|
+
showChevrons: ShowChevronsT;
|
|
92
|
+
type: TabTypesT;
|
|
93
|
+
}
|
|
94
|
+
export interface DSTabsUseCrossRefContextT {
|
|
95
|
+
lastTabInternalRef: React.MutableRefObject<HTMLButtonElement | null | undefined>;
|
|
96
|
+
firstSubtabInternalRef: React.MutableRefObject<HTMLButtonElement | null | undefined>;
|
|
97
|
+
}
|
|
98
|
+
export interface DSTabsUseTabsContextT {
|
|
99
|
+
props: DSTabsPropsWithDefaultsT;
|
|
100
|
+
tabsRef: React.MutableRefObject<Record<number, HTMLButtonElement> | null>;
|
|
101
|
+
focusableTabsRef: React.MutableRefObject<HTMLButtonElement[] | null>;
|
|
102
|
+
tabsListRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
103
|
+
tabsRefAsArray: React.MutableRefObject<HTMLButtonElement[] | null>;
|
|
104
|
+
actualActiveTabRef: React.MutableRefObject<HTMLButtonElement | null>;
|
|
105
|
+
carouselOnlyListRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
106
|
+
setInternalActiveTab: React.Dispatch<React.SetStateAction<string>>;
|
|
107
|
+
actualActiveTab: string;
|
|
108
|
+
}
|
|
109
|
+
export interface UseRezisePropsT {
|
|
110
|
+
ref: React.MutableRefObject<HTMLDivElement | null>;
|
|
111
|
+
callback: () => void;
|
|
112
|
+
}
|
|
113
|
+
export interface UseCarouselPropsT {
|
|
114
|
+
updateIndicatorStyle?: () => void;
|
|
115
|
+
}
|
|
116
|
+
export interface ShowChevronsT {
|
|
117
|
+
right: boolean;
|
|
118
|
+
left: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface MobileGradientsT {
|
|
121
|
+
right: boolean;
|
|
122
|
+
left: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface IndicatorStyleT {
|
|
125
|
+
left: string;
|
|
126
|
+
width: string;
|
|
127
|
+
backgroundWithTransparentAndWhite: string;
|
|
128
|
+
backgroundWithTransparent: string;
|
|
129
|
+
}
|
|
130
|
+
export interface UseCarouselReturnTypeT {
|
|
131
|
+
showChevrons: ShowChevronsT;
|
|
132
|
+
leftButtonOnClick: () => void;
|
|
133
|
+
rightButtonOnClick: () => void;
|
|
134
|
+
handleOnClick: (e: React.MouseEvent) => void;
|
|
135
|
+
handleOnScroll: (e: React.UIEvent) => void;
|
|
136
|
+
}
|
|
137
|
+
export interface UseCarouselCallbacksPropsT {
|
|
138
|
+
getVisibleItemsOffset: () => number;
|
|
139
|
+
recalcChevrons: () => void;
|
|
140
|
+
updateIndicatorStyle?: () => void;
|
|
141
|
+
}
|
|
142
|
+
export interface UseCarouselCallbacksReturnTypeT {
|
|
143
|
+
leftButtonOnClick: () => void;
|
|
144
|
+
rightButtonOnClick: () => void;
|
|
145
|
+
handleOnClick: (e: React.MouseEvent) => void;
|
|
146
|
+
handleOnScroll: (e: React.UIEvent) => void;
|
|
147
|
+
}
|
|
148
|
+
export interface UseKeyboardNavigationReturnTypeT {
|
|
149
|
+
handleOnKeyDown: (e: React.KeyboardEvent) => void;
|
|
150
|
+
}
|
|
151
|
+
export interface UseTabsCallbacksReturnTypeT {
|
|
152
|
+
handleOnTabChange: (tabId: string, e?: React.MouseEvent) => void;
|
|
153
|
+
handleOnMouseDown: (e: React.MouseEvent) => void;
|
|
154
|
+
}
|
|
155
|
+
export interface UseTabBarReturnTypeT {
|
|
156
|
+
updateIndicatorStyle: () => void;
|
|
157
|
+
updateMobileGradients: () => void;
|
|
158
|
+
setIndicatorStyle: React.Dispatch<React.SetStateAction<IndicatorStyleT>>;
|
|
159
|
+
indicatorStyle: IndicatorStyleT;
|
|
160
|
+
mobileGradients: MobileGradientsT;
|
|
161
|
+
}
|
|
162
|
+
export interface VisibleDimensionsT {
|
|
163
|
+
width: number;
|
|
164
|
+
height: number;
|
|
165
|
+
}
|
|
166
|
+
export interface StyledTabWrapperPropsT {
|
|
167
|
+
isDSMobile: boolean;
|
|
168
|
+
fixedTabsHeaders: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface StyledTabListPropsT {
|
|
171
|
+
withCarousel: boolean;
|
|
172
|
+
isDSMobile: boolean;
|
|
173
|
+
fixedTabsHeaders: boolean;
|
|
174
|
+
mobileGradients: MobileGradientsT;
|
|
175
|
+
indicatorStyle: IndicatorStyleT;
|
|
176
|
+
tabType: TabTypesT;
|
|
177
|
+
}
|
|
178
|
+
export interface StyledSubTabsListPropsT {
|
|
179
|
+
withCarousel: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface StyledTabButtonPropsT {
|
|
182
|
+
isActive: boolean;
|
|
183
|
+
disabled: boolean;
|
|
184
|
+
showSeparator: boolean;
|
|
185
|
+
isDSMobile: boolean;
|
|
186
|
+
fixedTabsHeaders: boolean;
|
|
187
|
+
withCarousel: boolean;
|
|
188
|
+
tabType: TabTypesT;
|
|
189
|
+
}
|
|
190
|
+
export interface StyledCarouselButtonWrapperPropsT {
|
|
191
|
+
right?: boolean;
|
|
192
|
+
tabType: TabTypesT;
|
|
193
|
+
}
|
|
194
|
+
export interface StyledPanelContainerPropsT {
|
|
195
|
+
hidden: boolean;
|
|
196
|
+
isDSMobile: boolean;
|
|
197
|
+
}
|
|
198
|
+
export interface StyledSelectionIndicatoPropsT {
|
|
199
|
+
isDSMobile: boolean;
|
|
200
|
+
tabType: TabTypesT;
|
|
201
|
+
}
|
|
202
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { DSTabPropsT } from '../DSTabsTypes';
|
|
4
|
+
declare const DSTab: {
|
|
5
|
+
(props: DSTabPropsT): JSX.Element;
|
|
6
|
+
propTypes: React.WeakValidationMap<unknown>;
|
|
7
|
+
};
|
|
8
|
+
declare const DSTabWithSchema: {
|
|
9
|
+
(props?: DSTabPropsT | undefined): JSX.Element;
|
|
10
|
+
propTypes: unknown;
|
|
11
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
12
|
+
};
|
|
13
|
+
export { DSTab, DSTabWithSchema };
|
|
14
|
+
export default DSTab;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './DSTab';
|
|
1
|
+
export * from './exportsRelated/DSTab';
|
|
2
2
|
export * from './DSTabs';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export { TabTypes } from './utils/constants';
|
|
4
|
+
export * from './DSTabsDatatestid';
|
|
5
|
+
export type { DSTabsPropsT, DSTabPropsT } from './DSTabsTypes';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StyledCarouselButtonWrapperPropsT } from '../../DSTabsTypes';
|
|
3
|
+
export declare const StyledCarouselBtn: import("styled-components").StyledComponent<{
|
|
4
|
+
(props: import("@elliemae/ds-button/types/v2/propTypes").DSButtonPropsT): JSX.Element;
|
|
5
|
+
propTypes: import("react").WeakValidationMap<unknown>;
|
|
6
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StyledCarouselWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const StyledChildrenWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const StyledCarouselButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledCarouselButtonWrapperPropsT, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StyledSelectionIndicatoPropsT, StyledSubTabsListPropsT, StyledTabListPropsT, StyledTabButtonPropsT, StyledTabWrapperPropsT } from '../../DSTabsTypes';
|
|
2
|
+
export declare const StyledSelectionIndicator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledSelectionIndicatoPropsT, never>;
|
|
3
|
+
export declare const StyledTabWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTabWrapperPropsT, never>;
|
|
4
|
+
export declare const StyledTabButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledTabButtonPropsT, never>;
|
|
5
|
+
export declare const StyledSubTabsList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledSubTabsListPropsT, never>;
|
|
6
|
+
export declare const StyledTabList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTabListPropsT, never>;
|
|
7
|
+
export declare const StyledRequiredMark: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledTabBarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
export declare const tabPropTypes: {
|
|
3
|
+
tabId: {
|
|
4
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
5
|
+
};
|
|
6
|
+
title: {
|
|
7
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
8
|
+
};
|
|
9
|
+
required: {
|
|
10
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
disabled: {
|
|
13
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const tabsPropTypes: {
|
|
17
|
+
animated: {
|
|
18
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
enableMouseEvents: {
|
|
21
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
allowTextSelection: {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
onTabChange: {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
type: {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
tabBarExtraContent: {
|
|
33
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
34
|
+
};
|
|
35
|
+
onlyRenderActiveTab: {
|
|
36
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
38
|
+
withCarousel: {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
activeTab: {
|
|
42
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
43
|
+
};
|
|
44
|
+
children: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
tabsListAriaLabel: {
|
|
46
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
containerProps: {
|
|
49
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
51
|
+
innerRef: {
|
|
52
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const TabTypes: {
|
|
2
|
+
NORMAL: "normal";
|
|
3
|
+
NORMAL_SMALL: "normal_small";
|
|
4
|
+
SUBTABS: "subtabs";
|
|
5
|
+
};
|
|
6
|
+
export declare const TabTypesValuesAsArray: ("normal" | "normal_small" | "subtabs")[];
|
|
7
|
+
export declare const MOBILE_GRADIENT_WIDTH = 24;
|
|
8
|
+
export declare const defaultIndicatorStyles: {
|
|
9
|
+
left: string;
|
|
10
|
+
width: string;
|
|
11
|
+
backgroundWithTransparentAndWhite: string;
|
|
12
|
+
backgroundWithTransparent: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const gradientOffsetsAccordingType: {
|
|
15
|
+
normal_small: number;
|
|
16
|
+
normal: number;
|
|
17
|
+
subtabs: number;
|
|
18
|
+
fixedTabsHeaders: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DSTabPropsWithDefaultT, VisibleDimensionsT } from '../DSTabsTypes';
|
|
2
|
+
export declare const isElementVisible: (tab: HTMLElement, tabList: HTMLElement) => boolean;
|
|
3
|
+
export declare const isElementVisibleCarousel: (tab: HTMLElement | null, tabContainer: HTMLDivElement | null, firstOrLastItem?: boolean) => boolean;
|
|
4
|
+
export declare const getVisibleDimensions: (node: HTMLElement, referenceNode: HTMLElement) => VisibleDimensionsT;
|
|
5
|
+
export declare const getIndexById: (children: React.ReactElement<DSTabPropsWithDefaultT>[], activeId?: string | undefined) => number;
|
|
6
|
+
export declare const getIdByIndex: (children: React.ReactElement<DSTabPropsWithDefaultT>[], index: number) => string;
|
|
7
|
+
export declare const shouldHaveLeftGradient: (scrollLeft: number) => boolean;
|
|
8
|
+
export declare const shouldHaveRightGradient: (scrollLeft: number, clientWidth: number, scrollWidth: number) => boolean;
|