@blockle/blocks-theme-momotaro 7.2.0 → 7.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/components/alert.css.d.ts.map +1 -1
- package/dist/components/alert.css.js +17 -9
- package/dist/components/button.css.d.ts.map +1 -1
- package/dist/components/button.css.js +23 -32
- package/dist/components/buttonBase.css.d.ts +1 -1
- package/dist/components/buttonBase.css.d.ts.map +1 -1
- package/dist/components/buttonBase.css.js +99 -59
- package/dist/components/checkbox.css.d.ts.map +1 -1
- package/dist/components/checkbox.css.js +49 -39
- package/dist/components/dialog.css.d.ts.map +1 -1
- package/dist/components/dialog.css.js +64 -52
- package/dist/components/divider.css.d.ts.map +1 -1
- package/dist/components/divider.css.js +28 -12
- package/dist/components/drawer.css.d.ts.map +1 -1
- package/dist/components/drawer.css.js +85 -57
- package/dist/components/heading.css.d.ts.map +1 -1
- package/dist/components/heading.css.js +13 -5
- package/dist/components/helpers.css.d.ts.map +1 -1
- package/dist/components/helpers.css.js +33 -25
- package/dist/components/icon.css.d.ts.map +1 -1
- package/dist/components/icon.css.js +26 -6
- package/dist/components/iconButton.css.d.ts.map +1 -1
- package/dist/components/iconButton.css.js +22 -11
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/label.css.d.ts.map +1 -1
- package/dist/components/label.css.js +28 -8
- package/dist/components/link.css.d.ts.map +1 -1
- package/dist/components/link.css.js +46 -26
- package/dist/components/menu.css.d.ts +3 -0
- package/dist/components/menu.css.d.ts.map +1 -0
- package/dist/components/menu.css.js +83 -0
- package/dist/components/popover.css.js +31 -31
- package/dist/components/progress.css.d.ts.map +1 -1
- package/dist/components/progress.css.js +32 -24
- package/dist/components/radio.css.d.ts.map +1 -1
- package/dist/components/radio.css.js +50 -38
- package/dist/components/select.css.d.ts.map +1 -1
- package/dist/components/select.css.js +54 -44
- package/dist/components/slider.css.d.ts.map +1 -1
- package/dist/components/slider.css.js +82 -46
- package/dist/components/spinner.css.d.ts.map +1 -1
- package/dist/components/spinner.css.js +28 -12
- package/dist/components/switch.css.d.ts.map +1 -1
- package/dist/components/switch.css.js +48 -46
- package/dist/components/tabs.css.d.ts +3 -0
- package/dist/components/tabs.css.d.ts.map +1 -0
- package/dist/components/tabs.css.js +102 -0
- package/dist/components/tag.css.d.ts.map +1 -1
- package/dist/components/tag.css.js +66 -57
- package/dist/components/text.css.d.ts.map +1 -1
- package/dist/components/text.css.js +13 -5
- package/dist/components/textInput.css.d.ts.map +1 -1
- package/dist/components/textInput.css.js +30 -28
- package/dist/components/textarea.css.d.ts.map +1 -1
- package/dist/components/textarea.css.js +30 -28
- package/dist/components/toast.css.d.ts.map +1 -1
- package/dist/components/toast.css.js +32 -24
- package/dist/components/tooltip.css.d.ts.map +1 -1
- package/dist/components/tooltip.css.js +17 -10
- package/package.json +2 -2
|
@@ -1,49 +1,69 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, vars } from "@blockle/blocks-core";
|
|
2
|
+
import { makeComponentTheme, layers, 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");
|
|
6
6
|
const link = makeComponentTheme("link", {
|
|
7
7
|
root: style([
|
|
8
8
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
"@layer": {
|
|
10
|
+
[layers.theme]: {
|
|
11
|
+
outline: "none",
|
|
12
|
+
border: "none",
|
|
13
|
+
textDecoration: "none",
|
|
14
|
+
background: "transparent",
|
|
15
|
+
borderRadius: 1,
|
|
16
|
+
":hover": {
|
|
17
|
+
textDecoration: "underline"
|
|
18
|
+
},
|
|
19
|
+
":focus-visible": {
|
|
20
|
+
textDecoration: "underline"
|
|
21
|
+
},
|
|
22
|
+
cursor: "pointer"
|
|
23
|
+
// selectors: {
|
|
24
|
+
// '&[target="_blank"]::after': {
|
|
25
|
+
// content: '"\\2197"',
|
|
26
|
+
// marginLeft: 4,
|
|
27
|
+
// },
|
|
28
|
+
// },
|
|
29
|
+
}
|
|
30
|
+
}
|
|
27
31
|
},
|
|
28
32
|
focusable
|
|
29
33
|
]),
|
|
30
34
|
variants: {
|
|
31
35
|
intent: {
|
|
32
36
|
inherit: style({
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
"@layer": {
|
|
38
|
+
[layers.theme]: {
|
|
39
|
+
color: "inherit",
|
|
40
|
+
fontWeight: "inherit"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
35
43
|
}),
|
|
36
44
|
primary: style({
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
"@layer": {
|
|
46
|
+
[layers.theme]: {
|
|
47
|
+
color: vars.colorRole.primary.foreground,
|
|
48
|
+
fontWeight: 500
|
|
49
|
+
}
|
|
50
|
+
}
|
|
39
51
|
}),
|
|
40
52
|
neutral: style({
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
"@layer": {
|
|
54
|
+
[layers.theme]: {
|
|
55
|
+
color: vars.colorRole.neutral.foreground,
|
|
56
|
+
fontWeight: 500
|
|
57
|
+
}
|
|
58
|
+
}
|
|
43
59
|
})
|
|
44
60
|
},
|
|
45
61
|
underline: style({
|
|
46
|
-
|
|
62
|
+
"@layer": {
|
|
63
|
+
[layers.theme]: {
|
|
64
|
+
textDecoration: "underline"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
47
67
|
})
|
|
48
68
|
},
|
|
49
69
|
defaultVariants: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.css.d.ts","sourceRoot":"","sources":["../../src/components/menu.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AA0B9B,eAAO,MAAM,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAwD7C,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
|
|
3
|
+
import { style, globalStyle } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/menu.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const hoverBackground = `color-mix(in srgb, ${vars.colorRole.text.default} 10%, transparent)`;
|
|
7
|
+
const itemIndicator = style({
|
|
8
|
+
"@layer": {
|
|
9
|
+
[layers.theme]: {
|
|
10
|
+
display: "inline-flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
flexShrink: 0,
|
|
14
|
+
width: "1em",
|
|
15
|
+
height: "1em"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
globalStyle(`${itemIndicator} > svg`, {
|
|
20
|
+
"@layer": {
|
|
21
|
+
[layers.theme]: { width: "100%", height: "100%" }
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const menu = makeComponentTheme("menu", {
|
|
25
|
+
// Sits on the popover surface (background, shadow, radius)
|
|
26
|
+
list: style({
|
|
27
|
+
"@layer": {
|
|
28
|
+
[layers.theme]: {
|
|
29
|
+
minWidth: "10rem",
|
|
30
|
+
// Popover caps a long list at the viewport's edge; the list scrolls
|
|
31
|
+
overflowY: "auto",
|
|
32
|
+
overscrollBehavior: "contain"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
item: style([
|
|
37
|
+
{
|
|
38
|
+
"@layer": {
|
|
39
|
+
[layers.theme]: {
|
|
40
|
+
borderRadius: vars.borderRadius[1],
|
|
41
|
+
paddingBlock: vars.space[1],
|
|
42
|
+
paddingInline: vars.space[2],
|
|
43
|
+
display: "flex",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
gap: vars.space[2],
|
|
46
|
+
width: "100%",
|
|
47
|
+
border: "none",
|
|
48
|
+
background: "transparent",
|
|
49
|
+
color: "inherit",
|
|
50
|
+
font: "inherit",
|
|
51
|
+
textAlign: "start",
|
|
52
|
+
cursor: "pointer",
|
|
53
|
+
selectors: {
|
|
54
|
+
'&:hover:not([aria-disabled="true"]), &:focus:not([aria-disabled="true"])': {
|
|
55
|
+
backgroundColor: hoverBackground
|
|
56
|
+
},
|
|
57
|
+
'&[aria-disabled="true"]': {
|
|
58
|
+
cursor: "default",
|
|
59
|
+
color: vars.colorRole.text.disabled
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
focusable
|
|
66
|
+
]),
|
|
67
|
+
// Holds the check; unchecked items keep the space so labels line up
|
|
68
|
+
itemIndicator,
|
|
69
|
+
separator: style({
|
|
70
|
+
"@layer": {
|
|
71
|
+
[layers.theme]: {
|
|
72
|
+
border: "none",
|
|
73
|
+
height: 1,
|
|
74
|
+
marginBlock: vars.space[1],
|
|
75
|
+
backgroundColor: `color-mix(in srgb, ${vars.colorRole.text.default} 15%, transparent)`
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
endFileScope();
|
|
81
|
+
export {
|
|
82
|
+
menu
|
|
83
|
+
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, vars,
|
|
2
|
+
import { makeComponentTheme, vars, layers } 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(
|
|
6
6
|
"popover",
|
|
7
7
|
{
|
|
8
|
-
root: style(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
root: style({
|
|
9
|
+
"@layer": {
|
|
10
|
+
[layers.theme]: {
|
|
11
|
+
borderRadius: vars.borderRadius[1],
|
|
12
|
+
boxShadow: vars.colorRole.shadow[2],
|
|
13
|
+
padding: vars.space[2],
|
|
14
|
+
margin: vars.space[1],
|
|
15
|
+
// Space between the popover and the anchor element
|
|
16
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
17
|
+
color: vars.colorRole.text.default,
|
|
18
|
+
width: "max-content",
|
|
19
|
+
selectors: {
|
|
20
|
+
"&:popover-open": {
|
|
21
|
+
transform: "translateY(0) scale(1)",
|
|
22
|
+
opacity: 1,
|
|
23
|
+
"@starting-style": {
|
|
24
|
+
transform: "translateY(12px) scale(0.8)",
|
|
25
|
+
opacity: 0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
30
|
+
"@media": {
|
|
31
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
32
|
+
// Ending style
|
|
25
33
|
transform: "translateY(12px) scale(0.8)",
|
|
26
|
-
opacity: 0
|
|
34
|
+
opacity: 0,
|
|
35
|
+
transitionBehavior: "allow-discrete",
|
|
36
|
+
transitionProperty: "opacity, transform, overlay, display",
|
|
37
|
+
transitionDuration: "100ms"
|
|
27
38
|
}
|
|
28
39
|
}
|
|
29
|
-
},
|
|
30
|
-
// Apply the animation only if the user has not requested reduced motion
|
|
31
|
-
"@media": {
|
|
32
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
33
|
-
// Ending style
|
|
34
|
-
transform: "translateY(12px) scale(0.8)",
|
|
35
|
-
opacity: 0,
|
|
36
|
-
transitionBehavior: "allow-discrete",
|
|
37
|
-
transitionProperty: "opacity, transform, overlay, display",
|
|
38
|
-
transitionDuration: "100ms"
|
|
39
|
-
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
})
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
endFileScope();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.css.d.ts","sourceRoot":"","sources":["../../src/components/progress.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAY9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"progress.css.d.ts","sourceRoot":"","sources":["../../src/components/progress.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAY9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAmDtD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, vars,
|
|
2
|
+
import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
|
|
3
3
|
import { style, keyframes } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/progress.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const indeterminateAnimation = keyframes({
|
|
@@ -13,41 +13,49 @@ const indeterminateAnimation = keyframes({
|
|
|
13
13
|
const progress = makeComponentTheme(
|
|
14
14
|
"progress",
|
|
15
15
|
{
|
|
16
|
-
root: style(
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
16
|
+
root: style({
|
|
17
|
+
"@layer": {
|
|
18
|
+
[layers.theme]: {
|
|
19
|
+
height: 8,
|
|
20
|
+
backgroundColor: vars.colorRole.surface.sunken,
|
|
21
|
+
color: vars.colorRole.primary.solid,
|
|
22
|
+
inlineSize: "100%",
|
|
23
|
+
borderRadius: vars.borderRadius[1],
|
|
24
|
+
overflow: "hidden"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}),
|
|
28
28
|
bar: style({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
"@layer": {
|
|
30
|
+
[layers.theme]: {
|
|
31
|
+
borderRadius: "inherit",
|
|
32
|
+
"@media": {
|
|
33
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
34
|
+
transition: "transform 180ms ease-out"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
}),
|
|
36
40
|
variants: {
|
|
37
41
|
indeterminate: style({
|
|
38
|
-
"@
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
"@layer": {
|
|
43
|
+
[layers.theme]: {
|
|
44
|
+
"@media": {
|
|
45
|
+
// For reduce motion we show a striped pattern instead of animating
|
|
46
|
+
"(prefers-reduced-motion: reduce)": {
|
|
47
|
+
backgroundImage: `repeating-linear-gradient(
|
|
42
48
|
45deg,
|
|
43
49
|
transparent,
|
|
44
50
|
transparent 20px,
|
|
45
51
|
${vars.colorRole.primary.solidHover} 20px,
|
|
46
52
|
${vars.colorRole.primary.solidHover} 40px
|
|
47
53
|
)`
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
},
|
|
55
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
56
|
+
animation: `${indeterminateAnimation} 3s ease-in-out infinite`
|
|
57
|
+
}
|
|
58
|
+
}
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
61
|
})
|
|
@@ -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,CAiEhD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
2
|
+
import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
import { focusable } from "./helpers.css.js";
|
|
5
5
|
import { bounceOut } from "./transitions.js";
|
|
@@ -9,52 +9,64 @@ const radio = makeComponentTheme(
|
|
|
9
9
|
{
|
|
10
10
|
root: style([
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
"@layer": {
|
|
13
|
+
[layers.theme]: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
inlineSize: 24,
|
|
18
|
+
blockSize: 24,
|
|
19
|
+
borderRadius: 12,
|
|
20
|
+
backgroundColor: vars.colorRole.primary.subtle,
|
|
21
|
+
"@media": {
|
|
22
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
23
|
+
transition: `background-color ${vars.transition.fast}, box-shadow ${vars.transition.fast}`
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
":hover": {
|
|
27
|
+
backgroundColor: vars.colorRole.primary.solidHover
|
|
28
|
+
},
|
|
29
|
+
selectors: {
|
|
30
|
+
"&:has(input:checked):not(:hover)": {
|
|
31
|
+
backgroundColor: vars.colorRole.primary.solid
|
|
32
|
+
}
|
|
33
|
+
}
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
|
-
{ backgroundColor: vars.colorRole.primary.subtle },
|
|
33
37
|
focusable
|
|
34
38
|
]),
|
|
35
39
|
icon: style({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
"@layer": {
|
|
41
|
+
[layers.theme]: {
|
|
42
|
+
height: 12,
|
|
43
|
+
width: 12,
|
|
44
|
+
backgroundColor: vars.colorRole.primary.contrast,
|
|
45
|
+
borderRadius: "8px",
|
|
46
|
+
transform: "scale(0)",
|
|
47
|
+
"@media": {
|
|
48
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
49
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
selectors: {
|
|
53
|
+
"input:checked ~ &": {
|
|
54
|
+
transform: "scale(1)"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}),
|
|
52
|
-
label:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
label: style({
|
|
61
|
+
"@layer": {
|
|
62
|
+
[layers.theme]: {
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexDirection: "row",
|
|
65
|
+
padding: vars.space[1],
|
|
66
|
+
gap: vars.space[2],
|
|
67
|
+
cursor: "pointer"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
58
70
|
})
|
|
59
71
|
}
|
|
60
72
|
);
|
|
@@ -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;
|
|
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;AAU9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA4ElD,CAAC"}
|
|
@@ -1,69 +1,79 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
2
|
+
import { makeComponentTheme, vars, layers } 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/select.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const chevronRoom = `calc(${vars.space[3]} + 1rem + ${vars.space[2]})`;
|
|
6
7
|
const select = makeComponentTheme(
|
|
7
8
|
"select",
|
|
8
9
|
{
|
|
9
10
|
select: style([
|
|
10
|
-
atoms({
|
|
11
|
-
paddingBlock: 1,
|
|
12
|
-
borderRadius: 2,
|
|
13
|
-
boxShadow: 2
|
|
14
|
-
}),
|
|
15
11
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
"@layer": {
|
|
13
|
+
[layers.theme]: {
|
|
14
|
+
paddingBlock: vars.space[1],
|
|
15
|
+
borderRadius: vars.borderRadius[2],
|
|
16
|
+
boxShadow: vars.colorRole.shadow[2],
|
|
17
|
+
border: "none",
|
|
18
|
+
outline: "none",
|
|
19
|
+
color: vars.colorRole.text.default,
|
|
20
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
21
|
+
transitionDuration: vars.transition.fast,
|
|
22
|
+
transitionProperty: "outline-color, outline-offset"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
22
25
|
},
|
|
23
26
|
focusable
|
|
24
27
|
]),
|
|
25
28
|
variants: {
|
|
26
29
|
variant: {
|
|
27
|
-
outline: style(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
outline: style({
|
|
31
|
+
"@layer": {
|
|
32
|
+
[layers.theme]: {
|
|
33
|
+
borderWidth: vars.borderWidth.thin,
|
|
34
|
+
borderStyle: "solid",
|
|
35
|
+
borderColor: vars.colorRole.primary.solid
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
solid:
|
|
38
|
+
}),
|
|
39
|
+
solid: ""
|
|
37
40
|
},
|
|
38
41
|
size: {
|
|
39
|
-
small: style(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
small: style({
|
|
43
|
+
"@layer": {
|
|
44
|
+
[layers.theme]: {
|
|
45
|
+
paddingInlineStart: vars.space[3],
|
|
46
|
+
paddingInlineEnd: chevronRoom,
|
|
47
|
+
minHeight: 40
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
|
-
|
|
47
|
-
medium: style(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
}),
|
|
51
|
+
medium: style({
|
|
52
|
+
"@layer": {
|
|
53
|
+
[layers.theme]: {
|
|
54
|
+
paddingInlineStart: vars.space[4],
|
|
55
|
+
paddingInlineEnd: chevronRoom,
|
|
56
|
+
minHeight: 48
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
|
-
|
|
55
|
-
large: style(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
}),
|
|
60
|
+
large: style({
|
|
61
|
+
"@layer": {
|
|
62
|
+
[layers.theme]: {
|
|
63
|
+
paddingInlineStart: vars.space[5],
|
|
64
|
+
paddingInlineEnd: chevronRoom,
|
|
65
|
+
minHeight: 56
|
|
66
|
+
}
|
|
61
67
|
}
|
|
62
|
-
|
|
68
|
+
})
|
|
63
69
|
}
|
|
64
70
|
},
|
|
65
|
-
icon:
|
|
66
|
-
|
|
71
|
+
icon: style({
|
|
72
|
+
"@layer": {
|
|
73
|
+
[layers.theme]: {
|
|
74
|
+
paddingInline: vars.space[3]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
67
77
|
}),
|
|
68
78
|
defaultVariants: {
|
|
69
79
|
size: "medium",
|
|
@@ -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;AAW9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,
|
|
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,CA0HlD,CAAC"}
|