@kwantis-id3/frontend-library 0.6.0 → 0.7.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.
- package/README.md +22 -0
- package/dist/cjs/index.js +49 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Accordion/Accordion.d.ts +19 -0
- package/dist/cjs/types/components/Accordion/AccordionStyled.d.ts +24 -0
- package/dist/cjs/types/components/Accordion/index.d.ts +1 -0
- package/dist/{esm/types/components/button → cjs/types/components/Button}/Button.d.ts +2 -2
- package/dist/cjs/types/components/SelectFilter/MultiSelect.d.ts +18 -0
- package/dist/cjs/types/components/SelectFilter/SingleSelect.d.ts +18 -0
- package/dist/cjs/types/components/SelectFilter/index.d.ts +2 -0
- package/dist/cjs/types/components/ThemeContext/ThemeContext.d.ts +2 -2
- package/dist/cjs/types/components/index.d.ts +3 -1
- package/dist/esm/index.js +49 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +19 -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/{cjs/types/components/button → esm/types/components/Button}/Button.d.ts +2 -2
- package/dist/esm/types/components/SelectFilter/MultiSelect.d.ts +18 -0
- package/dist/esm/types/components/SelectFilter/SingleSelect.d.ts +18 -0
- package/dist/esm/types/components/SelectFilter/index.d.ts +2 -0
- package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +2 -2
- package/dist/esm/types/components/index.d.ts +3 -1
- package/dist/index.d.ts +54 -5
- package/package.json +14 -4
- package/dist/cjs/types/components/accordion/Accordion.d.ts +0 -10
- package/dist/esm/types/components/accordion/Accordion.d.ts +0 -10
- /package/dist/cjs/types/components/{button → Button}/index.d.ts +0 -0
- /package/dist/esm/types/components/{button → Button}/index.d.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import { Interpolation } from "@emotion/styled";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ThemeColors } from "../ThemeContext";
|
|
5
|
+
import { Theme } from "@emotion/react";
|
|
6
|
+
export type AccordionProps = {
|
|
7
|
+
title: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
color?: ThemeColors;
|
|
10
|
+
iconColor?: ThemeColors;
|
|
11
|
+
dividerColor?: ThemeColors;
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
isLazy?: boolean;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
sx?: Interpolation<Theme>;
|
|
18
|
+
};
|
|
19
|
+
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("@emotion/react").Theme | 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("@emotion/react").Theme | 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("@emotion/react").Theme | 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("@emotion/react").Theme | 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";
|
|
@@ -3,7 +3,7 @@ import { ThemeColors } from "../ThemeContext/ThemeContext";
|
|
|
3
3
|
import { Interpolation } from "@emotion/styled";
|
|
4
4
|
import { Theme } from "@emotion/react";
|
|
5
5
|
export type ButtonVariants = "contained" | "outlined" | "text";
|
|
6
|
-
export
|
|
6
|
+
export type ButtonProps = {
|
|
7
7
|
label: string;
|
|
8
8
|
color?: ThemeColors;
|
|
9
9
|
sx?: Interpolation<Theme>;
|
|
@@ -12,5 +12,5 @@ export interface ButtonProps {
|
|
|
12
12
|
htmlClassName?: string;
|
|
13
13
|
htmlId?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
export declare const Button: (props: ButtonProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GroupBase } from "react-select";
|
|
3
|
+
import { ThemeColors } from "../ThemeContext";
|
|
4
|
+
export interface MultiSelectProps<Option, IsMulti extends boolean, Group> {
|
|
5
|
+
options: Option[];
|
|
6
|
+
onChange?: (option: Option[] | null) => void;
|
|
7
|
+
value?: readonly Option[] | null;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isClearable?: boolean;
|
|
11
|
+
isSearchable?: boolean;
|
|
12
|
+
isOptionDisabled?: (option: Option) => boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
color?: ThemeColors;
|
|
15
|
+
htmlId?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const MultiSelect: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: MultiSelectProps<Option, IsMulti, Group>) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GroupBase } from "react-select";
|
|
3
|
+
import { ThemeColors } from "../ThemeContext";
|
|
4
|
+
export interface SingleSelectProps<Option, IsMulti extends boolean, Group> {
|
|
5
|
+
options: Option[];
|
|
6
|
+
onChange?: (option: Option | null) => void;
|
|
7
|
+
value?: Option | null;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isClearable?: boolean;
|
|
11
|
+
isSearchable?: boolean;
|
|
12
|
+
isOptionDisabled?: (option: Option) => boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
color?: ThemeColors;
|
|
15
|
+
htmlId?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const SingleSelect: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SingleSelectProps<Option, IsMulti, Group>) => JSX.Element;
|
|
@@ -12,9 +12,9 @@ export type ThemeColorsObject = {
|
|
|
12
12
|
statusCritical: Color;
|
|
13
13
|
statusNeutral: Color;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type ThemeContextProps = {
|
|
16
16
|
colors: ThemeColorsObject;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
export type ThemeColors = keyof ThemeColorsObject;
|
|
19
19
|
export declare const defaultThemeColors: {
|
|
20
20
|
primary: {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { Button, ButtonProps } from "./
|
|
1
|
+
export { Button, ButtonProps } from "./Button";
|
|
2
2
|
export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
3
|
+
export { Accordion, AccordionProps } from "./Accordion";
|
|
4
|
+
export { SingleSelect, SingleSelectProps, MultiSelect, MultiSelectProps, } from "./SelectFilter";
|