@blockle/blocks 0.2.2 → 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/README.md +1 -1
- 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 +516 -0
- package/dist/reset.css.cjs +0 -1
- package/dist/reset.css.d.ts +1 -408
- 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/makeComponentTheme.cjs +3 -0
- package/dist/styles/lib/css/theme/makeComponentTheme.mjs +4 -0
- package/dist/styles/lib/css/theme/makeTheme.cjs +3 -2
- package/dist/styles/lib/css/theme/makeTheme.mjs +3 -2
- 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 +106 -0
- package/dist/styles/themes/momotaro/components/button.css.mjs +107 -0
- 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 +10 -0
- package/dist/styles/themes/momotaro/components/index.mjs +11 -0
- 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/momotaro.css.cjs +13 -0
- package/dist/styles/themes/momotaro/{momotaroTheme.css.mjs → momotaro.css.mjs} +6 -4
- package/dist/styles/themes/momotaro/tokens.cjs +5 -2
- package/dist/styles/themes/momotaro/tokens.mjs +5 -2
- package/dist/themes/momotaro.cjs +2 -2
- package/dist/themes/momotaro.d.ts +1 -1
- package/dist/themes/momotaro.mjs +2 -2
- package/package.json +49 -20
- package/dist/styles/themes/momotaro/momotaroTheme.css.cjs +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const makeVanillaTheme = (tokens) => {
|
|
2
2
|
return {
|
|
3
|
-
space: tokens.
|
|
3
|
+
space: tokens.spacing,
|
|
4
4
|
borderRadius: tokens.border.radius,
|
|
5
5
|
color: tokens.color,
|
|
6
6
|
borderWidth: tokens.border.width,
|
|
@@ -9,7 +9,10 @@ const makeVanillaTheme = (tokens) => {
|
|
|
9
9
|
fontWeight: tokens.typography.fontWeight,
|
|
10
10
|
lineHeight: tokens.typography.lineHeight,
|
|
11
11
|
transition: tokens.transition,
|
|
12
|
-
shadow: tokens.shadow
|
|
12
|
+
shadow: tokens.shadow,
|
|
13
|
+
focus: {
|
|
14
|
+
boxShadow: tokens.focus.boxShadow
|
|
15
|
+
}
|
|
13
16
|
};
|
|
14
17
|
};
|
|
15
18
|
export {
|
|
@@ -25,7 +25,7 @@ const tokens = {
|
|
|
25
25
|
xlarge: "2rem"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
spacing: {
|
|
29
29
|
none: 0,
|
|
30
30
|
gutter: "1rem",
|
|
31
31
|
xsmall: "0.25rem",
|
|
@@ -57,6 +57,9 @@ const tokens = {
|
|
|
57
57
|
medium: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
|
|
58
58
|
large: "0 4px 8px 0 rgba(0, 0, 0, 0.05)"
|
|
59
59
|
},
|
|
60
|
+
focus: {
|
|
61
|
+
boxShadow: "0 0 0 2px #AF8EFF"
|
|
62
|
+
},
|
|
60
63
|
color: {
|
|
61
64
|
black: "#000000",
|
|
62
65
|
white: "#ffffff",
|
|
@@ -70,7 +73,7 @@ const tokens = {
|
|
|
70
73
|
text: "#000000",
|
|
71
74
|
textLight: "#ffffff",
|
|
72
75
|
textDark: "#aeaeae",
|
|
73
|
-
|
|
76
|
+
danger: "#ff0000",
|
|
74
77
|
link: "#0000ff"
|
|
75
78
|
}
|
|
76
79
|
};
|
|
@@ -24,7 +24,7 @@ const tokens = {
|
|
|
24
24
|
xlarge: "2rem"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
spacing: {
|
|
28
28
|
none: 0,
|
|
29
29
|
gutter: "1rem",
|
|
30
30
|
xsmall: "0.25rem",
|
|
@@ -56,6 +56,9 @@ const tokens = {
|
|
|
56
56
|
medium: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
|
|
57
57
|
large: "0 4px 8px 0 rgba(0, 0, 0, 0.05)"
|
|
58
58
|
},
|
|
59
|
+
focus: {
|
|
60
|
+
boxShadow: "0 0 0 2px #AF8EFF"
|
|
61
|
+
},
|
|
59
62
|
color: {
|
|
60
63
|
black: "#000000",
|
|
61
64
|
white: "#ffffff",
|
|
@@ -69,7 +72,7 @@ const tokens = {
|
|
|
69
72
|
text: "#000000",
|
|
70
73
|
textLight: "#ffffff",
|
|
71
74
|
textDark: "#aeaeae",
|
|
72
|
-
|
|
75
|
+
danger: "#ff0000",
|
|
73
76
|
link: "#0000ff"
|
|
74
77
|
}
|
|
75
78
|
};
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
const styles_lib_css_theme_vars_css_cjs = require("../../../lib/css/theme/vars.css.cjs");
|
|
6
|
+
const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
|
|
7
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
8
|
+
fileScope.setFileScope("src/themes/momotaro/components/button.css.ts?used", "blocks");
|
|
9
|
+
const primaryColor = css.createVar("primaryColor");
|
|
10
|
+
const button = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme({
|
|
11
|
+
type: "button",
|
|
12
|
+
base: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
13
|
+
display: "inline-flex",
|
|
14
|
+
placeItems: "center",
|
|
15
|
+
fontSize: "medium",
|
|
16
|
+
borderRadius: "medium",
|
|
17
|
+
fontWeight: "medium"
|
|
18
|
+
}), styles_themes_momotaro_components_helpers_css_cjs.focusable], "button_base"),
|
|
19
|
+
variants: {
|
|
20
|
+
// ...
|
|
21
|
+
// styleVariants could be used to but lacks correct typings atm
|
|
22
|
+
variant: {
|
|
23
|
+
solid: css.style({
|
|
24
|
+
color: styles_lib_css_theme_vars_css_cjs.vars.color.white,
|
|
25
|
+
backgroundColor: primaryColor,
|
|
26
|
+
border: "none",
|
|
27
|
+
selectors: {
|
|
28
|
+
"&:hover:not(:disabled)": {
|
|
29
|
+
backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryDark
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, "button_variants_variant_solid"),
|
|
33
|
+
outline: css.style({
|
|
34
|
+
color: primaryColor,
|
|
35
|
+
borderWidth: styles_lib_css_theme_vars_css_cjs.vars.borderWidth.small,
|
|
36
|
+
borderStyle: "solid",
|
|
37
|
+
borderColor: primaryColor,
|
|
38
|
+
background: "transparent",
|
|
39
|
+
selectors: {
|
|
40
|
+
"&:hover:not(:disabled)": {
|
|
41
|
+
backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryLight
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, "button_variants_variant_outline"),
|
|
45
|
+
ghost: css.style({
|
|
46
|
+
color: primaryColor,
|
|
47
|
+
background: "transparent",
|
|
48
|
+
selectors: {
|
|
49
|
+
"&:hover:not(:disabled)": {
|
|
50
|
+
backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryLight
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, "button_variants_variant_ghost")
|
|
54
|
+
},
|
|
55
|
+
size: {
|
|
56
|
+
small: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
57
|
+
paddingX: "large"
|
|
58
|
+
}), {
|
|
59
|
+
height: 40
|
|
60
|
+
}], "button_variants_size_small"),
|
|
61
|
+
medium: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
62
|
+
paddingX: "xlarge"
|
|
63
|
+
}), {
|
|
64
|
+
height: 56
|
|
65
|
+
}], "button_variants_size_medium"),
|
|
66
|
+
large: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
67
|
+
paddingX: "xlarge"
|
|
68
|
+
}), {
|
|
69
|
+
height: 72
|
|
70
|
+
}], "button_variants_size_large")
|
|
71
|
+
},
|
|
72
|
+
intent: {
|
|
73
|
+
neutral: css.style({
|
|
74
|
+
vars: {
|
|
75
|
+
[primaryColor]: styles_lib_css_theme_vars_css_cjs.vars.color.primary
|
|
76
|
+
}
|
|
77
|
+
}, "button_variants_intent_neutral"),
|
|
78
|
+
danger: css.style({
|
|
79
|
+
vars: {
|
|
80
|
+
[primaryColor]: styles_lib_css_theme_vars_css_cjs.vars.color.danger
|
|
81
|
+
}
|
|
82
|
+
}, "button_variants_intent_danger")
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
compoundVariants: [
|
|
86
|
+
// Example of compound variants
|
|
87
|
+
// {
|
|
88
|
+
// variants: {
|
|
89
|
+
// intent: 'danger',
|
|
90
|
+
// variant: 'ghost',
|
|
91
|
+
// },
|
|
92
|
+
// style: style({
|
|
93
|
+
// color: vars.color.danger,
|
|
94
|
+
// fontSize: vars.fontSize.small,
|
|
95
|
+
// background: 'red',
|
|
96
|
+
// }),
|
|
97
|
+
// },
|
|
98
|
+
],
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
size: "small",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
intent: "neutral"
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
fileScope.endFileScope();
|
|
106
|
+
exports.button = button;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { createVar, style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
|
|
4
|
+
import { vars } from "../../../lib/css/theme/vars.css.mjs";
|
|
5
|
+
import { focusable } from "./helpers.css.mjs";
|
|
6
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
7
|
+
setFileScope("src/themes/momotaro/components/button.css.ts?used", "blocks");
|
|
8
|
+
const primaryColor = createVar("primaryColor");
|
|
9
|
+
const button = makeComponentTheme({
|
|
10
|
+
type: "button",
|
|
11
|
+
base: style([atoms({
|
|
12
|
+
display: "inline-flex",
|
|
13
|
+
placeItems: "center",
|
|
14
|
+
fontSize: "medium",
|
|
15
|
+
borderRadius: "medium",
|
|
16
|
+
fontWeight: "medium"
|
|
17
|
+
}), focusable], "button_base"),
|
|
18
|
+
variants: {
|
|
19
|
+
// ...
|
|
20
|
+
// styleVariants could be used to but lacks correct typings atm
|
|
21
|
+
variant: {
|
|
22
|
+
solid: style({
|
|
23
|
+
color: vars.color.white,
|
|
24
|
+
backgroundColor: primaryColor,
|
|
25
|
+
border: "none",
|
|
26
|
+
selectors: {
|
|
27
|
+
"&:hover:not(:disabled)": {
|
|
28
|
+
backgroundColor: vars.color.primaryDark
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, "button_variants_variant_solid"),
|
|
32
|
+
outline: style({
|
|
33
|
+
color: primaryColor,
|
|
34
|
+
borderWidth: vars.borderWidth.small,
|
|
35
|
+
borderStyle: "solid",
|
|
36
|
+
borderColor: primaryColor,
|
|
37
|
+
background: "transparent",
|
|
38
|
+
selectors: {
|
|
39
|
+
"&:hover:not(:disabled)": {
|
|
40
|
+
backgroundColor: vars.color.primaryLight
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, "button_variants_variant_outline"),
|
|
44
|
+
ghost: style({
|
|
45
|
+
color: primaryColor,
|
|
46
|
+
background: "transparent",
|
|
47
|
+
selectors: {
|
|
48
|
+
"&:hover:not(:disabled)": {
|
|
49
|
+
backgroundColor: vars.color.primaryLight
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, "button_variants_variant_ghost")
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
small: style([atoms({
|
|
56
|
+
paddingX: "large"
|
|
57
|
+
}), {
|
|
58
|
+
height: 40
|
|
59
|
+
}], "button_variants_size_small"),
|
|
60
|
+
medium: style([atoms({
|
|
61
|
+
paddingX: "xlarge"
|
|
62
|
+
}), {
|
|
63
|
+
height: 56
|
|
64
|
+
}], "button_variants_size_medium"),
|
|
65
|
+
large: style([atoms({
|
|
66
|
+
paddingX: "xlarge"
|
|
67
|
+
}), {
|
|
68
|
+
height: 72
|
|
69
|
+
}], "button_variants_size_large")
|
|
70
|
+
},
|
|
71
|
+
intent: {
|
|
72
|
+
neutral: style({
|
|
73
|
+
vars: {
|
|
74
|
+
[primaryColor]: vars.color.primary
|
|
75
|
+
}
|
|
76
|
+
}, "button_variants_intent_neutral"),
|
|
77
|
+
danger: style({
|
|
78
|
+
vars: {
|
|
79
|
+
[primaryColor]: vars.color.danger
|
|
80
|
+
}
|
|
81
|
+
}, "button_variants_intent_danger")
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
compoundVariants: [
|
|
85
|
+
// Example of compound variants
|
|
86
|
+
// {
|
|
87
|
+
// variants: {
|
|
88
|
+
// intent: 'danger',
|
|
89
|
+
// variant: 'ghost',
|
|
90
|
+
// },
|
|
91
|
+
// style: style({
|
|
92
|
+
// color: vars.color.danger,
|
|
93
|
+
// fontSize: vars.fontSize.small,
|
|
94
|
+
// background: 'red',
|
|
95
|
+
// }),
|
|
96
|
+
// },
|
|
97
|
+
],
|
|
98
|
+
defaultVariants: {
|
|
99
|
+
size: "small",
|
|
100
|
+
variant: "ghost",
|
|
101
|
+
intent: "neutral"
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
endFileScope();
|
|
105
|
+
export {
|
|
106
|
+
button
|
|
107
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_css_theme_vars_css_cjs = require("../../../lib/css/theme/vars.css.cjs");
|
|
5
|
+
fileScope.setFileScope("src/themes/momotaro/components/helpers.css.ts?used", "blocks");
|
|
6
|
+
const focusable = css.style({
|
|
7
|
+
":focus-visible": {
|
|
8
|
+
outline: "2px solid transparent",
|
|
9
|
+
outlineOffset: "2px",
|
|
10
|
+
boxShadow: styles_lib_css_theme_vars_css_cjs.vars.focus.boxShadow,
|
|
11
|
+
transitionDuration: styles_lib_css_theme_vars_css_cjs.vars.transition.fast,
|
|
12
|
+
transitionProperty: "box-shadow"
|
|
13
|
+
},
|
|
14
|
+
":disabled": {
|
|
15
|
+
opacity: 0.5,
|
|
16
|
+
cursor: "auto"
|
|
17
|
+
},
|
|
18
|
+
// TODO This is for buttons?
|
|
19
|
+
selectors: {
|
|
20
|
+
"&:active:not(:disabled)": {
|
|
21
|
+
transform: "scale(0.9)"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, "focusable");
|
|
25
|
+
fileScope.endFileScope();
|
|
26
|
+
exports.focusable = focusable;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { vars } from "../../../lib/css/theme/vars.css.mjs";
|
|
4
|
+
setFileScope("src/themes/momotaro/components/helpers.css.ts?used", "blocks");
|
|
5
|
+
const focusable = style({
|
|
6
|
+
":focus-visible": {
|
|
7
|
+
outline: "2px solid transparent",
|
|
8
|
+
outlineOffset: "2px",
|
|
9
|
+
boxShadow: vars.focus.boxShadow,
|
|
10
|
+
transitionDuration: vars.transition.fast,
|
|
11
|
+
transitionProperty: "box-shadow"
|
|
12
|
+
},
|
|
13
|
+
":disabled": {
|
|
14
|
+
opacity: 0.5,
|
|
15
|
+
cursor: "auto"
|
|
16
|
+
},
|
|
17
|
+
// TODO This is for buttons?
|
|
18
|
+
selectors: {
|
|
19
|
+
"&:active:not(:disabled)": {
|
|
20
|
+
transform: "scale(0.9)"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, "focusable");
|
|
24
|
+
endFileScope();
|
|
25
|
+
export {
|
|
26
|
+
focusable
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const styles_themes_momotaro_components_button_css_cjs = require("./button.css.cjs");
|
|
3
|
+
const styles_themes_momotaro_components_link_css_cjs = require("./link.css.cjs");
|
|
4
|
+
const styles_themes_momotaro_components_spinner_css_cjs = require("./spinner.css.cjs");
|
|
5
|
+
const components = {
|
|
6
|
+
button: styles_themes_momotaro_components_button_css_cjs.button,
|
|
7
|
+
link: styles_themes_momotaro_components_link_css_cjs.link,
|
|
8
|
+
spinner: styles_themes_momotaro_components_spinner_css_cjs.spinner
|
|
9
|
+
};
|
|
10
|
+
exports.components = components;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
6
|
+
fileScope.setFileScope("src/themes/momotaro/components/link.css.ts?used", "blocks");
|
|
7
|
+
const link = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme({
|
|
8
|
+
type: "link",
|
|
9
|
+
base: css.style({
|
|
10
|
+
outline: "none",
|
|
11
|
+
border: "none",
|
|
12
|
+
textDecoration: "none",
|
|
13
|
+
background: "transparent",
|
|
14
|
+
":hover": {
|
|
15
|
+
textDecoration: "underline"
|
|
16
|
+
},
|
|
17
|
+
":focus-visible": {
|
|
18
|
+
textDecoration: "underline"
|
|
19
|
+
},
|
|
20
|
+
cursor: "pointer"
|
|
21
|
+
}, "link_base"),
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
inherit: css.style({
|
|
25
|
+
color: "inherit",
|
|
26
|
+
fontWeight: "inherit"
|
|
27
|
+
}, "link_variants_variant_inherit"),
|
|
28
|
+
primary: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
29
|
+
color: "primary",
|
|
30
|
+
fontWeight: "medium"
|
|
31
|
+
}),
|
|
32
|
+
secondary: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
33
|
+
color: "secondary",
|
|
34
|
+
fontWeight: "medium"
|
|
35
|
+
})
|
|
36
|
+
},
|
|
37
|
+
underline: css.style({
|
|
38
|
+
textDecoration: "underline"
|
|
39
|
+
}, "link_variants_underline")
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "primary",
|
|
43
|
+
underline: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
fileScope.endFileScope();
|
|
47
|
+
exports.link = link;
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const styles_lib_css_theme_makeTheme_cjs = require("../../lib/css/theme/makeTheme.cjs");
|
|
4
|
+
const styles_themes_momotaro_components_index_cjs = require("./components/index.cjs");
|
|
5
|
+
const styles_themes_momotaro_tokens_cjs = require("./tokens.cjs");
|
|
6
|
+
fileScope.setFileScope("src/themes/momotaro/momotaro.css.ts?used", "blocks");
|
|
7
|
+
const momotaro = styles_lib_css_theme_makeTheme_cjs.makeTheme({
|
|
8
|
+
name: "momotaro",
|
|
9
|
+
tokens: styles_themes_momotaro_tokens_cjs.tokens,
|
|
10
|
+
components: styles_themes_momotaro_components_index_cjs.components
|
|
11
|
+
});
|
|
12
|
+
fileScope.endFileScope();
|
|
13
|
+
exports.momotaro = momotaro;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { makeTheme } from "../../lib/css/theme/makeTheme.mjs";
|
|
3
|
+
import { components } from "./components/index.mjs";
|
|
3
4
|
import { tokens } from "./tokens.mjs";
|
|
4
|
-
setFileScope("src/themes/momotaro/
|
|
5
|
-
const
|
|
5
|
+
setFileScope("src/themes/momotaro/momotaro.css.ts?used", "blocks");
|
|
6
|
+
const momotaro = makeTheme({
|
|
6
7
|
name: "momotaro",
|
|
7
|
-
tokens
|
|
8
|
+
tokens,
|
|
9
|
+
components
|
|
8
10
|
});
|
|
9
11
|
endFileScope();
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
momotaro
|
|
12
14
|
};
|
|
@@ -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/dist/themes/momotaro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
exports.
|
|
3
|
+
const styles_themes_momotaro_momotaro_css_cjs = require("../styles/themes/momotaro/momotaro.css.cjs");
|
|
4
|
+
exports.momotaro = styles_themes_momotaro_momotaro_css_cjs.momotaro;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { momotaro } from '../momotaro.chunk.js';
|
package/dist/themes/momotaro.mjs
CHANGED