@moontra/moonui-pro 2.3.0 → 2.3.1

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/index.mjs CHANGED
@@ -52153,6 +52153,9 @@ function FileUpload({
52153
52153
  ] })
52154
52154
  ] });
52155
52155
  }
52156
+
52157
+ // src/components/data-table/data-table.css
52158
+ styleInject(".moonui-data-table-container {\n}\n.moonui-data-table-wrapper {\n}\n.moonui-data-table {\n border-collapse: collapse;\n table-layout: fixed;\n}\n.moonui-data-table-header {\n}\n.moonui-data-table-body {\n}\n.moonui-data-table-row {\n}\n.moonui-data-table-th {\n}\n.moonui-data-table-td {\n}\n.moonui-data-table-toolbar {\n}\n.moonui-data-table-container * {\n box-sizing: border-box;\n}\n.moonui-data-table-container table {\n margin: 0;\n padding: 0;\n}\n.moonui-data-table-container th,\n.moonui-data-table-container td {\n margin: 0;\n}\n");
52156
52159
  function DataTable({
52157
52160
  columns,
52158
52161
  data,
@@ -52243,8 +52246,8 @@ function DataTable({
52243
52246
  onExport(dataToExport);
52244
52247
  }
52245
52248
  };
52246
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
52247
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
52249
+ return /* @__PURE__ */ jsxs("div", { className: cn("moonui-data-table-container space-y-4", className), children: [
52250
+ /* @__PURE__ */ jsxs("div", { className: "moonui-data-table-toolbar flex items-center justify-between", children: [
52248
52251
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
52249
52252
  searchable && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
52250
52253
  /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
@@ -52274,11 +52277,11 @@ function DataTable({
52274
52277
  ] })
52275
52278
  ] })
52276
52279
  ] }),
52277
- /* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
52278
- /* @__PURE__ */ jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "border-b", children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(
52280
+ /* @__PURE__ */ jsx("div", { className: "moonui-data-table-wrapper rounded-md border overflow-hidden", children: /* @__PURE__ */ jsxs("table", { className: "moonui-data-table w-full", children: [
52281
+ /* @__PURE__ */ jsx("thead", { className: "moonui-data-table-header", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "moonui-data-table-row border-b", children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(
52279
52282
  "th",
52280
52283
  {
52281
- className: "h-12 px-4 text-left align-middle font-medium text-muted-foreground",
52284
+ className: "moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",
52282
52285
  children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs(
52283
52286
  "div",
52284
52287
  {
@@ -52296,7 +52299,7 @@ function DataTable({
52296
52299
  },
52297
52300
  header.id
52298
52301
  )) }, headerGroup.id)) }),
52299
- /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: isPaginationLoading ? /* @__PURE__ */ jsx(
52302
+ /* @__PURE__ */ jsx("tbody", { className: "moonui-data-table-body", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: isPaginationLoading ? /* @__PURE__ */ jsx(
52300
52303
  motion.tr,
52301
52304
  {
52302
52305
  initial: { opacity: 0 },
@@ -52328,7 +52331,7 @@ function DataTable({
52328
52331
  row.getIsSelected() && "bg-muted",
52329
52332
  isExpanded && "border-b-0"
52330
52333
  ),
52331
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", { className: "p-4 align-middle", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
52334
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", { className: "moonui-data-table-td p-4 align-middle", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
52332
52335
  },
52333
52336
  row.id
52334
52337
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -0,0 +1,54 @@
1
+ /* MoonUI DataTable Component Styles */
2
+ .moonui-data-table-container {
3
+ /* Container specific styles */
4
+ }
5
+
6
+ .moonui-data-table-wrapper {
7
+ /* Wrapper specific styles */
8
+ }
9
+
10
+ .moonui-data-table {
11
+ /* Table specific styles */
12
+ border-collapse: collapse;
13
+ table-layout: fixed;
14
+ }
15
+
16
+ .moonui-data-table-header {
17
+ /* Header specific styles */
18
+ }
19
+
20
+ .moonui-data-table-body {
21
+ /* Body specific styles */
22
+ }
23
+
24
+ .moonui-data-table-row {
25
+ /* Row specific styles */
26
+ }
27
+
28
+ .moonui-data-table-th {
29
+ /* Table header cell specific styles */
30
+ }
31
+
32
+ .moonui-data-table-td {
33
+ /* Table data cell specific styles */
34
+ }
35
+
36
+ .moonui-data-table-toolbar {
37
+ /* Toolbar specific styles */
38
+ }
39
+
40
+ /* Prevent style leakage */
41
+ .moonui-data-table-container * {
42
+ box-sizing: border-box;
43
+ }
44
+
45
+ /* Ensure DataTable styles don't affect global styles */
46
+ .moonui-data-table-container table {
47
+ margin: 0;
48
+ padding: 0;
49
+ }
50
+
51
+ .moonui-data-table-container th,
52
+ .moonui-data-table-container td {
53
+ margin: 0;
54
+ }
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import React from 'react'
4
+ import './data-table.css'
4
5
  import {
5
6
  useReactTable,
6
7
  getCoreRowModel,
@@ -207,9 +208,9 @@ export function DataTable<TData, TValue>({
207
208
  }
208
209
 
209
210
  return (
210
- <div className={cn("space-y-4", className)}>
211
+ <div className={cn("moonui-data-table-container space-y-4", className)}>
211
212
  {/* Toolbar */}
212
- <div className="flex items-center justify-between">
213
+ <div className="moonui-data-table-toolbar flex items-center justify-between">
213
214
  <div className="flex items-center space-x-2">
214
215
  {searchable && (
215
216
  <div className="relative">
@@ -247,15 +248,15 @@ export function DataTable<TData, TValue>({
247
248
  </div>
248
249
 
249
250
  {/* Table */}
250
- <div className="rounded-md border">
251
- <table className="w-full">
252
- <thead>
251
+ <div className="moonui-data-table-wrapper rounded-md border overflow-hidden">
252
+ <table className="moonui-data-table w-full">
253
+ <thead className="moonui-data-table-header">
253
254
  {table.getHeaderGroups().map((headerGroup) => (
254
- <tr key={headerGroup.id} className="border-b">
255
+ <tr key={headerGroup.id} className="moonui-data-table-row border-b">
255
256
  {headerGroup.headers.map((header) => (
256
257
  <th
257
258
  key={header.id}
258
- className="h-12 px-4 text-left align-middle font-medium text-muted-foreground"
259
+ className="moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground"
259
260
  >
260
261
  {header.isPlaceholder ? null : (
261
262
  <div
@@ -284,7 +285,7 @@ export function DataTable<TData, TValue>({
284
285
  </tr>
285
286
  ))}
286
287
  </thead>
287
- <tbody>
288
+ <tbody className="moonui-data-table-body">
288
289
  <AnimatePresence mode="wait">
289
290
  {isPaginationLoading ? (
290
291
  <motion.tr
@@ -324,7 +325,7 @@ export function DataTable<TData, TValue>({
324
325
  )}
325
326
  >
326
327
  {row.getVisibleCells().map((cell) => (
327
- <td key={cell.id} className="p-4 align-middle">
328
+ <td key={cell.id} className="moonui-data-table-td p-4 align-middle">
328
329
  {flexRender(cell.column.columnDef.cell, cell.getContext())}
329
330
  </td>
330
331
  ))}