@arolariu/components
Version:
🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
73 lines (72 loc) • 3.39 kB
JavaScript
"use client";
;
var __webpack_require__ = {};
(()=>{
__webpack_require__.d = (exports1, definition)=>{
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
enumerable: true,
get: definition[key]
});
};
})();
(()=>{
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
__webpack_require__.r = (exports1)=>{
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
value: 'Module'
});
Object.defineProperty(exports1, '__esModule', {
value: true
});
};
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
ScrollBar: ()=>ScrollBar,
ScrollArea: ()=>ScrollArea
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const react_scroll_area_namespaceObject = require("@radix-ui/react-scroll-area");
const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
function ScrollArea({ className, children, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_scroll_area_namespaceObject.Root, {
"data-slot": "scroll-area",
className: (0, utils_cjs_namespaceObject.cn)("relative", className),
...props,
children: [
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Viewport, {
"data-slot": "scroll-area-viewport",
className: "focus-visible:ring-neutral-950/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 dark:focus-visible:ring-neutral-300/50",
children: children
}),
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ScrollBar, {}),
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Corner, {})
]
});
}
function ScrollBar({ className, orientation = "vertical", ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.ScrollAreaScrollbar, {
"data-slot": "scroll-area-scrollbar",
orientation: orientation,
className: (0, utils_cjs_namespaceObject.cn)("flex touch-none p-px transition-colors select-none", "vertical" === orientation && "h-full w-2.5 border-l border-l-transparent", "horizontal" === orientation && "h-2.5 flex-col border-t border-t-transparent", className),
...props,
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.ScrollAreaThumb, {
"data-slot": "scroll-area-thumb",
className: "bg-neutral-200 relative flex-1 rounded-full dark:bg-neutral-800"
})
});
}
exports.ScrollArea = __webpack_exports__.ScrollArea;
exports.ScrollBar = __webpack_exports__.ScrollBar;
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
"ScrollArea",
"ScrollBar"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
value: true
});
//# sourceMappingURL=scroll-area.cjs.map