@blockle/blocks-theme-momotaro 4.0.0 → 6.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.
- package/dist/components/button.css.js +11 -10
- package/dist/components/checkbox.css.js +3 -3
- package/dist/components/dialog.css.js +5 -5
- package/dist/components/helpers.css.js +12 -13
- package/dist/components/input.css.js +11 -12
- package/dist/components/label.css.js +1 -1
- package/dist/components/popover.css.js +3 -3
- package/dist/components/progress.css.js +1 -1
- package/dist/components/radio.css.js +2 -2
- package/dist/components/select.css.js +12 -11
- package/dist/components/slider.css.js +1 -1
- package/dist/components/switch.css.js +2 -2
- package/dist/components/tooltip.css.js +1 -1
- package/dist/tokens.css.js +19 -17
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style, createVar } from "@vanilla-extract/css";
|
|
3
2
|
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
4
4
|
import { focusRingColor, clickable } from "./helpers.css.js";
|
|
5
5
|
setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
6
|
const intentColor = createVar();
|
|
@@ -13,10 +13,11 @@ const button = makeComponentTheme(
|
|
|
13
13
|
display: "inline-flex",
|
|
14
14
|
placeItems: "center",
|
|
15
15
|
fontSize: "medium",
|
|
16
|
-
borderRadius:
|
|
16
|
+
borderRadius: 2,
|
|
17
17
|
fontWeight: "medium",
|
|
18
18
|
// Space between `startSlot | children | endSlot`
|
|
19
|
-
gap:
|
|
19
|
+
gap: 2,
|
|
20
|
+
paddingBlock: 1
|
|
20
21
|
}),
|
|
21
22
|
{
|
|
22
23
|
selectors: {
|
|
@@ -36,7 +37,7 @@ const button = makeComponentTheme(
|
|
|
36
37
|
}),
|
|
37
38
|
outline: style([
|
|
38
39
|
atoms({
|
|
39
|
-
borderWidth: "
|
|
40
|
+
borderWidth: "thin"
|
|
40
41
|
}),
|
|
41
42
|
{
|
|
42
43
|
color: intentColor,
|
|
@@ -53,26 +54,26 @@ const button = makeComponentTheme(
|
|
|
53
54
|
size: {
|
|
54
55
|
small: style([
|
|
55
56
|
atoms({
|
|
56
|
-
paddingInline:
|
|
57
|
+
paddingInline: 3
|
|
57
58
|
}),
|
|
58
59
|
{
|
|
59
|
-
|
|
60
|
+
minHeight: 40
|
|
60
61
|
}
|
|
61
62
|
]),
|
|
62
63
|
medium: style([
|
|
63
64
|
atoms({
|
|
64
|
-
paddingInline:
|
|
65
|
+
paddingInline: 4
|
|
65
66
|
}),
|
|
66
67
|
{
|
|
67
|
-
|
|
68
|
+
minHeight: 48
|
|
68
69
|
}
|
|
69
70
|
]),
|
|
70
71
|
large: style([
|
|
71
72
|
atoms({
|
|
72
|
-
paddingInline:
|
|
73
|
+
paddingInline: 4
|
|
73
74
|
}),
|
|
74
75
|
{
|
|
75
|
-
|
|
76
|
+
minHeight: 56
|
|
76
77
|
}
|
|
77
78
|
])
|
|
78
79
|
},
|
|
@@ -30,7 +30,7 @@ const checkbox = makeComponentTheme(
|
|
|
30
30
|
},
|
|
31
31
|
atoms({
|
|
32
32
|
backgroundColor: "primary-100",
|
|
33
|
-
borderRadius:
|
|
33
|
+
borderRadius: 1
|
|
34
34
|
}),
|
|
35
35
|
focusable
|
|
36
36
|
]),
|
|
@@ -53,8 +53,8 @@ const checkbox = makeComponentTheme(
|
|
|
53
53
|
label: atoms({
|
|
54
54
|
display: "flex",
|
|
55
55
|
flexDirection: "row",
|
|
56
|
-
padding:
|
|
57
|
-
gap:
|
|
56
|
+
padding: 1,
|
|
57
|
+
gap: 2,
|
|
58
58
|
cursor: "pointer"
|
|
59
59
|
})
|
|
60
60
|
}
|
|
@@ -9,10 +9,10 @@ const dialog = makeComponentTheme(
|
|
|
9
9
|
atoms({
|
|
10
10
|
display: "flex",
|
|
11
11
|
flexDirection: "column",
|
|
12
|
-
padding:
|
|
12
|
+
padding: 5,
|
|
13
13
|
border: "none",
|
|
14
14
|
overflow: "auto",
|
|
15
|
-
borderRadius:
|
|
15
|
+
borderRadius: 2,
|
|
16
16
|
boxShadow: "large"
|
|
17
17
|
}),
|
|
18
18
|
{
|
|
@@ -25,9 +25,9 @@ const dialog = makeComponentTheme(
|
|
|
25
25
|
"&[open]": {
|
|
26
26
|
transform: "translate(0, 0)",
|
|
27
27
|
opacity: 1,
|
|
28
|
-
// @ts-expect-error -
|
|
28
|
+
// @ts-expect-error - typings does not support @starting-style (yet)
|
|
29
29
|
"@starting-style": {
|
|
30
|
-
transform: "translate(0, -120px)",
|
|
30
|
+
transform: "translate(0, -120px) scale(0.95)",
|
|
31
31
|
opacity: 0
|
|
32
32
|
}
|
|
33
33
|
},
|
|
@@ -42,7 +42,7 @@ const dialog = makeComponentTheme(
|
|
|
42
42
|
"@media": {
|
|
43
43
|
"(prefers-reduced-motion: no-preference)": {
|
|
44
44
|
// Ending style
|
|
45
|
-
transform: "translate(0, -120px)",
|
|
45
|
+
transform: "translate(0, -120px) scale(0.95)",
|
|
46
46
|
opacity: 0,
|
|
47
47
|
transitionBehavior: "allow-discrete",
|
|
48
48
|
transitionProperty: "opacity, transform, overlay, display",
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import { style,
|
|
2
|
+
import "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/helpers.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const focusRingColor = createVar();
|
|
6
6
|
const focusable = style({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
7
|
+
// '@media': {
|
|
8
|
+
// '(prefers-reduced-motion: no-preference)': {
|
|
9
|
+
// transition: `outline ${vars.transition.fast}`,
|
|
10
|
+
// },
|
|
11
|
+
// },
|
|
12
12
|
":focus-visible": {
|
|
13
|
-
outline: "2px solid
|
|
14
|
-
outlineOffset: "2px"
|
|
15
|
-
boxShadow: `0 0 1px 2px ${fallbackVar(focusRingColor, "#AF8EFF")}`
|
|
13
|
+
outline: "2px solid #AF8EFF",
|
|
14
|
+
outlineOffset: "2px"
|
|
16
15
|
},
|
|
17
16
|
selectors: {
|
|
18
17
|
"&:disabled, &[disabled]": {
|
|
@@ -21,9 +20,9 @@ const focusable = style({
|
|
|
21
20
|
pointerEvents: "none"
|
|
22
21
|
},
|
|
23
22
|
"&:has(input:focus-visible)": {
|
|
24
|
-
outline: "2px solid
|
|
25
|
-
outlineOffset: "2px"
|
|
26
|
-
boxShadow: vars.focus.boxShadow
|
|
23
|
+
outline: "2px solid #AF8EFF",
|
|
24
|
+
outlineOffset: "2px"
|
|
25
|
+
// boxShadow: vars.focus.boxShadow,
|
|
27
26
|
},
|
|
28
27
|
"&:has(input:disabled)": {
|
|
29
28
|
opacity: 0.5,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
4
5
|
setFileScope("src/components/input.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
6
|
const input = makeComponentTheme(
|
|
6
7
|
"input",
|
|
@@ -8,38 +9,36 @@ const input = makeComponentTheme(
|
|
|
8
9
|
input: style([
|
|
9
10
|
atoms({
|
|
10
11
|
color: "text-900",
|
|
11
|
-
padding: "large",
|
|
12
12
|
border: "none",
|
|
13
|
-
|
|
13
|
+
backgroundColor: "transparent"
|
|
14
14
|
}),
|
|
15
15
|
{
|
|
16
|
+
borderRadius: "inherit",
|
|
16
17
|
outline: "none",
|
|
17
|
-
background: "transparent",
|
|
18
18
|
"::placeholder": {
|
|
19
|
-
color: vars.color["text-
|
|
19
|
+
color: vars.color["text-600"]
|
|
20
20
|
},
|
|
21
21
|
":disabled": {}
|
|
22
22
|
}
|
|
23
23
|
]),
|
|
24
24
|
container: style([
|
|
25
25
|
{
|
|
26
|
-
minHeight:
|
|
26
|
+
minHeight: 40,
|
|
27
|
+
backgroundColor: "white",
|
|
27
28
|
"@media": {
|
|
28
29
|
"(prefers-reduced-motion: no-preference)": {
|
|
29
30
|
transition: `box-shadow ${vars.transition.fast}`
|
|
30
31
|
}
|
|
31
|
-
},
|
|
32
|
-
":focus-within": {
|
|
33
|
-
outline: "2px solid transparent",
|
|
34
|
-
outlineOffset: "2px",
|
|
35
|
-
boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`
|
|
36
32
|
}
|
|
37
33
|
},
|
|
38
34
|
atoms({
|
|
35
|
+
paddingInline: 3,
|
|
36
|
+
paddingBlock: 2,
|
|
39
37
|
backgroundColor: "white",
|
|
40
|
-
borderRadius:
|
|
38
|
+
borderRadius: 2,
|
|
41
39
|
boxShadow: "medium"
|
|
42
|
-
})
|
|
40
|
+
}),
|
|
41
|
+
focusable
|
|
43
42
|
])
|
|
44
43
|
}
|
|
45
44
|
);
|
|
@@ -8,10 +8,10 @@ const popover = makeComponentTheme(
|
|
|
8
8
|
base: style([
|
|
9
9
|
atoms({
|
|
10
10
|
backgroundColor: "white",
|
|
11
|
-
borderRadius:
|
|
11
|
+
borderRadius: 1,
|
|
12
12
|
boxShadow: "medium",
|
|
13
|
-
padding:
|
|
14
|
-
margin:
|
|
13
|
+
padding: 2,
|
|
14
|
+
margin: 1
|
|
15
15
|
// Space between the popover and the anchor element
|
|
16
16
|
}),
|
|
17
17
|
{
|
|
@@ -9,22 +9,23 @@ const select = makeComponentTheme(
|
|
|
9
9
|
select: style([
|
|
10
10
|
atoms({
|
|
11
11
|
color: "text-700",
|
|
12
|
-
|
|
12
|
+
paddingInline: 3,
|
|
13
|
+
paddingBlock: 1,
|
|
13
14
|
backgroundColor: "white",
|
|
14
|
-
borderRadius:
|
|
15
|
+
borderRadius: 2,
|
|
15
16
|
boxShadow: "medium"
|
|
16
17
|
}),
|
|
17
18
|
{
|
|
18
19
|
border: "none",
|
|
19
20
|
outline: "none",
|
|
20
|
-
minHeight:
|
|
21
|
+
minHeight: 40,
|
|
21
22
|
transitionDuration: vars.transition.fast,
|
|
22
|
-
transitionProperty: "
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
23
|
+
transitionProperty: "outline-color, outline-offset"
|
|
24
|
+
// ':focus-within': {
|
|
25
|
+
// outline: '2px solid transparent',
|
|
26
|
+
// outlineOffset: '2px',
|
|
27
|
+
// boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`,
|
|
28
|
+
// },
|
|
28
29
|
},
|
|
29
30
|
focusable
|
|
30
31
|
]),
|
|
@@ -32,7 +33,7 @@ const select = makeComponentTheme(
|
|
|
32
33
|
variant: {
|
|
33
34
|
outline: style([
|
|
34
35
|
atoms({
|
|
35
|
-
borderWidth: "
|
|
36
|
+
borderWidth: "thin",
|
|
36
37
|
borderColor: "primary-500"
|
|
37
38
|
}),
|
|
38
39
|
{
|
|
@@ -43,7 +44,7 @@ const select = makeComponentTheme(
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
icon: atoms({
|
|
46
|
-
paddingInline:
|
|
47
|
+
paddingInline: 3
|
|
47
48
|
}),
|
|
48
49
|
defaultVariants: {
|
|
49
50
|
variant: "solid"
|
|
@@ -9,7 +9,7 @@ const switchTheme = makeComponentTheme(
|
|
|
9
9
|
{
|
|
10
10
|
base: style([
|
|
11
11
|
atoms({
|
|
12
|
-
borderRadius:
|
|
12
|
+
borderRadius: 4,
|
|
13
13
|
backgroundColor: "text-200"
|
|
14
14
|
}),
|
|
15
15
|
{
|
|
@@ -39,7 +39,7 @@ const switchTheme = makeComponentTheme(
|
|
|
39
39
|
]),
|
|
40
40
|
slider: style([
|
|
41
41
|
atoms({
|
|
42
|
-
borderRadius: "
|
|
42
|
+
borderRadius: "full"
|
|
43
43
|
}),
|
|
44
44
|
{
|
|
45
45
|
width: 24,
|
package/dist/tokens.css.js
CHANGED
|
@@ -4,15 +4,14 @@ setFileScope("src/tokens.css.ts", "@blockle/blocks-theme-momotaro");
|
|
|
4
4
|
const tokens = {
|
|
5
5
|
border: {
|
|
6
6
|
radius: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
1: "4px",
|
|
8
|
+
2: "8px",
|
|
9
|
+
3: "16px",
|
|
10
|
+
4: "32px"
|
|
11
11
|
},
|
|
12
12
|
width: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
large: "4px"
|
|
13
|
+
thin: "1px",
|
|
14
|
+
thick: "2px"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
18
17
|
color: {
|
|
@@ -113,16 +112,17 @@ const tokens = {
|
|
|
113
112
|
large: "0px 16px 24px rgba(0, 0, 0, 0.08)"
|
|
114
113
|
},
|
|
115
114
|
focus: {
|
|
116
|
-
boxShadow: "0 0 1px 2px #
|
|
115
|
+
boxShadow: "0 0 1px 2px #7FE3F0"
|
|
117
116
|
},
|
|
118
117
|
spacing: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
1: "4px",
|
|
119
|
+
2: "8px",
|
|
120
|
+
3: "16px",
|
|
121
|
+
4: "24px",
|
|
122
|
+
5: "32px",
|
|
123
|
+
6: "40px",
|
|
124
|
+
7: "48px",
|
|
125
|
+
8: "64px"
|
|
126
126
|
},
|
|
127
127
|
transition: {
|
|
128
128
|
slow: "240ms",
|
|
@@ -143,9 +143,11 @@ const tokens = {
|
|
|
143
143
|
xlarge: rem(24)
|
|
144
144
|
},
|
|
145
145
|
fontWeight: {
|
|
146
|
-
|
|
146
|
+
light: 300,
|
|
147
|
+
normal: 400,
|
|
147
148
|
medium: 500,
|
|
148
|
-
strong: 700
|
|
149
|
+
strong: 700,
|
|
150
|
+
bold: 800
|
|
149
151
|
},
|
|
150
152
|
lineHeight: {
|
|
151
153
|
xsmall: rem(16),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks-theme-momotaro",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Momotaro theme for Blocks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@vanilla-extract/css": "^1.17.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@blockle/blocks-core": "^0.
|
|
37
|
+
"@blockle/blocks-core": "^1.0.0",
|
|
38
38
|
"@vanilla-extract/css": ">=1.17.1"
|
|
39
39
|
}
|
|
40
40
|
}
|