@xwadex/fesd-next 0.3.44-beta.6 → 0.3.44-beta.7
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/scrollAreas/index.d.ts +4 -5
- package/dist/components/scrollAreas/scrollArea.d.ts +3 -3
- package/dist/components/scrollAreas/scrollArea.js +2 -8
- package/dist/components/scrollAreas/scrollBar.d.ts +1 -2
- package/dist/components/scrollAreas/scrollBar.js +2 -2
- package/package.json +1 -1
|
@@ -2,17 +2,16 @@ export declare const ScrollAreas: {
|
|
|
2
2
|
Root: {
|
|
3
3
|
(props: import("@radix-ui/react-scroll-area").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
4
4
|
viewportClassName?: string;
|
|
5
|
-
trackClassName?: string;
|
|
6
5
|
barClassName?: string;
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
thumbClassName?: string;
|
|
7
|
+
forceMount?: true;
|
|
8
|
+
orientation: "horizontal" | "vertical";
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
Handle: {
|
|
13
13
|
(props: import("@radix-ui/react-scroll-area").ScrollAreaScrollbarProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
14
|
-
|
|
15
|
-
barClassName?: string;
|
|
14
|
+
thumbClassName?: string;
|
|
16
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
displayName: string;
|
|
18
17
|
};
|
|
@@ -2,10 +2,10 @@ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
|
2
2
|
import type { ComponentProps } from "../../types/index.js";
|
|
3
3
|
type PropsType = ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
|
4
4
|
viewportClassName?: string;
|
|
5
|
-
trackClassName?: string;
|
|
6
5
|
barClassName?: string;
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
thumbClassName?: string;
|
|
7
|
+
forceMount?: true;
|
|
8
|
+
orientation: "horizontal" | "vertical";
|
|
9
9
|
};
|
|
10
10
|
declare const ScrollArea: {
|
|
11
11
|
(props: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,14 +4,8 @@ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
|
4
4
|
import ScrollBar from "./scrollBar";
|
|
5
5
|
import { cn } from "../../utils/index.js";
|
|
6
6
|
const ScrollArea = (props) => {
|
|
7
|
-
const { className, viewportClassName,
|
|
8
|
-
|
|
9
|
-
className: trackClassName,
|
|
10
|
-
barProps: barProps,
|
|
11
|
-
barClassName: barClassName,
|
|
12
|
-
...trackProps,
|
|
13
|
-
};
|
|
14
|
-
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...restProps, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: cn("focus-visible:ring-ring/50", "size-full", "rounded-[inherit]", "transition-[color,box-shadow]", "outline-none", "focus-visible:ring-[3px]", "focus-visible:outline-1", viewportClassName), children: children }), _jsx(ScrollBar, { ...barTrackProps }), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
|
+
const { className, viewportClassName, barClassName, thumbClassName, forceMount, orientation = "vertical", children, ...restProps } = props;
|
|
8
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...restProps, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: cn("focus-visible:ring-ring/50", "size-full", "rounded-[inherit]", "transition-[color,box-shadow]", "outline-none", "focus-visible:ring-[3px]", "focus-visible:outline-1", viewportClassName), children: children }), _jsx(ScrollBar, { forceMount: forceMount, orientation: orientation, thumbClassName: thumbClassName }), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
15
9
|
};
|
|
16
10
|
ScrollArea.displayName = "ScrollArea";
|
|
17
11
|
export default ScrollArea;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2
2
|
import type { ComponentProps } from "../../types/index.js";
|
|
3
3
|
type PropsType = ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & {
|
|
4
|
-
|
|
5
|
-
barClassName?: string;
|
|
4
|
+
thumbClassName?: string;
|
|
6
5
|
};
|
|
7
6
|
declare const ScrollBar: {
|
|
8
7
|
(props: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4
4
|
import { cn } from "../../utils/index.js";
|
|
5
5
|
const ScrollBar = (props) => {
|
|
6
|
-
const { className, orientation = "vertical",
|
|
7
|
-
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex", "touch-none", "p-px", "transition-colors", "select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...restProps, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: cn("bg-border", "relative", "flex-1", "rounded-full",
|
|
6
|
+
const { className, orientation = "vertical", thumbClassName, ...restProps } = props;
|
|
7
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex", "touch-none", "p-px", "transition-colors", "select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...restProps, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: cn("bg-border", "relative", "flex-1", "rounded-full", thumbClassName) }) }));
|
|
8
8
|
};
|
|
9
9
|
ScrollBar.displayName = "ScrollBar";
|
|
10
10
|
export default ScrollBar;
|