@mw-kit/mw-ui 1.7.104 → 1.7.105
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/dist/components/EllipsisContainer/functions.d.ts +6 -0
- package/dist/components/Tabs/components/ScrollButton/index.d.ts +7 -0
- package/dist/components/Tabs/components/ScrollButton/styled.d.ts +1 -0
- package/dist/components/Tabs/components/ScrollButtons/index.d.ts +9 -0
- package/dist/components/Tabs/components/ScrollButtons/styled.d.ts +3 -0
- package/dist/components/Tabs/components/{Close → TabItem/components/Close}/index.d.ts +1 -1
- package/dist/components/Tabs/components/TabItem/components/LabelItem/index.d.ts +12 -0
- package/dist/components/Tabs/components/TabItem/components/LabelItem/styled.d.ts +6 -0
- package/dist/components/Tabs/components/TabItem/components/index.d.ts +2 -0
- package/dist/components/Tabs/components/TabItem/index.d.ts +10 -0
- package/dist/components/Tabs/components/TabItem/styled.d.ts +1 -0
- package/dist/components/Tabs/components/index.d.ts +2 -1
- package/dist/components/Tabs/functions.d.ts +9 -0
- package/dist/components/Tabs/interfaces.d.ts +5 -14
- package/dist/components/Tabs/styled.d.ts +8 -0
- package/dist/index.js +323 -131
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +323 -131
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Tabs/styles.d.ts +0 -10
- /package/dist/components/Tabs/components/{Close → TabItem/components/Close}/styles.d.ts +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const updateTitle: React.MouseEventHandler;
|
|
3
|
+
export declare const useEllipsis: (onMouseOver?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined) => {
|
|
4
|
+
onMouseOver: (event: import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
5
|
+
'data-ellipsis': string;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type IScrollButton = React.PropsWithChildren<{
|
|
3
|
+
activeTabIndex: number;
|
|
4
|
+
tabsLength: number;
|
|
5
|
+
internal: boolean | undefined;
|
|
6
|
+
divProps: React.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
}>;
|
|
8
|
+
declare const ScrollButtons: (props: IScrollButton) => JSX.Element;
|
|
9
|
+
export default ScrollButtons;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabProps, TabsProps } from '
|
|
2
|
+
import { TabProps, TabsProps } from '../../../../interfaces';
|
|
3
3
|
declare const Close: (props: Pick<TabsProps, 'onClose'> & {
|
|
4
4
|
index: number;
|
|
5
5
|
active: Exclude<TabsProps['active'], number>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps } from '../../../../interfaces';
|
|
3
|
+
declare type LabelItemProps = React.PropsWithChildren<{
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
/** se a aba é primária do grupo */
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/** se a aba primária possui mais de uma aba nesse grupo */
|
|
8
|
+
hasSiblings?: boolean;
|
|
9
|
+
internal?: TabsProps['internal'];
|
|
10
|
+
}>;
|
|
11
|
+
declare const LabelItem: (props: LabelItemProps) => JSX.Element;
|
|
12
|
+
export default LabelItem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TabsProps } from '../../../../interfaces';
|
|
2
|
+
export declare const StyledTab: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
|
+
$primary?: boolean | undefined;
|
|
4
|
+
$hasSiblings?: boolean | undefined;
|
|
5
|
+
$internal?: TabsProps['internal'];
|
|
6
|
+
}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tab, TabProps, TabsProps } from '../../interfaces';
|
|
3
|
+
declare type TabItemProps = {
|
|
4
|
+
active: Exclude<TabsProps['active'], number>;
|
|
5
|
+
tabs: [(Tab & {
|
|
6
|
+
index: number;
|
|
7
|
+
})[], React.Dispatch<React.SetStateAction<TabProps[]>>];
|
|
8
|
+
} & Pick<TabsProps, 'onClose' | 'alwaysOpen' | 'internal'>;
|
|
9
|
+
declare const TabItem: (props: TabItemProps) => JSX.Element;
|
|
10
|
+
export default TabItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as ScrollButtons } from './ScrollButtons';
|
|
2
|
+
export { default as TabItem } from './TabItem';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tab } from './interfaces';
|
|
2
|
+
export declare const sortTabs: (tabs: (Tab & {
|
|
3
|
+
index: number;
|
|
4
|
+
})[], sorted?: (Tab & {
|
|
5
|
+
index: number;
|
|
6
|
+
})[]) => (Tab & {
|
|
7
|
+
index: number;
|
|
8
|
+
})[];
|
|
9
|
+
export declare const hasChildren: (tabs: Tab[], group: string | undefined) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SpacingOrZero, Spacings } from '../../interfaces';
|
|
3
|
-
declare type Tab<T = {}> = {
|
|
3
|
+
export declare type Tab<T = {}> = {
|
|
4
4
|
/**
|
|
5
5
|
* Define the tab label.
|
|
6
6
|
*/
|
|
@@ -13,6 +13,8 @@ declare type Tab<T = {}> = {
|
|
|
13
13
|
* Providing a unique and static key will prevent remount the component when closing a previous tab
|
|
14
14
|
*/
|
|
15
15
|
key?: React.Key | null;
|
|
16
|
+
group?: string;
|
|
17
|
+
primary?: boolean;
|
|
16
18
|
};
|
|
17
19
|
export declare type TabComponent<T = {}> = React.FunctionComponent<{
|
|
18
20
|
data: T;
|
|
@@ -33,7 +35,7 @@ export declare type TabProps<T = {}> = Tab<T> & ({
|
|
|
33
35
|
*/
|
|
34
36
|
provider?: TabProvider<T>;
|
|
35
37
|
} | {});
|
|
36
|
-
export interface TabsProps<T = {}> extends React.HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
export interface TabsProps<T = {}> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
37
39
|
/**
|
|
38
40
|
* Array with available tabs.
|
|
39
41
|
*/
|
|
@@ -71,15 +73,4 @@ export interface TabsProps<T = {}> extends React.HTMLAttributes<HTMLDivElement>
|
|
|
71
73
|
*/
|
|
72
74
|
onClose?: (index: number, tab: TabProps<T>, event: React.MouseEvent) => boolean | Promise<boolean>;
|
|
73
75
|
}
|
|
74
|
-
export
|
|
75
|
-
/**
|
|
76
|
-
* Sets the style of the tabs to internal.
|
|
77
|
-
*/
|
|
78
|
-
$internal?: TabsProps['internal'];
|
|
79
|
-
/**
|
|
80
|
-
* Sets the style of the tab to active.
|
|
81
|
-
*/
|
|
82
|
-
$active?: boolean;
|
|
83
|
-
}
|
|
84
|
-
export declare type TabsComponent = <T = {}>(props: React.PropsWithChildren<TabsProps<T>>) => JSX.Element;
|
|
85
|
-
export {};
|
|
76
|
+
export declare type TabsComponent = <T = {}>(props: TabsProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TabsProps } from './interfaces';
|
|
2
|
+
declare type TabsContainerProps = {
|
|
3
|
+
$internal?: TabsProps['internal'];
|
|
4
|
+
$delimiter?: TabsProps['delimiter'];
|
|
5
|
+
$spacing?: TabsProps['spacing'];
|
|
6
|
+
};
|
|
7
|
+
export declare const Tabs: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TabsContainerProps, never>;
|
|
8
|
+
export {};
|