@blockle/blocks-theme-momotaro 1.0.6 → 2.0.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.
- package/dist/components/button.css.d.ts +2 -1
- package/dist/components/button.css.js +109 -106
- package/dist/components/checkbox.css.d.ts +2 -1
- package/dist/components/checkbox.css.js +49 -46
- package/dist/components/dialog.css.d.ts +2 -1
- package/dist/components/dialog.css.js +67 -64
- package/dist/components/divider.css.d.ts +2 -1
- package/dist/components/divider.css.js +10 -7
- package/dist/components/input.css.d.ts +2 -1
- package/dist/components/input.css.js +39 -36
- package/dist/components/label.css.d.ts +2 -1
- package/dist/components/label.css.js +25 -22
- package/dist/components/link.css.d.ts +2 -1
- package/dist/components/popover.css.d.ts +2 -1
- package/dist/components/popover.css.js +36 -33
- package/dist/components/progress.css.d.ts +2 -1
- package/dist/components/progress.css.js +35 -32
- package/dist/components/radio.css.d.ts +2 -1
- package/dist/components/radio.css.js +48 -45
- package/dist/components/select.css.d.ts +2 -1
- package/dist/components/select.css.js +43 -40
- package/dist/components/slider.css.d.ts +2 -1
- package/dist/components/slider.css.js +76 -73
- package/dist/components/spinner.css.d.ts +2 -1
- package/dist/components/spinner.css.js +29 -26
- package/dist/components/switch.css.d.ts +2 -1
- package/dist/components/switch.css.js +54 -51
- package/dist/components/tooltip.css.d.ts +2 -1
- package/dist/components/tooltip.css.js +23 -20
- package/dist/index.d.ts +1 -1
- package/package.json +5 -11
- package/dist/components/button.css.cjs +0 -126
- package/dist/components/checkbox.css.cjs +0 -62
- package/dist/components/dialog.css.cjs +0 -81
- package/dist/components/divider.css.cjs +0 -16
- package/dist/components/helpers.css.cjs +0 -47
- package/dist/components/index.cjs +0 -35
- package/dist/components/input.css.cjs +0 -46
- package/dist/components/label.css.cjs +0 -33
- package/dist/components/link.css.cjs +0 -56
- package/dist/components/popover.css.cjs +0 -45
- package/dist/components/progress.css.cjs +0 -57
- package/dist/components/radio.css.cjs +0 -63
- package/dist/components/select.css.cjs +0 -53
- package/dist/components/slider.css.cjs +0 -95
- package/dist/components/spinner.css.cjs +0 -44
- package/dist/components/switch.css.cjs +0 -66
- package/dist/components/tooltip.css.cjs +0 -30
- package/dist/components/transitions.cjs +0 -4
- package/dist/index.cjs +0 -4
- package/dist/theme.css.cjs +0 -14
- package/dist/tokens.css.cjs +0 -86
|
@@ -4,62 +4,65 @@ import { style, createVar } from "@vanilla-extract/css";
|
|
|
4
4
|
import { focusable } from "./helpers.css.js";
|
|
5
5
|
setFileScope("src/components/switch.css.ts", "@blockle/blocks-theme-momotaro");
|
|
6
6
|
const activeScaleFactor = createVar();
|
|
7
|
-
const switchTheme = makeComponentTheme(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
":active": {
|
|
7
|
+
const switchTheme = makeComponentTheme(
|
|
8
|
+
"switch",
|
|
9
|
+
{
|
|
10
|
+
base: style([
|
|
11
|
+
atoms({
|
|
12
|
+
borderRadius: "xlarge",
|
|
13
|
+
backgroundColor: "textLight"
|
|
14
|
+
}),
|
|
15
|
+
{
|
|
16
|
+
width: 52,
|
|
17
|
+
height: 32,
|
|
18
|
+
"@media": {
|
|
19
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
20
|
+
transition: `background-color 120ms linear, box-shadow ${vars.transition.fast}`
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
selectors: {
|
|
24
|
+
'&[data-checked="true"]': {
|
|
25
|
+
backgroundColor: vars.color.secondary
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
// Scale the switch when it's `:active`
|
|
31
29
|
vars: {
|
|
32
|
-
[activeScaleFactor]: "
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
slider: style([
|
|
39
|
-
atoms({
|
|
40
|
-
borderRadius: "xlarge"
|
|
41
|
-
}),
|
|
42
|
-
{
|
|
43
|
-
width: 24,
|
|
44
|
-
height: 24,
|
|
45
|
-
top: 4,
|
|
46
|
-
left: 4,
|
|
47
|
-
transform: `translateX(0) scale(calc(0.9 * ${activeScaleFactor}))`,
|
|
48
|
-
position: "absolute",
|
|
49
|
-
backgroundColor: "white",
|
|
50
|
-
selectors: {
|
|
51
|
-
'&[data-checked="true"]': {
|
|
52
|
-
transform: `translateX(20px) scale(${activeScaleFactor})`
|
|
30
|
+
[activeScaleFactor]: "1"
|
|
31
|
+
},
|
|
32
|
+
":active": {
|
|
33
|
+
vars: {
|
|
34
|
+
[activeScaleFactor]: "0.96"
|
|
35
|
+
}
|
|
53
36
|
}
|
|
54
37
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
focusable
|
|
39
|
+
]),
|
|
40
|
+
slider: style([
|
|
41
|
+
atoms({
|
|
42
|
+
borderRadius: "xlarge"
|
|
43
|
+
}),
|
|
44
|
+
{
|
|
45
|
+
width: 24,
|
|
46
|
+
height: 24,
|
|
47
|
+
top: 4,
|
|
48
|
+
left: 4,
|
|
49
|
+
transform: `translateX(0) scale(calc(0.9 * ${activeScaleFactor}))`,
|
|
50
|
+
position: "absolute",
|
|
51
|
+
backgroundColor: "white",
|
|
52
|
+
selectors: {
|
|
53
|
+
'&[data-checked="true"]': {
|
|
54
|
+
transform: `translateX(20px) scale(${activeScaleFactor})`
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"@media": {
|
|
58
|
+
"(prefers-reduced-motion: no-preference)": {
|
|
59
|
+
transition: "transform 120ms ease-out"
|
|
60
|
+
}
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
])
|
|
64
|
+
}
|
|
65
|
+
);
|
|
63
66
|
endFileScope();
|
|
64
67
|
export {
|
|
65
68
|
switchTheme
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ThemeComponentsStyles } from '@blockle/blocks-core';
|
|
2
|
+
export declare const tooltip: ThemeComponentsStyles['tooltip'];
|
|
@@ -2,28 +2,31 @@ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
|
2
2
|
import { makeComponentTheme, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/tooltip.css.ts", "@blockle/blocks-theme-momotaro");
|
|
5
|
-
const tooltip = makeComponentTheme(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
const tooltip = makeComponentTheme(
|
|
6
|
+
"tooltip",
|
|
7
|
+
{
|
|
8
|
+
base: atoms({
|
|
9
|
+
padding: "small"
|
|
10
|
+
}),
|
|
11
|
+
variants: {
|
|
12
|
+
colorScheme: {
|
|
13
|
+
primary: style({
|
|
14
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
15
|
+
boxShadow: "0 0 0 1px rgba(255, 255, 255, 0.1)",
|
|
16
|
+
color: "white"
|
|
17
|
+
}),
|
|
18
|
+
secondary: style({
|
|
19
|
+
backgroundColor: "rgba(255, 255, 255, 0.8)",
|
|
20
|
+
boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)",
|
|
21
|
+
color: "black"
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
colorScheme: "primary"
|
|
21
27
|
}
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
colorScheme: "primary"
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
);
|
|
27
30
|
endFileScope();
|
|
28
31
|
export {
|
|
29
32
|
tooltip
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { momotaro } from './theme.css';
|
|
1
|
+
export { momotaro } from './theme.css.js';
|
package/package.json
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks-theme-momotaro",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Momotaro theme for Blocks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"types":
|
|
10
|
-
|
|
11
|
-
"require": "./dist/index.d.ts"
|
|
12
|
-
},
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"require": "./dist/index.cjs"
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
15
11
|
}
|
|
16
12
|
},
|
|
17
13
|
"files": [
|
|
18
14
|
"dist"
|
|
19
15
|
],
|
|
20
|
-
"main": "./dist/index.cjs",
|
|
21
|
-
"module": "./dist/index.mjs",
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
16
|
"scripts": {
|
|
24
17
|
"build": "vite build",
|
|
25
18
|
"test": "vitest ",
|
|
@@ -41,6 +34,7 @@
|
|
|
41
34
|
"@vanilla-extract/css": "^1.17.1"
|
|
42
35
|
},
|
|
43
36
|
"peerDependencies": {
|
|
44
|
-
"@blockle/blocks-core": "
|
|
37
|
+
"@blockle/blocks-core": "^0.22.0",
|
|
38
|
+
"@vanilla-extract/css": ">= 1.17.1"
|
|
45
39
|
}
|
|
46
40
|
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const css = require("@vanilla-extract/css");
|
|
5
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
6
|
-
const helpers_css = require("./helpers.css.cjs");
|
|
7
|
-
fileScope.setFileScope("src/components/button.css.ts", "@blockle/blocks-theme-momotaro");
|
|
8
|
-
const intentColor = css.createVar();
|
|
9
|
-
const hoverBackgroundColor = css.createVar();
|
|
10
|
-
const button = blocksCore.makeComponentTheme("button", {
|
|
11
|
-
base: css.style([
|
|
12
|
-
blocksCore.atoms({
|
|
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
|
-
}),
|
|
21
|
-
{
|
|
22
|
-
selectors: {
|
|
23
|
-
"&:hover:not(:disabled)": {
|
|
24
|
-
backgroundColor: hoverBackgroundColor
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
helpers_css.clickable
|
|
29
|
-
]),
|
|
30
|
-
variants: {
|
|
31
|
-
variant: {
|
|
32
|
-
solid: css.style({
|
|
33
|
-
color: blocksCore.vars.color.white,
|
|
34
|
-
backgroundColor: intentColor,
|
|
35
|
-
border: "none"
|
|
36
|
-
}),
|
|
37
|
-
outline: css.style([
|
|
38
|
-
blocksCore.atoms({
|
|
39
|
-
borderWidth: "small"
|
|
40
|
-
}),
|
|
41
|
-
{
|
|
42
|
-
color: intentColor,
|
|
43
|
-
borderStyle: "solid",
|
|
44
|
-
borderColor: intentColor,
|
|
45
|
-
background: "transparent"
|
|
46
|
-
}
|
|
47
|
-
]),
|
|
48
|
-
ghost: css.style({
|
|
49
|
-
color: intentColor,
|
|
50
|
-
background: "transparent"
|
|
51
|
-
})
|
|
52
|
-
},
|
|
53
|
-
size: {
|
|
54
|
-
small: css.style([
|
|
55
|
-
blocksCore.atoms({
|
|
56
|
-
paddingInline: "large"
|
|
57
|
-
}),
|
|
58
|
-
{
|
|
59
|
-
height: 40
|
|
60
|
-
}
|
|
61
|
-
]),
|
|
62
|
-
medium: css.style([
|
|
63
|
-
blocksCore.atoms({
|
|
64
|
-
paddingInline: "xlarge"
|
|
65
|
-
}),
|
|
66
|
-
{
|
|
67
|
-
height: 56
|
|
68
|
-
}
|
|
69
|
-
]),
|
|
70
|
-
large: css.style([
|
|
71
|
-
blocksCore.atoms({
|
|
72
|
-
paddingInline: "xlarge"
|
|
73
|
-
}),
|
|
74
|
-
{
|
|
75
|
-
height: 72
|
|
76
|
-
}
|
|
77
|
-
])
|
|
78
|
-
},
|
|
79
|
-
intent: {
|
|
80
|
-
neutral: css.style({
|
|
81
|
-
vars: {
|
|
82
|
-
[intentColor]: blocksCore.vars.color.primary,
|
|
83
|
-
[hoverBackgroundColor]: blocksCore.vars.color.primaryLight
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
danger: css.style({
|
|
87
|
-
vars: {
|
|
88
|
-
[intentColor]: blocksCore.vars.color.danger,
|
|
89
|
-
[hoverBackgroundColor]: "#fff8f7",
|
|
90
|
-
[helpers_css.focusRingColor]: blocksCore.vars.color.danger
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
compoundVariants: [
|
|
96
|
-
{
|
|
97
|
-
variants: {
|
|
98
|
-
variant: "solid",
|
|
99
|
-
intent: "neutral"
|
|
100
|
-
},
|
|
101
|
-
style: css.style({
|
|
102
|
-
vars: {
|
|
103
|
-
[hoverBackgroundColor]: blocksCore.vars.color.primaryDark
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
variants: {
|
|
109
|
-
variant: "solid",
|
|
110
|
-
intent: "danger"
|
|
111
|
-
},
|
|
112
|
-
style: css.style({
|
|
113
|
-
vars: {
|
|
114
|
-
[hoverBackgroundColor]: "#f9b1a9"
|
|
115
|
-
}
|
|
116
|
-
})
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
defaultVariants: {
|
|
120
|
-
size: "small",
|
|
121
|
-
variant: "solid",
|
|
122
|
-
intent: "neutral"
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
fileScope.endFileScope();
|
|
126
|
-
exports.button = button;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
const helpers_css = require("./helpers.css.cjs");
|
|
7
|
-
const transitions = require("./transitions.cjs");
|
|
8
|
-
fileScope.setFileScope("src/components/checkbox.css.ts", "@blockle/blocks-theme-momotaro");
|
|
9
|
-
const checkbox = blocksCore.makeComponentTheme("checkbox", {
|
|
10
|
-
base: css.style([
|
|
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 ${blocksCore.vars.transition.normal}, box-shadow ${blocksCore.vars.transition.fast}`
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
selectors: {
|
|
23
|
-
"&:hover:not(:has(input:disabled))": {
|
|
24
|
-
backgroundColor: blocksCore.vars.color.primaryDark
|
|
25
|
-
},
|
|
26
|
-
"&:has(input:checked)": {
|
|
27
|
-
backgroundColor: blocksCore.vars.color.primary
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
blocksCore.atoms({
|
|
32
|
-
backgroundColor: "primaryLight",
|
|
33
|
-
borderRadius: "small"
|
|
34
|
-
}),
|
|
35
|
-
helpers_css.focusable
|
|
36
|
-
]),
|
|
37
|
-
icon: css.style({
|
|
38
|
-
inlineSize: "1rem",
|
|
39
|
-
blockSize: "1rem",
|
|
40
|
-
color: "white",
|
|
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 ${blocksCore.vars.transition.normal} ${transitions.bounceOut}`
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}),
|
|
53
|
-
label: blocksCore.atoms({
|
|
54
|
-
display: "flex",
|
|
55
|
-
flexDirection: "row",
|
|
56
|
-
padding: "xsmall",
|
|
57
|
-
gap: "medium",
|
|
58
|
-
cursor: "pointer"
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
fileScope.endFileScope();
|
|
62
|
-
exports.checkbox = checkbox;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
fileScope.setFileScope("src/components/dialog.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const dialog = blocksCore.makeComponentTheme("dialog", {
|
|
8
|
-
dialog: css.style([
|
|
9
|
-
blocksCore.atoms({
|
|
10
|
-
display: "flex",
|
|
11
|
-
flexDirection: "column",
|
|
12
|
-
padding: "gutter",
|
|
13
|
-
border: "none",
|
|
14
|
-
overflow: "auto",
|
|
15
|
-
borderRadius: "medium",
|
|
16
|
-
boxShadow: "large"
|
|
17
|
-
}),
|
|
18
|
-
{
|
|
19
|
-
maxHeight: "90%",
|
|
20
|
-
minWidth: "300px",
|
|
21
|
-
"::backdrop": {
|
|
22
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
23
|
-
},
|
|
24
|
-
selectors: {
|
|
25
|
-
"&[open]": {
|
|
26
|
-
transform: "translate(0, 0)",
|
|
27
|
-
opacity: 1,
|
|
28
|
-
// @ts-expect-error - Vanilla Extract does not support @starting-style (yet)
|
|
29
|
-
"@starting-style": {
|
|
30
|
-
transform: "translate(0, -120px)",
|
|
31
|
-
opacity: 0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"&[open]::backdrop": {
|
|
35
|
-
opacity: 1,
|
|
36
|
-
"@starting-style": {
|
|
37
|
-
opacity: 0
|
|
38
|
-
}
|
|
39
|
-
}
|
|
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)",
|
|
46
|
-
opacity: 0,
|
|
47
|
-
transitionBehavior: "allow-discrete",
|
|
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
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
]),
|
|
60
|
-
variants: {
|
|
61
|
-
size: {
|
|
62
|
-
small: css.style({
|
|
63
|
-
width: "400px",
|
|
64
|
-
maxWidth: "min(400px, 90%)"
|
|
65
|
-
}),
|
|
66
|
-
medium: css.style({
|
|
67
|
-
width: "600px",
|
|
68
|
-
maxWidth: "min(600px, 90%)"
|
|
69
|
-
}),
|
|
70
|
-
large: css.style({
|
|
71
|
-
width: "800px",
|
|
72
|
-
maxWidth: "min(800px, 90%)"
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
size: "small"
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
fileScope.endFileScope();
|
|
81
|
-
exports.dialog = dialog;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
fileScope.setFileScope("src/components/divider.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const divider = blocksCore.makeComponentTheme("divider", {
|
|
8
|
-
base: css.style({
|
|
9
|
-
blockSize: 1
|
|
10
|
-
}),
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
color: "textLight"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
fileScope.endFileScope();
|
|
16
|
-
exports.divider = divider;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
fileScope.setFileScope("src/components/helpers.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const focusRingColor = css.createVar();
|
|
8
|
-
const focusable = css.style({
|
|
9
|
-
"@media": {
|
|
10
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
11
|
-
transition: `box-shadow ${blocksCore.vars.transition.fast}`
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
":focus-visible": {
|
|
15
|
-
outline: "2px solid transparent",
|
|
16
|
-
outlineOffset: "2px",
|
|
17
|
-
boxShadow: `0 0 1px 2px ${css.fallbackVar(focusRingColor, "#AF8EFF")}`
|
|
18
|
-
},
|
|
19
|
-
selectors: {
|
|
20
|
-
"&:disabled, &[disabled]": {
|
|
21
|
-
opacity: 0.5,
|
|
22
|
-
cursor: "auto",
|
|
23
|
-
pointerEvents: "none"
|
|
24
|
-
},
|
|
25
|
-
"&:has(input:focus-visible)": {
|
|
26
|
-
outline: "2px solid transparent",
|
|
27
|
-
outlineOffset: "2px",
|
|
28
|
-
boxShadow: blocksCore.vars.focus.boxShadow
|
|
29
|
-
},
|
|
30
|
-
"&:has(input:disabled)": {
|
|
31
|
-
opacity: 0.5,
|
|
32
|
-
cursor: "auto"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
const clickable = css.style([
|
|
37
|
-
focusable,
|
|
38
|
-
{
|
|
39
|
-
":active": {
|
|
40
|
-
transform: "scale(0.975)"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
]);
|
|
44
|
-
fileScope.endFileScope();
|
|
45
|
-
exports.clickable = clickable;
|
|
46
|
-
exports.focusRingColor = focusRingColor;
|
|
47
|
-
exports.focusable = focusable;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const button_css = require("./button.css.cjs");
|
|
4
|
-
const checkbox_css = require("./checkbox.css.cjs");
|
|
5
|
-
const dialog_css = require("./dialog.css.cjs");
|
|
6
|
-
const divider_css = require("./divider.css.cjs");
|
|
7
|
-
const input_css = require("./input.css.cjs");
|
|
8
|
-
const label_css = require("./label.css.cjs");
|
|
9
|
-
const link_css = require("./link.css.cjs");
|
|
10
|
-
const popover_css = require("./popover.css.cjs");
|
|
11
|
-
const progress_css = require("./progress.css.cjs");
|
|
12
|
-
const radio_css = require("./radio.css.cjs");
|
|
13
|
-
const select_css = require("./select.css.cjs");
|
|
14
|
-
const slider_css = require("./slider.css.cjs");
|
|
15
|
-
const spinner_css = require("./spinner.css.cjs");
|
|
16
|
-
const switch_css = require("./switch.css.cjs");
|
|
17
|
-
const tooltip_css = require("./tooltip.css.cjs");
|
|
18
|
-
const components = {
|
|
19
|
-
button: button_css.button,
|
|
20
|
-
checkbox: checkbox_css.checkbox,
|
|
21
|
-
dialog: dialog_css.dialog,
|
|
22
|
-
divider: divider_css.divider,
|
|
23
|
-
input: input_css.input,
|
|
24
|
-
label: label_css.label,
|
|
25
|
-
link: link_css.link,
|
|
26
|
-
popover: popover_css.popover,
|
|
27
|
-
progress: progress_css.progress,
|
|
28
|
-
radio: radio_css.radio,
|
|
29
|
-
select: select_css.select,
|
|
30
|
-
slider: slider_css.slider,
|
|
31
|
-
spinner: spinner_css.spinner,
|
|
32
|
-
switch: switch_css.switchTheme,
|
|
33
|
-
tooltip: tooltip_css.tooltip
|
|
34
|
-
};
|
|
35
|
-
exports.components = components;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
fileScope.setFileScope("src/components/input.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const input = blocksCore.makeComponentTheme("input", {
|
|
8
|
-
input: css.style([
|
|
9
|
-
blocksCore.atoms({
|
|
10
|
-
color: "text",
|
|
11
|
-
padding: "large",
|
|
12
|
-
border: "none",
|
|
13
|
-
borderRadius: "small"
|
|
14
|
-
}),
|
|
15
|
-
{
|
|
16
|
-
outline: "none",
|
|
17
|
-
background: "transparent",
|
|
18
|
-
"::placeholder": {
|
|
19
|
-
color: blocksCore.vars.color.textLight
|
|
20
|
-
},
|
|
21
|
-
":disabled": {}
|
|
22
|
-
}
|
|
23
|
-
]),
|
|
24
|
-
container: css.style([
|
|
25
|
-
{
|
|
26
|
-
minHeight: 56,
|
|
27
|
-
"@media": {
|
|
28
|
-
"(prefers-reduced-motion: no-preference)": {
|
|
29
|
-
transition: `box-shadow ${blocksCore.vars.transition.fast}`
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
":focus-within": {
|
|
33
|
-
outline: "2px solid transparent",
|
|
34
|
-
outlineOffset: "2px",
|
|
35
|
-
boxShadow: `${blocksCore.vars.shadow.small}, ${blocksCore.vars.focus.boxShadow}`
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
blocksCore.atoms({
|
|
39
|
-
backgroundColor: "white",
|
|
40
|
-
borderRadius: "medium",
|
|
41
|
-
boxShadow: "medium"
|
|
42
|
-
})
|
|
43
|
-
])
|
|
44
|
-
});
|
|
45
|
-
fileScope.endFileScope();
|
|
46
|
-
exports.input = input;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
4
|
-
const blocksCore = require("@blockle/blocks-core");
|
|
5
|
-
const css = require("@vanilla-extract/css");
|
|
6
|
-
fileScope.setFileScope("src/components/label.css.ts", "@blockle/blocks-theme-momotaro");
|
|
7
|
-
const label = blocksCore.makeComponentTheme("label", {
|
|
8
|
-
base: css.style({}),
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
small: css.style({
|
|
12
|
-
fontSize: blocksCore.vars.fontSize.xsmall
|
|
13
|
-
}),
|
|
14
|
-
medium: css.style({
|
|
15
|
-
fontSize: blocksCore.vars.fontSize.small
|
|
16
|
-
}),
|
|
17
|
-
large: css.style({
|
|
18
|
-
fontSize: blocksCore.vars.fontSize.medium
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
required: css.style({
|
|
22
|
-
":after": {
|
|
23
|
-
content: '"*"',
|
|
24
|
-
marginLeft: blocksCore.vars.space.xsmall
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
size: "large"
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
fileScope.endFileScope();
|
|
33
|
-
exports.label = label;
|