@blockle/blocks 0.9.1 → 0.11.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 +258 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +259 -8
- package/dist/momotaro.chunk.d.ts +317 -271
- package/dist/reset.css.cjs +3 -1
- package/dist/reset.css.mjs +3 -1
- package/dist/style.css +2851 -0
- package/dist/styles/components/display/Divider/Divider.cjs +1 -0
- package/dist/styles/components/display/Divider/Divider.mjs +1 -0
- package/dist/styles/components/display/Divider/divider.css.cjs +4 -11
- package/dist/styles/components/display/Divider/divider.css.mjs +4 -11
- package/dist/styles/components/form/Button/Button.css.cjs +4 -11
- package/dist/styles/components/form/Button/Button.css.mjs +4 -11
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Checkbox/checkbox.css.cjs +6 -25
- package/dist/styles/components/form/Checkbox/checkbox.css.mjs +6 -25
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Input/input.css.cjs +4 -15
- package/dist/styles/components/form/Input/input.css.mjs +4 -15
- package/dist/styles/components/form/Input/input.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Input/input.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Radio/radio.css.cjs +6 -25
- package/dist/styles/components/form/Radio/radio.css.mjs +6 -25
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Select/Select.cjs +2 -2
- package/dist/styles/components/form/Select/Select.mjs +2 -2
- package/dist/styles/components/form/Select/select.css.cjs +6 -31
- package/dist/styles/components/form/Select/select.css.mjs +6 -31
- package/dist/styles/components/form/Select/select.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Select/select.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Slider/Slider.cjs +155 -0
- package/dist/styles/components/form/Slider/Slider.mjs +156 -0
- package/dist/styles/components/form/Slider/slider.css.cjs +16 -0
- package/dist/styles/components/form/Slider/slider.css.mjs +17 -0
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/form/Switch/switch.css.cjs +5 -21
- package/dist/styles/components/form/Switch/switch.css.mjs +5 -21
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/overlay/Dialog/Dialog.cjs +3 -0
- package/dist/styles/components/overlay/Dialog/Dialog.mjs +4 -1
- package/dist/styles/components/overlay/Dialog/dialog.css.cjs +4 -19
- package/dist/styles/components/overlay/Dialog/dialog.css.mjs +4 -19
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/typography/Heading/heading.css.cjs +4 -11
- package/dist/styles/components/typography/Heading/heading.css.mjs +4 -11
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.mjs +1 -0
- package/dist/styles/components/typography/Text/text.css.cjs +4 -11
- package/dist/styles/components/typography/Text/text.css.mjs +4 -11
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.cjs +1 -0
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.mjs +1 -0
- package/dist/styles/entries/reset.css.ts.vanilla.cjs +1 -0
- package/dist/styles/entries/reset.css.ts.vanilla.mjs +1 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +2089 -32
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +2089 -32
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.cjs +1 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.mjs +1 -0
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.cjs +1 -0
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.mjs +1 -0
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.cjs +1 -0
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.mjs +1 -0
- package/dist/styles/lib/theme/makeTheme.cjs +18 -2
- package/dist/styles/lib/theme/makeTheme.mjs +17 -1
- package/dist/styles/lib/theme/vars.css.cjs +77 -5
- package/dist/styles/lib/theme/vars.css.mjs +77 -5
- package/dist/styles/lib/theme/vars.css.ts.vanilla.cjs +1 -0
- package/dist/styles/lib/theme/vars.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/momotaro.css.cjs +192 -8
- package/dist/styles/themes/momotaro/momotaro.css.mjs +192 -8
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.mjs +1 -0
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.cjs +1 -0
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.mjs +1 -0
- package/package.json +33 -33
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +0 -83
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +0 -84
- package/dist/styles/lib/css/atoms/breakpoints.cjs +0 -11
- package/dist/styles/lib/css/atoms/breakpoints.mjs +0 -12
- package/dist/styles/lib/css/layers/layers.css.cjs +0 -7
- package/dist/styles/lib/css/layers/layers.css.mjs +0 -8
- package/dist/styles/lib/css/style/style.cjs +0 -28
- package/dist/styles/lib/css/style/style.mjs +0 -29
- package/dist/styles/lib/theme/makeComponentTheme.cjs +0 -5
- package/dist/styles/lib/theme/makeComponentTheme.mjs +0 -6
- package/dist/styles/lib/theme/makeVanillaTheme.cjs +0 -19
- package/dist/styles/lib/theme/makeVanillaTheme.mjs +0 -20
- package/dist/styles/lib/theme/tokens.cjs +0 -81
- package/dist/styles/lib/theme/tokens.mjs +0 -82
- package/dist/styles/themes/momotaro/components/button.css.cjs +0 -103
- package/dist/styles/themes/momotaro/components/button.css.mjs +0 -104
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +0 -59
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +0 -60
- package/dist/styles/themes/momotaro/components/dialog.css.cjs +0 -68
- package/dist/styles/themes/momotaro/components/dialog.css.mjs +0 -69
- package/dist/styles/themes/momotaro/components/divider.css.cjs +0 -11
- package/dist/styles/themes/momotaro/components/divider.css.mjs +0 -12
- package/dist/styles/themes/momotaro/components/dropdown.css.cjs +0 -54
- package/dist/styles/themes/momotaro/components/dropdown.css.mjs +0 -55
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +0 -43
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +0 -44
- package/dist/styles/themes/momotaro/components/index.cjs +0 -30
- package/dist/styles/themes/momotaro/components/index.mjs +0 -31
- package/dist/styles/themes/momotaro/components/input.css.cjs +0 -41
- package/dist/styles/themes/momotaro/components/input.css.mjs +0 -42
- package/dist/styles/themes/momotaro/components/label.css.cjs +0 -33
- package/dist/styles/themes/momotaro/components/label.css.mjs +0 -34
- package/dist/styles/themes/momotaro/components/link.css.cjs +0 -47
- package/dist/styles/themes/momotaro/components/link.css.mjs +0 -48
- package/dist/styles/themes/momotaro/components/progress.css.cjs +0 -55
- package/dist/styles/themes/momotaro/components/progress.css.mjs +0 -56
- package/dist/styles/themes/momotaro/components/radio.css.cjs +0 -60
- package/dist/styles/themes/momotaro/components/radio.css.mjs +0 -61
- package/dist/styles/themes/momotaro/components/select.css.cjs +0 -35
- package/dist/styles/themes/momotaro/components/select.css.mjs +0 -36
- package/dist/styles/themes/momotaro/components/spinner.css.cjs +0 -43
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +0 -44
- package/dist/styles/themes/momotaro/components/switch.css.cjs +0 -58
- package/dist/styles/themes/momotaro/components/switch.css.mjs +0 -59
- package/dist/styles/themes/momotaro/components/transitions.cjs +0 -3
- package/dist/styles/themes/momotaro/components/transitions.mjs +0 -4
- package/dist/styles/themes/momotaro/tokens.css.cjs +0 -84
- package/dist/styles/themes/momotaro/tokens.css.mjs +0 -85
- /package/dist/styles/{lib/css/reset/reset.css.cjs → components/display/Divider/divider.css.ts.vanilla.cjs} +0 -0
- /package/dist/styles/{lib/css/reset/reset.css.mjs → components/display/Divider/divider.css.ts.vanilla.mjs} +0 -0
|
@@ -220,6 +220,7 @@ exports.Box = Box;
|
|
|
220
220
|
exports.Divider = Divider;
|
|
221
221
|
exports.Slot = Slot;
|
|
222
222
|
exports.classnames = classnames;
|
|
223
|
+
exports.composeRefs = composeRefs;
|
|
223
224
|
exports.createSlottable = createSlottable;
|
|
224
225
|
exports.useComponentStyleDefaultProps = useComponentStyleDefaultProps;
|
|
225
226
|
exports.useComponentStyles = useComponentStyles;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/display/Divider/divider.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
"@layer": {
|
|
8
|
-
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
clear: "both",
|
|
10
|
-
blockSize: "1px"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "divider");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./divider.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/display/Divider/divider.css.ts", "@blockle/blocks");
|
|
6
|
+
var divider = "_8au4lu0";
|
|
14
7
|
fileScope.endFileScope();
|
|
15
8
|
exports.divider = divider;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/display/Divider/divider.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
clear: "both",
|
|
9
|
-
blockSize: "1px"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}, "divider");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./divider.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/display/Divider/divider.css.ts", "@blockle/blocks");
|
|
5
|
+
var divider = "_8au4lu0";
|
|
13
6
|
endFileScope();
|
|
14
7
|
export {
|
|
15
8
|
divider
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/form/Button/Button.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
"@layer": {
|
|
8
|
-
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
all: "unset",
|
|
10
|
-
cursor: "pointer"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "buttonReset");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./Button.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
6
|
+
var buttonReset = "_97x9530";
|
|
14
7
|
fileScope.endFileScope();
|
|
15
8
|
exports.buttonReset = buttonReset;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/form/Button/Button.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
all: "unset",
|
|
9
|
-
cursor: "pointer"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}, "buttonReset");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./Button.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks");
|
|
5
|
+
var buttonReset = "_97x9530";
|
|
13
6
|
endFileScope();
|
|
14
7
|
export {
|
|
15
8
|
buttonReset
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/form/Checkbox/checkbox.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
position: "relative",
|
|
10
|
-
cursor: "pointer",
|
|
11
|
-
overflow: "hidden"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}, "container");
|
|
15
|
-
const input = css.style({
|
|
16
|
-
position: "absolute",
|
|
17
|
-
inset: 0,
|
|
18
|
-
opacity: 0,
|
|
19
|
-
"@layer": {
|
|
20
|
-
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
21
|
-
all: "unset"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}, "input");
|
|
25
|
-
const icon = css.style({
|
|
26
|
-
pointerEvents: "none"
|
|
27
|
-
}, "icon");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./checkbox.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
6
|
+
var container = "_1t2nsd0";
|
|
7
|
+
var input = "_1t2nsd1";
|
|
8
|
+
var icon = "_1t2nsd2";
|
|
28
9
|
fileScope.endFileScope();
|
|
29
10
|
exports.container = container;
|
|
30
11
|
exports.icon = icon;
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/form/Checkbox/checkbox.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
position: "relative",
|
|
9
|
-
cursor: "pointer",
|
|
10
|
-
overflow: "hidden"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "container");
|
|
14
|
-
const input = style({
|
|
15
|
-
position: "absolute",
|
|
16
|
-
inset: 0,
|
|
17
|
-
opacity: 0,
|
|
18
|
-
"@layer": {
|
|
19
|
-
[blocksLayer]: {
|
|
20
|
-
all: "unset"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, "input");
|
|
24
|
-
const icon = style({
|
|
25
|
-
pointerEvents: "none"
|
|
26
|
-
}, "icon");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./checkbox.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks");
|
|
5
|
+
var container = "_1t2nsd0";
|
|
6
|
+
var input = "_1t2nsd1";
|
|
7
|
+
var icon = "_1t2nsd2";
|
|
27
8
|
endFileScope();
|
|
28
9
|
export {
|
|
29
10
|
container,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/form/Input/input.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
"@layer": {
|
|
8
|
-
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
appearance: "none",
|
|
10
|
-
selectors: {
|
|
11
|
-
"&:-webkit-autofill": {
|
|
12
|
-
transitionDelay: "9999s"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}, "input");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./input.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
6
|
+
var input = "hjmnu0";
|
|
18
7
|
fileScope.endFileScope();
|
|
19
8
|
exports.input = input;
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/form/Input/input.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
appearance: "none",
|
|
9
|
-
selectors: {
|
|
10
|
-
"&:-webkit-autofill": {
|
|
11
|
-
transitionDelay: "9999s"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}, "input");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./input.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks");
|
|
5
|
+
var input = "hjmnu0";
|
|
17
6
|
endFileScope();
|
|
18
7
|
export {
|
|
19
8
|
input
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/form/Radio/radio.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
position: "relative",
|
|
10
|
-
cursor: "pointer",
|
|
11
|
-
overflow: "hidden"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}, "container");
|
|
15
|
-
const input = css.style({
|
|
16
|
-
position: "absolute",
|
|
17
|
-
inset: 0,
|
|
18
|
-
opacity: 0,
|
|
19
|
-
"@layer": {
|
|
20
|
-
[styles_lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
21
|
-
all: "unset"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}, "input");
|
|
25
|
-
const icon = css.style({
|
|
26
|
-
pointerEvents: "none"
|
|
27
|
-
}, "icon");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./radio.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Radio/radio.css.ts", "@blockle/blocks");
|
|
6
|
+
var container = "dh2y4e0";
|
|
7
|
+
var input = "dh2y4e1";
|
|
8
|
+
var icon = "dh2y4e2";
|
|
28
9
|
fileScope.endFileScope();
|
|
29
10
|
exports.container = container;
|
|
30
11
|
exports.icon = icon;
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/form/Radio/radio.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
position: "relative",
|
|
9
|
-
cursor: "pointer",
|
|
10
|
-
overflow: "hidden"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "container");
|
|
14
|
-
const input = style({
|
|
15
|
-
position: "absolute",
|
|
16
|
-
inset: 0,
|
|
17
|
-
opacity: 0,
|
|
18
|
-
"@layer": {
|
|
19
|
-
[blocksLayer]: {
|
|
20
|
-
all: "unset"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, "input");
|
|
24
|
-
const icon = style({
|
|
25
|
-
pointerEvents: "none"
|
|
26
|
-
}, "icon");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./radio.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/form/Radio/radio.css.ts", "@blockle/blocks");
|
|
5
|
+
var container = "dh2y4e0";
|
|
6
|
+
var input = "dh2y4e1";
|
|
7
|
+
var icon = "dh2y4e2";
|
|
27
8
|
endFileScope();
|
|
28
9
|
export {
|
|
29
10
|
container,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -3,9 +3,9 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
3
3
|
const react = require("react");
|
|
4
4
|
const styles_components_display_Divider_Divider_cjs = require("../../display/Divider/Divider.cjs");
|
|
5
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) {
|
|
6
|
+
const Select = react.forwardRef(function Select2({ children, placeholder, className, variant, ...restProps }, ref) {
|
|
7
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 });
|
|
8
|
+
const selectClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { select: true, variants: { variant } });
|
|
9
9
|
const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("select", { icon: true }, false);
|
|
10
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
11
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { useComponentStyles, Box, classnames } from "../../display/Divider/Divider.mjs";
|
|
4
4
|
import { wrapper, select, icon } from "./select.css.mjs";
|
|
5
|
-
const Select = forwardRef(function Select2({ children, placeholder, className, ...restProps }, ref) {
|
|
5
|
+
const Select = forwardRef(function Select2({ children, placeholder, className, variant, ...restProps }, ref) {
|
|
6
6
|
const wrapperClassName = useComponentStyles("select", { wrapper: true }, false);
|
|
7
|
-
const selectClassName = useComponentStyles("select", { select: true });
|
|
7
|
+
const selectClassName = useComponentStyles("select", { select: true, variants: { variant } });
|
|
8
8
|
const iconClassName = useComponentStyles("select", { icon: true }, false);
|
|
9
9
|
return /* @__PURE__ */ jsxs(Box, { className: classnames(wrapper, wrapperClassName), children: [
|
|
10
10
|
/* @__PURE__ */ jsxs(
|
|
@@ -1,36 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fileScope.setFileScope("src/components/form/Select/select.css.ts", "blocks");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
3
|
+
require("../../../lib/css/layers/layers.css.ts.vanilla.cjs");
|
|
4
|
+
require("./select.css.ts.vanilla.cjs");
|
|
5
|
+
fileScope.setFileScope("src/components/form/Select/select.css.ts", "@blockle/blocks");
|
|
6
|
+
var wrapper = "_1tosed90";
|
|
7
|
+
var select = "_1tosed91";
|
|
8
|
+
var icon = "_1tosed92";
|
|
34
9
|
fileScope.endFileScope();
|
|
35
10
|
exports.icon = icon;
|
|
36
11
|
exports.select = select;
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
setFileScope("src/components/form/Select/select.css.ts", "blocks");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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");
|
|
2
|
+
import "../../../lib/css/layers/layers.css.ts.vanilla.mjs";
|
|
3
|
+
import "./select.css.ts.vanilla.mjs";
|
|
4
|
+
setFileScope("src/components/form/Select/select.css.ts", "@blockle/blocks");
|
|
5
|
+
var wrapper = "_1tosed90";
|
|
6
|
+
var select = "_1tosed91";
|
|
7
|
+
var icon = "_1tosed92";
|
|
33
8
|
endFileScope();
|
|
34
9
|
export {
|
|
35
10
|
icon,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
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_Slider_slider_css_cjs = require("./slider.css.cjs");
|
|
6
|
+
function getProgress(event, rect) {
|
|
7
|
+
const { clientX, clientY } = event;
|
|
8
|
+
const { width, height, left, top } = rect;
|
|
9
|
+
const x = (clientX - left) / width;
|
|
10
|
+
const y = (clientY - top) / height;
|
|
11
|
+
return [x, y];
|
|
12
|
+
}
|
|
13
|
+
function usePointerProgress({ container, orientation, onChange }) {
|
|
14
|
+
react.useEffect(() => {
|
|
15
|
+
const element = container.current;
|
|
16
|
+
function pointerdown(event) {
|
|
17
|
+
event.preventDefault();
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
if (!element) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const containerRect = element.getBoundingClientRect();
|
|
23
|
+
const axisIndex = orientation === "horizontal" ? 0 : 1;
|
|
24
|
+
const progress = getProgress(event, containerRect);
|
|
25
|
+
onChange(progress[axisIndex]);
|
|
26
|
+
const pointermove = (event2) => {
|
|
27
|
+
event2.preventDefault();
|
|
28
|
+
const progress2 = getProgress(event2, containerRect);
|
|
29
|
+
onChange(progress2[axisIndex]);
|
|
30
|
+
};
|
|
31
|
+
const pointerup = () => {
|
|
32
|
+
document.removeEventListener("pointermove", pointermove);
|
|
33
|
+
document.removeEventListener("pointerup", pointerup);
|
|
34
|
+
};
|
|
35
|
+
document.addEventListener("pointermove", pointermove);
|
|
36
|
+
document.addEventListener("pointerup", pointerup);
|
|
37
|
+
}
|
|
38
|
+
if (!element) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
element.addEventListener("pointerdown", pointerdown);
|
|
42
|
+
return () => {
|
|
43
|
+
element.removeEventListener("pointerdown", pointerdown);
|
|
44
|
+
};
|
|
45
|
+
}, [container, onChange, orientation]);
|
|
46
|
+
}
|
|
47
|
+
function getBoundValue(newValue, min, max, step) {
|
|
48
|
+
let value = Math.round(newValue / step) * step;
|
|
49
|
+
value = Math.max(min, Math.min(max, value));
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
const Slider = ({
|
|
53
|
+
min = 0,
|
|
54
|
+
max = 100,
|
|
55
|
+
step = 1,
|
|
56
|
+
orientation = "horizontal",
|
|
57
|
+
defaultValue = 0,
|
|
58
|
+
onChange,
|
|
59
|
+
value,
|
|
60
|
+
name,
|
|
61
|
+
size,
|
|
62
|
+
colorScheme,
|
|
63
|
+
...restProps
|
|
64
|
+
}) => {
|
|
65
|
+
const [internValue, setInternValue] = react.useState(
|
|
66
|
+
getBoundValue(value ?? defaultValue, min, max, step)
|
|
67
|
+
);
|
|
68
|
+
const baseClass = styles_components_display_Divider_Divider_cjs.useComponentStyles("slider", { base: true, variants: { size, colorScheme } });
|
|
69
|
+
const trackClass = styles_components_display_Divider_Divider_cjs.useComponentStyles("slider", { track: true }, false);
|
|
70
|
+
const filledTrackClass = styles_components_display_Divider_Divider_cjs.useComponentStyles("slider", { filledTrack: true }, false);
|
|
71
|
+
const thumbClass = styles_components_display_Divider_Divider_cjs.useComponentStyles("slider", { thumb: true }, false);
|
|
72
|
+
const containerRef = react.useRef(null);
|
|
73
|
+
react.useEffect(() => {
|
|
74
|
+
if (value !== void 0) {
|
|
75
|
+
setInternValue(getBoundValue(value, min, max, step));
|
|
76
|
+
}
|
|
77
|
+
}, [value, min, max, step]);
|
|
78
|
+
react.useEffect(() => {
|
|
79
|
+
if (onChange && internValue !== value) {
|
|
80
|
+
onChange(internValue);
|
|
81
|
+
}
|
|
82
|
+
}, [internValue, onChange, value]);
|
|
83
|
+
usePointerProgress({
|
|
84
|
+
container: containerRef,
|
|
85
|
+
orientation,
|
|
86
|
+
onChange(progress) {
|
|
87
|
+
if (orientation === "vertical") {
|
|
88
|
+
progress = 1 - progress;
|
|
89
|
+
}
|
|
90
|
+
setInternValue(getBoundValue(max * progress, min, max, step));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const onKeyDown = react.useCallback(
|
|
94
|
+
(event) => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
event.stopPropagation();
|
|
97
|
+
const specialKey = ["PageUp", "PageDown"];
|
|
98
|
+
const stepModifier = event.shiftKey || specialKey.includes(event.key) ? (max - min) / 10 : step;
|
|
99
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowDown" || event.key === "PageDown") {
|
|
100
|
+
return setInternValue((value2) => getBoundValue(value2 - stepModifier, min, max, step));
|
|
101
|
+
}
|
|
102
|
+
if (event.key === "ArrowRight" || event.key === "ArrowUp" || event.key === "PageUp") {
|
|
103
|
+
return setInternValue((value2) => getBoundValue(value2 + stepModifier, min, max, step));
|
|
104
|
+
}
|
|
105
|
+
if (event.key === "Home") {
|
|
106
|
+
return setInternValue(min);
|
|
107
|
+
}
|
|
108
|
+
if (event.key === "End") {
|
|
109
|
+
return setInternValue(max);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
[max, min, step]
|
|
113
|
+
);
|
|
114
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
ref: containerRef,
|
|
118
|
+
className: styles_components_display_Divider_Divider_cjs.classnames(
|
|
119
|
+
styles_components_form_Slider_slider_css_cjs.container,
|
|
120
|
+
orientation === "vertical" ? styles_components_form_Slider_slider_css_cjs.containerVertical : "",
|
|
121
|
+
baseClass
|
|
122
|
+
),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Slider_slider_css_cjs.track, trackClass), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Slider_slider_css_cjs.filledTrack, filledTrackClass),
|
|
128
|
+
style: {
|
|
129
|
+
inlineSize: `${internValue / max * 100}%`
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
) }),
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Slider_slider_css_cjs.thumb, thumbClass),
|
|
137
|
+
tabIndex: 0,
|
|
138
|
+
role: "slider",
|
|
139
|
+
"aria-valuemin": min,
|
|
140
|
+
"aria-valuemax": max,
|
|
141
|
+
"aria-valuenow": internValue,
|
|
142
|
+
"aria-orientation": orientation,
|
|
143
|
+
style: {
|
|
144
|
+
[orientation === "horizontal" ? "insetInlineStart" : "insetInlineEnd"]: `${internValue / max * 100}%`
|
|
145
|
+
},
|
|
146
|
+
onKeyDown,
|
|
147
|
+
...restProps
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: internValue })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
exports.Slider = Slider;
|