@blockle/blocks-core 0.25.0 → 1.0.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.
|
@@ -963,25 +963,37 @@ export declare const atomicProperties: {
|
|
|
963
963
|
};
|
|
964
964
|
borderRadius: {
|
|
965
965
|
values: {
|
|
966
|
-
|
|
966
|
+
0: {
|
|
967
967
|
defaultClass: string;
|
|
968
968
|
} | {
|
|
969
969
|
defaultClass: string;
|
|
970
970
|
conditions: string[];
|
|
971
971
|
};
|
|
972
|
-
|
|
972
|
+
4: {
|
|
973
973
|
defaultClass: string;
|
|
974
974
|
} | {
|
|
975
975
|
defaultClass: string;
|
|
976
976
|
conditions: string[];
|
|
977
977
|
};
|
|
978
|
-
|
|
978
|
+
1: {
|
|
979
979
|
defaultClass: string;
|
|
980
980
|
} | {
|
|
981
981
|
defaultClass: string;
|
|
982
982
|
conditions: string[];
|
|
983
983
|
};
|
|
984
|
-
|
|
984
|
+
2: {
|
|
985
|
+
defaultClass: string;
|
|
986
|
+
} | {
|
|
987
|
+
defaultClass: string;
|
|
988
|
+
conditions: string[];
|
|
989
|
+
};
|
|
990
|
+
3: {
|
|
991
|
+
defaultClass: string;
|
|
992
|
+
} | {
|
|
993
|
+
defaultClass: string;
|
|
994
|
+
conditions: string[];
|
|
995
|
+
};
|
|
996
|
+
full: {
|
|
985
997
|
defaultClass: string;
|
|
986
998
|
} | {
|
|
987
999
|
defaultClass: string;
|
|
@@ -1683,13 +1695,13 @@ export declare const atomicProperties: {
|
|
|
1683
1695
|
defaultClass: string;
|
|
1684
1696
|
conditions: string[];
|
|
1685
1697
|
};
|
|
1686
|
-
|
|
1698
|
+
xsmall: {
|
|
1687
1699
|
defaultClass: string;
|
|
1688
1700
|
} | {
|
|
1689
1701
|
defaultClass: string;
|
|
1690
1702
|
conditions: string[];
|
|
1691
1703
|
};
|
|
1692
|
-
|
|
1704
|
+
xlarge: {
|
|
1693
1705
|
defaultClass: string;
|
|
1694
1706
|
} | {
|
|
1695
1707
|
defaultClass: string;
|
|
@@ -2269,11 +2281,11 @@ export declare const atomicProperties: {
|
|
|
2269
2281
|
defaultClass: string;
|
|
2270
2282
|
conditions: string[];
|
|
2271
2283
|
};
|
|
2272
|
-
|
|
2284
|
+
xsmall: {
|
|
2273
2285
|
defaultClass: string;
|
|
2274
2286
|
conditions: string[];
|
|
2275
2287
|
};
|
|
2276
|
-
|
|
2288
|
+
xlarge: {
|
|
2277
2289
|
defaultClass: string;
|
|
2278
2290
|
conditions: string[];
|
|
2279
2291
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type FontWeight = 'light' | 'normal' | 'medium' | 'strong' | 'bold';
|
|
2
|
-
type Space =
|
|
2
|
+
type Space = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
3
3
|
type Transition = 'slow' | 'normal' | 'fast';
|
|
4
|
-
type BorderRadius =
|
|
4
|
+
type BorderRadius = 1 | 2 | 3 | 4;
|
|
5
5
|
type BorderWidth = 'thin' | 'thick';
|
|
6
6
|
type BoxShadow = 'small' | 'medium' | 'large';
|
|
7
7
|
type FontSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
package/dist/css/tokens.js
CHANGED
|
@@ -39,7 +39,6 @@ const tokens = {
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
spacing: {
|
|
42
|
-
0: null,
|
|
43
42
|
1: null,
|
|
44
43
|
2: null,
|
|
45
44
|
3: null,
|
|
@@ -56,10 +55,10 @@ const tokens = {
|
|
|
56
55
|
},
|
|
57
56
|
border: {
|
|
58
57
|
radius: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
1: null,
|
|
59
|
+
2: null,
|
|
60
|
+
3: null,
|
|
61
|
+
4: null
|
|
63
62
|
},
|
|
64
63
|
width: {
|
|
65
64
|
thin: null,
|
package/dist/css/vars.css.d.ts
CHANGED
|
@@ -11,10 +11,12 @@ export declare const vars: {
|
|
|
11
11
|
8: `var(--${string})`;
|
|
12
12
|
};
|
|
13
13
|
borderRadius: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
0: `var(--${string})`;
|
|
15
|
+
4: `var(--${string})`;
|
|
16
|
+
1: `var(--${string})`;
|
|
17
|
+
2: `var(--${string})`;
|
|
18
|
+
3: `var(--${string})`;
|
|
19
|
+
full: `var(--${string})`;
|
|
18
20
|
};
|
|
19
21
|
color: {
|
|
20
22
|
white: `var(--${string})`;
|
|
@@ -105,8 +107,8 @@ export declare const vars: {
|
|
|
105
107
|
medium: `var(--${string})`;
|
|
106
108
|
small: `var(--${string})`;
|
|
107
109
|
large: `var(--${string})`;
|
|
108
|
-
xlarge: `var(--${string})`;
|
|
109
110
|
xsmall: `var(--${string})`;
|
|
111
|
+
xlarge: `var(--${string})`;
|
|
110
112
|
};
|
|
111
113
|
fontWeight: {
|
|
112
114
|
light: `var(--${string})`;
|
|
@@ -119,8 +121,8 @@ export declare const vars: {
|
|
|
119
121
|
medium: `var(--${string})`;
|
|
120
122
|
small: `var(--${string})`;
|
|
121
123
|
large: `var(--${string})`;
|
|
122
|
-
xlarge: `var(--${string})`;
|
|
123
124
|
xsmall: `var(--${string})`;
|
|
125
|
+
xlarge: `var(--${string})`;
|
|
124
126
|
};
|
|
125
127
|
transition: {
|
|
126
128
|
normal: `var(--${string})`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeTokens } from '../config/themeTokens.js';
|
|
2
2
|
export declare const makeVanillaTheme: (tokens: ThemeTokens) => {
|
|
3
|
-
space: Record<
|
|
4
|
-
borderRadius: Record<
|
|
3
|
+
space: Record<0 | (4 | 1 | 2 | 3 | 5 | 6 | 7 | 8), string>;
|
|
4
|
+
borderRadius: Record<0 | 4 | 1 | 2 | 3 | "full", string>;
|
|
5
5
|
color: Record<"white" | "black" | "background-100" | "background-200" | "background-300" | "background-400" | "background-500" | "background-600" | "background-700" | "background-800" | "background-900" | "primary-100" | "primary-200" | "primary-300" | "primary-400" | "primary-500" | "primary-600" | "primary-700" | "primary-800" | "primary-900" | "secondary-100" | "secondary-200" | "secondary-300" | "secondary-400" | "secondary-500" | "secondary-600" | "secondary-700" | "secondary-800" | "secondary-900" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "danger-100" | "danger-200" | "danger-300" | "danger-400" | "danger-500" | "danger-600" | "danger-700" | "danger-800" | "danger-900" | "info-100" | "info-200" | "info-300" | "info-400" | "info-500" | "info-600" | "info-700" | "info-800" | "info-900" | "text-100" | "text-200" | "text-300" | "text-400" | "text-500" | "text-600" | "text-700" | "text-800" | "text-900", string>;
|
|
6
6
|
borderWidth: Record<keyof typeof tokens.border.width, string>;
|
|
7
7
|
fontFamily: Record<keyof typeof tokens.typography.fontFamily, string>;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
const ColorDelimiter = "-";
|
|
2
|
+
function addZeroToken(obj) {
|
|
3
|
+
return {
|
|
4
|
+
0: "0px",
|
|
5
|
+
...obj
|
|
6
|
+
};
|
|
7
|
+
}
|
|
1
8
|
const makeVanillaTheme = (tokens) => {
|
|
2
9
|
const color = {};
|
|
3
10
|
for (const [colorName, colorValue] of Object.entries(tokens.color)) {
|
|
@@ -6,12 +13,15 @@ const makeVanillaTheme = (tokens) => {
|
|
|
6
13
|
continue;
|
|
7
14
|
}
|
|
8
15
|
for (const [shade, shadeValue] of Object.entries(colorValue)) {
|
|
9
|
-
color[`${colorName}
|
|
16
|
+
color[`${colorName}${ColorDelimiter}${shade}`] = shadeValue;
|
|
10
17
|
}
|
|
11
18
|
}
|
|
12
19
|
return {
|
|
13
|
-
space: tokens.spacing,
|
|
14
|
-
borderRadius:
|
|
20
|
+
space: addZeroToken(tokens.spacing),
|
|
21
|
+
borderRadius: addZeroToken({
|
|
22
|
+
...tokens.border.radius,
|
|
23
|
+
full: "9999px"
|
|
24
|
+
}),
|
|
15
25
|
color,
|
|
16
26
|
borderWidth: tokens.border.width,
|
|
17
27
|
fontFamily: tokens.typography.fontFamily,
|