@blockle/blocks 0.8.10 → 0.9.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/index.cjs +4 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -2
- package/dist/momotaro.chunk.d.ts +328 -302
- package/dist/styles/components/display/Divider/divider.css.cjs +1 -1
- package/dist/styles/components/display/Divider/divider.css.mjs +1 -1
- package/dist/styles/components/form/Checkbox/Checkbox.cjs +17 -1
- package/dist/styles/components/form/Checkbox/Checkbox.mjs +17 -1
- package/dist/styles/components/form/Select/Select.cjs +40 -0
- package/dist/styles/components/form/Select/Select.mjs +41 -0
- package/dist/styles/components/form/Select/select.css.cjs +37 -0
- package/dist/styles/components/form/Select/select.css.mjs +38 -0
- package/dist/styles/components/form/Switch/switch.css.cjs +2 -2
- package/dist/styles/components/form/Switch/switch.css.mjs +2 -2
- package/dist/styles/components/overlay/Dialog/dialog.css.cjs +4 -4
- package/dist/styles/components/overlay/Dialog/dialog.css.mjs +4 -4
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +28 -22
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +28 -22
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +4 -7
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +4 -7
- package/dist/styles/themes/momotaro/components/button.css.cjs +3 -3
- package/dist/styles/themes/momotaro/components/button.css.mjs +3 -3
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +18 -12
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +18 -12
- package/dist/styles/themes/momotaro/components/dialog.css.cjs +7 -7
- package/dist/styles/themes/momotaro/components/dialog.css.mjs +7 -7
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +7 -6
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +7 -6
- package/dist/styles/themes/momotaro/components/index.cjs +3 -1
- package/dist/styles/themes/momotaro/components/index.mjs +3 -1
- package/dist/styles/themes/momotaro/components/input.css.cjs +6 -4
- package/dist/styles/themes/momotaro/components/input.css.mjs +6 -4
- package/dist/styles/themes/momotaro/components/progress.css.cjs +1 -1
- package/dist/styles/themes/momotaro/components/progress.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/radio.css.cjs +12 -5
- package/dist/styles/themes/momotaro/components/radio.css.mjs +12 -5
- package/dist/styles/themes/momotaro/components/select.css.cjs +35 -0
- package/dist/styles/themes/momotaro/components/select.css.mjs +36 -0
- package/dist/styles/themes/momotaro/components/switch.css.cjs +1 -1
- package/dist/styles/themes/momotaro/components/switch.css.mjs +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ const Checkbox = react.forwardRef(function Checkbox2({ name, label, required, cl
|
|
|
33
33
|
const labelClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { label: true }, false);
|
|
34
34
|
const input = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Checkbox_checkbox_css_cjs.container, containerClassName, className), children: [
|
|
35
35
|
/* @__PURE__ */ jsxRuntime.jsx("input", { ref, type: "checkbox", name, className: styles_components_form_Checkbox_checkbox_css_cjs.input, ...restProps }),
|
|
36
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Checkbox_checkbox_css_cjs.icon, iconClassName) })
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Checkbox_checkbox_css_cjs.icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
37
37
|
] });
|
|
38
38
|
if (!label) {
|
|
39
39
|
return input;
|
|
@@ -43,5 +43,21 @@ const Checkbox = react.forwardRef(function Checkbox2({ name, label, required, cl
|
|
|
43
43
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { asSpan: true, required, children: label })
|
|
44
44
|
] });
|
|
45
45
|
});
|
|
46
|
+
const DefaultIcon = () => {
|
|
47
|
+
return (
|
|
48
|
+
// TOOD - replace with actual icon component renderer
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
50
|
+
"svg",
|
|
51
|
+
{
|
|
52
|
+
viewBox: "0 0 24 24",
|
|
53
|
+
fill: "none",
|
|
54
|
+
strokeWidth: "1.5",
|
|
55
|
+
stroke: "currentColor",
|
|
56
|
+
style: { width: "1rem", height: "1rem", display: "block" },
|
|
57
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 12.75 6 6 9-13.5" })
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
};
|
|
46
62
|
exports.Checkbox = Checkbox;
|
|
47
63
|
exports.Label = Label;
|
|
@@ -32,7 +32,7 @@ const Checkbox = forwardRef(function Checkbox2({ name, label, required, classNam
|
|
|
32
32
|
const labelClassName = useComponentStyles("checkbox", { label: true }, false);
|
|
33
33
|
const input$1 = /* @__PURE__ */ jsxs("div", { className: classnames(container, containerClassName, className), children: [
|
|
34
34
|
/* @__PURE__ */ jsx("input", { ref, type: "checkbox", name, className: input, ...restProps }),
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName) })
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
36
36
|
] });
|
|
37
37
|
if (!label) {
|
|
38
38
|
return input$1;
|
|
@@ -42,6 +42,22 @@ const Checkbox = forwardRef(function Checkbox2({ name, label, required, classNam
|
|
|
42
42
|
label && /* @__PURE__ */ jsx(Label, { asSpan: true, required, children: label })
|
|
43
43
|
] });
|
|
44
44
|
});
|
|
45
|
+
const DefaultIcon = () => {
|
|
46
|
+
return (
|
|
47
|
+
// TOOD - replace with actual icon component renderer
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
strokeWidth: "1.5",
|
|
54
|
+
stroke: "currentColor",
|
|
55
|
+
style: { width: "1rem", height: "1rem", display: "block" },
|
|
56
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 12.75 6 6 9-13.5" })
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
};
|
|
45
61
|
export {
|
|
46
62
|
Checkbox,
|
|
47
63
|
Label
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
|
|
5
|
+
const styles_components_form_Select_select_css_cjs = require("./select.css.cjs");
|
|
6
|
+
const Select = react.forwardRef(function Select2({ children, placeholder, className, ...restProps }, ref) {
|
|
7
|
+
const wrapperClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { wrapper: true }, false);
|
|
8
|
+
const selectClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { select: true });
|
|
9
|
+
const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { icon: true }, false);
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(styles_components_display_Divider_Divider_cjs.Box, { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Select_select_css_cjs.wrapper, wrapperClassName), children: [
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12
|
+
"select",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Select_select_css_cjs.select, selectClassName, className),
|
|
16
|
+
...restProps,
|
|
17
|
+
children: [
|
|
18
|
+
placeholder && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: placeholder }),
|
|
19
|
+
children
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Select_select_css_cjs.icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
24
|
+
] });
|
|
25
|
+
});
|
|
26
|
+
const DefaultIcon = () => {
|
|
27
|
+
return (
|
|
28
|
+
// TOOD - replace with actual icon component renderer
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", style: { width: "1rem", height: "1rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
fill: "currentColor",
|
|
33
|
+
fillRule: "evenodd",
|
|
34
|
+
d: "m11.625 14.3666 7.9365-7.653c.5241-.5055 1.3133-.4372 1.7625.1525.4493.5897.3886 1.4774-.1355 1.9829l-8.75 8.4375c-.4681.4513-1.1589.4513-1.627 0l-8.75-8.4375c-.5241-.5055-.5848-1.3932-.1356-1.9829.4493-.5897 1.2385-.658 1.7626-.1525l7.9365 7.653Z",
|
|
35
|
+
clipRule: "evenodd"
|
|
36
|
+
}
|
|
37
|
+
) })
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
exports.Select = Select;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useComponentStyles, Box, classnames } from "../../display/Divider/Divider.mjs";
|
|
4
|
+
import { wrapper, select, icon } from "./select.css.mjs";
|
|
5
|
+
const Select = forwardRef(function Select2({ children, placeholder, className, ...restProps }, ref) {
|
|
6
|
+
const wrapperClassName = useComponentStyles("select", { wrapper: true }, false);
|
|
7
|
+
const selectClassName = useComponentStyles("select", { select: true });
|
|
8
|
+
const iconClassName = useComponentStyles("select", { icon: true }, false);
|
|
9
|
+
return /* @__PURE__ */ jsxs(Box, { className: classnames(wrapper, wrapperClassName), children: [
|
|
10
|
+
/* @__PURE__ */ jsxs(
|
|
11
|
+
"select",
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
className: classnames(select, selectClassName, className),
|
|
15
|
+
...restProps,
|
|
16
|
+
children: [
|
|
17
|
+
placeholder && /* @__PURE__ */ jsx("option", { value: "", children: placeholder }),
|
|
18
|
+
children
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ jsx(Box, { className: classnames(icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
23
|
+
] });
|
|
24
|
+
});
|
|
25
|
+
const DefaultIcon = () => {
|
|
26
|
+
return (
|
|
27
|
+
// TOOD - replace with actual icon component renderer
|
|
28
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", style: { width: "1rem", height: "1rem" }, children: /* @__PURE__ */ jsx(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
fill: "currentColor",
|
|
32
|
+
fillRule: "evenodd",
|
|
33
|
+
d: "m11.625 14.3666 7.9365-7.653c.5241-.5055 1.3133-.4372 1.7625.1525.4493.5897.3886 1.4774-.1355 1.9829l-8.75 8.4375c-.4681.4513-1.1589.4513-1.627 0l-8.75-8.4375c-.5241-.5055-.5848-1.3932-.1356-1.9829.4493-.5897 1.2385-.658 1.7626-.1525l7.9365 7.653Z",
|
|
34
|
+
clipRule: "evenodd"
|
|
35
|
+
}
|
|
36
|
+
) })
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
Select
|
|
41
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Select/select.css.ts", "blocks");
|
|
6
|
+
const wrapper = css.style({
|
|
7
|
+
"@layer": {
|
|
8
|
+
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
+
position: "relative"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}, "wrapper");
|
|
13
|
+
const select = css.style({
|
|
14
|
+
"@layer": {
|
|
15
|
+
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
16
|
+
appearance: "none",
|
|
17
|
+
inlineSize: "100%"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, "select");
|
|
21
|
+
const icon = css.style({
|
|
22
|
+
"@layer": {
|
|
23
|
+
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
24
|
+
position: "absolute",
|
|
25
|
+
right: 0,
|
|
26
|
+
top: 0,
|
|
27
|
+
bottom: 0,
|
|
28
|
+
pointerEvents: "none",
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, "icon");
|
|
34
|
+
fileScope.endFileScope();
|
|
35
|
+
exports.icon = icon;
|
|
36
|
+
exports.select = select;
|
|
37
|
+
exports.wrapper = wrapper;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { blocksLayer } from "../../../lib/css/layers/layers.css.mjs";
|
|
4
|
+
setFileScope("src/components/form/Select/select.css.ts", "blocks");
|
|
5
|
+
const wrapper = style({
|
|
6
|
+
"@layer": {
|
|
7
|
+
[blocksLayer]: {
|
|
8
|
+
position: "relative"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}, "wrapper");
|
|
12
|
+
const select = style({
|
|
13
|
+
"@layer": {
|
|
14
|
+
[blocksLayer]: {
|
|
15
|
+
appearance: "none",
|
|
16
|
+
inlineSize: "100%"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, "select");
|
|
20
|
+
const icon = style({
|
|
21
|
+
"@layer": {
|
|
22
|
+
[blocksLayer]: {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
right: 0,
|
|
25
|
+
top: 0,
|
|
26
|
+
bottom: 0,
|
|
27
|
+
pointerEvents: "none",
|
|
28
|
+
display: "flex",
|
|
29
|
+
alignItems: "center"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, "icon");
|
|
33
|
+
endFileScope();
|
|
34
|
+
export {
|
|
35
|
+
icon,
|
|
36
|
+
select,
|
|
37
|
+
wrapper
|
|
38
|
+
};
|
|
@@ -10,10 +10,10 @@ const backdrop = css.style({
|
|
|
10
10
|
display: "flex",
|
|
11
11
|
placeItems: "center",
|
|
12
12
|
position: "fixed",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
inlineSize: "100%",
|
|
14
|
+
blockSize: "100%",
|
|
15
|
+
insetInlineStart: 0,
|
|
16
|
+
insetBlockStart: 0,
|
|
17
17
|
overflow: "hidden",
|
|
18
18
|
zIndex: 1e3
|
|
19
19
|
}
|
|
@@ -9,10 +9,10 @@ const backdrop = style({
|
|
|
9
9
|
display: "flex",
|
|
10
10
|
placeItems: "center",
|
|
11
11
|
position: "fixed",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
inlineSize: "100%",
|
|
13
|
+
blockSize: "100%",
|
|
14
|
+
insetInlineStart: 0,
|
|
15
|
+
insetBlockStart: 0,
|
|
16
16
|
overflow: "hidden",
|
|
17
17
|
zIndex: 1e3
|
|
18
18
|
}
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const styles_lib_theme_vars_css_cjs = require("../../theme/vars.css.cjs");
|
|
3
|
-
const
|
|
3
|
+
const colorsWithCurrentColor = { ...styles_lib_theme_vars_css_cjs.vars.color, currentColor: "currentColor" };
|
|
4
|
+
const size = { auto: "auto", full: "100%", "fit-content": "fit-content" };
|
|
4
5
|
const unresponsiveProperties = {
|
|
5
|
-
backgroundColor:
|
|
6
|
-
borderColor:
|
|
6
|
+
backgroundColor: colorsWithCurrentColor,
|
|
7
|
+
borderColor: colorsWithCurrentColor,
|
|
7
8
|
borderRadius: styles_lib_theme_vars_css_cjs.vars.borderRadius,
|
|
8
9
|
borderWidth: styles_lib_theme_vars_css_cjs.vars.borderWidth,
|
|
9
10
|
border: ["none"],
|
|
10
|
-
|
|
11
|
+
insetBlock: [0],
|
|
12
|
+
insetBlockStart: [0],
|
|
13
|
+
insetBlockEnd: [0],
|
|
14
|
+
insetInline: [0],
|
|
15
|
+
insetInlineStart: [0],
|
|
16
|
+
insetInlineEnd: [0],
|
|
11
17
|
boxShadow: styles_lib_theme_vars_css_cjs.vars.shadow,
|
|
12
|
-
color:
|
|
18
|
+
color: colorsWithCurrentColor,
|
|
13
19
|
cursor: ["auto", "pointer"],
|
|
14
20
|
fontFamily: styles_lib_theme_vars_css_cjs.vars.fontFamily,
|
|
15
21
|
fontStyle: ["normal", "italic", "oblique"],
|
|
16
22
|
fontWeight: styles_lib_theme_vars_css_cjs.vars.fontWeight,
|
|
17
|
-
height: { auto: "auto", full: "100%" },
|
|
18
|
-
left: [0],
|
|
19
23
|
lineHeight: styles_lib_theme_vars_css_cjs.vars.lineHeight,
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
blockSize: size,
|
|
25
|
+
maxBlockSize: size,
|
|
26
|
+
inlineSize: size,
|
|
27
|
+
maxInlineSize: size,
|
|
22
28
|
opacity: [0, 1],
|
|
23
29
|
overflow: ["hidden", "scroll", "visible", "auto"],
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
overflowBlock: ["hidden", "scroll", "visible", "auto"],
|
|
31
|
+
overflowInline: ["hidden", "scroll", "visible", "auto"],
|
|
26
32
|
pointerEvents: ["none"],
|
|
27
|
-
right: [0],
|
|
28
33
|
textDecoration: ["overline", "line-through", "underline", "none"],
|
|
29
34
|
textTransform: ["lowercase", "uppercase", "capitalize"],
|
|
30
35
|
textWrap: ["balance", "wrap"],
|
|
31
|
-
top: [0],
|
|
32
36
|
transition: styles_lib_theme_vars_css_cjs.vars.transition,
|
|
33
37
|
userSelect: ["none"],
|
|
34
38
|
whiteSpace: ["nowrap", "pre", "pre-line", "pre-wrap"],
|
|
35
|
-
width: { auto: "auto", full: "100%", "fit-content": "fit-content" },
|
|
36
39
|
wordBreak: ["break-word"],
|
|
37
40
|
wordWrap: ["break-word"]
|
|
38
41
|
};
|
|
@@ -60,15 +63,18 @@ const responsiveProperties = {
|
|
|
60
63
|
fontSize: styles_lib_theme_vars_css_cjs.vars.fontSize,
|
|
61
64
|
gap: styles_lib_theme_vars_css_cjs.vars.space,
|
|
62
65
|
justifyContent: ["flex-start", "flex-end", "center", "space-between", "space-around"],
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
marginBlockStart: marginSpace,
|
|
67
|
+
marginBlockEnd: marginSpace,
|
|
68
|
+
marginInlineStart: marginSpace,
|
|
69
|
+
marginInlineEnd: marginSpace,
|
|
67
70
|
outline: ["none"],
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
padding: styles_lib_theme_vars_css_cjs.vars.space,
|
|
72
|
+
paddingBlock: styles_lib_theme_vars_css_cjs.vars.space,
|
|
73
|
+
paddingBlockStart: styles_lib_theme_vars_css_cjs.vars.space,
|
|
74
|
+
paddingBlockEnd: styles_lib_theme_vars_css_cjs.vars.space,
|
|
75
|
+
paddingInline: styles_lib_theme_vars_css_cjs.vars.space,
|
|
76
|
+
paddingInlineStart: styles_lib_theme_vars_css_cjs.vars.space,
|
|
77
|
+
paddingInlineEnd: styles_lib_theme_vars_css_cjs.vars.space,
|
|
72
78
|
position: ["relative", "fixed", "absolute", "sticky", "static"],
|
|
73
79
|
rowGap: styles_lib_theme_vars_css_cjs.vars.space,
|
|
74
80
|
textAlign: ["center", "left", "right", "justify"]
|
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
import { vars } from "../../theme/vars.css.mjs";
|
|
2
|
-
const
|
|
2
|
+
const colorsWithCurrentColor = { ...vars.color, currentColor: "currentColor" };
|
|
3
|
+
const size = { auto: "auto", full: "100%", "fit-content": "fit-content" };
|
|
3
4
|
const unresponsiveProperties = {
|
|
4
|
-
backgroundColor:
|
|
5
|
-
borderColor:
|
|
5
|
+
backgroundColor: colorsWithCurrentColor,
|
|
6
|
+
borderColor: colorsWithCurrentColor,
|
|
6
7
|
borderRadius: vars.borderRadius,
|
|
7
8
|
borderWidth: vars.borderWidth,
|
|
8
9
|
border: ["none"],
|
|
9
|
-
|
|
10
|
+
insetBlock: [0],
|
|
11
|
+
insetBlockStart: [0],
|
|
12
|
+
insetBlockEnd: [0],
|
|
13
|
+
insetInline: [0],
|
|
14
|
+
insetInlineStart: [0],
|
|
15
|
+
insetInlineEnd: [0],
|
|
10
16
|
boxShadow: vars.shadow,
|
|
11
|
-
color:
|
|
17
|
+
color: colorsWithCurrentColor,
|
|
12
18
|
cursor: ["auto", "pointer"],
|
|
13
19
|
fontFamily: vars.fontFamily,
|
|
14
20
|
fontStyle: ["normal", "italic", "oblique"],
|
|
15
21
|
fontWeight: vars.fontWeight,
|
|
16
|
-
height: { auto: "auto", full: "100%" },
|
|
17
|
-
left: [0],
|
|
18
22
|
lineHeight: vars.lineHeight,
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
blockSize: size,
|
|
24
|
+
maxBlockSize: size,
|
|
25
|
+
inlineSize: size,
|
|
26
|
+
maxInlineSize: size,
|
|
21
27
|
opacity: [0, 1],
|
|
22
28
|
overflow: ["hidden", "scroll", "visible", "auto"],
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
overflowBlock: ["hidden", "scroll", "visible", "auto"],
|
|
30
|
+
overflowInline: ["hidden", "scroll", "visible", "auto"],
|
|
25
31
|
pointerEvents: ["none"],
|
|
26
|
-
right: [0],
|
|
27
32
|
textDecoration: ["overline", "line-through", "underline", "none"],
|
|
28
33
|
textTransform: ["lowercase", "uppercase", "capitalize"],
|
|
29
34
|
textWrap: ["balance", "wrap"],
|
|
30
|
-
top: [0],
|
|
31
35
|
transition: vars.transition,
|
|
32
36
|
userSelect: ["none"],
|
|
33
37
|
whiteSpace: ["nowrap", "pre", "pre-line", "pre-wrap"],
|
|
34
|
-
width: { auto: "auto", full: "100%", "fit-content": "fit-content" },
|
|
35
38
|
wordBreak: ["break-word"],
|
|
36
39
|
wordWrap: ["break-word"]
|
|
37
40
|
};
|
|
@@ -59,15 +62,18 @@ const responsiveProperties = {
|
|
|
59
62
|
fontSize: vars.fontSize,
|
|
60
63
|
gap: vars.space,
|
|
61
64
|
justifyContent: ["flex-start", "flex-end", "center", "space-between", "space-around"],
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
marginBlockStart: marginSpace,
|
|
66
|
+
marginBlockEnd: marginSpace,
|
|
67
|
+
marginInlineStart: marginSpace,
|
|
68
|
+
marginInlineEnd: marginSpace,
|
|
66
69
|
outline: ["none"],
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
padding: vars.space,
|
|
71
|
+
paddingBlock: vars.space,
|
|
72
|
+
paddingBlockStart: vars.space,
|
|
73
|
+
paddingBlockEnd: vars.space,
|
|
74
|
+
paddingInline: vars.space,
|
|
75
|
+
paddingInlineStart: vars.space,
|
|
76
|
+
paddingInlineEnd: vars.space,
|
|
71
77
|
position: ["relative", "fixed", "absolute", "sticky", "static"],
|
|
72
78
|
rowGap: vars.space,
|
|
73
79
|
textAlign: ["center", "left", "right", "justify"]
|
|
@@ -7,7 +7,7 @@ fileScope.setFileScope("src/lib/css/atoms/sprinkles.css.ts", "blocks");
|
|
|
7
7
|
const unresponsiveAtomicProperties = sprinkles.defineProperties({
|
|
8
8
|
properties: styles_lib_css_atoms_atomicProperties_cjs.unresponsiveProperties,
|
|
9
9
|
shorthands: {
|
|
10
|
-
inset: ["
|
|
10
|
+
inset: ["insetBlockStart", "insetBlockEnd", "insetInlineStart", "insetInlineEnd"]
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
const responsiveAtomicProperties = sprinkles.defineProperties({
|
|
@@ -27,12 +27,9 @@ const responsiveAtomicProperties = sprinkles.defineProperties({
|
|
|
27
27
|
responsiveArray: styles_lib_css_atoms_breakpoints_cjs.breakpointNames,
|
|
28
28
|
properties: styles_lib_css_atoms_atomicProperties_cjs.responsiveProperties,
|
|
29
29
|
shorthands: {
|
|
30
|
-
margin: ["
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
padding: ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
|
|
34
|
-
paddingX: ["paddingLeft", "paddingRight"],
|
|
35
|
-
paddingY: ["paddingTop", "paddingBottom"],
|
|
30
|
+
margin: ["marginBlockStart", "marginBlockEnd", "marginInlineStart", "marginInlineEnd"],
|
|
31
|
+
marginBlock: ["marginBlockStart", "marginBlockEnd"],
|
|
32
|
+
marginInline: ["marginInlineStart", "marginInlineEnd"],
|
|
36
33
|
placeItems: ["justifyContent", "alignItems"]
|
|
37
34
|
}
|
|
38
35
|
});
|
|
@@ -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: ["
|
|
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: ["
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
47
|
+
paddingInline: "large",
|
|
48
48
|
height: 40
|
|
49
49
|
}),
|
|
50
50
|
medium: styles_lib_css_style_style_cjs.style({
|
|
51
|
-
|
|
51
|
+
paddingInline: "xlarge",
|
|
52
52
|
height: 56
|
|
53
53
|
}),
|
|
54
54
|
large: styles_lib_css_style_style_cjs.style({
|
|
55
|
-
|
|
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
|
-
|
|
46
|
+
paddingInline: "large",
|
|
47
47
|
height: 40
|
|
48
48
|
}),
|
|
49
49
|
medium: style({
|
|
50
|
-
|
|
50
|
+
paddingInline: "xlarge",
|
|
51
51
|
height: 56
|
|
52
52
|
}),
|
|
53
53
|
large: style({
|
|
54
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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({
|