@dative-gpi/foundation-shared-components 0.0.33 → 0.0.35
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/composables/useColors.ts +7 -0
- package/models/colors.ts +1 -0
- package/package.json +4 -4
package/composables/useColors.ts
CHANGED
|
@@ -23,6 +23,10 @@ export const useColors = () => {
|
|
|
23
23
|
return base.saturationv(10).value(100);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
const soften = (base: Color): Color => {
|
|
27
|
+
return base.value(Math.min(base.value() + 10, 100));
|
|
28
|
+
};
|
|
29
|
+
|
|
26
30
|
const darken = (base: Color): Color => {
|
|
27
31
|
return base.value(Math.max(base.value() - 15, 0));
|
|
28
32
|
};
|
|
@@ -32,10 +36,12 @@ export const useColors = () => {
|
|
|
32
36
|
|
|
33
37
|
const base = themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
|
|
34
38
|
const light = lighten(base);
|
|
39
|
+
const soft = soften(base);
|
|
35
40
|
const dark = darken(base);
|
|
36
41
|
|
|
37
42
|
return {
|
|
38
43
|
light: light.hex(),
|
|
44
|
+
soft: soft.hex(),
|
|
39
45
|
base: base.hex(),
|
|
40
46
|
dark: dark.hex()
|
|
41
47
|
};
|
|
@@ -73,6 +79,7 @@ export const useColors = () => {
|
|
|
73
79
|
}
|
|
74
80
|
return {
|
|
75
81
|
light: `linear-gradient(90deg, ${variations.map(v => v.light).join(", ")})`,
|
|
82
|
+
soft: `linear-gradient(90deg, ${variations.map(v => v.soft).join(", ")})`,
|
|
76
83
|
base: `linear-gradient(90deg, ${variations.map(v => v.base).join(", ")})`,
|
|
77
84
|
dark: `linear-gradient(90deg, ${variations.map(v => v.dark).join(", ")})`,
|
|
78
85
|
};
|
package/models/colors.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.35",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.35",
|
|
15
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
16
|
"@lexical/clipboard": "^0.12.5",
|
|
17
17
|
"@lexical/history": "^0.12.5",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sass": "^1.69.5",
|
|
33
33
|
"sass-loader": "^13.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "91779c855747711392153c2adc6e6b2bbc982e48"
|
|
36
36
|
}
|