@blockle/blocks 0.5.1 → 0.6.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 (43) hide show
  1. package/dist/index.cjs +90 -41
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +88 -39
  4. package/dist/momotaro.chunk.d.ts +261 -220
  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/dialog.css.cjs +25 -6
  18. package/dist/styles/themes/momotaro/components/dialog.css.mjs +24 -5
  19. package/dist/styles/themes/momotaro/components/divider.css.cjs +2 -2
  20. package/dist/styles/themes/momotaro/components/divider.css.mjs +1 -1
  21. package/dist/styles/themes/momotaro/components/helpers.css.cjs +8 -6
  22. package/dist/styles/themes/momotaro/components/helpers.css.mjs +6 -4
  23. package/dist/styles/themes/momotaro/components/index.cjs +5 -3
  24. package/dist/styles/themes/momotaro/components/index.mjs +5 -3
  25. package/dist/styles/themes/momotaro/components/input.css.cjs +40 -0
  26. package/dist/styles/themes/momotaro/components/input.css.mjs +41 -0
  27. package/dist/styles/themes/momotaro/components/link.css.cjs +5 -4
  28. package/dist/styles/themes/momotaro/components/link.css.mjs +4 -3
  29. package/dist/styles/themes/momotaro/components/spinner.css.cjs +2 -2
  30. package/dist/styles/themes/momotaro/components/spinner.css.mjs +1 -1
  31. package/dist/styles/themes/momotaro/momotaro.css.cjs +2 -2
  32. package/dist/styles/themes/momotaro/momotaro.css.mjs +1 -1
  33. package/dist/styles/themes/momotaro/tokens.css.cjs +4 -4
  34. package/dist/styles/themes/momotaro/tokens.css.mjs +4 -4
  35. package/package.json +1 -1
  36. package/dist/styles/lib/css/theme/makeComponentTheme.cjs +0 -3
  37. package/dist/styles/lib/css/theme/makeComponentTheme.mjs +0 -4
  38. package/dist/styles/lib/css/theme/makeTheme.cjs +0 -11
  39. package/dist/styles/lib/css/theme/vars.css.cjs +0 -9
  40. /package/dist/styles/lib/{css/theme → theme}/makeVanillaTheme.cjs +0 -0
  41. /package/dist/styles/lib/{css/theme → theme}/makeVanillaTheme.mjs +0 -0
  42. /package/dist/styles/lib/{css/theme → theme}/tokens.cjs +0 -0
  43. /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");
6
5
  const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
6
+ const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.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 { clickable } from "./helpers.css.mjs";
5
+ import { vars } from "../../../lib/theme/vars.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
  });
@@ -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,28 @@
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
- },
18
- // TODO This is for buttons?
17
+ }
18
+ }, "focusable");
19
+ const clickable = css.style([focusable, {
19
20
  selectors: {
20
21
  "&:active:not(:disabled)": {
21
22
  transform: "scale(0.9)"
22
23
  }
23
24
  }
24
- }, "focusable");
25
+ }], "clickable");
25
26
  fileScope.endFileScope();
27
+ exports.clickable = clickable;
26
28
  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": {
@@ -13,15 +13,17 @@ const focusable = style({
13
13
  ":disabled": {
14
14
  opacity: 0.5,
15
15
  cursor: "auto"
16
- },
17
- // TODO This is for buttons?
16
+ }
17
+ }, "focusable");
18
+ const clickable = style([focusable, {
18
19
  selectors: {
19
20
  "&:active:not(:disabled)": {
20
21
  transform: "scale(0.9)"
21
22
  }
22
23
  }
23
- }, "focusable");
24
+ }], "clickable");
24
25
  endFileScope();
25
26
  export {
27
+ clickable,
26
28
  focusable
27
29
  };
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  const styles_themes_momotaro_components_button_css_cjs = require("./button.css.cjs");
3
+ const styles_themes_momotaro_components_dialog_css_cjs = require("./dialog.css.cjs");
4
+ const styles_themes_momotaro_components_divider_css_cjs = require("./divider.css.cjs");
5
+ const styles_themes_momotaro_components_input_css_cjs = require("./input.css.cjs");
3
6
  const styles_themes_momotaro_components_link_css_cjs = require("./link.css.cjs");
4
7
  const styles_themes_momotaro_components_spinner_css_cjs = require("./spinner.css.cjs");
5
- const styles_themes_momotaro_components_divider_css_cjs = require("./divider.css.cjs");
6
- const styles_themes_momotaro_components_dialog_css_cjs = require("./dialog.css.cjs");
7
8
  const components = {
8
9
  button: styles_themes_momotaro_components_button_css_cjs.button,
9
10
  link: styles_themes_momotaro_components_link_css_cjs.link,
10
11
  spinner: styles_themes_momotaro_components_spinner_css_cjs.spinner,
11
12
  divider: styles_themes_momotaro_components_divider_css_cjs.divider,
12
- dialog: styles_themes_momotaro_components_dialog_css_cjs.dialog
13
+ dialog: styles_themes_momotaro_components_dialog_css_cjs.dialog,
14
+ input: styles_themes_momotaro_components_input_css_cjs.input
13
15
  };
14
16
  exports.components = components;
@@ -1,14 +1,16 @@
1
1
  import { button } from "./button.css.mjs";
2
+ import { dialog } from "./dialog.css.mjs";
3
+ import { divider } from "./divider.css.mjs";
4
+ import { input } from "./input.css.mjs";
2
5
  import { link } from "./link.css.mjs";
3
6
  import { spinner } from "./spinner.css.mjs";
4
- import { divider } from "./divider.css.mjs";
5
- import { dialog } from "./dialog.css.mjs";
6
7
  const components = {
7
8
  button,
8
9
  link,
9
10
  spinner,
10
11
  divider,
11
- dialog
12
+ dialog,
13
+ input
12
14
  };
13
15
  export {
14
16
  components
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const css = require("@vanilla-extract/css");
4
+ const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
5
+ const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
6
+ const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs");
7
+ const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
8
+ fileScope.setFileScope("src/themes/momotaro/components/input.css.ts?used", "blocks");
9
+ const input = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("input", {
10
+ input: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
11
+ color: "text",
12
+ paddingY: "large",
13
+ paddingX: "large",
14
+ border: "none",
15
+ borderRadius: "small"
16
+ }), {
17
+ outline: "none",
18
+ background: "transparent",
19
+ "::placeholder": {
20
+ color: styles_lib_theme_vars_css_cjs.vars.color.textLight
21
+ }
22
+ }], "input_input"),
23
+ container: css.style([{
24
+ minHeight: 56,
25
+ transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
26
+ transitionProperty: "box-shadow",
27
+ ":focus-within": {
28
+ outline: "2px solid transparent",
29
+ outlineOffset: "2px",
30
+ boxShadow: `${styles_lib_theme_vars_css_cjs.vars.shadow.small}, ${styles_lib_theme_vars_css_cjs.vars.focus.boxShadow}`
31
+ }
32
+ }, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
33
+ backgroundColor: "white",
34
+ borderRadius: "medium",
35
+ boxShadow: "medium",
36
+ gap: "large"
37
+ }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "input_container")
38
+ });
39
+ fileScope.endFileScope();
40
+ exports.input = input;
@@ -0,0 +1,41 @@
1
+ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
+ import { style } from "@vanilla-extract/css";
3
+ import { focusable } from "./helpers.css.mjs";
4
+ import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
5
+ import { vars } from "../../../lib/theme/vars.css.mjs";
6
+ import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
7
+ setFileScope("src/themes/momotaro/components/input.css.ts?used", "blocks");
8
+ const input = makeComponentTheme("input", {
9
+ input: style([atoms({
10
+ color: "text",
11
+ paddingY: "large",
12
+ paddingX: "large",
13
+ border: "none",
14
+ borderRadius: "small"
15
+ }), {
16
+ outline: "none",
17
+ background: "transparent",
18
+ "::placeholder": {
19
+ color: vars.color.textLight
20
+ }
21
+ }], "input_input"),
22
+ container: style([{
23
+ minHeight: 56,
24
+ transitionDuration: vars.transition.fast,
25
+ transitionProperty: "box-shadow",
26
+ ":focus-within": {
27
+ outline: "2px solid transparent",
28
+ outlineOffset: "2px",
29
+ boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`
30
+ }
31
+ }, atoms({
32
+ backgroundColor: "white",
33
+ borderRadius: "medium",
34
+ boxShadow: "medium",
35
+ gap: "large"
36
+ }), focusable], "input_container")
37
+ });
38
+ endFileScope();
39
+ export {
40
+ input
41
+ };