@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! ⚡
122 lines (121 loc) • 4.92 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__, {
TableHead: ()=>TableHead,
TableFooter: ()=>TableFooter,
TableRow: ()=>TableRow,
TableCaption: ()=>TableCaption,
TableHeader: ()=>TableHeader,
TableBody: ()=>TableBody,
TableCell: ()=>TableCell,
Table: ()=>Table
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
function Table({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
"data-slot": "table-container",
className: "relative w-full overflow-x-auto",
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("table", {
"data-slot": "table",
className: (0, utils_cjs_namespaceObject.cn)("w-full caption-bottom text-sm", className),
...props
})
});
}
function TableHeader({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("thead", {
"data-slot": "table-header",
className: (0, utils_cjs_namespaceObject.cn)("[&_tr]:border-b", className),
...props
});
}
function TableBody({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tbody", {
"data-slot": "table-body",
className: (0, utils_cjs_namespaceObject.cn)("[&_tr:last-child]:border-0", className),
...props
});
}
function TableFooter({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tfoot", {
"data-slot": "table-footer",
className: (0, utils_cjs_namespaceObject.cn)("bg-neutral-100/50 border-t font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50", className),
...props
});
}
function TableRow({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tr", {
"data-slot": "table-row",
className: (0, utils_cjs_namespaceObject.cn)("hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 border-b transition-colors dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800", className),
...props
});
}
function TableHead({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("th", {
"data-slot": "table-head",
className: (0, utils_cjs_namespaceObject.cn)("text-neutral-950 h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] dark:text-neutral-50", className),
...props
});
}
function TableCell({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("td", {
"data-slot": "table-cell",
className: (0, utils_cjs_namespaceObject.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
...props
});
}
function TableCaption({ className, ...props }) {
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("caption", {
"data-slot": "table-caption",
className: (0, utils_cjs_namespaceObject.cn)("text-neutral-500 mt-4 text-sm dark:text-neutral-400", className),
...props
});
}
exports.Table = __webpack_exports__.Table;
exports.TableBody = __webpack_exports__.TableBody;
exports.TableCaption = __webpack_exports__.TableCaption;
exports.TableCell = __webpack_exports__.TableCell;
exports.TableFooter = __webpack_exports__.TableFooter;
exports.TableHead = __webpack_exports__.TableHead;
exports.TableHeader = __webpack_exports__.TableHeader;
exports.TableRow = __webpack_exports__.TableRow;
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
"Table",
"TableBody",
"TableCaption",
"TableCell",
"TableFooter",
"TableHead",
"TableHeader",
"TableRow"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
value: true
});
//# sourceMappingURL=table.cjs.map