@blockle/blocks-theme-momotaro 1.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/README.md +1 -0
- package/dist/components/button.css.cjs +126 -0
- package/dist/components/button.css.d.ts +1 -0
- package/dist/components/button.css.js +126 -0
- package/dist/components/checkbox.css.cjs +62 -0
- package/dist/components/checkbox.css.d.ts +1 -0
- package/dist/components/checkbox.css.js +62 -0
- package/dist/components/dialog.css.cjs +81 -0
- package/dist/components/dialog.css.d.ts +1 -0
- package/dist/components/dialog.css.js +81 -0
- package/dist/components/divider.css.cjs +16 -0
- package/dist/components/divider.css.d.ts +1 -0
- package/dist/components/divider.css.js +16 -0
- package/dist/components/helpers.css.cjs +47 -0
- package/dist/components/helpers.css.d.ts +8 -0
- package/dist/components/helpers.css.js +47 -0
- package/dist/components/index.cjs +35 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +35 -0
- package/dist/components/input.css.cjs +46 -0
- package/dist/components/input.css.d.ts +1 -0
- package/dist/components/input.css.js +46 -0
- package/dist/components/label.css.cjs +33 -0
- package/dist/components/label.css.d.ts +1 -0
- package/dist/components/label.css.js +33 -0
- package/dist/components/link.css.cjs +56 -0
- package/dist/components/link.css.d.ts +1 -0
- package/dist/components/link.css.js +56 -0
- package/dist/components/popover.css.cjs +37 -0
- package/dist/components/popover.css.d.ts +1 -0
- package/dist/components/popover.css.js +37 -0
- package/dist/components/progress.css.cjs +57 -0
- package/dist/components/progress.css.d.ts +1 -0
- package/dist/components/progress.css.js +57 -0
- package/dist/components/radio.css.cjs +63 -0
- package/dist/components/radio.css.d.ts +1 -0
- package/dist/components/radio.css.js +63 -0
- package/dist/components/select.css.cjs +53 -0
- package/dist/components/select.css.d.ts +1 -0
- package/dist/components/select.css.js +53 -0
- package/dist/components/slider.css.cjs +95 -0
- package/dist/components/slider.css.d.ts +1 -0
- package/dist/components/slider.css.js +95 -0
- package/dist/components/spinner.css.cjs +44 -0
- package/dist/components/spinner.css.d.ts +1 -0
- package/dist/components/spinner.css.js +44 -0
- package/dist/components/switch.css.cjs +66 -0
- package/dist/components/switch.css.d.ts +1 -0
- package/dist/components/switch.css.js +66 -0
- package/dist/components/tooltip.css.cjs +31 -0
- package/dist/components/tooltip.css.d.ts +1 -0
- package/dist/components/tooltip.css.js +31 -0
- package/dist/components/transitions.cjs +4 -0
- package/dist/components/transitions.d.ts +1 -0
- package/dist/components/transitions.js +4 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/momotaro.css.cjs +14 -0
- package/dist/momotaro.css.d.ts +1 -0
- package/dist/momotaro.css.js +14 -0
- package/dist/tokens.css.cjs +86 -0
- package/dist/tokens.css.d.ts +2 -0
- package/dist/tokens.css.js +86 -0
- package/package.json +43 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, sprinkles, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
import { bounceOut } from "./transitions.js";
|
|
6
|
+
setFileScope("src/components/radio.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
+
const radio = makeComponentTheme("radio", {
|
|
8
|
+
base: style([
|
|
9
|
+
{
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
inlineSize: 24,
|
|
14
|
+
blockSize: 24,
|
|
15
|
+
borderRadius: 12,
|
|
16
|
+
"@media": {
|
|
17
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
18
|
+
transition: `background-color ${vars.transition.fast}, box-shadow ${vars.transition.fast}`
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
":hover": {
|
|
22
|
+
backgroundColor: vars.color.primaryDark
|
|
23
|
+
},
|
|
24
|
+
selectors: {
|
|
25
|
+
"&:has(input:checked):not(:hover)": {
|
|
26
|
+
backgroundColor: vars.color.primary
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
sprinkles({
|
|
31
|
+
backgroundColor: "primaryLight"
|
|
32
|
+
}),
|
|
33
|
+
focusable
|
|
34
|
+
]),
|
|
35
|
+
icon: style({
|
|
36
|
+
height: 12,
|
|
37
|
+
width: 12,
|
|
38
|
+
backgroundColor: "white",
|
|
39
|
+
borderRadius: "8px",
|
|
40
|
+
transform: "scale(0)",
|
|
41
|
+
"@media": {
|
|
42
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
43
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
selectors: {
|
|
47
|
+
"input:checked ~ &": {
|
|
48
|
+
transform: "scale(1)"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
label: sprinkles({
|
|
53
|
+
display: "flex",
|
|
54
|
+
flexDirection: "row",
|
|
55
|
+
padding: "xsmall",
|
|
56
|
+
gap: "medium",
|
|
57
|
+
cursor: "pointer"
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
endFileScope();
|
|
61
|
+
export {
|
|
62
|
+
radio
|
|
63
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
+
const css = require("@vanilla-extract/css");
|
|
6
|
+
const helpers_css = require("./helpers.css.cjs");
|
|
7
|
+
fileScope.setFileScope("src/components/select.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
+
const select = blocksCore.makeComponentTheme("select", {
|
|
9
|
+
select: css.style([
|
|
10
|
+
blocksCore.sprinkles({
|
|
11
|
+
color: "text",
|
|
12
|
+
padding: "large",
|
|
13
|
+
backgroundColor: "white",
|
|
14
|
+
borderRadius: "medium",
|
|
15
|
+
boxShadow: "medium"
|
|
16
|
+
}),
|
|
17
|
+
{
|
|
18
|
+
border: "none",
|
|
19
|
+
outline: "none",
|
|
20
|
+
minHeight: 56,
|
|
21
|
+
transitionDuration: blocksCore.vars.transition.fast,
|
|
22
|
+
transitionProperty: "box-shadow",
|
|
23
|
+
":focus-within": {
|
|
24
|
+
outline: "2px solid transparent",
|
|
25
|
+
outlineOffset: "2px",
|
|
26
|
+
boxShadow: `${blocksCore.vars.shadow.small}, ${blocksCore.vars.focus.boxShadow}`
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
helpers_css.focusable
|
|
30
|
+
]),
|
|
31
|
+
variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
outline: css.style([
|
|
34
|
+
blocksCore.sprinkles({
|
|
35
|
+
borderWidth: "small",
|
|
36
|
+
borderColor: "primary"
|
|
37
|
+
}),
|
|
38
|
+
{
|
|
39
|
+
borderStyle: "solid"
|
|
40
|
+
}
|
|
41
|
+
]),
|
|
42
|
+
solid: css.style({})
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
icon: css.style({
|
|
46
|
+
paddingInline: "large"
|
|
47
|
+
}),
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "solid"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
fileScope.endFileScope();
|
|
53
|
+
exports.select = select;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const select: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').SelectTheme> | undefined;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, sprinkles, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/select.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const select = makeComponentTheme("select", {
|
|
7
|
+
select: style([
|
|
8
|
+
sprinkles({
|
|
9
|
+
color: "text",
|
|
10
|
+
padding: "large",
|
|
11
|
+
backgroundColor: "white",
|
|
12
|
+
borderRadius: "medium",
|
|
13
|
+
boxShadow: "medium"
|
|
14
|
+
}),
|
|
15
|
+
{
|
|
16
|
+
border: "none",
|
|
17
|
+
outline: "none",
|
|
18
|
+
minHeight: 56,
|
|
19
|
+
transitionDuration: vars.transition.fast,
|
|
20
|
+
transitionProperty: "box-shadow",
|
|
21
|
+
":focus-within": {
|
|
22
|
+
outline: "2px solid transparent",
|
|
23
|
+
outlineOffset: "2px",
|
|
24
|
+
boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
focusable
|
|
28
|
+
]),
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
outline: style([
|
|
32
|
+
sprinkles({
|
|
33
|
+
borderWidth: "small",
|
|
34
|
+
borderColor: "primary"
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
borderStyle: "solid"
|
|
38
|
+
}
|
|
39
|
+
]),
|
|
40
|
+
solid: style({})
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
icon: style({
|
|
44
|
+
paddingInline: "large"
|
|
45
|
+
}),
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
variant: "solid"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
endFileScope();
|
|
51
|
+
export {
|
|
52
|
+
select
|
|
53
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
+
const css = require("@vanilla-extract/css");
|
|
6
|
+
const helpers_css = require("./helpers.css.cjs");
|
|
7
|
+
fileScope.setFileScope("src/components/slider.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
+
const trackBackground = css.createVar();
|
|
9
|
+
const filledTrackBackground = css.createVar();
|
|
10
|
+
const thumbBackground = css.createVar();
|
|
11
|
+
const thumbActive = css.createVar();
|
|
12
|
+
const slider = blocksCore.makeComponentTheme("slider", {
|
|
13
|
+
base: css.style({
|
|
14
|
+
blockSize: "20px"
|
|
15
|
+
}),
|
|
16
|
+
track: css.style([
|
|
17
|
+
blocksCore.sprinkles({
|
|
18
|
+
borderRadius: "small"
|
|
19
|
+
}),
|
|
20
|
+
{
|
|
21
|
+
blockSize: "4px",
|
|
22
|
+
backgroundColor: trackBackground
|
|
23
|
+
}
|
|
24
|
+
]),
|
|
25
|
+
filledTrack: css.style({
|
|
26
|
+
backgroundColor: filledTrackBackground
|
|
27
|
+
}),
|
|
28
|
+
thumb: css.style([
|
|
29
|
+
{
|
|
30
|
+
backgroundColor: thumbBackground,
|
|
31
|
+
borderRadius: "50%",
|
|
32
|
+
height: "16px",
|
|
33
|
+
width: "16px",
|
|
34
|
+
boxShadow: `0 0 0 0px color-mix(in srgb, ${blocksCore.vars.color.primaryLight}, transparent 0%)`,
|
|
35
|
+
vars: {
|
|
36
|
+
[thumbActive]: `0 0 0 8px color-mix(in srgb, ${blocksCore.vars.color.primaryLight}, transparent 20%)`
|
|
37
|
+
},
|
|
38
|
+
":hover": {
|
|
39
|
+
boxShadow: thumbActive
|
|
40
|
+
},
|
|
41
|
+
":focus-visible": {
|
|
42
|
+
boxShadow: thumbActive
|
|
43
|
+
},
|
|
44
|
+
"@media": {
|
|
45
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
46
|
+
transition: "box-shadow 0.2s"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
helpers_css.focusable
|
|
51
|
+
]),
|
|
52
|
+
variants: {
|
|
53
|
+
size: {
|
|
54
|
+
small: css.style({
|
|
55
|
+
inlineSize: "100px"
|
|
56
|
+
}),
|
|
57
|
+
medium: css.style({
|
|
58
|
+
inlineSize: "200px"
|
|
59
|
+
}),
|
|
60
|
+
large: css.style({
|
|
61
|
+
inlineSize: "300px"
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
colorScheme: {
|
|
65
|
+
primary: css.style({
|
|
66
|
+
vars: {
|
|
67
|
+
[trackBackground]: blocksCore.vars.color.primaryLight,
|
|
68
|
+
[filledTrackBackground]: blocksCore.vars.color.primary,
|
|
69
|
+
[thumbBackground]: blocksCore.vars.color.primary
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
secondary: css.style({
|
|
73
|
+
vars: {
|
|
74
|
+
[trackBackground]: blocksCore.vars.color.primaryLight,
|
|
75
|
+
[filledTrackBackground]: blocksCore.vars.color.secondary,
|
|
76
|
+
[thumbBackground]: blocksCore.vars.color.secondary
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
disabled: css.style({
|
|
81
|
+
pointerEvents: "none",
|
|
82
|
+
vars: {
|
|
83
|
+
[trackBackground]: "#c0c0c0",
|
|
84
|
+
[filledTrackBackground]: "#ccc",
|
|
85
|
+
[thumbBackground]: "#c0c0c0"
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
size: "medium",
|
|
91
|
+
colorScheme: "primary"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
fileScope.endFileScope();
|
|
95
|
+
exports.slider = slider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const slider: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').SliderTheme> | undefined;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars, sprinkles } from "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/slider.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const trackBackground = createVar();
|
|
7
|
+
const filledTrackBackground = createVar();
|
|
8
|
+
const thumbBackground = createVar();
|
|
9
|
+
const thumbActive = createVar();
|
|
10
|
+
const slider = makeComponentTheme("slider", {
|
|
11
|
+
base: style({
|
|
12
|
+
blockSize: "20px"
|
|
13
|
+
}),
|
|
14
|
+
track: style([
|
|
15
|
+
sprinkles({
|
|
16
|
+
borderRadius: "small"
|
|
17
|
+
}),
|
|
18
|
+
{
|
|
19
|
+
blockSize: "4px",
|
|
20
|
+
backgroundColor: trackBackground
|
|
21
|
+
}
|
|
22
|
+
]),
|
|
23
|
+
filledTrack: style({
|
|
24
|
+
backgroundColor: filledTrackBackground
|
|
25
|
+
}),
|
|
26
|
+
thumb: style([
|
|
27
|
+
{
|
|
28
|
+
backgroundColor: thumbBackground,
|
|
29
|
+
borderRadius: "50%",
|
|
30
|
+
height: "16px",
|
|
31
|
+
width: "16px",
|
|
32
|
+
boxShadow: `0 0 0 0px color-mix(in srgb, ${vars.color.primaryLight}, transparent 0%)`,
|
|
33
|
+
vars: {
|
|
34
|
+
[thumbActive]: `0 0 0 8px color-mix(in srgb, ${vars.color.primaryLight}, transparent 20%)`
|
|
35
|
+
},
|
|
36
|
+
":hover": {
|
|
37
|
+
boxShadow: thumbActive
|
|
38
|
+
},
|
|
39
|
+
":focus-visible": {
|
|
40
|
+
boxShadow: thumbActive
|
|
41
|
+
},
|
|
42
|
+
"@media": {
|
|
43
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
44
|
+
transition: "box-shadow 0.2s"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
focusable
|
|
49
|
+
]),
|
|
50
|
+
variants: {
|
|
51
|
+
size: {
|
|
52
|
+
small: style({
|
|
53
|
+
inlineSize: "100px"
|
|
54
|
+
}),
|
|
55
|
+
medium: style({
|
|
56
|
+
inlineSize: "200px"
|
|
57
|
+
}),
|
|
58
|
+
large: style({
|
|
59
|
+
inlineSize: "300px"
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
colorScheme: {
|
|
63
|
+
primary: style({
|
|
64
|
+
vars: {
|
|
65
|
+
[trackBackground]: vars.color.primaryLight,
|
|
66
|
+
[filledTrackBackground]: vars.color.primary,
|
|
67
|
+
[thumbBackground]: vars.color.primary
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
secondary: style({
|
|
71
|
+
vars: {
|
|
72
|
+
[trackBackground]: vars.color.primaryLight,
|
|
73
|
+
[filledTrackBackground]: vars.color.secondary,
|
|
74
|
+
[thumbBackground]: vars.color.secondary
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
disabled: style({
|
|
79
|
+
pointerEvents: "none",
|
|
80
|
+
vars: {
|
|
81
|
+
[trackBackground]: "#c0c0c0",
|
|
82
|
+
[filledTrackBackground]: "#ccc",
|
|
83
|
+
[thumbBackground]: "#c0c0c0"
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
size: "medium",
|
|
89
|
+
colorScheme: "primary"
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
endFileScope();
|
|
93
|
+
export {
|
|
94
|
+
slider
|
|
95
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
+
const css = require("@vanilla-extract/css");
|
|
6
|
+
fileScope.setFileScope("src/components/spinner.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
+
const spinAnimation = css.keyframes({
|
|
8
|
+
"0%": {
|
|
9
|
+
transform: "rotate(0deg)"
|
|
10
|
+
},
|
|
11
|
+
"100%": {
|
|
12
|
+
transform: "rotate(360deg)"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const spinner = blocksCore.makeComponentTheme("spinner", {
|
|
16
|
+
base: css.style({
|
|
17
|
+
aspectRatio: "1 / 1",
|
|
18
|
+
overflow: "hidden",
|
|
19
|
+
borderRadius: "50%",
|
|
20
|
+
borderWidth: "3px",
|
|
21
|
+
borderStyle: "solid",
|
|
22
|
+
borderColor: "currentColor transparent currentColor transparent",
|
|
23
|
+
animation: `${spinAnimation} 1.2s linear infinite`
|
|
24
|
+
}),
|
|
25
|
+
variants: {
|
|
26
|
+
// note: colors are handled by atoms
|
|
27
|
+
size: {
|
|
28
|
+
small: css.style({
|
|
29
|
+
width: 16
|
|
30
|
+
}),
|
|
31
|
+
medium: css.style({
|
|
32
|
+
width: 24
|
|
33
|
+
}),
|
|
34
|
+
large: css.style({
|
|
35
|
+
width: 32
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "small"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
fileScope.endFileScope();
|
|
44
|
+
exports.spinner = spinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const spinner: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').SpinnerTheme> | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme } from "@blockle/blocks-core";
|
|
3
|
+
import { style, keyframes } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/spinner.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const spinAnimation = keyframes({
|
|
6
|
+
"0%": {
|
|
7
|
+
transform: "rotate(0deg)"
|
|
8
|
+
},
|
|
9
|
+
"100%": {
|
|
10
|
+
transform: "rotate(360deg)"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const spinner = makeComponentTheme("spinner", {
|
|
14
|
+
base: style({
|
|
15
|
+
aspectRatio: "1 / 1",
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
borderRadius: "50%",
|
|
18
|
+
borderWidth: "3px",
|
|
19
|
+
borderStyle: "solid",
|
|
20
|
+
borderColor: "currentColor transparent currentColor transparent",
|
|
21
|
+
animation: `${spinAnimation} 1.2s linear infinite`
|
|
22
|
+
}),
|
|
23
|
+
variants: {
|
|
24
|
+
// note: colors are handled by atoms
|
|
25
|
+
size: {
|
|
26
|
+
small: style({
|
|
27
|
+
width: 16
|
|
28
|
+
}),
|
|
29
|
+
medium: style({
|
|
30
|
+
width: 24
|
|
31
|
+
}),
|
|
32
|
+
large: style({
|
|
33
|
+
width: 32
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
size: "small"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
endFileScope();
|
|
42
|
+
export {
|
|
43
|
+
spinner
|
|
44
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
+
const css = require("@vanilla-extract/css");
|
|
6
|
+
const helpers_css = require("./helpers.css.cjs");
|
|
7
|
+
fileScope.setFileScope("src/components/switch.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
+
const activeScaleFactor = css.createVar();
|
|
9
|
+
const switchTheme = blocksCore.makeComponentTheme("switch", {
|
|
10
|
+
base: css.style([
|
|
11
|
+
blocksCore.sprinkles({
|
|
12
|
+
borderRadius: "xlarge",
|
|
13
|
+
backgroundColor: "textLight"
|
|
14
|
+
}),
|
|
15
|
+
{
|
|
16
|
+
width: 52,
|
|
17
|
+
height: 32,
|
|
18
|
+
"@media": {
|
|
19
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
20
|
+
transition: `background-color 120ms linear, box-shadow ${blocksCore.vars.transition.fast}`
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
selectors: {
|
|
24
|
+
'&[data-checked="true"]': {
|
|
25
|
+
backgroundColor: blocksCore.vars.color.secondary
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
// Scale the switch when it's `:active`
|
|
29
|
+
vars: {
|
|
30
|
+
[activeScaleFactor]: "1"
|
|
31
|
+
},
|
|
32
|
+
":active": {
|
|
33
|
+
vars: {
|
|
34
|
+
[activeScaleFactor]: "0.96"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
helpers_css.focusable
|
|
39
|
+
]),
|
|
40
|
+
slider: css.style([
|
|
41
|
+
blocksCore.sprinkles({
|
|
42
|
+
borderRadius: "xlarge"
|
|
43
|
+
}),
|
|
44
|
+
{
|
|
45
|
+
width: 24,
|
|
46
|
+
height: 24,
|
|
47
|
+
top: 4,
|
|
48
|
+
left: 4,
|
|
49
|
+
transform: `translateX(0) scale(calc(0.9 * ${activeScaleFactor}))`,
|
|
50
|
+
position: "absolute",
|
|
51
|
+
backgroundColor: "white",
|
|
52
|
+
selectors: {
|
|
53
|
+
'&[data-checked="true"]': {
|
|
54
|
+
transform: `translateX(20px) scale(${activeScaleFactor})`
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"@media": {
|
|
58
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
59
|
+
transition: "transform 120ms ease-out"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
])
|
|
64
|
+
});
|
|
65
|
+
fileScope.endFileScope();
|
|
66
|
+
exports.switchTheme = switchTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const switchTheme: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').SwitchTheme> | undefined;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, sprinkles, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style, createVar } from "@vanilla-extract/css";
|
|
4
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/switch.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const activeScaleFactor = createVar();
|
|
7
|
+
const switchTheme = makeComponentTheme("switch", {
|
|
8
|
+
base: style([
|
|
9
|
+
sprinkles({
|
|
10
|
+
borderRadius: "xlarge",
|
|
11
|
+
backgroundColor: "textLight"
|
|
12
|
+
}),
|
|
13
|
+
{
|
|
14
|
+
width: 52,
|
|
15
|
+
height: 32,
|
|
16
|
+
"@media": {
|
|
17
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
18
|
+
transition: `background-color 120ms linear, box-shadow ${vars.transition.fast}`
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
selectors: {
|
|
22
|
+
'&[data-checked="true"]': {
|
|
23
|
+
backgroundColor: vars.color.secondary
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
// Scale the switch when it's `:active`
|
|
27
|
+
vars: {
|
|
28
|
+
[activeScaleFactor]: "1"
|
|
29
|
+
},
|
|
30
|
+
":active": {
|
|
31
|
+
vars: {
|
|
32
|
+
[activeScaleFactor]: "0.96"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
focusable
|
|
37
|
+
]),
|
|
38
|
+
slider: style([
|
|
39
|
+
sprinkles({
|
|
40
|
+
borderRadius: "xlarge"
|
|
41
|
+
}),
|
|
42
|
+
{
|
|
43
|
+
width: 24,
|
|
44
|
+
height: 24,
|
|
45
|
+
top: 4,
|
|
46
|
+
left: 4,
|
|
47
|
+
transform: `translateX(0) scale(calc(0.9 * ${activeScaleFactor}))`,
|
|
48
|
+
position: "absolute",
|
|
49
|
+
backgroundColor: "white",
|
|
50
|
+
selectors: {
|
|
51
|
+
'&[data-checked="true"]': {
|
|
52
|
+
transform: `translateX(20px) scale(${activeScaleFactor})`
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"@media": {
|
|
56
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
57
|
+
transition: "transform 120ms ease-out"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
])
|
|
62
|
+
});
|
|
63
|
+
endFileScope();
|
|
64
|
+
export {
|
|
65
|
+
switchTheme
|
|
66
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
+
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
+
const css = require("@vanilla-extract/css");
|
|
6
|
+
fileScope.setFileScope("src/components/tooltip.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
+
const tooltip = blocksCore.makeComponentTheme("tooltip", {
|
|
8
|
+
base: blocksCore.sprinkles({
|
|
9
|
+
backgroundColor: "primary",
|
|
10
|
+
padding: "small"
|
|
11
|
+
}),
|
|
12
|
+
variants: {
|
|
13
|
+
colorScheme: {
|
|
14
|
+
primary: css.style({
|
|
15
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
16
|
+
boxShadow: "0 0 0 1px rgba(255, 255, 255, 0.1)",
|
|
17
|
+
color: "white"
|
|
18
|
+
}),
|
|
19
|
+
secondary: css.style({
|
|
20
|
+
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
21
|
+
boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)",
|
|
22
|
+
color: "black"
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
colorScheme: "primary"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
fileScope.endFileScope();
|
|
31
|
+
exports.tooltip = tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tooltip: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').TooltipTheme> | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, sprinkles } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/tooltip.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const tooltip = makeComponentTheme("tooltip", {
|
|
6
|
+
base: sprinkles({
|
|
7
|
+
backgroundColor: "primary",
|
|
8
|
+
padding: "small"
|
|
9
|
+
}),
|
|
10
|
+
variants: {
|
|
11
|
+
colorScheme: {
|
|
12
|
+
primary: style({
|
|
13
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
14
|
+
boxShadow: "0 0 0 1px rgba(255, 255, 255, 0.1)",
|
|
15
|
+
color: "white"
|
|
16
|
+
}),
|
|
17
|
+
secondary: style({
|
|
18
|
+
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
19
|
+
boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)",
|
|
20
|
+
color: "black"
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
colorScheme: "primary"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
endFileScope();
|
|
29
|
+
export {
|
|
30
|
+
tooltip
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bounceOut = "cubic-bezier(.65,.36,.55,1.65)";
|
package/dist/index.cjs
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { momotaro } from './momotaro.css';
|