@blockle/blocks 0.6.0 → 0.7.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.
Files changed (27) hide show
  1. package/dist/index.cjs +215 -149
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +223 -157
  4. package/dist/momotaro.chunk.d.ts +142 -69
  5. package/dist/styles/components/Checkbox/checkbox.css.cjs +31 -0
  6. package/dist/styles/components/Checkbox/checkbox.css.mjs +32 -0
  7. package/dist/styles/components/Radio/radio.css.cjs +31 -0
  8. package/dist/styles/components/Radio/radio.css.mjs +32 -0
  9. package/dist/styles/themes/momotaro/components/button.css.cjs +1 -1
  10. package/dist/styles/themes/momotaro/components/button.css.mjs +1 -1
  11. package/dist/styles/themes/momotaro/components/checkbox.css.cjs +53 -0
  12. package/dist/styles/themes/momotaro/components/checkbox.css.mjs +54 -0
  13. package/dist/styles/themes/momotaro/components/helpers.css.cjs +13 -0
  14. package/dist/styles/themes/momotaro/components/helpers.css.mjs +13 -0
  15. package/dist/styles/themes/momotaro/components/index.cjs +7 -1
  16. package/dist/styles/themes/momotaro/components/index.mjs +7 -1
  17. package/dist/styles/themes/momotaro/components/input.css.cjs +3 -3
  18. package/dist/styles/themes/momotaro/components/input.css.mjs +3 -3
  19. package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
  20. package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
  21. package/dist/styles/themes/momotaro/components/link.css.cjs +1 -0
  22. package/dist/styles/themes/momotaro/components/link.css.mjs +1 -0
  23. package/dist/styles/themes/momotaro/components/radio.css.cjs +53 -0
  24. package/dist/styles/themes/momotaro/components/radio.css.mjs +54 -0
  25. package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
  26. package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
  27. package/package.json +2 -2
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  const fileScope = require("@vanilla-extract/css/fileScope");
3
3
  const css = require("@vanilla-extract/css");
4
- const styles_themes_momotaro_components_helpers_css_cjs = require("./helpers.css.cjs");
5
4
  const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
6
5
  const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs");
7
6
  const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
@@ -18,7 +17,8 @@ const input = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("input"
18
17
  background: "transparent",
19
18
  "::placeholder": {
20
19
  color: styles_lib_theme_vars_css_cjs.vars.color.textLight
21
- }
20
+ },
21
+ ":disabled": {}
22
22
  }], "input_input"),
23
23
  container: css.style([{
24
24
  minHeight: 56,
@@ -34,7 +34,7 @@ const input = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("input"
34
34
  borderRadius: "medium",
35
35
  boxShadow: "medium",
36
36
  gap: "large"
37
- }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "input_container")
37
+ })], "input_container")
38
38
  });
39
39
  fileScope.endFileScope();
40
40
  exports.input = input;
@@ -1,6 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { style } from "@vanilla-extract/css";
3
- import { focusable } from "./helpers.css.mjs";
4
3
  import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
5
4
  import { vars } from "../../../lib/theme/vars.css.mjs";
6
5
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
@@ -17,7 +16,8 @@ const input = makeComponentTheme("input", {
17
16
  background: "transparent",
18
17
  "::placeholder": {
19
18
  color: vars.color.textLight
20
- }
19
+ },
20
+ ":disabled": {}
21
21
  }], "input_input"),
22
22
  container: style([{
23
23
  minHeight: 56,
@@ -33,7 +33,7 @@ const input = makeComponentTheme("input", {
33
33
  borderRadius: "medium",
34
34
  boxShadow: "medium",
35
35
  gap: "large"
36
- }), focusable], "input_container")
36
+ })], "input_container")
37
37
  });
38
38
  endFileScope();
39
39
  export {
@@ -0,0 +1,33 @@
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
+ fileScope.setFileScope("src/themes/momotaro/components/label.css.ts?used", "blocks");
7
+ const label = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("label", {
8
+ base: css.style({}, "label_base"),
9
+ variants: {
10
+ size: {
11
+ small: css.style({
12
+ fontSize: styles_lib_theme_vars_css_cjs.vars.fontSize.xsmall
13
+ }, "label_variants_size_small"),
14
+ medium: css.style({
15
+ fontSize: styles_lib_theme_vars_css_cjs.vars.fontSize.small
16
+ }, "label_variants_size_medium"),
17
+ large: css.style({
18
+ fontSize: styles_lib_theme_vars_css_cjs.vars.fontSize.medium
19
+ }, "label_variants_size_large")
20
+ },
21
+ required: css.style({
22
+ ":after": {
23
+ content: '"*"',
24
+ marginLeft: styles_lib_theme_vars_css_cjs.vars.space.xsmall
25
+ }
26
+ }, "label_variants_required")
27
+ },
28
+ defaultVariants: {
29
+ size: "large"
30
+ }
31
+ });
32
+ fileScope.endFileScope();
33
+ exports.label = label;
@@ -0,0 +1,34 @@
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
+ setFileScope("src/themes/momotaro/components/label.css.ts?used", "blocks");
6
+ const label = makeComponentTheme("label", {
7
+ base: style({}, "label_base"),
8
+ variants: {
9
+ size: {
10
+ small: style({
11
+ fontSize: vars.fontSize.xsmall
12
+ }, "label_variants_size_small"),
13
+ medium: style({
14
+ fontSize: vars.fontSize.small
15
+ }, "label_variants_size_medium"),
16
+ large: style({
17
+ fontSize: vars.fontSize.medium
18
+ }, "label_variants_size_large")
19
+ },
20
+ required: style({
21
+ ":after": {
22
+ content: '"*"',
23
+ marginLeft: vars.space.xsmall
24
+ }
25
+ }, "label_variants_required")
26
+ },
27
+ defaultVariants: {
28
+ size: "large"
29
+ }
30
+ });
31
+ endFileScope();
32
+ export {
33
+ label
34
+ };
@@ -11,6 +11,7 @@ const link = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("link",
11
11
  border: "none",
12
12
  textDecoration: "none",
13
13
  background: "transparent",
14
+ borderRadius: 1,
14
15
  ":hover": {
15
16
  textDecoration: "underline"
16
17
  },
@@ -10,6 +10,7 @@ const link = makeComponentTheme("link", {
10
10
  border: "none",
11
11
  textDecoration: "none",
12
12
  background: "transparent",
13
+ borderRadius: 1,
13
14
  ":hover": {
14
15
  textDecoration: "underline"
15
16
  },
@@ -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/radio.css.ts?used", "blocks");
10
+ const radio = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("radio", {
11
+ base: css.style([{
12
+ display: "flex",
13
+ alignItems: "center",
14
+ justifyContent: "center",
15
+ width: 24,
16
+ height: 24,
17
+ borderRadius: 12,
18
+ transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`,
19
+ transitionProperty: "background-color",
20
+ ":hover": {
21
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
22
+ },
23
+ selectors: {
24
+ "&:has(input:checked):not(:hover)": {
25
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primary
26
+ }
27
+ }
28
+ }, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
29
+ backgroundColor: "primaryLight"
30
+ }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "radio_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
+ }, "radio_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.radio = radio;
@@ -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/radio.css.ts?used", "blocks");
9
+ const radio = makeComponentTheme("radio", {
10
+ base: style([{
11
+ display: "flex",
12
+ alignItems: "center",
13
+ justifyContent: "center",
14
+ width: 24,
15
+ height: 24,
16
+ borderRadius: 12,
17
+ transition: `transform ${vars.transition.fast}`,
18
+ transitionProperty: "background-color",
19
+ ":hover": {
20
+ backgroundColor: vars.color.primaryDark
21
+ },
22
+ selectors: {
23
+ "&:has(input:checked):not(:hover)": {
24
+ backgroundColor: vars.color.primary
25
+ }
26
+ }
27
+ }, atoms({
28
+ backgroundColor: "primaryLight"
29
+ }), focusable], "radio_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
+ }, "radio_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
+ radio
54
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const bounceOut = "cubic-bezier(.65,.36,.55,1.65)";
3
+ exports.bounceOut = bounceOut;
@@ -0,0 +1,4 @@
1
+ const bounceOut = "cubic-bezier(.65,.36,.55,1.65)";
2
+ export {
3
+ bounceOut
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Blocks design system",
5
5
  "repository": "git@github.com:Blockle/blocks.git",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "storybook": "storybook dev -p 6006 --no-open",
45
45
  "test": "vitest",
46
46
  "ts": "tsc --noemit --project ./tsconfig.json",
47
- "release": "yarn test && yarn build && changeset publish"
47
+ "release": "yarn ts && yarn test && yarn build && changeset publish"
48
48
  },
49
49
  "resolutions": {
50
50
  "string-width": "^4.2.2"