@kwantis-id3/frontend-library 0.4.1 → 0.4.2

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 (33) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/ThemeContext/ThemeContext.d.ts +28 -10
  4. package/dist/cjs/types/components/ThemeContext/index.d.ts +1 -1
  5. package/dist/cjs/types/components/button/Button.d.ts +9 -3
  6. package/dist/cjs/types/components/index.d.ts +1 -1
  7. package/dist/esm/index.js.map +1 -1
  8. package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +28 -10
  9. package/dist/esm/types/components/ThemeContext/index.d.ts +1 -1
  10. package/dist/esm/types/components/button/Button.d.ts +9 -3
  11. package/dist/esm/types/components/index.d.ts +1 -1
  12. package/dist/index.d.ts +19 -13
  13. package/package.json +1 -1
  14. package/dist/cjs/types/jest.config.d.ts +0 -3
  15. package/dist/cjs/types/jest.setup.d.ts +0 -1
  16. package/dist/cjs/types/src/components/ThemeContext/ThemeContext.d.ts +0 -48
  17. package/dist/cjs/types/src/components/ThemeContext/ThemeContext.test.d.ts +0 -1
  18. package/dist/cjs/types/src/components/ThemeContext/index.d.ts +0 -1
  19. package/dist/cjs/types/src/components/button/Button.d.ts +0 -17
  20. package/dist/cjs/types/src/components/button/Button.test.d.ts +0 -1
  21. package/dist/cjs/types/src/components/button/index.d.ts +0 -1
  22. package/dist/cjs/types/src/components/index.d.ts +0 -2
  23. package/dist/cjs/types/src/index.d.ts +0 -1
  24. package/dist/esm/types/jest.config.d.ts +0 -3
  25. package/dist/esm/types/jest.setup.d.ts +0 -1
  26. package/dist/esm/types/src/components/ThemeContext/ThemeContext.d.ts +0 -48
  27. package/dist/esm/types/src/components/ThemeContext/ThemeContext.test.d.ts +0 -1
  28. package/dist/esm/types/src/components/ThemeContext/index.d.ts +0 -1
  29. package/dist/esm/types/src/components/button/Button.d.ts +0 -17
  30. package/dist/esm/types/src/components/button/Button.test.d.ts +0 -1
  31. package/dist/esm/types/src/components/button/index.d.ts +0 -1
  32. package/dist/esm/types/src/components/index.d.ts +0 -2
  33. package/dist/esm/types/src/index.d.ts +0 -1
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export type KwantisColorsObject = {
2
+ export type ThemeColorsObject = {
3
3
  primary: string;
4
4
  secondary: string;
5
5
  tertiary: string;
@@ -8,7 +8,7 @@ export type KwantisColorsObject = {
8
8
  statusCritical: string;
9
9
  statusNeutral: string;
10
10
  };
11
- export type KwantisTextColorsObject = {
11
+ export type ThemeTextColorsObject = {
12
12
  primary: string;
13
13
  secondary: string;
14
14
  tertiary: string;
@@ -17,14 +17,32 @@ export type KwantisTextColorsObject = {
17
17
  statusCritical: string;
18
18
  statusNeutral: string;
19
19
  };
20
- export type KwantisColors = keyof KwantisColorsObject;
21
- export type KwantisTextColors = keyof KwantisTextColorsObject;
22
- interface KwantisThemeContextProps {
23
- colors: KwantisColorsObject;
24
- textColors: KwantisTextColorsObject;
20
+ interface ThemeContextProps {
21
+ colors: ThemeColorsObject;
22
+ textColors: ThemeTextColorsObject;
25
23
  }
26
- export declare const KwantisThemeContextProvider: (props: React.PropsWithChildren<{
27
- theme?: KwantisThemeContextProps;
24
+ export type ThemeColors = keyof ThemeColorsObject;
25
+ export type ThemeTextColors = keyof ThemeTextColorsObject;
26
+ export declare const defaultThemeColors: {
27
+ primary: string;
28
+ secondary: string;
29
+ tertiary: string;
30
+ statusOk: string;
31
+ statusWarning: string;
32
+ statusCritical: string;
33
+ statusNeutral: string;
34
+ };
35
+ export declare const defaultThemeTextColors: {
36
+ primary: string;
37
+ secondary: string;
38
+ tertiary: string;
39
+ statusOk: string;
40
+ statusWarning: string;
41
+ statusCritical: string;
42
+ statusNeutral: string;
43
+ };
44
+ export declare const ThemeContextProvider: (props: React.PropsWithChildren<{
45
+ theme?: ThemeContextProps;
28
46
  }>) => JSX.Element;
29
- export declare const useKwantisThemeContext: () => KwantisThemeContextProps;
47
+ export declare const useThemeContext: () => ThemeContextProps;
30
48
  export {};
@@ -1 +1 @@
1
- export { KwantisColors, KwantisColorsObject, KwantisThemeContextProvider, useKwantisThemeContext, } from "./ThemeContext";
1
+ export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
@@ -1,11 +1,17 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import { KwantisColors, KwantisTextColors } from "../ThemeContext/ThemeContext";
2
+ import { ThemeColors, ThemeTextColors } from "../ThemeContext/ThemeContext";
3
3
  import { Interpolation } from "@emotion/styled";
4
4
  import { Theme } from "@emotion/react";
5
+ export type ButtonVariants = "contained" | "outlined" | "text";
5
6
  export interface ButtonProps {
6
7
  label: string;
7
- color?: KwantisColors;
8
- textColor?: KwantisTextColors;
8
+ color?: ThemeColors;
9
+ textColor?: ThemeTextColors;
9
10
  sx?: Interpolation<Theme>;
11
+ variant?: ButtonVariants;
12
+ onClick?: () => void;
13
+ htmlClassName?: string;
14
+ htmlId?: string;
15
+ disabled?: boolean;
10
16
  }
11
17
  export declare const Button: (props: ButtonProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { Button, ButtonProps } from "./button";
2
- export { KwantisColors, KwantisColorsObject, KwantisThemeContextProvider, useKwantisThemeContext, } from "./ThemeContext";
2
+ export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Interpolation } from '@emotion/styled';
4
4
  import { Theme } from '@emotion/react';
5
5
 
6
- type KwantisColorsObject = {
6
+ type ThemeColorsObject = {
7
7
  primary: string;
8
8
  secondary: string;
9
9
  tertiary: string;
@@ -12,7 +12,7 @@ type KwantisColorsObject = {
12
12
  statusCritical: string;
13
13
  statusNeutral: string;
14
14
  };
15
- type KwantisTextColorsObject = {
15
+ type ThemeTextColorsObject = {
16
16
  primary: string;
17
17
  secondary: string;
18
18
  tertiary: string;
@@ -21,23 +21,29 @@ type KwantisTextColorsObject = {
21
21
  statusCritical: string;
22
22
  statusNeutral: string;
23
23
  };
24
- type KwantisColors = keyof KwantisColorsObject;
25
- type KwantisTextColors = keyof KwantisTextColorsObject;
26
- interface KwantisThemeContextProps {
27
- colors: KwantisColorsObject;
28
- textColors: KwantisTextColorsObject;
24
+ interface ThemeContextProps {
25
+ colors: ThemeColorsObject;
26
+ textColors: ThemeTextColorsObject;
29
27
  }
30
- declare const KwantisThemeContextProvider: (props: React.PropsWithChildren<{
31
- theme?: KwantisThemeContextProps;
28
+ type ThemeColors = keyof ThemeColorsObject;
29
+ type ThemeTextColors = keyof ThemeTextColorsObject;
30
+ declare const ThemeContextProvider: (props: React.PropsWithChildren<{
31
+ theme?: ThemeContextProps;
32
32
  }>) => JSX.Element;
33
- declare const useKwantisThemeContext: () => KwantisThemeContextProps;
33
+ declare const useThemeContext: () => ThemeContextProps;
34
34
 
35
+ type ButtonVariants = "contained" | "outlined" | "text";
35
36
  interface ButtonProps {
36
37
  label: string;
37
- color?: KwantisColors;
38
- textColor?: KwantisTextColors;
38
+ color?: ThemeColors;
39
+ textColor?: ThemeTextColors;
39
40
  sx?: Interpolation<Theme>;
41
+ variant?: ButtonVariants;
42
+ onClick?: () => void;
43
+ htmlClassName?: string;
44
+ htmlId?: string;
45
+ disabled?: boolean;
40
46
  }
41
47
  declare const Button: (props: ButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
42
48
 
43
- export { Button, ButtonProps, KwantisColors, KwantisColorsObject, KwantisThemeContextProvider, useKwantisThemeContext };
49
+ export { Button, ButtonProps, ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwantis-id3/frontend-library",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Kwantis frontend components collection",
5
5
  "author": "kwantis",
6
6
  "license": "apache-2.0",
@@ -1,3 +0,0 @@
1
- import type { Config } from "jest";
2
- declare const config: Config;
3
- export default config;
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- export type ThemeColorsObject = {
3
- primary: string;
4
- secondary: string;
5
- tertiary: string;
6
- statusOk: string;
7
- statusWarning: string;
8
- statusCritical: string;
9
- statusNeutral: string;
10
- };
11
- export type ThemeTextColorsObject = {
12
- primary: string;
13
- secondary: string;
14
- tertiary: string;
15
- statusOk: string;
16
- statusWarning: string;
17
- statusCritical: string;
18
- statusNeutral: string;
19
- };
20
- interface ThemeContextProps {
21
- colors: ThemeColorsObject;
22
- textColors: ThemeTextColorsObject;
23
- }
24
- export type ThemeColors = keyof ThemeColorsObject;
25
- export type ThemeTextColors = keyof ThemeTextColorsObject;
26
- export declare const defaultThemeColors: {
27
- primary: string;
28
- secondary: string;
29
- tertiary: string;
30
- statusOk: string;
31
- statusWarning: string;
32
- statusCritical: string;
33
- statusNeutral: string;
34
- };
35
- export declare const defaultThemeTextColors: {
36
- primary: string;
37
- secondary: string;
38
- tertiary: string;
39
- statusOk: string;
40
- statusWarning: string;
41
- statusCritical: string;
42
- statusNeutral: string;
43
- };
44
- export declare const ThemeContextProvider: (props: React.PropsWithChildren<{
45
- theme?: ThemeContextProps;
46
- }>) => JSX.Element;
47
- export declare const useThemeContext: () => ThemeContextProps;
48
- export {};
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1 +0,0 @@
1
- export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
@@ -1,17 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import { ThemeColors, ThemeTextColors } from "../ThemeContext/ThemeContext";
3
- import { Interpolation } from "@emotion/styled";
4
- import { Theme } from "@emotion/react";
5
- export type ButtonVariants = "contained" | "outlined" | "text";
6
- export interface ButtonProps {
7
- label: string;
8
- color?: ThemeColors;
9
- textColor?: ThemeTextColors;
10
- sx?: Interpolation<Theme>;
11
- variant?: ButtonVariants;
12
- onClick?: () => void;
13
- htmlClassName?: string;
14
- htmlId?: string;
15
- disabled?: boolean;
16
- }
17
- export declare const Button: (props: ButtonProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1 +0,0 @@
1
- export { Button, ButtonProps } from "./Button";
@@ -1,2 +0,0 @@
1
- export { Button, ButtonProps } from "./button";
2
- export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
@@ -1 +0,0 @@
1
- export * from "./components";
@@ -1,3 +0,0 @@
1
- import type { Config } from "jest";
2
- declare const config: Config;
3
- export default config;
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- export type ThemeColorsObject = {
3
- primary: string;
4
- secondary: string;
5
- tertiary: string;
6
- statusOk: string;
7
- statusWarning: string;
8
- statusCritical: string;
9
- statusNeutral: string;
10
- };
11
- export type ThemeTextColorsObject = {
12
- primary: string;
13
- secondary: string;
14
- tertiary: string;
15
- statusOk: string;
16
- statusWarning: string;
17
- statusCritical: string;
18
- statusNeutral: string;
19
- };
20
- interface ThemeContextProps {
21
- colors: ThemeColorsObject;
22
- textColors: ThemeTextColorsObject;
23
- }
24
- export type ThemeColors = keyof ThemeColorsObject;
25
- export type ThemeTextColors = keyof ThemeTextColorsObject;
26
- export declare const defaultThemeColors: {
27
- primary: string;
28
- secondary: string;
29
- tertiary: string;
30
- statusOk: string;
31
- statusWarning: string;
32
- statusCritical: string;
33
- statusNeutral: string;
34
- };
35
- export declare const defaultThemeTextColors: {
36
- primary: string;
37
- secondary: string;
38
- tertiary: string;
39
- statusOk: string;
40
- statusWarning: string;
41
- statusCritical: string;
42
- statusNeutral: string;
43
- };
44
- export declare const ThemeContextProvider: (props: React.PropsWithChildren<{
45
- theme?: ThemeContextProps;
46
- }>) => JSX.Element;
47
- export declare const useThemeContext: () => ThemeContextProps;
48
- export {};
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1 +0,0 @@
1
- export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
@@ -1,17 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import { ThemeColors, ThemeTextColors } from "../ThemeContext/ThemeContext";
3
- import { Interpolation } from "@emotion/styled";
4
- import { Theme } from "@emotion/react";
5
- export type ButtonVariants = "contained" | "outlined" | "text";
6
- export interface ButtonProps {
7
- label: string;
8
- color?: ThemeColors;
9
- textColor?: ThemeTextColors;
10
- sx?: Interpolation<Theme>;
11
- variant?: ButtonVariants;
12
- onClick?: () => void;
13
- htmlClassName?: string;
14
- htmlId?: string;
15
- disabled?: boolean;
16
- }
17
- export declare const Button: (props: ButtonProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
@@ -1 +0,0 @@
1
- export { Button, ButtonProps } from "./Button";
@@ -1,2 +0,0 @@
1
- export { Button, ButtonProps } from "./button";
2
- export { ThemeColors, ThemeColorsObject, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
@@ -1 +0,0 @@
1
- export * from "./components";