UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

47 lines (43 loc) 1.68 kB
'use strict'; var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs'); var radixUi = require('radix-ui'); var jsxRuntime = require('react/jsx-runtime'); function ScrollBar({ className, orientation = "vertical", ...props }) { return /* @__PURE__ */ jsxRuntime.jsx( radixUi.ScrollArea.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation, className: chunkH2BWO3SI_cjs.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 ), ...props, children: /* @__PURE__ */ jsxRuntime.jsx( radixUi.ScrollArea.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded" } ) } ); } function ScrollArea({ className, children, ...props }) { return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.ScrollArea.Root, { "data-slot": "scroll-area", className: chunkH2BWO3SI_cjs.cn("relative", className), ...props, children: [ /* @__PURE__ */ jsxRuntime.jsx( radixUi.ScrollArea.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring focus-visible:outline-1", children } ), /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}), /* @__PURE__ */ jsxRuntime.jsx(radixUi.ScrollArea.Corner, {}) ] }); } exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar;