@firecms/ui 3.0.0-alpha.51 → 3.0.0-alpha.52

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.
@@ -0,0 +1,3 @@
1
+ import { ChipColorKey, ChipColorScheme } from "../components";
2
+ export declare const CHIP_COLORS: Record<string, ChipColorScheme>;
3
+ export declare function getColorSchemeForKey(key: ChipColorKey): ChipColorScheme;
@@ -1,4 +1,5 @@
1
1
  export * from "./cn";
2
2
  export * from "./debounce";
3
+ export * from "./chip_colors";
3
4
  export * from "./useInjectStyles";
4
5
  export * from "./useOutsideAlerter";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firecms/ui",
3
- "version": "3.0.0-alpha.51",
3
+ "version": "3.0.0-alpha.52",
4
4
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
5
5
  "funding": {
6
6
  "url": "https://github.com/sponsors/firecmsco"
@@ -115,7 +115,7 @@
115
115
  "dist",
116
116
  "src"
117
117
  ],
118
- "gitHead": "d47d8dad9356b48398b65559b7a59926f3d50373",
118
+ "gitHead": "347fb05aab3d2c4399ba9370f10c6d142c4721f6",
119
119
  "publishConfig": {
120
120
  "access": "public"
121
121
  }
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { cn } from "../util";
2
+ import { CHIP_COLORS, cn, getColorSchemeForKey } from "../util";
3
3
 
4
4
  export type ChipColorScheme = {
5
5
  color: string;
@@ -25,52 +25,6 @@ const sizeClassNames = {
25
25
  medium: "px-4 py-1.5 text-sm"
26
26
  }
27
27
 
28
- export const CHIP_COLORS: Record<string, ChipColorScheme> = {
29
- blueLighter: { color: "#cfdfff", text: "#102046" },
30
- cyanLighter: { color: "#d0f0fd", text: "#04283f" },
31
- tealLighter: { color: "#c2f5e9", text: "#012524" },
32
- greenLighter: { color: "#d1f7c4", text: "#0b1d05" },
33
- yellowLighter: { color: "#ffeab6", text: "#3b2501" },
34
- orangeLighter: { color: "#fee2d5", text: "#6b2613" },
35
- redLighter: { color: "#ffdce5", text: "#4c0c1c" },
36
- pinkLighter: { color: "#ffdaf6", text: "#400832" },
37
- purpleLighter: { color: "#ede2fe", text: "#280b42" },
38
- grayLighter: { color: "#eee", text: "#040404" },
39
-
40
- blueLight: { color: "#9cc7ff", text: "#102046" },
41
- cyanLight: { color: "#77d1f3", text: "#04283f" },
42
- tealLight: { color: "#72ddc3", text: "#012524" },
43
- greenLight: { color: "#93e088", text: "#0b1d05" },
44
- yellowLight: { color: "#ffd66e", text: "#3b2501" },
45
- orangeLight: { color: "#ffa981", text: "#6b2613" },
46
- redLight: { color: "#ff9eb7", text: "#4c0c1c" },
47
- pinkLight: { color: "#f99de2", text: "#400832" },
48
- purpleLight: { color: "#cdb0ff", text: "#280b42" },
49
- grayLight: { color: "#ccc", text: "#040404" },
50
-
51
- blueDark: { color: "#2d7ff9", text: "#fff" },
52
- cyanDark: { color: "#18bfff", text: "#fff" },
53
- tealDark: { color: "#20d9d2", text: "#fff" },
54
- greenDark: { color: "#20c933", text: "#fff" },
55
- yellowDark: { color: "#fcb400", text: "#fff" },
56
- orangeDark: { color: "#ff6f2c", text: "#fff" },
57
- redDark: { color: "#f82b60", text: "#fff" },
58
- pinkDark: { color: "#ff08c2", text: "#fff" },
59
- purpleDark: { color: "#8b46ff", text: "#fff" },
60
- grayDark: { color: "#666", text: "#fff" },
61
-
62
- blueDarker: { color: "#2750ae", text: "#cfdfff" },
63
- cyanDarker: { color: "#0b76b7", text: "#d0f0fd" },
64
- tealDarker: { color: "#06a09b", text: "#daf3e9" },
65
- greenDarker: { color: "#338a17", text: "#d1f7c4" },
66
- yellowDarker: { color: "#b87503", text: "#ffeab6" },
67
- orangeDarker: { color: "#d74d26", text: "#fee2d5" },
68
- redDarker: { color: "#ba1e45", text: "#ffdce5" },
69
- pinkDarker: { color: "#b2158b", text: "#ffdaf6" },
70
- purpleDarker: { color: "#6b1cb0", text: "#ede2fe" },
71
- grayDarker: { color: "#444", text: "#eee" }
72
- };
73
-
74
28
  /**
75
29
  * @group Preview components
76
30
  */
@@ -106,7 +60,3 @@ export function Chip({
106
60
  </div>
107
61
  );
108
62
  }
109
-
110
- export function getColorSchemeForKey(key: ChipColorKey): ChipColorScheme {
111
- return CHIP_COLORS[key];
112
- }
@@ -0,0 +1,51 @@
1
+ import { ChipColorKey, ChipColorScheme } from "../components";
2
+
3
+ export const CHIP_COLORS: Record<string, ChipColorScheme> = {
4
+ blueLighter: { color: "#cfdfff", text: "#102046" },
5
+ cyanLighter: { color: "#d0f0fd", text: "#04283f" },
6
+ tealLighter: { color: "#c2f5e9", text: "#012524" },
7
+ greenLighter: { color: "#d1f7c4", text: "#0b1d05" },
8
+ yellowLighter: { color: "#ffeab6", text: "#3b2501" },
9
+ orangeLighter: { color: "#fee2d5", text: "#6b2613" },
10
+ redLighter: { color: "#ffdce5", text: "#4c0c1c" },
11
+ pinkLighter: { color: "#ffdaf6", text: "#400832" },
12
+ purpleLighter: { color: "#ede2fe", text: "#280b42" },
13
+ grayLighter: { color: "#eee", text: "#040404" },
14
+
15
+ blueLight: { color: "#9cc7ff", text: "#102046" },
16
+ cyanLight: { color: "#77d1f3", text: "#04283f" },
17
+ tealLight: { color: "#72ddc3", text: "#012524" },
18
+ greenLight: { color: "#93e088", text: "#0b1d05" },
19
+ yellowLight: { color: "#ffd66e", text: "#3b2501" },
20
+ orangeLight: { color: "#ffa981", text: "#6b2613" },
21
+ redLight: { color: "#ff9eb7", text: "#4c0c1c" },
22
+ pinkLight: { color: "#f99de2", text: "#400832" },
23
+ purpleLight: { color: "#cdb0ff", text: "#280b42" },
24
+ grayLight: { color: "#ccc", text: "#040404" },
25
+
26
+ blueDark: { color: "#2d7ff9", text: "#fff" },
27
+ cyanDark: { color: "#18bfff", text: "#fff" },
28
+ tealDark: { color: "#20d9d2", text: "#fff" },
29
+ greenDark: { color: "#20c933", text: "#fff" },
30
+ yellowDark: { color: "#fcb400", text: "#fff" },
31
+ orangeDark: { color: "#ff6f2c", text: "#fff" },
32
+ redDark: { color: "#f82b60", text: "#fff" },
33
+ pinkDark: { color: "#ff08c2", text: "#fff" },
34
+ purpleDark: { color: "#8b46ff", text: "#fff" },
35
+ grayDark: { color: "#666", text: "#fff" },
36
+
37
+ blueDarker: { color: "#2750ae", text: "#cfdfff" },
38
+ cyanDarker: { color: "#0b76b7", text: "#d0f0fd" },
39
+ tealDarker: { color: "#06a09b", text: "#daf3e9" },
40
+ greenDarker: { color: "#338a17", text: "#d1f7c4" },
41
+ yellowDarker: { color: "#b87503", text: "#ffeab6" },
42
+ orangeDarker: { color: "#d74d26", text: "#fee2d5" },
43
+ redDarker: { color: "#ba1e45", text: "#ffdce5" },
44
+ pinkDarker: { color: "#b2158b", text: "#ffdaf6" },
45
+ purpleDarker: { color: "#6b1cb0", text: "#ede2fe" },
46
+ grayDarker: { color: "#444", text: "#eee" }
47
+ };
48
+
49
+ export function getColorSchemeForKey(key: ChipColorKey): ChipColorScheme {
50
+ return CHIP_COLORS[key];
51
+ }
package/src/util/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./cn";
2
2
  export * from "./debounce";
3
+ export * from "./chip_colors";
3
4
  export * from "./useInjectStyles";
4
5
  export * from "./useOutsideAlerter";