@blockle/blocks-theme-momotaro 7.2.0 → 7.3.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 (61) hide show
  1. package/dist/components/alert.css.d.ts.map +1 -1
  2. package/dist/components/alert.css.js +17 -9
  3. package/dist/components/button.css.d.ts.map +1 -1
  4. package/dist/components/button.css.js +23 -32
  5. package/dist/components/buttonBase.css.d.ts +1 -1
  6. package/dist/components/buttonBase.css.d.ts.map +1 -1
  7. package/dist/components/buttonBase.css.js +99 -59
  8. package/dist/components/checkbox.css.d.ts.map +1 -1
  9. package/dist/components/checkbox.css.js +49 -39
  10. package/dist/components/dialog.css.d.ts.map +1 -1
  11. package/dist/components/dialog.css.js +64 -52
  12. package/dist/components/divider.css.d.ts.map +1 -1
  13. package/dist/components/divider.css.js +28 -12
  14. package/dist/components/drawer.css.d.ts.map +1 -1
  15. package/dist/components/drawer.css.js +85 -57
  16. package/dist/components/heading.css.d.ts.map +1 -1
  17. package/dist/components/heading.css.js +13 -5
  18. package/dist/components/helpers.css.d.ts.map +1 -1
  19. package/dist/components/helpers.css.js +33 -25
  20. package/dist/components/icon.css.d.ts.map +1 -1
  21. package/dist/components/icon.css.js +26 -6
  22. package/dist/components/iconButton.css.d.ts.map +1 -1
  23. package/dist/components/iconButton.css.js +22 -11
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/components/index.js +4 -0
  26. package/dist/components/label.css.d.ts.map +1 -1
  27. package/dist/components/label.css.js +28 -8
  28. package/dist/components/link.css.d.ts.map +1 -1
  29. package/dist/components/link.css.js +46 -26
  30. package/dist/components/menu.css.d.ts +3 -0
  31. package/dist/components/menu.css.d.ts.map +1 -0
  32. package/dist/components/menu.css.js +83 -0
  33. package/dist/components/popover.css.js +31 -31
  34. package/dist/components/progress.css.d.ts.map +1 -1
  35. package/dist/components/progress.css.js +32 -24
  36. package/dist/components/radio.css.d.ts.map +1 -1
  37. package/dist/components/radio.css.js +50 -38
  38. package/dist/components/select.css.d.ts.map +1 -1
  39. package/dist/components/select.css.js +54 -44
  40. package/dist/components/slider.css.d.ts.map +1 -1
  41. package/dist/components/slider.css.js +82 -46
  42. package/dist/components/spinner.css.d.ts.map +1 -1
  43. package/dist/components/spinner.css.js +28 -12
  44. package/dist/components/switch.css.d.ts.map +1 -1
  45. package/dist/components/switch.css.js +48 -46
  46. package/dist/components/tabs.css.d.ts +3 -0
  47. package/dist/components/tabs.css.d.ts.map +1 -0
  48. package/dist/components/tabs.css.js +102 -0
  49. package/dist/components/tag.css.d.ts.map +1 -1
  50. package/dist/components/tag.css.js +66 -57
  51. package/dist/components/text.css.d.ts.map +1 -1
  52. package/dist/components/text.css.js +13 -5
  53. package/dist/components/textInput.css.d.ts.map +1 -1
  54. package/dist/components/textInput.css.js +30 -28
  55. package/dist/components/textarea.css.d.ts.map +1 -1
  56. package/dist/components/textarea.css.js +30 -28
  57. package/dist/components/toast.css.d.ts.map +1 -1
  58. package/dist/components/toast.css.js +32 -24
  59. package/dist/components/tooltip.css.d.ts.map +1 -1
  60. package/dist/components/tooltip.css.js +17 -10
  61. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"alert.css.d.ts","sourceRoot":"","sources":["../../src/components/alert.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAY9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAkBhD,CAAC"}
1
+ {"version":3,"file":"alert.css.d.ts","sourceRoot":"","sources":["../../src/components/alert.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAgB9B,eAAO,MAAM,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAsBhD,CAAC"}
@@ -1,20 +1,28 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
2
+ import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
3
3
  import { style } from "@vanilla-extract/css";
4
4
  setFileScope("src/components/alert.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const intentStyle = (roles) => style({
6
- backgroundColor: roles.subtle,
7
- color: roles.foreground,
8
- borderColor: roles.border
6
+ "@layer": {
7
+ [layers.theme]: {
8
+ backgroundColor: roles.subtle,
9
+ color: roles.foreground,
10
+ borderColor: roles.border
11
+ }
12
+ }
9
13
  });
10
14
  const alert = makeComponentTheme(
11
15
  "alert",
12
16
  {
13
- root: atoms({
14
- borderWidth: "thin",
15
- borderStyle: "solid",
16
- padding: 2,
17
- borderRadius: 2
17
+ root: style({
18
+ "@layer": {
19
+ [layers.theme]: {
20
+ borderWidth: vars.borderWidth.thin,
21
+ borderStyle: "solid",
22
+ padding: vars.space[2],
23
+ borderRadius: vars.borderRadius[2]
24
+ }
25
+ }
18
26
  }),
19
27
  variants: {
20
28
  intent: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.css.d.ts","sourceRoot":"","sources":["../../src/components/button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAiDlD,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;AAqB9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAgClD,CAAC"}
@@ -1,48 +1,39 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme, atoms } from "@blockle/blocks-core";
2
+ import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
3
3
  import { style } from "@vanilla-extract/css";
4
- import { buttonIntent, buttonVariant, buttonHeight, buttonBase, buttonRadius } from "./buttonBase.css.js";
4
+ import { buttonIntent, buttonVariant, buttonBase, buttonRadius, buttonHeight } from "./buttonBase.css.js";
5
5
  setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
6
+ const sizeStyle = (paddingInline, minHeight) => style({
7
+ "@layer": {
8
+ [layers.theme]: {
9
+ paddingInline,
10
+ minHeight
11
+ }
12
+ }
13
+ });
6
14
  const button = makeComponentTheme(
7
15
  "button",
8
16
  {
9
17
  root: style([
10
- atoms({
11
- fontSize: "medium",
12
- fontWeight: "medium",
13
- gap: 2,
14
- paddingBlock: 1
15
- }),
18
+ {
19
+ "@layer": {
20
+ [layers.theme]: {
21
+ fontSize: vars.fontSize.medium,
22
+ fontWeight: vars.fontWeight.medium,
23
+ gap: vars.space[2],
24
+ paddingBlock: vars.space[1]
25
+ }
26
+ }
27
+ },
16
28
  buttonBase,
17
29
  buttonRadius
18
30
  ]),
19
31
  variants: {
20
32
  variant: buttonVariant,
21
33
  size: {
22
- small: style([
23
- atoms({
24
- paddingInline: 3
25
- }),
26
- {
27
- minHeight: buttonHeight.small
28
- }
29
- ]),
30
- medium: style([
31
- atoms({
32
- paddingInline: 4
33
- }),
34
- {
35
- minHeight: buttonHeight.medium
36
- }
37
- ]),
38
- large: style([
39
- atoms({
40
- paddingInline: 5
41
- }),
42
- {
43
- minHeight: buttonHeight.large
44
- }
45
- ])
34
+ small: sizeStyle(vars.space[3], buttonHeight.small),
35
+ medium: sizeStyle(vars.space[4], buttonHeight.medium),
36
+ large: sizeStyle(vars.space[5], buttonHeight.large)
46
37
  },
47
38
  intent: buttonIntent
48
39
  },
@@ -4,7 +4,7 @@ export declare const buttonHeight: {
4
4
  readonly large: 56;
5
5
  };
6
6
  export declare const buttonBase: string;
7
- export declare const buttonRadius: any;
7
+ export declare const buttonRadius: string;
8
8
  export declare const buttonVariant: {
9
9
  solid: string;
10
10
  outline: string;
@@ -1 +1 @@
1
- {"version":3,"file":"buttonBase.css.d.ts","sourceRoot":"","sources":["../../src/components/buttonBase.css.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,UAAU,QAMrB,CAAC;AAEH,eAAO,MAAM,YAAY,KAEvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;CAoCzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAgDxB,CAAC"}
1
+ {"version":3,"file":"buttonBase.css.d.ts","sourceRoot":"","sources":["../../src/components/buttonBase.css.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,UAAU,QAUrB,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;CA4CzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAwExB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { vars, atoms } from "@blockle/blocks-core";
2
+ import { layers, vars } from "@blockle/blocks-core";
3
3
  import { style, createVar } from "@vanilla-extract/css";
4
4
  import { clickable } from "./helpers.css.js";
5
5
  setFileScope("src/components/buttonBase.css.ts", "@blockle/blocks-theme-momotaro");
@@ -13,98 +13,138 @@ const buttonHeight = {
13
13
  large: 56
14
14
  };
15
15
  const buttonBase = style([
16
- atoms({
17
- display: "inline-flex",
18
- placeItems: "center"
19
- }),
16
+ {
17
+ "@layer": {
18
+ [layers.theme]: {
19
+ display: "inline-flex",
20
+ placeItems: "center"
21
+ }
22
+ }
23
+ },
20
24
  clickable
21
25
  ]);
22
- const buttonRadius = atoms({
23
- borderRadius: 2
26
+ const buttonRadius = style({
27
+ "@layer": {
28
+ [layers.theme]: {
29
+ borderRadius: vars.borderRadius[2]
30
+ }
31
+ }
24
32
  });
25
33
  const buttonVariant = {
26
34
  solid: style({
27
- color: contrastColor,
28
- backgroundColor: solidColor,
29
- border: "none",
30
- selectors: {
31
- "&:hover:not(:disabled)": {
32
- backgroundColor: solidHoverColor
35
+ "@layer": {
36
+ [layers.theme]: {
37
+ color: contrastColor,
38
+ backgroundColor: solidColor,
39
+ border: "none",
40
+ selectors: {
41
+ "&:hover:not(:disabled)": {
42
+ backgroundColor: solidHoverColor
43
+ }
44
+ }
33
45
  }
34
46
  }
35
47
  }),
36
- outline: style([
37
- atoms({
38
- borderWidth: "thin"
39
- }),
40
- {
41
- color: solidColor,
42
- borderStyle: "solid",
43
- borderColor: solidColor,
44
- background: "transparent",
45
- selectors: {
46
- "&:hover:not(:disabled)": {
47
- backgroundColor: subtleColor
48
+ outline: style({
49
+ "@layer": {
50
+ [layers.theme]: {
51
+ borderWidth: vars.borderWidth.thin,
52
+ color: solidColor,
53
+ borderStyle: "solid",
54
+ borderColor: solidColor,
55
+ background: "transparent",
56
+ selectors: {
57
+ "&:hover:not(:disabled)": {
58
+ backgroundColor: subtleColor
59
+ }
48
60
  }
49
61
  }
50
62
  }
51
- ]),
63
+ }),
52
64
  ghost: style({
53
- color: solidColor,
54
- background: "transparent",
55
- selectors: {
56
- "&:hover:not(:disabled)": {
57
- backgroundColor: subtleColor
65
+ "@layer": {
66
+ [layers.theme]: {
67
+ color: solidColor,
68
+ background: "transparent",
69
+ selectors: {
70
+ "&:hover:not(:disabled)": {
71
+ backgroundColor: subtleColor
72
+ }
73
+ }
58
74
  }
59
75
  }
60
76
  })
61
77
  };
62
78
  const buttonIntent = {
63
79
  neutral: style({
64
- vars: {
65
- [solidColor]: vars.colorRole.neutral.solid,
66
- [solidHoverColor]: vars.colorRole.neutral.solidHover,
67
- [subtleColor]: vars.colorRole.neutral.subtle,
68
- [contrastColor]: vars.colorRole.neutral.contrast
80
+ "@layer": {
81
+ [layers.theme]: {
82
+ vars: {
83
+ [solidColor]: vars.colorRole.neutral.solid,
84
+ [solidHoverColor]: vars.colorRole.neutral.solidHover,
85
+ [subtleColor]: vars.colorRole.neutral.subtle,
86
+ [contrastColor]: vars.colorRole.neutral.contrast
87
+ }
88
+ }
69
89
  }
70
90
  }),
71
91
  primary: style({
72
- vars: {
73
- [solidColor]: vars.colorRole.primary.solid,
74
- [solidHoverColor]: vars.colorRole.primary.solidHover,
75
- [subtleColor]: vars.colorRole.primary.subtle,
76
- [contrastColor]: vars.colorRole.primary.contrast
92
+ "@layer": {
93
+ [layers.theme]: {
94
+ vars: {
95
+ [solidColor]: vars.colorRole.primary.solid,
96
+ [solidHoverColor]: vars.colorRole.primary.solidHover,
97
+ [subtleColor]: vars.colorRole.primary.subtle,
98
+ [contrastColor]: vars.colorRole.primary.contrast
99
+ }
100
+ }
77
101
  }
78
102
  }),
79
103
  secondary: style({
80
- vars: {
81
- [solidColor]: vars.colorRole.secondary.solid,
82
- [solidHoverColor]: vars.colorRole.secondary.solidHover,
83
- [subtleColor]: vars.colorRole.secondary.subtle,
84
- [contrastColor]: vars.colorRole.secondary.contrast
104
+ "@layer": {
105
+ [layers.theme]: {
106
+ vars: {
107
+ [solidColor]: vars.colorRole.secondary.solid,
108
+ [solidHoverColor]: vars.colorRole.secondary.solidHover,
109
+ [subtleColor]: vars.colorRole.secondary.subtle,
110
+ [contrastColor]: vars.colorRole.secondary.contrast
111
+ }
112
+ }
85
113
  }
86
114
  }),
87
115
  success: style({
88
- vars: {
89
- [solidColor]: vars.colorRole.success.solid,
90
- [solidHoverColor]: vars.colorRole.success.solidHover,
91
- [subtleColor]: vars.colorRole.success.subtle,
92
- [contrastColor]: vars.colorRole.success.contrast
116
+ "@layer": {
117
+ [layers.theme]: {
118
+ vars: {
119
+ [solidColor]: vars.colorRole.success.solid,
120
+ [solidHoverColor]: vars.colorRole.success.solidHover,
121
+ [subtleColor]: vars.colorRole.success.subtle,
122
+ [contrastColor]: vars.colorRole.success.contrast
123
+ }
124
+ }
93
125
  }
94
126
  }),
95
127
  danger: style({
96
- vars: {
97
- [solidColor]: vars.colorRole.danger.solid,
98
- [solidHoverColor]: vars.colorRole.danger.solidHover,
99
- [subtleColor]: vars.colorRole.danger.subtle,
100
- [contrastColor]: vars.colorRole.danger.contrast
128
+ "@layer": {
129
+ [layers.theme]: {
130
+ vars: {
131
+ [solidColor]: vars.colorRole.danger.solid,
132
+ [solidHoverColor]: vars.colorRole.danger.solidHover,
133
+ [subtleColor]: vars.colorRole.danger.subtle,
134
+ [contrastColor]: vars.colorRole.danger.contrast
135
+ }
136
+ }
101
137
  }
102
138
  }),
103
139
  // Takes the surrounding text color; only used with the ghost and outline variants
104
140
  inherit: style({
105
- vars: {
106
- [solidColor]: "currentColor",
107
- [subtleColor]: "color-mix(in srgb, currentColor 12%, transparent)"
141
+ "@layer": {
142
+ [layers.theme]: {
143
+ vars: {
144
+ [solidColor]: "currentColor",
145
+ [subtleColor]: "color-mix(in srgb, currentColor 12%, transparent)"
146
+ }
147
+ }
108
148
  }
109
149
  })
110
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAsDtD,CAAC"}
1
+ {"version":3,"file":"checkbox.css.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAM9B,eAAO,MAAM,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAgEtD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme, atoms, vars } from "@blockle/blocks-core";
2
+ import { makeComponentTheme, vars, layers } from "@blockle/blocks-core";
3
3
  import { style } from "@vanilla-extract/css";
4
4
  import { focusable } from "./helpers.css.js";
5
5
  import { bounceOut } from "./transitions.js";
@@ -9,53 +9,63 @@ const checkbox = makeComponentTheme(
9
9
  {
10
10
  root: style([
11
11
  {
12
- display: "flex",
13
- alignItems: "center",
14
- justifyContent: "center",
15
- inlineSize: 24,
16
- blockSize: 24,
17
- "@media": {
18
- "(prefers-reduced-motion: no-preference)": {
19
- transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
20
- }
21
- },
22
- selectors: {
23
- "&:hover:not(:has(input:disabled))": {
24
- backgroundColor: vars.colorRole.primary.solidHover
25
- },
26
- "&:has(input:checked)": {
27
- backgroundColor: vars.colorRole.primary.solid
12
+ "@layer": {
13
+ [layers.theme]: {
14
+ display: "flex",
15
+ alignItems: "center",
16
+ justifyContent: "center",
17
+ inlineSize: 24,
18
+ blockSize: 24,
19
+ borderRadius: vars.borderRadius[1],
20
+ backgroundColor: vars.colorRole.primary.subtle,
21
+ "@media": {
22
+ "(prefers-reduced-motion: no-preference)": {
23
+ transition: `background-color ${vars.transition.normal}, box-shadow ${vars.transition.fast}`
24
+ }
25
+ },
26
+ selectors: {
27
+ "&:hover:not(:has(input:disabled))": {
28
+ backgroundColor: vars.colorRole.primary.solidHover
29
+ },
30
+ "&:has(input:checked)": {
31
+ backgroundColor: vars.colorRole.primary.solid
32
+ }
33
+ }
28
34
  }
29
35
  }
30
36
  },
31
- atoms({
32
- borderRadius: 1
33
- }),
34
- { backgroundColor: vars.colorRole.primary.subtle },
35
37
  focusable
36
38
  ]),
37
39
  icon: style({
38
- inlineSize: "1rem",
39
- blockSize: "1rem",
40
- color: vars.colorRole.primary.contrast,
41
- transform: "scale(0)",
42
- selectors: {
43
- "input:checked ~ &": {
44
- transform: "scale(1)"
45
- }
46
- },
47
- "@media": {
48
- "(prefers-reduced-motion: no-preference)": {
49
- transition: `transform ${vars.transition.normal} ${bounceOut}`
40
+ "@layer": {
41
+ [layers.theme]: {
42
+ inlineSize: "1rem",
43
+ blockSize: "1rem",
44
+ color: vars.colorRole.primary.contrast,
45
+ transform: "scale(0)",
46
+ selectors: {
47
+ "input:checked ~ &": {
48
+ transform: "scale(1)"
49
+ }
50
+ },
51
+ "@media": {
52
+ "(prefers-reduced-motion: no-preference)": {
53
+ transition: `transform ${vars.transition.normal} ${bounceOut}`
54
+ }
55
+ }
50
56
  }
51
57
  }
52
58
  }),
53
- label: atoms({
54
- display: "flex",
55
- flexDirection: "row",
56
- padding: 1,
57
- gap: 2,
58
- cursor: "pointer"
59
+ label: style({
60
+ "@layer": {
61
+ [layers.theme]: {
62
+ display: "flex",
63
+ flexDirection: "row",
64
+ padding: vars.space[1],
65
+ gap: vars.space[2],
66
+ cursor: "pointer"
67
+ }
68
+ }
59
69
  })
60
70
  }
61
71
  );
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CA4ElD,CAAC"}
1
+ {"version":3,"file":"dialog.css.d.ts","sourceRoot":"","sources":["../../src/components/dialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAwFlD,CAAC"}
@@ -1,76 +1,88 @@
1
1
  import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
- import { makeComponentTheme, vars, atoms } from "@blockle/blocks-core";
2
+ import { makeComponentTheme, layers, vars } from "@blockle/blocks-core";
3
3
  import { style } from "@vanilla-extract/css";
4
4
  setFileScope("src/components/dialog.css.ts", "@blockle/blocks-theme-momotaro");
5
5
  const dialog = makeComponentTheme(
6
6
  "dialog",
7
7
  {
8
- dialog: style([
9
- atoms({
10
- display: "flex",
11
- flexDirection: "column",
12
- padding: 5,
13
- border: "none",
14
- overflow: "auto",
15
- borderRadius: 2,
16
- boxShadow: 3
17
- }),
18
- {
19
- backgroundColor: vars.colorRole.surface.raised,
20
- color: vars.colorRole.text.default,
21
- maxHeight: "90%",
22
- minWidth: "300px",
23
- "::backdrop": {
24
- backgroundColor: vars.colorRole.overlay.default
25
- },
26
- selectors: {
27
- "&[open]": {
28
- transform: "translate(0, 0)",
29
- opacity: 1,
30
- "@starting-style": {
31
- transform: "translate(0, -120px) scale(0.95)",
32
- opacity: 0
33
- }
8
+ dialog: style({
9
+ "@layer": {
10
+ [layers.theme]: {
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ padding: vars.space[5],
14
+ border: "none",
15
+ overflow: "auto",
16
+ borderRadius: vars.borderRadius[2],
17
+ boxShadow: vars.colorRole.shadow[3],
18
+ backgroundColor: vars.colorRole.surface.raised,
19
+ color: vars.colorRole.text.default,
20
+ maxHeight: "90%",
21
+ minWidth: "300px",
22
+ "::backdrop": {
23
+ backgroundColor: vars.colorRole.overlay.default
34
24
  },
35
- "&[open]::backdrop": {
36
- opacity: 1,
37
- "@starting-style": {
38
- opacity: 0
25
+ selectors: {
26
+ "&[open]": {
27
+ transform: "translate(0, 0)",
28
+ opacity: 1,
29
+ "@starting-style": {
30
+ transform: "translate(0, -120px) scale(0.95)",
31
+ opacity: 0
32
+ }
33
+ },
34
+ "&[open]::backdrop": {
35
+ opacity: 1,
36
+ "@starting-style": {
37
+ opacity: 0
38
+ }
39
39
  }
40
- }
41
- },
42
- // Apply the animation only if the user has not requested reduced motion
43
- "@media": {
44
- "(prefers-reduced-motion: no-preference)": {
45
- // Ending style
46
- transform: "translate(0, -120px) scale(0.95)",
47
- opacity: 0,
48
- transitionBehavior: "allow-discrete",
49
- transitionProperty: "opacity, transform, overlay, display",
50
- transitionDuration: "240ms, 160ms, 240ms, 240ms",
51
- "::backdrop": {
40
+ },
41
+ // Apply the animation only if the user has not requested reduced motion
42
+ "@media": {
43
+ "(prefers-reduced-motion: no-preference)": {
44
+ // Ending style
45
+ transform: "translate(0, -120px) scale(0.95)",
52
46
  opacity: 0,
53
47
  transitionBehavior: "allow-discrete",
54
- transitionProperty: "opacity, overlay, display",
55
- transitionDuration: "160ms, 240ms, 240ms"
48
+ transitionProperty: "opacity, transform, overlay, display",
49
+ transitionDuration: "240ms, 160ms, 240ms, 240ms",
50
+ "::backdrop": {
51
+ opacity: 0,
52
+ transitionBehavior: "allow-discrete",
53
+ transitionProperty: "opacity, overlay, display",
54
+ transitionDuration: "160ms, 240ms, 240ms"
55
+ }
56
56
  }
57
57
  }
58
58
  }
59
59
  }
60
- ]),
60
+ }),
61
61
  variants: {
62
62
  size: {
63
63
  small: style({
64
- width: "400px",
65
- maxWidth: "min(400px, 90%)"
64
+ "@layer": {
65
+ [layers.theme]: {
66
+ width: "400px",
67
+ maxWidth: "min(400px, 90%)"
68
+ }
69
+ }
66
70
  }),
67
71
  medium: style({
68
- width: "600px",
69
- maxWidth: "min(600px, 90%)"
72
+ "@layer": {
73
+ [layers.theme]: {
74
+ width: "600px",
75
+ maxWidth: "min(600px, 90%)"
76
+ }
77
+ }
70
78
  }),
71
79
  large: style({
72
- width: "800px",
73
- maxWidth: "min(800px, 90%)"
80
+ "@layer": {
81
+ [layers.theme]: {
82
+ width: "800px",
83
+ maxWidth: "min(800px, 90%)"
84
+ }
85
+ }
74
86
  })
75
87
  }
76
88
  },
@@ -1 +1 @@
1
- {"version":3,"file":"divider.css.d.ts","sourceRoot":"","sources":["../../src/components/divider.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CA+BpD,CAAC"}
1
+ {"version":3,"file":"divider.css.d.ts","sourceRoot":"","sources":["../../src/components/divider.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,OAAO,EAAE,qBAAqB,CAAC,SAAS,CA+CpD,CAAC"}