@kubetail/ui 2.0.0-rc6 → 2.0.0-rc7
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/elements/table.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("../lib/utils.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("../lib/utils.cjs");function r({className:e,containerClassName:t,...o}){return a.jsx("div",{"data-slot":"table-container",className:l.cn("relative w-full overflow-x-auto",t),children:a.jsx("table",{"data-slot":"table",className:l.cn("w-full caption-bottom text-sm",e),...o})})}function n({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:l.cn("[&_tr]:border-b",e),...t})}function s({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:l.cn("[&_tr:last-child]:border-0",e),...t})}function c({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:l.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function b({className:e,...t}){return a.jsx("tr",{"data-slot":"table-row",className:l.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function d({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:l.cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function i({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:l.cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function u({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:l.cn("text-muted-foreground mt-4 text-sm",e),...t})}exports.Table=r;exports.TableBody=s;exports.TableCaption=u;exports.TableCell=i;exports.TableFooter=c;exports.TableHead=d;exports.TableHeader=n;exports.TableRow=b;
|
|
2
2
|
//# sourceMappingURL=table.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.cjs","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\nfunction Table({ className, ...props }:
|
|
1
|
+
{"version":3,"file":"table.cjs","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":"mJAQA,SAASA,EAAM,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,GAAqB,CACtE,OACEC,MAAC,OAAI,YAAU,kBAAkB,UAAWC,EAAAA,GAAG,kCAAmCH,CAAkB,EAClG,SAAAE,EAAAA,IAAC,SAAM,YAAU,QAAQ,UAAWC,EAAAA,GAAG,gCAAiCJ,CAAS,EAAI,GAAGE,EAAO,EACjG,CAEJ,CAEA,SAASG,EAAY,CAAE,UAAAL,EAAW,GAAGE,GAAwC,CAC3E,OAAOC,MAAC,QAAA,CAAM,YAAU,eAAe,UAAWC,EAAAA,GAAG,kBAAmBJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CACjG,CAEA,SAASI,EAAU,CAAE,UAAAN,EAAW,GAAGE,GAAwC,CACzE,OAAOC,MAAC,QAAA,CAAM,YAAU,aAAa,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAC1G,CAEA,SAASK,EAAY,CAAE,UAAAP,EAAW,GAAGE,GAAwC,CAC3E,OACEC,EAAAA,IAAC,QAAA,CACC,YAAU,eACV,UAAWC,EAAAA,GAAG,0DAA2DJ,CAAS,EACjF,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASM,EAAS,CAAE,UAAAR,EAAW,GAAGE,GAAqC,CACrE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,YACV,UAAWC,EAAAA,GAAG,8EAA+EJ,CAAS,EACrG,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASO,EAAU,CAAE,UAAAT,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,qJACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAU,CAAE,UAAAV,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,yGACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASS,EAAa,CAAE,UAAAX,EAAW,GAAGE,GAA0C,CAC9E,OACEC,MAAC,UAAA,CAAQ,YAAU,gBAAgB,UAAWC,EAAAA,GAAG,qCAAsCJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAElH"}
|
package/dist/elements/table.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
interface TableProps extends React.ComponentProps<'table'> {
|
|
2
|
+
containerClassName?: string;
|
|
3
|
+
}
|
|
4
|
+
declare function Table({ className, containerClassName, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
2
5
|
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,3 +10,4 @@ declare function TableHead({ className, ...props }: React.ComponentProps<'th'>):
|
|
|
7
10
|
declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
13
|
+
export type { TableProps };
|
package/dist/elements/table.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as o } from "../lib/utils.js";
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */ a("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ a("table", { "data-slot": "table", className: o("w-full caption-bottom text-sm", t), ...
|
|
3
|
+
function s({ className: t, containerClassName: e, ...l }) {
|
|
4
|
+
return /* @__PURE__ */ a("div", { "data-slot": "table-container", className: o("relative w-full overflow-x-auto", e), children: /* @__PURE__ */ a("table", { "data-slot": "table", className: o("w-full caption-bottom text-sm", t), ...l }) });
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function d({ className: t, ...e }) {
|
|
7
7
|
return /* @__PURE__ */ a("thead", { "data-slot": "table-header", className: o("[&_tr]:border-b", t), ...e });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function c({ className: t, ...e }) {
|
|
10
10
|
return /* @__PURE__ */ a("tbody", { "data-slot": "table-body", className: o("[&_tr:last-child]:border-0", t), ...e });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function b({ className: t, ...e }) {
|
|
13
13
|
return /* @__PURE__ */ a(
|
|
14
14
|
"tfoot",
|
|
15
15
|
{
|
|
@@ -19,7 +19,7 @@ function c({ className: t, ...e }) {
|
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function i({ className: t, ...e }) {
|
|
23
23
|
return /* @__PURE__ */ a(
|
|
24
24
|
"tr",
|
|
25
25
|
{
|
|
@@ -29,7 +29,7 @@ function b({ className: t, ...e }) {
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function m({ className: t, ...e }) {
|
|
33
33
|
return /* @__PURE__ */ a(
|
|
34
34
|
"th",
|
|
35
35
|
{
|
|
@@ -42,7 +42,7 @@ function i({ className: t, ...e }) {
|
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function u({ className: t, ...e }) {
|
|
46
46
|
return /* @__PURE__ */ a(
|
|
47
47
|
"td",
|
|
48
48
|
{
|
|
@@ -55,17 +55,17 @@ function m({ className: t, ...e }) {
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function f({ className: t, ...e }) {
|
|
59
59
|
return /* @__PURE__ */ a("caption", { "data-slot": "table-caption", className: o("text-muted-foreground mt-4 text-sm", t), ...e });
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
s as Table,
|
|
63
|
+
c as TableBody,
|
|
64
|
+
f as TableCaption,
|
|
65
|
+
u as TableCell,
|
|
66
|
+
b as TableFooter,
|
|
67
|
+
m as TableHead,
|
|
68
|
+
d as TableHeader,
|
|
69
|
+
i as TableRow
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\nfunction Table({ className, ...props }:
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":";;AAQA,SAASA,EAAM,EAAE,WAAA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