@blockle/blocks-theme-momotaro 6.2.1 → 6.2.4

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.
@@ -4,7 +4,7 @@ setFileScope("src/components/alert.css.ts", "@blockle/blocks-theme-momotaro");
4
4
  const alert = makeComponentTheme(
5
5
  "alert",
6
6
  {
7
- base: atoms({
7
+ root: atoms({
8
8
  borderWidth: "thin",
9
9
  borderStyle: "solid",
10
10
  padding: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAqHlD,CAAC"}
1
+ {"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAsIlD,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
3
3
  import { style, createVar } from "@vanilla-extract/css";
4
- import { focusRingColor, clickable } from "./helpers.css.js";
4
+ import { clickable } from "./helpers.css.js";
5
5
  setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
6
6
  const intentColor = createVar();
7
7
  const hoverBackgroundColor = createVar();
8
8
  const button = makeComponentTheme(
9
9
  "button",
10
10
  {
11
- base: style([
11
+ root: style([
12
12
  atoms({
13
13
  display: "inline-flex",
14
14
  placeItems: "center",
@@ -78,16 +78,33 @@ const button = makeComponentTheme(
78
78
  },
79
79
  intent: {
80
80
  neutral: style({
81
+ vars: {
82
+ [intentColor]: vars.color["neutral-800"],
83
+ [hoverBackgroundColor]: vars.color["neutral-200"]
84
+ }
85
+ }),
86
+ primary: style({
81
87
  vars: {
82
88
  [intentColor]: vars.color["primary-600"],
83
89
  [hoverBackgroundColor]: vars.color["primary-100"]
84
90
  }
85
91
  }),
92
+ secondary: style({
93
+ vars: {
94
+ [intentColor]: vars.color["secondary-600"],
95
+ [hoverBackgroundColor]: vars.color["secondary-100"]
96
+ }
97
+ }),
98
+ success: style({
99
+ vars: {
100
+ [intentColor]: vars.color["success-600"],
101
+ [hoverBackgroundColor]: vars.color["success-100"]
102
+ }
103
+ }),
86
104
  danger: style({
87
105
  vars: {
88
106
  [intentColor]: vars.color["danger-700"],
89
- [hoverBackgroundColor]: vars.color["danger-200"],
90
- [focusRingColor]: vars.color["danger-300"]
107
+ [hoverBackgroundColor]: vars.color["danger-200"]
91
108
  }
92
109
  })
93
110
  }
@@ -96,7 +113,7 @@ const button = makeComponentTheme(
96
113
  {
97
114
  variants: {
98
115
  variant: "solid",
99
- intent: "neutral"
116
+ intent: "primary"
100
117
  },
101
118
  style: style({
102
119
  vars: {
@@ -119,7 +136,7 @@ const button = makeComponentTheme(
119
136
  defaultVariants: {
120
137
  size: "medium",
121
138
  variant: "solid",
122
- intent: "neutral"
139
+ intent: "primary"
123
140
  }
124
141
  }
125
142
  );
@@ -7,7 +7,7 @@ setFileScope("src/components/checkbox.css.ts", "@blockle/blocks-theme-momotaro")
7
7
  const checkbox = makeComponentTheme(
8
8
  "checkbox",
9
9
  {
10
- base: style([
10
+ root: style([
11
11
  {
12
12
  display: "flex",
13
13
  alignItems: "center",
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA2ElD,CAAC"}
1
+ {"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA0ElD,CAAC"}
@@ -13,7 +13,7 @@ const dialog = makeComponentTheme(
13
13
  border: "none",
14
14
  overflow: "auto",
15
15
  borderRadius: 2,
16
- boxShadow: "large"
16
+ boxShadow: 3
17
17
  }),
18
18
  {
19
19
  maxHeight: "90%",
@@ -25,7 +25,6 @@ const dialog = makeComponentTheme(
25
25
  "&[open]": {
26
26
  transform: "translate(0, 0)",
27
27
  opacity: 1,
28
- // @ts-expect-error - typings does not support @starting-style (yet)
29
28
  "@starting-style": {
30
29
  transform: "translate(0, -120px) scale(0.95)",
31
30
  opacity: 0
@@ -5,7 +5,7 @@ setFileScope("src/components/divider.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const divider = makeComponentTheme(
6
6
  "divider",
7
7
  {
8
- base: style({
8
+ root: style({
9
9
  blockSize: 1
10
10
  }),
11
11
  defaultVariants: {
@@ -0,0 +1,3 @@
1
+ import { ThemeComponentsStyles } from '@blockle/blocks-core';
2
+ export declare const drawer: ThemeComponentsStyles['drawer'];
3
+ //# sourceMappingURL=drawer.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.css.d.ts","sourceRoot":"","sources":["../../src/components/drawer.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAmElD,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
+ import { makeComponentTheme, atoms } from "@blockle/blocks-core";
3
+ import { style, createVar } from "@vanilla-extract/css";
4
+ setFileScope("src/components/drawer.css.ts", "@blockle/blocks-theme-momotaro");
5
+ const startingTransform = createVar();
6
+ const drawer = makeComponentTheme(
7
+ "drawer",
8
+ {
9
+ root: style([
10
+ atoms({
11
+ border: "none"
12
+ }),
13
+ {
14
+ selectors: {
15
+ "&[open]": {
16
+ transform: "translate(0, 0)",
17
+ opacity: 1,
18
+ "@starting-style": {
19
+ transform: startingTransform,
20
+ opacity: 0
21
+ }
22
+ },
23
+ "&[open]::backdrop": {
24
+ opacity: 1,
25
+ "@starting-style": {
26
+ opacity: 0
27
+ }
28
+ }
29
+ },
30
+ "@media": {
31
+ "(prefers-reduced-motion: no-preference)": {
32
+ // Ending style
33
+ transform: startingTransform,
34
+ opacity: 0,
35
+ transitionBehavior: "allow-discrete",
36
+ transitionProperty: "opacity, transform, overlay, display",
37
+ transitionDuration: "240ms, 160ms, 240ms, 240ms",
38
+ "::backdrop": {
39
+ opacity: 0,
40
+ transitionBehavior: "allow-discrete",
41
+ transitionProperty: "opacity, overlay, display",
42
+ transitionDuration: "160ms, 240ms, 240ms"
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ]),
48
+ variants: {
49
+ placement: {
50
+ top: style({
51
+ vars: {
52
+ [startingTransform]: "translate(0, -100%)"
53
+ }
54
+ }),
55
+ right: style({
56
+ vars: {
57
+ [startingTransform]: "translate(100%, 0)"
58
+ }
59
+ }),
60
+ bottom: style({
61
+ vars: {
62
+ [startingTransform]: "translate(0, 100%)"
63
+ }
64
+ }),
65
+ left: style({
66
+ vars: {
67
+ [startingTransform]: "translate(-100%, 0)"
68
+ }
69
+ })
70
+ }
71
+ }
72
+ }
73
+ );
74
+ endFileScope();
75
+ export {
76
+ drawer
77
+ };
@@ -2,7 +2,7 @@ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { vars } from "@blockle/blocks-core";
3
3
  import { style, createVar } from "@vanilla-extract/css";
4
4
  setFileScope("src/components/helpers.css.ts", "@blockle/blocks-theme-momotaro");
5
- const focusRingColor = createVar();
5
+ createVar();
6
6
  const focusable = style({
7
7
  // '@media': {
8
8
  // '(prefers-reduced-motion: no-preference)': {
@@ -40,6 +40,5 @@ const clickable = style([
40
40
  endFileScope();
41
41
  export {
42
42
  clickable,
43
- focusRingColor,
44
43
  focusable
45
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"icon.css.d.ts","sourceRoot":"","sources":["../../src/components/icon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAkB7C,CAAC"}
1
+ {"version":3,"file":"icon.css.d.ts","sourceRoot":"","sources":["../../src/components/icon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAwB7C,CAAC"}
@@ -1,19 +1,25 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme } from "@blockle/blocks-core";
2
+ import { makeComponentTheme, pixelsToRem } from "@blockle/blocks-core";
3
3
  import { style } from "@vanilla-extract/css";
4
4
  setFileScope("src/components/icon.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const icon = makeComponentTheme("icon", {
6
- base: "",
6
+ root: "",
7
7
  variants: {
8
8
  size: {
9
+ xsmall: style({
10
+ minWidth: pixelsToRem(12)
11
+ }),
9
12
  small: style({
10
- minWidth: "1rem"
13
+ minWidth: pixelsToRem(16)
11
14
  }),
12
15
  medium: style({
13
- minWidth: "2rem"
16
+ minWidth: pixelsToRem(32)
14
17
  }),
15
18
  large: style({
16
- minWidth: "3rem"
19
+ minWidth: pixelsToRem(48)
20
+ }),
21
+ xlarge: style({
22
+ minWidth: pixelsToRem(64)
17
23
  })
18
24
  }
19
25
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAqBlE,eAAO,MAAM,UAAU,EAAE,qBAmBxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAsBlE,eAAO,MAAM,UAAU,EAAE,qBAoBxB,CAAC"}
@@ -3,6 +3,7 @@ import { button } from "./button.css.js";
3
3
  import { checkbox } from "./checkbox.css.js";
4
4
  import { dialog } from "./dialog.css.js";
5
5
  import { divider } from "./divider.css.js";
6
+ import { drawer } from "./drawer.css.js";
6
7
  import { icon } from "./icon.css.js";
7
8
  import { label } from "./label.css.js";
8
9
  import { link } from "./link.css.js";
@@ -22,6 +23,7 @@ const components = {
22
23
  checkbox,
23
24
  dialog,
24
25
  divider,
26
+ drawer,
25
27
  icon,
26
28
  label,
27
29
  link,
@@ -5,7 +5,7 @@ setFileScope("src/components/label.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const label = makeComponentTheme(
6
6
  "label",
7
7
  {
8
- base: style({}),
8
+ root: style({}),
9
9
  variants: {
10
10
  size: {
11
11
  small: style({
@@ -4,7 +4,7 @@ import { style } from "@vanilla-extract/css";
4
4
  import { focusable } from "./helpers.css.js";
5
5
  setFileScope("src/components/link.css.ts", "@blockle/blocks-theme-momotaro");
6
6
  const link = makeComponentTheme("link", {
7
- base: style([
7
+ root: style([
8
8
  {
9
9
  outline: "none",
10
10
  border: "none",
@@ -1 +1 @@
1
- {"version":3,"file":"popover.css.d.ts","sourceRoot":"","sources":["../../src/components/popover.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAsCpD,CAAC"}
1
+ {"version":3,"file":"popover.css.d.ts","sourceRoot":"","sources":["../../src/components/popover.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAqCpD,CAAC"}
@@ -5,11 +5,11 @@ setFileScope("src/components/popover.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const popover = makeComponentTheme(
6
6
  "popover",
7
7
  {
8
- base: style([
8
+ root: style([
9
9
  atoms({
10
10
  backgroundColor: "white",
11
11
  borderRadius: 1,
12
- boxShadow: "medium",
12
+ boxShadow: 2,
13
13
  padding: 2,
14
14
  margin: 1
15
15
  // Space between the popover and the anchor element
@@ -20,7 +20,6 @@ const popover = makeComponentTheme(
20
20
  "&:popover-open": {
21
21
  transform: "translateY(0) scale(1)",
22
22
  opacity: 1,
23
- // @ts-expect-error - Vanilla Extract does not support @starting-style (yet)
24
23
  "@starting-style": {
25
24
  transform: "translateY(12px) scale(0.8)",
26
25
  opacity: 0
@@ -13,7 +13,7 @@ const indeterminateAnimation = keyframes({
13
13
  const progress = makeComponentTheme(
14
14
  "progress",
15
15
  {
16
- base: style([
16
+ root: style([
17
17
  {
18
18
  height: 8
19
19
  },
@@ -7,7 +7,7 @@ setFileScope("src/components/radio.css.ts", "@blockle/blocks-theme-momotaro");
7
7
  const radio = makeComponentTheme(
8
8
  "radio",
9
9
  {
10
- base: style([
10
+ root: style([
11
11
  {
12
12
  display: "flex",
13
13
  alignItems: "center",
@@ -13,7 +13,7 @@ const select = makeComponentTheme(
13
13
  paddingBlock: 1,
14
14
  backgroundColor: "white",
15
15
  borderRadius: 2,
16
- boxShadow: "medium"
16
+ boxShadow: 2
17
17
  }),
18
18
  {
19
19
  border: "none",
@@ -10,7 +10,7 @@ const thumbActive = createVar();
10
10
  const slider = makeComponentTheme(
11
11
  "slider",
12
12
  {
13
- base: style({
13
+ root: style({
14
14
  blockSize: "20px"
15
15
  }),
16
16
  track: style([
@@ -13,7 +13,7 @@ const spinAnimation = keyframes({
13
13
  const spinner = makeComponentTheme(
14
14
  "spinner",
15
15
  {
16
- base: style({
16
+ root: style({
17
17
  aspectRatio: "1 / 1",
18
18
  overflow: "hidden",
19
19
  borderRadius: "50%",
@@ -7,7 +7,7 @@ const activeScaleFactor = createVar();
7
7
  const switchTheme = makeComponentTheme(
8
8
  "switch",
9
9
  {
10
- base: style([
10
+ root: style([
11
11
  atoms({
12
12
  borderRadius: 4,
13
13
  backgroundColor: "text-200"
@@ -37,7 +37,7 @@ const switchTheme = makeComponentTheme(
37
37
  },
38
38
  focusable
39
39
  ]),
40
- slider: style([
40
+ thumb: style([
41
41
  atoms({
42
42
  borderRadius: "full"
43
43
  }),
@@ -6,7 +6,7 @@ setFileScope("src/components/textInput.css.ts", "@blockle/blocks-theme-momotaro"
6
6
  const textInput = makeComponentTheme(
7
7
  "textInput",
8
8
  {
9
- container: style([
9
+ root: style([
10
10
  {
11
11
  minHeight: 40,
12
12
  backgroundColor: "white",
@@ -22,7 +22,7 @@ const textInput = makeComponentTheme(
22
22
  paddingBlock: 2,
23
23
  backgroundColor: "white",
24
24
  borderRadius: 2,
25
- boxShadow: "medium",
25
+ boxShadow: 2,
26
26
  // Space between `startSlot | children | endSlot`
27
27
  gap: 2
28
28
  }),
@@ -22,7 +22,7 @@ const textarea = makeComponentTheme(
22
22
  ":disabled": {}
23
23
  }
24
24
  ]),
25
- container: style([
25
+ root: style([
26
26
  {
27
27
  overflow: "auto",
28
28
  minHeight: 96,
@@ -38,7 +38,7 @@ const textarea = makeComponentTheme(
38
38
  paddingBlock: 2,
39
39
  backgroundColor: "white",
40
40
  borderRadius: 2,
41
- boxShadow: "medium"
41
+ boxShadow: 2
42
42
  }),
43
43
  focusable
44
44
  ])
@@ -5,7 +5,7 @@ setFileScope("src/components/tooltip.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const tooltip = makeComponentTheme(
6
6
  "tooltip",
7
7
  {
8
- base: atoms({
8
+ root: atoms({
9
9
  padding: 1
10
10
  }),
11
11
  variants: {
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.css.d.ts","sourceRoot":"","sources":["../src/tokens.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErE,eAAO,MAAM,MAAM,EAAE,WA4JpB,CAAC"}
1
+ {"version":3,"file":"tokens.css.d.ts","sourceRoot":"","sources":["../src/tokens.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErE,eAAO,MAAM,MAAM,EAAE,WAyKpB,CAAC"}
@@ -104,12 +104,25 @@ const tokens = {
104
104
  700: "#2E2E2E",
105
105
  800: "#1A1A1A",
106
106
  900: "#0D0D0D"
107
+ },
108
+ neutral: {
109
+ 100: "#F7F7F7",
110
+ 200: "#E1E1E1",
111
+ 300: "#CFCFCF",
112
+ 400: "#B1B1B1",
113
+ 500: "#9E9E9E",
114
+ 600: "#7E7E7E",
115
+ 700: "#5E5E5E",
116
+ 800: "#3C3C3C",
117
+ 900: "#1A1A1A"
107
118
  }
108
119
  },
109
120
  shadow: {
110
- small: "0px 4px 8px rgba(0, 0, 0, 0.08)",
111
- medium: "0px 8px 16px rgba(0, 0, 0, 0.08)",
112
- large: "0px 16px 24px rgba(0, 0, 0, 0.08)"
121
+ 1: "0px 4px 8px rgba(0, 0, 0, 0.08)",
122
+ 2: "0px 8px 16px rgba(0, 0, 0, 0.08)",
123
+ 3: "0px 16px 24px rgba(0, 0, 0, 0.08)",
124
+ 4: "0px 24px 32px rgba(0, 0, 0, 0.08)",
125
+ 5: "0px 32px 40px rgba(0, 0, 0, 0.08)"
113
126
  },
114
127
  focus: {
115
128
  boxShadow: "0 0 1px 2px #7FE3F0"
@@ -132,8 +145,8 @@ const tokens = {
132
145
  typography: {
133
146
  fontFamily: {
134
147
  body: '"Rubik", sans-serif',
135
- primary: '"Rubik", sans-serif',
136
- secondary: '"Rubik", sans-serif'
148
+ heading: '"Rubik", sans-serif',
149
+ mono: '"Rubik", monospace'
137
150
  },
138
151
  fontSize: {
139
152
  xsmall: pixelsToRem(12),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks-theme-momotaro",
3
- "version": "6.2.1",
3
+ "version": "6.2.4",
4
4
  "description": "Momotaro theme for Blocks",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+ssh://git@github.com/Blockle/blocks.git"
25
+ "url": "git+https://github.com/Blockle/blocks.git"
26
26
  },
27
27
  "author": "Niek Saarberg <n.saarberg@gmail.com>",
28
28
  "license": "MIT",
@@ -31,10 +31,14 @@
31
31
  },
32
32
  "homepage": "https://github.com/Blockle/blocks#readme",
33
33
  "dependencies": {
34
- "@vanilla-extract/css": "^1.17.5"
34
+ "@vanilla-extract/css": "^1.18.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@blockle/blocks-core": ">=1.2.x",
38
- "@vanilla-extract/css": "^1.17.5"
38
+ "@vanilla-extract/css": "^1.18.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "provenance": true
39
43
  }
40
44
  }