@kwantis-id3/frontend-library 1.0.0-rc.4 → 1.0.0-rc.41
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/README.md +6 -332
- package/dist/esm/index.js +344 -136
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +3 -37
- package/dist/esm/types/components/Accordion/AccordionInterfaces.d.ts +21 -0
- package/dist/esm/types/components/Accordion/AccordionStyled.d.ts +20 -9
- package/dist/esm/types/components/Accordion/index.d.ts +4 -1
- package/dist/esm/types/components/Button/Button.d.ts +2 -24
- package/dist/esm/types/components/Button/ButtonInterfaces.d.ts +24 -0
- package/dist/esm/types/components/Button/ButtonStyled.d.ts +41 -0
- package/dist/esm/types/components/Button/index.d.ts +2 -1
- package/dist/esm/types/components/Card/CardInterfaces.d.ts +1 -1
- package/dist/esm/types/components/Card/index.d.ts +2 -2
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/components/Checkbox/CheckboxInterfaces.d.ts +24 -0
- package/dist/esm/types/components/Checkbox/CheckboxStyled.d.ts +32 -0
- package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/components/DataGrid/DataGrid.d.ts +3 -0
- package/dist/esm/types/components/DataGrid/DataGridInterfaces.d.ts +9 -0
- package/dist/esm/types/components/DataGrid/index.d.ts +2 -0
- package/dist/esm/types/components/Drawer/Drawer.d.ts +3 -0
- package/dist/esm/types/components/Drawer/DrawerInterfaces.d.ts +35 -0
- package/dist/esm/types/components/Drawer/DrawerStyled.d.ts +28 -0
- package/dist/esm/types/components/Drawer/index.d.ts +2 -0
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +2 -43
- package/dist/esm/types/components/Dropdown/DropdownInterfaces.d.ts +52 -0
- package/dist/esm/types/components/Dropdown/DropdownStyled.d.ts +1 -0
- package/dist/esm/types/components/Dropdown/index.d.ts +2 -1
- package/dist/esm/types/components/Indicator/IndicatorInterfaces.d.ts +1 -1
- package/dist/esm/types/components/Indicator/NeutralIndicator.d.ts +3 -0
- package/dist/esm/types/components/Indicator/index.d.ts +2 -2
- package/dist/esm/types/components/InputField/InputField.d.ts +3 -11
- package/dist/esm/types/components/InputField/InputFieldInterfaces.d.ts +9 -0
- package/dist/esm/types/components/InputField/index.d.ts +2 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +3 -19
- package/dist/esm/types/components/Modal/ModalInterfaces.d.ts +16 -0
- package/dist/esm/types/components/Modal/index.d.ts +2 -2
- package/dist/esm/types/components/MultiViewList/MultiViewGrid.d.ts +5 -0
- package/dist/esm/types/components/MultiViewList/MultiViewList.d.ts +1 -0
- package/dist/esm/types/components/MultiViewList/MultiViewListInterfaces.d.ts +13 -2
- package/dist/esm/types/components/MultiViewList/MultiViewListStyled.d.ts +3 -0
- package/dist/esm/types/components/MultiViewList/index.d.ts +2 -1
- package/dist/esm/types/components/SelectFilter/index.d.ts +2 -2
- package/dist/esm/types/components/Slider/Slider.d.ts +2 -2
- package/dist/esm/types/components/Slider/index.d.ts +1 -1
- package/dist/esm/types/components/Switch/Switch.d.ts +2 -0
- package/dist/esm/types/components/Switch/SwitchInterfaces.d.ts +17 -0
- package/dist/esm/types/components/Switch/SwitchStyled.d.ts +35 -0
- package/dist/esm/types/components/Switch/index.d.ts +2 -0
- package/dist/esm/types/components/Table/DebouncedFilter.d.ts +1 -2
- package/dist/esm/types/components/Table/DebouncedInput.d.ts +0 -1
- package/dist/esm/types/components/Table/index.d.ts +1 -1
- package/dist/esm/types/components/Tag/Tag.d.ts +2 -22
- package/dist/esm/types/components/Tag/TagInterfaces.d.ts +22 -0
- package/dist/esm/types/components/Tag/TagStyled.d.ts +7 -0
- package/dist/esm/types/components/Tag/index.d.ts +2 -1
- package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +4 -3
- package/dist/esm/types/components/ThemeContext/ThemeInterfaces.d.ts +2 -0
- package/dist/esm/types/components/TreeView/ControlledTreeView.d.ts +4 -0
- package/dist/esm/types/components/TreeView/TreeUtils.d.ts +22 -0
- package/dist/esm/types/components/TreeView/TreeViewInterfaces.d.ts +83 -0
- package/dist/esm/types/components/TreeView/TreeViewSyled.d.ts +24 -0
- package/dist/esm/types/components/TreeView/UncontrolledTreeView.d.ts +3 -0
- package/dist/esm/types/components/TreeView/index.d.ts +3 -0
- package/dist/esm/types/components/index.d.ts +17 -12
- package/dist/esm/types/utils/colors.d.ts +12 -2
- package/dist/esm/types/utils/index.d.ts +4 -7
- package/dist/esm/types/utils/isMobile.d.ts +1 -2
- package/dist/esm/types/utils/testing.d.ts +21 -1
- package/dist/index.d.ts +294 -67
- package/package.json +29 -24
- package/changelog.md +0 -197
- package/dist/esm/types/utils/styled.d.ts +0 -2
- /package/dist/esm/types/components/InputField/{StyledInputField.d.ts → InputFieldStyled.d.ts} +0 -0
- /package/dist/esm/types/components/Modal/{StyledModal.d.ts → ModalStyled.d.ts} +0 -0
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { TCellValues, TTableProps, TTableRow } from "../Table";
|
|
2
|
+
import { TDataGridProps, TDataGridRow } from "../DataGrid/DataGridInterfaces";
|
|
3
|
+
import { Interpolation, Theme } from "@emotion/react";
|
|
3
4
|
export type TMultiViewListProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = TTableProps<Cell, Row> & {
|
|
4
5
|
mode: "table" | "cards";
|
|
5
|
-
cardComponent: (item: Row) => React.ReactNode;
|
|
6
|
+
cardComponent: (item: Row, index: number) => React.ReactNode;
|
|
7
|
+
cardsWidth?: string;
|
|
8
|
+
cardsHeight?: string;
|
|
9
|
+
sx?: Interpolation<Theme>;
|
|
10
|
+
};
|
|
11
|
+
export type TMultiViewGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = TDataGridProps<Cell, Row> & {
|
|
12
|
+
mode: "table" | "cards";
|
|
13
|
+
cardComponent: (item: Row, index: number) => React.ReactNode;
|
|
14
|
+
cardsWidth?: string;
|
|
15
|
+
cardsHeight?: string;
|
|
16
|
+
sx?: Interpolation<Theme>;
|
|
6
17
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const StyledCardsContainer: import("@emotion/styled").StyledComponent<{
|
|
2
2
|
theme?: import("@emotion/react").Theme;
|
|
3
3
|
as?: React.ElementType;
|
|
4
|
+
} & {
|
|
5
|
+
$cardsWidth: string;
|
|
6
|
+
$cardsHeight: string;
|
|
4
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./SingleSelect";
|
|
2
|
+
export * from "./MultiSelect";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TSliderProps = {
|
|
2
2
|
/** The values of the slider. */
|
|
3
3
|
values: number[];
|
|
4
4
|
/** The minimum value of the slider. */
|
|
@@ -30,4 +30,4 @@ export type SliderProps = {
|
|
|
30
30
|
/** Wether the thumbs can overlap */
|
|
31
31
|
allowOverlap?: boolean;
|
|
32
32
|
};
|
|
33
|
-
export declare const Slider: (props:
|
|
33
|
+
export declare const Slider: (props: TSliderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./Slider";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TSwitchProps = {
|
|
2
|
+
/** Whether the switch is checked (controlled) */
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
/** Default checked state (uncontrolled) */
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
/** Callback function when the switch state changes */
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
/** The color of switch when checked */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** The label for the switch */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Size of switch */
|
|
13
|
+
size?: "small" | "medium" | "large";
|
|
14
|
+
/** HTML id */
|
|
15
|
+
htmlId?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const SwitchContainer: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const SwitchSlider: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
} & {
|
|
9
|
+
$size: "small" | "medium" | "large";
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const SwitchInput: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme;
|
|
13
|
+
as?: React.ElementType;
|
|
14
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
15
|
+
export declare const SwitchTrack: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme;
|
|
17
|
+
as?: React.ElementType;
|
|
18
|
+
} & {
|
|
19
|
+
$checked: boolean;
|
|
20
|
+
$checkedColor: string;
|
|
21
|
+
$uncheckedColor: string;
|
|
22
|
+
$size: "small" | "medium" | "large";
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const SwitchThumb: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme;
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
} & {
|
|
28
|
+
$checked: boolean;
|
|
29
|
+
$thumbColor: string;
|
|
30
|
+
$size: "small" | "medium" | "large";
|
|
31
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
32
|
+
export declare const SwitchLabel: import("@emotion/styled").StyledComponent<{
|
|
33
|
+
theme?: import("@emotion/react").Theme;
|
|
34
|
+
as?: React.ElementType;
|
|
35
|
+
}, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { Column, Table } from "@tanstack/react-table";
|
|
3
|
-
|
|
4
|
-
export declare function DebouncedFilter<T extends TTableRow<TCellValues>>({ column, table, }: {
|
|
3
|
+
export declare function DebouncedFilter<T>({ column, table, }: {
|
|
5
4
|
column: Column<T, unknown>;
|
|
6
5
|
table: Table<T>;
|
|
7
6
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./TableInterfaces";
|
|
2
|
-
export
|
|
2
|
+
export * from "./Table";
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
1
2
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { Interpolation } from "@emotion/styled";
|
|
4
|
-
import { Theme } from "@emotion/react";
|
|
5
|
-
export type TTagProps = {
|
|
6
|
-
text: string;
|
|
7
|
-
/**
|
|
8
|
-
* If `variant` is set to `custom`, `bgColor` and `textColor` will be used.
|
|
9
|
-
* Otherwise, the `variant` will be used to determine the colors.
|
|
10
|
-
*
|
|
11
|
-
* The variants are the keys of the interface `@see ITagColors`, which by default are:
|
|
12
|
-
* - `default`
|
|
13
|
-
* - `warm`
|
|
14
|
-
* - `cold`
|
|
15
|
-
* - `paper`
|
|
16
|
-
*/
|
|
17
|
-
variant: keyof ITagColors | "custom";
|
|
18
|
-
/** To use this prop, the variant must be set to `custom` */
|
|
19
|
-
bgColor?: string;
|
|
20
|
-
/** To use this prop, the variant must be set to `custom` */
|
|
21
|
-
textColor?: string;
|
|
22
|
-
sx?: Interpolation<Theme>;
|
|
23
|
-
};
|
|
3
|
+
import { TTagProps } from "./TagInterfaces";
|
|
24
4
|
export declare const Tag: FC<TTagProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Interpolation } from "@emotion/react";
|
|
2
|
+
import { Theme } from "@emotion/react/dist/declarations/src";
|
|
3
|
+
import { ITagColors } from "../ThemeContext";
|
|
4
|
+
export type TTagProps = {
|
|
5
|
+
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* If `variant` is set to `custom`, `bgColor` and `textColor` will be used.
|
|
8
|
+
* Otherwise, the `variant` will be used to determine the colors.
|
|
9
|
+
*
|
|
10
|
+
* The variants are the keys of the interface `@see ITagColors`, which by default are:
|
|
11
|
+
* - `default`
|
|
12
|
+
* - `warm`
|
|
13
|
+
* - `cold`
|
|
14
|
+
* - `paper`
|
|
15
|
+
*/
|
|
16
|
+
variant: keyof ITagColors | "custom";
|
|
17
|
+
/** To use this prop, the variant must be set to `custom` */
|
|
18
|
+
bgColor?: string;
|
|
19
|
+
/** To use this prop, the variant must be set to `custom` */
|
|
20
|
+
textColor?: string;
|
|
21
|
+
sx?: Interpolation<Theme>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const StyledTag: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
} & {
|
|
5
|
+
$bgColor: string;
|
|
6
|
+
$textColor: string;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./Tag";
|
|
2
|
+
export * from "./TagInterfaces";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IPalette, IThemeContextProps, IThemeContextValue } from "./ThemeInterfaces";
|
|
1
|
+
import { PropsWithChildren, ReactElement } from "react";
|
|
2
|
+
import { ICommonColors, IPalette, IThemeContextProps, IThemeContextValue } from "./ThemeInterfaces";
|
|
3
|
+
export declare const commonColors: ICommonColors;
|
|
3
4
|
export declare const defaultLightPalette: IPalette;
|
|
4
5
|
export declare const defaultDarkPalette: IPalette;
|
|
5
|
-
export declare const ThemeContextProvider: ({ palettes, defaultMode, children, }:
|
|
6
|
+
export declare const ThemeContextProvider: ({ palettes, defaultMode, children, }: PropsWithChildren<IThemeContextProps>) => ReactElement;
|
|
6
7
|
export declare const useThemeContext: () => IThemeContextValue;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TTreeViewItem } from "./TreeViewInterfaces";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param items searchable nodes
|
|
5
|
+
* @returns all the root items
|
|
6
|
+
*/
|
|
7
|
+
export declare const getRootItems: (items: TTreeViewItem[]) => TTreeViewItem[];
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param items searchable nodes
|
|
11
|
+
* @param parentId the id of the parent node
|
|
12
|
+
* @returns all the children of the parent node
|
|
13
|
+
*/
|
|
14
|
+
export declare const getChildrenItems: (items: TTreeViewItem[], parentId: string) => TTreeViewItem[];
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param items searchable nodes
|
|
18
|
+
* @param searchTerm search term
|
|
19
|
+
* @returns all the matching nodes and their ancestors
|
|
20
|
+
*/
|
|
21
|
+
export declare function searchWithAncestors(items: TTreeViewItem[], searchTerm: string): TTreeViewItem[];
|
|
22
|
+
export declare const isRootItem: (items: TTreeViewItem[], item: TTreeViewItem) => boolean;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Interpolation, Theme } from "@emotion/react";
|
|
2
|
+
/**
|
|
3
|
+
* A callback to customize how items are rendered
|
|
4
|
+
* @property isOpen: A boolean indicating if the item is expanded
|
|
5
|
+
* @property hasChildren: A boolean indicating if the item has children
|
|
6
|
+
* @property item: the entire item object
|
|
7
|
+
*/
|
|
8
|
+
export type TCustomRenderProps = {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
item: TTreeViewItem;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A callback to customize how the content of the items is rendered
|
|
14
|
+
* @extends TCustomRenderProps
|
|
15
|
+
* @property icon: The icon of the item. If the renderIcon callback is provided, this will be the result of that callback
|
|
16
|
+
* @property title: The title of the item. If the renderTitle callback is provided, this will be the result of that callback
|
|
17
|
+
*/
|
|
18
|
+
export type TRenderTriggerProps = TCustomRenderProps & {
|
|
19
|
+
icon: React.ReactNode;
|
|
20
|
+
title: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
type TTreeItemFunctions = {
|
|
23
|
+
/** A callback to customize how the titles are rendered */
|
|
24
|
+
renderTitle?: (props: TCustomRenderProps) => React.ReactNode;
|
|
25
|
+
/** A callback to customize how the icons are rendered */
|
|
26
|
+
renderIcon?: (props: TCustomRenderProps) => React.ReactNode;
|
|
27
|
+
/** A callback to customize how the content of the items is rendered */
|
|
28
|
+
renderTrigger?: (props: TRenderTriggerProps) => React.ReactNode;
|
|
29
|
+
/** A callback executed when an item is focused. An item gets focused when you click on it. Focusing and item will also select it. */
|
|
30
|
+
onFocusItem?: (item: TTreeViewItem) => void;
|
|
31
|
+
/** A callback executed when an item is selected. To select an item, ctrl+click on it. */
|
|
32
|
+
onSelectItems?: (item: string[]) => void;
|
|
33
|
+
/** A callback executed when an item is expanded */
|
|
34
|
+
onExpandItem?: (item: TTreeViewItem) => void;
|
|
35
|
+
/** A callback executed when an item is collapsed */
|
|
36
|
+
onCollapseItem?: (item: TTreeViewItem) => void;
|
|
37
|
+
/** A callback to handle the expansion of items without children */
|
|
38
|
+
onMissingChildren?: (item: TTreeViewItem) => void;
|
|
39
|
+
};
|
|
40
|
+
type TTreeViewProps = TTreeItemFunctions & {
|
|
41
|
+
/** An array representing the items that the tree needs to render */
|
|
42
|
+
items: TTreeViewItem[];
|
|
43
|
+
/** Disable multi-selection possibility */
|
|
44
|
+
isMultiSelectionDisabled?: boolean;
|
|
45
|
+
/** Custom styles */
|
|
46
|
+
sx?: Interpolation<Theme>;
|
|
47
|
+
};
|
|
48
|
+
export type TUncontrolledTreeViewProps = TTreeViewProps & {
|
|
49
|
+
items: TTreeViewItem[];
|
|
50
|
+
/** A search string used to filter the items. */
|
|
51
|
+
searchString?: string;
|
|
52
|
+
/** The ids of the items that should be expanded by default */
|
|
53
|
+
defaultExpandedItems?: string[];
|
|
54
|
+
/** Only allow one root item to be expanded at a time */
|
|
55
|
+
singleRootExpand?: boolean;
|
|
56
|
+
};
|
|
57
|
+
export type TControlledTreeViewProps = TTreeViewProps & {
|
|
58
|
+
/** The current state of the Tree View. */
|
|
59
|
+
viewState: TViewState;
|
|
60
|
+
};
|
|
61
|
+
export type TViewState = {
|
|
62
|
+
/** The list of ids of items that are selected */
|
|
63
|
+
selectedItems?: string[];
|
|
64
|
+
/** The list of ids of items that are expanded */
|
|
65
|
+
expandedItems?: string[];
|
|
66
|
+
/** The focused item */
|
|
67
|
+
focusedItem?: string;
|
|
68
|
+
};
|
|
69
|
+
export type TTreeViewItem = TTreeItemFunctions & {
|
|
70
|
+
/** Item identifier */
|
|
71
|
+
id: string;
|
|
72
|
+
/** Item name */
|
|
73
|
+
name: string;
|
|
74
|
+
/** The possible children of this item */
|
|
75
|
+
children?: string[];
|
|
76
|
+
/** If the item should be rendered as a folder even with no children */
|
|
77
|
+
isFolder?: boolean;
|
|
78
|
+
/** A callback to fetch children asynchronously */
|
|
79
|
+
childrenAsync?: () => Promise<TTreeViewItem[]>;
|
|
80
|
+
/** Custom styles */
|
|
81
|
+
sx?: Interpolation<Theme>;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const TreeView: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const TreeItemsWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
9
|
+
export declare const TreeItemTrigger: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
} & {
|
|
13
|
+
$isFocused: boolean;
|
|
14
|
+
$isExpanded: boolean;
|
|
15
|
+
$isSelected: boolean;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
17
|
+
export declare const TreeItemChildren: import("@emotion/styled").StyledComponent<{
|
|
18
|
+
theme?: import("@emotion/react").Theme;
|
|
19
|
+
as?: React.ElementType;
|
|
20
|
+
} & import("react").ClassAttributes<HTMLUListElement> & import("react").HTMLAttributes<HTMLUListElement> & {
|
|
21
|
+
theme?: import("@emotion/react").Theme;
|
|
22
|
+
} & {
|
|
23
|
+
$isExpanded: boolean;
|
|
24
|
+
}, {}, {}>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./Button";
|
|
2
2
|
export * from "./ThemeContext";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
3
|
+
export * from "./Accordion";
|
|
4
|
+
export * from "./InputField";
|
|
5
|
+
export * from "./SelectFilter";
|
|
6
|
+
export * from "./Slider";
|
|
7
|
+
export * from "./Dropdown";
|
|
8
|
+
export * from "./Modal";
|
|
9
|
+
export * from "./Indicator";
|
|
10
|
+
export * from "./Tag";
|
|
11
|
+
export * from "./Card";
|
|
12
|
+
export * from "./Table";
|
|
13
|
+
export * from "./DataGrid";
|
|
14
|
+
export * from "./MultiViewList";
|
|
15
|
+
export * from "./TreeView";
|
|
16
|
+
export * from "./Drawer";
|
|
17
|
+
export * from "./Checkbox";
|
|
18
|
+
export * from "./Switch";
|
|
@@ -6,15 +6,25 @@
|
|
|
6
6
|
export declare const getContrastColor: (color: string) => string;
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
|
-
* @param color
|
|
9
|
+
* @param color a color
|
|
10
10
|
* @param strength the strength (0-100) to darken the color
|
|
11
11
|
* @returns the color darkened by the strength
|
|
12
12
|
*/
|
|
13
13
|
export declare const darkenColor: (color: string, strength?: number) => string;
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
|
-
* @param color
|
|
16
|
+
* @param color a color
|
|
17
17
|
* @param strength the strength (0-100) to lighten the color
|
|
18
18
|
* @returns the color lightened by the strength
|
|
19
19
|
*/
|
|
20
20
|
export declare const lightenColor: (color: string, strength?: number) => string;
|
|
21
|
+
/**
|
|
22
|
+
* @param color a color
|
|
23
|
+
* @returns the hover color, based on if the color is dark or light
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHoverColor: (color: string) => string;
|
|
26
|
+
/**
|
|
27
|
+
* @param color a color
|
|
28
|
+
* @returns the active color, based on if the color is dark or light
|
|
29
|
+
*/
|
|
30
|
+
export declare const getActiveColor: (color: string) => string;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export { getContrastColor } from "./colors";
|
|
6
|
-
export { darkenColor } from "./colors";
|
|
7
|
-
export { lightenColor } from "./colors";
|
|
1
|
+
export * from "./transientOptions";
|
|
2
|
+
export * from "./isMobile";
|
|
3
|
+
export * from "./colors";
|
|
4
|
+
export * from "./usePrefersColorScheme";
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* @param {number=} mobileBreakpoint breakpoint width to check against
|
|
4
4
|
* @returns boolean
|
|
5
5
|
*/
|
|
6
|
-
declare const useIsMobile: (mobileBreakpoint?: number) => boolean;
|
|
7
|
-
export default useIsMobile;
|
|
6
|
+
export declare const useIsMobile: (mobileBreakpoint?: number) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TCellValues, TTableRow } from "../components/index";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { IThemeContextProps } from "../components/ThemeContext/ThemeInterfaces";
|
|
4
3
|
import { RenderHookResult, RenderResult } from "@testing-library/react";
|
|
5
4
|
import { ColumnDef } from "@tanstack/react-table";
|
|
5
|
+
import { TDataGridRow } from "../components/DataGrid/DataGridInterfaces";
|
|
6
6
|
export declare const renderWithTheme: (ui: React.ReactElement, themeProps?: IThemeContextProps) => RenderResult;
|
|
7
7
|
export declare function renderHookWithTheme<T, R>(hook: (props: T) => R, themeProps?: IThemeContextProps): RenderHookResult<R, T>;
|
|
8
8
|
export declare const headingStyle: {
|
|
@@ -11,6 +11,25 @@ export declare const headingStyle: {
|
|
|
11
11
|
fontWeight: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const templateColumns: ColumnDef<TTableRow<TCellValues>, TCellValues>[];
|
|
14
|
+
export declare const templateDataGridColumns: ColumnDef<TDataGridRow<TCellValues>, TCellValues>[];
|
|
15
|
+
export type TWellData = {
|
|
16
|
+
[key: string]: string | number | boolean | null;
|
|
17
|
+
well_id: string;
|
|
18
|
+
id_t_well: number;
|
|
19
|
+
well_name: string;
|
|
20
|
+
data_quality: number;
|
|
21
|
+
is_live: boolean;
|
|
22
|
+
country: string;
|
|
23
|
+
business_unit: string;
|
|
24
|
+
spud_date: string;
|
|
25
|
+
rig_contractor: string;
|
|
26
|
+
rig_name: string;
|
|
27
|
+
rig_type: string;
|
|
28
|
+
last_sensordate: string | null;
|
|
29
|
+
last_ddr_date: string | null;
|
|
30
|
+
mudlog_data_quality: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const templateDataGridData: TWellData[];
|
|
14
33
|
export declare const templateTableData: {
|
|
15
34
|
cells: {
|
|
16
35
|
well_name: {
|
|
@@ -52,3 +71,4 @@ export declare const templateTableData: {
|
|
|
52
71
|
};
|
|
53
72
|
}[];
|
|
54
73
|
export declare const TemplateCard: (item: TTableRow<TCellValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare const TemplateCardGrid: (item: TDataGridRow<TCellValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
|