@kwantis-id3/frontend-library 0.20.0 → 0.20.1
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/LICENSE +201 -201
- package/README.md +333 -333
- package/changelog.md +118 -0
- package/dist/esm/index.js +240 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/Accordion/Accordion.d.ts +22 -0
- package/dist/esm/types/components/Accordion/AccordionStyled.d.ts +24 -0
- package/dist/esm/types/components/Accordion/index.d.ts +1 -0
- package/dist/esm/types/components/Button/Button.d.ts +18 -0
- package/dist/esm/types/components/Button/index.d.ts +1 -0
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +19 -0
- package/dist/esm/types/components/Dropdown/DropdownStyled.d.ts +50 -0
- package/dist/esm/types/components/Dropdown/index.d.ts +1 -0
- package/dist/esm/types/components/InputField/InputField.d.ts +22 -0
- package/dist/esm/types/components/InputField/StyledInputField.d.ts +12 -0
- package/dist/esm/types/components/InputField/index.d.ts +1 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +9 -0
- package/dist/esm/types/components/Modal/StyledModal.d.ts +9 -0
- package/dist/esm/types/components/Modal/index.d.ts +2 -0
- package/dist/esm/types/components/SelectFilter/MultiSelect.d.ts +24 -0
- package/dist/esm/types/components/SelectFilter/SingleSelect.d.ts +25 -0
- package/dist/esm/types/components/SelectFilter/index.d.ts +2 -0
- package/dist/esm/types/components/Slider/Slider.d.ts +20 -0
- package/dist/esm/types/components/Slider/SliderStyled.d.ts +25 -0
- package/dist/esm/types/components/Slider/index.d.ts +1 -0
- package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +78 -0
- package/dist/esm/types/components/ThemeContext/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/utils/index.d.ts +4 -0
- package/dist/esm/types/utils/isMobile.d.ts +7 -0
- package/dist/esm/types/utils/styled.d.ts +40 -0
- package/dist/esm/types/utils/transientOptions.d.ts +2 -0
- package/dist/index.d.ts +231 -0
- package/package.json +45 -12
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import { Interpolation } from "@emotion/styled";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Theme } from "@emotion/react";
|
|
5
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
6
|
+
export type AccordionProps = {
|
|
7
|
+
title: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
customTrigger?: React.ReactNode;
|
|
10
|
+
color?: ThemeColorsExtended;
|
|
11
|
+
iconColor?: ThemeColorsExtended;
|
|
12
|
+
dividerColor?: ThemeColorsExtended;
|
|
13
|
+
hideIcon?: boolean;
|
|
14
|
+
hideDivider?: boolean;
|
|
15
|
+
isOpen?: boolean;
|
|
16
|
+
isLazy?: boolean;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
onOpen?: () => void;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
sx?: Interpolation<Theme>;
|
|
21
|
+
};
|
|
22
|
+
export declare const Accordion: (props: AccordionProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Divider: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
$color: string;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const TitleDiv: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
$color: string;
|
|
13
|
+
$textColor: string;
|
|
14
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
+
export declare const IconContainer: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
$iconColor: string;
|
|
20
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
|
+
export declare const TitleH2: import("@emotion/styled").StyledComponent<{
|
|
22
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion, AccordionProps } from "./Accordion";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
4
|
+
import { Interpolation } from "@emotion/styled";
|
|
5
|
+
import { Theme } from "@emotion/react";
|
|
6
|
+
export type ButtonVariants = "contained" | "outlined" | "text";
|
|
7
|
+
export type ButtonProps = {
|
|
8
|
+
color?: ThemeColorsExtended;
|
|
9
|
+
type?: "button" | "submit" | "reset";
|
|
10
|
+
sx?: Interpolation<Theme>;
|
|
11
|
+
variant?: ButtonVariants;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
htmlId?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
export declare const Button: (props: ButtonProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button, ButtonProps } from "./Button";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
3
|
+
export type DropdownItem = {
|
|
4
|
+
value: string;
|
|
5
|
+
color?: ThemeColorsExtended;
|
|
6
|
+
textColor?: string;
|
|
7
|
+
children?: DropdownItem[];
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type DropdownProps = {
|
|
11
|
+
content: DropdownItem[];
|
|
12
|
+
trigger: React.ReactNode;
|
|
13
|
+
color?: ThemeColorsExtended;
|
|
14
|
+
hoverColor?: ThemeColorsExtended;
|
|
15
|
+
direction?: "left" | "right";
|
|
16
|
+
mobileBreakpoint?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const DropdownDesktop: (props: DropdownProps) => JSX.Element;
|
|
19
|
+
export declare const Dropdown: (props: DropdownProps) => JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DropdownContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const DropdownTrigger: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
$textColor: string;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const DropdownBody: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
$direction: string;
|
|
17
|
+
$isOpen: boolean;
|
|
18
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
19
|
+
export declare const DropdownItemContainer: import("@emotion/styled").StyledComponent<{
|
|
20
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
21
|
+
as?: import("react").ElementType<any> | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
$bgColor: string;
|
|
24
|
+
$textColor: string;
|
|
25
|
+
$hoverColor: string;
|
|
26
|
+
$hoverTextColor: string;
|
|
27
|
+
$direction: string;
|
|
28
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
|
+
export declare const DropdownBodyMobile: import("@emotion/styled").StyledComponent<{
|
|
30
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
31
|
+
as?: import("react").ElementType<any> | undefined;
|
|
32
|
+
} & {
|
|
33
|
+
$isOpen: boolean;
|
|
34
|
+
$bgColor: string;
|
|
35
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
36
|
+
export declare const DropdownItemMobileContainer: import("@emotion/styled").StyledComponent<{
|
|
37
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
38
|
+
as?: import("react").ElementType<any> | undefined;
|
|
39
|
+
} & {
|
|
40
|
+
$bgColor: string;
|
|
41
|
+
$textColor: string;
|
|
42
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
43
|
+
export declare const AccordionBody: import("@emotion/styled").StyledComponent<{
|
|
44
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
45
|
+
as?: import("react").ElementType<any> | undefined;
|
|
46
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
47
|
+
export declare const ClickableItemMobile: import("@emotion/styled").StyledComponent<{
|
|
48
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
49
|
+
as?: import("react").ElementType<any> | undefined;
|
|
50
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dropdown, DropdownProps, DropdownItem } from "./Dropdown";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
3
|
+
export type TInputType = "text" | "number" | "password" | "email" | "image" | "search" | "tel" | "url" | "date" | "datetime-local" | "month" | "week" | "time" | "color";
|
|
4
|
+
interface TextFieldProps {
|
|
5
|
+
value?: string | number;
|
|
6
|
+
name?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
htmlId?: string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
color?: ThemeColorsExtended;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
pattern?: string;
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
list?: string;
|
|
19
|
+
type?: TInputType;
|
|
20
|
+
}
|
|
21
|
+
export declare const InputField: (props: TextFieldProps) => JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const StyledInput: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
$color: string;
|
|
11
|
+
$isDisabled?: boolean | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputField, TInputType } from "./InputField";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DialogElement: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, {}>;
|
|
6
|
+
export declare const ExitButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
3
|
+
export interface MultiSelectProps<Option = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}> {
|
|
7
|
+
options: Option[];
|
|
8
|
+
onChange?: (option: Option[] | null) => void;
|
|
9
|
+
value?: readonly Option[] | null;
|
|
10
|
+
name?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isClearable?: boolean;
|
|
14
|
+
isSearchable?: boolean;
|
|
15
|
+
isOptionDisabled?: (option: Option) => boolean;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
color?: ThemeColorsExtended;
|
|
18
|
+
containerId?: string;
|
|
19
|
+
htmlId?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
menuPosition?: "fixed" | "absolute";
|
|
22
|
+
required?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const MultiSelect: <Option>(props: MultiSelectProps<Option>) => JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
3
|
+
export interface SingleSelectProps<Option = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}> {
|
|
7
|
+
options: Option[];
|
|
8
|
+
onChange?: (option: Option | null) => void;
|
|
9
|
+
value?: Option | null;
|
|
10
|
+
name?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isClearable?: boolean;
|
|
14
|
+
isSearchable?: boolean;
|
|
15
|
+
isOptionDisabled?: (option: Option) => boolean;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
color?: ThemeColorsExtended;
|
|
18
|
+
containerId?: string;
|
|
19
|
+
htmlId?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
inputClassName?: string;
|
|
22
|
+
menuPosition?: "fixed" | "absolute";
|
|
23
|
+
required?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const SingleSelect: <Option>(props: SingleSelectProps<Option>) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
3
|
+
export type SliderProps = {
|
|
4
|
+
values: number[];
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
onChange: (values: number[]) => void;
|
|
8
|
+
onFinalChange?: (values: number[]) => void;
|
|
9
|
+
color?: ThemeColorsExtended;
|
|
10
|
+
unselectedColor?: ThemeColorsExtended;
|
|
11
|
+
thumbColor?: ThemeColorsExtended;
|
|
12
|
+
htmlId?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
showThumbValue?: boolean;
|
|
15
|
+
autoCalculateMinMax?: boolean;
|
|
16
|
+
step?: number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
allowOverlap?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const Slider: (props: SliderProps) => JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const OuterTrackDiv: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const InnerTrackDiv: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
$bgColor: string;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const ThumbDiv: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
$bgColor: string;
|
|
17
|
+
$borderColor: string;
|
|
18
|
+
$disabled?: boolean | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export declare const ThumbValueSpan: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("..").ThemeContextProps | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
$textColor: string;
|
|
25
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Slider, SliderProps } from "./Slider";
|
|
@@ -0,0 +1,78 @@
|
|
|
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 type 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
|
+
type ThemeProperties = {
|
|
24
|
+
colors: ThemeColorsObject;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param color one of the theme keys, a path to a specific color in the theme, OR a string representing a color (hex, rgb, hsl, etc)
|
|
28
|
+
* @returns a valid color object. If color is not valid, will return the primary color.
|
|
29
|
+
*/
|
|
30
|
+
getColor: (color: ThemeColorsExtended) => Color;
|
|
31
|
+
};
|
|
32
|
+
export declare const defaultThemeColors: {
|
|
33
|
+
primary: {
|
|
34
|
+
main: string;
|
|
35
|
+
contrastText: string;
|
|
36
|
+
};
|
|
37
|
+
secondary: {
|
|
38
|
+
main: string;
|
|
39
|
+
contrastText: string;
|
|
40
|
+
};
|
|
41
|
+
tertiary: {
|
|
42
|
+
main: string;
|
|
43
|
+
contrastText: string;
|
|
44
|
+
};
|
|
45
|
+
statusOk: {
|
|
46
|
+
main: string;
|
|
47
|
+
contrastText: string;
|
|
48
|
+
};
|
|
49
|
+
statusWarning: {
|
|
50
|
+
main: string;
|
|
51
|
+
contrastText: string;
|
|
52
|
+
};
|
|
53
|
+
statusCritical: {
|
|
54
|
+
main: string;
|
|
55
|
+
contrastText: string;
|
|
56
|
+
};
|
|
57
|
+
statusNeutral: {
|
|
58
|
+
main: string;
|
|
59
|
+
contrastText: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare const ThemeContextProvider: (props: React.PropsWithChildren<{
|
|
63
|
+
theme?: ThemeContextProps;
|
|
64
|
+
}>) => JSX.Element;
|
|
65
|
+
type NestedObject<T> = {
|
|
66
|
+
[key: string]: T | NestedObject<T>;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Returns the value of a nested object given a string path
|
|
70
|
+
* This function is supposed to be used ONLY to retrieve values from the theme object
|
|
71
|
+
*
|
|
72
|
+
* @param object the object to search
|
|
73
|
+
* @param path a string representing the path to the value
|
|
74
|
+
* @returns the value of the nested object
|
|
75
|
+
*/
|
|
76
|
+
export declare function getObjectValueByPath<T>(obj: NestedObject<T>, path: string): T | undefined;
|
|
77
|
+
export declare const useThemeContext: () => ThemeProperties;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Button, ButtonProps } from "./Button";
|
|
2
|
+
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
3
|
+
export { Accordion, AccordionProps } from "./Accordion";
|
|
4
|
+
export { InputField, TInputType } from "./InputField";
|
|
5
|
+
export { SingleSelect, SingleSelectProps, MultiSelect, MultiSelectProps, } from "./SelectFilter";
|
|
6
|
+
export { Slider, SliderProps } from "./Slider";
|
|
7
|
+
export { Dropdown, DropdownProps, DropdownItem } from "./Dropdown";
|
|
8
|
+
export { Modal } from "./Modal";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to check if the screen is mobile. The default breakpoint is 768px.
|
|
3
|
+
* @param {number=} mobileBreakpoint breakpoint width to check against
|
|
4
|
+
* @returns boolean
|
|
5
|
+
*/
|
|
6
|
+
declare const useIsMobile: (mobileBreakpoint?: number) => boolean;
|
|
7
|
+
export default useIsMobile;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropsOf } from "@emotion/react";
|
|
3
|
+
import { CreateStyledComponent, StyledOptions, FilteringStyledOptions } from "@emotion/styled";
|
|
4
|
+
import { ThemeContextProps } from "../components";
|
|
5
|
+
export type StyledTags = {
|
|
6
|
+
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<{
|
|
7
|
+
theme?: ThemeContextProps;
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
10
|
+
};
|
|
11
|
+
export interface BaseCreateStyled {
|
|
12
|
+
<C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> & string = keyof React.ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
13
|
+
theme?: ThemeContextProps;
|
|
14
|
+
}, {}, {
|
|
15
|
+
ref?: React.Ref<InstanceType<C>>;
|
|
16
|
+
}>;
|
|
17
|
+
<C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
18
|
+
theme?: ThemeContextProps;
|
|
19
|
+
}, {}, {
|
|
20
|
+
ref?: React.Ref<InstanceType<C>>;
|
|
21
|
+
}>;
|
|
22
|
+
<C extends React.ComponentType<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> & string = keyof React.ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
23
|
+
theme?: ThemeContextProps;
|
|
24
|
+
}>;
|
|
25
|
+
<C extends React.ComponentType<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
26
|
+
theme?: ThemeContextProps;
|
|
27
|
+
}>;
|
|
28
|
+
<Tag extends keyof JSX.IntrinsicElements, ForwardedProps extends keyof JSX.IntrinsicElements[Tag] & string = keyof JSX.IntrinsicElements[Tag] & string>(tag: Tag, options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps>): CreateStyledComponent<{
|
|
29
|
+
theme?: ThemeContextProps;
|
|
30
|
+
as?: React.ElementType;
|
|
31
|
+
}, Pick<JSX.IntrinsicElements[Tag], ForwardedProps>>;
|
|
32
|
+
<Tag extends keyof JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<JSX.IntrinsicElements[Tag]>): CreateStyledComponent<{
|
|
33
|
+
theme?: ThemeContextProps;
|
|
34
|
+
as?: React.ElementType;
|
|
35
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
36
|
+
}
|
|
37
|
+
interface CreateStyled extends BaseCreateStyled, StyledTags {
|
|
38
|
+
}
|
|
39
|
+
export declare const styled: CreateStyled;
|
|
40
|
+
export {};
|