@blockle/blocks 0.8.10 → 0.9.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 (48) hide show
  1. package/dist/index.cjs +5 -2
  2. package/dist/index.d.mts +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.mjs +6 -3
  5. package/dist/momotaro.chunk.d.ts +127 -93
  6. package/dist/styles/components/display/Divider/Divider.cjs +3 -3
  7. package/dist/styles/components/display/Divider/Divider.mjs +3 -3
  8. package/dist/styles/components/display/Divider/divider.css.cjs +1 -1
  9. package/dist/styles/components/display/Divider/divider.css.mjs +1 -1
  10. package/dist/styles/components/form/Checkbox/Checkbox.cjs +17 -1
  11. package/dist/styles/components/form/Checkbox/Checkbox.mjs +17 -1
  12. package/dist/styles/components/form/Select/Select.cjs +40 -0
  13. package/dist/styles/components/form/Select/Select.mjs +41 -0
  14. package/dist/styles/components/form/Select/select.css.cjs +37 -0
  15. package/dist/styles/components/form/Select/select.css.mjs +38 -0
  16. package/dist/styles/components/form/Switch/switch.css.cjs +2 -2
  17. package/dist/styles/components/form/Switch/switch.css.mjs +2 -2
  18. package/dist/styles/components/other/BlocksProvider/BlocksProvider.cjs +21 -1
  19. package/dist/styles/components/other/BlocksProvider/BlocksProvider.mjs +21 -1
  20. package/dist/styles/components/overlay/Dialog/Dialog.cjs +9 -0
  21. package/dist/styles/components/overlay/Dialog/Dialog.mjs +12 -3
  22. package/dist/styles/components/overlay/Dialog/dialog.css.cjs +4 -4
  23. package/dist/styles/components/overlay/Dialog/dialog.css.mjs +4 -4
  24. package/dist/styles/lib/css/atoms/atomicProperties.cjs +28 -22
  25. package/dist/styles/lib/css/atoms/atomicProperties.mjs +28 -22
  26. package/dist/styles/lib/css/atoms/sprinkles.css.cjs +4 -7
  27. package/dist/styles/lib/css/atoms/sprinkles.css.mjs +4 -7
  28. package/dist/styles/themes/momotaro/components/button.css.cjs +3 -3
  29. package/dist/styles/themes/momotaro/components/button.css.mjs +3 -3
  30. package/dist/styles/themes/momotaro/components/checkbox.css.cjs +18 -12
  31. package/dist/styles/themes/momotaro/components/checkbox.css.mjs +18 -12
  32. package/dist/styles/themes/momotaro/components/dialog.css.cjs +4 -3
  33. package/dist/styles/themes/momotaro/components/dialog.css.mjs +4 -3
  34. package/dist/styles/themes/momotaro/components/helpers.css.cjs +7 -6
  35. package/dist/styles/themes/momotaro/components/helpers.css.mjs +7 -6
  36. package/dist/styles/themes/momotaro/components/index.cjs +3 -1
  37. package/dist/styles/themes/momotaro/components/index.mjs +3 -1
  38. package/dist/styles/themes/momotaro/components/input.css.cjs +6 -4
  39. package/dist/styles/themes/momotaro/components/input.css.mjs +6 -4
  40. package/dist/styles/themes/momotaro/components/progress.css.cjs +1 -1
  41. package/dist/styles/themes/momotaro/components/progress.css.mjs +1 -1
  42. package/dist/styles/themes/momotaro/components/radio.css.cjs +12 -5
  43. package/dist/styles/themes/momotaro/components/radio.css.mjs +12 -5
  44. package/dist/styles/themes/momotaro/components/select.css.cjs +35 -0
  45. package/dist/styles/themes/momotaro/components/select.css.mjs +36 -0
  46. package/dist/styles/themes/momotaro/components/switch.css.cjs +1 -1
  47. package/dist/styles/themes/momotaro/components/switch.css.mjs +1 -1
  48. package/package.json +9 -9
@@ -6,7 +6,7 @@ setFileScope("src/lib/css/atoms/sprinkles.css.ts", "blocks");
6
6
  const unresponsiveAtomicProperties = defineProperties({
7
7
  properties: unresponsiveProperties,
8
8
  shorthands: {
9
- inset: ["top", "bottom", "left", "right"]
9
+ inset: ["insetBlockStart", "insetBlockEnd", "insetInlineStart", "insetInlineEnd"]
10
10
  }
11
11
  });
12
12
  const responsiveAtomicProperties = defineProperties({
@@ -26,12 +26,9 @@ const responsiveAtomicProperties = defineProperties({
26
26
  responsiveArray: breakpointNames,
27
27
  properties: responsiveProperties,
28
28
  shorthands: {
29
- margin: ["marginTop", "marginBottom", "marginLeft", "marginRight"],
30
- marginX: ["marginLeft", "marginRight"],
31
- marginY: ["marginTop", "marginBottom"],
32
- padding: ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
33
- paddingX: ["paddingLeft", "paddingRight"],
34
- paddingY: ["paddingTop", "paddingBottom"],
29
+ margin: ["marginBlockStart", "marginBlockEnd", "marginInlineStart", "marginInlineEnd"],
30
+ marginBlock: ["marginBlockStart", "marginBlockEnd"],
31
+ marginInline: ["marginInlineStart", "marginInlineEnd"],
35
32
  placeItems: ["justifyContent", "alignItems"]
36
33
  }
37
34
  });
@@ -44,15 +44,15 @@ const button = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("butto
44
44
  },
45
45
  size: {
46
46
  small: styles_lib_css_style_style_cjs.style({
47
- paddingX: "large",
47
+ paddingInline: "large",
48
48
  height: 40
49
49
  }),
50
50
  medium: styles_lib_css_style_style_cjs.style({
51
- paddingX: "xlarge",
51
+ paddingInline: "xlarge",
52
52
  height: 56
53
53
  }),
54
54
  large: styles_lib_css_style_style_cjs.style({
55
- paddingX: "xlarge",
55
+ paddingInline: "xlarge",
56
56
  height: 72
57
57
  })
58
58
  },
@@ -43,15 +43,15 @@ const button = makeComponentTheme("button", {
43
43
  },
44
44
  size: {
45
45
  small: style({
46
- paddingX: "large",
46
+ paddingInline: "large",
47
47
  height: 40
48
48
  }),
49
49
  medium: style({
50
- paddingX: "xlarge",
50
+ paddingInline: "xlarge",
51
51
  height: 56
52
52
  }),
53
53
  large: style({
54
- paddingX: "xlarge",
54
+ paddingInline: "xlarge",
55
55
  height: 72
56
56
  })
57
57
  },
@@ -12,15 +12,18 @@ const checkbox = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("che
12
12
  display: "flex",
13
13
  alignItems: "center",
14
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
15
+ inlineSize: 24,
16
+ blockSize: 24,
17
+ "@media": {
18
+ "(prefers-reduced-motion: no-preference)": {
19
+ transition: `background-color ${styles_lib_theme_vars_css_cjs.vars.transition.normal}, box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
20
+ }
21
21
  },
22
22
  selectors: {
23
- "&:has(input:checked):not(:hover)": {
23
+ "&:hover:not(:has(input:disabled))": {
24
+ backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
25
+ },
26
+ "&:has(input:checked)": {
24
27
  backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primary
25
28
  }
26
29
  }
@@ -29,16 +32,19 @@ const checkbox = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("che
29
32
  borderRadius: "small"
30
33
  }), styles_themes_momotaro_components_helpers_css_cjs.focusable], "checkbox_base"),
31
34
  icon: css.style({
32
- height: 12,
33
- width: 12,
34
- backgroundColor: "white",
35
- borderRadius: "8px",
35
+ inlineSize: "1rem",
36
+ blockSize: "1rem",
37
+ color: "white",
36
38
  transform: "scale(0)",
37
- transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`,
38
39
  selectors: {
39
40
  "input:checked ~ &": {
40
41
  transform: "scale(1)"
41
42
  }
43
+ },
44
+ "@media": {
45
+ "(prefers-reduced-motion: no-preference)": {
46
+ transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`
47
+ }
42
48
  }
43
49
  }, "checkbox_icon"),
44
50
  label: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
@@ -11,15 +11,18 @@ const checkbox = makeComponentTheme("checkbox", {
11
11
  display: "flex",
12
12
  alignItems: "center",
13
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
14
+ inlineSize: 24,
15
+ blockSize: 24,
16
+ "@media": {
17
+ "(prefers-reduced-motion: no-preference)": {
18
+ transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
19
+ }
20
20
  },
21
21
  selectors: {
22
- "&:has(input:checked):not(:hover)": {
22
+ "&:hover:not(:has(input:disabled))": {
23
+ backgroundColor: vars.color.primaryDark
24
+ },
25
+ "&:has(input:checked)": {
23
26
  backgroundColor: vars.color.primary
24
27
  }
25
28
  }
@@ -28,16 +31,19 @@ const checkbox = makeComponentTheme("checkbox", {
28
31
  borderRadius: "small"
29
32
  }), focusable], "checkbox_base"),
30
33
  icon: style({
31
- height: 12,
32
- width: 12,
33
- backgroundColor: "white",
34
- borderRadius: "8px",
34
+ inlineSize: "1rem",
35
+ blockSize: "1rem",
36
+ color: "white",
35
37
  transform: "scale(0)",
36
- transition: `transform ${vars.transition.normal} ${bounceOut}`,
37
38
  selectors: {
38
39
  "input:checked ~ &": {
39
40
  transform: "scale(1)"
40
41
  }
42
+ },
43
+ "@media": {
44
+ "(prefers-reduced-motion: no-preference)": {
45
+ transition: `transform ${vars.transition.normal} ${bounceOut}`
46
+ }
41
47
  }
42
48
  }, "checkbox_icon"),
43
49
  label: atoms({
@@ -14,6 +14,7 @@ const dialog = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("dialo
14
14
  borderRadius: "medium",
15
15
  boxShadow: "large"
16
16
  }), {
17
+ maxHeight: "90%",
17
18
  minWidth: "300px",
18
19
  selectors: {
19
20
  "&[data-open]": {
@@ -47,15 +48,15 @@ const dialog = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("dialo
47
48
  size: {
48
49
  small: css.style({
49
50
  width: "400px",
50
- maxWidth: "min(400px, 90vw)"
51
+ maxWidth: "min(400px, 90%)"
51
52
  }, "dialog_variants_size_small"),
52
53
  medium: css.style({
53
54
  width: "600px",
54
- maxWidth: "min(600px, 90vw)"
55
+ maxWidth: "min(600px, 90%)"
55
56
  }, "dialog_variants_size_medium"),
56
57
  large: css.style({
57
58
  width: "800px",
58
- maxWidth: "min(800px, 90vw)"
59
+ maxWidth: "min(800px, 90%)"
59
60
  }, "dialog_variants_size_large")
60
61
  }
61
62
  },
@@ -13,6 +13,7 @@ const dialog = makeComponentTheme("dialog", {
13
13
  borderRadius: "medium",
14
14
  boxShadow: "large"
15
15
  }), {
16
+ maxHeight: "90%",
16
17
  minWidth: "300px",
17
18
  selectors: {
18
19
  "&[data-open]": {
@@ -46,15 +47,15 @@ const dialog = makeComponentTheme("dialog", {
46
47
  size: {
47
48
  small: style({
48
49
  width: "400px",
49
- maxWidth: "min(400px, 90vw)"
50
+ maxWidth: "min(400px, 90%)"
50
51
  }, "dialog_variants_size_small"),
51
52
  medium: style({
52
53
  width: "600px",
53
- maxWidth: "min(600px, 90vw)"
54
+ maxWidth: "min(600px, 90%)"
54
55
  }, "dialog_variants_size_medium"),
55
56
  large: style({
56
57
  width: "800px",
57
- maxWidth: "min(800px, 90vw)"
58
+ maxWidth: "min(800px, 90%)"
58
59
  }, "dialog_variants_size_large")
59
60
  }
60
61
  },
@@ -5,12 +5,15 @@ const styles_lib_theme_vars_css_cjs = require("../../../lib/theme/vars.css.cjs")
5
5
  fileScope.setFileScope("src/themes/momotaro/components/helpers.css.ts", "blocks");
6
6
  const focusRingColor = css.createVar("focusRingColor");
7
7
  const focusable = css.style({
8
+ "@media": {
9
+ "(prefers-reduced-motion: no-preference)": {
10
+ transition: `box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
11
+ }
12
+ },
8
13
  ":focus-visible": {
9
14
  outline: "2px solid transparent",
10
15
  outlineOffset: "2px",
11
- boxShadow: `0 0 1px 2px ${css.fallbackVar(focusRingColor, "#AF8EFF")}`,
12
- transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
13
- transitionProperty: "box-shadow"
16
+ boxShadow: `0 0 1px 2px ${css.fallbackVar(focusRingColor, "#AF8EFF")}`
14
17
  },
15
18
  selectors: {
16
19
  "&:disabled, &[disabled]": {
@@ -21,9 +24,7 @@ const focusable = css.style({
21
24
  "&:has(input:focus-visible)": {
22
25
  outline: "2px solid transparent",
23
26
  outlineOffset: "2px",
24
- boxShadow: styles_lib_theme_vars_css_cjs.vars.focus.boxShadow,
25
- transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
26
- transitionProperty: "box-shadow"
27
+ boxShadow: styles_lib_theme_vars_css_cjs.vars.focus.boxShadow
27
28
  },
28
29
  "&:has(input:disabled)": {
29
30
  opacity: 0.5,
@@ -4,12 +4,15 @@ import { vars } from "../../../lib/theme/vars.css.mjs";
4
4
  setFileScope("src/themes/momotaro/components/helpers.css.ts", "blocks");
5
5
  const focusRingColor = createVar("focusRingColor");
6
6
  const focusable = style({
7
+ "@media": {
8
+ "(prefers-reduced-motion: no-preference)": {
9
+ transition: `box-shadow ${vars.transition.fast}`
10
+ }
11
+ },
7
12
  ":focus-visible": {
8
13
  outline: "2px solid transparent",
9
14
  outlineOffset: "2px",
10
- boxShadow: `0 0 1px 2px ${fallbackVar(focusRingColor, "#AF8EFF")}`,
11
- transitionDuration: vars.transition.fast,
12
- transitionProperty: "box-shadow"
15
+ boxShadow: `0 0 1px 2px ${fallbackVar(focusRingColor, "#AF8EFF")}`
13
16
  },
14
17
  selectors: {
15
18
  "&:disabled, &[disabled]": {
@@ -20,9 +23,7 @@ const focusable = style({
20
23
  "&:has(input:focus-visible)": {
21
24
  outline: "2px solid transparent",
22
25
  outlineOffset: "2px",
23
- boxShadow: vars.focus.boxShadow,
24
- transitionDuration: vars.transition.fast,
25
- transitionProperty: "box-shadow"
26
+ boxShadow: vars.focus.boxShadow
26
27
  },
27
28
  "&:has(input:disabled)": {
28
29
  opacity: 0.5,
@@ -9,6 +9,7 @@ const styles_themes_momotaro_components_label_css_cjs = require("./label.css.cjs
9
9
  const styles_themes_momotaro_components_link_css_cjs = require("./link.css.cjs");
10
10
  const styles_themes_momotaro_components_progress_css_cjs = require("./progress.css.cjs");
11
11
  const styles_themes_momotaro_components_radio_css_cjs = require("./radio.css.cjs");
12
+ const styles_themes_momotaro_components_select_css_cjs = require("./select.css.cjs");
12
13
  const styles_themes_momotaro_components_spinner_css_cjs = require("./spinner.css.cjs");
13
14
  const styles_themes_momotaro_components_switch_css_cjs = require("./switch.css.cjs");
14
15
  const components = {
@@ -16,13 +17,14 @@ const components = {
16
17
  checkbox: styles_themes_momotaro_components_checkbox_css_cjs.checkbox,
17
18
  dialog: styles_themes_momotaro_components_dialog_css_cjs.dialog,
18
19
  divider: styles_themes_momotaro_components_divider_css_cjs.divider,
20
+ dropdown: styles_themes_momotaro_components_dropdown_css_cjs.dropdown,
19
21
  input: styles_themes_momotaro_components_input_css_cjs.input,
20
22
  label: styles_themes_momotaro_components_label_css_cjs.label,
21
23
  link: styles_themes_momotaro_components_link_css_cjs.link,
22
24
  progress: styles_themes_momotaro_components_progress_css_cjs.progress,
23
25
  radio: styles_themes_momotaro_components_radio_css_cjs.radio,
26
+ select: styles_themes_momotaro_components_select_css_cjs.select,
24
27
  spinner: styles_themes_momotaro_components_spinner_css_cjs.spinner,
25
- dropdown: styles_themes_momotaro_components_dropdown_css_cjs.dropdown,
26
28
  switch: styles_themes_momotaro_components_switch_css_cjs.switchTheme
27
29
  };
28
30
  exports.components = components;
@@ -8,6 +8,7 @@ import { label } from "./label.css.mjs";
8
8
  import { link } from "./link.css.mjs";
9
9
  import { progress } from "./progress.css.mjs";
10
10
  import { radio } from "./radio.css.mjs";
11
+ import { select } from "./select.css.mjs";
11
12
  import { spinner } from "./spinner.css.mjs";
12
13
  import { switchTheme } from "./switch.css.mjs";
13
14
  const components = {
@@ -15,13 +16,14 @@ const components = {
15
16
  checkbox,
16
17
  dialog,
17
18
  divider,
19
+ dropdown,
18
20
  input,
19
21
  label,
20
22
  link,
21
23
  progress,
22
24
  radio,
25
+ select,
23
26
  spinner,
24
- dropdown,
25
27
  switch: switchTheme
26
28
  };
27
29
  export {
@@ -8,8 +8,7 @@ fileScope.setFileScope("src/themes/momotaro/components/input.css.ts", "blocks");
8
8
  const input = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("input", {
9
9
  input: css.style([styles_lib_css_atoms_sprinkles_css_cjs.atoms({
10
10
  color: "text",
11
- paddingY: "large",
12
- paddingX: "large",
11
+ padding: "large",
13
12
  border: "none",
14
13
  borderRadius: "small"
15
14
  }), {
@@ -22,8 +21,11 @@ const input = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("input"
22
21
  }], "input_input"),
23
22
  container: css.style([{
24
23
  minHeight: 56,
25
- transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
26
- transitionProperty: "box-shadow",
24
+ "@media": {
25
+ "(prefers-reduced-motion: no-preference)": {
26
+ transition: `box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
27
+ }
28
+ },
27
29
  ":focus-within": {
28
30
  outline: "2px solid transparent",
29
31
  outlineOffset: "2px",
@@ -7,8 +7,7 @@ setFileScope("src/themes/momotaro/components/input.css.ts", "blocks");
7
7
  const input = makeComponentTheme("input", {
8
8
  input: style([atoms({
9
9
  color: "text",
10
- paddingY: "large",
11
- paddingX: "large",
10
+ padding: "large",
12
11
  border: "none",
13
12
  borderRadius: "small"
14
13
  }), {
@@ -21,8 +20,11 @@ const input = makeComponentTheme("input", {
21
20
  }], "input_input"),
22
21
  container: style([{
23
22
  minHeight: 56,
24
- transitionDuration: vars.transition.fast,
25
- transitionProperty: "box-shadow",
23
+ "@media": {
24
+ "(prefers-reduced-motion: no-preference)": {
25
+ transition: `box-shadow ${vars.transition.fast}`
26
+ }
27
+ },
26
28
  ":focus-within": {
27
29
  outline: "2px solid transparent",
28
30
  outlineOffset: "2px",
@@ -17,7 +17,7 @@ const progress = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("pro
17
17
  base: css.style([{
18
18
  height: 8
19
19
  }, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
20
- width: "full",
20
+ inlineSize: "full",
21
21
  borderRadius: "small",
22
22
  backgroundColor: "textLight",
23
23
  color: "primary",
@@ -16,7 +16,7 @@ const progress = makeComponentTheme("progress", {
16
16
  base: style([{
17
17
  height: 8
18
18
  }, atoms({
19
- width: "full",
19
+ inlineSize: "full",
20
20
  borderRadius: "small",
21
21
  backgroundColor: "textLight",
22
22
  color: "primary",
@@ -12,11 +12,14 @@ const radio = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("radio"
12
12
  display: "flex",
13
13
  alignItems: "center",
14
14
  justifyContent: "center",
15
- width: 24,
16
- height: 24,
15
+ inlineSize: 24,
16
+ blockSize: 24,
17
17
  borderRadius: 12,
18
- transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`,
19
- transitionProperty: "background-color",
18
+ "@media": {
19
+ "(prefers-reduced-motion: no-preference)": {
20
+ transition: `background-color ${styles_lib_theme_vars_css_cjs.vars.transition.fast}, box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
21
+ }
22
+ },
20
23
  ":hover": {
21
24
  backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
22
25
  },
@@ -34,7 +37,11 @@ const radio = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("radio"
34
37
  backgroundColor: "white",
35
38
  borderRadius: "8px",
36
39
  transform: "scale(0)",
37
- transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`,
40
+ "@media": {
41
+ "(prefers-reduced-motion: no-preference)": {
42
+ transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`
43
+ }
44
+ },
38
45
  selectors: {
39
46
  "input:checked ~ &": {
40
47
  transform: "scale(1)"
@@ -11,11 +11,14 @@ const radio = makeComponentTheme("radio", {
11
11
  display: "flex",
12
12
  alignItems: "center",
13
13
  justifyContent: "center",
14
- width: 24,
15
- height: 24,
14
+ inlineSize: 24,
15
+ blockSize: 24,
16
16
  borderRadius: 12,
17
- transition: `transform ${vars.transition.fast}`,
18
- transitionProperty: "background-color",
17
+ "@media": {
18
+ "(prefers-reduced-motion: no-preference)": {
19
+ transition: `background-color ${vars.transition.fast}, box-shadow ${vars.transition.fast}`
20
+ }
21
+ },
19
22
  ":hover": {
20
23
  backgroundColor: vars.color.primaryDark
21
24
  },
@@ -33,7 +36,11 @@ const radio = makeComponentTheme("radio", {
33
36
  backgroundColor: "white",
34
37
  borderRadius: "8px",
35
38
  transform: "scale(0)",
36
- transition: `transform ${vars.transition.normal} ${bounceOut}`,
39
+ "@media": {
40
+ "(prefers-reduced-motion: no-preference)": {
41
+ transition: `transform ${vars.transition.normal} ${bounceOut}`
42
+ }
43
+ },
37
44
  selectors: {
38
45
  "input:checked ~ &": {
39
46
  transform: "scale(1)"
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ const fileScope = require("@vanilla-extract/css/fileScope");
3
+ const styles_lib_css_style_style_cjs = require("../../../lib/css/style/style.cjs");
4
+ const styles_lib_theme_makeComponentTheme_cjs = require("../../../lib/theme/makeComponentTheme.cjs");
5
+ 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
+ fileScope.setFileScope("src/themes/momotaro/components/select.css.ts", "blocks");
8
+ const select = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("select", {
9
+ // wrapper: style({}),
10
+ select: styles_lib_css_style_style_cjs.style([{
11
+ color: "text",
12
+ padding: "large",
13
+ border: "none",
14
+ outline: "none",
15
+ backgroundColor: "white",
16
+ borderRadius: "medium",
17
+ boxShadow: "medium",
18
+ minHeight: 56,
19
+ transitionDuration: styles_lib_theme_vars_css_cjs.vars.transition.fast,
20
+ transitionProperty: "box-shadow",
21
+ ":focus-within": {
22
+ outline: "2px solid transparent",
23
+ outlineOffset: "2px",
24
+ boxShadow: `${styles_lib_theme_vars_css_cjs.vars.shadow.small}, ${styles_lib_theme_vars_css_cjs.vars.focus.boxShadow}`
25
+ }
26
+ }, styles_themes_momotaro_components_helpers_css_cjs.focusable]),
27
+ icon: styles_lib_css_style_style_cjs.style({
28
+ paddingInline: "large"
29
+ }),
30
+ defaultVariants: {
31
+ variant: "outline"
32
+ }
33
+ });
34
+ fileScope.endFileScope();
35
+ exports.select = select;
@@ -0,0 +1,36 @@
1
+ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
+ import { style } from "../../../lib/css/style/style.mjs";
3
+ import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
4
+ import { vars } from "../../../lib/theme/vars.css.mjs";
5
+ import { focusable } from "./helpers.css.mjs";
6
+ setFileScope("src/themes/momotaro/components/select.css.ts", "blocks");
7
+ const select = makeComponentTheme("select", {
8
+ // wrapper: style({}),
9
+ select: style([{
10
+ color: "text",
11
+ padding: "large",
12
+ border: "none",
13
+ outline: "none",
14
+ backgroundColor: "white",
15
+ borderRadius: "medium",
16
+ boxShadow: "medium",
17
+ minHeight: 56,
18
+ transitionDuration: vars.transition.fast,
19
+ transitionProperty: "box-shadow",
20
+ ":focus-within": {
21
+ outline: "2px solid transparent",
22
+ outlineOffset: "2px",
23
+ boxShadow: `${vars.shadow.small}, ${vars.focus.boxShadow}`
24
+ }
25
+ }, focusable]),
26
+ icon: style({
27
+ paddingInline: "large"
28
+ }),
29
+ defaultVariants: {
30
+ variant: "outline"
31
+ }
32
+ });
33
+ endFileScope();
34
+ export {
35
+ select
36
+ };
@@ -15,7 +15,7 @@ const switchTheme = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("
15
15
  backgroundColor: "textLight",
16
16
  "@media": {
17
17
  "(prefers-reduced-motion: no-preference)": {
18
- transition: "background-color 120ms linear"
18
+ transition: `background-color 120ms linear, box-shadow ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`
19
19
  }
20
20
  },
21
21
  selectors: {
@@ -14,7 +14,7 @@ const switchTheme = makeComponentTheme("switch", {
14
14
  backgroundColor: "textLight",
15
15
  "@media": {
16
16
  "(prefers-reduced-motion: no-preference)": {
17
- transition: "background-color 120ms linear"
17
+ transition: `background-color 120ms linear, box-shadow ${vars.transition.fast}`
18
18
  }
19
19
  },
20
20
  selectors: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks",
3
- "version": "0.8.10",
3
+ "version": "0.9.1",
4
4
  "description": "Blocks design system",
5
5
  "repository": "git@github.com:Blockle/blocks.git",
6
6
  "license": "MIT",
@@ -69,16 +69,16 @@
69
69
  "@changesets/cli": "^2.27.1",
70
70
  "@crackle/cli": "^0.13.0",
71
71
  "@crackle/core": "^0.31.0",
72
- "@storybook/addon-a11y": "^7.6.9",
72
+ "@storybook/addon-a11y": "^7.6.17",
73
73
  "@storybook/addon-coverage": "^1.0.0",
74
- "@storybook/addon-essentials": "^7.6.9",
75
- "@storybook/addon-interactions": "^7.6.9",
76
- "@storybook/addon-links": "^7.6.9",
74
+ "@storybook/addon-essentials": "^7.6.17",
75
+ "@storybook/addon-interactions": "^7.6.17",
76
+ "@storybook/addon-links": "^7.6.17",
77
77
  "@storybook/addons": "^7.6.17",
78
- "@storybook/blocks": "^7.6.9",
78
+ "@storybook/blocks": "^7.6.17",
79
79
  "@storybook/jest": "^0.2.3",
80
- "@storybook/react": "^7.6.9",
81
- "@storybook/react-vite": "^7.6.9",
80
+ "@storybook/react": "^7.6.17",
81
+ "@storybook/react-vite": "^7.6.17",
82
82
  "@storybook/testing-library": "^0.2.2",
83
83
  "@testing-library/jest-dom": "^6.2.0",
84
84
  "@testing-library/react": "^14.1.2",
@@ -101,7 +101,7 @@
101
101
  "jsdom": "^23.2.0",
102
102
  "prettier": "^3.2.4",
103
103
  "prop-types": "^15.8.1",
104
- "storybook": "^7.6.9",
104
+ "storybook": "^7.6.17",
105
105
  "typescript": "^5.3.3",
106
106
  "vitest": "^1.2.1"
107
107
  },