@rokkit/core 1.0.0-next.78 → 1.0.0-next.79
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 +3 -3
- package/src/utils.js +10 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rokkit/core",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.79",
|
|
4
4
|
"description": "Core components, actions and stores for svelte apps.",
|
|
5
5
|
"author": "Jerry Thomas <me@jerrythomas.name>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"typescript": "^5.3.3",
|
|
23
23
|
"vite": "^5.0.12",
|
|
24
24
|
"vitest": "~1.2.2",
|
|
25
|
-
"shared-config": "1.0.0-next.
|
|
26
|
-
"validators": "1.0.0-next.
|
|
25
|
+
"shared-config": "1.0.0-next.79",
|
|
26
|
+
"validators": "1.0.0-next.79"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src/**/*.js",
|
package/src/utils.js
CHANGED
|
@@ -32,7 +32,7 @@ export function isObject(val) {
|
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
export function shadesOf(name, modifier = 'none') {
|
|
35
|
-
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
|
|
35
|
+
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
|
|
36
36
|
const fn = modifier in modifiers ? modifiers[modifier] : modifiers.none
|
|
37
37
|
|
|
38
38
|
return shades.reduce(
|
|
@@ -42,16 +42,15 @@ export function shadesOf(name, modifier = 'none') {
|
|
|
42
42
|
}),
|
|
43
43
|
{
|
|
44
44
|
DEFAULT: fn(`var(--${name}-500)`),
|
|
45
|
-
inset: fn(`var(--${name}-50)`),
|
|
46
45
|
sunken: fn(`var(--${name}-50)`),
|
|
47
|
-
|
|
48
|
-
base: fn(`var(--${name}-
|
|
49
|
-
subtle: fn(`var(--${name}-
|
|
50
|
-
muted: fn(`var(--${name}-
|
|
51
|
-
raised: fn(`var(--${name}-
|
|
52
|
-
elevated: fn(`var(--${name}-
|
|
53
|
-
floating: fn(`var(--${name}-
|
|
54
|
-
contrast: fn(`var(--${name}-
|
|
46
|
+
inset: fn(`var(--${name}-100)`),
|
|
47
|
+
base: fn(`var(--${name}-200)`),
|
|
48
|
+
subtle: fn(`var(--${name}-300)`),
|
|
49
|
+
muted: fn(`var(--${name}-400)`),
|
|
50
|
+
raised: fn(`var(--${name}-500)`),
|
|
51
|
+
elevated: fn(`var(--${name}-600)`),
|
|
52
|
+
floating: fn(`var(--${name}-700)`),
|
|
53
|
+
contrast: fn(`var(--${name}-800)`)
|
|
55
54
|
}
|
|
56
55
|
)
|
|
57
56
|
}
|
|
@@ -108,10 +107,9 @@ export function scaledPath(size, x) {
|
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
export function themeRules(name = 'rokkit', mapping = defaultThemeMapping, colors = defaultColors) {
|
|
111
|
-
const shades = [
|
|
110
|
+
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
|
|
112
111
|
mapping = { ...defaultThemeMapping, ...mapping }
|
|
113
112
|
const variants = Object.keys(mapping)
|
|
114
|
-
|
|
115
113
|
const rules = variants
|
|
116
114
|
.flatMap((variant) => [
|
|
117
115
|
shades.map((shade) => ({
|