@blockle/blocks-theme-momotaro 6.3.0 → 7.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/alert.css.d.ts.map +1 -1
- package/dist/components/alert.css.js +11 -21
- package/dist/components/button.css.d.ts.map +1 -1
- package/dist/components/button.css.js +48 -49
- package/dist/components/checkbox.css.js +4 -4
- package/dist/components/dialog.css.d.ts.map +1 -1
- package/dist/components/dialog.css.js +4 -2
- package/dist/components/drawer.css.d.ts.map +1 -1
- package/dist/components/drawer.css.js +4 -1
- package/dist/components/heading.css.d.ts +3 -0
- package/dist/components/heading.css.d.ts.map +1 -0
- package/dist/components/heading.css.js +24 -0
- package/dist/components/helpers.css.js +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/link.css.d.ts.map +1 -1
- package/dist/components/link.css.js +7 -7
- package/dist/components/popover.css.d.ts.map +1 -1
- package/dist/components/popover.css.js +3 -2
- package/dist/components/progress.css.js +5 -5
- package/dist/components/radio.css.d.ts.map +1 -1
- package/dist/components/radio.css.js +4 -6
- package/dist/components/select.css.d.ts.map +1 -1
- package/dist/components/select.css.js +5 -10
- package/dist/components/slider.css.d.ts.map +1 -1
- package/dist/components/slider.css.js +16 -13
- package/dist/components/switch.css.d.ts.map +1 -1
- package/dist/components/switch.css.js +6 -5
- package/dist/components/text.css.d.ts +3 -0
- package/dist/components/text.css.d.ts.map +1 -0
- package/dist/components/text.css.js +21 -0
- package/dist/components/textInput.css.d.ts.map +1 -1
- package/dist/components/textInput.css.js +3 -4
- package/dist/components/textarea.css.d.ts.map +1 -1
- package/dist/components/textarea.css.js +3 -4
- package/dist/components/tooltip.css.d.ts.map +1 -1
- package/dist/components/tooltip.css.js +12 -9
- package/dist/tokens.css.d.ts.map +1 -1
- package/dist/tokens.css.js +114 -38
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.css.d.ts","sourceRoot":"","sources":["../../src/components/alert.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"alert.css.d.ts","sourceRoot":"","sources":["../../src/components/alert.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAY9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAkBhD,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
3
4
|
setFileScope("src/components/alert.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const intentStyle = (roles) => style({
|
|
6
|
+
backgroundColor: roles.subtle,
|
|
7
|
+
color: roles.foreground,
|
|
8
|
+
borderColor: roles.border
|
|
9
|
+
});
|
|
4
10
|
const alert = makeComponentTheme(
|
|
5
11
|
"alert",
|
|
6
12
|
{
|
|
@@ -12,26 +18,10 @@ const alert = makeComponentTheme(
|
|
|
12
18
|
}),
|
|
13
19
|
variants: {
|
|
14
20
|
intent: {
|
|
15
|
-
error:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
info: atoms({
|
|
21
|
-
backgroundColor: "info-100",
|
|
22
|
-
color: "info-800",
|
|
23
|
-
borderColor: "info-300"
|
|
24
|
-
}),
|
|
25
|
-
success: atoms({
|
|
26
|
-
backgroundColor: "success-100",
|
|
27
|
-
color: "success-800",
|
|
28
|
-
borderColor: "success-300"
|
|
29
|
-
}),
|
|
30
|
-
warning: atoms({
|
|
31
|
-
backgroundColor: "warning-100",
|
|
32
|
-
color: "warning-800",
|
|
33
|
-
borderColor: "warning-300"
|
|
34
|
-
})
|
|
21
|
+
error: intentStyle(vars.colorRole.danger),
|
|
22
|
+
info: intentStyle(vars.colorRole.info),
|
|
23
|
+
success: intentStyle(vars.colorRole.success),
|
|
24
|
+
warning: intentStyle(vars.colorRole.warning)
|
|
35
25
|
}
|
|
36
26
|
}
|
|
37
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAmIlD,CAAC"}
|
|
@@ -3,8 +3,10 @@ import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
|
3
3
|
import { style, createVar } from "@vanilla-extract/css";
|
|
4
4
|
import { clickable } from "./helpers.css.js";
|
|
5
5
|
setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const solidColor = createVar();
|
|
7
|
+
const solidHoverColor = createVar();
|
|
8
|
+
const subtleColor = createVar();
|
|
9
|
+
const contrastColor = createVar();
|
|
8
10
|
const button = makeComponentTheme(
|
|
9
11
|
"button",
|
|
10
12
|
{
|
|
@@ -19,35 +21,46 @@ const button = makeComponentTheme(
|
|
|
19
21
|
paddingBlock: 1
|
|
20
22
|
}),
|
|
21
23
|
{
|
|
22
|
-
selectors: {
|
|
23
|
-
"&:hover:not(:disabled)": {
|
|
24
|
-
backgroundColor: hoverBackgroundColor
|
|
25
|
-
}
|
|
26
|
-
}
|
|
24
|
+
selectors: {}
|
|
27
25
|
},
|
|
28
26
|
clickable
|
|
29
27
|
]),
|
|
30
28
|
variants: {
|
|
31
29
|
variant: {
|
|
32
30
|
solid: style({
|
|
33
|
-
color:
|
|
34
|
-
backgroundColor:
|
|
35
|
-
border: "none"
|
|
31
|
+
color: contrastColor,
|
|
32
|
+
backgroundColor: solidColor,
|
|
33
|
+
border: "none",
|
|
34
|
+
selectors: {
|
|
35
|
+
"&:hover:not(:disabled)": {
|
|
36
|
+
backgroundColor: solidHoverColor
|
|
37
|
+
}
|
|
38
|
+
}
|
|
36
39
|
}),
|
|
37
40
|
outline: style([
|
|
38
41
|
atoms({
|
|
39
42
|
borderWidth: "thin"
|
|
40
43
|
}),
|
|
41
44
|
{
|
|
42
|
-
color:
|
|
45
|
+
color: solidColor,
|
|
43
46
|
borderStyle: "solid",
|
|
44
|
-
borderColor:
|
|
45
|
-
background: "transparent"
|
|
47
|
+
borderColor: solidColor,
|
|
48
|
+
background: "transparent",
|
|
49
|
+
selectors: {
|
|
50
|
+
"&:hover:not(:disabled)": {
|
|
51
|
+
backgroundColor: subtleColor
|
|
52
|
+
}
|
|
53
|
+
}
|
|
46
54
|
}
|
|
47
55
|
]),
|
|
48
56
|
ghost: style({
|
|
49
|
-
color:
|
|
50
|
-
background: "transparent"
|
|
57
|
+
color: solidColor,
|
|
58
|
+
background: "transparent",
|
|
59
|
+
selectors: {
|
|
60
|
+
"&:hover:not(:disabled)": {
|
|
61
|
+
backgroundColor: subtleColor
|
|
62
|
+
}
|
|
63
|
+
}
|
|
51
64
|
})
|
|
52
65
|
},
|
|
53
66
|
size: {
|
|
@@ -79,60 +92,46 @@ const button = makeComponentTheme(
|
|
|
79
92
|
intent: {
|
|
80
93
|
neutral: style({
|
|
81
94
|
vars: {
|
|
82
|
-
[
|
|
83
|
-
[
|
|
95
|
+
[solidColor]: vars.colorRole.neutral.solid,
|
|
96
|
+
[solidHoverColor]: vars.colorRole.neutral.solidHover,
|
|
97
|
+
[subtleColor]: vars.colorRole.neutral.subtle,
|
|
98
|
+
[contrastColor]: vars.colorRole.neutral.contrast
|
|
84
99
|
}
|
|
85
100
|
}),
|
|
86
101
|
primary: style({
|
|
87
102
|
vars: {
|
|
88
|
-
[
|
|
89
|
-
[
|
|
103
|
+
[solidColor]: vars.colorRole.primary.solid,
|
|
104
|
+
[solidHoverColor]: vars.colorRole.primary.solidHover,
|
|
105
|
+
[subtleColor]: vars.colorRole.primary.subtle,
|
|
106
|
+
[contrastColor]: vars.colorRole.primary.contrast
|
|
90
107
|
}
|
|
91
108
|
}),
|
|
92
109
|
secondary: style({
|
|
93
110
|
vars: {
|
|
94
|
-
[
|
|
95
|
-
[
|
|
111
|
+
[solidColor]: vars.colorRole.secondary.solid,
|
|
112
|
+
[solidHoverColor]: vars.colorRole.secondary.solidHover,
|
|
113
|
+
[subtleColor]: vars.colorRole.secondary.subtle,
|
|
114
|
+
[contrastColor]: vars.colorRole.secondary.contrast
|
|
96
115
|
}
|
|
97
116
|
}),
|
|
98
117
|
success: style({
|
|
99
118
|
vars: {
|
|
100
|
-
[
|
|
101
|
-
[
|
|
119
|
+
[solidColor]: vars.colorRole.success.solid,
|
|
120
|
+
[solidHoverColor]: vars.colorRole.success.solidHover,
|
|
121
|
+
[subtleColor]: vars.colorRole.success.subtle,
|
|
122
|
+
[contrastColor]: vars.colorRole.success.contrast
|
|
102
123
|
}
|
|
103
124
|
}),
|
|
104
125
|
danger: style({
|
|
105
126
|
vars: {
|
|
106
|
-
[
|
|
107
|
-
[
|
|
127
|
+
[solidColor]: vars.colorRole.danger.solid,
|
|
128
|
+
[solidHoverColor]: vars.colorRole.danger.solidHover,
|
|
129
|
+
[subtleColor]: vars.colorRole.danger.subtle,
|
|
130
|
+
[contrastColor]: vars.colorRole.danger.contrast
|
|
108
131
|
}
|
|
109
132
|
})
|
|
110
133
|
}
|
|
111
134
|
},
|
|
112
|
-
compoundVariants: [
|
|
113
|
-
{
|
|
114
|
-
variants: {
|
|
115
|
-
variant: "solid",
|
|
116
|
-
intent: "primary"
|
|
117
|
-
},
|
|
118
|
-
style: style({
|
|
119
|
-
vars: {
|
|
120
|
-
[hoverBackgroundColor]: vars.color["primary-700"]
|
|
121
|
-
}
|
|
122
|
-
})
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
variants: {
|
|
126
|
-
variant: "solid",
|
|
127
|
-
intent: "danger"
|
|
128
|
-
},
|
|
129
|
-
style: style({
|
|
130
|
-
vars: {
|
|
131
|
-
[hoverBackgroundColor]: vars.color["danger-200"]
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
135
|
defaultVariants: {
|
|
137
136
|
size: "medium",
|
|
138
137
|
variant: "solid",
|
|
@@ -21,23 +21,23 @@ const checkbox = makeComponentTheme(
|
|
|
21
21
|
},
|
|
22
22
|
selectors: {
|
|
23
23
|
"&:hover:not(:has(input:disabled))": {
|
|
24
|
-
backgroundColor: vars.
|
|
24
|
+
backgroundColor: vars.colorRole.primary.solidHover
|
|
25
25
|
},
|
|
26
26
|
"&:has(input:checked)": {
|
|
27
|
-
backgroundColor: vars.
|
|
27
|
+
backgroundColor: vars.colorRole.primary.solid
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
atoms({
|
|
32
|
-
backgroundColor: "primary-100",
|
|
33
32
|
borderRadius: 1
|
|
34
33
|
}),
|
|
34
|
+
{ backgroundColor: vars.colorRole.primary.subtle },
|
|
35
35
|
focusable
|
|
36
36
|
]),
|
|
37
37
|
icon: style({
|
|
38
38
|
inlineSize: "1rem",
|
|
39
39
|
blockSize: "1rem",
|
|
40
|
-
color:
|
|
40
|
+
color: vars.colorRole.primary.contrast,
|
|
41
41
|
transform: "scale(0)",
|
|
42
42
|
selectors: {
|
|
43
43
|
"input:checked ~ &": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA4ElD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/dialog.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const dialog = makeComponentTheme(
|
|
@@ -16,10 +16,12 @@ const dialog = makeComponentTheme(
|
|
|
16
16
|
boxShadow: 3
|
|
17
17
|
}),
|
|
18
18
|
{
|
|
19
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
20
|
+
color: vars.colorRole.text.default,
|
|
19
21
|
maxHeight: "90%",
|
|
20
22
|
minWidth: "300px",
|
|
21
23
|
"::backdrop": {
|
|
22
|
-
backgroundColor:
|
|
24
|
+
backgroundColor: vars.colorRole.overlay.default
|
|
23
25
|
},
|
|
24
26
|
selectors: {
|
|
25
27
|
"&[open]": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.css.d.ts","sourceRoot":"","sources":["../../src/components/drawer.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"drawer.css.d.ts","sourceRoot":"","sources":["../../src/components/drawer.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAsElD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style, createVar } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/drawer.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const startingTransform = createVar();
|
|
@@ -11,6 +11,8 @@ const drawer = makeComponentTheme(
|
|
|
11
11
|
border: "none"
|
|
12
12
|
}),
|
|
13
13
|
{
|
|
14
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
15
|
+
color: vars.colorRole.text.default,
|
|
14
16
|
selectors: {
|
|
15
17
|
"&[open]": {
|
|
16
18
|
transform: "translate(0, 0)",
|
|
@@ -21,6 +23,7 @@ const drawer = makeComponentTheme(
|
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
"&[open]::backdrop": {
|
|
26
|
+
backgroundColor: vars.colorRole.overlay.default,
|
|
24
27
|
opacity: 1,
|
|
25
28
|
"@starting-style": {
|
|
26
29
|
opacity: 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.css.d.ts","sourceRoot":"","sources":["../../src/components/heading.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAepD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/heading.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const heading = makeComponentTheme(
|
|
6
|
+
"heading",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
color: {
|
|
10
|
+
default: style({ color: vars.colorRole.text.default }),
|
|
11
|
+
muted: style({ color: vars.colorRole.text.muted }),
|
|
12
|
+
disabled: style({ color: vars.colorRole.text.disabled }),
|
|
13
|
+
inverse: style({ color: vars.colorRole.text.inverse })
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
color: "default"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
endFileScope();
|
|
22
|
+
export {
|
|
23
|
+
heading
|
|
24
|
+
};
|
|
@@ -10,7 +10,7 @@ const focusable = style({
|
|
|
10
10
|
// },
|
|
11
11
|
// },
|
|
12
12
|
":focus-visible": {
|
|
13
|
-
outline: `2px solid ${vars.color
|
|
13
|
+
outline: `2px solid ${vars.colorRole.focusRing.color}`,
|
|
14
14
|
outlineOffset: "2px"
|
|
15
15
|
},
|
|
16
16
|
selectors: {
|
|
@@ -20,7 +20,7 @@ const focusable = style({
|
|
|
20
20
|
pointerEvents: "none"
|
|
21
21
|
},
|
|
22
22
|
"&:has(:focus-visible:not(button))": {
|
|
23
|
-
outline: `2px solid ${vars.color
|
|
23
|
+
outline: `2px solid ${vars.colorRole.focusRing.color}`,
|
|
24
24
|
outlineOffset: "2px"
|
|
25
25
|
},
|
|
26
26
|
"&:has(:disabled)": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAwBlE,eAAO,MAAM,UAAU,EAAE,qBAsBxB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { checkbox } from "./checkbox.css.js";
|
|
|
4
4
|
import { dialog } from "./dialog.css.js";
|
|
5
5
|
import { divider } from "./divider.css.js";
|
|
6
6
|
import { drawer } from "./drawer.css.js";
|
|
7
|
+
import { heading } from "./heading.css.js";
|
|
7
8
|
import { icon } from "./icon.css.js";
|
|
8
9
|
import { label } from "./label.css.js";
|
|
9
10
|
import { link } from "./link.css.js";
|
|
@@ -14,6 +15,7 @@ import { select } from "./select.css.js";
|
|
|
14
15
|
import { slider } from "./slider.css.js";
|
|
15
16
|
import { spinner } from "./spinner.css.js";
|
|
16
17
|
import { switchTheme } from "./switch.css.js";
|
|
18
|
+
import { text } from "./text.css.js";
|
|
17
19
|
import { textarea } from "./textarea.css.js";
|
|
18
20
|
import { textInput } from "./textInput.css.js";
|
|
19
21
|
import { tooltip } from "./tooltip.css.js";
|
|
@@ -24,6 +26,7 @@ const components = {
|
|
|
24
26
|
dialog,
|
|
25
27
|
divider,
|
|
26
28
|
drawer,
|
|
29
|
+
heading,
|
|
27
30
|
icon,
|
|
28
31
|
label,
|
|
29
32
|
link,
|
|
@@ -34,6 +37,7 @@ const components = {
|
|
|
34
37
|
slider,
|
|
35
38
|
spinner,
|
|
36
39
|
switch: switchTheme,
|
|
40
|
+
text,
|
|
37
41
|
textarea,
|
|
38
42
|
textInput,
|
|
39
43
|
tooltip
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.css.d.ts","sourceRoot":"","sources":["../../src/components/link.css.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"link.css.d.ts","sourceRoot":"","sources":["../../src/components/link.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,IAAI,EAAE,qBAAqB,CAAC,MAAM,CA8C7C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
2
|
+
import { makeComponentTheme, vars } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
import { focusable } from "./helpers.css.js";
|
|
5
5
|
setFileScope("src/components/link.css.ts", "@blockle/blocks-theme-momotaro");
|
|
@@ -33,13 +33,13 @@ const link = makeComponentTheme("link", {
|
|
|
33
33
|
color: "inherit",
|
|
34
34
|
fontWeight: "inherit"
|
|
35
35
|
}),
|
|
36
|
-
primary:
|
|
37
|
-
color:
|
|
38
|
-
fontWeight:
|
|
36
|
+
primary: style({
|
|
37
|
+
color: vars.colorRole.primary.foreground,
|
|
38
|
+
fontWeight: 500
|
|
39
39
|
}),
|
|
40
|
-
secondary:
|
|
41
|
-
color:
|
|
42
|
-
fontWeight:
|
|
40
|
+
secondary: style({
|
|
41
|
+
color: vars.colorRole.secondary.foreground,
|
|
42
|
+
fontWeight: 500
|
|
43
43
|
})
|
|
44
44
|
},
|
|
45
45
|
underline: style({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.css.d.ts","sourceRoot":"","sources":["../../src/components/popover.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"popover.css.d.ts","sourceRoot":"","sources":["../../src/components/popover.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAsCpD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/popover.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const popover = makeComponentTheme(
|
|
@@ -7,7 +7,6 @@ const popover = makeComponentTheme(
|
|
|
7
7
|
{
|
|
8
8
|
root: style([
|
|
9
9
|
atoms({
|
|
10
|
-
backgroundColor: "white",
|
|
11
10
|
borderRadius: 1,
|
|
12
11
|
boxShadow: 2,
|
|
13
12
|
padding: 2,
|
|
@@ -15,6 +14,8 @@ const popover = makeComponentTheme(
|
|
|
15
14
|
// Space between the popover and the anchor element
|
|
16
15
|
}),
|
|
17
16
|
{
|
|
17
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
18
|
+
color: vars.colorRole.text.default,
|
|
18
19
|
width: "max-content",
|
|
19
20
|
selectors: {
|
|
20
21
|
"&:popover-open": {
|
|
@@ -15,13 +15,13 @@ const progress = makeComponentTheme(
|
|
|
15
15
|
{
|
|
16
16
|
root: style([
|
|
17
17
|
{
|
|
18
|
-
height: 8
|
|
18
|
+
height: 8,
|
|
19
|
+
backgroundColor: vars.colorRole.surface.sunken,
|
|
20
|
+
color: vars.colorRole.primary.solid
|
|
19
21
|
},
|
|
20
22
|
atoms({
|
|
21
23
|
inlineSize: "full",
|
|
22
24
|
borderRadius: 1,
|
|
23
|
-
backgroundColor: "text-200",
|
|
24
|
-
color: "primary-500",
|
|
25
25
|
overflow: "hidden"
|
|
26
26
|
})
|
|
27
27
|
]),
|
|
@@ -42,8 +42,8 @@ const progress = makeComponentTheme(
|
|
|
42
42
|
45deg,
|
|
43
43
|
transparent,
|
|
44
44
|
transparent 20px,
|
|
45
|
-
${vars.
|
|
46
|
-
${vars.
|
|
45
|
+
${vars.colorRole.primary.solidHover} 20px,
|
|
46
|
+
${vars.colorRole.primary.solidHover} 40px
|
|
47
47
|
)`
|
|
48
48
|
},
|
|
49
49
|
"(prefers-reduced-motion: no-preference)": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.css.d.ts","sourceRoot":"","sources":["../../src/components/radio.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"radio.css.d.ts","sourceRoot":"","sources":["../../src/components/radio.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAqDhD,CAAC"}
|
|
@@ -21,23 +21,21 @@ const radio = makeComponentTheme(
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
":hover": {
|
|
24
|
-
backgroundColor: vars.
|
|
24
|
+
backgroundColor: vars.colorRole.primary.solidHover
|
|
25
25
|
},
|
|
26
26
|
selectors: {
|
|
27
27
|
"&:has(input:checked):not(:hover)": {
|
|
28
|
-
backgroundColor: vars.
|
|
28
|
+
backgroundColor: vars.colorRole.primary.solid
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
backgroundColor: "primary-100"
|
|
34
|
-
}),
|
|
32
|
+
{ backgroundColor: vars.colorRole.primary.subtle },
|
|
35
33
|
focusable
|
|
36
34
|
]),
|
|
37
35
|
icon: style({
|
|
38
36
|
height: 12,
|
|
39
37
|
width: 12,
|
|
40
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: vars.colorRole.primary.contrast,
|
|
41
39
|
borderRadius: "8px",
|
|
42
40
|
transform: "scale(0)",
|
|
43
41
|
"@media": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.css.d.ts","sourceRoot":"","sources":["../../src/components/select.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"select.css.d.ts","sourceRoot":"","sources":["../../src/components/select.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA0ClD,CAAC"}
|
|
@@ -8,24 +8,19 @@ const select = makeComponentTheme(
|
|
|
8
8
|
{
|
|
9
9
|
select: style([
|
|
10
10
|
atoms({
|
|
11
|
-
color: "text-700",
|
|
12
11
|
paddingInline: 3,
|
|
13
12
|
paddingBlock: 1,
|
|
14
|
-
backgroundColor: "white",
|
|
15
13
|
borderRadius: 2,
|
|
16
14
|
boxShadow: 2
|
|
17
15
|
}),
|
|
18
16
|
{
|
|
19
17
|
border: "none",
|
|
20
18
|
outline: "none",
|
|
19
|
+
color: vars.colorRole.text.default,
|
|
20
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
21
21
|
minHeight: 40,
|
|
22
22
|
transitionDuration: vars.transition.fast,
|
|
23
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
|
-
// },
|
|
29
24
|
},
|
|
30
25
|
focusable
|
|
31
26
|
]),
|
|
@@ -33,11 +28,11 @@ const select = makeComponentTheme(
|
|
|
33
28
|
variant: {
|
|
34
29
|
outline: style([
|
|
35
30
|
atoms({
|
|
36
|
-
borderWidth: "thin"
|
|
37
|
-
borderColor: "primary-500"
|
|
31
|
+
borderWidth: "thin"
|
|
38
32
|
}),
|
|
39
33
|
{
|
|
40
|
-
borderStyle: "solid"
|
|
34
|
+
borderStyle: "solid",
|
|
35
|
+
borderColor: vars.colorRole.primary.solid
|
|
41
36
|
}
|
|
42
37
|
]),
|
|
43
38
|
solid: style({})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.css.d.ts","sourceRoot":"","sources":["../../src/components/slider.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"slider.css.d.ts","sourceRoot":"","sources":["../../src/components/slider.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAsFlD,CAAC"}
|
|
@@ -7,6 +7,7 @@ const trackBackground = createVar();
|
|
|
7
7
|
const filledTrackBackground = createVar();
|
|
8
8
|
const thumbBackground = createVar();
|
|
9
9
|
const thumbActive = createVar();
|
|
10
|
+
const haloColor = createVar();
|
|
10
11
|
const slider = makeComponentTheme(
|
|
11
12
|
"slider",
|
|
12
13
|
{
|
|
@@ -31,9 +32,9 @@ const slider = makeComponentTheme(
|
|
|
31
32
|
borderRadius: "50%",
|
|
32
33
|
height: "16px",
|
|
33
34
|
width: "16px",
|
|
34
|
-
boxShadow: `0 0 0 0px color-mix(in srgb, ${
|
|
35
|
+
boxShadow: `0 0 0 0px color-mix(in srgb, ${haloColor}, transparent 0%)`,
|
|
35
36
|
vars: {
|
|
36
|
-
[thumbActive]: `0 0 0 8px color-mix(in srgb, ${
|
|
37
|
+
[thumbActive]: `0 0 0 8px color-mix(in srgb, ${haloColor}, transparent 20%)`
|
|
37
38
|
},
|
|
38
39
|
":hover": {
|
|
39
40
|
boxShadow: thumbActive
|
|
@@ -61,34 +62,36 @@ const slider = makeComponentTheme(
|
|
|
61
62
|
inlineSize: "300px"
|
|
62
63
|
})
|
|
63
64
|
},
|
|
64
|
-
|
|
65
|
+
intent: {
|
|
65
66
|
primary: style({
|
|
66
67
|
vars: {
|
|
67
|
-
[trackBackground]: vars.
|
|
68
|
-
[filledTrackBackground]: vars.
|
|
69
|
-
[thumbBackground]: vars.
|
|
68
|
+
[trackBackground]: vars.colorRole.primary.subtle,
|
|
69
|
+
[filledTrackBackground]: vars.colorRole.primary.solid,
|
|
70
|
+
[thumbBackground]: vars.colorRole.primary.solid,
|
|
71
|
+
[haloColor]: vars.colorRole.primary.subtle
|
|
70
72
|
}
|
|
71
73
|
}),
|
|
72
74
|
secondary: style({
|
|
73
75
|
vars: {
|
|
74
|
-
[trackBackground]: vars.
|
|
75
|
-
[filledTrackBackground]: vars.
|
|
76
|
-
[thumbBackground]: vars.
|
|
76
|
+
[trackBackground]: vars.colorRole.secondary.subtle,
|
|
77
|
+
[filledTrackBackground]: vars.colorRole.secondary.solid,
|
|
78
|
+
[thumbBackground]: vars.colorRole.secondary.solid,
|
|
79
|
+
[haloColor]: vars.colorRole.secondary.subtle
|
|
77
80
|
}
|
|
78
81
|
})
|
|
79
82
|
},
|
|
80
83
|
disabled: style({
|
|
81
84
|
pointerEvents: "none",
|
|
82
85
|
vars: {
|
|
83
|
-
[trackBackground]: vars.
|
|
84
|
-
[filledTrackBackground]: vars.
|
|
85
|
-
[thumbBackground]: vars.
|
|
86
|
+
[trackBackground]: vars.colorRole.border.default,
|
|
87
|
+
[filledTrackBackground]: vars.colorRole.text.disabled,
|
|
88
|
+
[thumbBackground]: vars.colorRole.text.disabled
|
|
86
89
|
}
|
|
87
90
|
})
|
|
88
91
|
},
|
|
89
92
|
defaultVariants: {
|
|
90
93
|
size: "medium",
|
|
91
|
-
|
|
94
|
+
intent: "primary"
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../src/components/switch.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,WAAW,EAAE,qBAAqB,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../src/components/switch.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAO9B,eAAO,MAAM,WAAW,EAAE,qBAAqB,CAAC,QAAQ,CA2DvD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style, createVar } from "@vanilla-extract/css";
|
|
4
4
|
import { focusable } from "./helpers.css.js";
|
|
5
5
|
setFileScope("src/components/switch.css.ts", "@blockle/blocks-theme-momotaro");
|
|
@@ -9,10 +9,10 @@ const switchTheme = makeComponentTheme(
|
|
|
9
9
|
{
|
|
10
10
|
root: style([
|
|
11
11
|
atoms({
|
|
12
|
-
borderRadius: 4
|
|
13
|
-
backgroundColor: "text-200"
|
|
12
|
+
borderRadius: 4
|
|
14
13
|
}),
|
|
15
14
|
{
|
|
15
|
+
backgroundColor: vars.colorRole.border.strong,
|
|
16
16
|
width: 52,
|
|
17
17
|
height: 32,
|
|
18
18
|
"@media": {
|
|
@@ -22,7 +22,7 @@ const switchTheme = makeComponentTheme(
|
|
|
22
22
|
},
|
|
23
23
|
selectors: {
|
|
24
24
|
'&[data-checked="true"]': {
|
|
25
|
-
backgroundColor: vars.
|
|
25
|
+
backgroundColor: vars.colorRole.secondary.solid
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
// Scale the switch when it's `:active`
|
|
@@ -48,7 +48,8 @@ const switchTheme = makeComponentTheme(
|
|
|
48
48
|
left: 4,
|
|
49
49
|
transform: `translateX(0) scale(calc(0.9 * ${activeScaleFactor}))`,
|
|
50
50
|
position: "absolute",
|
|
51
|
-
|
|
51
|
+
// Deliberately fixed: the thumb is white in every mode
|
|
52
|
+
backgroundColor: vars.color.white,
|
|
52
53
|
selectors: {
|
|
53
54
|
'&[data-checked="true"]': {
|
|
54
55
|
transform: `translateX(20px) scale(${activeScaleFactor})`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.css.d.ts","sourceRoot":"","sources":["../../src/components/text.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAY7C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/text.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const text = makeComponentTheme("text", {
|
|
6
|
+
variants: {
|
|
7
|
+
color: {
|
|
8
|
+
default: style({ color: vars.colorRole.text.default }),
|
|
9
|
+
muted: style({ color: vars.colorRole.text.muted }),
|
|
10
|
+
disabled: style({ color: vars.colorRole.text.disabled }),
|
|
11
|
+
inverse: style({ color: vars.colorRole.text.inverse })
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
color: "default"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
endFileScope();
|
|
19
|
+
export {
|
|
20
|
+
text
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.css.d.ts","sourceRoot":"","sources":["../../src/components/textInput.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,SAAS,EAAE,qBAAqB,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"textInput.css.d.ts","sourceRoot":"","sources":["../../src/components/textInput.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAuCxD,CAAC"}
|
|
@@ -9,7 +9,7 @@ const textInput = makeComponentTheme(
|
|
|
9
9
|
root: style([
|
|
10
10
|
{
|
|
11
11
|
minHeight: 40,
|
|
12
|
-
backgroundColor:
|
|
12
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
13
13
|
"@media": {
|
|
14
14
|
"(prefers-reduced-motion: no-preference)": {
|
|
15
15
|
transition: `box-shadow ${vars.transition.fast}`
|
|
@@ -20,7 +20,6 @@ const textInput = makeComponentTheme(
|
|
|
20
20
|
display: "flex",
|
|
21
21
|
paddingInline: 3,
|
|
22
22
|
paddingBlock: 2,
|
|
23
|
-
backgroundColor: "white",
|
|
24
23
|
borderRadius: 2,
|
|
25
24
|
boxShadow: 2,
|
|
26
25
|
// Space between `startSlot | children | endSlot`
|
|
@@ -30,14 +29,14 @@ const textInput = makeComponentTheme(
|
|
|
30
29
|
]),
|
|
31
30
|
input: style([
|
|
32
31
|
atoms({
|
|
33
|
-
color: "text-900",
|
|
34
32
|
border: "none",
|
|
35
33
|
backgroundColor: "transparent"
|
|
36
34
|
}),
|
|
37
35
|
{
|
|
38
36
|
outline: "none",
|
|
37
|
+
color: vars.colorRole.text.default,
|
|
39
38
|
"::placeholder": {
|
|
40
|
-
color: vars.
|
|
39
|
+
color: vars.colorRole.text.muted
|
|
41
40
|
},
|
|
42
41
|
":disabled": {}
|
|
43
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.css.d.ts","sourceRoot":"","sources":["../../src/components/textarea.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"textarea.css.d.ts","sourceRoot":"","sources":["../../src/components/textarea.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAuCtD,CAAC"}
|
|
@@ -9,15 +9,15 @@ const textarea = makeComponentTheme(
|
|
|
9
9
|
input: style([
|
|
10
10
|
atoms({
|
|
11
11
|
paddingInline: 3,
|
|
12
|
-
color: "text-900",
|
|
13
12
|
border: "none",
|
|
14
13
|
backgroundColor: "transparent"
|
|
15
14
|
}),
|
|
16
15
|
{
|
|
17
16
|
borderRadius: "inherit",
|
|
18
17
|
outline: "none",
|
|
18
|
+
color: vars.colorRole.text.default,
|
|
19
19
|
"::placeholder": {
|
|
20
|
-
color: vars.
|
|
20
|
+
color: vars.colorRole.text.muted
|
|
21
21
|
},
|
|
22
22
|
":disabled": {}
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ const textarea = makeComponentTheme(
|
|
|
27
27
|
overflow: "auto",
|
|
28
28
|
minHeight: 96,
|
|
29
29
|
maxHeight: 240,
|
|
30
|
-
backgroundColor:
|
|
30
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
31
31
|
"@media": {
|
|
32
32
|
"(prefers-reduced-motion: no-preference)": {
|
|
33
33
|
transition: `box-shadow ${vars.transition.fast}`
|
|
@@ -36,7 +36,6 @@ const textarea = makeComponentTheme(
|
|
|
36
36
|
},
|
|
37
37
|
atoms({
|
|
38
38
|
paddingBlock: 2,
|
|
39
|
-
backgroundColor: "white",
|
|
40
39
|
borderRadius: 2,
|
|
41
40
|
boxShadow: 2
|
|
42
41
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.css.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"tooltip.css.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CA0BpD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/tooltip.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const { surface, text } = vars.colorRole;
|
|
5
6
|
const tooltip = makeComponentTheme(
|
|
6
7
|
"tooltip",
|
|
7
8
|
{
|
|
@@ -9,21 +10,23 @@ const tooltip = makeComponentTheme(
|
|
|
9
10
|
padding: 1
|
|
10
11
|
}),
|
|
11
12
|
variants: {
|
|
12
|
-
|
|
13
|
+
intent: {
|
|
14
|
+
// Inverse of the page: dark on light, light on dark
|
|
13
15
|
primary: style({
|
|
14
|
-
backgroundColor:
|
|
15
|
-
boxShadow:
|
|
16
|
-
color:
|
|
16
|
+
backgroundColor: `color-mix(in srgb, ${surface.inverse} 80%, transparent)`,
|
|
17
|
+
boxShadow: `0 0 0 1px color-mix(in srgb, ${text.inverse} 10%, transparent)`,
|
|
18
|
+
color: text.inverse
|
|
17
19
|
}),
|
|
20
|
+
// Same as the page
|
|
18
21
|
secondary: style({
|
|
19
|
-
backgroundColor:
|
|
20
|
-
boxShadow:
|
|
21
|
-
color:
|
|
22
|
+
backgroundColor: `color-mix(in srgb, ${surface.default} 80%, transparent)`,
|
|
23
|
+
boxShadow: `0 0 0 1px color-mix(in srgb, ${text.default} 10%, transparent)`,
|
|
24
|
+
color: text.default
|
|
22
25
|
})
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
defaultVariants: {
|
|
26
|
-
|
|
29
|
+
intent: "primary"
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
);
|
package/dist/tokens.css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.css.d.ts","sourceRoot":"","sources":["../src/tokens.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.css.d.ts","sourceRoot":"","sources":["../src/tokens.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMrE,eAAO,MAAM,MAAM,EAAE,WA6PpB,CAAC"}
|
package/dist/tokens.css.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { pixelsToRem } from "@blockle/blocks-core";
|
|
3
3
|
setFileScope("src/tokens.css.ts", "@blockle/blocks-theme-momotaro");
|
|
4
|
+
const focusColor = "#8660FF";
|
|
5
|
+
const focusColorDark = "#A8EEF6";
|
|
4
6
|
const tokens = {
|
|
5
7
|
border: {
|
|
6
8
|
radius: {
|
|
@@ -28,6 +30,7 @@ const tokens = {
|
|
|
28
30
|
"800": "#3B2A82",
|
|
29
31
|
"900": "#2A1B5A"
|
|
30
32
|
},
|
|
33
|
+
// Intentional multihue sequence; indices are not a strict lightness ramp.
|
|
31
34
|
secondary: {
|
|
32
35
|
"100": "#DFFAF9",
|
|
33
36
|
"200": "#B3F1EE",
|
|
@@ -83,28 +86,6 @@ const tokens = {
|
|
|
83
86
|
"800": "#804D00",
|
|
84
87
|
"900": "#4D3300"
|
|
85
88
|
},
|
|
86
|
-
background: {
|
|
87
|
-
100: "#FFFFFF",
|
|
88
|
-
200: "#F5F5F5",
|
|
89
|
-
300: "#E0E0E0",
|
|
90
|
-
400: "#AEAEAE",
|
|
91
|
-
500: "#7A7A7A",
|
|
92
|
-
600: "#4C4C4C",
|
|
93
|
-
700: "#2E2E2E",
|
|
94
|
-
800: "#1A1A1A",
|
|
95
|
-
900: "#0D0D0D"
|
|
96
|
-
},
|
|
97
|
-
text: {
|
|
98
|
-
100: "#FFFFFF",
|
|
99
|
-
200: "#F5F5F5",
|
|
100
|
-
300: "#E0E0E0",
|
|
101
|
-
400: "#AEAEAE",
|
|
102
|
-
500: "#7A7A7A",
|
|
103
|
-
600: "#4C4C4C",
|
|
104
|
-
700: "#2E2E2E",
|
|
105
|
-
800: "#1A1A1A",
|
|
106
|
-
900: "#0D0D0D"
|
|
107
|
-
},
|
|
108
89
|
neutral: {
|
|
109
90
|
100: "#F7F7F7",
|
|
110
91
|
200: "#E1E1E1",
|
|
@@ -117,15 +98,112 @@ const tokens = {
|
|
|
117
98
|
900: "#1A1A1A"
|
|
118
99
|
}
|
|
119
100
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
101
|
+
// Dark values are a proposal, shown for review in the PR.
|
|
102
|
+
colorRoles: {
|
|
103
|
+
text: {
|
|
104
|
+
default: { light: "neutral-900", dark: "neutral-100" },
|
|
105
|
+
muted: { light: "neutral-700", dark: "neutral-400" },
|
|
106
|
+
disabled: { light: "neutral-400", dark: "neutral-600" },
|
|
107
|
+
inverse: { light: "white", dark: "neutral-900" }
|
|
108
|
+
},
|
|
109
|
+
surface: {
|
|
110
|
+
default: { light: "white", dark: "neutral-900" },
|
|
111
|
+
raised: { light: "white", dark: "neutral-800" },
|
|
112
|
+
sunken: { light: "neutral-100", dark: "#0D0D0D" },
|
|
113
|
+
inverse: { light: "neutral-900", dark: "neutral-100" }
|
|
114
|
+
},
|
|
115
|
+
border: {
|
|
116
|
+
default: { light: "neutral-200", dark: "neutral-800" },
|
|
117
|
+
strong: { light: "neutral-400", dark: "neutral-700" }
|
|
118
|
+
},
|
|
119
|
+
focusRing: {
|
|
120
|
+
color: { light: focusColor, dark: focusColorDark },
|
|
121
|
+
boxShadow: {
|
|
122
|
+
light: `0 0 1px 2px ${focusColor}`,
|
|
123
|
+
dark: `0 0 1px 2px ${focusColorDark}`
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
overlay: {
|
|
127
|
+
default: { light: "rgba(13, 13, 13, 0.4)", dark: "rgba(0, 0, 0, 0.6)" }
|
|
128
|
+
},
|
|
129
|
+
shadow: {
|
|
130
|
+
1: {
|
|
131
|
+
light: "0px 4px 8px rgba(0, 0, 0, 0.08)",
|
|
132
|
+
dark: "0px 4px 8px rgba(0, 0, 0, 0.4)"
|
|
133
|
+
},
|
|
134
|
+
2: {
|
|
135
|
+
light: "0px 8px 16px rgba(0, 0, 0, 0.08)",
|
|
136
|
+
dark: "0px 8px 16px rgba(0, 0, 0, 0.45)"
|
|
137
|
+
},
|
|
138
|
+
3: {
|
|
139
|
+
light: "0px 16px 24px rgba(0, 0, 0, 0.08)",
|
|
140
|
+
dark: "0px 16px 24px rgba(0, 0, 0, 0.5)"
|
|
141
|
+
},
|
|
142
|
+
4: {
|
|
143
|
+
light: "0px 24px 32px rgba(0, 0, 0, 0.08)",
|
|
144
|
+
dark: "0px 24px 32px rgba(0, 0, 0, 0.55)"
|
|
145
|
+
},
|
|
146
|
+
5: {
|
|
147
|
+
light: "0px 32px 40px rgba(0, 0, 0, 0.08)",
|
|
148
|
+
dark: "0px 32px 40px rgba(0, 0, 0, 0.6)"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
primary: {
|
|
152
|
+
solid: { light: "primary-600", dark: "primary-300" },
|
|
153
|
+
solidHover: { light: "primary-700", dark: "primary-400" },
|
|
154
|
+
subtle: { light: "primary-100", dark: "primary-900" },
|
|
155
|
+
contrast: { light: "white", dark: "neutral-900" },
|
|
156
|
+
foreground: { light: "primary-700", dark: "primary-300" },
|
|
157
|
+
border: { light: "primary-300", dark: "primary-700" }
|
|
158
|
+
},
|
|
159
|
+
secondary: {
|
|
160
|
+
solid: { light: "secondary-500", dark: "secondary-500" },
|
|
161
|
+
solidHover: { light: "secondary-600", dark: "secondary-400" },
|
|
162
|
+
subtle: { light: "secondary-100", dark: "#0F3A4D" },
|
|
163
|
+
contrast: { light: "neutral-900", dark: "neutral-900" },
|
|
164
|
+
foreground: { light: "#126A94", dark: "secondary-400" },
|
|
165
|
+
border: { light: "secondary-300", dark: "secondary-800" }
|
|
166
|
+
},
|
|
167
|
+
neutral: {
|
|
168
|
+
solid: { light: "neutral-800", dark: "neutral-200" },
|
|
169
|
+
solidHover: { light: "neutral-900", dark: "neutral-300" },
|
|
170
|
+
subtle: { light: "neutral-100", dark: "neutral-800" },
|
|
171
|
+
contrast: { light: "white", dark: "neutral-900" },
|
|
172
|
+
foreground: { light: "neutral-800", dark: "neutral-300" },
|
|
173
|
+
border: { light: "neutral-300", dark: "neutral-700" }
|
|
174
|
+
},
|
|
175
|
+
danger: {
|
|
176
|
+
solid: { light: "danger-700", dark: "danger-400" },
|
|
177
|
+
solidHover: { light: "danger-800", dark: "danger-300" },
|
|
178
|
+
subtle: { light: "danger-100", dark: "danger-900" },
|
|
179
|
+
contrast: { light: "white", dark: "neutral-900" },
|
|
180
|
+
foreground: { light: "danger-700", dark: "danger-300" },
|
|
181
|
+
border: { light: "danger-300", dark: "danger-700" }
|
|
182
|
+
},
|
|
183
|
+
success: {
|
|
184
|
+
solid: { light: "success-800", dark: "success-500" },
|
|
185
|
+
solidHover: { light: "success-900", dark: "success-400" },
|
|
186
|
+
subtle: { light: "success-100", dark: "success-900" },
|
|
187
|
+
contrast: { light: "white", dark: "neutral-900" },
|
|
188
|
+
foreground: { light: "success-800", dark: "success-400" },
|
|
189
|
+
border: { light: "success-300", dark: "success-700" }
|
|
190
|
+
},
|
|
191
|
+
info: {
|
|
192
|
+
solid: { light: "info-700", dark: "info-400" },
|
|
193
|
+
solidHover: { light: "info-800", dark: "info-300" },
|
|
194
|
+
subtle: { light: "info-100", dark: "info-900" },
|
|
195
|
+
contrast: { light: "white", dark: "neutral-900" },
|
|
196
|
+
foreground: { light: "info-700", dark: "info-300" },
|
|
197
|
+
border: { light: "info-300", dark: "info-700" }
|
|
198
|
+
},
|
|
199
|
+
warning: {
|
|
200
|
+
solid: { light: "warning-500", dark: "warning-500" },
|
|
201
|
+
solidHover: { light: "warning-600", dark: "warning-400" },
|
|
202
|
+
subtle: { light: "warning-100", dark: "warning-900" },
|
|
203
|
+
contrast: { light: "neutral-900", dark: "neutral-900" },
|
|
204
|
+
foreground: { light: "warning-800", dark: "warning-400" },
|
|
205
|
+
border: { light: "warning-300", dark: "warning-700" }
|
|
206
|
+
}
|
|
129
207
|
},
|
|
130
208
|
spacing: {
|
|
131
209
|
1: "4px",
|
|
@@ -146,7 +224,7 @@ const tokens = {
|
|
|
146
224
|
fontFamily: {
|
|
147
225
|
body: '"Rubik", sans-serif',
|
|
148
226
|
heading: '"Rubik", sans-serif',
|
|
149
|
-
mono: '"
|
|
227
|
+
mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
150
228
|
},
|
|
151
229
|
fontSize: {
|
|
152
230
|
xsmall: pixelsToRem(12),
|
|
@@ -164,12 +242,10 @@ const tokens = {
|
|
|
164
242
|
bold: 800
|
|
165
243
|
},
|
|
166
244
|
lineHeight: {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
xlarge: pixelsToRem(32),
|
|
172
|
-
display: 1.1
|
|
245
|
+
compact: 1.1,
|
|
246
|
+
snug: 1.3,
|
|
247
|
+
normal: 1.5,
|
|
248
|
+
relaxed: 1.7
|
|
173
249
|
},
|
|
174
250
|
letterSpacing: {
|
|
175
251
|
tight: "-0.02em",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks-theme-momotaro",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.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.18.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@blockle/blocks-core": ">=
|
|
37
|
+
"@blockle/blocks-core": ">=3.0.x",
|
|
38
38
|
"@vanilla-extract/css": "^1.18.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|