@kwantis-id3/frontend-library 1.0.0-rc.8 → 1.0.0

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.
Files changed (44) hide show
  1. package/dist/esm/index.js +185 -96
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/types/components/Accordion/AccordionStyled.d.ts +2 -0
  4. package/dist/esm/types/components/Accordion/index.d.ts +2 -0
  5. package/dist/esm/types/components/Button/ButtonInterfaces.d.ts +1 -2
  6. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
  7. package/dist/esm/types/components/Checkbox/CheckboxInterfaces.d.ts +23 -0
  8. package/dist/esm/types/components/Checkbox/CheckboxStyled.d.ts +32 -0
  9. package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
  10. package/dist/esm/types/components/DataGrid/DataGrid.d.ts +3 -0
  11. package/dist/esm/types/components/DataGrid/DataGridInterfaces.d.ts +9 -0
  12. package/dist/esm/types/components/DataGrid/index.d.ts +2 -0
  13. package/dist/esm/types/components/Drawer/Drawer.d.ts +1 -1
  14. package/dist/esm/types/components/Drawer/DrawerInterfaces.d.ts +14 -0
  15. package/dist/esm/types/components/Drawer/DrawerStyled.d.ts +3 -0
  16. package/dist/esm/types/components/Dropdown/DropdownInterfaces.d.ts +9 -0
  17. package/dist/esm/types/components/Dropdown/DropdownStyled.d.ts +1 -0
  18. package/dist/esm/types/components/Indicator/IndicatorInterfaces.d.ts +1 -1
  19. package/dist/esm/types/components/Indicator/NeutralIndicator.d.ts +3 -0
  20. package/dist/esm/types/components/InputField/InputField.d.ts +1 -1
  21. package/dist/esm/types/components/InputField/InputFieldInterfaces.d.ts +2 -1
  22. package/dist/esm/types/components/MultiViewList/MultiViewGrid.d.ts +5 -0
  23. package/dist/esm/types/components/MultiViewList/MultiViewList.d.ts +1 -0
  24. package/dist/esm/types/components/MultiViewList/MultiViewListInterfaces.d.ts +13 -1
  25. package/dist/esm/types/components/MultiViewList/MultiViewListStyled.d.ts +3 -0
  26. package/dist/esm/types/components/MultiViewList/index.d.ts +1 -0
  27. package/dist/esm/types/components/Slider/Thumb.d.ts +7 -0
  28. package/dist/esm/types/components/Switch/Switch.d.ts +2 -0
  29. package/dist/esm/types/components/Switch/SwitchInterfaces.d.ts +17 -0
  30. package/dist/esm/types/components/Switch/SwitchStyled.d.ts +35 -0
  31. package/dist/esm/types/components/Switch/index.d.ts +2 -0
  32. package/dist/esm/types/components/Table/DebouncedFilter.d.ts +1 -2
  33. package/dist/esm/types/components/Tag/TagInterfaces.d.ts +1 -2
  34. package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +4 -3
  35. package/dist/esm/types/components/ThemeContext/ThemeInterfaces.d.ts +2 -0
  36. package/dist/esm/types/components/TreeView/TreeUtils.d.ts +19 -0
  37. package/dist/esm/types/components/TreeView/TreeViewInterfaces.d.ts +6 -0
  38. package/dist/esm/types/components/index.d.ts +3 -0
  39. package/dist/esm/types/utils/index.d.ts +4 -5
  40. package/dist/esm/types/utils/isMobile.d.ts +1 -2
  41. package/dist/esm/types/utils/testing.d.ts +21 -0
  42. package/dist/index.d.ts +127 -21
  43. package/package.json +28 -23
  44. package/dist/esm/types/utils/styled.d.ts +0 -2
@@ -1,6 +1,8 @@
1
1
  export declare const AccordionGroup: import("@emotion/styled").StyledComponent<{
2
2
  theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
+ } & {
5
+ $variant: "default" | "light";
4
6
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
7
  export declare const StyledAccordion: import("@emotion/styled").StyledComponent<{
6
8
  theme?: import("@emotion/react").Theme;
@@ -1,2 +1,4 @@
1
+ import { AccordionGroup } from "./AccordionStyled";
1
2
  export * from "./Accordion";
2
3
  export * from "./AccordionInterfaces";
4
+ export { AccordionGroup };
@@ -1,5 +1,4 @@
1
- import { Interpolation } from "@emotion/react";
2
- import { Theme } from "@emotion/react/dist/declarations/src";
1
+ import { Interpolation, Theme } from "@emotion/react";
3
2
  export type TButtonVariants = "contained" | "outlined" | "text";
4
3
  export type TButtonProps = {
5
4
  /** Color of the button */
@@ -0,0 +1,3 @@
1
+ /** @jsxImportSource @emotion/react */
2
+ import { TCheckboxProps } from "./CheckboxInterfaces";
3
+ export declare const Checkbox: ({ label, htmlId, checked, defaultChecked, onChange, indeterminate, disabled, className, sx, name, size, }: TCheckboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { Interpolation, Theme } from "@emotion/react";
2
+ export type TCheckboxProps = {
3
+ /** Lable of the checkbox */
4
+ label?: string;
5
+ /** HTML id */
6
+ htmlId?: string;
7
+ name?: string;
8
+ /** Controlled checked state */
9
+ checked?: boolean;
10
+ /** Uncontrolled default checked state */
11
+ defaultChecked?: boolean;
12
+ /** onChange handler */
13
+ onChange?: (checked: boolean) => void;
14
+ /** Mixed state in its children checkboxes */
15
+ indeterminate?: boolean;
16
+ /** Disabled state */
17
+ disabled?: boolean;
18
+ className?: string;
19
+ /** Custom styles */
20
+ sx?: Interpolation<Theme>;
21
+ /** Checkbox sizes */
22
+ size?: "small" | "medium" | "large";
23
+ };
@@ -0,0 +1,32 @@
1
+ export declare const StyledLabel: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ } & {
5
+ $disabled?: boolean;
6
+ }, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
7
+ export declare const StyledCheckboxInput: import("@emotion/styled").StyledComponent<{
8
+ theme?: import("@emotion/react").Theme;
9
+ as?: React.ElementType;
10
+ }, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
11
+ export declare const StyledCheckboxBox: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme;
13
+ as?: React.ElementType;
14
+ } & {
15
+ $checked: boolean;
16
+ $indeterminate: boolean;
17
+ $disabled?: boolean;
18
+ $backgroundColor?: string;
19
+ $checkmarkColor?: string;
20
+ $borderColor?: string;
21
+ $size?: "small" | "medium" | "large";
22
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
23
+ export declare const StyledIconWrapper: import("@emotion/styled").StyledComponent<{
24
+ theme?: import("@emotion/react").Theme;
25
+ as?: React.ElementType;
26
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
27
+ export declare const StyledLabelText: import("@emotion/styled").StyledComponent<{
28
+ theme?: import("@emotion/react").Theme;
29
+ as?: React.ElementType;
30
+ } & {
31
+ $disabled?: boolean;
32
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,2 @@
1
+ export * from "./Checkbox";
2
+ export * from "./CheckboxInterfaces";
@@ -0,0 +1,3 @@
1
+ import { TCellValues } from "../Table";
2
+ import { TDataGridProps, TDataGridRow } from "./DataGridInterfaces";
3
+ export declare const DataGrid: <Cell extends TCellValues, Row extends TDataGridRow<Cell>>(props: TDataGridProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ColumnDef } from "@tanstack/react-table";
2
+ import { TCellValues } from "../Table";
3
+ export type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
4
+ columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
5
+ data: Row[] | undefined;
6
+ };
7
+ export type TDataGridRow<Cell extends TCellValues> = {
8
+ [key: string]: Cell;
9
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./DataGrid";
2
+ export * from "./DataGridInterfaces";
@@ -1,3 +1,3 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import { TDrawerProps } from "./DrawerInterfaces";
3
- export declare const Drawer: ({ anchor, openContent, closedContent, openTrigger, closedTrigger, minOpen, maxOpen, bgColor, triggerHoverColor, }: TDrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export declare const Drawer: ({ anchor, isOpen: isOpenProp, openContent, closedContent, openTrigger, closedTrigger, minOpen, maxOpen, bgColor, triggerColor, triggerHoverColor, onOpen, onClose, zIndex, hideTrigger, keepMounted, sx, }: TDrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,7 +1,10 @@
1
+ import { Interpolation, Theme } from "@emotion/react";
1
2
  import { ReactNode } from "react";
2
3
  export type TDrawerProps = {
3
4
  /** Position of the drawer */
4
5
  anchor: "top" | "right" | "bottom" | "left";
6
+ /** Optional state value to control the component */
7
+ isOpen?: boolean;
5
8
  /** Trigger showed when drawer is closed */
6
9
  closedTrigger?: ReactNode;
7
10
  /** Trigger showed when drawer is open */
@@ -16,6 +19,17 @@ export type TDrawerProps = {
16
19
  maxOpen?: number;
17
20
  /** Background color */
18
21
  bgColor?: string;
22
+ /** Trigger Color */
23
+ triggerColor?: string;
19
24
  /** Trigger hover color */
20
25
  triggerHoverColor?: string;
26
+ /** Hide the default thumb trigger */
27
+ hideTrigger?: boolean;
28
+ /** Keep rendered when closed to preserve state */
29
+ keepMounted?: boolean;
30
+ /** Set a custom z-index */
31
+ zIndex?: number;
32
+ sx?: Interpolation<Theme>;
33
+ onOpen?: () => void;
34
+ onClose?: () => void;
21
35
  };
@@ -7,6 +7,7 @@ export declare const DrawerBody: import("@emotion/styled").StyledComponent<{
7
7
  $minOpen?: string;
8
8
  $maxOpen?: string;
9
9
  $bgColor?: string;
10
+ $zIndex?: number;
10
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
12
  export declare const DrawerContent: import("@emotion/styled").StyledComponent<{
12
13
  theme?: import("@emotion/react").Theme;
@@ -21,5 +22,7 @@ export declare const Trigger: import("@emotion/styled").StyledComponent<{
21
22
  } & {
22
23
  $anchor: "top" | "right" | "bottom" | "left";
23
24
  $bgColor?: string;
25
+ $triggerColor?: string;
24
26
  $triggerHoverColor?: string;
27
+ $hideTrigger: boolean;
25
28
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -32,8 +32,17 @@ export type TDropdownProps = {
32
32
  bgColor?: string;
33
33
  /** The hover color of the dropdown */
34
34
  hoverColor?: string;
35
+ /** The border color */
36
+ borderColor?: string;
37
+ /** The border width */
38
+ borderWidth?: string;
35
39
  /** Controls wether the dropdown should extend towards the left or the right */
36
40
  direction?: "left" | "right";
41
+ /** Controls whether the dropdown body should have absolute or fixed position
42
+ * By default, it is set to absolute, which means the dropdown will be positioned relative to its parent element.
43
+ * Use fixed if you want the body to be above the entire page, regardless of the parent element.
44
+ */
45
+ menuPosition?: "absolute" | "fixed";
37
46
  /** The mobile breakpoint, by default it's 768px */
38
47
  mobileBreakpoint?: number;
39
48
  };
@@ -13,6 +13,7 @@ export declare const DropdownBody: import("@emotion/styled").StyledComponent<{
13
13
  $direction: string;
14
14
  $isOpen: boolean;
15
15
  $bgColor: string;
16
+ $position: "absolute" | "fixed";
16
17
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
18
  export declare const DropdownItemInnerContainer: import("@emotion/styled").StyledComponent<{
18
19
  theme?: import("@emotion/react").Theme;
@@ -8,4 +8,4 @@ export type TIndicatorInstanceProps = {
8
8
  export type TIndicatorProps = {
9
9
  variant: TIndicatorVariants;
10
10
  } & TIndicatorInstanceProps;
11
- export type TIndicatorVariants = "live" | "success" | "warning" | "error";
11
+ export type TIndicatorVariants = "live" | "success" | "warning" | "error" | "neutral";
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorInstanceProps } from "./IndicatorInterfaces";
3
+ export declare const NeutralIndicator: FC<TIndicatorInstanceProps>;
@@ -1,5 +1,5 @@
1
1
  export declare const InputField: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
2
2
  containerClassName?: string;
3
3
  color?: string;
4
- sx?: React.CSSProperties;
4
+ sx?: import("@emotion/react").Interpolation<import("@emotion/react").Theme>;
5
5
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,8 +1,9 @@
1
+ import { Interpolation, Theme } from "@emotion/react";
1
2
  export type TTextFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {
2
3
  /** Classname given to the container div */
3
4
  containerClassName?: string;
4
5
  /** The color of the input */
5
6
  color?: string;
6
7
  /** Change the styles of the input field */
7
- sx?: React.CSSProperties;
8
+ sx?: Interpolation<Theme>;
8
9
  };
@@ -0,0 +1,5 @@
1
+ /** @jsxImportSource @emotion/react */
2
+ import { TMultiViewGridProps } from "./MultiViewListInterfaces";
3
+ import { TCellValues } from "../Table";
4
+ import { TDataGridRow } from "../DataGrid";
5
+ export declare const MultiViewGrid: <Cell extends TCellValues, Row extends TDataGridRow<Cell>>(props: TMultiViewGridProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ /** @jsxImportSource @emotion/react */
1
2
  import { TMultiViewListProps } from "./MultiViewListInterfaces";
2
3
  import { TCellValues, TTableRow } from "../Table";
3
4
  export declare const MultiViewList: <Cell extends TCellValues, Row extends TTableRow<Cell>>(props: TMultiViewListProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,17 @@
1
1
  import { TCellValues, TTableProps, TTableRow } from "../Table";
2
+ import { TDataGridProps, TDataGridRow } from "../DataGrid/DataGridInterfaces";
3
+ import { Interpolation, Theme } from "@emotion/react";
2
4
  export type TMultiViewListProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = TTableProps<Cell, Row> & {
3
5
  mode: "table" | "cards";
4
- 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>;
5
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,3 @@
1
1
  export * from "./MultiViewListInterfaces";
2
2
  export * from "./MultiViewList";
3
+ export * from "./MultiViewGrid";
@@ -0,0 +1,7 @@
1
+ import { Range } from "react-range";
2
+ export declare const ThumbLabel: ({ rangeRef, values, index, step, }: {
3
+ rangeRef: Range | null;
4
+ values: number[];
5
+ index: number;
6
+ step?: number;
7
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TSwitchProps } from "./SwitchInterfaces";
2
+ export declare const Switch: (props: TSwitchProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -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>, {}>;
@@ -0,0 +1,2 @@
1
+ export * from "./Switch";
2
+ export * from "./SwitchInterfaces";
@@ -1,7 +1,6 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import { Column, Table } from "@tanstack/react-table";
3
- import { TCellValues, TTableRow } from "./TableInterfaces";
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,5 +1,4 @@
1
- import { Interpolation } from "@emotion/react";
2
- import { Theme } from "@emotion/react/dist/declarations/src";
1
+ import { Interpolation, Theme } from "@emotion/react";
3
2
  import { ITagColors } from "../ThemeContext";
4
3
  export type TTagProps = {
5
4
  text: string;
@@ -1,6 +1,7 @@
1
- import { PropsWithChildren, ReactNode } from "react";
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, }: PropsWithChildren<IThemeContextProps>) => ReactNode;
6
+ export declare const ThemeContextProvider: ({ palettes, defaultMode, children, }: PropsWithChildren<IThemeContextProps>) => ReactElement;
6
7
  export declare const useThemeContext: () => IThemeContextValue;
@@ -62,6 +62,8 @@ export interface IIndicatorColors {
62
62
  warningFill: string;
63
63
  error: string;
64
64
  errorFill: string;
65
+ neutral: string;
66
+ neutralFill: string;
65
67
  }
66
68
  export interface IPalette {
67
69
  /** Application background */
@@ -1,3 +1,22 @@
1
1
  import { TTreeViewItem } from "./TreeViewInterfaces";
2
+ /**
3
+ *
4
+ * @param items searchable nodes
5
+ * @returns all the root items
6
+ */
2
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
+ */
3
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;
@@ -47,6 +47,12 @@ type TTreeViewProps = TTreeItemFunctions & {
47
47
  };
48
48
  export type TUncontrolledTreeViewProps = TTreeViewProps & {
49
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;
50
56
  };
51
57
  export type TControlledTreeViewProps = TTreeViewProps & {
52
58
  /** The current state of the Tree View. */
@@ -10,6 +10,9 @@ export * from "./Indicator";
10
10
  export * from "./Tag";
11
11
  export * from "./Card";
12
12
  export * from "./Table";
13
+ export * from "./DataGrid";
13
14
  export * from "./MultiViewList";
14
15
  export * from "./TreeView";
15
16
  export * from "./Drawer";
17
+ export * from "./Checkbox";
18
+ export * from "./Switch";
@@ -1,5 +1,4 @@
1
- import useIsMobile from "./isMobile";
2
- export { transientOptions } from "./transientOptions";
3
- export { styled } from "./styled";
4
- export { useIsMobile };
5
- export { getContrastColor, darkenColor, lightenColor, getHoverColor, getActiveColor } 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;
@@ -2,6 +2,7 @@ import { TCellValues, TTableRow } from "../components/index";
2
2
  import { IThemeContextProps } from "../components/ThemeContext/ThemeInterfaces";
3
3
  import { RenderHookResult, RenderResult } from "@testing-library/react";
4
4
  import { ColumnDef } from "@tanstack/react-table";
5
+ import { TDataGridRow } from "../components/DataGrid/DataGridInterfaces";
5
6
  export declare const renderWithTheme: (ui: React.ReactElement, themeProps?: IThemeContextProps) => RenderResult;
6
7
  export declare function renderHookWithTheme<T, R>(hook: (props: T) => R, themeProps?: IThemeContextProps): RenderHookResult<R, T>;
7
8
  export declare const headingStyle: {
@@ -10,6 +11,25 @@ export declare const headingStyle: {
10
11
  fontWeight: string;
11
12
  };
12
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[];
13
33
  export declare const templateTableData: {
14
34
  cells: {
15
35
  well_name: {
@@ -51,3 +71,4 @@ export declare const templateTableData: {
51
71
  };
52
72
  }[];
53
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;