@blockle/blocks 0.5.1 → 0.7.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.
Files changed (51) hide show
  1. package/dist/index.cjs +264 -186
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +262 -184
  4. package/dist/momotaro.chunk.d.ts +337 -251
  5. package/dist/styles/components/Input/input.css.cjs +14 -0
  6. package/dist/styles/components/Input/input.css.mjs +15 -0
  7. package/dist/styles/lib/css/atoms/atomicProperties.cjs +17 -17
  8. package/dist/styles/lib/css/atoms/atomicProperties.mjs +1 -1
  9. package/dist/styles/lib/theme/makeComponentTheme.cjs +5 -0
  10. package/dist/styles/lib/theme/makeComponentTheme.mjs +6 -0
  11. package/dist/styles/lib/theme/makeTheme.cjs +12 -0
  12. package/dist/styles/lib/{css/theme → theme}/makeTheme.mjs +3 -2
  13. package/dist/styles/lib/theme/vars.css.cjs +9 -0
  14. package/dist/styles/lib/{css/theme → theme}/vars.css.mjs +1 -1
  15. package/dist/styles/themes/momotaro/components/button.css.cjs +21 -12
  16. package/dist/styles/themes/momotaro/components/button.css.mjs +14 -5
  17. package/dist/styles/themes/momotaro/components/checkbox.css.cjs +53 -0
  18. package/dist/styles/themes/momotaro/components/checkbox.css.mjs +54 -0
  19. package/dist/styles/themes/momotaro/components/dialog.css.cjs +25 -6
  20. package/dist/styles/themes/momotaro/components/dialog.css.mjs +24 -5
  21. package/dist/styles/themes/momotaro/components/divider.css.cjs +2 -2
  22. package/dist/styles/themes/momotaro/components/divider.css.mjs +1 -1
  23. package/dist/styles/themes/momotaro/components/helpers.css.cjs +20 -5
  24. package/dist/styles/themes/momotaro/components/helpers.css.mjs +18 -3
  25. package/dist/styles/themes/momotaro/components/index.cjs +11 -3
  26. package/dist/styles/themes/momotaro/components/index.mjs +11 -3
  27. package/dist/styles/themes/momotaro/components/input.css.cjs +40 -0
  28. package/dist/styles/themes/momotaro/components/input.css.mjs +41 -0
  29. package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
  30. package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
  31. package/dist/styles/themes/momotaro/components/link.css.cjs +6 -4
  32. package/dist/styles/themes/momotaro/components/link.css.mjs +5 -3
  33. package/dist/styles/themes/momotaro/components/radio.css.cjs +53 -0
  34. package/dist/styles/themes/momotaro/components/radio.css.mjs +54 -0
  35. package/dist/styles/themes/momotaro/components/spinner.css.cjs +2 -2
  36. package/dist/styles/themes/momotaro/components/spinner.css.mjs +1 -1
  37. package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
  38. package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
  39. package/dist/styles/themes/momotaro/momotaro.css.cjs +2 -2
  40. package/dist/styles/themes/momotaro/momotaro.css.mjs +1 -1
  41. package/dist/styles/themes/momotaro/tokens.css.cjs +4 -4
  42. package/dist/styles/themes/momotaro/tokens.css.mjs +4 -4
  43. package/package.json +2 -2
  44. package/dist/styles/lib/css/theme/makeComponentTheme.cjs +0 -3
  45. package/dist/styles/lib/css/theme/makeComponentTheme.mjs +0 -4
  46. package/dist/styles/lib/css/theme/makeTheme.cjs +0 -11
  47. package/dist/styles/lib/css/theme/vars.css.cjs +0 -9
  48. /package/dist/styles/lib/{css/theme → theme}/makeVanillaTheme.cjs +0 -0
  49. /package/dist/styles/lib/{css/theme → theme}/makeVanillaTheme.mjs +0 -0
  50. /package/dist/styles/lib/{css/theme → theme}/tokens.cjs +0 -0
  51. /package/dist/styles/lib/{css/theme → theme}/tokens.mjs +0 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const css = require("@vanilla-extract/css");
4
+ const styles_lib_css_layers_layers_css_cjs = require("../../lib/css/layers/layers.css.cjs");
5
+ fileScope.setFileScope("src/components/Input/input.css.ts?used", "blocks");
6
+ const input = css.style({
7
+ "@layer": {
8
+ [styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
9
+ appearance: "none"
10
+ }
11
+ }
12
+ }, "input");
13
+ fileScope.endFileScope();
14
+ exports.input = input;
@@ -0,0 +1,15 @@
1
+ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
+ import { style } from "@vanilla-extract/css";
3
+ import { blocksLayer } from "../../lib/css/layers/layers.css.mjs";
4
+ setFileScope("src/components/Input/input.css.ts?used", "blocks");
5
+ const input = style({
6
+ "@layer": {
7
+ [blocksLayer]: {
8
+ appearance: "none"
9
+ }
10
+ }
11
+ }, "input");
12
+ endFileScope();
13
+ export {
14
+ input
15
+ };
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
- const styles_lib_css_theme_vars_css_cjs = require("../theme/vars.css.cjs");
3
- const colorWithCurrentColor = { ...styles_lib_css_theme_vars_css_cjs.vars.color, currentColor: "currentColor" };
2
+ const styles_lib_theme_vars_css_cjs = require("../../theme/vars.css.cjs");
3
+ const colorWithCurrentColor = { ...styles_lib_theme_vars_css_cjs.vars.color, currentColor: "currentColor" };
4
4
  const unresponsiveProperties = {
5
5
  backgroundColor: colorWithCurrentColor,
6
6
  borderColor: colorWithCurrentColor,
7
- borderRadius: styles_lib_css_theme_vars_css_cjs.vars.borderRadius,
7
+ borderRadius: styles_lib_theme_vars_css_cjs.vars.borderRadius,
8
8
  border: ["none"],
9
9
  bottom: [0],
10
- boxShadow: styles_lib_css_theme_vars_css_cjs.vars.shadow,
10
+ boxShadow: styles_lib_theme_vars_css_cjs.vars.shadow,
11
11
  color: colorWithCurrentColor,
12
12
  cursor: ["auto", "pointer"],
13
- fontFamily: styles_lib_css_theme_vars_css_cjs.vars.fontFamily,
13
+ fontFamily: styles_lib_theme_vars_css_cjs.vars.fontFamily,
14
14
  fontStyle: ["normal", "italic", "oblique"],
15
- fontWeight: styles_lib_css_theme_vars_css_cjs.vars.fontWeight,
15
+ fontWeight: styles_lib_theme_vars_css_cjs.vars.fontWeight,
16
16
  height: { auto: "auto", full: "100%" },
17
17
  left: [0],
18
- lineHeight: styles_lib_css_theme_vars_css_cjs.vars.lineHeight,
18
+ lineHeight: styles_lib_theme_vars_css_cjs.vars.lineHeight,
19
19
  maxHeight: { full: "100%" },
20
20
  maxWidth: { full: "100%" },
21
21
  opacity: [0, 1],
@@ -28,19 +28,19 @@ const unresponsiveProperties = {
28
28
  textTransform: ["lowercase", "uppercase", "capitalize"],
29
29
  textWrap: ["balance", "wrap"],
30
30
  top: [0],
31
- transition: styles_lib_css_theme_vars_css_cjs.vars.transition,
31
+ transition: styles_lib_theme_vars_css_cjs.vars.transition,
32
32
  userSelect: ["none"],
33
33
  whiteSpace: ["nowrap", "pre", "pre-line", "pre-wrap"],
34
34
  width: { auto: "auto", full: "100%", "fit-content": "fit-content" },
35
35
  wordBreak: ["break-word"],
36
36
  wordWrap: ["break-word"]
37
37
  };
38
- const marginSpace = { auto: "auto", ...styles_lib_css_theme_vars_css_cjs.vars.space };
38
+ const marginSpace = { auto: "auto", ...styles_lib_theme_vars_css_cjs.vars.space };
39
39
  const responsiveProperties = {
40
40
  alignContent: ["stretch", "center", "flex-start", "flex-end"],
41
41
  alignItems: ["stretch", "center", "flex-start", "flex-end"],
42
42
  alignSelf: ["stretch", "center", "flex-start", "flex-end"],
43
- columnGap: styles_lib_css_theme_vars_css_cjs.vars.space,
43
+ columnGap: styles_lib_theme_vars_css_cjs.vars.space,
44
44
  display: [
45
45
  "none",
46
46
  "flex",
@@ -56,20 +56,20 @@ const responsiveProperties = {
56
56
  flexGrow: [0, 1],
57
57
  flexShrink: [0, 1],
58
58
  flexWrap: ["nowrap", "wrap"],
59
- fontSize: styles_lib_css_theme_vars_css_cjs.vars.fontSize,
60
- gap: styles_lib_css_theme_vars_css_cjs.vars.space,
59
+ fontSize: styles_lib_theme_vars_css_cjs.vars.fontSize,
60
+ gap: styles_lib_theme_vars_css_cjs.vars.space,
61
61
  justifyContent: ["flex-start", "flex-end", "center", "space-between", "space-around"],
62
62
  marginBottom: marginSpace,
63
63
  marginLeft: marginSpace,
64
64
  marginRight: marginSpace,
65
65
  marginTop: marginSpace,
66
66
  outline: ["none"],
67
- paddingBottom: styles_lib_css_theme_vars_css_cjs.vars.space,
68
- paddingLeft: styles_lib_css_theme_vars_css_cjs.vars.space,
69
- paddingRight: styles_lib_css_theme_vars_css_cjs.vars.space,
70
- paddingTop: styles_lib_css_theme_vars_css_cjs.vars.space,
67
+ paddingBottom: styles_lib_theme_vars_css_cjs.vars.space,
68
+ paddingLeft: styles_lib_theme_vars_css_cjs.vars.space,
69
+ paddingRight: styles_lib_theme_vars_css_cjs.vars.space,
70
+ paddingTop: styles_lib_theme_vars_css_cjs.vars.space,
71
71
  position: ["relative", "fixed", "absolute", "sticky", "static"],
72
- rowGap: styles_lib_css_theme_vars_css_cjs.vars.space,
72
+ rowGap: styles_lib_theme_vars_css_cjs.vars.space,
73
73
  textAlign: ["center", "left", "right", "justify"]
74
74
  };
75
75
  exports.responsiveProperties = responsiveProperties;
@@ -1,4 +1,4 @@
1
- import { vars } from "../theme/vars.css.mjs";
1
+ import { vars } from "../../theme/vars.css.mjs";
2
2
  const colorWithCurrentColor = { ...vars.color, currentColor: "currentColor" };
3
3
  const unresponsiveProperties = {
4
4
  backgroundColor: colorWithCurrentColor,
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ function makeComponentTheme(component, componentTheme) {
3
+ return componentTheme;
4
+ }
5
+ exports.makeComponentTheme = makeComponentTheme;
@@ -0,0 +1,6 @@
1
+ function makeComponentTheme(component, componentTheme) {
2
+ return componentTheme;
3
+ }
4
+ export {
5
+ makeComponentTheme
6
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ const css = require("@vanilla-extract/css");
3
+ const styles_lib_theme_makeVanillaTheme_cjs = require("./makeVanillaTheme.cjs");
4
+ const styles_lib_theme_vars_css_cjs = require("./vars.css.cjs");
5
+ function makeTheme(theme) {
6
+ return {
7
+ name: theme.name,
8
+ vars: css.createTheme(styles_lib_theme_vars_css_cjs.vars, styles_lib_theme_makeVanillaTheme_cjs.makeVanillaTheme(theme.tokens)),
9
+ components: theme.components
10
+ };
11
+ }
12
+ exports.makeTheme = makeTheme;
@@ -1,12 +1,13 @@
1
1
  import { createTheme } from "@vanilla-extract/css";
2
2
  import { makeVanillaTheme } from "./makeVanillaTheme.mjs";
3
3
  import { vars } from "./vars.css.mjs";
4
- const makeTheme = (theme) => {
4
+ function makeTheme(theme) {
5
5
  return {
6
+ name: theme.name,
6
7
  vars: createTheme(vars, makeVanillaTheme(theme.tokens)),
7
8
  components: theme.components
8
9
  };
9
- };
10
+ }
10
11
  export {
11
12
  makeTheme
12
13
  };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const css = require("@vanilla-extract/css");
4
+ const styles_lib_theme_makeVanillaTheme_cjs = require("./makeVanillaTheme.cjs");
5
+ const styles_lib_theme_tokens_cjs = require("./tokens.cjs");
6
+ fileScope.setFileScope("src/lib/theme/vars.css.ts?used", "blocks");
7
+ const vars = css.createThemeContract(styles_lib_theme_makeVanillaTheme_cjs.makeVanillaTheme(styles_lib_theme_tokens_cjs.tokens));
8
+ fileScope.endFileScope();
9
+ exports.vars = vars;
@@ -2,7 +2,7 @@ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { createThemeContract } from "@vanilla-extract/css";
3
3
  import { makeVanillaTheme } from "./makeVanillaTheme.mjs";
4
4
  import { tokens } from "./tokens.mjs";
5
- setFileScope("src/lib/css/theme/vars.css.ts?used", "blocks");
5
+ setFileScope("src/lib/theme/vars.css.ts?used", "blocks");
6
6
  const vars = createThemeContract(makeVanillaTheme(tokens));
7
7
  endFileScope();
8
8
  export {
@@ -1,41 +1,41 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
3
  const css = require("@vanilla-extract/css");
4
- const styles_lib_css_theme_makeComponentTheme_cjs = require("../../../lib/css/theme/makeComponentTheme.cjs");
5
- const styles_lib_css_theme_vars_css_cjs = require("../../../lib/css/theme/vars.css.cjs");
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
6
  const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
7
7
  const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
8
8
  fileScope.setFileScope("src/themes/momotaro/components/button.css.ts?used", "blocks");
9
9
  const primaryColor = css.createVar("primaryColor");
10
- const button = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("button", {
10
+ const button = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("button", {
11
11
  base: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
12
12
  display: "inline-flex",
13
13
  placeItems: "center",
14
14
  fontSize: "medium",
15
15
  borderRadius: "medium",
16
16
  fontWeight: "medium"
17
- }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "button_base"),
17
+ }), styles_themes_momotaro_components_helpers_css_cjs.clickable], "button_base"),
18
18
  variants: {
19
19
  variant: {
20
20
  solid: css.style({
21
- color: styles_lib_css_theme_vars_css_cjs.vars.color.white,
21
+ color: styles_lib_theme_vars_css_cjs.vars.color.white,
22
22
  backgroundColor: primaryColor,
23
23
  border: "none",
24
24
  selectors: {
25
25
  "&:hover:not(:disabled)": {
26
- backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryDark
26
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
27
27
  }
28
28
  }
29
29
  }, "button_variants_variant_solid"),
30
30
  outline: css.style({
31
31
  color: primaryColor,
32
- borderWidth: styles_lib_css_theme_vars_css_cjs.vars.borderWidth.small,
32
+ borderWidth: styles_lib_theme_vars_css_cjs.vars.borderWidth.small,
33
33
  borderStyle: "solid",
34
34
  borderColor: primaryColor,
35
35
  background: "transparent",
36
36
  selectors: {
37
37
  "&:hover:not(:disabled)": {
38
- backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryLight
38
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryLight
39
39
  }
40
40
  }
41
41
  }, "button_variants_variant_outline"),
@@ -44,7 +44,7 @@ const button = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("b
44
44
  background: "transparent",
45
45
  selectors: {
46
46
  "&:hover:not(:disabled)": {
47
- backgroundColor: styles_lib_css_theme_vars_css_cjs.vars.color.primaryLight
47
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryLight
48
48
  }
49
49
  }
50
50
  }, "button_variants_variant_ghost")
@@ -69,12 +69,12 @@ const button = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("b
69
69
  intent: {
70
70
  neutral: css.style({
71
71
  vars: {
72
- [primaryColor]: styles_lib_css_theme_vars_css_cjs.vars.color.primary
72
+ [primaryColor]: styles_lib_theme_vars_css_cjs.vars.color.primary
73
73
  }
74
74
  }, "button_variants_intent_neutral"),
75
75
  danger: css.style({
76
76
  vars: {
77
- [primaryColor]: styles_lib_css_theme_vars_css_cjs.vars.color.danger
77
+ [primaryColor]: styles_lib_theme_vars_css_cjs.vars.color.danger
78
78
  }
79
79
  }, "button_variants_intent_danger")
80
80
  }
@@ -92,10 +92,19 @@ const button = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("b
92
92
  // background: 'red',
93
93
  // }),
94
94
  // },
95
+ // {
96
+ // variants: {
97
+ // variant: 'solid',
98
+ // size: 'large',
99
+ // },
100
+ // style: style({
101
+ // transform: 'scale(2)',
102
+ // }),
103
+ // },
95
104
  // ],
96
105
  defaultVariants: {
97
106
  size: "small",
98
- variant: "ghost",
107
+ variant: "solid",
99
108
  intent: "neutral"
100
109
  }
101
110
  });
@@ -1,8 +1,8 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { createVar, style } from "@vanilla-extract/css";
3
- import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
4
- import { vars } from "../../../lib/css/theme/vars.css.mjs";
5
- import { focusable } from "./helpers.css.mjs";
3
+ import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
4
+ import { vars } from "../../../lib/theme/vars.css.mjs";
5
+ import { clickable } from "./helpers.css.mjs";
6
6
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
7
7
  setFileScope("src/themes/momotaro/components/button.css.ts?used", "blocks");
8
8
  const primaryColor = createVar("primaryColor");
@@ -13,7 +13,7 @@ const button = makeComponentTheme("button", {
13
13
  fontSize: "medium",
14
14
  borderRadius: "medium",
15
15
  fontWeight: "medium"
16
- }), focusable], "button_base"),
16
+ }), clickable], "button_base"),
17
17
  variants: {
18
18
  variant: {
19
19
  solid: style({
@@ -91,10 +91,19 @@ const button = makeComponentTheme("button", {
91
91
  // background: 'red',
92
92
  // }),
93
93
  // },
94
+ // {
95
+ // variants: {
96
+ // variant: 'solid',
97
+ // size: 'large',
98
+ // },
99
+ // style: style({
100
+ // transform: 'scale(2)',
101
+ // }),
102
+ // },
94
103
  // ],
95
104
  defaultVariants: {
96
105
  size: "small",
97
- variant: "ghost",
106
+ variant: "solid",
98
107
  intent: "neutral"
99
108
  }
100
109
  });
@@ -0,0 +1,53 @@
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?used", "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
+ width: 24,
16
+ height: 24,
17
+ transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`,
18
+ transitionProperty: "background-color",
19
+ ":hover": {
20
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
21
+ },
22
+ selectors: {
23
+ "&:has(input:checked):not(:hover)": {
24
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primary
25
+ }
26
+ }
27
+ }, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
28
+ backgroundColor: "primaryLight",
29
+ borderRadius: "small"
30
+ }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "checkbox_base"),
31
+ icon: css.style({
32
+ height: 12,
33
+ width: 12,
34
+ backgroundColor: "white",
35
+ borderRadius: "8px",
36
+ transform: "scale(0)",
37
+ transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`,
38
+ selectors: {
39
+ "input:checked ~ &": {
40
+ transform: "scale(1)"
41
+ }
42
+ }
43
+ }, "checkbox_icon"),
44
+ label: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
45
+ display: "flex",
46
+ flexDirection: "row",
47
+ padding: "xsmall",
48
+ gap: "medium",
49
+ cursor: "pointer"
50
+ })
51
+ });
52
+ fileScope.endFileScope();
53
+ exports.checkbox = checkbox;
@@ -0,0 +1,54 @@
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?used", "blocks");
9
+ const checkbox = makeComponentTheme("checkbox", {
10
+ base: style([{
11
+ display: "flex",
12
+ alignItems: "center",
13
+ justifyContent: "center",
14
+ width: 24,
15
+ height: 24,
16
+ transition: `transform ${vars.transition.fast}`,
17
+ transitionProperty: "background-color",
18
+ ":hover": {
19
+ backgroundColor: vars.color.primaryDark
20
+ },
21
+ selectors: {
22
+ "&:has(input:checked):not(:hover)": {
23
+ backgroundColor: vars.color.primary
24
+ }
25
+ }
26
+ }, atoms({
27
+ backgroundColor: "primaryLight",
28
+ borderRadius: "small"
29
+ }), focusable], "checkbox_base"),
30
+ icon: style({
31
+ height: 12,
32
+ width: 12,
33
+ backgroundColor: "white",
34
+ borderRadius: "8px",
35
+ transform: "scale(0)",
36
+ transition: `transform ${vars.transition.normal} ${bounceOut}`,
37
+ selectors: {
38
+ "input:checked ~ &": {
39
+ transform: "scale(1)"
40
+ }
41
+ }
42
+ }, "checkbox_icon"),
43
+ label: atoms({
44
+ display: "flex",
45
+ flexDirection: "row",
46
+ padding: "xsmall",
47
+ gap: "medium",
48
+ cursor: "pointer"
49
+ })
50
+ });
51
+ endFileScope();
52
+ export {
53
+ checkbox
54
+ };
@@ -1,23 +1,42 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
3
  const css = require("@vanilla-extract/css");
4
- const styles_lib_css_theme_makeComponentTheme_cjs = require("../../../lib/css/theme/makeComponentTheme.cjs");
4
+ const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
5
5
  const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
6
6
  fileScope.setFileScope("src/themes/momotaro/components/dialog.css.ts?used", "blocks");
7
- const dialog = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("dialog", {
7
+ const dialog = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("dialog", {
8
8
  base: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
9
9
  display: "flex",
10
10
  flexDirection: "column",
11
11
  padding: "gutter",
12
12
  border: "none",
13
- overflow: "auto"
13
+ overflow: "auto",
14
+ borderRadius: "medium",
15
+ boxShadow: "large"
14
16
  }), {
15
17
  minWidth: "300px"
16
18
  }], "dialog_base"),
19
+ backdrop: css.style({
20
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
21
+ }, "dialog_backdrop"),
17
22
  variants: {
18
- backdrop: css.style({
19
- backgroundColor: "rgba(0, 0, 0, 0.5)"
20
- }, "dialog_variants_backdrop")
23
+ size: {
24
+ small: css.style({
25
+ width: "400px",
26
+ maxWidth: "min(400px, 90vw)"
27
+ }, "dialog_variants_size_small"),
28
+ medium: css.style({
29
+ width: "600px",
30
+ maxWidth: "min(600px, 90vw)"
31
+ }, "dialog_variants_size_medium"),
32
+ large: css.style({
33
+ width: "800px",
34
+ maxWidth: "min(800px, 90vw)"
35
+ }, "dialog_variants_size_large")
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ size: "small"
21
40
  }
22
41
  });
23
42
  fileScope.endFileScope();
@@ -1,6 +1,6 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { style } from "@vanilla-extract/css";
3
- import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
3
+ import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
4
4
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
5
5
  setFileScope("src/themes/momotaro/components/dialog.css.ts?used", "blocks");
6
6
  const dialog = makeComponentTheme("dialog", {
@@ -9,14 +9,33 @@ const dialog = makeComponentTheme("dialog", {
9
9
  flexDirection: "column",
10
10
  padding: "gutter",
11
11
  border: "none",
12
- overflow: "auto"
12
+ overflow: "auto",
13
+ borderRadius: "medium",
14
+ boxShadow: "large"
13
15
  }), {
14
16
  minWidth: "300px"
15
17
  }], "dialog_base"),
18
+ backdrop: style({
19
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
20
+ }, "dialog_backdrop"),
16
21
  variants: {
17
- backdrop: style({
18
- backgroundColor: "rgba(0, 0, 0, 0.5)"
19
- }, "dialog_variants_backdrop")
22
+ size: {
23
+ small: style({
24
+ width: "400px",
25
+ maxWidth: "min(400px, 90vw)"
26
+ }, "dialog_variants_size_small"),
27
+ medium: style({
28
+ width: "600px",
29
+ maxWidth: "min(600px, 90vw)"
30
+ }, "dialog_variants_size_medium"),
31
+ large: style({
32
+ width: "800px",
33
+ maxWidth: "min(800px, 90vw)"
34
+ }, "dialog_variants_size_large")
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ size: "small"
20
39
  }
21
40
  });
22
41
  endFileScope();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
- const styles_lib_css_theme_makeComponentTheme_cjs = require("../../../lib/css/theme/makeComponentTheme.cjs");
3
+ const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
4
4
  fileScope.setFileScope("src/themes/momotaro/components/divider.css.ts?used", "blocks");
5
- const divider = styles_lib_css_theme_makeComponentTheme_cjs.makeComponentTheme("divider", {
5
+ const divider = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("divider", {
6
6
  defaultVariants: {
7
7
  color: "textLight"
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme } from "../../../lib/css/theme/makeComponentTheme.mjs";
2
+ import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
3
3
  setFileScope("src/themes/momotaro/components/divider.css.ts?used", "blocks");
4
4
  const divider = makeComponentTheme("divider", {
5
5
  defaultVariants: {
@@ -1,26 +1,41 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
3
  const css = require("@vanilla-extract/css");
4
- const styles_lib_css_theme_vars_css_cjs = require("../../../lib/css/theme/vars.css.cjs");
4
+ const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs");
5
5
  fileScope.setFileScope("src/themes/momotaro/components/helpers.css.ts?used", "blocks");
6
6
  const focusable = css.style({
7
7
  ":focus-visible": {
8
8
  outline: "2px solid transparent",
9
9
  outlineOffset: "2px",
10
- boxShadow: styles_lib_css_theme_vars_css_cjs.vars.focus.boxShadow,
11
- transitionDuration: styles_lib_css_theme_vars_css_cjs.vars.transition.fast,
10
+ boxShadow: styles_lib_theme_vars_css_cjs.vars.focus.boxShadow,
11
+ transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
12
12
  transitionProperty: "box-shadow"
13
13
  },
14
14
  ":disabled": {
15
15
  opacity: 0.5,
16
16
  cursor: "auto"
17
17
  },
18
- // TODO This is for buttons?
18
+ selectors: {
19
+ "&:has(input:focus-visible)": {
20
+ outline: "2px solid transparent",
21
+ outlineOffset: "2px",
22
+ boxShadow: styles_lib_theme_vars_css_cjs.vars.focus.boxShadow,
23
+ transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
24
+ transitionProperty: "box-shadow"
25
+ },
26
+ "&:has(input:disabled)": {
27
+ opacity: 0.5,
28
+ cursor: "auto"
29
+ }
30
+ }
31
+ }, "focusable");
32
+ const clickable = css.style([focusable, {
19
33
  selectors: {
20
34
  "&:active:not(:disabled)": {
21
35
  transform: "scale(0.9)"
22
36
  }
23
37
  }
24
- }, "focusable");
38
+ }], "clickable");
25
39
  fileScope.endFileScope();
40
+ exports.clickable = clickable;
26
41
  exports.focusable = focusable;
@@ -1,6 +1,6 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { style } from "@vanilla-extract/css";
3
- import { vars } from "../../../lib/css/theme/vars.css.mjs";
3
+ import { vars } from "../../../lib/theme/vars.css.mjs";
4
4
  setFileScope("src/themes/momotaro/components/helpers.css.ts?used", "blocks");
5
5
  const focusable = style({
6
6
  ":focus-visible": {
@@ -14,14 +14,29 @@ const focusable = style({
14
14
  opacity: 0.5,
15
15
  cursor: "auto"
16
16
  },
17
- // TODO This is for buttons?
17
+ selectors: {
18
+ "&:has(input:focus-visible)": {
19
+ outline: "2px solid transparent",
20
+ outlineOffset: "2px",
21
+ boxShadow: vars.focus.boxShadow,
22
+ transitionDuration: vars.transition.fast,
23
+ transitionProperty: "box-shadow"
24
+ },
25
+ "&:has(input:disabled)": {
26
+ opacity: 0.5,
27
+ cursor: "auto"
28
+ }
29
+ }
30
+ }, "focusable");
31
+ const clickable = style([focusable, {
18
32
  selectors: {
19
33
  "&:active:not(:disabled)": {
20
34
  transform: "scale(0.9)"
21
35
  }
22
36
  }
23
- }, "focusable");
37
+ }], "clickable");
24
38
  endFileScope();
25
39
  export {
40
+ clickable,
26
41
  focusable
27
42
  };