@blockle/blocks 0.11.0 → 0.11.2

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 (165) hide show
  1. package/dist/index.cjs +28 -60
  2. package/dist/index.mjs +4 -36
  3. package/dist/momotaro.chunk.d.ts +297 -293
  4. package/dist/reset.css.cjs +0 -2
  5. package/dist/reset.css.mjs +0 -2
  6. package/dist/styles/components/display/Divider/Divider.cjs +13 -13
  7. package/dist/styles/components/display/Divider/divider.css.cjs +10 -3
  8. package/dist/styles/components/display/Divider/divider.css.mjs +10 -3
  9. package/dist/styles/components/form/Button/Button.cjs +2 -2
  10. package/dist/styles/components/form/Button/Button.css.cjs +10 -3
  11. package/dist/styles/components/form/Button/Button.css.mjs +10 -3
  12. package/dist/styles/components/form/Checkbox/Checkbox.cjs +2 -2
  13. package/dist/styles/components/form/Checkbox/checkbox.css.cjs +24 -5
  14. package/dist/styles/components/form/Checkbox/checkbox.css.mjs +24 -5
  15. package/dist/styles/components/form/Input/Input.cjs +3 -3
  16. package/dist/styles/components/form/Input/input.css.cjs +14 -3
  17. package/dist/styles/components/form/Input/input.css.mjs +14 -3
  18. package/dist/styles/components/form/Radio/Radio.cjs +2 -2
  19. package/dist/styles/components/form/Radio/radio.css.cjs +24 -5
  20. package/dist/styles/components/form/Radio/radio.css.mjs +24 -5
  21. package/dist/styles/components/form/Select/Select.cjs +2 -2
  22. package/dist/styles/components/form/Select/select.css.cjs +30 -5
  23. package/dist/styles/components/form/Select/select.css.mjs +30 -5
  24. package/dist/styles/components/form/Slider/Slider.cjs +7 -7
  25. package/dist/styles/components/form/Slider/slider.css.cjs +64 -7
  26. package/dist/styles/components/form/Slider/slider.css.mjs +64 -7
  27. package/dist/styles/components/form/Switch/Switch.cjs +6 -6
  28. package/dist/styles/components/form/Switch/switch.css.cjs +20 -4
  29. package/dist/styles/components/form/Switch/switch.css.mjs +20 -4
  30. package/dist/styles/components/other/BlocksProvider/BlocksProvider.cjs +5 -5
  31. package/dist/styles/components/overlay/Dialog/Dialog.cjs +28819 -23
  32. package/dist/styles/components/overlay/Dialog/Dialog.mjs +28797 -3
  33. package/dist/styles/components/overlay/Dialog/dialog.css.cjs +18 -3
  34. package/dist/styles/components/overlay/Dialog/dialog.css.mjs +18 -3
  35. package/dist/styles/components/typography/Heading/heading.css.cjs +10 -3
  36. package/dist/styles/components/typography/Heading/heading.css.mjs +10 -3
  37. package/dist/styles/components/typography/Text/Text.cjs +2 -2
  38. package/dist/styles/components/typography/Text/text.css.cjs +10 -3
  39. package/dist/styles/components/typography/Text/text.css.mjs +10 -3
  40. package/dist/styles/lib/css/atoms/atomicProperties.cjs +83 -0
  41. package/dist/styles/lib/css/atoms/atomicProperties.mjs +84 -0
  42. package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
  43. package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
  44. package/dist/styles/lib/css/atoms/sprinkles.css.cjs +325 -2072
  45. package/dist/styles/lib/css/atoms/sprinkles.css.mjs +326 -2073
  46. package/dist/styles/lib/css/layers/layers.css.cjs +7 -0
  47. package/dist/styles/lib/css/layers/layers.css.mjs +8 -0
  48. package/dist/styles/lib/css/style/style.cjs +28 -0
  49. package/dist/styles/lib/css/style/style.mjs +29 -0
  50. package/dist/styles/lib/theme/makeComponentTheme.cjs +5 -0
  51. package/dist/styles/lib/theme/makeComponentTheme.mjs +6 -0
  52. package/dist/styles/lib/theme/makeTheme.cjs +2 -18
  53. package/dist/styles/lib/theme/makeTheme.mjs +1 -17
  54. package/dist/styles/lib/theme/makeVanillaTheme.cjs +19 -0
  55. package/dist/styles/lib/theme/makeVanillaTheme.mjs +20 -0
  56. package/dist/styles/lib/theme/tokens.cjs +81 -0
  57. package/dist/styles/lib/theme/tokens.mjs +82 -0
  58. package/dist/styles/lib/theme/vars.css.cjs +4 -76
  59. package/dist/styles/lib/theme/vars.css.mjs +4 -76
  60. package/dist/styles/themes/momotaro/components/button.css.cjs +103 -0
  61. package/dist/styles/themes/momotaro/components/button.css.mjs +104 -0
  62. package/dist/styles/themes/momotaro/components/checkbox.css.cjs +59 -0
  63. package/dist/styles/themes/momotaro/components/checkbox.css.mjs +60 -0
  64. package/dist/styles/themes/momotaro/components/dialog.css.cjs +68 -0
  65. package/dist/styles/themes/momotaro/components/dialog.css.mjs +69 -0
  66. package/dist/styles/themes/momotaro/components/divider.css.cjs +11 -0
  67. package/dist/styles/themes/momotaro/components/divider.css.mjs +12 -0
  68. package/dist/styles/themes/momotaro/components/dropdown.css.cjs +53 -0
  69. package/dist/styles/themes/momotaro/components/dropdown.css.mjs +54 -0
  70. package/dist/styles/themes/momotaro/components/helpers.css.cjs +43 -0
  71. package/dist/styles/themes/momotaro/components/helpers.css.mjs +44 -0
  72. package/dist/styles/themes/momotaro/components/index.cjs +32 -0
  73. package/dist/styles/themes/momotaro/components/index.mjs +33 -0
  74. package/dist/styles/themes/momotaro/components/input.css.cjs +41 -0
  75. package/dist/styles/themes/momotaro/components/input.css.mjs +42 -0
  76. package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
  77. package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
  78. package/dist/styles/themes/momotaro/components/link.css.cjs +47 -0
  79. package/dist/styles/themes/momotaro/components/link.css.mjs +48 -0
  80. package/dist/styles/themes/momotaro/components/progress.css.cjs +55 -0
  81. package/dist/styles/themes/momotaro/components/progress.css.mjs +56 -0
  82. package/dist/styles/themes/momotaro/components/radio.css.cjs +60 -0
  83. package/dist/styles/themes/momotaro/components/radio.css.mjs +61 -0
  84. package/dist/styles/themes/momotaro/components/select.css.cjs +44 -0
  85. package/dist/styles/themes/momotaro/components/select.css.mjs +45 -0
  86. package/dist/styles/themes/momotaro/components/slider.css.cjs +65 -0
  87. package/dist/styles/themes/momotaro/components/slider.css.mjs +66 -0
  88. package/dist/styles/themes/momotaro/components/spinner.css.cjs +43 -0
  89. package/dist/styles/themes/momotaro/components/spinner.css.mjs +44 -0
  90. package/dist/styles/themes/momotaro/components/switch.css.cjs +58 -0
  91. package/dist/styles/themes/momotaro/components/switch.css.mjs +59 -0
  92. package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
  93. package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
  94. package/dist/styles/themes/momotaro/momotaro.css.cjs +7 -191
  95. package/dist/styles/themes/momotaro/momotaro.css.mjs +7 -191
  96. package/dist/styles/themes/momotaro/tokens.css.cjs +84 -0
  97. package/dist/styles/themes/momotaro/tokens.css.mjs +85 -0
  98. package/package.json +11 -9
  99. package/dist/style.css +0 -2851
  100. package/dist/styles/components/form/Button/Button.css.ts.vanilla.cjs +0 -1
  101. package/dist/styles/components/form/Button/Button.css.ts.vanilla.mjs +0 -1
  102. package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.cjs +0 -1
  103. package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.mjs +0 -1
  104. package/dist/styles/components/form/Input/input.css.ts.vanilla.cjs +0 -1
  105. package/dist/styles/components/form/Input/input.css.ts.vanilla.mjs +0 -1
  106. package/dist/styles/components/form/Radio/radio.css.ts.vanilla.cjs +0 -1
  107. package/dist/styles/components/form/Radio/radio.css.ts.vanilla.mjs +0 -1
  108. package/dist/styles/components/form/Select/select.css.ts.vanilla.cjs +0 -1
  109. package/dist/styles/components/form/Select/select.css.ts.vanilla.mjs +0 -1
  110. package/dist/styles/components/form/Slider/slider.css.ts.vanilla.cjs +0 -1
  111. package/dist/styles/components/form/Slider/slider.css.ts.vanilla.mjs +0 -1
  112. package/dist/styles/components/form/Switch/switch.css.ts.vanilla.cjs +0 -1
  113. package/dist/styles/components/form/Switch/switch.css.ts.vanilla.mjs +0 -1
  114. package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.cjs +0 -1
  115. package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.mjs +0 -1
  116. package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.cjs +0 -1
  117. package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.mjs +0 -1
  118. package/dist/styles/components/typography/Text/text.css.ts.vanilla.cjs +0 -1
  119. package/dist/styles/components/typography/Text/text.css.ts.vanilla.mjs +0 -1
  120. package/dist/styles/entries/reset.css.ts.vanilla.cjs +0 -1
  121. package/dist/styles/entries/reset.css.ts.vanilla.mjs +0 -1
  122. package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.cjs +0 -1
  123. package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.mjs +0 -1
  124. package/dist/styles/lib/css/layers/layers.css.ts.vanilla.cjs +0 -1
  125. package/dist/styles/lib/css/layers/layers.css.ts.vanilla.mjs +0 -1
  126. package/dist/styles/lib/css/reset/reset.css.ts.vanilla.cjs +0 -1
  127. package/dist/styles/lib/css/reset/reset.css.ts.vanilla.mjs +0 -1
  128. package/dist/styles/lib/theme/vars.css.ts.vanilla.cjs +0 -1
  129. package/dist/styles/lib/theme/vars.css.ts.vanilla.mjs +0 -1
  130. package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.cjs +0 -1
  131. package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.mjs +0 -1
  132. package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.cjs +0 -1
  133. package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.mjs +0 -1
  134. package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.cjs +0 -1
  135. package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.mjs +0 -1
  136. package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.cjs +0 -1
  137. package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.mjs +0 -1
  138. package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.cjs +0 -1
  139. package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.mjs +0 -1
  140. package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.cjs +0 -1
  141. package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.mjs +0 -1
  142. package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.cjs +0 -1
  143. package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.mjs +0 -1
  144. package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.cjs +0 -1
  145. package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.mjs +0 -1
  146. package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.cjs +0 -1
  147. package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.mjs +0 -1
  148. package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.cjs +0 -1
  149. package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.mjs +0 -1
  150. package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.cjs +0 -1
  151. package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.mjs +0 -1
  152. package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.cjs +0 -1
  153. package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.mjs +0 -1
  154. package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.cjs +0 -1
  155. package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.mjs +0 -1
  156. package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.cjs +0 -1
  157. package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.mjs +0 -1
  158. package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.cjs +0 -1
  159. package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.mjs +0 -1
  160. package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.cjs +0 -1
  161. package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.mjs +0 -1
  162. package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.cjs +0 -1
  163. package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.mjs +0 -1
  164. /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.cjs → lib/css/reset/reset.css.cjs} +0 -0
  165. /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.mjs → lib/css/reset/reset.css.mjs} +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const css = require("@vanilla-extract/css");
4
+ fileScope.setFileScope("src/lib/css/layers/layers.css.ts", "@blockle/blocks");
5
+ const blocksLayer = css.layer("blockle-blocks");
6
+ fileScope.endFileScope();
7
+ exports.blocksLayer = blocksLayer;
@@ -0,0 +1,8 @@
1
+ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
+ import { layer } from "@vanilla-extract/css";
3
+ setFileScope("src/lib/css/layers/layers.css.ts", "@blockle/blocks");
4
+ const blocksLayer = layer("blockle-blocks");
5
+ endFileScope();
6
+ export {
7
+ blocksLayer
8
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ const css = require("@vanilla-extract/css");
3
+ const styles_lib_css_atoms_sprinkles_css_cjs = require("../atoms/sprinkles.css.cjs");
4
+ function style(props) {
5
+ const styleRule = {};
6
+ const atomClassNames = [];
7
+ if (Array.isArray(props)) {
8
+ return props.map((rule) => {
9
+ if (typeof rule === "string") {
10
+ return rule;
11
+ }
12
+ return style(rule);
13
+ }).join(" ");
14
+ }
15
+ for (const [name, value] of Object.entries(props)) {
16
+ if (styles_lib_css_atoms_sprinkles_css_cjs.atoms.properties.has(name)) {
17
+ try {
18
+ atomClassNames.push(styles_lib_css_atoms_sprinkles_css_cjs.atoms({ [name]: value }));
19
+ } catch {
20
+ styleRule[name] = value;
21
+ }
22
+ } else {
23
+ styleRule[name] = value;
24
+ }
25
+ }
26
+ return css.style([styleRule, ...atomClassNames]);
27
+ }
28
+ exports.style = style;
@@ -0,0 +1,29 @@
1
+ import { style as style$1 } from "@vanilla-extract/css";
2
+ import { atoms } from "../atoms/sprinkles.css.mjs";
3
+ function style(props) {
4
+ const styleRule = {};
5
+ const atomClassNames = [];
6
+ if (Array.isArray(props)) {
7
+ return props.map((rule) => {
8
+ if (typeof rule === "string") {
9
+ return rule;
10
+ }
11
+ return style(rule);
12
+ }).join(" ");
13
+ }
14
+ for (const [name, value] of Object.entries(props)) {
15
+ if (atoms.properties.has(name)) {
16
+ try {
17
+ atomClassNames.push(atoms({ [name]: value }));
18
+ } catch {
19
+ styleRule[name] = value;
20
+ }
21
+ } else {
22
+ styleRule[name] = value;
23
+ }
24
+ }
25
+ return style$1([styleRule, ...atomClassNames]);
26
+ }
27
+ export {
28
+ style
29
+ };
@@ -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
+ };
@@ -1,27 +1,11 @@
1
1
  "use strict";
2
2
  const css = require("@vanilla-extract/css");
3
+ const styles_lib_theme_makeVanillaTheme_cjs = require("./makeVanillaTheme.cjs");
3
4
  const styles_lib_theme_vars_css_cjs = require("./vars.css.cjs");
4
- const makeVanillaTheme = (tokens) => {
5
- return {
6
- space: tokens.spacing,
7
- borderRadius: tokens.border.radius,
8
- color: tokens.color,
9
- borderWidth: tokens.border.width,
10
- fontFamily: tokens.typography.fontFamily,
11
- fontSize: tokens.typography.fontSize,
12
- fontWeight: tokens.typography.fontWeight,
13
- lineHeight: tokens.typography.lineHeight,
14
- transition: tokens.transition,
15
- shadow: tokens.shadow,
16
- focus: {
17
- boxShadow: tokens.focus.boxShadow
18
- }
19
- };
20
- };
21
5
  function makeTheme(theme) {
22
6
  return {
23
7
  name: theme.name,
24
- vars: css.createTheme(styles_lib_theme_vars_css_cjs.vars, makeVanillaTheme(theme.tokens)),
8
+ vars: css.createTheme(styles_lib_theme_vars_css_cjs.vars, styles_lib_theme_makeVanillaTheme_cjs.makeVanillaTheme(theme.tokens)),
25
9
  components: theme.components
26
10
  };
27
11
  }
@@ -1,22 +1,6 @@
1
1
  import { createTheme } from "@vanilla-extract/css";
2
+ import { makeVanillaTheme } from "./makeVanillaTheme.mjs";
2
3
  import { vars } from "./vars.css.mjs";
3
- const makeVanillaTheme = (tokens) => {
4
- return {
5
- space: tokens.spacing,
6
- borderRadius: tokens.border.radius,
7
- color: tokens.color,
8
- borderWidth: tokens.border.width,
9
- fontFamily: tokens.typography.fontFamily,
10
- fontSize: tokens.typography.fontSize,
11
- fontWeight: tokens.typography.fontWeight,
12
- lineHeight: tokens.typography.lineHeight,
13
- transition: tokens.transition,
14
- shadow: tokens.shadow,
15
- focus: {
16
- boxShadow: tokens.focus.boxShadow
17
- }
18
- };
19
- };
20
4
  function makeTheme(theme) {
21
5
  return {
22
6
  name: theme.name,
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ const makeVanillaTheme = (tokens) => {
3
+ return {
4
+ space: tokens.spacing,
5
+ borderRadius: tokens.border.radius,
6
+ color: tokens.color,
7
+ borderWidth: tokens.border.width,
8
+ fontFamily: tokens.typography.fontFamily,
9
+ fontSize: tokens.typography.fontSize,
10
+ fontWeight: tokens.typography.fontWeight,
11
+ lineHeight: tokens.typography.lineHeight,
12
+ transition: tokens.transition,
13
+ shadow: tokens.shadow,
14
+ focus: {
15
+ boxShadow: tokens.focus.boxShadow
16
+ }
17
+ };
18
+ };
19
+ exports.makeVanillaTheme = makeVanillaTheme;
@@ -0,0 +1,20 @@
1
+ const makeVanillaTheme = (tokens) => {
2
+ return {
3
+ space: tokens.spacing,
4
+ borderRadius: tokens.border.radius,
5
+ color: tokens.color,
6
+ borderWidth: tokens.border.width,
7
+ fontFamily: tokens.typography.fontFamily,
8
+ fontSize: tokens.typography.fontSize,
9
+ fontWeight: tokens.typography.fontWeight,
10
+ lineHeight: tokens.typography.lineHeight,
11
+ transition: tokens.transition,
12
+ shadow: tokens.shadow,
13
+ focus: {
14
+ boxShadow: tokens.focus.boxShadow
15
+ }
16
+ };
17
+ };
18
+ export {
19
+ makeVanillaTheme
20
+ };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ const tokens = {
3
+ typography: {
4
+ fontFamily: {
5
+ body: "Roboto, sans-serif",
6
+ primary: "Roboto, sans-serif",
7
+ secondary: "Roboto, sans-serif"
8
+ },
9
+ fontSize: {
10
+ xsmall: "0.75rem",
11
+ small: "0.875rem",
12
+ medium: "1rem",
13
+ large: "1.125rem",
14
+ xlarge: "1.25rem"
15
+ },
16
+ fontWeight: {
17
+ regular: 400,
18
+ medium: 500,
19
+ strong: 700
20
+ },
21
+ lineHeight: {
22
+ xsmall: "1rem",
23
+ small: "1.25rem",
24
+ medium: "1.5rem",
25
+ large: "1.75rem",
26
+ xlarge: "2rem"
27
+ }
28
+ },
29
+ spacing: {
30
+ none: 0,
31
+ gutter: "1rem",
32
+ xsmall: "0.25rem",
33
+ small: "0.5rem",
34
+ medium: "1rem",
35
+ large: "1.5rem",
36
+ xlarge: "2rem"
37
+ },
38
+ transition: {
39
+ slow: "0.5s",
40
+ normal: "0.3s",
41
+ fast: "0.1s"
42
+ },
43
+ border: {
44
+ radius: {
45
+ small: "0.25rem",
46
+ medium: "0.5rem",
47
+ large: "1rem",
48
+ xlarge: "2rem"
49
+ },
50
+ width: {
51
+ small: "1px",
52
+ medium: "2px",
53
+ large: "4px"
54
+ }
55
+ },
56
+ shadow: {
57
+ small: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
58
+ medium: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
59
+ large: "0 4px 8px 0 rgba(0, 0, 0, 0.05)"
60
+ },
61
+ focus: {
62
+ boxShadow: "0 0 0 2px #AF8EFF"
63
+ },
64
+ color: {
65
+ black: "#000000",
66
+ white: "#ffffff",
67
+ body: "#ffffff",
68
+ primaryLight: "#f5f5f5",
69
+ primary: "#e0e0e0",
70
+ primaryDark: "#aeaeae",
71
+ secondaryLight: "#f5f5f5",
72
+ secondary: "#e0e0e0",
73
+ secondaryDark: "#aeaeae",
74
+ text: "#000000",
75
+ textLight: "#ffffff",
76
+ textDark: "#aeaeae",
77
+ danger: "#ff0000",
78
+ link: "#0000ff"
79
+ }
80
+ };
81
+ exports.tokens = tokens;
@@ -0,0 +1,82 @@
1
+ const tokens = {
2
+ typography: {
3
+ fontFamily: {
4
+ body: "Roboto, sans-serif",
5
+ primary: "Roboto, sans-serif",
6
+ secondary: "Roboto, sans-serif"
7
+ },
8
+ fontSize: {
9
+ xsmall: "0.75rem",
10
+ small: "0.875rem",
11
+ medium: "1rem",
12
+ large: "1.125rem",
13
+ xlarge: "1.25rem"
14
+ },
15
+ fontWeight: {
16
+ regular: 400,
17
+ medium: 500,
18
+ strong: 700
19
+ },
20
+ lineHeight: {
21
+ xsmall: "1rem",
22
+ small: "1.25rem",
23
+ medium: "1.5rem",
24
+ large: "1.75rem",
25
+ xlarge: "2rem"
26
+ }
27
+ },
28
+ spacing: {
29
+ none: 0,
30
+ gutter: "1rem",
31
+ xsmall: "0.25rem",
32
+ small: "0.5rem",
33
+ medium: "1rem",
34
+ large: "1.5rem",
35
+ xlarge: "2rem"
36
+ },
37
+ transition: {
38
+ slow: "0.5s",
39
+ normal: "0.3s",
40
+ fast: "0.1s"
41
+ },
42
+ border: {
43
+ radius: {
44
+ small: "0.25rem",
45
+ medium: "0.5rem",
46
+ large: "1rem",
47
+ xlarge: "2rem"
48
+ },
49
+ width: {
50
+ small: "1px",
51
+ medium: "2px",
52
+ large: "4px"
53
+ }
54
+ },
55
+ shadow: {
56
+ small: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
57
+ medium: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
58
+ large: "0 4px 8px 0 rgba(0, 0, 0, 0.05)"
59
+ },
60
+ focus: {
61
+ boxShadow: "0 0 0 2px #AF8EFF"
62
+ },
63
+ color: {
64
+ black: "#000000",
65
+ white: "#ffffff",
66
+ body: "#ffffff",
67
+ primaryLight: "#f5f5f5",
68
+ primary: "#e0e0e0",
69
+ primaryDark: "#aeaeae",
70
+ secondaryLight: "#f5f5f5",
71
+ secondary: "#e0e0e0",
72
+ secondaryDark: "#aeaeae",
73
+ text: "#000000",
74
+ textLight: "#ffffff",
75
+ textDark: "#aeaeae",
76
+ danger: "#ff0000",
77
+ link: "#0000ff"
78
+ }
79
+ };
80
+ export {
81
+ tokens
82
+ };
@@ -1,81 +1,9 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
- require("./vars.css.ts.vanilla.cjs");
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");
4
6
  fileScope.setFileScope("src/lib/theme/vars.css.ts", "@blockle/blocks");
5
- var vars = {
6
- space: {
7
- none: "var(--d5nt60)",
8
- gutter: "var(--d5nt61)",
9
- xsmall: "var(--d5nt62)",
10
- small: "var(--d5nt63)",
11
- medium: "var(--d5nt64)",
12
- large: "var(--d5nt65)",
13
- xlarge: "var(--d5nt66)"
14
- },
15
- borderRadius: {
16
- small: "var(--d5nt67)",
17
- medium: "var(--d5nt68)",
18
- large: "var(--d5nt69)",
19
- xlarge: "var(--d5nt6a)"
20
- },
21
- color: {
22
- black: "var(--d5nt6b)",
23
- white: "var(--d5nt6c)",
24
- body: "var(--d5nt6d)",
25
- primaryLight: "var(--d5nt6e)",
26
- primary: "var(--d5nt6f)",
27
- primaryDark: "var(--d5nt6g)",
28
- secondaryLight: "var(--d5nt6h)",
29
- secondary: "var(--d5nt6i)",
30
- secondaryDark: "var(--d5nt6j)",
31
- text: "var(--d5nt6k)",
32
- textLight: "var(--d5nt6l)",
33
- textDark: "var(--d5nt6m)",
34
- danger: "var(--d5nt6n)",
35
- link: "var(--d5nt6o)"
36
- },
37
- borderWidth: {
38
- small: "var(--d5nt6p)",
39
- medium: "var(--d5nt6q)",
40
- large: "var(--d5nt6r)"
41
- },
42
- fontFamily: {
43
- body: "var(--d5nt6s)",
44
- primary: "var(--d5nt6t)",
45
- secondary: "var(--d5nt6u)"
46
- },
47
- fontSize: {
48
- xsmall: "var(--d5nt6v)",
49
- small: "var(--d5nt6w)",
50
- medium: "var(--d5nt6x)",
51
- large: "var(--d5nt6y)",
52
- xlarge: "var(--d5nt6z)"
53
- },
54
- fontWeight: {
55
- regular: "var(--d5nt610)",
56
- medium: "var(--d5nt611)",
57
- strong: "var(--d5nt612)"
58
- },
59
- lineHeight: {
60
- xsmall: "var(--d5nt613)",
61
- small: "var(--d5nt614)",
62
- medium: "var(--d5nt615)",
63
- large: "var(--d5nt616)",
64
- xlarge: "var(--d5nt617)"
65
- },
66
- transition: {
67
- slow: "var(--d5nt618)",
68
- normal: "var(--d5nt619)",
69
- fast: "var(--d5nt61a)"
70
- },
71
- shadow: {
72
- small: "var(--d5nt61b)",
73
- medium: "var(--d5nt61c)",
74
- large: "var(--d5nt61d)"
75
- },
76
- focus: {
77
- boxShadow: "var(--d5nt61e)"
78
- }
79
- };
7
+ const vars = css.createThemeContract(styles_lib_theme_makeVanillaTheme_cjs.makeVanillaTheme(styles_lib_theme_tokens_cjs.tokens));
80
8
  fileScope.endFileScope();
81
9
  exports.vars = vars;
@@ -1,81 +1,9 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import "./vars.css.ts.vanilla.mjs";
2
+ import { createThemeContract } from "@vanilla-extract/css";
3
+ import { makeVanillaTheme } from "./makeVanillaTheme.mjs";
4
+ import { tokens } from "./tokens.mjs";
3
5
  setFileScope("src/lib/theme/vars.css.ts", "@blockle/blocks");
4
- var vars = {
5
- space: {
6
- none: "var(--d5nt60)",
7
- gutter: "var(--d5nt61)",
8
- xsmall: "var(--d5nt62)",
9
- small: "var(--d5nt63)",
10
- medium: "var(--d5nt64)",
11
- large: "var(--d5nt65)",
12
- xlarge: "var(--d5nt66)"
13
- },
14
- borderRadius: {
15
- small: "var(--d5nt67)",
16
- medium: "var(--d5nt68)",
17
- large: "var(--d5nt69)",
18
- xlarge: "var(--d5nt6a)"
19
- },
20
- color: {
21
- black: "var(--d5nt6b)",
22
- white: "var(--d5nt6c)",
23
- body: "var(--d5nt6d)",
24
- primaryLight: "var(--d5nt6e)",
25
- primary: "var(--d5nt6f)",
26
- primaryDark: "var(--d5nt6g)",
27
- secondaryLight: "var(--d5nt6h)",
28
- secondary: "var(--d5nt6i)",
29
- secondaryDark: "var(--d5nt6j)",
30
- text: "var(--d5nt6k)",
31
- textLight: "var(--d5nt6l)",
32
- textDark: "var(--d5nt6m)",
33
- danger: "var(--d5nt6n)",
34
- link: "var(--d5nt6o)"
35
- },
36
- borderWidth: {
37
- small: "var(--d5nt6p)",
38
- medium: "var(--d5nt6q)",
39
- large: "var(--d5nt6r)"
40
- },
41
- fontFamily: {
42
- body: "var(--d5nt6s)",
43
- primary: "var(--d5nt6t)",
44
- secondary: "var(--d5nt6u)"
45
- },
46
- fontSize: {
47
- xsmall: "var(--d5nt6v)",
48
- small: "var(--d5nt6w)",
49
- medium: "var(--d5nt6x)",
50
- large: "var(--d5nt6y)",
51
- xlarge: "var(--d5nt6z)"
52
- },
53
- fontWeight: {
54
- regular: "var(--d5nt610)",
55
- medium: "var(--d5nt611)",
56
- strong: "var(--d5nt612)"
57
- },
58
- lineHeight: {
59
- xsmall: "var(--d5nt613)",
60
- small: "var(--d5nt614)",
61
- medium: "var(--d5nt615)",
62
- large: "var(--d5nt616)",
63
- xlarge: "var(--d5nt617)"
64
- },
65
- transition: {
66
- slow: "var(--d5nt618)",
67
- normal: "var(--d5nt619)",
68
- fast: "var(--d5nt61a)"
69
- },
70
- shadow: {
71
- small: "var(--d5nt61b)",
72
- medium: "var(--d5nt61c)",
73
- large: "var(--d5nt61d)"
74
- },
75
- focus: {
76
- boxShadow: "var(--d5nt61e)"
77
- }
78
- };
6
+ const vars = createThemeContract(makeVanillaTheme(tokens));
79
7
  endFileScope();
80
8
  export {
81
9
  vars
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const css = require("@vanilla-extract/css");
4
+ const styles_lib_css_style_style_cjs = require("../../../lib/css/style/style.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_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
8
+ fileScope.setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
9
+ const intentColor = css.createVar("intentColor");
10
+ const hoverBackgroundColor = css.createVar("hoverBackgroundColor");
11
+ const button = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("button", {
12
+ base: styles_lib_css_style_style_cjs.style([{
13
+ display: "inline-flex",
14
+ placeItems: "center",
15
+ fontSize: "medium",
16
+ borderRadius: "medium",
17
+ fontWeight: "medium",
18
+ // Space between `startSlot | children | endSlot`
19
+ gap: "small",
20
+ selectors: {
21
+ "&:hover:not(:disabled)": {
22
+ backgroundColor: hoverBackgroundColor
23
+ }
24
+ }
25
+ }, styles_themes_momotaro_components_helpers_css_cjs.clickable]),
26
+ variants: {
27
+ variant: {
28
+ solid: styles_lib_css_style_style_cjs.style({
29
+ color: styles_lib_theme_vars_css_cjs.vars.color.white,
30
+ backgroundColor: intentColor,
31
+ border: "none"
32
+ }),
33
+ outline: styles_lib_css_style_style_cjs.style({
34
+ color: intentColor,
35
+ borderWidth: "small",
36
+ borderStyle: "solid",
37
+ borderColor: intentColor,
38
+ background: "transparent"
39
+ }),
40
+ ghost: styles_lib_css_style_style_cjs.style({
41
+ color: intentColor,
42
+ background: "transparent"
43
+ })
44
+ },
45
+ size: {
46
+ small: styles_lib_css_style_style_cjs.style({
47
+ paddingInline: "large",
48
+ height: 40
49
+ }),
50
+ medium: styles_lib_css_style_style_cjs.style({
51
+ paddingInline: "xlarge",
52
+ height: 56
53
+ }),
54
+ large: styles_lib_css_style_style_cjs.style({
55
+ paddingInline: "xlarge",
56
+ height: 72
57
+ })
58
+ },
59
+ intent: {
60
+ neutral: styles_lib_css_style_style_cjs.style({
61
+ vars: {
62
+ [intentColor]: styles_lib_theme_vars_css_cjs.vars.color.primary,
63
+ [hoverBackgroundColor]: styles_lib_theme_vars_css_cjs.vars.color.primaryLight
64
+ }
65
+ }),
66
+ danger: styles_lib_css_style_style_cjs.style({
67
+ vars: {
68
+ [intentColor]: styles_lib_theme_vars_css_cjs.vars.color.danger,
69
+ [hoverBackgroundColor]: "#fff8f7",
70
+ [styles_themes_momotaro_components_helpers_css_cjs.focusRingColor]: styles_lib_theme_vars_css_cjs.vars.color.danger
71
+ }
72
+ })
73
+ }
74
+ },
75
+ compoundVariants: [{
76
+ variants: {
77
+ variant: "solid",
78
+ intent: "neutral"
79
+ },
80
+ style: styles_lib_css_style_style_cjs.style({
81
+ vars: {
82
+ [hoverBackgroundColor]: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
83
+ }
84
+ })
85
+ }, {
86
+ variants: {
87
+ variant: "solid",
88
+ intent: "danger"
89
+ },
90
+ style: styles_lib_css_style_style_cjs.style({
91
+ vars: {
92
+ [hoverBackgroundColor]: "#f9b1a9"
93
+ }
94
+ })
95
+ }],
96
+ defaultVariants: {
97
+ size: "small",
98
+ variant: "solid",
99
+ intent: "neutral"
100
+ }
101
+ });
102
+ fileScope.endFileScope();
103
+ exports.button = button;