jb-core 0.5.0 → 0.6.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/package.json +1 -1
- package/styles/colors.scss +3 -1
- package/theme/colors.ts +26 -0
- package/theme/index.ts +1 -0
package/package.json
CHANGED
package/styles/colors.scss
CHANGED
|
@@ -12,4 +12,6 @@ root{
|
|
|
12
12
|
//and about shade
|
|
13
13
|
--primary-c-100:#44000000;
|
|
14
14
|
// we must have this color but use semantic color name in our code base
|
|
15
|
-
|
|
15
|
+
// we must define contrast text color for success, error, primary, ... most of the are #fff by default but they can be changed in theme
|
|
16
|
+
--success-contrast-text:#fff;
|
|
17
|
+
}
|
package/theme/colors.ts
CHANGED
|
@@ -23,6 +23,32 @@ export function defineColors() {
|
|
|
23
23
|
inherits: true,
|
|
24
24
|
initialValue: "oklch(1 0 0)",
|
|
25
25
|
});
|
|
26
|
+
setColorProperty({
|
|
27
|
+
name: "--jb-green",
|
|
28
|
+
syntax: "<color>",
|
|
29
|
+
inherits: true,
|
|
30
|
+
initialValue: "oklch(0.68 0.1484 162.1)",
|
|
31
|
+
});
|
|
32
|
+
setColorProperty({
|
|
33
|
+
name: "--jb-red",
|
|
34
|
+
syntax: "<color>",
|
|
35
|
+
inherits: true,
|
|
36
|
+
initialValue: "oklch(0.64 0.2485 23.21)",
|
|
37
|
+
});
|
|
38
|
+
setColorProperty({
|
|
39
|
+
name: `--jb-neutral`,
|
|
40
|
+
syntax: "<color>",
|
|
41
|
+
inherits: true,
|
|
42
|
+
initialValue: getNeutralColor(0),
|
|
43
|
+
});
|
|
44
|
+
for(let i=1;i<=10;i++){
|
|
45
|
+
setColorProperty({
|
|
46
|
+
name: `--jb-neutral-${i}`,
|
|
47
|
+
syntax: "<color>",
|
|
48
|
+
inherits: true,
|
|
49
|
+
initialValue: getNeutralColor(i),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
26
52
|
}
|
|
27
53
|
function setColorProperty(value: PropertyDefinition) {
|
|
28
54
|
try {
|
package/theme/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors.js';
|