@kwantis-id3/frontend-library 0.27.2 → 1.0.0-rc.4

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 (51) hide show
  1. package/dist/esm/index.js +226 -61
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/types/components/Accordion/Accordion.d.ts +3 -4
  4. package/dist/esm/types/components/Accordion/AccordionStyled.d.ts +4 -4
  5. package/dist/esm/types/components/Button/Button.d.ts +1 -2
  6. package/dist/esm/types/components/Card/Card.d.ts +15 -0
  7. package/dist/esm/types/components/Card/CardInterfaces.d.ts +6 -0
  8. package/dist/esm/types/components/Card/CardStyled.d.ts +24 -0
  9. package/dist/esm/types/components/Card/index.d.ts +2 -0
  10. package/dist/esm/types/components/Dropdown/Dropdown.d.ts +6 -5
  11. package/dist/esm/types/components/Dropdown/DropdownStyled.d.ts +10 -11
  12. package/dist/esm/types/components/Indicator/ErrorIndicator.d.ts +3 -0
  13. package/dist/esm/types/components/Indicator/Indicator.d.ts +7 -0
  14. package/dist/esm/types/components/Indicator/IndicatorInterfaces.d.ts +11 -0
  15. package/dist/esm/types/components/Indicator/LiveIndicator.d.ts +3 -0
  16. package/dist/esm/types/components/Indicator/SuccessIndicator.d.ts +3 -0
  17. package/dist/esm/types/components/Indicator/WarningIndicator.d.ts +3 -0
  18. package/dist/esm/types/components/Indicator/index.d.ts +2 -0
  19. package/dist/esm/types/components/InputField/InputField.d.ts +1 -2
  20. package/dist/esm/types/components/InputField/StyledInputField.d.ts +2 -2
  21. package/dist/esm/types/components/Modal/StyledModal.d.ts +4 -2
  22. package/dist/esm/types/components/MultiViewList/MultiViewList.d.ts +3 -0
  23. package/dist/esm/types/components/MultiViewList/MultiViewListInterfaces.d.ts +6 -0
  24. package/dist/esm/types/components/MultiViewList/MultiViewListStyled.d.ts +4 -0
  25. package/dist/esm/types/components/MultiViewList/index.d.ts +2 -0
  26. package/dist/esm/types/components/SelectFilter/MultiSelect.d.ts +2 -4
  27. package/dist/esm/types/components/SelectFilter/SingleSelect.d.ts +2 -4
  28. package/dist/esm/types/components/Slider/Slider.d.ts +4 -6
  29. package/dist/esm/types/components/Slider/SliderStyled.d.ts +4 -4
  30. package/dist/esm/types/components/Table/DebouncedFilter.d.ts +7 -0
  31. package/dist/esm/types/components/Table/DebouncedInput.d.ts +6 -0
  32. package/dist/esm/types/components/Table/Table.d.ts +3 -0
  33. package/dist/esm/types/components/Table/TableInterfaces.d.ts +21 -0
  34. package/dist/esm/types/components/Table/TableStyled.d.ts +14 -0
  35. package/dist/esm/types/components/Table/index.d.ts +2 -0
  36. package/dist/esm/types/components/Tag/Tag.d.ts +24 -0
  37. package/dist/esm/types/components/Tag/index.d.ts +1 -0
  38. package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +5 -71
  39. package/dist/esm/types/components/ThemeContext/ThemeInterfaces.d.ts +109 -0
  40. package/dist/esm/types/components/ThemeContext/index.d.ts +2 -1
  41. package/dist/esm/types/components/index.d.ts +6 -1
  42. package/dist/esm/types/utils/colors.d.ts +20 -0
  43. package/dist/esm/types/utils/index.d.ts +3 -0
  44. package/dist/esm/types/utils/styled.d.ts +1 -38
  45. package/dist/esm/types/utils/testing.d.ts +54 -0
  46. package/dist/esm/types/utils/transientOptions.d.ts +7 -0
  47. package/dist/esm/types/utils/usePrefersColorScheme.d.ts +1 -0
  48. package/dist/index.d.ts +255 -85
  49. package/package.json +8 -6
  50. package/src/types/emotion.d.ts +8 -0
  51. package/src/types/tanstack.d.ts +7 -0
@@ -2,7 +2,6 @@
2
2
  import { Interpolation } from "@emotion/styled";
3
3
  import React from "react";
4
4
  import { Theme } from "@emotion/react";
5
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
6
5
  export type AccordionProps = {
7
6
  /** Text of the accordion trigger */
8
7
  title: string;
@@ -13,11 +12,11 @@ export type AccordionProps = {
13
12
  /** Works only if uncontrolled (isOpen props is not present) */
14
13
  defaultOpen?: boolean;
15
14
  /** Color of the accordion */
16
- color?: ThemeColorsExtended;
15
+ color?: string;
17
16
  /** Color of the icon */
18
- iconColor?: ThemeColorsExtended;
17
+ iconColor?: string;
19
18
  /** Color of the divider */
20
- dividerColor?: ThemeColorsExtended;
19
+ dividerColor?: string;
21
20
  /** Hide the icon */
22
21
  hideIcon?: boolean;
23
22
  /** Hide the divider */
@@ -1,23 +1,23 @@
1
1
  export declare const Divider: import("@emotion/styled").StyledComponent<{
2
- theme?: import("..").ThemeContextProps;
2
+ theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
4
  } & {
5
5
  $color: string;
6
6
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
7
  export declare const TitleDiv: import("@emotion/styled").StyledComponent<{
8
- theme?: import("..").ThemeContextProps;
8
+ theme?: import("@emotion/react").Theme;
9
9
  as?: React.ElementType;
10
10
  } & {
11
11
  $color: string;
12
12
  $textColor: string;
13
13
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
14
  export declare const IconContainer: import("@emotion/styled").StyledComponent<{
15
- theme?: import("..").ThemeContextProps;
15
+ theme?: import("@emotion/react").Theme;
16
16
  as?: React.ElementType;
17
17
  } & {
18
18
  $iconColor: string;
19
19
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
20
20
  export declare const TitleH2: import("@emotion/styled").StyledComponent<{
21
- theme?: import("..").ThemeContextProps;
21
+ theme?: import("@emotion/react").Theme;
22
22
  as?: React.ElementType;
23
23
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
@@ -1,12 +1,11 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import * as React from "react";
3
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
4
3
  import { Interpolation } from "@emotion/styled";
5
4
  import { Theme } from "@emotion/react";
6
5
  export type ButtonVariants = "contained" | "outlined" | "text";
7
6
  export type ButtonProps = {
8
7
  /** Color of the button */
9
- color?: ThemeColorsExtended;
8
+ color?: string;
10
9
  /** Type of the button */
11
10
  type?: "button" | "submit" | "reset";
12
11
  /** Custom styles */
@@ -0,0 +1,15 @@
1
+ /** @jsxImportSource @emotion/react */
2
+ import { FC } from "react";
3
+ import { TCardSectionProps } from "./CardInterfaces";
4
+ /**
5
+ * The Card component is a container component that can be used to display content in a structured way.
6
+ * It has 3 possible sizes: small, medium and large.
7
+ *
8
+ */
9
+ declare const Card: FC<TCardSectionProps>;
10
+ declare const CardHeader: FC<TCardSectionProps>;
11
+ declare const CardContent: FC<TCardSectionProps>;
12
+ declare const CardFooter: FC<TCardSectionProps>;
13
+ declare const CardIndicators: FC<TCardSectionProps>;
14
+ declare const CardMediaSection: FC<TCardSectionProps>;
15
+ export { Card, CardHeader, CardContent, CardFooter, CardIndicators, CardMediaSection, };
@@ -0,0 +1,6 @@
1
+ import { Interpolation, Theme } from "@emotion/react";
2
+ import React, { PropsWithChildren } from "react";
3
+ export type TCardSectionProps = PropsWithChildren & {
4
+ sx?: Interpolation<Theme>;
5
+ onClick?: (e: React.MouseEvent<HTMLElement>) => void;
6
+ };
@@ -0,0 +1,24 @@
1
+ export declare const StyledCard: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
5
+ export declare const StyledHeader: import("@emotion/styled").StyledComponent<{
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
9
+ export declare const StyledContent: import("@emotion/styled").StyledComponent<{
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const StyledFooter: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
17
+ export declare const StyledMediaSection: import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
20
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
21
+ export declare const StyledCardIndicators: import("@emotion/styled").StyledComponent<{
22
+ theme?: import("@emotion/react").Theme;
23
+ as?: React.ElementType;
24
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,2 @@
1
+ export { Card, CardHeader, CardContent, CardFooter, CardIndicators, CardMediaSection, } from "./Card";
2
+ export { TCardSectionProps } from "./CardInterfaces";
@@ -1,9 +1,8 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import React from "react";
3
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
4
3
  /**
5
4
  * @property {string} value - The value displayed in the dropdown item
6
- * @property {ThemeColorsExtended} color - The color of the dropdown item
5
+ * @property {string} color - The color of the dropdown item
7
6
  * @property {string} textColor - The text color of the dropdown item
8
7
  * @property {DropdownItem[]} children - The children of the dropdown item
9
8
  * @property {() => void} onClick - The onClick handler of the dropdown item
@@ -12,9 +11,11 @@ export type DropdownItem = {
12
11
  /** The value displayed in the item */
13
12
  value: string;
14
13
  /** The color of the item */
15
- color?: ThemeColorsExtended;
14
+ bgColor?: string;
16
15
  /** The text color of the item */
17
16
  textColor?: string;
17
+ /** The hover color of the item */
18
+ hoverColor?: string;
18
19
  /** The children of the item */
19
20
  children?: DropdownItem[];
20
21
  /** Wether the item is hidden or not */
@@ -30,9 +31,9 @@ export type DropdownProps = {
30
31
  /** The trigger element of the dropdown. Clicking on this item will open the dropdown */
31
32
  trigger: React.ReactNode;
32
33
  /** The color of the dropdown */
33
- color?: ThemeColorsExtended;
34
+ bgColor?: string;
34
35
  /** The hover color of the dropdown */
35
- hoverColor?: ThemeColorsExtended;
36
+ hoverColor?: string;
36
37
  /** Controls wether the dropdown should extend towards the left or the right */
37
38
  direction?: "left" | "right";
38
39
  /** The mobile breakpoint, by default it's 768px */
@@ -1,13 +1,13 @@
1
1
  export declare const DropdownContainer: import("@emotion/styled").StyledComponent<{
2
- theme?: import("..").ThemeContextProps;
2
+ theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const DropdownTrigger: import("@emotion/styled").StyledComponent<{
6
- theme?: import("..").ThemeContextProps;
6
+ theme?: import("@emotion/react").Theme;
7
7
  as?: React.ElementType;
8
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
9
  export declare const DropdownBody: import("@emotion/styled").StyledComponent<{
10
- theme?: import("..").ThemeContextProps;
10
+ theme?: import("@emotion/react").Theme;
11
11
  as?: React.ElementType;
12
12
  } & {
13
13
  $direction: string;
@@ -15,7 +15,7 @@ export declare const DropdownBody: import("@emotion/styled").StyledComponent<{
15
15
  $bgColor: string;
16
16
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
17
  export declare const DropdownItemInnerContainer: import("@emotion/styled").StyledComponent<{
18
- theme?: import("..").ThemeContextProps;
18
+ theme?: import("@emotion/react").Theme;
19
19
  as?: React.ElementType;
20
20
  } & {
21
21
  $bgColor: string;
@@ -25,36 +25,35 @@ export declare const DropdownItemInnerContainer: import("@emotion/styled").Style
25
25
  $direction: string;
26
26
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
27
27
  export declare const DropdownBodyMobile: import("@emotion/styled").StyledComponent<{
28
- theme?: import("..").ThemeContextProps;
28
+ theme?: import("@emotion/react").Theme;
29
29
  as?: React.ElementType;
30
30
  } & {
31
31
  $isOpen: boolean;
32
32
  $bgColor: string;
33
33
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
34
34
  export declare const DropdownItemMobileContainer: import("@emotion/styled").StyledComponent<{
35
- theme?: import("..").ThemeContextProps;
35
+ theme?: import("@emotion/react").Theme;
36
36
  as?: React.ElementType;
37
37
  } & {
38
- $bgColor: string;
39
38
  $textColor: string;
40
39
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
41
40
  export declare const AccordionBody: import("@emotion/styled").StyledComponent<{
42
- theme?: import("..").ThemeContextProps;
41
+ theme?: import("@emotion/react").Theme;
43
42
  as?: React.ElementType;
44
43
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
45
44
  export declare const ClickableItemMobile: import("@emotion/styled").StyledComponent<{
46
- theme?: import("..").ThemeContextProps;
45
+ theme?: import("@emotion/react").Theme;
47
46
  as?: React.ElementType;
48
47
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
49
48
  export declare const MobileItemTitle: import("@emotion/styled").StyledComponent<{
50
- theme?: import("..").ThemeContextProps;
49
+ theme?: import("@emotion/react").Theme;
51
50
  as?: React.ElementType;
52
51
  } & {
53
52
  $bgColor?: string;
54
53
  $textColor?: string;
55
54
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
56
55
  export declare const ItemSpanValue: import("@emotion/styled").StyledComponent<{
57
- theme?: import("..").ThemeContextProps;
56
+ theme?: import("@emotion/react").Theme;
58
57
  as?: React.ElementType;
59
58
  } & {
60
59
  $direction: string;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorInstanceProps } from "./IndicatorInterfaces";
3
+ export declare const ErrorIndicator: FC<TIndicatorInstanceProps>;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorProps, TIndicatorVariants } from "./IndicatorInterfaces";
3
+ type TGenericIndicatorProps = {
4
+ variant: TIndicatorVariants;
5
+ } & TIndicatorProps;
6
+ export declare const Indicator: FC<TGenericIndicatorProps>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ export type TIndicatorInstanceProps = {
2
+ outerColor?: string;
3
+ innerColor?: string;
4
+ size?: number;
5
+ title?: string;
6
+ onClick?: (e: React.MouseEvent<SVGSVGElement>) => void;
7
+ };
8
+ export type TIndicatorProps = {
9
+ variant: TIndicatorVariants;
10
+ } & TIndicatorInstanceProps;
11
+ export type TIndicatorVariants = "live" | "success" | "warning" | "error";
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorInstanceProps } from "./IndicatorInterfaces";
3
+ export declare const LiveIndicator: FC<TIndicatorInstanceProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorInstanceProps } from "./IndicatorInterfaces";
3
+ export declare const SuccessIndicator: FC<TIndicatorInstanceProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { TIndicatorInstanceProps } from "./IndicatorInterfaces";
3
+ export declare const WarningIndicator: FC<TIndicatorInstanceProps>;
@@ -0,0 +1,2 @@
1
+ export { TIndicatorProps, TIndicatorVariants } from "./IndicatorInterfaces";
2
+ export { Indicator } from "./Indicator";
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
3
2
  interface TextFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
3
  /** Classname given to the container div */
5
4
  containerClassName?: string;
6
5
  /** Disables the input */
7
6
  isDisabled?: boolean;
8
7
  /** The color of the input */
9
- color?: ThemeColorsExtended;
8
+ color?: string;
10
9
  /** Change the styles of the input field */
11
10
  sx?: React.CSSProperties;
12
11
  }
@@ -1,9 +1,9 @@
1
1
  export declare const InputContainer: import("@emotion/styled").StyledComponent<{
2
- theme?: import("..").ThemeContextProps;
2
+ theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const StyledInput: import("@emotion/styled").StyledComponent<{
6
- theme?: import("..").ThemeContextProps;
6
+ theme?: import("@emotion/react").Theme;
7
7
  as?: React.ElementType;
8
8
  } & {
9
9
  $color: string;
@@ -1,11 +1,13 @@
1
1
  export declare const DialogElement: import("@emotion/styled").StyledComponent<{
2
- theme?: import("..").ThemeContextProps;
2
+ theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
4
  } & {
5
5
  $width?: string;
6
6
  $height?: string;
7
+ $bgColor?: string;
8
+ $textColor?: string;
7
9
  }, import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, {}>;
8
10
  export declare const ExitButtonContainer: import("@emotion/styled").StyledComponent<{
9
- theme?: import("..").ThemeContextProps;
11
+ theme?: import("@emotion/react").Theme;
10
12
  as?: React.ElementType;
11
13
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,3 @@
1
+ import { TMultiViewListProps } from "./MultiViewListInterfaces";
2
+ import { TCellValues, TTableRow } from "../Table";
3
+ export declare const MultiViewList: <Cell extends TCellValues, Row extends TTableRow<Cell>>(props: TMultiViewListProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { TCellValues, TTableProps, TTableRow } from "../Table";
3
+ export type TMultiViewListProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = TTableProps<Cell, Row> & {
4
+ mode: "table" | "cards";
5
+ cardComponent: (item: Row) => React.ReactNode;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare const StyledCardsContainer: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,2 @@
1
+ export * from "./MultiViewListInterfaces";
2
+ export { MultiViewList } from "./MultiViewList";
@@ -1,5 +1,3 @@
1
- import React from "react";
2
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
3
1
  export interface MultiSelectProps<Option = {
4
2
  label: string;
5
3
  value: string;
@@ -29,7 +27,7 @@ export interface MultiSelectProps<Option = {
29
27
  /** Wether the select is loading */
30
28
  isLoading?: boolean;
31
29
  /** The color of the select */
32
- color?: ThemeColorsExtended;
30
+ color?: string;
33
31
  /** The HTML id of the container */
34
32
  containerId?: string;
35
33
  /** The HTML id of the select */
@@ -41,4 +39,4 @@ export interface MultiSelectProps<Option = {
41
39
  /** Wether the select is required */
42
40
  required?: boolean;
43
41
  }
44
- export declare const MultiSelect: <Option>(props: MultiSelectProps<Option>) => React.JSX.Element;
42
+ export declare const MultiSelect: <Option>(props: MultiSelectProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,3 @@
1
- import React from "react";
2
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
3
1
  export interface SingleSelectProps<Option = {
4
2
  label: string;
5
3
  value: string;
@@ -29,7 +27,7 @@ export interface SingleSelectProps<Option = {
29
27
  /** Wether the select is loading */
30
28
  isLoading?: boolean;
31
29
  /** The color of the select */
32
- color?: ThemeColorsExtended;
30
+ color?: string;
33
31
  /** The HTML id of the container */
34
32
  containerId?: string;
35
33
  /** The HTML id of the select */
@@ -43,4 +41,4 @@ export interface SingleSelectProps<Option = {
43
41
  /** Wether the select is required */
44
42
  required?: boolean;
45
43
  }
46
- export declare const SingleSelect: <Option>(props: SingleSelectProps<Option>) => React.JSX.Element;
44
+ export declare const SingleSelect: <Option>(props: SingleSelectProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,3 @@
1
- import React from "react";
2
- import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
3
1
  export type SliderProps = {
4
2
  /** The values of the slider. */
5
3
  values: number[];
@@ -12,11 +10,11 @@ export type SliderProps = {
12
10
  /** The onFinalChange handler of the slider. (called only when the thumb is released) */
13
11
  onFinalChange?: (values: number[]) => void;
14
12
  /** The color of the slider */
15
- color?: ThemeColorsExtended;
13
+ color?: string;
16
14
  /** The color of the section not included in the range */
17
- unselectedColor?: ThemeColorsExtended;
15
+ unselectedColor?: string;
18
16
  /** The color of the thumb */
19
- thumbColor?: ThemeColorsExtended;
17
+ thumbColor?: string;
20
18
  /** The HTML id of the slider */
21
19
  htmlId?: string;
22
20
  /** The class name of the slider */
@@ -32,4 +30,4 @@ export type SliderProps = {
32
30
  /** Wether the thumbs can overlap */
33
31
  allowOverlap?: boolean;
34
32
  };
35
- export declare const Slider: (props: SliderProps) => React.JSX.Element;
33
+ export declare const Slider: (props: SliderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
1
  export declare const OuterTrackDiv: import("@emotion/styled").StyledComponent<{
2
- theme?: import("..").ThemeContextProps;
2
+ theme?: import("@emotion/react").Theme;
3
3
  as?: React.ElementType;
4
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const InnerTrackDiv: import("@emotion/styled").StyledComponent<{
6
- theme?: import("..").ThemeContextProps;
6
+ theme?: import("@emotion/react").Theme;
7
7
  as?: React.ElementType;
8
8
  } & {
9
9
  $bgColor: string;
10
10
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
11
  export declare const ThumbDiv: import("@emotion/styled").StyledComponent<{
12
- theme?: import("..").ThemeContextProps;
12
+ theme?: import("@emotion/react").Theme;
13
13
  as?: React.ElementType;
14
14
  } & {
15
15
  $bgColor: string;
@@ -17,7 +17,7 @@ export declare const ThumbDiv: import("@emotion/styled").StyledComponent<{
17
17
  $disabled?: boolean;
18
18
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
19
19
  export declare const ThumbValueSpan: import("@emotion/styled").StyledComponent<{
20
- theme?: import("..").ThemeContextProps;
20
+ theme?: import("@emotion/react").Theme;
21
21
  as?: React.ElementType;
22
22
  } & {
23
23
  $textColor: string;
@@ -0,0 +1,7 @@
1
+ /** @jsxImportSource @emotion/react */
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, }: {
5
+ column: Column<T, unknown>;
6
+ table: Table<T>;
7
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare function DebouncedInput({ value: initialValue, onChange, debounce, ...props }: {
3
+ value: string | number;
4
+ onChange: (value: string | number) => void;
5
+ debounce?: number;
6
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange">): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { TCellValues, TTableProps, TTableRow } from "./TableInterfaces";
2
+ export declare const Table: <Cell extends TCellValues, Row extends TTableRow<Cell>>(props: TTableProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export declare const renderCell: (value: string | number | boolean | null) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { ColumnDef } from "@tanstack/react-table";
2
+ export type TCellValues = string | number | boolean | null;
3
+ export type TTableProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = {
4
+ columns: ColumnDef<Row, Cell>[];
5
+ data: Row[] | undefined;
6
+ };
7
+ export type TTableCell<T extends TCellValues> = {
8
+ value: T;
9
+ bgColor?: string | null;
10
+ textColor?: string | null;
11
+ };
12
+ export type TTableRow<T extends TCellValues> = {
13
+ info?: {
14
+ bgColor?: string | null;
15
+ textColor?: string | null;
16
+ [key: string]: string | number | boolean | null | undefined;
17
+ };
18
+ cells: {
19
+ [key: string]: TTableCell<T>;
20
+ };
21
+ };
@@ -0,0 +1,14 @@
1
+ export declare const TableWrapper: 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 StyledTable: import("@emotion/styled").StyledComponent<{
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
+ } & {
9
+ $mobileBreakpoint: number;
10
+ }, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
11
+ export declare const StyledCell: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme;
13
+ as?: React.ElementType;
14
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,2 @@
1
+ export * from "./TableInterfaces";
2
+ export { Table, renderCell } from "./Table";
@@ -0,0 +1,24 @@
1
+ import { FC } from "react";
2
+ import { ITagColors } from "../ThemeContext/ThemeInterfaces";
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
+ };
24
+ export declare const Tag: FC<TTagProps>;
@@ -0,0 +1 @@
1
+ export { Tag, TTagProps } from "./Tag";
@@ -1,72 +1,6 @@
1
1
  import React from "react";
2
- export interface Color {
3
- main: string;
4
- contrastText: string;
5
- }
6
- export interface ThemeColorsObject {
7
- primary: Color;
8
- secondary: Color;
9
- tertiary: Color;
10
- statusOk: Color;
11
- statusWarning: Color;
12
- statusCritical: Color;
13
- statusNeutral: Color;
14
- }
15
- export interface ThemeContextProps {
16
- colors: ThemeColorsObject;
17
- }
18
- interface Nothing {
19
- }
20
- type Union<T, U> = T | (U & Nothing);
21
- export type ThemeColors = keyof ThemeColorsObject;
22
- export type ThemeColorsExtended = Union<ThemeColors, string>;
23
- export type ThemeProperties = ThemeContextProps & {
24
- getColor: (color: ThemeColorsExtended) => Color;
25
- };
26
- export declare const defaultThemeColors: {
27
- primary: {
28
- main: string;
29
- contrastText: string;
30
- };
31
- secondary: {
32
- main: string;
33
- contrastText: string;
34
- };
35
- tertiary: {
36
- main: string;
37
- contrastText: string;
38
- };
39
- statusOk: {
40
- main: string;
41
- contrastText: string;
42
- };
43
- statusWarning: {
44
- main: string;
45
- contrastText: string;
46
- };
47
- statusCritical: {
48
- main: string;
49
- contrastText: string;
50
- };
51
- statusNeutral: {
52
- main: string;
53
- contrastText: string;
54
- };
55
- };
56
- export declare const ThemeContextProvider: (props: React.PropsWithChildren<{
57
- theme?: ThemeContextProps;
58
- }>) => React.JSX.Element;
59
- type NestedObject<T> = {
60
- [key: string]: T | NestedObject<T>;
61
- };
62
- /**
63
- * Returns the value of a nested object given a string path
64
- * This function is supposed to be used ONLY to retrieve values from the theme object
65
- *
66
- * @param object the object to search
67
- * @param path a string representing the path to the value
68
- * @returns the value of the nested object
69
- */
70
- export declare function getObjectValueByPath<T>(obj: NestedObject<T>, path: string): T | undefined;
71
- export declare const useThemeContext: () => ThemeProperties;
72
- export {};
2
+ import { IPalette, IThemeContextProps, IThemeContextValue } from "./ThemeInterfaces";
3
+ export declare const defaultLightPalette: IPalette;
4
+ export declare const defaultDarkPalette: IPalette;
5
+ export declare const ThemeContextProvider: ({ palettes, defaultMode, children, }: React.PropsWithChildren<IThemeContextProps>) => JSX.Element;
6
+ export declare const useThemeContext: () => IThemeContextValue;