@blockle/blocks 0.18.3 → 0.19.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 +25 -9
- package/dist/index.mjs +25 -9
- package/dist/momotaro.chunk.d.ts +84 -346
- package/dist/styles/components/display/Divider/Divider.cjs +48 -35
- package/dist/styles/components/display/Divider/Divider.mjs +49 -36
- package/dist/styles/components/form/Button/Button.cjs +9 -9
- package/dist/styles/components/form/Button/Button.mjs +9 -9
- package/dist/styles/components/form/Checkbox/Checkbox.cjs +10 -2
- package/dist/styles/components/form/Checkbox/Checkbox.mjs +12 -4
- package/dist/styles/components/form/Input/Input.cjs +11 -2
- package/dist/styles/components/form/Input/Input.mjs +12 -3
- package/dist/styles/components/form/Radio/Radio.cjs +2 -3
- package/dist/styles/components/form/Radio/Radio.mjs +3 -4
- package/dist/styles/components/form/Select/Select.cjs +9 -3
- package/dist/styles/components/form/Select/Select.mjs +10 -4
- package/dist/styles/components/form/Slider/Slider.cjs +5 -1
- package/dist/styles/components/form/Slider/Slider.mjs +6 -2
- package/dist/styles/components/form/Switch/Switch.cjs +9 -2
- package/dist/styles/components/form/Switch/Switch.mjs +11 -4
- package/dist/styles/components/typography/Text/Text.cjs +14 -4
- package/dist/styles/components/typography/Text/Text.mjs +14 -4
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/button.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/progress.css.mjs +1 -1
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +1 -1
- package/package.json +34 -34
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState, useEffect, useCallback } from "react";
|
|
3
3
|
import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { input, container } from "./switch.css.mjs";
|
|
5
5
|
import { useComponentStyles } from "../../display/Divider/Divider.mjs";
|
|
6
|
-
const Switch =
|
|
6
|
+
const Switch = ({
|
|
7
|
+
checked,
|
|
8
|
+
className,
|
|
9
|
+
defaultChecked,
|
|
10
|
+
onChange,
|
|
11
|
+
ref,
|
|
12
|
+
...restProps
|
|
13
|
+
}) => {
|
|
7
14
|
const [isChecked, setIsChecked] = useState(defaultChecked || checked || false);
|
|
8
15
|
const baseClassName = useComponentStyles("switch", { base: true });
|
|
9
16
|
const sliderClassName = useComponentStyles("switch", { slider: true }, false);
|
|
@@ -57,7 +64,7 @@ const Switch = forwardRef(function Switch2({ className, checked, onChange, defau
|
|
|
57
64
|
]
|
|
58
65
|
}
|
|
59
66
|
) });
|
|
60
|
-
}
|
|
67
|
+
};
|
|
61
68
|
export {
|
|
62
69
|
Switch
|
|
63
70
|
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react = require("react");
|
|
4
3
|
const styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs = require("../../Accessibility/VisuallyHidden/VisuallyHidden.cjs");
|
|
5
4
|
const styles_components_typography_Text_text_css_cjs = require("./text.css.cjs");
|
|
6
5
|
const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
|
|
7
|
-
const Text =
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const Text = ({
|
|
7
|
+
asChild,
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
ref,
|
|
11
|
+
tag,
|
|
12
|
+
...restProps
|
|
13
|
+
}) => {
|
|
14
|
+
const Component = tag ?? "span";
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.Box, { asChild: true, className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(styles_components_typography_Text_text_css_cjs.text, className), ...restProps, children: asChild ? children : (
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx(Component, { ref, children })
|
|
18
|
+
) });
|
|
19
|
+
};
|
|
10
20
|
exports.Text = Text;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
|
|
4
3
|
import { text } from "./text.css.mjs";
|
|
5
4
|
import { Box } from "../../display/Divider/Divider.mjs";
|
|
6
|
-
const Text =
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const Text = ({
|
|
6
|
+
asChild,
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
ref,
|
|
10
|
+
tag,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => {
|
|
13
|
+
const Component = tag ?? "span";
|
|
14
|
+
return /* @__PURE__ */ jsx(Box, { asChild: true, className: classnames(text, className), ...restProps, children: asChild ? children : (
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
/* @__PURE__ */ jsx(Component, { ref, children })
|
|
17
|
+
) });
|
|
18
|
+
};
|
|
9
19
|
export {
|
|
10
20
|
Text
|
|
11
21
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { defineProperties, createSprinkles } from "@vanilla-extract/sprinkles";
|
|
3
3
|
import { unresponsiveProperties, responsiveProperties } from "./atomicProperties.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { breakpointNames, minMediaQuery } from "./breakpoints.mjs";
|
|
5
5
|
setFileScope("src/lib/css/atoms/sprinkles.css.ts", "@blockle/blocks");
|
|
6
6
|
const unresponsiveAtomicProperties = defineProperties({
|
|
7
7
|
properties: unresponsiveProperties,
|
|
@@ -3,7 +3,7 @@ import { createVar } from "@vanilla-extract/css";
|
|
|
3
3
|
import { style } from "../../../lib/css/style/style.mjs";
|
|
4
4
|
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
5
5
|
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { focusRingColor, clickable } from "./helpers.css.mjs";
|
|
7
7
|
setFileScope("src/themes/momotaro/components/button.css.ts", "@blockle/blocks");
|
|
8
8
|
const intentColor = createVar("intentColor");
|
|
9
9
|
const hoverBackgroundColor = createVar("hoverBackgroundColor");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { style, fallbackVar, createVar } from "@vanilla-extract/css";
|
|
3
3
|
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
4
4
|
setFileScope("src/themes/momotaro/components/helpers.css.ts", "@blockle/blocks");
|
|
5
5
|
const focusRingColor = createVar("focusRingColor");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { style, keyframes } from "@vanilla-extract/css";
|
|
3
3
|
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
4
4
|
import { vars } from "../../../lib/theme/vars.css.mjs";
|
|
5
5
|
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { style, keyframes } from "@vanilla-extract/css";
|
|
3
3
|
import { makeComponentTheme } from "../../../lib/theme/makeComponentTheme.mjs";
|
|
4
4
|
setFileScope("src/themes/momotaro/components/spinner.css.ts", "@blockle/blocks");
|
|
5
5
|
const spinAnimation = keyframes({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Blocks design system",
|
|
5
5
|
"repository": "git@github.com:Blockle/blocks.git",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,42 +57,39 @@
|
|
|
57
57
|
"lint": "eslint .",
|
|
58
58
|
"release": "npm run ts && npm run test && npm run build && changeset publish",
|
|
59
59
|
"storybook": "storybook dev -p 6006 --no-open",
|
|
60
|
-
"test": "vitest --silent
|
|
60
|
+
"test": "vitest --silent",
|
|
61
61
|
"ts": "tsc --noemit --project ./tsconfig.json"
|
|
62
62
|
},
|
|
63
63
|
"resolutions": {
|
|
64
64
|
"string-width": "^4.2.2"
|
|
65
65
|
},
|
|
66
|
-
"dependencies": {
|
|
67
|
-
"npm": "^10.8.1"
|
|
68
|
-
},
|
|
69
66
|
"devDependencies": {
|
|
70
|
-
"@changesets/cli": "^2.27.
|
|
71
|
-
"@chromatic-com/storybook": "^2.
|
|
67
|
+
"@changesets/cli": "^2.27.12",
|
|
68
|
+
"@chromatic-com/storybook": "^3.2.4",
|
|
72
69
|
"@crackle/cli": "^0.15.5",
|
|
73
70
|
"@crackle/core": "^0.33.3",
|
|
74
|
-
"@storybook/addon-a11y": "^8.3
|
|
75
|
-
"@storybook/addon-coverage": "^1.0.
|
|
76
|
-
"@storybook/addon-essentials": "^8.3
|
|
77
|
-
"@storybook/addon-interactions": "^8.3
|
|
78
|
-
"@storybook/addon-links": "^8.3
|
|
79
|
-
"@storybook/blocks": "^8.3
|
|
80
|
-
"@storybook/preview-api": "^8.3
|
|
81
|
-
"@storybook/react": "^8.3
|
|
82
|
-
"@storybook/react-vite": "^8.3
|
|
83
|
-
"@storybook/test": "^8.3
|
|
84
|
-
"@testing-library/jest-dom": "^6.
|
|
85
|
-
"@testing-library/react": "^16.
|
|
71
|
+
"@storybook/addon-a11y": "^8.5.3",
|
|
72
|
+
"@storybook/addon-coverage": "^1.0.5",
|
|
73
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
74
|
+
"@storybook/addon-interactions": "^8.5.3",
|
|
75
|
+
"@storybook/addon-links": "^8.5.3",
|
|
76
|
+
"@storybook/blocks": "^8.5.3",
|
|
77
|
+
"@storybook/preview-api": "^8.5.3",
|
|
78
|
+
"@storybook/react": "^8.5.3",
|
|
79
|
+
"@storybook/react-vite": "^8.5.3",
|
|
80
|
+
"@storybook/test": "^8.5.3",
|
|
81
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
82
|
+
"@testing-library/react": "^16.2.0",
|
|
86
83
|
"@types/eslint": "^8.56.12",
|
|
87
|
-
"@types/react": "^
|
|
88
|
-
"@types/react-dom": "^
|
|
84
|
+
"@types/react": "^19.0.8",
|
|
85
|
+
"@types/react-dom": "^19.0.3",
|
|
89
86
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
90
87
|
"@typescript-eslint/parser": "^7.18.0",
|
|
91
|
-
"@vanilla-extract/css": "^1.
|
|
88
|
+
"@vanilla-extract/css": "^1.17.1",
|
|
92
89
|
"@vanilla-extract/css-utils": "^0.1.4",
|
|
93
90
|
"@vanilla-extract/sprinkles": "^1.6.2",
|
|
94
|
-
"@vanilla-extract/vite-plugin": "^
|
|
95
|
-
"@vitest/coverage-v8": "^
|
|
91
|
+
"@vanilla-extract/vite-plugin": "^5.0.0",
|
|
92
|
+
"@vitest/coverage-v8": "^3.0.4",
|
|
96
93
|
"autoprefixer": "^10.4.19",
|
|
97
94
|
"cross-env": "^7.0.3",
|
|
98
95
|
"eslint": "^8.57.0",
|
|
@@ -103,19 +100,22 @@
|
|
|
103
100
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
104
101
|
"eslint-plugin-storybook": "^0.8.0",
|
|
105
102
|
"eslint-plugin-unicorn": "^53.0.0",
|
|
106
|
-
"jsdom": "^
|
|
103
|
+
"jsdom": "^26.0.0",
|
|
107
104
|
"prettier": "^3.3.1",
|
|
108
105
|
"prop-types": "^15.8.1",
|
|
109
|
-
"react": "^
|
|
110
|
-
"react-dom": "^
|
|
111
|
-
"storybook": "^8.3
|
|
112
|
-
"typescript": "^5.
|
|
113
|
-
"vitest": "^
|
|
106
|
+
"react": "^19.0.0",
|
|
107
|
+
"react-dom": "^19.0.0",
|
|
108
|
+
"storybook": "^8.5.3",
|
|
109
|
+
"typescript": "^5.7.3",
|
|
110
|
+
"vitest": "^3.0.4"
|
|
114
111
|
},
|
|
115
112
|
"peerDependencies": {
|
|
116
|
-
"@vanilla-extract/css": "
|
|
117
|
-
"@vanilla-extract/sprinkles": "
|
|
118
|
-
"react": ">=
|
|
119
|
-
"react-dom": "
|
|
113
|
+
"@vanilla-extract/css": ">=1.14",
|
|
114
|
+
"@vanilla-extract/sprinkles": ">=1.6",
|
|
115
|
+
"react": ">=19.0.0",
|
|
116
|
+
"react-dom": ">=19.0.0"
|
|
117
|
+
},
|
|
118
|
+
"overrides": {
|
|
119
|
+
"nwsapi": "2.2.2"
|
|
120
120
|
}
|
|
121
121
|
}
|