@blockle/blocks-theme-momotaro 7.1.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 +26 -121
- package/dist/components/buttonBase.css.d.ts +21 -0
- package/dist/components/buttonBase.css.d.ts.map +1 -0
- package/dist/components/buttonBase.css.js +158 -0
- 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 +3 -0
- package/dist/components/iconButton.css.d.ts.map +1 -0
- package/dist/components/iconButton.css.js +62 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +8 -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 +49 -29
- 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 +3 -0
- package/dist/components/tag.css.d.ts.map +1 -0
- package/dist/components/tag.css.js +109 -0
- 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 +1 @@
|
|
|
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;
|
|
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;AAgB9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAsBhD,CAAC"}
|
|
@@ -1,20 +1,28 @@
|
|
|
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/alert.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
5
|
const intentStyle = (roles) => style({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"@layer": {
|
|
7
|
+
[layers.theme]: {
|
|
8
|
+
backgroundColor: roles.subtle,
|
|
9
|
+
color: roles.foreground,
|
|
10
|
+
borderColor: roles.border
|
|
11
|
+
}
|
|
12
|
+
}
|
|
9
13
|
});
|
|
10
14
|
const alert = makeComponentTheme(
|
|
11
15
|
"alert",
|
|
12
16
|
{
|
|
13
|
-
root:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
root: style({
|
|
18
|
+
"@layer": {
|
|
19
|
+
[layers.theme]: {
|
|
20
|
+
borderWidth: vars.borderWidth.thin,
|
|
21
|
+
borderStyle: "solid",
|
|
22
|
+
padding: vars.space[2],
|
|
23
|
+
borderRadius: vars.borderRadius[2]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
18
26
|
}),
|
|
19
27
|
variants: {
|
|
20
28
|
intent: {
|
|
@@ -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;AAqB9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAgClD,CAAC"}
|
|
@@ -1,136 +1,41 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme, vars,
|
|
3
|
-
import { style
|
|
4
|
-
import {
|
|
2
|
+
import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
import { buttonIntent, buttonVariant, buttonBase, buttonRadius, buttonHeight } from "./buttonBase.css.js";
|
|
5
5
|
setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const sizeStyle = (paddingInline, minHeight) => style({
|
|
7
|
+
"@layer": {
|
|
8
|
+
[layers.theme]: {
|
|
9
|
+
paddingInline,
|
|
10
|
+
minHeight
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
10
14
|
const button = makeComponentTheme(
|
|
11
15
|
"button",
|
|
12
16
|
{
|
|
13
17
|
root: style([
|
|
14
|
-
atoms({
|
|
15
|
-
display: "inline-flex",
|
|
16
|
-
placeItems: "center",
|
|
17
|
-
fontSize: "medium",
|
|
18
|
-
borderRadius: 2,
|
|
19
|
-
fontWeight: "medium",
|
|
20
|
-
gap: 2,
|
|
21
|
-
paddingBlock: 1
|
|
22
|
-
}),
|
|
23
18
|
{
|
|
24
|
-
|
|
19
|
+
"@layer": {
|
|
20
|
+
[layers.theme]: {
|
|
21
|
+
fontSize: vars.fontSize.medium,
|
|
22
|
+
fontWeight: vars.fontWeight.medium,
|
|
23
|
+
gap: vars.space[2],
|
|
24
|
+
paddingBlock: vars.space[1]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
25
27
|
},
|
|
26
|
-
|
|
28
|
+
buttonBase,
|
|
29
|
+
buttonRadius
|
|
27
30
|
]),
|
|
28
31
|
variants: {
|
|
29
|
-
variant:
|
|
30
|
-
solid: style({
|
|
31
|
-
color: contrastColor,
|
|
32
|
-
backgroundColor: solidColor,
|
|
33
|
-
border: "none",
|
|
34
|
-
selectors: {
|
|
35
|
-
"&:hover:not(:disabled)": {
|
|
36
|
-
backgroundColor: solidHoverColor
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
outline: style([
|
|
41
|
-
atoms({
|
|
42
|
-
borderWidth: "thin"
|
|
43
|
-
}),
|
|
44
|
-
{
|
|
45
|
-
color: solidColor,
|
|
46
|
-
borderStyle: "solid",
|
|
47
|
-
borderColor: solidColor,
|
|
48
|
-
background: "transparent",
|
|
49
|
-
selectors: {
|
|
50
|
-
"&:hover:not(:disabled)": {
|
|
51
|
-
backgroundColor: subtleColor
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
]),
|
|
56
|
-
ghost: style({
|
|
57
|
-
color: solidColor,
|
|
58
|
-
background: "transparent",
|
|
59
|
-
selectors: {
|
|
60
|
-
"&:hover:not(:disabled)": {
|
|
61
|
-
backgroundColor: subtleColor
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
},
|
|
32
|
+
variant: buttonVariant,
|
|
66
33
|
size: {
|
|
67
|
-
small:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}),
|
|
71
|
-
{
|
|
72
|
-
minHeight: 40
|
|
73
|
-
}
|
|
74
|
-
]),
|
|
75
|
-
medium: style([
|
|
76
|
-
atoms({
|
|
77
|
-
paddingInline: 4
|
|
78
|
-
}),
|
|
79
|
-
{
|
|
80
|
-
minHeight: 48
|
|
81
|
-
}
|
|
82
|
-
]),
|
|
83
|
-
large: style([
|
|
84
|
-
atoms({
|
|
85
|
-
paddingInline: 5
|
|
86
|
-
}),
|
|
87
|
-
{
|
|
88
|
-
minHeight: 56
|
|
89
|
-
}
|
|
90
|
-
])
|
|
34
|
+
small: sizeStyle(vars.space[3], buttonHeight.small),
|
|
35
|
+
medium: sizeStyle(vars.space[4], buttonHeight.medium),
|
|
36
|
+
large: sizeStyle(vars.space[5], buttonHeight.large)
|
|
91
37
|
},
|
|
92
|
-
intent:
|
|
93
|
-
neutral: style({
|
|
94
|
-
vars: {
|
|
95
|
-
[solidColor]: vars.colorRole.neutral.solid,
|
|
96
|
-
[solidHoverColor]: vars.colorRole.neutral.solidHover,
|
|
97
|
-
[subtleColor]: vars.colorRole.neutral.subtle,
|
|
98
|
-
[contrastColor]: vars.colorRole.neutral.contrast
|
|
99
|
-
}
|
|
100
|
-
}),
|
|
101
|
-
primary: style({
|
|
102
|
-
vars: {
|
|
103
|
-
[solidColor]: vars.colorRole.primary.solid,
|
|
104
|
-
[solidHoverColor]: vars.colorRole.primary.solidHover,
|
|
105
|
-
[subtleColor]: vars.colorRole.primary.subtle,
|
|
106
|
-
[contrastColor]: vars.colorRole.primary.contrast
|
|
107
|
-
}
|
|
108
|
-
}),
|
|
109
|
-
secondary: style({
|
|
110
|
-
vars: {
|
|
111
|
-
[solidColor]: vars.colorRole.secondary.solid,
|
|
112
|
-
[solidHoverColor]: vars.colorRole.secondary.solidHover,
|
|
113
|
-
[subtleColor]: vars.colorRole.secondary.subtle,
|
|
114
|
-
[contrastColor]: vars.colorRole.secondary.contrast
|
|
115
|
-
}
|
|
116
|
-
}),
|
|
117
|
-
success: style({
|
|
118
|
-
vars: {
|
|
119
|
-
[solidColor]: vars.colorRole.success.solid,
|
|
120
|
-
[solidHoverColor]: vars.colorRole.success.solidHover,
|
|
121
|
-
[subtleColor]: vars.colorRole.success.subtle,
|
|
122
|
-
[contrastColor]: vars.colorRole.success.contrast
|
|
123
|
-
}
|
|
124
|
-
}),
|
|
125
|
-
danger: style({
|
|
126
|
-
vars: {
|
|
127
|
-
[solidColor]: vars.colorRole.danger.solid,
|
|
128
|
-
[solidHoverColor]: vars.colorRole.danger.solidHover,
|
|
129
|
-
[subtleColor]: vars.colorRole.danger.subtle,
|
|
130
|
-
[contrastColor]: vars.colorRole.danger.contrast
|
|
131
|
-
}
|
|
132
|
-
})
|
|
133
|
-
}
|
|
38
|
+
intent: buttonIntent
|
|
134
39
|
},
|
|
135
40
|
defaultVariants: {
|
|
136
41
|
size: "medium",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const buttonHeight: {
|
|
2
|
+
readonly small: 40;
|
|
3
|
+
readonly medium: 48;
|
|
4
|
+
readonly large: 56;
|
|
5
|
+
};
|
|
6
|
+
export declare const buttonBase: string;
|
|
7
|
+
export declare const buttonRadius: string;
|
|
8
|
+
export declare const buttonVariant: {
|
|
9
|
+
solid: string;
|
|
10
|
+
outline: string;
|
|
11
|
+
ghost: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const buttonIntent: {
|
|
14
|
+
neutral: string;
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
success: string;
|
|
18
|
+
danger: string;
|
|
19
|
+
inherit: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=buttonBase.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonBase.css.d.ts","sourceRoot":"","sources":["../../src/components/buttonBase.css.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,UAAU,QAUrB,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;CA4CzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAwExB,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { layers, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
4
|
+
import { clickable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/buttonBase.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const solidColor = createVar();
|
|
7
|
+
const solidHoverColor = createVar();
|
|
8
|
+
const subtleColor = createVar();
|
|
9
|
+
const contrastColor = createVar();
|
|
10
|
+
const buttonHeight = {
|
|
11
|
+
small: 40,
|
|
12
|
+
medium: 48,
|
|
13
|
+
large: 56
|
|
14
|
+
};
|
|
15
|
+
const buttonBase = style([
|
|
16
|
+
{
|
|
17
|
+
"@layer": {
|
|
18
|
+
[layers.theme]: {
|
|
19
|
+
display: "inline-flex",
|
|
20
|
+
placeItems: "center"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
clickable
|
|
25
|
+
]);
|
|
26
|
+
const buttonRadius = style({
|
|
27
|
+
"@layer": {
|
|
28
|
+
[layers.theme]: {
|
|
29
|
+
borderRadius: vars.borderRadius[2]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const buttonVariant = {
|
|
34
|
+
solid: style({
|
|
35
|
+
"@layer": {
|
|
36
|
+
[layers.theme]: {
|
|
37
|
+
color: contrastColor,
|
|
38
|
+
backgroundColor: solidColor,
|
|
39
|
+
border: "none",
|
|
40
|
+
selectors: {
|
|
41
|
+
"&:hover:not(:disabled)": {
|
|
42
|
+
backgroundColor: solidHoverColor
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
outline: style({
|
|
49
|
+
"@layer": {
|
|
50
|
+
[layers.theme]: {
|
|
51
|
+
borderWidth: vars.borderWidth.thin,
|
|
52
|
+
color: solidColor,
|
|
53
|
+
borderStyle: "solid",
|
|
54
|
+
borderColor: solidColor,
|
|
55
|
+
background: "transparent",
|
|
56
|
+
selectors: {
|
|
57
|
+
"&:hover:not(:disabled)": {
|
|
58
|
+
backgroundColor: subtleColor
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
ghost: style({
|
|
65
|
+
"@layer": {
|
|
66
|
+
[layers.theme]: {
|
|
67
|
+
color: solidColor,
|
|
68
|
+
background: "transparent",
|
|
69
|
+
selectors: {
|
|
70
|
+
"&:hover:not(:disabled)": {
|
|
71
|
+
backgroundColor: subtleColor
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
const buttonIntent = {
|
|
79
|
+
neutral: style({
|
|
80
|
+
"@layer": {
|
|
81
|
+
[layers.theme]: {
|
|
82
|
+
vars: {
|
|
83
|
+
[solidColor]: vars.colorRole.neutral.solid,
|
|
84
|
+
[solidHoverColor]: vars.colorRole.neutral.solidHover,
|
|
85
|
+
[subtleColor]: vars.colorRole.neutral.subtle,
|
|
86
|
+
[contrastColor]: vars.colorRole.neutral.contrast
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
primary: style({
|
|
92
|
+
"@layer": {
|
|
93
|
+
[layers.theme]: {
|
|
94
|
+
vars: {
|
|
95
|
+
[solidColor]: vars.colorRole.primary.solid,
|
|
96
|
+
[solidHoverColor]: vars.colorRole.primary.solidHover,
|
|
97
|
+
[subtleColor]: vars.colorRole.primary.subtle,
|
|
98
|
+
[contrastColor]: vars.colorRole.primary.contrast
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
secondary: style({
|
|
104
|
+
"@layer": {
|
|
105
|
+
[layers.theme]: {
|
|
106
|
+
vars: {
|
|
107
|
+
[solidColor]: vars.colorRole.secondary.solid,
|
|
108
|
+
[solidHoverColor]: vars.colorRole.secondary.solidHover,
|
|
109
|
+
[subtleColor]: vars.colorRole.secondary.subtle,
|
|
110
|
+
[contrastColor]: vars.colorRole.secondary.contrast
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
success: style({
|
|
116
|
+
"@layer": {
|
|
117
|
+
[layers.theme]: {
|
|
118
|
+
vars: {
|
|
119
|
+
[solidColor]: vars.colorRole.success.solid,
|
|
120
|
+
[solidHoverColor]: vars.colorRole.success.solidHover,
|
|
121
|
+
[subtleColor]: vars.colorRole.success.subtle,
|
|
122
|
+
[contrastColor]: vars.colorRole.success.contrast
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}),
|
|
127
|
+
danger: style({
|
|
128
|
+
"@layer": {
|
|
129
|
+
[layers.theme]: {
|
|
130
|
+
vars: {
|
|
131
|
+
[solidColor]: vars.colorRole.danger.solid,
|
|
132
|
+
[solidHoverColor]: vars.colorRole.danger.solidHover,
|
|
133
|
+
[subtleColor]: vars.colorRole.danger.subtle,
|
|
134
|
+
[contrastColor]: vars.colorRole.danger.contrast
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
// Takes the surrounding text color; only used with the ghost and outline variants
|
|
140
|
+
inherit: style({
|
|
141
|
+
"@layer": {
|
|
142
|
+
[layers.theme]: {
|
|
143
|
+
vars: {
|
|
144
|
+
[solidColor]: "currentColor",
|
|
145
|
+
[subtleColor]: "color-mix(in srgb, currentColor 12%, transparent)"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
};
|
|
151
|
+
endFileScope();
|
|
152
|
+
export {
|
|
153
|
+
buttonBase,
|
|
154
|
+
buttonHeight,
|
|
155
|
+
buttonIntent,
|
|
156
|
+
buttonRadius,
|
|
157
|
+
buttonVariant
|
|
158
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAgEtD,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,53 +9,63 @@ const checkbox = 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
|
-
|
|
12
|
+
"@layer": {
|
|
13
|
+
[layers.theme]: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
inlineSize: 24,
|
|
18
|
+
blockSize: 24,
|
|
19
|
+
borderRadius: vars.borderRadius[1],
|
|
20
|
+
backgroundColor: vars.colorRole.primary.subtle,
|
|
21
|
+
"@media": {
|
|
22
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
23
|
+
transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
selectors: {
|
|
27
|
+
"&:hover:not(:has(input:disabled))": {
|
|
28
|
+
backgroundColor: vars.colorRole.primary.solidHover
|
|
29
|
+
},
|
|
30
|
+
"&:has(input:checked)": {
|
|
31
|
+
backgroundColor: vars.colorRole.primary.solid
|
|
32
|
+
}
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
|
-
atoms({
|
|
32
|
-
borderRadius: 1
|
|
33
|
-
}),
|
|
34
|
-
{ backgroundColor: vars.colorRole.primary.subtle },
|
|
35
37
|
focusable
|
|
36
38
|
]),
|
|
37
39
|
icon: style({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
"@layer": {
|
|
41
|
+
[layers.theme]: {
|
|
42
|
+
inlineSize: "1rem",
|
|
43
|
+
blockSize: "1rem",
|
|
44
|
+
color: vars.colorRole.primary.contrast,
|
|
45
|
+
transform: "scale(0)",
|
|
46
|
+
selectors: {
|
|
47
|
+
"input:checked ~ &": {
|
|
48
|
+
transform: "scale(1)"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"@media": {
|
|
52
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
53
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`
|
|
54
|
+
}
|
|
55
|
+
}
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
}),
|
|
53
|
-
label:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
label: style({
|
|
60
|
+
"@layer": {
|
|
61
|
+
[layers.theme]: {
|
|
62
|
+
display: "flex",
|
|
63
|
+
flexDirection: "row",
|
|
64
|
+
padding: vars.space[1],
|
|
65
|
+
gap: vars.space[2],
|
|
66
|
+
cursor: "pointer"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
59
69
|
})
|
|
60
70
|
}
|
|
61
71
|
);
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAwFlD,CAAC"}
|
|
@@ -1,76 +1,88 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
2
|
+
import { makeComponentTheme, layers, vars } 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(
|
|
6
6
|
"dialog",
|
|
7
7
|
{
|
|
8
|
-
dialog: style(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
backgroundColor: vars.colorRole.overlay.default
|
|
25
|
-
},
|
|
26
|
-
selectors: {
|
|
27
|
-
"&[open]": {
|
|
28
|
-
transform: "translate(0, 0)",
|
|
29
|
-
opacity: 1,
|
|
30
|
-
"@starting-style": {
|
|
31
|
-
transform: "translate(0, -120px) scale(0.95)",
|
|
32
|
-
opacity: 0
|
|
33
|
-
}
|
|
8
|
+
dialog: style({
|
|
9
|
+
"@layer": {
|
|
10
|
+
[layers.theme]: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
padding: vars.space[5],
|
|
14
|
+
border: "none",
|
|
15
|
+
overflow: "auto",
|
|
16
|
+
borderRadius: vars.borderRadius[2],
|
|
17
|
+
boxShadow: vars.colorRole.shadow[3],
|
|
18
|
+
backgroundColor: vars.colorRole.surface.raised,
|
|
19
|
+
color: vars.colorRole.text.default,
|
|
20
|
+
maxHeight: "90%",
|
|
21
|
+
minWidth: "300px",
|
|
22
|
+
"::backdrop": {
|
|
23
|
+
backgroundColor: vars.colorRole.overlay.default
|
|
34
24
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
opacity:
|
|
25
|
+
selectors: {
|
|
26
|
+
"&[open]": {
|
|
27
|
+
transform: "translate(0, 0)",
|
|
28
|
+
opacity: 1,
|
|
29
|
+
"@starting-style": {
|
|
30
|
+
transform: "translate(0, -120px) scale(0.95)",
|
|
31
|
+
opacity: 0
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"&[open]::backdrop": {
|
|
35
|
+
opacity: 1,
|
|
36
|
+
"@starting-style": {
|
|
37
|
+
opacity: 0
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
transform: "translate(0, -120px) scale(0.95)",
|
|
47
|
-
opacity: 0,
|
|
48
|
-
transitionBehavior: "allow-discrete",
|
|
49
|
-
transitionProperty: "opacity, transform, overlay, display",
|
|
50
|
-
transitionDuration: "240ms, 160ms, 240ms, 240ms",
|
|
51
|
-
"::backdrop": {
|
|
40
|
+
},
|
|
41
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
42
|
+
"@media": {
|
|
43
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
44
|
+
// Ending style
|
|
45
|
+
transform: "translate(0, -120px) scale(0.95)",
|
|
52
46
|
opacity: 0,
|
|
53
47
|
transitionBehavior: "allow-discrete",
|
|
54
|
-
transitionProperty: "opacity, overlay, display",
|
|
55
|
-
transitionDuration: "160ms, 240ms, 240ms"
|
|
48
|
+
transitionProperty: "opacity, transform, overlay, display",
|
|
49
|
+
transitionDuration: "240ms, 160ms, 240ms, 240ms",
|
|
50
|
+
"::backdrop": {
|
|
51
|
+
opacity: 0,
|
|
52
|
+
transitionBehavior: "allow-discrete",
|
|
53
|
+
transitionProperty: "opacity, overlay, display",
|
|
54
|
+
transitionDuration: "160ms, 240ms, 240ms"
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
}),
|
|
61
61
|
variants: {
|
|
62
62
|
size: {
|
|
63
63
|
small: style({
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
"@layer": {
|
|
65
|
+
[layers.theme]: {
|
|
66
|
+
width: "400px",
|
|
67
|
+
maxWidth: "min(400px, 90%)"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
66
70
|
}),
|
|
67
71
|
medium: style({
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
"@layer": {
|
|
73
|
+
[layers.theme]: {
|
|
74
|
+
width: "600px",
|
|
75
|
+
maxWidth: "min(600px, 90%)"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
70
78
|
}),
|
|
71
79
|
large: style({
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
"@layer": {
|
|
81
|
+
[layers.theme]: {
|
|
82
|
+
width: "800px",
|
|
83
|
+
maxWidth: "min(800px, 90%)"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
74
86
|
})
|
|
75
87
|
}
|
|
76
88
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.css.d.ts","sourceRoot":"","sources":["../../src/components/divider.css.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"divider.css.d.ts","sourceRoot":"","sources":["../../src/components/divider.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CA+CpD,CAAC"}
|