@julien-wiegandt/open-ui 0.3.4 → 0.3.9

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.
@@ -1,6 +1,7 @@
1
1
  import { ColorPalette, Radius, Theme } from './types';
2
2
  export declare const getPalette: (color: string | ColorPalette) => ColorPalette;
3
3
  export declare const createTheme: (props: {
4
+ mode?: "dark" | "light";
4
5
  radius: Radius;
5
6
  primary: string | ColorPalette;
6
7
  secondary?: string | ColorPalette;
@@ -8,5 +9,6 @@ export declare const createTheme: (props: {
8
9
  error?: string | ColorPalette;
9
10
  titleFontFamily?: string;
10
11
  textFontFamily?: string;
12
+ semantic?: Partial<Theme["semantic"]>;
11
13
  components?: Theme["components"];
12
14
  }) => Theme;
@@ -16,9 +16,19 @@ export declare const isColorPalette: (color: string | ColorPalette) => color is
16
16
  type Text = {
17
17
  fontFamily: string;
18
18
  };
19
+ export type SemanticPalette = {
20
+ foreground: string;
21
+ background: string;
22
+ surface: string;
23
+ muted: string;
24
+ border: string;
25
+ shadow: string;
26
+ };
19
27
  export type Theme = {
28
+ mode?: "dark" | "light";
20
29
  radius: Radius;
21
30
  palette: Palette;
31
+ semantic: SemanticPalette;
22
32
  title: Text;
23
33
  text: Text;
24
34
  components?: {
@@ -26,6 +36,7 @@ export type Theme = {
26
36
  checkbox?: Record<string, any>;
27
37
  chip?: Record<string, any>;
28
38
  divider?: Record<string, any>;
39
+ dropdown?: Record<string, any>;
29
40
  flex?: Record<string, any>;
30
41
  image?: Record<string, any>;
31
42
  input?: Record<string, any>;
@@ -21,3 +21,7 @@ export declare function parseColorToRgb(color: string): RGBA;
21
21
  export declare function generateColorPalette(baseColor: string, baseShadeKey?: 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950): {
22
22
  [shade: string]: string;
23
23
  };
24
+ export declare const withOpacity: (color: string, opacity: number) => string;
25
+ export declare const getContrastColor: (bg: string, options?: {
26
+ opacity?: number;
27
+ }) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@julien-wiegandt/open-ui",
3
3
  "private": false,
4
- "version": "0.3.4",
4
+ "version": "0.3.9",
5
5
  "description": "The best open source react UI library",
6
6
  "type": "module",
7
7
  "main": "./dist/open-ui.umd.cjs",