@blockle/blocks 0.11.0 → 0.11.1
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/index.cjs +10 -42
- package/dist/index.mjs +4 -36
- package/dist/momotaro.chunk.d.ts +266 -266
- package/dist/reset.css.cjs +0 -2
- package/dist/reset.css.mjs +0 -2
- package/dist/styles/components/display/Divider/divider.css.cjs +10 -3
- package/dist/styles/components/display/Divider/divider.css.mjs +10 -3
- package/dist/styles/components/form/Button/Button.css.cjs +10 -3
- package/dist/styles/components/form/Button/Button.css.mjs +10 -3
- package/dist/styles/components/form/Checkbox/checkbox.css.cjs +24 -5
- package/dist/styles/components/form/Checkbox/checkbox.css.mjs +24 -5
- package/dist/styles/components/form/Input/input.css.cjs +14 -3
- package/dist/styles/components/form/Input/input.css.mjs +14 -3
- package/dist/styles/components/form/Radio/radio.css.cjs +24 -5
- package/dist/styles/components/form/Radio/radio.css.mjs +24 -5
- package/dist/styles/components/form/Select/select.css.cjs +30 -5
- package/dist/styles/components/form/Select/select.css.mjs +30 -5
- package/dist/styles/components/form/Slider/slider.css.cjs +64 -7
- package/dist/styles/components/form/Slider/slider.css.mjs +64 -7
- package/dist/styles/components/form/Switch/switch.css.cjs +20 -4
- package/dist/styles/components/form/Switch/switch.css.mjs +20 -4
- package/dist/styles/components/overlay/Dialog/dialog.css.cjs +18 -3
- package/dist/styles/components/overlay/Dialog/dialog.css.mjs +18 -3
- package/dist/styles/components/typography/Heading/heading.css.cjs +10 -3
- package/dist/styles/components/typography/Heading/heading.css.mjs +10 -3
- package/dist/styles/components/typography/Text/text.css.cjs +10 -3
- package/dist/styles/components/typography/Text/text.css.mjs +10 -3
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +83 -0
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +84 -0
- package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
- package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +31 -2088
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +31 -2088
- package/dist/styles/lib/css/layers/layers.css.cjs +7 -0
- package/dist/styles/lib/css/layers/layers.css.mjs +8 -0
- package/dist/styles/lib/css/style/style.cjs +28 -0
- package/dist/styles/lib/css/style/style.mjs +29 -0
- package/dist/styles/lib/theme/makeComponentTheme.cjs +5 -0
- package/dist/styles/lib/theme/makeComponentTheme.mjs +6 -0
- package/dist/styles/lib/theme/makeTheme.cjs +2 -18
- package/dist/styles/lib/theme/makeTheme.mjs +1 -17
- package/dist/styles/lib/theme/makeVanillaTheme.cjs +19 -0
- package/dist/styles/lib/theme/makeVanillaTheme.mjs +20 -0
- package/dist/styles/lib/theme/tokens.cjs +81 -0
- package/dist/styles/lib/theme/tokens.mjs +82 -0
- package/dist/styles/lib/theme/vars.css.cjs +4 -76
- package/dist/styles/lib/theme/vars.css.mjs +4 -76
- package/dist/styles/themes/momotaro/components/button.css.cjs +103 -0
- package/dist/styles/themes/momotaro/components/button.css.mjs +104 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +59 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +60 -0
- package/dist/styles/themes/momotaro/components/dialog.css.cjs +68 -0
- package/dist/styles/themes/momotaro/components/dialog.css.mjs +69 -0
- package/dist/styles/themes/momotaro/components/divider.css.cjs +11 -0
- package/dist/styles/themes/momotaro/components/divider.css.mjs +12 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.cjs +53 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.mjs +54 -0
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +43 -0
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +44 -0
- package/dist/styles/themes/momotaro/components/index.cjs +32 -0
- package/dist/styles/themes/momotaro/components/index.mjs +33 -0
- package/dist/styles/themes/momotaro/components/input.css.cjs +41 -0
- package/dist/styles/themes/momotaro/components/input.css.mjs +42 -0
- package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
- package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
- package/dist/styles/themes/momotaro/components/link.css.cjs +47 -0
- package/dist/styles/themes/momotaro/components/link.css.mjs +48 -0
- package/dist/styles/themes/momotaro/components/progress.css.cjs +55 -0
- package/dist/styles/themes/momotaro/components/progress.css.mjs +56 -0
- package/dist/styles/themes/momotaro/components/radio.css.cjs +60 -0
- package/dist/styles/themes/momotaro/components/radio.css.mjs +61 -0
- package/dist/styles/themes/momotaro/components/select.css.cjs +44 -0
- package/dist/styles/themes/momotaro/components/select.css.mjs +45 -0
- package/dist/styles/themes/momotaro/components/slider.css.cjs +65 -0
- package/dist/styles/themes/momotaro/components/slider.css.mjs +66 -0
- package/dist/styles/themes/momotaro/components/spinner.css.cjs +43 -0
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +44 -0
- package/dist/styles/themes/momotaro/components/switch.css.cjs +58 -0
- package/dist/styles/themes/momotaro/components/switch.css.mjs +59 -0
- package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
- package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
- package/dist/styles/themes/momotaro/momotaro.css.cjs +7 -191
- package/dist/styles/themes/momotaro/momotaro.css.mjs +7 -191
- package/dist/styles/themes/momotaro/tokens.css.cjs +84 -0
- package/dist/styles/themes/momotaro/tokens.css.mjs +85 -0
- package/package.json +1 -1
- package/dist/style.css +0 -2851
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Input/input.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Input/input.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Select/select.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Select/select.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.mjs +0 -1
- package/dist/styles/entries/reset.css.ts.vanilla.cjs +0 -1
- package/dist/styles/entries/reset.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/theme/vars.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/theme/vars.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.mjs +0 -1
- /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.cjs → lib/css/reset/reset.css.cjs} +0 -0
- /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.mjs → lib/css/reset/reset.css.mjs} +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { createVar } from "@vanilla-extract/css";
|
|
3
|
+
import { style } from "../../../lib/css/style/style.mjs";
|
|
4
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
5
|
+
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
6
|
+
import { clickable, focusRingColor } from "./helpers.css.mjs";
|
|
7
|
+
setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
|
|
8
|
+
const intentColor = createVar("intentColor");
|
|
9
|
+
const hoverBackgroundColor = createVar("hoverBackgroundColor");
|
|
10
|
+
const button = makeComponentTheme("button", {
|
|
11
|
+
base: style([{
|
|
12
|
+
display: "inline-flex",
|
|
13
|
+
placeItems: "center",
|
|
14
|
+
fontSize: "medium",
|
|
15
|
+
borderRadius: "medium",
|
|
16
|
+
fontWeight: "medium",
|
|
17
|
+
// Space between `startSlot | children | endSlot`
|
|
18
|
+
gap: "small",
|
|
19
|
+
selectors: {
|
|
20
|
+
"&:hover:not(:disabled)": {
|
|
21
|
+
backgroundColor: hoverBackgroundColor
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, clickable]),
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
solid: style({
|
|
28
|
+
color: vars.color.white,
|
|
29
|
+
backgroundColor: intentColor,
|
|
30
|
+
border: "none"
|
|
31
|
+
}),
|
|
32
|
+
outline: style({
|
|
33
|
+
color: intentColor,
|
|
34
|
+
borderWidth: "small",
|
|
35
|
+
borderStyle: "solid",
|
|
36
|
+
borderColor: intentColor,
|
|
37
|
+
background: "transparent"
|
|
38
|
+
}),
|
|
39
|
+
ghost: style({
|
|
40
|
+
color: intentColor,
|
|
41
|
+
background: "transparent"
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
small: style({
|
|
46
|
+
paddingInline: "large",
|
|
47
|
+
height: 40
|
|
48
|
+
}),
|
|
49
|
+
medium: style({
|
|
50
|
+
paddingInline: "xlarge",
|
|
51
|
+
height: 56
|
|
52
|
+
}),
|
|
53
|
+
large: style({
|
|
54
|
+
paddingInline: "xlarge",
|
|
55
|
+
height: 72
|
|
56
|
+
})
|
|
57
|
+
},
|
|
58
|
+
intent: {
|
|
59
|
+
neutral: style({
|
|
60
|
+
vars: {
|
|
61
|
+
[intentColor]: vars.color.primary,
|
|
62
|
+
[hoverBackgroundColor]: vars.color.primaryLight
|
|
63
|
+
}
|
|
64
|
+
}),
|
|
65
|
+
danger: style({
|
|
66
|
+
vars: {
|
|
67
|
+
[intentColor]: vars.color.danger,
|
|
68
|
+
[hoverBackgroundColor]: "#fff8f7",
|
|
69
|
+
[focusRingColor]: vars.color.danger
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
compoundVariants: [{
|
|
75
|
+
variants: {
|
|
76
|
+
variant: "solid",
|
|
77
|
+
intent: "neutral"
|
|
78
|
+
},
|
|
79
|
+
style: style({
|
|
80
|
+
vars: {
|
|
81
|
+
[hoverBackgroundColor]: vars.color.primaryDark
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}, {
|
|
85
|
+
variants: {
|
|
86
|
+
variant: "solid",
|
|
87
|
+
intent: "danger"
|
|
88
|
+
},
|
|
89
|
+
style: style({
|
|
90
|
+
vars: {
|
|
91
|
+
[hoverBackgroundColor]: "#f9b1a9"
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
}],
|
|
95
|
+
defaultVariants: {
|
|
96
|
+
size: "small",
|
|
97
|
+
variant: "solid",
|
|
98
|
+
intent: "neutral"
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
endFileScope();
|
|
102
|
+
export {
|
|
103
|
+
button
|
|
104
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
5
|
+
const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs");
|
|
6
|
+
const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
|
|
7
|
+
const styles_themes_momotaro_components_transitions_cjs = require("./transitions.cjs");
|
|
8
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
9
|
+
fileScope.setFileScope("src/themes/momotaro/components/checkbox.css.ts", "@blockle/blocks");
|
|
10
|
+
const checkbox = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("checkbox", {
|
|
11
|
+
base: css.style([{
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
inlineSize: 24,
|
|
16
|
+
blockSize: 24,
|
|
17
|
+
"@media": {
|
|
18
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
19
|
+
transition: `background-color ${styles_lib_theme_vars_css_cjs.vars.transition.normal}, box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
selectors: {
|
|
23
|
+
"&:hover:not(:has(input:disabled))": {
|
|
24
|
+
backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
|
|
25
|
+
},
|
|
26
|
+
"&:has(input:checked)": {
|
|
27
|
+
backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primary
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
31
|
+
backgroundColor: "primaryLight",
|
|
32
|
+
borderRadius: "small"
|
|
33
|
+
}), styles_themes_momotaro_components_helpers_css_cjs.focusable], "checkbox_base"),
|
|
34
|
+
icon: css.style({
|
|
35
|
+
inlineSize: "1rem",
|
|
36
|
+
blockSize: "1rem",
|
|
37
|
+
color: "white",
|
|
38
|
+
transform: "scale(0)",
|
|
39
|
+
selectors: {
|
|
40
|
+
"input:checked ~ &": {
|
|
41
|
+
transform: "scale(1)"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"@media": {
|
|
45
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
46
|
+
transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, "checkbox_icon"),
|
|
50
|
+
label: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
51
|
+
display: "flex",
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
padding: "xsmall",
|
|
54
|
+
gap: "medium",
|
|
55
|
+
cursor: "pointer"
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
fileScope.endFileScope();
|
|
59
|
+
exports.checkbox = checkbox;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
4
|
+
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
5
|
+
import { focusable } from "./helpers.css.mjs";
|
|
6
|
+
import { bounceOut } from "./transitions.mjs";
|
|
7
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
8
|
+
setFileScope("src/themes/momotaro/components/checkbox.css.ts", "@blockle/blocks");
|
|
9
|
+
const checkbox = makeComponentTheme("checkbox", {
|
|
10
|
+
base: style([{
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
inlineSize: 24,
|
|
15
|
+
blockSize: 24,
|
|
16
|
+
"@media": {
|
|
17
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
18
|
+
transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
selectors: {
|
|
22
|
+
"&:hover:not(:has(input:disabled))": {
|
|
23
|
+
backgroundColor: vars.color.primaryDark
|
|
24
|
+
},
|
|
25
|
+
"&:has(input:checked)": {
|
|
26
|
+
backgroundColor: vars.color.primary
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, atoms({
|
|
30
|
+
backgroundColor: "primaryLight",
|
|
31
|
+
borderRadius: "small"
|
|
32
|
+
}), focusable], "checkbox_base"),
|
|
33
|
+
icon: style({
|
|
34
|
+
inlineSize: "1rem",
|
|
35
|
+
blockSize: "1rem",
|
|
36
|
+
color: "white",
|
|
37
|
+
transform: "scale(0)",
|
|
38
|
+
selectors: {
|
|
39
|
+
"input:checked ~ &": {
|
|
40
|
+
transform: "scale(1)"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"@media": {
|
|
44
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
45
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, "checkbox_icon"),
|
|
49
|
+
label: atoms({
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "row",
|
|
52
|
+
padding: "xsmall",
|
|
53
|
+
gap: "medium",
|
|
54
|
+
cursor: "pointer"
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
endFileScope();
|
|
58
|
+
export {
|
|
59
|
+
checkbox
|
|
60
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
5
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
6
|
+
fileScope.setFileScope("src/themes/momotaro/components/dialog.css.ts", "@blockle/blocks");
|
|
7
|
+
const dialog = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("dialog", {
|
|
8
|
+
dialog: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
padding: "gutter",
|
|
12
|
+
border: "none",
|
|
13
|
+
overflow: "auto",
|
|
14
|
+
borderRadius: "medium",
|
|
15
|
+
boxShadow: "large"
|
|
16
|
+
}), {
|
|
17
|
+
maxHeight: "90%",
|
|
18
|
+
minWidth: "300px",
|
|
19
|
+
selectors: {
|
|
20
|
+
"&[data-open]": {
|
|
21
|
+
transform: "scale(1)"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
25
|
+
"@media": {
|
|
26
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
27
|
+
transform: "scale(0.9)",
|
|
28
|
+
transition: "transform 160ms"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}], "dialog_dialog"),
|
|
32
|
+
backdrop: css.style({
|
|
33
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
34
|
+
selectors: {
|
|
35
|
+
"&[data-open]": {
|
|
36
|
+
opacity: 1
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
40
|
+
"@media": {
|
|
41
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
42
|
+
opacity: 0,
|
|
43
|
+
transition: "opacity 160ms"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}, "dialog_backdrop"),
|
|
47
|
+
variants: {
|
|
48
|
+
size: {
|
|
49
|
+
small: css.style({
|
|
50
|
+
width: "400px",
|
|
51
|
+
maxWidth: "min(400px, 90%)"
|
|
52
|
+
}, "dialog_variants_size_small"),
|
|
53
|
+
medium: css.style({
|
|
54
|
+
width: "600px",
|
|
55
|
+
maxWidth: "min(600px, 90%)"
|
|
56
|
+
}, "dialog_variants_size_medium"),
|
|
57
|
+
large: css.style({
|
|
58
|
+
width: "800px",
|
|
59
|
+
maxWidth: "min(800px, 90%)"
|
|
60
|
+
}, "dialog_variants_size_large")
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
size: "small"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
fileScope.endFileScope();
|
|
68
|
+
exports.dialog = dialog;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
4
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
5
|
+
setFileScope("src/themes/momotaro/components/dialog.css.ts", "@blockle/blocks");
|
|
6
|
+
const dialog = makeComponentTheme("dialog", {
|
|
7
|
+
dialog: style([atoms({
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
padding: "gutter",
|
|
11
|
+
border: "none",
|
|
12
|
+
overflow: "auto",
|
|
13
|
+
borderRadius: "medium",
|
|
14
|
+
boxShadow: "large"
|
|
15
|
+
}), {
|
|
16
|
+
maxHeight: "90%",
|
|
17
|
+
minWidth: "300px",
|
|
18
|
+
selectors: {
|
|
19
|
+
"&[data-open]": {
|
|
20
|
+
transform: "scale(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.9)",
|
|
27
|
+
transition: "transform 160ms"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}], "dialog_dialog"),
|
|
31
|
+
backdrop: style({
|
|
32
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
33
|
+
selectors: {
|
|
34
|
+
"&[data-open]": {
|
|
35
|
+
opacity: 1
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
39
|
+
"@media": {
|
|
40
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
41
|
+
opacity: 0,
|
|
42
|
+
transition: "opacity 160ms"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, "dialog_backdrop"),
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
small: style({
|
|
49
|
+
width: "400px",
|
|
50
|
+
maxWidth: "min(400px, 90%)"
|
|
51
|
+
}, "dialog_variants_size_small"),
|
|
52
|
+
medium: style({
|
|
53
|
+
width: "600px",
|
|
54
|
+
maxWidth: "min(600px, 90%)"
|
|
55
|
+
}, "dialog_variants_size_medium"),
|
|
56
|
+
large: style({
|
|
57
|
+
width: "800px",
|
|
58
|
+
maxWidth: "min(800px, 90%)"
|
|
59
|
+
}, "dialog_variants_size_large")
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: {
|
|
63
|
+
size: "small"
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
endFileScope();
|
|
67
|
+
export {
|
|
68
|
+
dialog
|
|
69
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
4
|
+
fileScope.setFileScope("src/themes/momotaro/components/divider.css.ts", "@blockle/blocks");
|
|
5
|
+
const divider = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("divider", {
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
color: "textLight"
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
fileScope.endFileScope();
|
|
11
|
+
exports.divider = divider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
3
|
+
setFileScope("src/themes/momotaro/components/divider.css.ts", "@blockle/blocks");
|
|
4
|
+
const divider = makeComponentTheme("divider", {
|
|
5
|
+
defaultVariants: {
|
|
6
|
+
color: "textLight"
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
endFileScope();
|
|
10
|
+
export {
|
|
11
|
+
divider
|
|
12
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const styles_lib_css_style_style_cjs = require("../../../lib/css/style/style.cjs");
|
|
4
|
+
const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
|
|
5
|
+
fileScope.setFileScope("src/themes/momotaro/components/dropdown.css.ts", "@blockle/blocks");
|
|
6
|
+
const dropdown = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("dropdown", {
|
|
7
|
+
base: styles_lib_css_style_style_cjs.style({
|
|
8
|
+
backgroundColor: "white",
|
|
9
|
+
borderRadius: "small",
|
|
10
|
+
boxShadow: "medium",
|
|
11
|
+
padding: "medium",
|
|
12
|
+
vars: {
|
|
13
|
+
"--spacing": "0.5rem"
|
|
14
|
+
},
|
|
15
|
+
selectors: {
|
|
16
|
+
"&[data-open]": {
|
|
17
|
+
transform: "scale(1)",
|
|
18
|
+
opacity: 1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
22
|
+
"@media": {
|
|
23
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
24
|
+
transform: "scale(0.95)",
|
|
25
|
+
transition: "opacity 80ms linear, transform 80ms",
|
|
26
|
+
opacity: 0
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
solid: styles_lib_css_style_style_cjs.style({
|
|
33
|
+
backgroundColor: "white",
|
|
34
|
+
border: "none",
|
|
35
|
+
boxShadow: "medium",
|
|
36
|
+
color: "black",
|
|
37
|
+
padding: "medium"
|
|
38
|
+
}),
|
|
39
|
+
outline: styles_lib_css_style_style_cjs.style({
|
|
40
|
+
backgroundColor: "transparent",
|
|
41
|
+
border: "1px solid black",
|
|
42
|
+
boxShadow: "none",
|
|
43
|
+
color: "black",
|
|
44
|
+
padding: "medium"
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "solid"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
fileScope.endFileScope();
|
|
53
|
+
exports.dropdown = dropdown;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "../../../lib/css/style/style.mjs";
|
|
3
|
+
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
4
|
+
setFileScope("src/themes/momotaro/components/dropdown.css.ts", "@blockle/blocks");
|
|
5
|
+
const dropdown = makeComponentTheme("dropdown", {
|
|
6
|
+
base: style({
|
|
7
|
+
backgroundColor: "white",
|
|
8
|
+
borderRadius: "small",
|
|
9
|
+
boxShadow: "medium",
|
|
10
|
+
padding: "medium",
|
|
11
|
+
vars: {
|
|
12
|
+
"--spacing": "0.5rem"
|
|
13
|
+
},
|
|
14
|
+
selectors: {
|
|
15
|
+
"&[data-open]": {
|
|
16
|
+
transform: "scale(1)",
|
|
17
|
+
opacity: 1
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
// Apply the animation only if the user has not requested reduced motion
|
|
21
|
+
"@media": {
|
|
22
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
23
|
+
transform: "scale(0.95)",
|
|
24
|
+
transition: "opacity 80ms linear, transform 80ms",
|
|
25
|
+
opacity: 0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
solid: style({
|
|
32
|
+
backgroundColor: "white",
|
|
33
|
+
border: "none",
|
|
34
|
+
boxShadow: "medium",
|
|
35
|
+
color: "black",
|
|
36
|
+
padding: "medium"
|
|
37
|
+
}),
|
|
38
|
+
outline: style({
|
|
39
|
+
backgroundColor: "transparent",
|
|
40
|
+
border: "1px solid black",
|
|
41
|
+
boxShadow: "none",
|
|
42
|
+
color: "black",
|
|
43
|
+
padding: "medium"
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
variant: "solid"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
endFileScope();
|
|
52
|
+
export {
|
|
53
|
+
dropdown
|
|
54
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs");
|
|
5
|
+
fileScope.setFileScope("src/themes/momotaro/components/helpers.css.ts", "@blockle/blocks");
|
|
6
|
+
const focusRingColor = css.createVar("focusRingColor");
|
|
7
|
+
const focusable = css.style({
|
|
8
|
+
"@media": {
|
|
9
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
10
|
+
transition: `box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
":focus-visible": {
|
|
14
|
+
outline: "2px solid transparent",
|
|
15
|
+
outlineOffset: "2px",
|
|
16
|
+
boxShadow: `0 0 1px 2px ${css.fallbackVar(focusRingColor, "#AF8EFF")}`
|
|
17
|
+
},
|
|
18
|
+
selectors: {
|
|
19
|
+
"&:disabled, &[disabled]": {
|
|
20
|
+
opacity: 0.5,
|
|
21
|
+
cursor: "auto",
|
|
22
|
+
pointerEvents: "none"
|
|
23
|
+
},
|
|
24
|
+
"&:has(input:focus-visible)": {
|
|
25
|
+
outline: "2px solid transparent",
|
|
26
|
+
outlineOffset: "2px",
|
|
27
|
+
boxShadow: styles_lib_theme_vars_css_cjs.vars.focus.boxShadow
|
|
28
|
+
},
|
|
29
|
+
"&:has(input:disabled)": {
|
|
30
|
+
opacity: 0.5,
|
|
31
|
+
cursor: "auto"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, "focusable");
|
|
35
|
+
const clickable = css.style([focusable, {
|
|
36
|
+
":active": {
|
|
37
|
+
transform: "scale(0.975)"
|
|
38
|
+
}
|
|
39
|
+
}], "clickable");
|
|
40
|
+
fileScope.endFileScope();
|
|
41
|
+
exports.clickable = clickable;
|
|
42
|
+
exports.focusRingColor = focusRingColor;
|
|
43
|
+
exports.focusable = focusable;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { createVar, style, fallbackVar } from "@vanilla-extract/css";
|
|
3
|
+
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
4
|
+
setFileScope("src/themes/momotaro/components/helpers.css.ts", "@blockle/blocks");
|
|
5
|
+
const focusRingColor = createVar("focusRingColor");
|
|
6
|
+
const focusable = style({
|
|
7
|
+
"@media": {
|
|
8
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
9
|
+
transition: `box-shadow ${vars.transition.fast}`
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
":focus-visible": {
|
|
13
|
+
outline: "2px solid transparent",
|
|
14
|
+
outlineOffset: "2px",
|
|
15
|
+
boxShadow: `0 0 1px 2px ${fallbackVar(focusRingColor, "#AF8EFF")}`
|
|
16
|
+
},
|
|
17
|
+
selectors: {
|
|
18
|
+
"&:disabled, &[disabled]": {
|
|
19
|
+
opacity: 0.5,
|
|
20
|
+
cursor: "auto",
|
|
21
|
+
pointerEvents: "none"
|
|
22
|
+
},
|
|
23
|
+
"&:has(input:focus-visible)": {
|
|
24
|
+
outline: "2px solid transparent",
|
|
25
|
+
outlineOffset: "2px",
|
|
26
|
+
boxShadow: vars.focus.boxShadow
|
|
27
|
+
},
|
|
28
|
+
"&:has(input:disabled)": {
|
|
29
|
+
opacity: 0.5,
|
|
30
|
+
cursor: "auto"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, "focusable");
|
|
34
|
+
const clickable = style([focusable, {
|
|
35
|
+
":active": {
|
|
36
|
+
transform: "scale(0.975)"
|
|
37
|
+
}
|
|
38
|
+
}], "clickable");
|
|
39
|
+
endFileScope();
|
|
40
|
+
export {
|
|
41
|
+
clickable,
|
|
42
|
+
focusRingColor,
|
|
43
|
+
focusable
|
|
44
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const styles_themes_momotaro_components_button_css_cjs = require("./button.css.cjs");
|
|
3
|
+
const styles_themes_momotaro_components_checkbox_css_cjs = require("./checkbox.css.cjs");
|
|
4
|
+
const styles_themes_momotaro_components_dialog_css_cjs = require("./dialog.css.cjs");
|
|
5
|
+
const styles_themes_momotaro_components_divider_css_cjs = require("./divider.css.cjs");
|
|
6
|
+
const styles_themes_momotaro_components_dropdown_css_cjs = require("./dropdown.css.cjs");
|
|
7
|
+
const styles_themes_momotaro_components_input_css_cjs = require("./input.css.cjs");
|
|
8
|
+
const styles_themes_momotaro_components_label_css_cjs = require("./label.css.cjs");
|
|
9
|
+
const styles_themes_momotaro_components_link_css_cjs = require("./link.css.cjs");
|
|
10
|
+
const styles_themes_momotaro_components_progress_css_cjs = require("./progress.css.cjs");
|
|
11
|
+
const styles_themes_momotaro_components_radio_css_cjs = require("./radio.css.cjs");
|
|
12
|
+
const styles_themes_momotaro_components_select_css_cjs = require("./select.css.cjs");
|
|
13
|
+
const styles_themes_momotaro_components_slider_css_cjs = require("./slider.css.cjs");
|
|
14
|
+
const styles_themes_momotaro_components_spinner_css_cjs = require("./spinner.css.cjs");
|
|
15
|
+
const styles_themes_momotaro_components_switch_css_cjs = require("./switch.css.cjs");
|
|
16
|
+
const components = {
|
|
17
|
+
button: styles_themes_momotaro_components_button_css_cjs.button,
|
|
18
|
+
checkbox: styles_themes_momotaro_components_checkbox_css_cjs.checkbox,
|
|
19
|
+
dialog: styles_themes_momotaro_components_dialog_css_cjs.dialog,
|
|
20
|
+
divider: styles_themes_momotaro_components_divider_css_cjs.divider,
|
|
21
|
+
dropdown: styles_themes_momotaro_components_dropdown_css_cjs.dropdown,
|
|
22
|
+
input: styles_themes_momotaro_components_input_css_cjs.input,
|
|
23
|
+
label: styles_themes_momotaro_components_label_css_cjs.label,
|
|
24
|
+
link: styles_themes_momotaro_components_link_css_cjs.link,
|
|
25
|
+
progress: styles_themes_momotaro_components_progress_css_cjs.progress,
|
|
26
|
+
radio: styles_themes_momotaro_components_radio_css_cjs.radio,
|
|
27
|
+
select: styles_themes_momotaro_components_select_css_cjs.select,
|
|
28
|
+
spinner: styles_themes_momotaro_components_spinner_css_cjs.spinner,
|
|
29
|
+
switch: styles_themes_momotaro_components_switch_css_cjs.switchTheme,
|
|
30
|
+
slider: styles_themes_momotaro_components_slider_css_cjs.slider
|
|
31
|
+
};
|
|
32
|
+
exports.components = components;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { button } from "./button.css.mjs";
|
|
2
|
+
import { checkbox } from "./checkbox.css.mjs";
|
|
3
|
+
import { dialog } from "./dialog.css.mjs";
|
|
4
|
+
import { divider } from "./divider.css.mjs";
|
|
5
|
+
import { dropdown } from "./dropdown.css.mjs";
|
|
6
|
+
import { input } from "./input.css.mjs";
|
|
7
|
+
import { label } from "./label.css.mjs";
|
|
8
|
+
import { link } from "./link.css.mjs";
|
|
9
|
+
import { progress } from "./progress.css.mjs";
|
|
10
|
+
import { radio } from "./radio.css.mjs";
|
|
11
|
+
import { select } from "./select.css.mjs";
|
|
12
|
+
import { slider } from "./slider.css.mjs";
|
|
13
|
+
import { spinner } from "./spinner.css.mjs";
|
|
14
|
+
import { switchTheme } from "./switch.css.mjs";
|
|
15
|
+
const components = {
|
|
16
|
+
button,
|
|
17
|
+
checkbox,
|
|
18
|
+
dialog,
|
|
19
|
+
divider,
|
|
20
|
+
dropdown,
|
|
21
|
+
input,
|
|
22
|
+
label,
|
|
23
|
+
link,
|
|
24
|
+
progress,
|
|
25
|
+
radio,
|
|
26
|
+
select,
|
|
27
|
+
spinner,
|
|
28
|
+
switch: switchTheme,
|
|
29
|
+
slider
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
components
|
|
33
|
+
};
|