@blockle/blocks-react 1.1.1 → 1.2.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/components/accessibility/VisuallyHidden/VisuallyHidden.stories.d.ts +1 -1
- package/dist/components/display/Divider/Divider.js +2 -2
- package/dist/components/display/Divider/Divider.stories.d.ts +1 -1
- package/dist/components/display/Divider/divider.css.js +2 -2
- package/dist/components/feedback/Progress/Progress.stories.d.ts +1 -1
- package/dist/components/feedback/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/form/Button/Button.css.js +2 -2
- package/dist/components/form/Button/Button.js +2 -2
- package/dist/components/form/Button/Button.stories.d.ts +1 -1
- package/dist/components/form/Checkbox/Checkbox.js +1 -1
- package/dist/components/form/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/form/Checkbox/checkbox.css.js +3 -3
- package/dist/components/form/Input/Input.js +2 -2
- package/dist/components/form/Input/Input.stories.d.ts +1 -1
- package/dist/components/form/Input/input.css.js +2 -2
- package/dist/components/form/Label/Label.stories.d.ts +1 -1
- package/dist/components/form/Radio/Radio.js +1 -1
- package/dist/components/form/Radio/Radio.stories.d.ts +1 -1
- package/dist/components/form/Radio/radio.css.js +3 -3
- package/dist/components/form/Select/Select.js +1 -1
- package/dist/components/form/Select/Select.stories.d.ts +1 -1
- package/dist/components/form/Select/select.css.js +4 -4
- package/dist/components/form/Slider/Slider.js +1 -1
- package/dist/components/form/Slider/Slider.stories.d.ts +1 -1
- package/dist/components/form/Slider/slider.css.js +6 -6
- package/dist/components/form/Switch/Switch.js +1 -1
- package/dist/components/form/Switch/Switch.stories.d.ts +1 -1
- package/dist/components/form/Switch/switch.css.js +3 -3
- package/dist/components/layout/Box/Box.stories.d.ts +1 -1
- package/dist/components/layout/Inline/Inline.stories.d.ts +1 -1
- package/dist/components/layout/Stack/Stack.stories.d.ts +1 -1
- package/dist/components/navigation/Link/Link.stories.d.ts +1 -1
- package/dist/components/overlay/Dialog/Dialog.js +5 -5
- package/dist/components/overlay/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/components/overlay/Dialog/dialog.css.js +2 -2
- package/dist/components/overlay/Popover/Popover.js +2 -2
- package/dist/components/overlay/Popover/Popover.stories.d.ts +1 -1
- package/dist/components/overlay/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/overlay/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/typography/Heading/Heading.js +1 -1
- package/dist/components/typography/Heading/heading.css.js +2 -2
- package/dist/components/typography/Heading/heading.stories.d.ts +1 -1
- package/dist/components/typography/Text/Text.js +1 -1
- package/dist/components/typography/Text/Text.stories.d.ts +1 -1
- package/dist/components/typography/Text/text.css.js +2 -2
- package/dist/index.d.ts +28 -27
- package/package.json +8 -14
- package/dist/components/accessibility/VisuallyHidden/VisuallyHidden.cjs +0 -20
- package/dist/components/accessibility/VisuallyHidden/index.d.ts +0 -1
- package/dist/components/accessibility/VisuallyHidden/visually-hidden.css.cjs +0 -16
- package/dist/components/display/Divider/Divider.cjs +0 -28
- package/dist/components/display/Divider/divider.css.cjs +0 -16
- package/dist/components/display/Divider/index.d.ts +0 -1
- package/dist/components/feedback/Progress/Progress.cjs +0 -55
- package/dist/components/feedback/Progress/index.d.ts +0 -1
- package/dist/components/feedback/Spinner/Spinner.cjs +0 -27
- package/dist/components/feedback/Spinner/index.d.ts +0 -1
- package/dist/components/form/Button/Button.cjs +0 -58
- package/dist/components/form/Button/Button.css.cjs +0 -16
- package/dist/components/form/Button/index.d.ts +0 -1
- package/dist/components/form/Checkbox/Checkbox.cjs +0 -80
- package/dist/components/form/Checkbox/checkbox.css.cjs +0 -32
- package/dist/components/form/Checkbox/index.d.ts +0 -1
- package/dist/components/form/Input/Input.cjs +0 -52
- package/dist/components/form/Input/index.d.ts +0 -1
- package/dist/components/form/Input/input.css.cjs +0 -21
- package/dist/components/form/Label/Label.cjs +0 -30
- package/dist/components/form/Label/index.d.ts +0 -1
- package/dist/components/form/Radio/Radio.cjs +0 -50
- package/dist/components/form/Radio/index.d.ts +0 -2
- package/dist/components/form/Radio/radio.css.cjs +0 -32
- package/dist/components/form/Select/Select.cjs +0 -73
- package/dist/components/form/Select/index.d.ts +0 -1
- package/dist/components/form/Select/select.css.cjs +0 -38
- package/dist/components/form/Slider/Slider.cjs +0 -139
- package/dist/components/form/Slider/index.d.ts +0 -1
- package/dist/components/form/Slider/slider.css.cjs +0 -75
- package/dist/components/form/Slider/usePointerProgress.cjs +0 -46
- package/dist/components/form/Switch/Switch.cjs +0 -73
- package/dist/components/form/Switch/index.d.ts +0 -1
- package/dist/components/form/Switch/switch.css.cjs +0 -27
- package/dist/components/layout/Box/Box.cjs +0 -26
- package/dist/components/layout/Box/index.d.ts +0 -1
- package/dist/components/layout/Inline/Inline.cjs +0 -30
- package/dist/components/layout/Inline/index.d.ts +0 -1
- package/dist/components/layout/Stack/Stack.cjs +0 -27
- package/dist/components/layout/Stack/index.d.ts +0 -1
- package/dist/components/navigation/Link/Link.cjs +0 -33
- package/dist/components/navigation/Link/index.d.ts +0 -1
- package/dist/components/overlay/Dialog/Dialog.cjs +0 -82
- package/dist/components/overlay/Dialog/dialog.css.cjs +0 -22
- package/dist/components/overlay/Dialog/dialogHelper.cjs +0 -21
- package/dist/components/overlay/Dialog/index.d.ts +0 -1
- package/dist/components/overlay/Popover/Popover.cjs +0 -106
- package/dist/components/overlay/Popover/index.d.ts +0 -1
- package/dist/components/overlay/Popover/popover-utils.cjs +0 -57
- package/dist/components/overlay/Portal/Portal.cjs +0 -15
- package/dist/components/overlay/Portal/index.d.ts +0 -1
- package/dist/components/overlay/Tooltip/Tooltip.cjs +0 -73
- package/dist/components/overlay/Tooltip/index.d.ts +0 -1
- package/dist/components/providers/BlocksProvider/BlocksProvider.cjs +0 -35
- package/dist/components/providers/BlocksProvider/context.cjs +0 -5
- package/dist/components/providers/BlocksProvider/index.d.ts +0 -2
- package/dist/components/typography/Heading/Heading.cjs +0 -24
- package/dist/components/typography/Heading/heading.css.cjs +0 -16
- package/dist/components/typography/Heading/index.d.ts +0 -1
- package/dist/components/typography/Text/Text.cjs +0 -21
- package/dist/components/typography/Text/index.d.ts +0 -1
- package/dist/components/typography/Text/text.css.cjs +0 -16
- package/dist/hooks/useClickOutside/useClickOutside.cjs +0 -23
- package/dist/hooks/useComponentStyles/index.d.ts +0 -2
- package/dist/hooks/useComponentStyles/useComponentStyleDefaultProps.cjs +0 -12
- package/dist/hooks/useComponentStyles/useComponentStyles.cjs +0 -74
- package/dist/hooks/useControlledValue/index.d.ts +0 -1
- package/dist/hooks/useControlledValue/useControlledValue.cjs +0 -33
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +0 -6
- package/dist/hooks/useKeyboard/index.d.ts +0 -1
- package/dist/hooks/useKeyboard/useKeyboard.cjs +0 -21
- package/dist/hooks/useLayer/index.d.ts +0 -1
- package/dist/hooks/usePreventBodyScroll/index.d.ts +0 -1
- package/dist/hooks/usePreventBodyScroll/usePreventBodyScroll.cjs +0 -31
- package/dist/hooks/useRestoreFocus/index.d.ts +0 -1
- package/dist/hooks/useRestoreFocus/useRestoreFocus.cjs +0 -19
- package/dist/hooks/useTheme/index.d.ts +0 -1
- package/dist/hooks/useTheme/useTheme.cjs +0 -13
- package/dist/hooks/useVisibilityState/index.d.ts +0 -1
- package/dist/index.cjs +0 -58
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { VisuallyHidden, VisuallyHiddenProps } from './VisuallyHidden';
|
|
2
|
+
import { VisuallyHidden, VisuallyHiddenProps } from './VisuallyHidden.js';
|
|
3
3
|
declare const meta: Meta<typeof VisuallyHidden>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<VisuallyHiddenProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { classnames } from "@blockle/blocks-core";
|
|
4
|
-
import { divider } from "./divider.css.js";
|
|
5
|
-
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
6
4
|
import { useComponentStyleDefaultProps } from "../../../hooks/useComponentStyles/useComponentStyleDefaultProps.js";
|
|
5
|
+
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
7
6
|
import { Box } from "../../layout/Box/Box.js";
|
|
7
|
+
import { divider } from "./divider.css.js";
|
|
8
8
|
const Divider = ({
|
|
9
9
|
className,
|
|
10
10
|
color,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/display/Divider/divider.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const divider = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
clear: "both",
|
|
9
9
|
blockSize: "1px"
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Button/Button.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const buttonReset = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
all: "unset",
|
|
9
9
|
cursor: "pointer"
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
3
4
|
import { getAtomsAndProps, classnames, atoms } from "@blockle/blocks-core";
|
|
4
5
|
import { createSlottable } from "@blockle/blocks-react-slot";
|
|
5
|
-
import { buttonReset } from "./Button.css.js";
|
|
6
|
-
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
7
6
|
import { Spinner } from "../../feedback/Spinner/Spinner.js";
|
|
7
|
+
import { buttonReset } from "./Button.css.js";
|
|
8
8
|
const [Template, Slot] = createSlottable("button");
|
|
9
9
|
const Button = ({
|
|
10
10
|
asChild,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { classnames } from "@blockle/blocks-core";
|
|
4
4
|
import { useId } from "react";
|
|
5
|
+
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
5
6
|
import { Label } from "../Label/Label.js";
|
|
6
7
|
import { input, icon, container } from "./checkbox.css.js";
|
|
7
|
-
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
8
8
|
const Checkbox = ({
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Checkbox/checkbox.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const container = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
position: "relative",
|
|
9
9
|
cursor: "pointer",
|
|
10
10
|
overflow: "hidden"
|
|
@@ -16,7 +16,7 @@ const input = style({
|
|
|
16
16
|
inset: 0,
|
|
17
17
|
opacity: 0,
|
|
18
18
|
"@layer": {
|
|
19
|
-
[
|
|
19
|
+
[blocksLayerComponent]: {
|
|
20
20
|
all: "unset"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useId } from "react";
|
|
4
|
-
import { classnames } from "@blockle/blocks-core";
|
|
5
|
-
import { input } from "./input.css.js";
|
|
6
4
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
5
|
+
import { classnames } from "@blockle/blocks-core";
|
|
7
6
|
import { Box } from "../../layout/Box/Box.js";
|
|
7
|
+
import { input } from "./input.css.js";
|
|
8
8
|
const Input = ({
|
|
9
9
|
className,
|
|
10
10
|
endSlot,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Input, InputProps } from './Input';
|
|
2
|
+
import { Input, InputProps } from './Input.js';
|
|
3
3
|
declare const _default: Meta<typeof Input>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<InputProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Input/input.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const input = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
appearance: "none",
|
|
9
9
|
width: "100%",
|
|
10
10
|
selectors: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { classnames } from "@blockle/blocks-core";
|
|
4
4
|
import { useId } from "react";
|
|
5
|
-
import { input, icon, container } from "./radio.css.js";
|
|
6
5
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
7
6
|
import { Label } from "../Label/Label.js";
|
|
7
|
+
import { input, icon, container } from "./radio.css.js";
|
|
8
8
|
const Radio = ({
|
|
9
9
|
name,
|
|
10
10
|
children,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Radio/radio.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const container = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
position: "relative",
|
|
9
9
|
cursor: "pointer",
|
|
10
10
|
overflow: "hidden"
|
|
@@ -16,7 +16,7 @@ const input = style({
|
|
|
16
16
|
inset: 0,
|
|
17
17
|
opacity: 0,
|
|
18
18
|
"@layer": {
|
|
19
|
-
[
|
|
19
|
+
[blocksLayerComponent]: {
|
|
20
20
|
all: "unset"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { classnames } from "@blockle/blocks-core";
|
|
4
|
-
import { select, icon, wrapper } from "./select.css.js";
|
|
5
4
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
6
5
|
import { Box } from "../../layout/Box/Box.js";
|
|
6
|
+
import { select, icon, wrapper } from "./select.css.js";
|
|
7
7
|
const Select = ({
|
|
8
8
|
children,
|
|
9
9
|
placeholder,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Select, SelectProps } from './Select';
|
|
2
|
+
import { Select, SelectProps } from './Select.js';
|
|
3
3
|
declare const _default: Meta<typeof Select>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<SelectProps>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Select/select.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const wrapper = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
position: "relative"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const select = style({
|
|
13
13
|
"@layer": {
|
|
14
|
-
[
|
|
14
|
+
[blocksLayerComponent]: {
|
|
15
15
|
appearance: "none",
|
|
16
16
|
inlineSize: "100%"
|
|
17
17
|
}
|
|
@@ -19,7 +19,7 @@ const select = style({
|
|
|
19
19
|
});
|
|
20
20
|
const icon = style({
|
|
21
21
|
"@layer": {
|
|
22
|
-
[
|
|
22
|
+
[blocksLayerComponent]: {
|
|
23
23
|
position: "absolute",
|
|
24
24
|
right: 0,
|
|
25
25
|
top: 0,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { classnames, roundToPrecision, getBoundValue } from "@blockle/blocks-core";
|
|
4
4
|
import { useRef, useCallback } from "react";
|
|
5
|
+
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
5
6
|
import { useControlledValue } from "../../../hooks/useControlledValue/useControlledValue.js";
|
|
6
7
|
import { filledTrack, track, thumb, container, containerVertical } from "./slider.css.js";
|
|
7
8
|
import { usePointerProgress } from "./usePointerProgress.js";
|
|
8
|
-
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
9
9
|
const usableKeys = /* @__PURE__ */ new Set([
|
|
10
10
|
"ArrowLeft",
|
|
11
11
|
"ArrowRight",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Slider, SliderProps } from './Slider';
|
|
2
|
+
import { Slider, SliderProps } from './Slider.js';
|
|
3
3
|
declare const _default: Meta<typeof Slider>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<SliderProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Slider/slider.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const container = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
position: "relative",
|
|
9
9
|
writingMode: "horizontal-tb"
|
|
10
10
|
}
|
|
@@ -12,14 +12,14 @@ const container = style({
|
|
|
12
12
|
});
|
|
13
13
|
const containerVertical = style({
|
|
14
14
|
"@layer": {
|
|
15
|
-
[
|
|
15
|
+
[blocksLayerComponent]: {
|
|
16
16
|
writingMode: "vertical-lr"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const track = style({
|
|
21
21
|
"@layer": {
|
|
22
|
-
[
|
|
22
|
+
[blocksLayerComponent]: {
|
|
23
23
|
cursor: "pointer",
|
|
24
24
|
position: "absolute",
|
|
25
25
|
inlineSize: "100%",
|
|
@@ -35,7 +35,7 @@ const track = style({
|
|
|
35
35
|
});
|
|
36
36
|
const filledTrack = style({
|
|
37
37
|
"@layer": {
|
|
38
|
-
[
|
|
38
|
+
[blocksLayerComponent]: {
|
|
39
39
|
position: "absolute",
|
|
40
40
|
blockSize: "100%",
|
|
41
41
|
borderRadius: "inherit",
|
|
@@ -49,7 +49,7 @@ const filledTrack = style({
|
|
|
49
49
|
});
|
|
50
50
|
const thumb = style({
|
|
51
51
|
"@layer": {
|
|
52
|
-
[
|
|
52
|
+
[blocksLayerComponent]: {
|
|
53
53
|
cursor: "pointer",
|
|
54
54
|
position: "absolute",
|
|
55
55
|
blockSize: "100%",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { classnames } from "@blockle/blocks-core";
|
|
4
4
|
import { useState, useEffect, useCallback } from "react";
|
|
5
|
-
import { input, container } from "./switch.css.js";
|
|
6
5
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
6
|
+
import { input, container } from "./switch.css.js";
|
|
7
7
|
const Switch = ({
|
|
8
8
|
checked,
|
|
9
9
|
className,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/form/Switch/switch.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const container = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
cursor: "pointer",
|
|
9
9
|
userSelect: "none",
|
|
10
10
|
position: "relative"
|
|
@@ -13,7 +13,7 @@ const container = style({
|
|
|
13
13
|
});
|
|
14
14
|
const input = style({
|
|
15
15
|
"@layer": {
|
|
16
|
-
[
|
|
16
|
+
[blocksLayerComponent]: {
|
|
17
17
|
opacity: 0,
|
|
18
18
|
maxBlockSize: 0,
|
|
19
19
|
maxInlineSize: 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Inline, InlineProps } from './Inline';
|
|
2
|
+
import { Inline, InlineProps } from './Inline.js';
|
|
3
3
|
declare const _default: Meta<typeof Inline>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<InlineProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Stack, StackProps } from './Stack';
|
|
2
|
+
import { Stack, StackProps } from './Stack.js';
|
|
3
3
|
declare const _default: Meta<typeof Stack>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<StackProps>;
|
|
@@ -3,13 +3,13 @@ import { jsx, Fragment } from "react/jsx-runtime";
|
|
|
3
3
|
import { hasAnimationDuration, classnames } from "@blockle/blocks-core";
|
|
4
4
|
import { useRef, useState, useCallback } from "react";
|
|
5
5
|
import { useClickOutside } from "../../../hooks/useClickOutside/useClickOutside.js";
|
|
6
|
-
import { dialog } from "./dialog.css.js";
|
|
7
|
-
import { useNestedDialog, DialogContext } from "./dialogHelper.js";
|
|
8
6
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
9
|
-
import { useRestoreFocus } from "../../../hooks/useRestoreFocus/useRestoreFocus.js";
|
|
10
|
-
import { usePreventBodyScroll } from "../../../hooks/usePreventBodyScroll/usePreventBodyScroll.js";
|
|
11
|
-
import { useKeyboard } from "../../../hooks/useKeyboard/useKeyboard.js";
|
|
12
7
|
import { useIsomorphicLayoutEffect } from "../../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
|
8
|
+
import { useKeyboard } from "../../../hooks/useKeyboard/useKeyboard.js";
|
|
9
|
+
import { usePreventBodyScroll } from "../../../hooks/usePreventBodyScroll/usePreventBodyScroll.js";
|
|
10
|
+
import { useRestoreFocus } from "../../../hooks/useRestoreFocus/useRestoreFocus.js";
|
|
11
|
+
import { dialog } from "./dialog.css.js";
|
|
12
|
+
import { useNestedDialog, DialogContext } from "./dialogHelper.js";
|
|
13
13
|
const Dialog = ({
|
|
14
14
|
children,
|
|
15
15
|
open,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/overlay/Dialog/dialog.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const dialog = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
position: "fixed",
|
|
9
9
|
inset: 0,
|
|
10
10
|
border: "none",
|
|
@@ -3,11 +3,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { hasAnimationDuration, classnames } from "@blockle/blocks-core";
|
|
4
4
|
import { useRef, useState, useEffect, useCallback } from "react";
|
|
5
5
|
import { useClickOutside } from "../../../hooks/useClickOutside/useClickOutside.js";
|
|
6
|
-
import { getPopoverPosition } from "./popover-utils.js";
|
|
7
6
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
8
|
-
import { useKeyboard } from "../../../hooks/useKeyboard/useKeyboard.js";
|
|
9
7
|
import { useIsomorphicLayoutEffect } from "../../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
|
8
|
+
import { useKeyboard } from "../../../hooks/useKeyboard/useKeyboard.js";
|
|
10
9
|
import { Box } from "../../layout/Box/Box.js";
|
|
10
|
+
import { getPopoverPosition } from "./popover-utils.js";
|
|
11
11
|
const Popover = ({
|
|
12
12
|
anchorElement,
|
|
13
13
|
children,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentThemes } from '@blockle/blocks-core';
|
|
2
|
-
import { PopoverProps } from '../Popover';
|
|
2
|
+
import { PopoverProps } from '../Popover/Popover.js';
|
|
3
3
|
type ReactElement = React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
4
4
|
type TooltipTheme = ComponentThemes['tooltip'];
|
|
5
5
|
export type TooltipProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { classnames } from "@blockle/blocks-core";
|
|
3
|
-
import { heading } from "./heading.css.js";
|
|
4
3
|
import { Box } from "../../layout/Box/Box.js";
|
|
4
|
+
import { heading } from "./heading.css.js";
|
|
5
5
|
const Heading = ({
|
|
6
6
|
className,
|
|
7
7
|
level = 1,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/typography/Heading/heading.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const heading = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
margin: 0,
|
|
9
9
|
padding: 0
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Heading, HeadingProps } from './Heading';
|
|
2
|
+
import { Heading, HeadingProps } from './Heading.js';
|
|
3
3
|
declare const _default: Meta<typeof Heading>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryObj<HeadingProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { blocksLayerComponent } from "@blockle/blocks-core";
|
|
3
3
|
import { style } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/typography/Text/text.css.ts", "@blockle/blocks-react");
|
|
5
5
|
const text = style({
|
|
6
6
|
"@layer": {
|
|
7
|
-
[
|
|
7
|
+
[blocksLayerComponent]: {
|
|
8
8
|
margin: 0,
|
|
9
9
|
padding: 0
|
|
10
10
|
}
|