@blockle/blocks 0.20.0-alpha1 → 1.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/README.md +1 -70
- package/dist/index.cjs +21 -71
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -0
- package/dist/index.spec.d.ts +0 -0
- package/dist/reset.cjs +1 -2
- package/dist/reset.d.ts +0 -2
- package/dist/reset.js +1 -0
- package/package.json +24 -81
- package/LICENSE +0 -21
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.cjs +0 -19
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.mjs +0 -20
- package/dist/components/accessibility/VisuallyHidden/index.cjs +0 -1
- package/dist/components/accessibility/VisuallyHidden/index.mjs +0 -1
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.cjs +0 -15
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.mjs +0 -16
- package/dist/components/display/Divider/Divider.cjs +0 -25
- package/dist/components/display/Divider/Divider.mjs +0 -26
- package/dist/components/display/Divider/divider.css.cjs +0 -15
- package/dist/components/display/Divider/divider.css.mjs +0 -16
- package/dist/components/display/Divider/index.cjs +0 -1
- package/dist/components/display/Divider/index.mjs +0 -1
- package/dist/components/feedback/Progress/Progress.cjs +0 -53
- package/dist/components/feedback/Progress/Progress.mjs +0 -54
- package/dist/components/feedback/Progress/index.cjs +0 -1
- package/dist/components/feedback/Progress/index.mjs +0 -1
- package/dist/components/feedback/Spinner/Spinner.cjs +0 -25
- package/dist/components/feedback/Spinner/Spinner.mjs +0 -26
- package/dist/components/feedback/Spinner/index.cjs +0 -1
- package/dist/components/feedback/Spinner/index.mjs +0 -1
- package/dist/components/form/Button/Button.cjs +0 -58
- package/dist/components/form/Button/Button.css.cjs +0 -15
- package/dist/components/form/Button/Button.css.mjs +0 -16
- package/dist/components/form/Button/Button.mjs +0 -59
- package/dist/components/form/Button/index.cjs +0 -1
- package/dist/components/form/Button/index.mjs +0 -1
- package/dist/components/form/Checkbox/Checkbox.cjs +0 -78
- package/dist/components/form/Checkbox/Checkbox.mjs +0 -79
- package/dist/components/form/Checkbox/checkbox.css.cjs +0 -31
- package/dist/components/form/Checkbox/checkbox.css.mjs +0 -32
- package/dist/components/form/Checkbox/index.cjs +0 -1
- package/dist/components/form/Checkbox/index.mjs +0 -1
- package/dist/components/form/Input/Input.cjs +0 -50
- package/dist/components/form/Input/Input.mjs +0 -51
- package/dist/components/form/Input/index.cjs +0 -1
- package/dist/components/form/Input/index.mjs +0 -1
- package/dist/components/form/Input/input.css.cjs +0 -20
- package/dist/components/form/Input/input.css.mjs +0 -21
- package/dist/components/form/Label/Label.cjs +0 -29
- package/dist/components/form/Label/Label.mjs +0 -30
- package/dist/components/form/Label/index.cjs +0 -1
- package/dist/components/form/Label/index.mjs +0 -1
- package/dist/components/form/Radio/Radio.cjs +0 -47
- package/dist/components/form/Radio/Radio.mjs +0 -48
- package/dist/components/form/Radio/RadioGroup.cjs +0 -1
- package/dist/components/form/Radio/RadioGroup.mjs +0 -1
- package/dist/components/form/Radio/index.cjs +0 -1
- package/dist/components/form/Radio/index.mjs +0 -1
- package/dist/components/form/Radio/radio.css.cjs +0 -31
- package/dist/components/form/Radio/radio.css.mjs +0 -32
- package/dist/components/form/Select/Select.cjs +0 -64
- package/dist/components/form/Select/Select.mjs +0 -65
- package/dist/components/form/Select/index.cjs +0 -1
- package/dist/components/form/Select/index.mjs +0 -1
- package/dist/components/form/Select/select.css.cjs +0 -37
- package/dist/components/form/Select/select.css.mjs +0 -38
- package/dist/components/form/Slider/Slider.cjs +0 -139
- package/dist/components/form/Slider/Slider.mjs +0 -142
- package/dist/components/form/Slider/index.cjs +0 -1
- package/dist/components/form/Slider/index.mjs +0 -1
- package/dist/components/form/Slider/slider.css.cjs +0 -74
- package/dist/components/form/Slider/slider.css.mjs +0 -75
- package/dist/components/form/Slider/usePointerProgress.cjs +0 -44
- package/dist/components/form/Slider/usePointerProgress.mjs +0 -45
- package/dist/components/form/Switch/Switch.cjs +0 -71
- package/dist/components/form/Switch/Switch.mjs +0 -74
- package/dist/components/form/Switch/index.cjs +0 -1
- package/dist/components/form/Switch/index.mjs +0 -1
- package/dist/components/form/Switch/switch.css.cjs +0 -26
- package/dist/components/form/Switch/switch.css.mjs +0 -27
- package/dist/components/layout/Box/Box.cjs +0 -27
- package/dist/components/layout/Box/Box.mjs +0 -28
- package/dist/components/layout/Box/index.cjs +0 -1
- package/dist/components/layout/Box/index.mjs +0 -1
- package/dist/components/layout/Inline/Inline.cjs +0 -29
- package/dist/components/layout/Inline/Inline.mjs +0 -30
- package/dist/components/layout/Inline/index.cjs +0 -1
- package/dist/components/layout/Inline/index.mjs +0 -1
- package/dist/components/layout/Stack/Stack.cjs +0 -29
- package/dist/components/layout/Stack/Stack.mjs +0 -30
- package/dist/components/layout/Stack/index.cjs +0 -1
- package/dist/components/layout/Stack/index.mjs +0 -1
- package/dist/components/navigation/Link/Link.cjs +0 -31
- package/dist/components/navigation/Link/Link.mjs +0 -32
- package/dist/components/navigation/Link/index.cjs +0 -1
- package/dist/components/navigation/Link/index.mjs +0 -1
- package/dist/components/other/BlocksProvider/BlocksProvider.cjs +0 -36
- package/dist/components/other/BlocksProvider/BlocksProvider.mjs +0 -39
- package/dist/components/other/BlocksProvider/context.cjs +0 -4
- package/dist/components/other/BlocksProvider/context.mjs +0 -7
- package/dist/components/other/BlocksProvider/index.cjs +0 -1
- package/dist/components/other/BlocksProvider/index.mjs +0 -1
- package/dist/components/other/Portal/Portal.cjs +0 -7
- package/dist/components/other/Portal/Portal.mjs +0 -8
- package/dist/components/other/Portal/index.cjs +0 -1
- package/dist/components/other/Portal/index.mjs +0 -1
- package/dist/components/overlay/Dialog/Dialog.cjs +0 -77
- package/dist/components/overlay/Dialog/Dialog.mjs +0 -80
- package/dist/components/overlay/Dialog/dialog.css.cjs +0 -21
- package/dist/components/overlay/Dialog/dialog.css.mjs +0 -22
- package/dist/components/overlay/Dialog/dialogHelper.cjs +0 -20
- package/dist/components/overlay/Dialog/dialogHelper.mjs +0 -21
- package/dist/components/overlay/Dialog/index.cjs +0 -1
- package/dist/components/overlay/Dialog/index.mjs +0 -1
- package/dist/components/overlay/Popover/Popover.cjs +0 -111
- package/dist/components/overlay/Popover/Popover.mjs +0 -112
- package/dist/components/overlay/Popover/popover-utils.cjs +0 -61
- package/dist/components/overlay/Popover/popover-utils.mjs +0 -62
- package/dist/components/overlay/Tooltip/Tooltip.cjs +0 -71
- package/dist/components/overlay/Tooltip/Tooltip.mjs +0 -74
- package/dist/components/overlay/Tooltip/index.cjs +0 -1
- package/dist/components/overlay/Tooltip/index.mjs +0 -1
- package/dist/components/typography/Heading/Heading.cjs +0 -23
- package/dist/components/typography/Heading/Heading.mjs +0 -24
- package/dist/components/typography/Heading/heading.css.cjs +0 -15
- package/dist/components/typography/Heading/heading.css.mjs +0 -16
- package/dist/components/typography/Heading/index.cjs +0 -1
- package/dist/components/typography/Heading/index.mjs +0 -1
- package/dist/components/typography/Text/Text.cjs +0 -20
- package/dist/components/typography/Text/Text.mjs +0 -21
- package/dist/components/typography/Text/index.cjs +0 -1
- package/dist/components/typography/Text/index.mjs +0 -1
- package/dist/components/typography/Text/text.css.cjs +0 -15
- package/dist/components/typography/Text/text.css.mjs +0 -16
- package/dist/hooks/useClickOutside/useClickOutside.cjs +0 -22
- package/dist/hooks/useClickOutside/useClickOutside.mjs +0 -23
- package/dist/hooks/useControlledValue/useControlledValue.cjs +0 -31
- package/dist/hooks/useControlledValue/useControlledValue.mjs +0 -32
- package/dist/hooks/useIsomorphicLayoutEffect/index.cjs +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/index.mjs +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +0 -4
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +0 -7
- package/dist/hooks/useKeyboard/index.cjs +0 -1
- package/dist/hooks/useKeyboard/index.mjs +0 -1
- package/dist/hooks/useKeyboard/useKeyboard.cjs +0 -19
- package/dist/hooks/useKeyboard/useKeyboard.mjs +0 -22
- package/dist/hooks/useLayer/index.cjs +0 -1
- package/dist/hooks/useLayer/index.mjs +0 -1
- package/dist/hooks/useLayer/useLayer.cjs +0 -25
- package/dist/hooks/useLayer/useLayer.mjs +0 -26
- package/dist/hooks/usePreventBodyScroll/index.cjs +0 -1
- package/dist/hooks/usePreventBodyScroll/index.mjs +0 -1
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.cjs +0 -29
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.mjs +0 -30
- package/dist/hooks/useRestoreFocus/index.cjs +0 -1
- package/dist/hooks/useRestoreFocus/index.mjs +0 -1
- package/dist/hooks/useRestoreFocus/useRestoreFocus.cjs +0 -17
- package/dist/hooks/useRestoreFocus/useRestoreFocus.mjs +0 -18
- package/dist/hooks/useRootAriaHidden/index.cjs +0 -1
- package/dist/hooks/useRootAriaHidden/index.mjs +0 -1
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.cjs +0 -11
- package/dist/hooks/useRootAriaHidden/useRootAriaHidden.mjs +0 -12
- package/dist/hooks/useVisibilityState/index.cjs +0 -1
- package/dist/hooks/useVisibilityState/index.mjs +0 -1
- package/dist/hooks/useVisibilityState/useVisibilityState.cjs +0 -15
- package/dist/hooks/useVisibilityState/useVisibilityState.mjs +0 -16
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +0 -73
- package/dist/lib/asChildRenderer/createAsChildTemplate.cjs +0 -72
- package/dist/lib/asChildRenderer/createAsChildTemplate.mjs +0 -73
- package/dist/lib/css/atoms/atomicProperties.cjs +0 -89
- package/dist/lib/css/atoms/atomicProperties.mjs +0 -90
- package/dist/lib/css/atoms/atoms.cjs +0 -2
- package/dist/lib/css/atoms/atoms.mjs +0 -1
- package/dist/lib/css/atoms/breakpoints.cjs +0 -13
- package/dist/lib/css/atoms/breakpoints.mjs +0 -14
- package/dist/lib/css/atoms/index.cjs +0 -2
- package/dist/lib/css/atoms/index.mjs +0 -1
- package/dist/lib/css/atoms/sprinkles.css.cjs +0 -38
- package/dist/lib/css/atoms/sprinkles.css.mjs +0 -39
- package/dist/lib/css/flexbox/flexbox.cjs +0 -16
- package/dist/lib/css/flexbox/flexbox.mjs +0 -17
- package/dist/lib/css/layers/layers.css.cjs +0 -7
- package/dist/lib/css/layers/layers.css.mjs +0 -8
- package/dist/lib/css/reset/reset.css.cjs +0 -38
- package/dist/lib/css/reset/reset.css.mjs +0 -37
- package/dist/lib/css/style/style.cjs +0 -28
- package/dist/lib/css/style/style.mjs +0 -29
- package/dist/lib/css/utils/cssUtils.cjs +0 -5
- package/dist/lib/css/utils/cssUtils.mjs +0 -6
- package/dist/lib/react/mergeProps.cjs +0 -42
- package/dist/lib/react/mergeProps.mjs +0 -43
- package/dist/lib/react/refs.cjs +0 -16
- package/dist/lib/react/refs.mjs +0 -17
- package/dist/lib/theme/makeComponentTheme.cjs +0 -5
- package/dist/lib/theme/makeComponentTheme.mjs +0 -6
- package/dist/lib/theme/makeTheme.cjs +0 -12
- package/dist/lib/theme/makeTheme.mjs +0 -13
- package/dist/lib/theme/makeVanillaTheme.cjs +0 -19
- package/dist/lib/theme/makeVanillaTheme.mjs +0 -20
- package/dist/lib/theme/store/theme.cjs +0 -92
- package/dist/lib/theme/store/theme.mjs +0 -93
- package/dist/lib/theme/tokens.cjs +0 -81
- package/dist/lib/theme/tokens.mjs +0 -82
- package/dist/lib/theme/vars.css.cjs +0 -9
- package/dist/lib/theme/vars.css.mjs +0 -10
- package/dist/lib/utils/atom-props.cjs +0 -15
- package/dist/lib/utils/atom-props.mjs +0 -16
- package/dist/lib/utils/classnames.cjs +0 -6
- package/dist/lib/utils/classnames.mjs +0 -7
- package/dist/lib/utils/dom.cjs +0 -12
- package/dist/lib/utils/dom.mjs +0 -13
- package/dist/lib/utils/math.cjs +0 -12
- package/dist/lib/utils/math.mjs +0 -13
- package/dist/momotaro.chunk.d.ts +0 -906
- package/dist/reset.d.mts +0 -2
- package/dist/reset.mjs +0 -2
- package/dist/themes/momotaro/components/button.css.cjs +0 -103
- package/dist/themes/momotaro/components/button.css.mjs +0 -104
- package/dist/themes/momotaro/components/checkbox.css.cjs +0 -59
- package/dist/themes/momotaro/components/checkbox.css.mjs +0 -60
- package/dist/themes/momotaro/components/dialog.css.cjs +0 -78
- package/dist/themes/momotaro/components/dialog.css.mjs +0 -79
- package/dist/themes/momotaro/components/divider.css.cjs +0 -15
- package/dist/themes/momotaro/components/divider.css.mjs +0 -16
- package/dist/themes/momotaro/components/helpers.css.cjs +0 -43
- package/dist/themes/momotaro/components/helpers.css.mjs +0 -44
- package/dist/themes/momotaro/components/index.cjs +0 -34
- package/dist/themes/momotaro/components/index.mjs +0 -35
- package/dist/themes/momotaro/components/input.css.cjs +0 -41
- package/dist/themes/momotaro/components/input.css.mjs +0 -42
- package/dist/themes/momotaro/components/label.css.cjs +0 -33
- package/dist/themes/momotaro/components/label.css.mjs +0 -34
- package/dist/themes/momotaro/components/link.css.cjs +0 -53
- package/dist/themes/momotaro/components/link.css.mjs +0 -54
- package/dist/themes/momotaro/components/popover.css.cjs +0 -32
- package/dist/themes/momotaro/components/popover.css.mjs +0 -33
- package/dist/themes/momotaro/components/progress.css.cjs +0 -55
- package/dist/themes/momotaro/components/progress.css.mjs +0 -56
- package/dist/themes/momotaro/components/radio.css.cjs +0 -60
- package/dist/themes/momotaro/components/radio.css.mjs +0 -61
- package/dist/themes/momotaro/components/select.css.cjs +0 -44
- package/dist/themes/momotaro/components/select.css.mjs +0 -45
- package/dist/themes/momotaro/components/slider.css.cjs +0 -89
- package/dist/themes/momotaro/components/slider.css.mjs +0 -90
- package/dist/themes/momotaro/components/spinner.css.cjs +0 -43
- package/dist/themes/momotaro/components/spinner.css.mjs +0 -44
- package/dist/themes/momotaro/components/switch.css.cjs +0 -58
- package/dist/themes/momotaro/components/switch.css.mjs +0 -59
- package/dist/themes/momotaro/components/tooltip.css.cjs +0 -30
- package/dist/themes/momotaro/components/tooltip.css.mjs +0 -31
- package/dist/themes/momotaro/components/transitions.cjs +0 -3
- package/dist/themes/momotaro/components/transitions.mjs +0 -4
- package/dist/themes/momotaro/index.cjs +0 -2
- package/dist/themes/momotaro/index.mjs +0 -1
- package/dist/themes/momotaro/momotaro.css.cjs +0 -13
- package/dist/themes/momotaro/momotaro.css.mjs +0 -14
- package/dist/themes/momotaro/tokens.css.cjs +0 -85
- package/dist/themes/momotaro/tokens.css.mjs +0 -86
- package/dist/themes/momotaro.cjs +0 -4
- package/dist/themes/momotaro.d.mts +0 -1
- package/dist/themes/momotaro.d.ts +0 -1
- package/dist/themes/momotaro.mjs +0 -4
- package/reset/index.d.ts +0 -1
- package/reset/package.json +0 -5
- package/themes/momotaro/index.d.ts +0 -1
- package/themes/momotaro/package.json +0 -5
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
-
fileScope.setFileScope("src/components/form/Slider/slider.css.ts", "@blockle/blocks");
|
|
6
|
-
const container = css.style({
|
|
7
|
-
"@layer": {
|
|
8
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
position: "relative",
|
|
10
|
-
writingMode: "horizontal-tb"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "container");
|
|
14
|
-
const containerVertical = css.style({
|
|
15
|
-
"@layer": {
|
|
16
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
17
|
-
writingMode: "vertical-lr"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}, "containerVertical");
|
|
21
|
-
const track = css.style({
|
|
22
|
-
"@layer": {
|
|
23
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
24
|
-
cursor: "pointer",
|
|
25
|
-
position: "absolute",
|
|
26
|
-
inlineSize: "100%",
|
|
27
|
-
insetBlockStart: "50%",
|
|
28
|
-
transform: "translateY(-50%)",
|
|
29
|
-
selectors: {
|
|
30
|
-
[`${containerVertical} &`]: {
|
|
31
|
-
transform: "translateX(-50%)"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}, "track");
|
|
37
|
-
const filledTrack = css.style({
|
|
38
|
-
"@layer": {
|
|
39
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
40
|
-
position: "absolute",
|
|
41
|
-
blockSize: "100%",
|
|
42
|
-
borderRadius: "inherit",
|
|
43
|
-
selectors: {
|
|
44
|
-
[`${containerVertical} &`]: {
|
|
45
|
-
insetInlineEnd: "0%"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}, "filledTrack");
|
|
51
|
-
const thumb = css.style({
|
|
52
|
-
"@layer": {
|
|
53
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
54
|
-
cursor: "pointer",
|
|
55
|
-
position: "absolute",
|
|
56
|
-
blockSize: "100%",
|
|
57
|
-
insetBlockStart: "50%",
|
|
58
|
-
transform: "translate(-50%, -50%)",
|
|
59
|
-
touchAction: "none",
|
|
60
|
-
border: "none",
|
|
61
|
-
selectors: {
|
|
62
|
-
[`${containerVertical} &`]: {
|
|
63
|
-
transform: "translate(-50%, 50%)"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}, "thumb");
|
|
69
|
-
fileScope.endFileScope();
|
|
70
|
-
exports.container = container;
|
|
71
|
-
exports.containerVertical = containerVertical;
|
|
72
|
-
exports.filledTrack = filledTrack;
|
|
73
|
-
exports.thumb = thumb;
|
|
74
|
-
exports.track = track;
|
|
@@ -1,75 +0,0 @@
|
|
|
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/Slider/slider.css.ts", "@blockle/blocks");
|
|
5
|
-
const container = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
position: "relative",
|
|
9
|
-
writingMode: "horizontal-tb"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}, "container");
|
|
13
|
-
const containerVertical = style({
|
|
14
|
-
"@layer": {
|
|
15
|
-
[blocksLayer]: {
|
|
16
|
-
writingMode: "vertical-lr"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, "containerVertical");
|
|
20
|
-
const track = style({
|
|
21
|
-
"@layer": {
|
|
22
|
-
[blocksLayer]: {
|
|
23
|
-
cursor: "pointer",
|
|
24
|
-
position: "absolute",
|
|
25
|
-
inlineSize: "100%",
|
|
26
|
-
insetBlockStart: "50%",
|
|
27
|
-
transform: "translateY(-50%)",
|
|
28
|
-
selectors: {
|
|
29
|
-
[`${containerVertical} &`]: {
|
|
30
|
-
transform: "translateX(-50%)"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}, "track");
|
|
36
|
-
const filledTrack = style({
|
|
37
|
-
"@layer": {
|
|
38
|
-
[blocksLayer]: {
|
|
39
|
-
position: "absolute",
|
|
40
|
-
blockSize: "100%",
|
|
41
|
-
borderRadius: "inherit",
|
|
42
|
-
selectors: {
|
|
43
|
-
[`${containerVertical} &`]: {
|
|
44
|
-
insetInlineEnd: "0%"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, "filledTrack");
|
|
50
|
-
const thumb = style({
|
|
51
|
-
"@layer": {
|
|
52
|
-
[blocksLayer]: {
|
|
53
|
-
cursor: "pointer",
|
|
54
|
-
position: "absolute",
|
|
55
|
-
blockSize: "100%",
|
|
56
|
-
insetBlockStart: "50%",
|
|
57
|
-
transform: "translate(-50%, -50%)",
|
|
58
|
-
touchAction: "none",
|
|
59
|
-
border: "none",
|
|
60
|
-
selectors: {
|
|
61
|
-
[`${containerVertical} &`]: {
|
|
62
|
-
transform: "translate(-50%, 50%)"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}, "thumb");
|
|
68
|
-
endFileScope();
|
|
69
|
-
export {
|
|
70
|
-
container,
|
|
71
|
-
containerVertical,
|
|
72
|
-
filledTrack,
|
|
73
|
-
thumb,
|
|
74
|
-
track
|
|
75
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const react = require("react");
|
|
3
|
-
function getProgress(event, rect) {
|
|
4
|
-
const { clientX, clientY } = event;
|
|
5
|
-
const { width, height, left, top } = rect;
|
|
6
|
-
const x = (clientX - left) / width;
|
|
7
|
-
const y = (clientY - top) / height;
|
|
8
|
-
return [x, y];
|
|
9
|
-
}
|
|
10
|
-
function usePointerProgress({ container, orientation, onChange }) {
|
|
11
|
-
react.useEffect(() => {
|
|
12
|
-
const element = container.current;
|
|
13
|
-
function pointerdown(event) {
|
|
14
|
-
event.preventDefault();
|
|
15
|
-
event.stopPropagation();
|
|
16
|
-
if (!element) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const containerRect = element.getBoundingClientRect();
|
|
20
|
-
const axisIndex = orientation === "horizontal" ? 0 : 1;
|
|
21
|
-
const progress = getProgress(event, containerRect);
|
|
22
|
-
onChange(progress[axisIndex]);
|
|
23
|
-
const pointermove = (event2) => {
|
|
24
|
-
event2.preventDefault();
|
|
25
|
-
const progress2 = getProgress(event2, containerRect);
|
|
26
|
-
onChange(progress2[axisIndex]);
|
|
27
|
-
};
|
|
28
|
-
const pointerup = () => {
|
|
29
|
-
document.removeEventListener("pointermove", pointermove);
|
|
30
|
-
document.removeEventListener("pointerup", pointerup);
|
|
31
|
-
};
|
|
32
|
-
document.addEventListener("pointermove", pointermove);
|
|
33
|
-
document.addEventListener("pointerup", pointerup);
|
|
34
|
-
}
|
|
35
|
-
if (!element) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
element.addEventListener("pointerdown", pointerdown);
|
|
39
|
-
return () => {
|
|
40
|
-
element.removeEventListener("pointerdown", pointerdown);
|
|
41
|
-
};
|
|
42
|
-
}, [container, onChange, orientation]);
|
|
43
|
-
}
|
|
44
|
-
exports.usePointerProgress = usePointerProgress;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
function getProgress(event, rect) {
|
|
3
|
-
const { clientX, clientY } = event;
|
|
4
|
-
const { width, height, left, top } = rect;
|
|
5
|
-
const x = (clientX - left) / width;
|
|
6
|
-
const y = (clientY - top) / height;
|
|
7
|
-
return [x, y];
|
|
8
|
-
}
|
|
9
|
-
function usePointerProgress({ container, orientation, onChange }) {
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const element = container.current;
|
|
12
|
-
function pointerdown(event) {
|
|
13
|
-
event.preventDefault();
|
|
14
|
-
event.stopPropagation();
|
|
15
|
-
if (!element) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const containerRect = element.getBoundingClientRect();
|
|
19
|
-
const axisIndex = orientation === "horizontal" ? 0 : 1;
|
|
20
|
-
const progress = getProgress(event, containerRect);
|
|
21
|
-
onChange(progress[axisIndex]);
|
|
22
|
-
const pointermove = (event2) => {
|
|
23
|
-
event2.preventDefault();
|
|
24
|
-
const progress2 = getProgress(event2, containerRect);
|
|
25
|
-
onChange(progress2[axisIndex]);
|
|
26
|
-
};
|
|
27
|
-
const pointerup = () => {
|
|
28
|
-
document.removeEventListener("pointermove", pointermove);
|
|
29
|
-
document.removeEventListener("pointerup", pointerup);
|
|
30
|
-
};
|
|
31
|
-
document.addEventListener("pointermove", pointermove);
|
|
32
|
-
document.addEventListener("pointerup", pointerup);
|
|
33
|
-
}
|
|
34
|
-
if (!element) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
element.addEventListener("pointerdown", pointerdown);
|
|
38
|
-
return () => {
|
|
39
|
-
element.removeEventListener("pointerdown", pointerdown);
|
|
40
|
-
};
|
|
41
|
-
}, [container, onChange, orientation]);
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
usePointerProgress
|
|
45
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
6
|
-
const components_form_Switch_switch_css_cjs = require("./switch.css.cjs");
|
|
7
|
-
const Switch = ({
|
|
8
|
-
checked,
|
|
9
|
-
className,
|
|
10
|
-
defaultChecked,
|
|
11
|
-
onChange,
|
|
12
|
-
ref,
|
|
13
|
-
...restProps
|
|
14
|
-
}) => {
|
|
15
|
-
const [isChecked, setIsChecked] = react.useState(
|
|
16
|
-
defaultChecked || checked || false
|
|
17
|
-
);
|
|
18
|
-
const baseClassName = lib_theme_store_theme_cjs.getComponentStyles("switch", { base: true });
|
|
19
|
-
const sliderClassName = lib_theme_store_theme_cjs.getComponentStyles("switch", { slider: true }, false);
|
|
20
|
-
react.useEffect(() => {
|
|
21
|
-
if (checked !== void 0) {
|
|
22
|
-
setIsChecked(checked);
|
|
23
|
-
}
|
|
24
|
-
}, [checked]);
|
|
25
|
-
const toggle = react.useCallback(() => {
|
|
26
|
-
setIsChecked((checked2) => {
|
|
27
|
-
const newValue = !checked2;
|
|
28
|
-
if (onChange) {
|
|
29
|
-
onChange(newValue);
|
|
30
|
-
}
|
|
31
|
-
return newValue;
|
|
32
|
-
});
|
|
33
|
-
}, [onChange]);
|
|
34
|
-
const onChangeHandler = react.useCallback(
|
|
35
|
-
(event) => {
|
|
36
|
-
setIsChecked(event.target.checked);
|
|
37
|
-
if (onChange) {
|
|
38
|
-
onChange(event.target.checked);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
[onChange]
|
|
42
|
-
);
|
|
43
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: lib_utils_classnames_cjs.classnames(className, components_form_Switch_switch_css_cjs.container, baseClassName),
|
|
47
|
-
"data-checked": isChecked,
|
|
48
|
-
onClick: (event) => {
|
|
49
|
-
if (event.target.tagName === "INPUT") {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
toggle();
|
|
53
|
-
},
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
-
"input",
|
|
57
|
-
{
|
|
58
|
-
ref,
|
|
59
|
-
type: "checkbox",
|
|
60
|
-
className: components_form_Switch_switch_css_cjs.input,
|
|
61
|
-
checked: isChecked,
|
|
62
|
-
onChange: onChangeHandler,
|
|
63
|
-
...restProps
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: sliderClassName, "data-checked": isChecked })
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
) });
|
|
70
|
-
};
|
|
71
|
-
exports.Switch = Switch;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useState, useEffect, useCallback } from "react";
|
|
5
|
-
import { getComponentStyles } from "../../../lib/theme/store/theme.mjs";
|
|
6
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
7
|
-
import { input, container } from "./switch.css.mjs";
|
|
8
|
-
const Switch = ({
|
|
9
|
-
checked,
|
|
10
|
-
className,
|
|
11
|
-
defaultChecked,
|
|
12
|
-
onChange,
|
|
13
|
-
ref,
|
|
14
|
-
...restProps
|
|
15
|
-
}) => {
|
|
16
|
-
const [isChecked, setIsChecked] = useState(
|
|
17
|
-
defaultChecked || checked || false
|
|
18
|
-
);
|
|
19
|
-
const baseClassName = getComponentStyles("switch", { base: true });
|
|
20
|
-
const sliderClassName = getComponentStyles("switch", { slider: true }, false);
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (checked !== void 0) {
|
|
23
|
-
setIsChecked(checked);
|
|
24
|
-
}
|
|
25
|
-
}, [checked]);
|
|
26
|
-
const toggle = useCallback(() => {
|
|
27
|
-
setIsChecked((checked2) => {
|
|
28
|
-
const newValue = !checked2;
|
|
29
|
-
if (onChange) {
|
|
30
|
-
onChange(newValue);
|
|
31
|
-
}
|
|
32
|
-
return newValue;
|
|
33
|
-
});
|
|
34
|
-
}, [onChange]);
|
|
35
|
-
const onChangeHandler = useCallback(
|
|
36
|
-
(event) => {
|
|
37
|
-
setIsChecked(event.target.checked);
|
|
38
|
-
if (onChange) {
|
|
39
|
-
onChange(event.target.checked);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
[onChange]
|
|
43
|
-
);
|
|
44
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
45
|
-
"div",
|
|
46
|
-
{
|
|
47
|
-
className: classnames(className, container, baseClassName),
|
|
48
|
-
"data-checked": isChecked,
|
|
49
|
-
onClick: (event) => {
|
|
50
|
-
if (event.target.tagName === "INPUT") {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
toggle();
|
|
54
|
-
},
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
"input",
|
|
58
|
-
{
|
|
59
|
-
ref,
|
|
60
|
-
type: "checkbox",
|
|
61
|
-
className: input,
|
|
62
|
-
checked: isChecked,
|
|
63
|
-
onChange: onChangeHandler,
|
|
64
|
-
...restProps
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ jsx("div", { className: sliderClassName, "data-checked": isChecked })
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
) });
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
Switch
|
|
74
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
-
const css = require("@vanilla-extract/css");
|
|
4
|
-
const lib_css_layers_layers_css_cjs = require("../../../lib/css/layers/layers.css.cjs");
|
|
5
|
-
fileScope.setFileScope("src/components/form/Switch/switch.css.ts", "@blockle/blocks");
|
|
6
|
-
const container = css.style({
|
|
7
|
-
"@layer": {
|
|
8
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
9
|
-
cursor: "pointer",
|
|
10
|
-
userSelect: "none",
|
|
11
|
-
position: "relative"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}, "container");
|
|
15
|
-
const input = css.style({
|
|
16
|
-
"@layer": {
|
|
17
|
-
[lib_css_layers_layers_css_cjs.blocksLayer]: {
|
|
18
|
-
opacity: 0,
|
|
19
|
-
maxBlockSize: 0,
|
|
20
|
-
maxInlineSize: 0
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, "input");
|
|
24
|
-
fileScope.endFileScope();
|
|
25
|
-
exports.container = container;
|
|
26
|
-
exports.input = input;
|
|
@@ -1,27 +0,0 @@
|
|
|
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/Switch/switch.css.ts", "@blockle/blocks");
|
|
5
|
-
const container = style({
|
|
6
|
-
"@layer": {
|
|
7
|
-
[blocksLayer]: {
|
|
8
|
-
cursor: "pointer",
|
|
9
|
-
userSelect: "none",
|
|
10
|
-
position: "relative"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}, "container");
|
|
14
|
-
const input = style({
|
|
15
|
-
"@layer": {
|
|
16
|
-
[blocksLayer]: {
|
|
17
|
-
opacity: 0,
|
|
18
|
-
maxBlockSize: 0,
|
|
19
|
-
maxInlineSize: 0
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}, "input");
|
|
23
|
-
endFileScope();
|
|
24
|
-
export {
|
|
25
|
-
container,
|
|
26
|
-
input
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_asChildRenderer_createAsChildTemplate_cjs = require("../../../lib/asChildRenderer/createAsChildTemplate.cjs");
|
|
4
|
-
const lib_utils_atomProps_cjs = require("../../../lib/utils/atom-props.cjs");
|
|
5
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
6
|
-
const lib_css_atoms_sprinkles_css_cjs = require("../../../lib/css/atoms/sprinkles.css.cjs");
|
|
7
|
-
const { Template, Slot } = lib_asChildRenderer_createAsChildTemplate_cjs.createAsChildTemplate("div");
|
|
8
|
-
const Box = ({
|
|
9
|
-
asChild,
|
|
10
|
-
className,
|
|
11
|
-
children,
|
|
12
|
-
ref,
|
|
13
|
-
...restProps
|
|
14
|
-
}) => {
|
|
15
|
-
const [atomsProps, otherProps] = lib_utils_atomProps_cjs.getAtomsAndProps(restProps);
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
Template,
|
|
18
|
-
{
|
|
19
|
-
ref,
|
|
20
|
-
asChild,
|
|
21
|
-
className: lib_utils_classnames_cjs.classnames(className, lib_css_atoms_sprinkles_css_cjs.atoms(atomsProps)),
|
|
22
|
-
...otherProps,
|
|
23
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Slot, { children })
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
exports.Box = Box;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createAsChildTemplate } from "../../../lib/asChildRenderer/createAsChildTemplate.mjs";
|
|
3
|
-
import { getAtomsAndProps } from "../../../lib/utils/atom-props.mjs";
|
|
4
|
-
import { classnames } from "../../../lib/utils/classnames.mjs";
|
|
5
|
-
import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
|
|
6
|
-
const { Template, Slot } = createAsChildTemplate("div");
|
|
7
|
-
const Box = ({
|
|
8
|
-
asChild,
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
ref,
|
|
12
|
-
...restProps
|
|
13
|
-
}) => {
|
|
14
|
-
const [atomsProps, otherProps] = getAtomsAndProps(restProps);
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
Template,
|
|
17
|
-
{
|
|
18
|
-
ref,
|
|
19
|
-
asChild,
|
|
20
|
-
className: classnames(className, atoms(atomsProps)),
|
|
21
|
-
...otherProps,
|
|
22
|
-
children: /* @__PURE__ */ jsx(Slot, { children })
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
Box
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_css_flexbox_flexbox_cjs = require("../../../lib/css/flexbox/flexbox.cjs");
|
|
4
|
-
const components_layout_Box_Box_cjs = require("../Box/Box.cjs");
|
|
5
|
-
const Inline = ({
|
|
6
|
-
alignX,
|
|
7
|
-
alignY,
|
|
8
|
-
tag: Tag = "div",
|
|
9
|
-
children,
|
|
10
|
-
display = "flex",
|
|
11
|
-
spacing,
|
|
12
|
-
...props
|
|
13
|
-
}) => {
|
|
14
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
components_layout_Box_Box_cjs.Box,
|
|
16
|
-
{
|
|
17
|
-
asChild: true,
|
|
18
|
-
display,
|
|
19
|
-
gap: spacing,
|
|
20
|
-
flexDirection: "row",
|
|
21
|
-
justifyContent: alignX ? lib_css_flexbox_flexbox_cjs.justifyContentMap[alignX] : void 0,
|
|
22
|
-
alignItems: alignY ? lib_css_flexbox_flexbox_cjs.alignItemsMap[alignY] : void 0,
|
|
23
|
-
flexWrap: "wrap",
|
|
24
|
-
...props,
|
|
25
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Tag, { children })
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
exports.Inline = Inline;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { alignItemsMap, justifyContentMap } from "../../../lib/css/flexbox/flexbox.mjs";
|
|
3
|
-
import { Box } from "../Box/Box.mjs";
|
|
4
|
-
const Inline = ({
|
|
5
|
-
alignX,
|
|
6
|
-
alignY,
|
|
7
|
-
tag: Tag = "div",
|
|
8
|
-
children,
|
|
9
|
-
display = "flex",
|
|
10
|
-
spacing,
|
|
11
|
-
...props
|
|
12
|
-
}) => {
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
Box,
|
|
15
|
-
{
|
|
16
|
-
asChild: true,
|
|
17
|
-
display,
|
|
18
|
-
gap: spacing,
|
|
19
|
-
flexDirection: "row",
|
|
20
|
-
justifyContent: alignX ? justifyContentMap[alignX] : void 0,
|
|
21
|
-
alignItems: alignY ? alignItemsMap[alignY] : void 0,
|
|
22
|
-
flexWrap: "wrap",
|
|
23
|
-
...props,
|
|
24
|
-
children: /* @__PURE__ */ jsx(Tag, { children })
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
Inline
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_css_flexbox_flexbox_cjs = require("../../../lib/css/flexbox/flexbox.cjs");
|
|
4
|
-
const components_layout_Box_Box_cjs = require("../Box/Box.cjs");
|
|
5
|
-
const Stack = ({
|
|
6
|
-
tag: Tag = "div",
|
|
7
|
-
display = "flex",
|
|
8
|
-
children,
|
|
9
|
-
spacing,
|
|
10
|
-
alignX,
|
|
11
|
-
...restProps
|
|
12
|
-
}) => {
|
|
13
|
-
if (process.env.NODE_ENV === "development" && restProps.start !== void 0 && Tag !== "ol") {
|
|
14
|
-
console.warn('Stack: "start" prop is only valid with tag="ol"');
|
|
15
|
-
}
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
components_layout_Box_Box_cjs.Box,
|
|
18
|
-
{
|
|
19
|
-
asChild: true,
|
|
20
|
-
display,
|
|
21
|
-
gap: spacing,
|
|
22
|
-
flexDirection: "column",
|
|
23
|
-
alignItems: alignX ? lib_css_flexbox_flexbox_cjs.alignItemsMap[alignX] : void 0,
|
|
24
|
-
...restProps,
|
|
25
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Tag, { children })
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
exports.Stack = Stack;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { alignItemsMap } from "../../../lib/css/flexbox/flexbox.mjs";
|
|
3
|
-
import { Box } from "../Box/Box.mjs";
|
|
4
|
-
const Stack = ({
|
|
5
|
-
tag: Tag = "div",
|
|
6
|
-
display = "flex",
|
|
7
|
-
children,
|
|
8
|
-
spacing,
|
|
9
|
-
alignX,
|
|
10
|
-
...restProps
|
|
11
|
-
}) => {
|
|
12
|
-
if (process.env.NODE_ENV === "development" && restProps.start !== void 0 && Tag !== "ol") {
|
|
13
|
-
console.warn('Stack: "start" prop is only valid with tag="ol"');
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
Box,
|
|
17
|
-
{
|
|
18
|
-
asChild: true,
|
|
19
|
-
display,
|
|
20
|
-
gap: spacing,
|
|
21
|
-
flexDirection: "column",
|
|
22
|
-
alignItems: alignX ? alignItemsMap[alignX] : void 0,
|
|
23
|
-
...restProps,
|
|
24
|
-
children: /* @__PURE__ */ jsx(Tag, { children })
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
Stack
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const lib_asChildRenderer_createAsChildTemplate_cjs = require("../../../lib/asChildRenderer/createAsChildTemplate.cjs");
|
|
4
|
-
const lib_theme_store_theme_cjs = require("../../../lib/theme/store/theme.cjs");
|
|
5
|
-
const lib_utils_classnames_cjs = require("../../../lib/utils/classnames.cjs");
|
|
6
|
-
const { Template, Slot } = lib_asChildRenderer_createAsChildTemplate_cjs.createAsChildTemplate("a");
|
|
7
|
-
const Link = ({
|
|
8
|
-
asChild,
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
ref,
|
|
12
|
-
underline,
|
|
13
|
-
variant,
|
|
14
|
-
...restProps
|
|
15
|
-
}) => {
|
|
16
|
-
const linkClassName = lib_theme_store_theme_cjs.getComponentStyles("link", {
|
|
17
|
-
base: true,
|
|
18
|
-
variants: { variant, underline }
|
|
19
|
-
});
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
-
Template,
|
|
22
|
-
{
|
|
23
|
-
asChild,
|
|
24
|
-
ref,
|
|
25
|
-
className: lib_utils_classnames_cjs.classnames(className, linkClassName),
|
|
26
|
-
...restProps,
|
|
27
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Slot, { children })
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
exports.Link = Link;
|