@blockle/blocks-theme-momotaro 7.1.0 → 7.2.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.d.ts.map +1 -1
- package/dist/components/button.css.js +10 -96
- 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 +118 -0
- 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 +51 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/link.css.js +4 -4
- 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 +100 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAiDlD,CAAC"}
|
|
@@ -1,75 +1,30 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { makeComponentTheme,
|
|
3
|
-
import { style
|
|
4
|
-
import {
|
|
2
|
+
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
import { buttonIntent, buttonVariant, buttonHeight, buttonBase, buttonRadius } from "./buttonBase.css.js";
|
|
5
5
|
setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
-
const solidColor = createVar();
|
|
7
|
-
const solidHoverColor = createVar();
|
|
8
|
-
const subtleColor = createVar();
|
|
9
|
-
const contrastColor = createVar();
|
|
10
6
|
const button = makeComponentTheme(
|
|
11
7
|
"button",
|
|
12
8
|
{
|
|
13
9
|
root: style([
|
|
14
10
|
atoms({
|
|
15
|
-
display: "inline-flex",
|
|
16
|
-
placeItems: "center",
|
|
17
11
|
fontSize: "medium",
|
|
18
|
-
borderRadius: 2,
|
|
19
12
|
fontWeight: "medium",
|
|
20
13
|
gap: 2,
|
|
21
14
|
paddingBlock: 1
|
|
22
15
|
}),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
clickable
|
|
16
|
+
buttonBase,
|
|
17
|
+
buttonRadius
|
|
27
18
|
]),
|
|
28
19
|
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
|
-
},
|
|
20
|
+
variant: buttonVariant,
|
|
66
21
|
size: {
|
|
67
22
|
small: style([
|
|
68
23
|
atoms({
|
|
69
24
|
paddingInline: 3
|
|
70
25
|
}),
|
|
71
26
|
{
|
|
72
|
-
minHeight:
|
|
27
|
+
minHeight: buttonHeight.small
|
|
73
28
|
}
|
|
74
29
|
]),
|
|
75
30
|
medium: style([
|
|
@@ -77,7 +32,7 @@ const button = makeComponentTheme(
|
|
|
77
32
|
paddingInline: 4
|
|
78
33
|
}),
|
|
79
34
|
{
|
|
80
|
-
minHeight:
|
|
35
|
+
minHeight: buttonHeight.medium
|
|
81
36
|
}
|
|
82
37
|
]),
|
|
83
38
|
large: style([
|
|
@@ -85,52 +40,11 @@ const button = makeComponentTheme(
|
|
|
85
40
|
paddingInline: 5
|
|
86
41
|
}),
|
|
87
42
|
{
|
|
88
|
-
minHeight:
|
|
43
|
+
minHeight: buttonHeight.large
|
|
89
44
|
}
|
|
90
45
|
])
|
|
91
46
|
},
|
|
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
|
-
}
|
|
47
|
+
intent: buttonIntent
|
|
134
48
|
},
|
|
135
49
|
defaultVariants: {
|
|
136
50
|
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: any;
|
|
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,QAMrB,CAAC;AAEH,eAAO,MAAM,YAAY,KAEvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;CAoCzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAgDxB,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { vars, atoms } 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
|
+
atoms({
|
|
17
|
+
display: "inline-flex",
|
|
18
|
+
placeItems: "center"
|
|
19
|
+
}),
|
|
20
|
+
clickable
|
|
21
|
+
]);
|
|
22
|
+
const buttonRadius = atoms({
|
|
23
|
+
borderRadius: 2
|
|
24
|
+
});
|
|
25
|
+
const buttonVariant = {
|
|
26
|
+
solid: style({
|
|
27
|
+
color: contrastColor,
|
|
28
|
+
backgroundColor: solidColor,
|
|
29
|
+
border: "none",
|
|
30
|
+
selectors: {
|
|
31
|
+
"&:hover:not(:disabled)": {
|
|
32
|
+
backgroundColor: solidHoverColor
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
outline: style([
|
|
37
|
+
atoms({
|
|
38
|
+
borderWidth: "thin"
|
|
39
|
+
}),
|
|
40
|
+
{
|
|
41
|
+
color: solidColor,
|
|
42
|
+
borderStyle: "solid",
|
|
43
|
+
borderColor: solidColor,
|
|
44
|
+
background: "transparent",
|
|
45
|
+
selectors: {
|
|
46
|
+
"&:hover:not(:disabled)": {
|
|
47
|
+
backgroundColor: subtleColor
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]),
|
|
52
|
+
ghost: style({
|
|
53
|
+
color: solidColor,
|
|
54
|
+
background: "transparent",
|
|
55
|
+
selectors: {
|
|
56
|
+
"&:hover:not(:disabled)": {
|
|
57
|
+
backgroundColor: subtleColor
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
const buttonIntent = {
|
|
63
|
+
neutral: style({
|
|
64
|
+
vars: {
|
|
65
|
+
[solidColor]: vars.colorRole.neutral.solid,
|
|
66
|
+
[solidHoverColor]: vars.colorRole.neutral.solidHover,
|
|
67
|
+
[subtleColor]: vars.colorRole.neutral.subtle,
|
|
68
|
+
[contrastColor]: vars.colorRole.neutral.contrast
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
primary: style({
|
|
72
|
+
vars: {
|
|
73
|
+
[solidColor]: vars.colorRole.primary.solid,
|
|
74
|
+
[solidHoverColor]: vars.colorRole.primary.solidHover,
|
|
75
|
+
[subtleColor]: vars.colorRole.primary.subtle,
|
|
76
|
+
[contrastColor]: vars.colorRole.primary.contrast
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
secondary: style({
|
|
80
|
+
vars: {
|
|
81
|
+
[solidColor]: vars.colorRole.secondary.solid,
|
|
82
|
+
[solidHoverColor]: vars.colorRole.secondary.solidHover,
|
|
83
|
+
[subtleColor]: vars.colorRole.secondary.subtle,
|
|
84
|
+
[contrastColor]: vars.colorRole.secondary.contrast
|
|
85
|
+
}
|
|
86
|
+
}),
|
|
87
|
+
success: style({
|
|
88
|
+
vars: {
|
|
89
|
+
[solidColor]: vars.colorRole.success.solid,
|
|
90
|
+
[solidHoverColor]: vars.colorRole.success.solidHover,
|
|
91
|
+
[subtleColor]: vars.colorRole.success.subtle,
|
|
92
|
+
[contrastColor]: vars.colorRole.success.contrast
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
danger: style({
|
|
96
|
+
vars: {
|
|
97
|
+
[solidColor]: vars.colorRole.danger.solid,
|
|
98
|
+
[solidHoverColor]: vars.colorRole.danger.solidHover,
|
|
99
|
+
[subtleColor]: vars.colorRole.danger.subtle,
|
|
100
|
+
[contrastColor]: vars.colorRole.danger.contrast
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
// Takes the surrounding text color; only used with the ghost and outline variants
|
|
104
|
+
inherit: style({
|
|
105
|
+
vars: {
|
|
106
|
+
[solidColor]: "currentColor",
|
|
107
|
+
[subtleColor]: "color-mix(in srgb, currentColor 12%, transparent)"
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
endFileScope();
|
|
112
|
+
export {
|
|
113
|
+
buttonBase,
|
|
114
|
+
buttonHeight,
|
|
115
|
+
buttonIntent,
|
|
116
|
+
buttonRadius,
|
|
117
|
+
buttonVariant
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconButton.css.d.ts","sourceRoot":"","sources":["../../src/components/iconButton.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AA8B9B,eAAO,MAAM,UAAU,EAAE,qBAAqB,CAAC,YAAY,CA0BvD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
3
|
+
import { style, globalStyle } from "@vanilla-extract/css";
|
|
4
|
+
import { buttonIntent, buttonRadius, buttonVariant, buttonBase, buttonHeight } from "./buttonBase.css.js";
|
|
5
|
+
setFileScope("src/components/iconButton.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const sizeStyles = {
|
|
7
|
+
small: style({ blockSize: buttonHeight.small }),
|
|
8
|
+
medium: style({ blockSize: buttonHeight.medium }),
|
|
9
|
+
large: style({ blockSize: buttonHeight.large })
|
|
10
|
+
};
|
|
11
|
+
const iconSize = {
|
|
12
|
+
small: 20,
|
|
13
|
+
medium: 24,
|
|
14
|
+
large: 28
|
|
15
|
+
};
|
|
16
|
+
for (const key of ["small", "medium", "large"]) {
|
|
17
|
+
globalStyle(`${sizeStyles[key]} > svg`, {
|
|
18
|
+
inlineSize: iconSize[key],
|
|
19
|
+
blockSize: iconSize[key]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const iconButton = makeComponentTheme("iconButton", {
|
|
23
|
+
root: style([
|
|
24
|
+
buttonBase,
|
|
25
|
+
atoms({ justifyContent: "center" }),
|
|
26
|
+
{
|
|
27
|
+
aspectRatio: "1",
|
|
28
|
+
flexShrink: 0,
|
|
29
|
+
padding: 0
|
|
30
|
+
}
|
|
31
|
+
]),
|
|
32
|
+
variants: {
|
|
33
|
+
variant: buttonVariant,
|
|
34
|
+
size: sizeStyles,
|
|
35
|
+
shape: {
|
|
36
|
+
square: buttonRadius,
|
|
37
|
+
circle: style({ borderRadius: "50%" })
|
|
38
|
+
},
|
|
39
|
+
intent: buttonIntent
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
size: "medium",
|
|
43
|
+
variant: "solid",
|
|
44
|
+
intent: "primary",
|
|
45
|
+
shape: "square"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
endFileScope();
|
|
49
|
+
export {
|
|
50
|
+
iconButton
|
|
51
|
+
};
|
|
@@ -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;AA2BlE,eAAO,MAAM,UAAU,EAAE,qBAyBxB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { divider } from "./divider.css.js";
|
|
|
6
6
|
import { drawer } from "./drawer.css.js";
|
|
7
7
|
import { heading } from "./heading.css.js";
|
|
8
8
|
import { icon } from "./icon.css.js";
|
|
9
|
+
import { iconButton } from "./iconButton.css.js";
|
|
9
10
|
import { label } from "./label.css.js";
|
|
10
11
|
import { link } from "./link.css.js";
|
|
11
12
|
import { popover } from "./popover.css.js";
|
|
@@ -15,6 +16,7 @@ import { select } from "./select.css.js";
|
|
|
15
16
|
import { slider } from "./slider.css.js";
|
|
16
17
|
import { spinner } from "./spinner.css.js";
|
|
17
18
|
import { switchTheme } from "./switch.css.js";
|
|
19
|
+
import { tag } from "./tag.css.js";
|
|
18
20
|
import { text } from "./text.css.js";
|
|
19
21
|
import { textarea } from "./textarea.css.js";
|
|
20
22
|
import { textInput } from "./textInput.css.js";
|
|
@@ -29,6 +31,7 @@ const components = {
|
|
|
29
31
|
drawer,
|
|
30
32
|
heading,
|
|
31
33
|
icon,
|
|
34
|
+
iconButton,
|
|
32
35
|
label,
|
|
33
36
|
link,
|
|
34
37
|
popover,
|
|
@@ -38,6 +41,7 @@ const components = {
|
|
|
38
41
|
slider,
|
|
39
42
|
spinner,
|
|
40
43
|
switch: switchTheme,
|
|
44
|
+
tag,
|
|
41
45
|
text,
|
|
42
46
|
textarea,
|
|
43
47
|
textInput,
|
|
@@ -28,7 +28,7 @@ const link = makeComponentTheme("link", {
|
|
|
28
28
|
focusable
|
|
29
29
|
]),
|
|
30
30
|
variants: {
|
|
31
|
-
|
|
31
|
+
intent: {
|
|
32
32
|
inherit: style({
|
|
33
33
|
color: "inherit",
|
|
34
34
|
fontWeight: "inherit"
|
|
@@ -37,8 +37,8 @@ const link = makeComponentTheme("link", {
|
|
|
37
37
|
color: vars.colorRole.primary.foreground,
|
|
38
38
|
fontWeight: 500
|
|
39
39
|
}),
|
|
40
|
-
|
|
41
|
-
color: vars.colorRole.
|
|
40
|
+
neutral: style({
|
|
41
|
+
color: vars.colorRole.neutral.foreground,
|
|
42
42
|
fontWeight: 500
|
|
43
43
|
})
|
|
44
44
|
},
|
|
@@ -47,7 +47,7 @@ const link = makeComponentTheme("link", {
|
|
|
47
47
|
})
|
|
48
48
|
},
|
|
49
49
|
defaultVariants: {
|
|
50
|
-
|
|
50
|
+
intent: "primary"
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
endFileScope();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.css.d.ts","sourceRoot":"","sources":["../../src/components/tag.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAqE9B,eAAO,MAAM,GAAG,EAAE,qBAAqB,CAAC,KAAK,CAsC3C,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar, globalStyle } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/tag.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const paddingBlock = createVar();
|
|
6
|
+
const paddingInline = createVar();
|
|
7
|
+
const slot = style([
|
|
8
|
+
atoms({
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: "center"
|
|
12
|
+
}),
|
|
13
|
+
{
|
|
14
|
+
blockSize: "1lh",
|
|
15
|
+
flexShrink: 0
|
|
16
|
+
}
|
|
17
|
+
]);
|
|
18
|
+
const startSlot = style([slot]);
|
|
19
|
+
const endSlot = style([slot]);
|
|
20
|
+
const root = style([
|
|
21
|
+
atoms({
|
|
22
|
+
display: "inline-flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: 1,
|
|
25
|
+
borderRadius: "full",
|
|
26
|
+
fontWeight: "medium",
|
|
27
|
+
lineHeight: "normal"
|
|
28
|
+
}),
|
|
29
|
+
{
|
|
30
|
+
verticalAlign: "middle",
|
|
31
|
+
whiteSpace: "nowrap",
|
|
32
|
+
paddingBlock,
|
|
33
|
+
paddingInline,
|
|
34
|
+
selectors: {
|
|
35
|
+
// A Slot sits as close to the rounded edge as to the top and bottom
|
|
36
|
+
[`&:has(> ${startSlot})`]: {
|
|
37
|
+
paddingInlineStart: paddingBlock
|
|
38
|
+
},
|
|
39
|
+
[`&:has(> ${endSlot})`]: {
|
|
40
|
+
paddingInlineEnd: paddingBlock
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
globalStyle(`${root} > ${slot} > *`, {
|
|
46
|
+
blockSize: "100%",
|
|
47
|
+
inlineSize: "auto",
|
|
48
|
+
maxBlockSize: "100%"
|
|
49
|
+
});
|
|
50
|
+
globalStyle(`${root} > ${slot} > * > svg`, {
|
|
51
|
+
blockSize: "75%",
|
|
52
|
+
inlineSize: "75%"
|
|
53
|
+
});
|
|
54
|
+
const intentStyle = (roles) => style({
|
|
55
|
+
backgroundColor: roles.subtle,
|
|
56
|
+
color: roles.foreground
|
|
57
|
+
});
|
|
58
|
+
const tag = makeComponentTheme("tag", {
|
|
59
|
+
root,
|
|
60
|
+
startSlot,
|
|
61
|
+
endSlot,
|
|
62
|
+
variants: {
|
|
63
|
+
intent: {
|
|
64
|
+
primary: intentStyle(vars.colorRole.primary),
|
|
65
|
+
secondary: intentStyle(vars.colorRole.secondary),
|
|
66
|
+
neutral: intentStyle(vars.colorRole.neutral),
|
|
67
|
+
danger: intentStyle(vars.colorRole.danger),
|
|
68
|
+
success: intentStyle(vars.colorRole.success),
|
|
69
|
+
info: intentStyle(vars.colorRole.info),
|
|
70
|
+
warning: intentStyle(vars.colorRole.warning)
|
|
71
|
+
},
|
|
72
|
+
size: {
|
|
73
|
+
small: style([
|
|
74
|
+
atoms({ fontSize: "xsmall" }),
|
|
75
|
+
{ vars: { [paddingBlock]: "2px", [paddingInline]: vars.space[2] } }
|
|
76
|
+
]),
|
|
77
|
+
medium: style([
|
|
78
|
+
atoms({ fontSize: "small" }),
|
|
79
|
+
{ vars: { [paddingBlock]: "2px", [paddingInline]: vars.space[2] } }
|
|
80
|
+
]),
|
|
81
|
+
large: style([
|
|
82
|
+
atoms({ fontSize: "medium" }),
|
|
83
|
+
{
|
|
84
|
+
vars: {
|
|
85
|
+
[paddingBlock]: vars.space[1],
|
|
86
|
+
[paddingInline]: vars.space[3]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
])
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
defaultVariants: {
|
|
93
|
+
intent: "neutral",
|
|
94
|
+
size: "small"
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
endFileScope();
|
|
98
|
+
export {
|
|
99
|
+
tag
|
|
100
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks-theme-momotaro",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.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": ">=3.
|
|
37
|
+
"@blockle/blocks-core": ">=3.2.x",
|
|
38
38
|
"@vanilla-extract/css": "^1.18.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|