@elliemae/ds-tabs 3.13.1-rc.1 → 3.13.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.
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { DSTabsT } from './propTypes';
3
+ declare const DSTabs: {
4
+ (props: DSTabsT.Props): JSX.Element;
5
+ propTypes: React.WeakValidationMap<unknown>;
6
+ };
7
+ declare const DSTabsWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<DSTabsT.Props>;
8
+ export { DSTabs, DSTabsWithSchema };
9
+ export default DSTabs;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { DSTabsInternalsT } from './sharedTypes';
3
+ export declare const DSTabsContext: import("react").Context<DSTabsInternalsT.DSTabsUseTabsContextT>;
4
+ export declare const DSTabsCrossRefContext: import("react").Context<DSTabsInternalsT.DSTabsUseCrossRefContextT>;
@@ -0,0 +1,12 @@
1
+ export declare const DSTabsDatatestid: {
2
+ TABS_CONTAINER: string;
3
+ TAB_BUTTON: string;
4
+ SUBTAB_BUTTON: string;
5
+ TAB_PANEL: string;
6
+ SUB_TAB_LIST: string;
7
+ TAB_LIST: string;
8
+ CAROUSEL: {
9
+ BUTTON_RIGHT: string;
10
+ BUTTON_LEFT: string;
11
+ };
12
+ };
@@ -0,0 +1,2 @@
1
+ import type { DSTabsInternalsT } from '../sharedTypes';
2
+ export declare const useCrossRef: () => DSTabsInternalsT.DSTabsUseCrossRefContextT;
@@ -0,0 +1,3 @@
1
+ import type { DSTabsT } from '../propTypes';
2
+ import type { DSTabsInternalsT } from '../sharedTypes';
3
+ export declare const useTabs: (props: DSTabsT.Props) => DSTabsInternalsT.DSTabsUseTabsContextT;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { DSTabT } from '../propTypes';
3
+ declare const DSTab: {
4
+ (props: DSTabT.Props): JSX.Element;
5
+ propTypes: React.WeakValidationMap<unknown>;
6
+ };
7
+ declare const DSTabWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<DSTabT.Props>;
8
+ export { DSTab, DSTabWithSchema };
9
+ export default DSTab;
@@ -0,0 +1,5 @@
1
+ export * from './exported-related/DSTab';
2
+ export * from './DSTabs';
3
+ export { TabTypes } from './utils/constants';
4
+ export * from './DSTabsDatatestid';
5
+ export type { DSTabT, DSTabsT } from './propTypes';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface CarouselPropsT {
3
+ children: React.ReactNode[];
4
+ updateIndicatorStyle?: () => void;
5
+ }
6
+ export declare const Carousel: ({ children, updateIndicatorStyle }: CarouselPropsT) => JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { DSTabsInternalsT } from '../../sharedTypes';
3
+ interface StyledCarouselButtonWrapperPropsT {
4
+ right?: boolean;
5
+ tabType: DSTabsInternalsT.TabTypesT;
6
+ }
7
+ export declare const StyledCarouselBtn: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button").DSButtonT.Props>, import("@elliemae/ds-system").Theme, object, never>;
8
+ export declare const StyledCarouselWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
9
+ export declare const StyledChildrenWrap: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
10
+ export declare const StyledCarouselButtonWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledCarouselButtonWrapperPropsT, never>;
11
+ export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import type { DSTabsInternalsT } from '../../sharedTypes';
3
+ interface UseCarouselPropsT {
4
+ updateIndicatorStyle?: () => void;
5
+ }
6
+ interface UseCarouselReturnTypeT {
7
+ showChevrons: DSTabsInternalsT.ShowChevronsT;
8
+ leftButtonOnClick: () => void;
9
+ rightButtonOnClick: () => void;
10
+ handleOnClick: (e: React.MouseEvent) => void;
11
+ handleOnScroll: (e: React.UIEvent) => void;
12
+ }
13
+ export declare const useCarousel: ({ updateIndicatorStyle }: UseCarouselPropsT) => UseCarouselReturnTypeT;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ interface UseCarouselCallbacksPropsT {
3
+ getVisibleItemsOffset: () => number;
4
+ recalcChevrons: () => void;
5
+ updateIndicatorStyle?: () => void;
6
+ }
7
+ interface UseCarouselCallbacksReturnTypeT {
8
+ leftButtonOnClick: () => void;
9
+ rightButtonOnClick: () => void;
10
+ handleOnClick: (e: React.MouseEvent) => void;
11
+ handleOnScroll: (e: React.UIEvent) => void;
12
+ }
13
+ export declare const useCarouselCallbacks: ({ getVisibleItemsOffset, updateIndicatorStyle, recalcChevrons, }: UseCarouselCallbacksPropsT) => UseCarouselCallbacksReturnTypeT;
14
+ export {};
@@ -0,0 +1 @@
1
+ export declare const TabBar: () => JSX.Element;
@@ -0,0 +1,48 @@
1
+ import type { DSTabsInternalsT } from '../../sharedTypes';
2
+ interface StyledSelectionIndicatoPropsT {
3
+ isDSMobile: boolean;
4
+ tabType: DSTabsInternalsT.TabTypesT;
5
+ }
6
+ interface StyledSubTabsListPropsT {
7
+ withCarousel: boolean;
8
+ }
9
+ interface StyledTabButtonPropsT {
10
+ isActive: boolean;
11
+ disabled: boolean;
12
+ showSeparator: boolean;
13
+ isDSMobile: boolean;
14
+ fixedTabsHeaders: boolean;
15
+ withCarousel: boolean;
16
+ tabType: DSTabsInternalsT.TabTypesT;
17
+ }
18
+ interface StyledTabListPropsT {
19
+ withCarousel: boolean;
20
+ isDSMobile: boolean;
21
+ fixedTabsHeaders: boolean;
22
+ mobileGradients: DSTabsInternalsT.MobileGradientsT;
23
+ indicatorStyle: DSTabsInternalsT.IndicatorStyleT;
24
+ tabType: DSTabsInternalsT.TabTypesT;
25
+ }
26
+ interface StyledMobileGradientPropsT {
27
+ mobileGradients: DSTabsInternalsT.MobileGradientsT;
28
+ left: number | undefined;
29
+ width: number | undefined;
30
+ }
31
+ interface StyledTabWrapperPropsT {
32
+ isDSMobile: boolean;
33
+ fixedTabsHeaders: boolean;
34
+ }
35
+ export declare const StyledSelectionIndicator: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledSelectionIndicatoPropsT, never>;
36
+ export declare const StyledMobileGradient: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & {
37
+ style: {
38
+ left: number;
39
+ maxWidth: number;
40
+ };
41
+ } & StyledMobileGradientPropsT, "style">;
42
+ /** CSS Setters */
43
+ export declare const StyledTabWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledTabWrapperPropsT, never>;
44
+ export declare const StyledTabButton: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledTabButtonPropsT, never>;
45
+ export declare const StyledSubTabsList: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledSubTabsListPropsT, never>;
46
+ export declare const StyledTabList: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledTabListPropsT, never>;
47
+ export declare const StyledRequiredMark: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
48
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { DSTabsInternalsT } from '../../sharedTypes';
3
+ interface UseTabBarReturnTypeT {
4
+ updateIndicatorStyle: () => void;
5
+ updateMobileGradients: () => void;
6
+ setIndicatorStyle: React.Dispatch<React.SetStateAction<DSTabsInternalsT.IndicatorStyleT>>;
7
+ indicatorStyle: DSTabsInternalsT.IndicatorStyleT;
8
+ mobileGradients: DSTabsInternalsT.MobileGradientsT;
9
+ }
10
+ export declare const useTabBar: () => UseTabBarReturnTypeT;
11
+ export {};
@@ -0,0 +1 @@
1
+ export declare const TabsContent: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const StyledTabBarContainer: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
@@ -0,0 +1 @@
1
+ export declare const TabsPanels: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface StyledPanelContainerPropsT {
2
+ hidden: boolean;
3
+ isDSMobile: boolean;
4
+ }
5
+ export declare const StyledPanelContainer: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & StyledPanelContainerPropsT, never>;
6
+ export {};
@@ -0,0 +1,72 @@
1
+ /// <reference types="react" />
2
+ import type { DSTabsInternalsT } from './sharedTypes';
3
+ export declare namespace DSTabT {
4
+ interface PropsOptional {
5
+ style?: Record<string, unknown>;
6
+ title?: string;
7
+ required?: boolean;
8
+ disabled?: boolean;
9
+ ref?: React.MutableRefObject<HTMLButtonElement>;
10
+ onClick?: (tabId: string | number, e: React.MouseEvent) => null | void;
11
+ onKeyDown?: (e: React.KeyboardEvent) => null | void;
12
+ }
13
+ interface PropsRequired {
14
+ children: React.ReactNode;
15
+ tabId: string | number;
16
+ }
17
+ interface Props extends PropsOptional, PropsRequired {
18
+ }
19
+ }
20
+ export declare namespace DSTabsT {
21
+ interface DefaultProps {
22
+ containerProps: Record<string, unknown>;
23
+ animated: boolean;
24
+ enableMouseEvents: boolean;
25
+ allowTextSelection: boolean;
26
+ onTabChange: (tabId: string | number, e?: React.MouseEvent) => void;
27
+ tabsListAriaLabel: string;
28
+ type: DSTabsInternalsT.TabTypesT;
29
+ children: React.ReactElement<DSTabT.Props>[];
30
+ onlyRenderActiveTab: boolean;
31
+ fixedTabsHeaders: boolean;
32
+ withCarousel: boolean;
33
+ isDSMobile: boolean;
34
+ showSelectionIndicator: boolean;
35
+ showSeparator: boolean;
36
+ }
37
+ interface PropsOptional {
38
+ firstSubtabRef?: React.MutableRefObject<HTMLElement>;
39
+ lastTabRef?: React.MutableRefObject<HTMLElement>;
40
+ TabBarExtraContent?: React.ComponentType;
41
+ tabBarExtraContent?: React.ReactNode;
42
+ activeTab?: string;
43
+ innerRef?: React.MutableRefObject<HTMLDivElement>;
44
+ }
45
+ interface Props extends Partial<DefaultProps>, PropsOptional {
46
+ }
47
+ interface InternalProps extends DefaultProps, PropsOptional {
48
+ }
49
+ }
50
+ export declare const tabPropTypes: {
51
+ tabId: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
52
+ title: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
53
+ required: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
54
+ disabled: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
55
+ };
56
+ export declare const tabsPropTypes: {
57
+ animated: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
58
+ enableMouseEvents: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
59
+ allowTextSelection: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
60
+ onTabChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
61
+ type: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
62
+ tabBarExtraContent: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
63
+ TabBarExtraContent: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
64
+ onlyRenderActiveTab: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
65
+ withCarousel: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
66
+ activeTab: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
67
+ children: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
68
+ tabsListAriaLabel: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
69
+ containerProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
70
+ innerRef: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
71
+ };
72
+ export declare const tabsDefaultProps: DSTabsT.DefaultProps;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import type { TabTypes } from './utils/constants';
3
+ import type { DSTabsT } from './propTypes';
4
+ export declare namespace DSTabsInternalsT {
5
+ type TabTypesT = typeof TabTypes[keyof typeof TabTypes];
6
+ interface MobileGradientsT {
7
+ right: boolean;
8
+ left: boolean;
9
+ }
10
+ interface IndicatorStyleT {
11
+ left: number;
12
+ width: number;
13
+ }
14
+ interface ShowChevronsT {
15
+ right: boolean;
16
+ left: boolean;
17
+ }
18
+ interface DSTabsUseTabsContextT {
19
+ props: DSTabsT.InternalProps;
20
+ tabsRef: React.MutableRefObject<Record<number, HTMLButtonElement> | null>;
21
+ focusableTabsRef: React.MutableRefObject<HTMLButtonElement[] | null>;
22
+ tabsListRef: React.MutableRefObject<HTMLDivElement | null>;
23
+ tabsRefAsArray: React.MutableRefObject<HTMLButtonElement[] | null>;
24
+ actualActiveTabRef: React.MutableRefObject<HTMLButtonElement | null>;
25
+ carouselOnlyListRef: React.MutableRefObject<HTMLDivElement | null>;
26
+ setInternalActiveTab: React.Dispatch<React.SetStateAction<string>>;
27
+ actualActiveTab: string;
28
+ }
29
+ interface DSTabsUseCrossRefContextT {
30
+ lastTabInternalRef: React.MutableRefObject<HTMLButtonElement | null | undefined>;
31
+ firstSubtabInternalRef: React.MutableRefObject<HTMLButtonElement | null | undefined>;
32
+ }
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
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: number;
10
+ width: number;
11
+ };
12
+ export declare const gradientOffsetsAccordingType: {
13
+ normal_small: number;
14
+ normal: number;
15
+ subtabs: number;
16
+ fixedTabsHeaders: number;
17
+ };
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ interface VisibleDimensionsT {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ interface CenterTabPropsT {
7
+ e?: React.MouseEvent | React.FocusEvent;
8
+ listRef: React.MutableRefObject<HTMLDivElement | null>;
9
+ }
10
+ export declare const isElementVisible: (tab: HTMLElement, tabList: HTMLElement) => boolean;
11
+ export declare const isElementVisibleCarousel: (tab: HTMLElement | null, tabContainer: HTMLDivElement | null, firstOrLastItem?: boolean) => boolean;
12
+ export declare const centerTab: ({ e, listRef }: CenterTabPropsT) => void;
13
+ export declare const getVisibleDimensions: (node: HTMLElement, referenceNode: HTMLElement) => VisibleDimensionsT;
14
+ export declare const shouldHaveLeftGradient: (scrollLeft: number) => boolean;
15
+ export declare const shouldHaveRightGradient: (scrollLeft: number, clientWidth: number, scrollWidth: number) => boolean;
16
+ export {};
@@ -0,0 +1,6 @@
1
+ import type React from 'react';
2
+ interface UseKeyboardNavigationReturnTypeT {
3
+ handleOnKeyDown: (e: React.KeyboardEvent) => void;
4
+ }
5
+ export declare const useKeyboardNavigation: () => UseKeyboardNavigationReturnTypeT;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ interface UseTabsCallbacksReturnTypeT {
3
+ handleOnTabChange: (tabId: string, e?: React.MouseEvent) => void;
4
+ handleOnMouseDown: (e: React.MouseEvent) => void;
5
+ }
6
+ export declare const useTabsCallbacks: () => UseTabsCallbacksReturnTypeT;
7
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tabs",
3
- "version": "3.13.1-rc.1",
3
+ "version": "3.13.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tabs",
6
6
  "files": [
@@ -133,11 +133,11 @@
133
133
  "dependencies": {
134
134
  "@react-hook/resize-observer": "~1.2.5",
135
135
  "react-swipeable-views": "~0.14.0",
136
- "@elliemae/ds-icon": "3.13.1-rc.1",
137
- "@elliemae/ds-icons": "3.13.1-rc.1",
138
- "@elliemae/ds-button": "3.13.1-rc.1",
139
- "@elliemae/ds-system": "3.13.1-rc.1",
140
- "@elliemae/ds-utilities": "3.13.1-rc.1"
136
+ "@elliemae/ds-button": "3.13.1",
137
+ "@elliemae/ds-icon": "3.13.1",
138
+ "@elliemae/ds-icons": "3.13.1",
139
+ "@elliemae/ds-system": "3.13.1",
140
+ "@elliemae/ds-utilities": "3.13.1"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@testing-library/jest-dom": "~5.16.4",