@clickhouse/click-ui 0.0.39 → 0.0.40
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/click-ui.es.js +4028 -4068
- package/dist/click-ui.umd.js +88 -89
- package/dist/components/FileTabs/FileTabs.d.ts +26 -23
- package/dist/components/index.d.ts +1 -1
- package/dist/components/types.d.ts +1 -0
- package/dist/styles/types.d.ts +1 -0
- package/dist/styles/variables.classic.json.d.ts +2 -1
- package/dist/styles/variables.dark.json.d.ts +2 -1
- package/dist/styles/variables.json.d.ts +2 -1
- package/dist/styles/variables.light.json.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="sortablejs" />
|
|
2
|
+
import { HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
3
|
import { IconName } from "../Icon/types";
|
|
3
|
-
|
|
4
|
+
import { ItemInterface, ReactSortableProps, Sortable, Store } from "react-sortablejs";
|
|
5
|
+
export type FileTabStatusType = "default" | "success" | "neutral" | "danger" | "warning" | "info";
|
|
4
6
|
interface ContextProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
updateOrder: (order: number) => void;
|
|
8
|
-
dragElementContainer: RefObject<HTMLDivElement>;
|
|
9
|
-
onSelect: (value: string) => void;
|
|
10
|
-
onClose: (value: string) => void;
|
|
7
|
+
selectedIndex?: number;
|
|
8
|
+
onClose: (index: number) => void;
|
|
11
9
|
}
|
|
12
10
|
export declare const TabContext: import("react").Context<ContextProps>;
|
|
13
|
-
interface
|
|
11
|
+
export interface FileTabProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
14
12
|
onClose?: () => void;
|
|
15
|
-
|
|
16
|
-
status?:
|
|
13
|
+
index: number;
|
|
14
|
+
status?: FileTabStatusType;
|
|
17
15
|
icon?: IconName | ReactNode;
|
|
18
16
|
text: string;
|
|
19
17
|
testId?: string;
|
|
18
|
+
preview?: boolean;
|
|
20
19
|
}
|
|
21
|
-
interface
|
|
22
|
-
|
|
23
|
-
children: ReactElement<
|
|
24
|
-
onReorderTab: (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onClose: (value: string, index: number) => void;
|
|
30
|
-
onSelect: (value: string, index: number) => void;
|
|
20
|
+
export interface FileTabsProps extends Omit<ReactSortableProps<ItemInterface>, "onSelect" | "list" | "setList"> {
|
|
21
|
+
selectedIndex?: number;
|
|
22
|
+
children: ReactElement<FileTabProps> | Array<ReactElement<FileTabProps>>;
|
|
23
|
+
onReorderTab: (sourcePosition: number, destinationPosition: number) => void;
|
|
24
|
+
onClose: (index: number) => void;
|
|
25
|
+
onSelect: (index: number) => void;
|
|
26
|
+
list?: Array<ItemInterface>;
|
|
27
|
+
setList?: (newState: Array<ItemInterface>, sortable: Sortable | null, store: Store) => void;
|
|
31
28
|
}
|
|
32
29
|
export declare const FileTabs: {
|
|
33
|
-
({
|
|
30
|
+
({ selectedIndex, children, onReorderTab, onClose: onCloseProp, onSelect: onSelectProp, list: listProp, setList: setListProp, onEnd, direction, group, ...props }: FileTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
34
31
|
Tab: {
|
|
35
|
-
({ text,
|
|
32
|
+
({ text, index, icon, onMouseDown: onMouseDownProp, status, testId, preview, ...props }: FileTabProps): import("react/jsx-runtime").JSX.Element;
|
|
36
33
|
displayName: string;
|
|
37
34
|
};
|
|
38
35
|
};
|
|
36
|
+
interface FileTabElementProps extends HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
icon?: IconName | ReactNode;
|
|
38
|
+
active?: boolean;
|
|
39
|
+
preview?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const FileTabElement: ({ icon, children, active, preview, ...props }: FileTabElementProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
42
|
export {};
|
|
@@ -39,7 +39,7 @@ export { Spacer } from "./Spacer/Spacer";
|
|
|
39
39
|
export { SplitButton } from "./SplitButton/SplitButton";
|
|
40
40
|
export { Switch } from "./Switch/Switch";
|
|
41
41
|
export { Tabs } from "./Tabs/Tabs";
|
|
42
|
-
export { FileTabs } from "./FileTabs/FileTabs";
|
|
42
|
+
export { FileTabs, FileTabElement } from "./FileTabs/FileTabs";
|
|
43
43
|
export { Table } from "./Table/Table";
|
|
44
44
|
export { Text } from "./Typography/Text/Text";
|
|
45
45
|
export { TextField } from "./Input/TextField";
|
|
@@ -34,6 +34,7 @@ export type { PanelProps } from "./Panel/Panel";
|
|
|
34
34
|
export type { FlyoutProps, FlyoutFooterProps, FlyoutHeaderProps } from "./Flyout/Flyout";
|
|
35
35
|
export type { DialogContentProps } from "./Dialog/Dialog";
|
|
36
36
|
export type { DialogProps, DialogTriggerProps } from "@radix-ui/react-dialog";
|
|
37
|
+
export type { FileTabStatusType } from "./FileTabs/FileTabs";
|
|
37
38
|
export type States = "default" | "active" | "disabled" | "error" | "hover";
|
|
38
39
|
export type HorizontalDirection = "start" | "end";
|
|
39
40
|
export type Orientation = "horizontal" | "vertical";
|
package/dist/styles/types.d.ts
CHANGED