@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,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const button_css = require("./button.css.cjs");
|
|
4
|
+
const checkbox_css = require("./checkbox.css.cjs");
|
|
5
|
+
const dialog_css = require("./dialog.css.cjs");
|
|
6
|
+
const divider_css = require("./divider.css.cjs");
|
|
7
|
+
const input_css = require("./input.css.cjs");
|
|
8
|
+
const label_css = require("./label.css.cjs");
|
|
9
|
+
const link_css = require("./link.css.cjs");
|
|
10
|
+
const popover_css = require("./popover.css.cjs");
|
|
11
|
+
const progress_css = require("./progress.css.cjs");
|
|
12
|
+
const radio_css = require("./radio.css.cjs");
|
|
13
|
+
const select_css = require("./select.css.cjs");
|
|
14
|
+
const slider_css = require("./slider.css.cjs");
|
|
15
|
+
const spinner_css = require("./spinner.css.cjs");
|
|
16
|
+
const switch_css = require("./switch.css.cjs");
|
|
17
|
+
const tooltip_css = require("./tooltip.css.cjs");
|
|
18
|
+
const components = {
|
|
19
|
+
button: button_css.button,
|
|
20
|
+
checkbox: checkbox_css.checkbox,
|
|
21
|
+
dialog: dialog_css.dialog,
|
|
22
|
+
divider: divider_css.divider,
|
|
23
|
+
input: input_css.input,
|
|
24
|
+
label: label_css.label,
|
|
25
|
+
link: link_css.link,
|
|
26
|
+
popover: popover_css.popover,
|
|
27
|
+
progress: progress_css.progress,
|
|
28
|
+
radio: radio_css.radio,
|
|
29
|
+
select: select_css.select,
|
|
30
|
+
slider: slider_css.slider,
|
|
31
|
+
spinner: spinner_css.spinner,
|
|
32
|
+
switch: switch_css.switchTheme,
|
|
33
|
+
tooltip: tooltip_css.tooltip
|
|
34
|
+
};
|
|
35
|
+
exports.components = components;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { button } from "./button.css.js";
|
|
2
|
+
import { checkbox } from "./checkbox.css.js";
|
|
3
|
+
import { dialog } from "./dialog.css.js";
|
|
4
|
+
import { divider } from "./divider.css.js";
|
|
5
|
+
import { input } from "./input.css.js";
|
|
6
|
+
import { label } from "./label.css.js";
|
|
7
|
+
import { link } from "./link.css.js";
|
|
8
|
+
import { popover } from "./popover.css.js";
|
|
9
|
+
import { progress } from "./progress.css.js";
|
|
10
|
+
import { radio } from "./radio.css.js";
|
|
11
|
+
import { select } from "./select.css.js";
|
|
12
|
+
import { slider } from "./slider.css.js";
|
|
13
|
+
import { spinner } from "./spinner.css.js";
|
|
14
|
+
import { switchTheme } from "./switch.css.js";
|
|
15
|
+
import { tooltip } from "./tooltip.css.js";
|
|
16
|
+
const components = {
|
|
17
|
+
button,
|
|
18
|
+
checkbox,
|
|
19
|
+
dialog,
|
|
20
|
+
divider,
|
|
21
|
+
input,
|
|
22
|
+
label,
|
|
23
|
+
link,
|
|
24
|
+
popover,
|
|
25
|
+
progress,
|
|
26
|
+
radio,
|
|
27
|
+
select,
|
|
28
|
+
slider,
|
|
29
|
+
spinner,
|
|
30
|
+
switch: switchTheme,
|
|
31
|
+
tooltip
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
components
|
|
35
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
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.sprinkles({
|
|
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.sprinkles({
|
|
39
|
+
backgroundColor: "white",
|
|
40
|
+
borderRadius: "medium",
|
|
41
|
+
boxShadow: "medium"
|
|
42
|
+
})
|
|
43
|
+
])
|
|
44
|
+
});
|
|
45
|
+
fileScope.endFileScope();
|
|
46
|
+
exports.input = input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const input: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').InputTheme> | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars, sprinkles } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/input.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const input = makeComponentTheme("input", {
|
|
6
|
+
input: style([
|
|
7
|
+
sprinkles({
|
|
8
|
+
color: "text",
|
|
9
|
+
padding: "large",
|
|
10
|
+
border: "none",
|
|
11
|
+
borderRadius: "small"
|
|
12
|
+
}),
|
|
13
|
+
{
|
|
14
|
+
outline: "none",
|
|
15
|
+
background: "transparent",
|
|
16
|
+
"::placeholder": {
|
|
17
|
+
color: vars.color.textLight
|
|
18
|
+
},
|
|
19
|
+
":disabled": {}
|
|
20
|
+
}
|
|
21
|
+
]),
|
|
22
|
+
container: style([
|
|
23
|
+
{
|
|
24
|
+
minHeight: 56,
|
|
25
|
+
"@media": {
|
|
26
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
27
|
+
transition: `box-shadow ${vars.transition.fast}`
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
":focus-within": {
|
|
31
|
+
outline: "2px solid transparent",
|
|
32
|
+
outlineOffset: "2px",
|
|
33
|
+
boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
sprinkles({
|
|
37
|
+
backgroundColor: "white",
|
|
38
|
+
borderRadius: "medium",
|
|
39
|
+
boxShadow: "medium"
|
|
40
|
+
})
|
|
41
|
+
])
|
|
42
|
+
});
|
|
43
|
+
endFileScope();
|
|
44
|
+
export {
|
|
45
|
+
input
|
|
46
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const label: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').LabelTheme> | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars } from "@blockle/blocks-core";
|
|
3
|
+
import { style } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/label.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const label = makeComponentTheme("label", {
|
|
6
|
+
base: style({}),
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
small: style({
|
|
10
|
+
fontSize: vars.fontSize.xsmall
|
|
11
|
+
}),
|
|
12
|
+
medium: style({
|
|
13
|
+
fontSize: vars.fontSize.small
|
|
14
|
+
}),
|
|
15
|
+
large: style({
|
|
16
|
+
fontSize: vars.fontSize.medium
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
required: style({
|
|
20
|
+
":after": {
|
|
21
|
+
content: '"*"',
|
|
22
|
+
marginLeft: vars.space.xsmall
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
size: "large"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
endFileScope();
|
|
31
|
+
export {
|
|
32
|
+
label
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
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.sprinkles({
|
|
39
|
+
color: "primary",
|
|
40
|
+
fontWeight: "medium"
|
|
41
|
+
}),
|
|
42
|
+
secondary: blocksCore.sprinkles({
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const link: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').LinkTheme> | undefined;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { focusable } from "./helpers.css.js";
|
|
5
|
+
setFileScope("src/components/link.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
|
+
const link = makeComponentTheme("link", {
|
|
7
|
+
base: style([
|
|
8
|
+
{
|
|
9
|
+
outline: "none",
|
|
10
|
+
border: "none",
|
|
11
|
+
textDecoration: "none",
|
|
12
|
+
background: "transparent",
|
|
13
|
+
borderRadius: 1,
|
|
14
|
+
":hover": {
|
|
15
|
+
textDecoration: "underline"
|
|
16
|
+
},
|
|
17
|
+
":focus-visible": {
|
|
18
|
+
textDecoration: "underline"
|
|
19
|
+
},
|
|
20
|
+
cursor: "pointer"
|
|
21
|
+
// selectors: {
|
|
22
|
+
// '&[target="_blank"]::after': {
|
|
23
|
+
// content: '"\\2197"',
|
|
24
|
+
// marginLeft: 4,
|
|
25
|
+
// },
|
|
26
|
+
// },
|
|
27
|
+
},
|
|
28
|
+
focusable
|
|
29
|
+
]),
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
inherit: style({
|
|
33
|
+
color: "inherit",
|
|
34
|
+
fontWeight: "inherit"
|
|
35
|
+
}),
|
|
36
|
+
primary: sprinkles({
|
|
37
|
+
color: "primary",
|
|
38
|
+
fontWeight: "medium"
|
|
39
|
+
}),
|
|
40
|
+
secondary: sprinkles({
|
|
41
|
+
color: "secondary",
|
|
42
|
+
fontWeight: "medium"
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
underline: style({
|
|
46
|
+
textDecoration: "underline"
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "primary"
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
endFileScope();
|
|
54
|
+
export {
|
|
55
|
+
link
|
|
56
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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.sprinkles({
|
|
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
|
+
"&[data-open]": {
|
|
21
|
+
transform: "scale(1)",
|
|
22
|
+
opacity: 1
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
26
|
+
"@media": {
|
|
27
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
28
|
+
transform: "scale(0.95)",
|
|
29
|
+
transition: "opacity 80ms linear, transform 80ms",
|
|
30
|
+
opacity: 0
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
])
|
|
35
|
+
});
|
|
36
|
+
fileScope.endFileScope();
|
|
37
|
+
exports.popover = popover;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const popover: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').PopoverTheme> | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
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/popover.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const popover = makeComponentTheme("popover", {
|
|
6
|
+
base: style([
|
|
7
|
+
sprinkles({
|
|
8
|
+
backgroundColor: "white",
|
|
9
|
+
borderRadius: "small",
|
|
10
|
+
boxShadow: "medium",
|
|
11
|
+
padding: "medium",
|
|
12
|
+
margin: "small"
|
|
13
|
+
// Space between the popover and the anchor element
|
|
14
|
+
}),
|
|
15
|
+
{
|
|
16
|
+
width: "max-content",
|
|
17
|
+
selectors: {
|
|
18
|
+
"&[data-open]": {
|
|
19
|
+
transform: "scale(1)",
|
|
20
|
+
opacity: 1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
24
|
+
"@media": {
|
|
25
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
26
|
+
transform: "scale(0.95)",
|
|
27
|
+
transition: "opacity 80ms linear, transform 80ms",
|
|
28
|
+
opacity: 0
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
])
|
|
33
|
+
});
|
|
34
|
+
endFileScope();
|
|
35
|
+
export {
|
|
36
|
+
popover
|
|
37
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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.sprinkles({
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const progress: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').ProgressTheme> | undefined;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme, vars, sprinkles } from "@blockle/blocks-core";
|
|
3
|
+
import { style, keyframes } from "@vanilla-extract/css";
|
|
4
|
+
setFileScope("src/components/progress.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
+
const indeterminateAnimation = keyframes({
|
|
6
|
+
"0%": {
|
|
7
|
+
transform: "translateX(-100%)"
|
|
8
|
+
},
|
|
9
|
+
"100%": {
|
|
10
|
+
transform: "translateX(100%)"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const progress = makeComponentTheme("progress", {
|
|
14
|
+
base: style([
|
|
15
|
+
{
|
|
16
|
+
height: 8
|
|
17
|
+
},
|
|
18
|
+
sprinkles({
|
|
19
|
+
inlineSize: "full",
|
|
20
|
+
borderRadius: "small",
|
|
21
|
+
backgroundColor: "textLight",
|
|
22
|
+
color: "primary",
|
|
23
|
+
overflow: "hidden"
|
|
24
|
+
})
|
|
25
|
+
]),
|
|
26
|
+
bar: style({
|
|
27
|
+
borderRadius: "inherit",
|
|
28
|
+
"@media": {
|
|
29
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
30
|
+
transition: "transform 180ms ease-out"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
variants: {
|
|
35
|
+
indeterminate: style({
|
|
36
|
+
"@media": {
|
|
37
|
+
// For reduce motion we show a striped pattern instead of animating
|
|
38
|
+
"(prefers-reduced-motion: reduce)": {
|
|
39
|
+
backgroundImage: `repeating-linear-gradient(
|
|
40
|
+
45deg,
|
|
41
|
+
transparent,
|
|
42
|
+
transparent 20px,
|
|
43
|
+
${vars.color.primaryDark} 20px,
|
|
44
|
+
${vars.color.primaryDark} 40px
|
|
45
|
+
)`
|
|
46
|
+
},
|
|
47
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
48
|
+
animation: `${indeterminateAnimation} 3s ease-in-out infinite`
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
endFileScope();
|
|
55
|
+
export {
|
|
56
|
+
progress
|
|
57
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
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.sprinkles({
|
|
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.sprinkles({
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "row",
|
|
57
|
+
padding: "xsmall",
|
|
58
|
+
gap: "medium",
|
|
59
|
+
cursor: "pointer"
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
fileScope.endFileScope();
|
|
63
|
+
exports.radio = radio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const radio: import('@blockle/blocks-core').ComponentTheme<import('@blockle/blocks-core/dist/config/componentThemes').RadioTheme> | undefined;
|