@blockle/blocks 0.2.3 → 0.3.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/dist/index.cjs +134 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +136 -6
- package/dist/momotaro.chunk.d.ts +261 -155
- package/dist/reset.css.cjs +0 -1
- package/dist/reset.css.mjs +0 -1
- package/dist/styles/components/Button/Button.css.cjs +15 -0
- package/dist/styles/components/Button/Button.css.mjs +16 -0
- package/dist/styles/lib/css/atoms/index.cjs +1 -0
- package/dist/styles/lib/css/atoms/index.mjs +1 -0
- package/dist/styles/lib/css/layers/layers.css.cjs +7 -0
- package/dist/styles/lib/css/layers/layers.css.mjs +8 -0
- package/dist/styles/lib/css/reset/reset.css.cjs +0 -36
- package/dist/styles/lib/css/reset/reset.css.mjs +1 -36
- package/dist/styles/lib/css/theme/makeVanillaTheme.cjs +5 -2
- package/dist/styles/lib/css/theme/makeVanillaTheme.mjs +5 -2
- package/dist/styles/lib/css/theme/tokens.cjs +5 -2
- package/dist/styles/lib/css/theme/tokens.mjs +5 -2
- package/dist/styles/themes/momotaro/components/button.css.cjs +85 -25
- package/dist/styles/themes/momotaro/components/button.css.mjs +85 -25
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +26 -0
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +27 -0
- package/dist/styles/themes/momotaro/components/index.cjs +5 -1
- package/dist/styles/themes/momotaro/components/index.mjs +5 -1
- package/dist/styles/themes/momotaro/components/link.css.cjs +47 -0
- package/dist/styles/themes/momotaro/components/link.css.mjs +48 -0
- package/dist/styles/themes/momotaro/components/spinner.css.cjs +44 -0
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +45 -0
- package/dist/styles/themes/momotaro/tokens.cjs +5 -2
- package/dist/styles/themes/momotaro/tokens.mjs +5 -2
- package/package.json +31 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
|
|
4
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
5
|
+
setFileScope("src/themes/momotaro/components/link.css.ts?used", "blocks");
|
|
6
|
+
const link = makeComponentTheme({
|
|
7
|
+
type: "link",
|
|
8
|
+
base: style({
|
|
9
|
+
outline: "none",
|
|
10
|
+
border: "none",
|
|
11
|
+
textDecoration: "none",
|
|
12
|
+
background: "transparent",
|
|
13
|
+
":hover": {
|
|
14
|
+
textDecoration: "underline"
|
|
15
|
+
},
|
|
16
|
+
":focus-visible": {
|
|
17
|
+
textDecoration: "underline"
|
|
18
|
+
},
|
|
19
|
+
cursor: "pointer"
|
|
20
|
+
}, "link_base"),
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
inherit: style({
|
|
24
|
+
color: "inherit",
|
|
25
|
+
fontWeight: "inherit"
|
|
26
|
+
}, "link_variants_variant_inherit"),
|
|
27
|
+
primary: atoms({
|
|
28
|
+
color: "primary",
|
|
29
|
+
fontWeight: "medium"
|
|
30
|
+
}),
|
|
31
|
+
secondary: atoms({
|
|
32
|
+
color: "secondary",
|
|
33
|
+
fontWeight: "medium"
|
|
34
|
+
})
|
|
35
|
+
},
|
|
36
|
+
underline: style({
|
|
37
|
+
textDecoration: "underline"
|
|
38
|
+
}, "link_variants_underline")
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "primary",
|
|
42
|
+
underline: true
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
endFileScope();
|
|
46
|
+
export {
|
|
47
|
+
link
|
|
48
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_css_theme_makeComponentTheme_cjs = require("../../../lib/css/theme/makeComponentTheme.cjs");
|
|
5
|
+
fileScope.setFileScope("src/themes/momotaro/components/spinner.css.ts?used", "blocks");
|
|
6
|
+
const spinAnimation = css.keyframes({
|
|
7
|
+
"0%": {
|
|
8
|
+
transform: "rotate(0deg)"
|
|
9
|
+
},
|
|
10
|
+
"100%": {
|
|
11
|
+
transform: "rotate(360deg)"
|
|
12
|
+
}
|
|
13
|
+
}, "spinAnimation");
|
|
14
|
+
const spinner = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme({
|
|
15
|
+
type: "spinner",
|
|
16
|
+
base: css.style({
|
|
17
|
+
aspectRatio: "1 / 1",
|
|
18
|
+
overflow: "hidden",
|
|
19
|
+
borderRadius: "50%",
|
|
20
|
+
borderWidth: "3px",
|
|
21
|
+
borderStyle: "solid",
|
|
22
|
+
borderColor: "currentColor transparent currentColor transparent",
|
|
23
|
+
animation: `${spinAnimation} 1.2s linear infinite`
|
|
24
|
+
}, "spinner_base"),
|
|
25
|
+
variants: {
|
|
26
|
+
// note: colors are handled by atoms
|
|
27
|
+
size: {
|
|
28
|
+
small: css.style({
|
|
29
|
+
width: 16
|
|
30
|
+
}, "spinner_variants_size_small"),
|
|
31
|
+
medium: css.style({
|
|
32
|
+
width: 24
|
|
33
|
+
}, "spinner_variants_size_medium"),
|
|
34
|
+
large: css.style({
|
|
35
|
+
width: 32
|
|
36
|
+
}, "spinner_variants_size_large")
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "small"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
fileScope.endFileScope();
|
|
44
|
+
exports.spinner = spinner;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { keyframes, style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
|
|
4
|
+
setFileScope("src/themes/momotaro/components/spinner.css.ts?used", "blocks");
|
|
5
|
+
const spinAnimation = keyframes({
|
|
6
|
+
"0%": {
|
|
7
|
+
transform: "rotate(0deg)"
|
|
8
|
+
},
|
|
9
|
+
"100%": {
|
|
10
|
+
transform: "rotate(360deg)"
|
|
11
|
+
}
|
|
12
|
+
}, "spinAnimation");
|
|
13
|
+
const spinner = makeComponentTheme({
|
|
14
|
+
type: "spinner",
|
|
15
|
+
base: style({
|
|
16
|
+
aspectRatio: "1 / 1",
|
|
17
|
+
overflow: "hidden",
|
|
18
|
+
borderRadius: "50%",
|
|
19
|
+
borderWidth: "3px",
|
|
20
|
+
borderStyle: "solid",
|
|
21
|
+
borderColor: "currentColor transparent currentColor transparent",
|
|
22
|
+
animation: `${spinAnimation} 1.2s linear infinite`
|
|
23
|
+
}, "spinner_base"),
|
|
24
|
+
variants: {
|
|
25
|
+
// note: colors are handled by atoms
|
|
26
|
+
size: {
|
|
27
|
+
small: style({
|
|
28
|
+
width: 16
|
|
29
|
+
}, "spinner_variants_size_small"),
|
|
30
|
+
medium: style({
|
|
31
|
+
width: 24
|
|
32
|
+
}, "spinner_variants_size_medium"),
|
|
33
|
+
large: style({
|
|
34
|
+
width: 32
|
|
35
|
+
}, "spinner_variants_size_large")
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
size: "small"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
endFileScope();
|
|
43
|
+
export {
|
|
44
|
+
spinner
|
|
45
|
+
};
|
|
@@ -26,7 +26,7 @@ const tokens = {
|
|
|
26
26
|
text: "#2D3142",
|
|
27
27
|
textLight: "#9C9EB9",
|
|
28
28
|
textDark: "#4C5980",
|
|
29
|
-
|
|
29
|
+
danger: "#FF9B90",
|
|
30
30
|
link: "#7265E3"
|
|
31
31
|
},
|
|
32
32
|
shadow: {
|
|
@@ -34,7 +34,10 @@ const tokens = {
|
|
|
34
34
|
medium: "0px 8px 16px rgba(0, 0, 0, 0.08)",
|
|
35
35
|
large: "0px 16px 24px rgba(0, 0, 0, 0.08)"
|
|
36
36
|
},
|
|
37
|
-
|
|
37
|
+
focus: {
|
|
38
|
+
boxShadow: "0 0 4px 2px #AF8EFF"
|
|
39
|
+
},
|
|
40
|
+
spacing: {
|
|
38
41
|
none: "0px",
|
|
39
42
|
gutter: "28px",
|
|
40
43
|
xsmall: "4px",
|
|
@@ -25,7 +25,7 @@ const tokens = {
|
|
|
25
25
|
text: "#2D3142",
|
|
26
26
|
textLight: "#9C9EB9",
|
|
27
27
|
textDark: "#4C5980",
|
|
28
|
-
|
|
28
|
+
danger: "#FF9B90",
|
|
29
29
|
link: "#7265E3"
|
|
30
30
|
},
|
|
31
31
|
shadow: {
|
|
@@ -33,7 +33,10 @@ const tokens = {
|
|
|
33
33
|
medium: "0px 8px 16px rgba(0, 0, 0, 0.08)",
|
|
34
34
|
large: "0px 16px 24px rgba(0, 0, 0, 0.08)"
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
focus: {
|
|
37
|
+
boxShadow: "0 0 4px 2px #AF8EFF"
|
|
38
|
+
},
|
|
39
|
+
spacing: {
|
|
37
40
|
none: "0px",
|
|
38
41
|
gutter: "28px",
|
|
39
42
|
xsmall: "4px",
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Blocks design system",
|
|
5
5
|
"repository": "git@github.com:Blockle/blocks.git",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Niek Saarberg <n.saarberg@gmail.com>",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"./src/lib/theme/globalTheme.ts",
|
|
10
|
+
"dist/side-effects/**"
|
|
11
|
+
],
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
10
14
|
"types": "./dist/index.d.ts",
|
|
@@ -32,10 +36,18 @@
|
|
|
32
36
|
"themes/momotaro"
|
|
33
37
|
],
|
|
34
38
|
"scripts": {
|
|
35
|
-
"build": "crackle package",
|
|
39
|
+
"build": "crackle package && node ./temp-use-client-fix.js",
|
|
40
|
+
"build-storybook": "storybook build",
|
|
41
|
+
"coverage": "vitest run --coverage",
|
|
36
42
|
"fix": "crackle fix",
|
|
43
|
+
"lint": "eslint . --resolve-plugins-relative-to /Users/niek/Projects/blockle/blocks/",
|
|
44
|
+
"storybook": "storybook dev -p 6006 --no-open",
|
|
45
|
+
"test": "vitest",
|
|
37
46
|
"ts": "tsc --noemit --project ./tsconfig.json"
|
|
38
47
|
},
|
|
48
|
+
"resolutions": {
|
|
49
|
+
"string-width": "^4.2.2"
|
|
50
|
+
},
|
|
39
51
|
"dependencies": {
|
|
40
52
|
"@radix-ui/react-polymorphic": "^0.0.14",
|
|
41
53
|
"@vanilla-extract/css": "^1.13.0",
|
|
@@ -47,10 +59,24 @@
|
|
|
47
59
|
"devDependencies": {
|
|
48
60
|
"@crackle/cli": "^0.12.4",
|
|
49
61
|
"@crackle/core": "^0.28.0",
|
|
62
|
+
"@storybook/addon-a11y": "^7.3.1",
|
|
63
|
+
"@storybook/addon-coverage": "^0.0.9",
|
|
64
|
+
"@storybook/addon-essentials": "^7.3.1",
|
|
65
|
+
"@storybook/addon-interactions": "^7.3.1",
|
|
66
|
+
"@storybook/addon-links": "^7.3.1",
|
|
67
|
+
"@storybook/blocks": "^7.3.1",
|
|
68
|
+
"@storybook/jest": "^0.2.0",
|
|
69
|
+
"@storybook/react": "^7.3.1",
|
|
70
|
+
"@storybook/react-vite": "^7.3.1",
|
|
71
|
+
"@storybook/testing-library": "^0.2.0",
|
|
72
|
+
"@testing-library/jest-dom": "^6.1.3",
|
|
73
|
+
"@testing-library/react": "^14.0.0",
|
|
50
74
|
"@types/react": "^18.2.25",
|
|
51
75
|
"@types/react-dom": "^18.2.10",
|
|
52
76
|
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
|
53
77
|
"@typescript-eslint/parser": "^6.7.4",
|
|
78
|
+
"@vanilla-extract/vite-plugin": "^3.8.2",
|
|
79
|
+
"@vitest/coverage-v8": "^0.34.6",
|
|
54
80
|
"cross-env": "^7.0.3",
|
|
55
81
|
"eslint": "^8.50.0",
|
|
56
82
|
"eslint-config-prettier": "^9.0.0",
|
|
@@ -60,7 +86,10 @@
|
|
|
60
86
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
61
87
|
"eslint-plugin-storybook": "^0.6.14",
|
|
62
88
|
"eslint-plugin-unicorn": "^48.0.1",
|
|
89
|
+
"jsdom": "^22.1.0",
|
|
63
90
|
"prettier": "^3.0.3",
|
|
91
|
+
"prop-types": "^15.8.1",
|
|
92
|
+
"storybook": "^7.3.1",
|
|
64
93
|
"typescript": "^5.2.2",
|
|
65
94
|
"vitest": "^0.34.6"
|
|
66
95
|
},
|