@blockle/blocks-theme-momotaro 1.0.5 → 2.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/button.css.d.ts +2 -1
- package/dist/components/button.css.js +109 -106
- package/dist/components/checkbox.css.d.ts +2 -1
- package/dist/components/checkbox.css.js +49 -46
- package/dist/components/dialog.css.d.ts +2 -1
- package/dist/components/dialog.css.js +67 -64
- package/dist/components/divider.css.d.ts +2 -1
- package/dist/components/divider.css.js +10 -7
- package/dist/components/helpers.css.d.ts +1 -1
- package/dist/components/input.css.d.ts +2 -1
- package/dist/components/input.css.js +39 -36
- package/dist/components/label.css.d.ts +2 -1
- package/dist/components/label.css.js +25 -22
- package/dist/components/link.css.d.ts +2 -1
- package/dist/components/popover.css.d.ts +2 -1
- package/dist/components/popover.css.js +36 -33
- package/dist/components/progress.css.d.ts +2 -1
- package/dist/components/progress.css.js +35 -32
- package/dist/components/radio.css.d.ts +2 -1
- package/dist/components/radio.css.js +48 -45
- package/dist/components/select.css.d.ts +2 -1
- package/dist/components/select.css.js +43 -40
- package/dist/components/slider.css.d.ts +2 -1
- package/dist/components/slider.css.js +76 -73
- package/dist/components/spinner.css.d.ts +2 -1
- package/dist/components/spinner.css.js +29 -26
- package/dist/components/switch.css.d.ts +2 -1
- package/dist/components/switch.css.js +54 -51
- package/dist/components/tooltip.css.d.ts +2 -1
- package/dist/components/tooltip.css.js +23 -20
- package/dist/index.d.ts +1 -1
- package/package.json +5 -11
- package/dist/components/button.css.cjs +0 -126
- package/dist/components/checkbox.css.cjs +0 -62
- package/dist/components/dialog.css.cjs +0 -81
- package/dist/components/divider.css.cjs +0 -16
- package/dist/components/helpers.css.cjs +0 -47
- package/dist/components/index.cjs +0 -35
- package/dist/components/input.css.cjs +0 -46
- package/dist/components/label.css.cjs +0 -33
- package/dist/components/link.css.cjs +0 -56
- package/dist/components/popover.css.cjs +0 -45
- package/dist/components/progress.css.cjs +0 -57
- package/dist/components/radio.css.cjs +0 -63
- package/dist/components/select.css.cjs +0 -53
- package/dist/components/slider.css.cjs +0 -95
- package/dist/components/spinner.css.cjs +0 -44
- package/dist/components/switch.css.cjs +0 -66
- package/dist/components/tooltip.css.cjs +0 -30
- package/dist/components/transitions.cjs +0 -4
- package/dist/index.cjs +0 -4
- package/dist/theme.css.cjs +0 -14
- package/dist/tokens.css.cjs +0 -86
|
@@ -1,46 +0,0 @@
|
|
|
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/input.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const input = blocksCore.makeComponentTheme("input", {
|
|
8
|
-
input: css.style([
|
|
9
|
-
blocksCore.atoms({
|
|
10
|
-
color: "text",
|
|
11
|
-
padding: "large",
|
|
12
|
-
border: "none",
|
|
13
|
-
borderRadius: "small"
|
|
14
|
-
}),
|
|
15
|
-
{
|
|
16
|
-
outline: "none",
|
|
17
|
-
background: "transparent",
|
|
18
|
-
"::placeholder": {
|
|
19
|
-
color: blocksCore.vars.color.textLight
|
|
20
|
-
},
|
|
21
|
-
":disabled": {}
|
|
22
|
-
}
|
|
23
|
-
]),
|
|
24
|
-
container: css.style([
|
|
25
|
-
{
|
|
26
|
-
minHeight: 56,
|
|
27
|
-
"@media": {
|
|
28
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
29
|
-
transition: `box-shadow ${blocksCore.vars.transition.fast}`
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
":focus-within": {
|
|
33
|
-
outline: "2px solid transparent",
|
|
34
|
-
outlineOffset: "2px",
|
|
35
|
-
boxShadow: `${blocksCore.vars.shadow.small}, ${blocksCore.vars.focus.boxShadow}`
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
blocksCore.atoms({
|
|
39
|
-
backgroundColor: "white",
|
|
40
|
-
borderRadius: "medium",
|
|
41
|
-
boxShadow: "medium"
|
|
42
|
-
})
|
|
43
|
-
])
|
|
44
|
-
});
|
|
45
|
-
fileScope.endFileScope();
|
|
46
|
-
exports.input = input;
|
|
@@ -1,33 +0,0 @@
|
|
|
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/label.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const label = blocksCore.makeComponentTheme("label", {
|
|
8
|
-
base: css.style({}),
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
small: css.style({
|
|
12
|
-
fontSize: blocksCore.vars.fontSize.xsmall
|
|
13
|
-
}),
|
|
14
|
-
medium: css.style({
|
|
15
|
-
fontSize: blocksCore.vars.fontSize.small
|
|
16
|
-
}),
|
|
17
|
-
large: css.style({
|
|
18
|
-
fontSize: blocksCore.vars.fontSize.medium
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
required: css.style({
|
|
22
|
-
":after": {
|
|
23
|
-
content: '"*"',
|
|
24
|
-
marginLeft: blocksCore.vars.space.xsmall
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
size: "large"
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
fileScope.endFileScope();
|
|
33
|
-
exports.label = label;
|
|
@@ -1,56 +0,0 @@
|
|
|
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/link.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
-
const link = blocksCore.makeComponentTheme("link", {
|
|
9
|
-
base: css.style([
|
|
10
|
-
{
|
|
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
|
-
helpers_css.focusable
|
|
31
|
-
]),
|
|
32
|
-
variants: {
|
|
33
|
-
variant: {
|
|
34
|
-
inherit: css.style({
|
|
35
|
-
color: "inherit",
|
|
36
|
-
fontWeight: "inherit"
|
|
37
|
-
}),
|
|
38
|
-
primary: blocksCore.atoms({
|
|
39
|
-
color: "primary",
|
|
40
|
-
fontWeight: "medium"
|
|
41
|
-
}),
|
|
42
|
-
secondary: blocksCore.atoms({
|
|
43
|
-
color: "secondary",
|
|
44
|
-
fontWeight: "medium"
|
|
45
|
-
})
|
|
46
|
-
},
|
|
47
|
-
underline: css.style({
|
|
48
|
-
textDecoration: "underline"
|
|
49
|
-
})
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
variant: "primary"
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
fileScope.endFileScope();
|
|
56
|
-
exports.link = link;
|
|
@@ -1,45 +0,0 @@
|
|
|
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/popover.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const popover = blocksCore.makeComponentTheme("popover", {
|
|
8
|
-
base: css.style([
|
|
9
|
-
blocksCore.atoms({
|
|
10
|
-
backgroundColor: "white",
|
|
11
|
-
borderRadius: "small",
|
|
12
|
-
boxShadow: "medium",
|
|
13
|
-
padding: "medium",
|
|
14
|
-
margin: "small"
|
|
15
|
-
// Space between the popover and the anchor element
|
|
16
|
-
}),
|
|
17
|
-
{
|
|
18
|
-
width: "max-content",
|
|
19
|
-
selectors: {
|
|
20
|
-
"&:popover-open": {
|
|
21
|
-
transform: "translateY(0) scale(1)",
|
|
22
|
-
opacity: 1,
|
|
23
|
-
// @ts-expect-error - Vanilla Extract does not support @starting-style (yet)
|
|
24
|
-
"@starting-style": {
|
|
25
|
-
transform: "translateY(12px) scale(0.8)",
|
|
26
|
-
opacity: 0
|
|
27
|
-
}
|
|
28
|
-
}
|
|
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
|
-
}
|
|
41
|
-
}
|
|
42
|
-
])
|
|
43
|
-
});
|
|
44
|
-
fileScope.endFileScope();
|
|
45
|
-
exports.popover = popover;
|
|
@@ -1,57 +0,0 @@
|
|
|
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/progress.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const indeterminateAnimation = css.keyframes({
|
|
8
|
-
"0%": {
|
|
9
|
-
transform: "translateX(-100%)"
|
|
10
|
-
},
|
|
11
|
-
"100%": {
|
|
12
|
-
transform: "translateX(100%)"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
const progress = blocksCore.makeComponentTheme("progress", {
|
|
16
|
-
base: css.style([
|
|
17
|
-
{
|
|
18
|
-
height: 8
|
|
19
|
-
},
|
|
20
|
-
blocksCore.atoms({
|
|
21
|
-
inlineSize: "full",
|
|
22
|
-
borderRadius: "small",
|
|
23
|
-
backgroundColor: "textLight",
|
|
24
|
-
color: "primary",
|
|
25
|
-
overflow: "hidden"
|
|
26
|
-
})
|
|
27
|
-
]),
|
|
28
|
-
bar: css.style({
|
|
29
|
-
borderRadius: "inherit",
|
|
30
|
-
"@media": {
|
|
31
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
32
|
-
transition: "transform 180ms ease-out"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
36
|
-
variants: {
|
|
37
|
-
indeterminate: css.style({
|
|
38
|
-
"@media": {
|
|
39
|
-
// For reduce motion we show a striped pattern instead of animating
|
|
40
|
-
"(prefers-reduced-motion: reduce)": {
|
|
41
|
-
backgroundImage: `repeating-linear-gradient(
|
|
42
|
-
45deg,
|
|
43
|
-
transparent,
|
|
44
|
-
transparent 20px,
|
|
45
|
-
${blocksCore.vars.color.primaryDark} 20px,
|
|
46
|
-
${blocksCore.vars.color.primaryDark} 40px
|
|
47
|
-
)`
|
|
48
|
-
},
|
|
49
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
50
|
-
animation: `${indeterminateAnimation} 3s ease-in-out infinite`
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
fileScope.endFileScope();
|
|
57
|
-
exports.progress = progress;
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
const transitions = require("./transitions.cjs");
|
|
8
|
-
fileScope.setFileScope("src/components/radio.css.ts", "@blockle/blocks-theme-momotaro");
|
|
9
|
-
const radio = blocksCore.makeComponentTheme("radio", {
|
|
10
|
-
base: css.style([
|
|
11
|
-
{
|
|
12
|
-
display: "flex",
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
justifyContent: "center",
|
|
15
|
-
inlineSize: 24,
|
|
16
|
-
blockSize: 24,
|
|
17
|
-
borderRadius: 12,
|
|
18
|
-
"@media": {
|
|
19
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
20
|
-
transition: `background-color ${blocksCore.vars.transition.fast}, box-shadow ${blocksCore.vars.transition.fast}`
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
":hover": {
|
|
24
|
-
backgroundColor: blocksCore.vars.color.primaryDark
|
|
25
|
-
},
|
|
26
|
-
selectors: {
|
|
27
|
-
"&:has(input:checked):not(:hover)": {
|
|
28
|
-
backgroundColor: blocksCore.vars.color.primary
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
blocksCore.atoms({
|
|
33
|
-
backgroundColor: "primaryLight"
|
|
34
|
-
}),
|
|
35
|
-
helpers_css.focusable
|
|
36
|
-
]),
|
|
37
|
-
icon: css.style({
|
|
38
|
-
height: 12,
|
|
39
|
-
width: 12,
|
|
40
|
-
backgroundColor: "white",
|
|
41
|
-
borderRadius: "8px",
|
|
42
|
-
transform: "scale(0)",
|
|
43
|
-
"@media": {
|
|
44
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
45
|
-
transition: `transform ${blocksCore.vars.transition.normal} ${transitions.bounceOut}`
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
selectors: {
|
|
49
|
-
"input:checked ~ &": {
|
|
50
|
-
transform: "scale(1)"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}),
|
|
54
|
-
label: blocksCore.atoms({
|
|
55
|
-
display: "flex",
|
|
56
|
-
flexDirection: "row",
|
|
57
|
-
padding: "xsmall",
|
|
58
|
-
gap: "medium",
|
|
59
|
-
cursor: "pointer"
|
|
60
|
-
})
|
|
61
|
-
});
|
|
62
|
-
fileScope.endFileScope();
|
|
63
|
-
exports.radio = radio;
|
|
@@ -1,53 +0,0 @@
|
|
|
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.atoms({
|
|
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.atoms({
|
|
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;
|
|
@@ -1,95 +0,0 @@
|
|
|
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.atoms({
|
|
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;
|
|
@@ -1,44 +0,0 @@
|
|
|
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;
|
|
@@ -1,66 +0,0 @@
|
|
|
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.atoms({
|
|
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.atoms({
|
|
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;
|
|
@@ -1,30 +0,0 @@
|
|
|
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.atoms({
|
|
9
|
-
padding: "small"
|
|
10
|
-
}),
|
|
11
|
-
variants: {
|
|
12
|
-
colorScheme: {
|
|
13
|
-
primary: css.style({
|
|
14
|
-
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
15
|
-
boxShadow: "0 0 0 1px rgba(255, 255, 255, 0.1)",
|
|
16
|
-
color: "white"
|
|
17
|
-
}),
|
|
18
|
-
secondary: css.style({
|
|
19
|
-
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
20
|
-
boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)",
|
|
21
|
-
color: "black"
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
colorScheme: "primary"
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
fileScope.endFileScope();
|
|
30
|
-
exports.tooltip = tooltip;
|
package/dist/index.cjs
DELETED
package/dist/theme.css.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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 index = require("./components/index.cjs");
|
|
6
|
-
const tokens_css = require("./tokens.css.cjs");
|
|
7
|
-
fileScope.setFileScope("src/theme.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
-
const momotaro = blocksCore.makeTheme({
|
|
9
|
-
name: "momotaro",
|
|
10
|
-
tokens: tokens_css.tokens,
|
|
11
|
-
components: index.components
|
|
12
|
-
});
|
|
13
|
-
fileScope.endFileScope();
|
|
14
|
-
exports.momotaro = momotaro;
|