@blockle/blocks 0.6.0 → 0.7.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 +189 -160
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +189 -160
- package/dist/momotaro.chunk.d.ts +113 -68
- package/dist/styles/themes/momotaro/components/button.css.cjs +1 -1
- package/dist/styles/themes/momotaro/components/button.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +53 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +54 -0
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +13 -0
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +13 -0
- package/dist/styles/themes/momotaro/components/index.cjs +7 -1
- package/dist/styles/themes/momotaro/components/index.mjs +7 -1
- package/dist/styles/themes/momotaro/components/input.css.cjs +3 -3
- package/dist/styles/themes/momotaro/components/input.css.mjs +3 -3
- package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
- package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
- package/dist/styles/themes/momotaro/components/link.css.cjs +1 -0
- package/dist/styles/themes/momotaro/components/link.css.mjs +1 -0
- package/dist/styles/themes/momotaro/components/radio.css.cjs +53 -0
- package/dist/styles/themes/momotaro/components/radio.css.mjs +54 -0
- package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
- package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
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
|
+
const styles_themes_momotaro_components_transitions_cjs = require("./transitions.cjs");
|
|
8
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
9
|
+
fileScope.setFileScope("src/themes/momotaro/components/radio.css.ts?used", "blocks");
|
|
10
|
+
const radio = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme("radio", {
|
|
11
|
+
base: css.style([{
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
borderRadius: 12,
|
|
18
|
+
transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.fast}`,
|
|
19
|
+
transitionProperty: "background-color",
|
|
20
|
+
":hover": {
|
|
21
|
+
backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primaryDark
|
|
22
|
+
},
|
|
23
|
+
selectors: {
|
|
24
|
+
"&:has(input:checked):not(:hover)": {
|
|
25
|
+
backgroundColor: styles_lib_theme_vars_css_cjs.vars.color.primary
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
29
|
+
backgroundColor: "primaryLight"
|
|
30
|
+
}), styles_themes_momotaro_components_helpers_css_cjs.focusable], "radio_base"),
|
|
31
|
+
icon: css.style({
|
|
32
|
+
height: 12,
|
|
33
|
+
width: 12,
|
|
34
|
+
backgroundColor: "white",
|
|
35
|
+
borderRadius: "8px",
|
|
36
|
+
transform: "scale(0)",
|
|
37
|
+
transition: `transform ${styles_lib_theme_vars_css_cjs.vars.transition.normal} ${styles_themes_momotaro_components_transitions_cjs.bounceOut}`,
|
|
38
|
+
selectors: {
|
|
39
|
+
"input:checked ~ &": {
|
|
40
|
+
transform: "scale(1)"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, "radio_icon"),
|
|
44
|
+
label: styles_lib_css_atoms_sprinkles_css_cjs.atoms({
|
|
45
|
+
display: "flex",
|
|
46
|
+
flexDirection: "row",
|
|
47
|
+
padding: "xsmall",
|
|
48
|
+
gap: "medium",
|
|
49
|
+
cursor: "pointer"
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
fileScope.endFileScope();
|
|
53
|
+
exports.radio = radio;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { style } from "@vanilla-extract/css";
|
|
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
|
+
import { bounceOut } from "./transitions.mjs";
|
|
7
|
+
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
8
|
+
setFileScope("src/themes/momotaro/components/radio.css.ts?used", "blocks");
|
|
9
|
+
const radio = makeComponentTheme("radio", {
|
|
10
|
+
base: style([{
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
width: 24,
|
|
15
|
+
height: 24,
|
|
16
|
+
borderRadius: 12,
|
|
17
|
+
transition: `transform ${vars.transition.fast}`,
|
|
18
|
+
transitionProperty: "background-color",
|
|
19
|
+
":hover": {
|
|
20
|
+
backgroundColor: vars.color.primaryDark
|
|
21
|
+
},
|
|
22
|
+
selectors: {
|
|
23
|
+
"&:has(input:checked):not(:hover)": {
|
|
24
|
+
backgroundColor: vars.color.primary
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, atoms({
|
|
28
|
+
backgroundColor: "primaryLight"
|
|
29
|
+
}), focusable], "radio_base"),
|
|
30
|
+
icon: style({
|
|
31
|
+
height: 12,
|
|
32
|
+
width: 12,
|
|
33
|
+
backgroundColor: "white",
|
|
34
|
+
borderRadius: "8px",
|
|
35
|
+
transform: "scale(0)",
|
|
36
|
+
transition: `transform ${vars.transition.normal} ${bounceOut}`,
|
|
37
|
+
selectors: {
|
|
38
|
+
"input:checked ~ &": {
|
|
39
|
+
transform: "scale(1)"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, "radio_icon"),
|
|
43
|
+
label: atoms({
|
|
44
|
+
display: "flex",
|
|
45
|
+
flexDirection: "row",
|
|
46
|
+
padding: "xsmall",
|
|
47
|
+
gap: "medium",
|
|
48
|
+
cursor: "pointer"
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
endFileScope();
|
|
52
|
+
export {
|
|
53
|
+
radio
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Blocks design system",
|
|
5
5
|
"repository": "git@github.com:Blockle/blocks.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"storybook": "storybook dev -p 6006 --no-open",
|
|
45
45
|
"test": "vitest",
|
|
46
46
|
"ts": "tsc --noemit --project ./tsconfig.json",
|
|
47
|
-
"release": "yarn test && yarn build && changeset publish"
|
|
47
|
+
"release": "yarn ts && yarn test && yarn build && changeset publish"
|
|
48
48
|
},
|
|
49
49
|
"resolutions": {
|
|
50
50
|
"string-width": "^4.2.2"
|